empower-container 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. package/package.json +1 -1
  2. package/public/favicon.ico +0 -0
  3. package/public/index.html +43 -0
  4. package/public/logo192.png +0 -0
  5. package/public/logo512.png +0 -0
  6. package/public/manifest.json +25 -0
  7. package/public/robots.txt +3 -0
  8. package/src/index.tsx +15 -0
  9. package/{dist/cjs → src/main}/DatetimeFormatter.d.ts +0 -0
  10. package/{dist/cjs → src/main}/DatetimeFormatter.js +0 -0
  11. package/{dist/esm/DatetimeFormatter.js → src/main/DatetimeFormatter.tsx} +139 -132
  12. package/{dist/cjs → src/main}/Information.d.ts +0 -0
  13. package/src/main/Information.js +65 -0
  14. package/src/main/Information.tsx +112 -0
  15. package/{dist/cjs → src/main}/MenuBar.d.ts +0 -0
  16. package/src/main/MenuBar.js +651 -0
  17. package/src/main/MenuBar.tsx +1074 -0
  18. package/{dist/cjs → src/main}/Modal.d.ts +0 -0
  19. package/src/main/Modal.js +24 -0
  20. package/src/main/Modal.tsx +83 -0
  21. package/{dist → src/main}/assets/Asset.d.ts +0 -0
  22. package/{dist → src/main}/assets/Asset.js +0 -0
  23. package/{dist → src/main}/assets/Asset.tsx +0 -0
  24. package/{dist → src/main}/assets/icons/icon-check-white-sm.svg +0 -0
  25. package/{dist → src/main}/assets/images/icon-arrowdown-graydark.svg +0 -0
  26. package/{dist → src/main}/assets/images/icon-arrowleft-graydark.svg +0 -0
  27. package/{dist → src/main}/assets/images/icon-arrowright-graydark.svg +0 -0
  28. package/{dist → src/main}/assets/images/icon-arrowup-graydark.svg +0 -0
  29. package/{dist → src/main}/assets/images/icon-check-graydark.svg +0 -0
  30. package/{dist/cjs → src/main}/constants/Constant.d.ts +0 -0
  31. package/{dist/esm → src/main}/constants/Constant.js +21 -9
  32. package/{dist/cjs → src/main}/index.d.ts +0 -0
  33. package/{dist/cjs → src/main}/index.js +0 -0
  34. package/{dist/esm/index.d.ts → src/main/index.tsx} +3 -1
  35. package/{dist/cjs → src/main}/inputs/Input.d.ts +0 -0
  36. package/{dist/cjs → src/main}/inputs/Input.js +36 -7
  37. package/src/main/inputs/Input.tsx +193 -0
  38. package/{dist/cjs → src/main}/inputs/InputSelectionHandler.d.ts +0 -0
  39. package/{dist/cjs → src/main}/inputs/InputSelectionHandler.js +3 -3
  40. package/src/main/inputs/InputSelectionHandler.tsx +21 -0
  41. package/{dist/cjs → src/main}/inputs/Select.d.ts +0 -0
  42. package/{dist/cjs → src/main}/inputs/Select.js +64 -11
  43. package/src/main/inputs/Select.tsx +654 -0
  44. package/src/main/tsconfig.common.json +34 -0
  45. package/src/main/tsconfig.json +35 -0
  46. package/src/sample/App.css +38 -0
  47. package/src/sample/App.d.ts +3 -0
  48. package/src/sample/App.js +13 -0
  49. package/src/sample/App.test.d.ts +1 -0
  50. package/src/sample/App.test.js +13 -0
  51. package/src/sample/App.test.tsx +9 -0
  52. package/src/sample/App.tsx +15 -0
  53. package/src/sample/TestMenuBar.d.ts +3 -0
  54. package/src/sample/TestMenuBar.js +529 -0
  55. package/src/sample/TestMenuBar.tsx +380 -0
  56. package/src/sample/react-app-env.d.ts +1 -0
  57. package/src/sample/reportWebVitals.d.ts +3 -0
  58. package/src/sample/reportWebVitals.js +38 -0
  59. package/src/sample/reportWebVitals.ts +15 -0
  60. package/src/sample/setupTests.d.ts +1 -0
  61. package/src/sample/setupTests.js +7 -0
  62. package/src/sample/setupTests.ts +5 -0
  63. package/src/sample/tsconfig.json +36 -0
  64. package/{dist → src}/scss/components/_modal.scss +0 -0
  65. package/{dist → src}/scss/elements/_button.scss +0 -0
  66. package/{dist → src}/scss/elements/_index.scss +0 -0
  67. package/{dist → src}/scss/elements/_popover.scss +0 -0
  68. package/{dist → src}/scss/foundation/_colors.scss +0 -0
  69. package/{dist → src}/scss/foundation/_mixins.scss +0 -0
  70. package/{dist → src}/scss/foundation/_normalize.scss +0 -0
  71. package/{dist → src}/scss/foundation/_settings.scss +0 -0
  72. package/{dist → src}/scss/foundation/_typography.scss +0 -0
  73. package/{dist → src}/scss/library/_information.scss +0 -0
  74. package/{dist → src}/scss/library/_input.scss +0 -0
  75. package/{dist → src}/scss/library/_menubar.scss +0 -0
  76. package/{dist → src}/scss/library/_select.scss +0 -0
  77. package/{dist → src}/scss/style.scss +0 -0
  78. package/dist/cjs/Information.js +0 -63
  79. package/dist/cjs/MenuBar.js +0 -537
  80. package/dist/cjs/Modal.js +0 -32
  81. package/dist/cjs/assets/Asset.d.ts +0 -16
  82. package/dist/cjs/assets/Asset.js +0 -30
  83. package/dist/cjs/constants/Constant.js +0 -35
  84. package/dist/esm/DatetimeFormatter.d.ts +0 -3
  85. package/dist/esm/Information.d.ts +0 -10
  86. package/dist/esm/Information.js +0 -38
  87. package/dist/esm/MenuBar.d.ts +0 -24
  88. package/dist/esm/MenuBar.js +0 -532
  89. package/dist/esm/Modal.d.ts +0 -33
  90. package/dist/esm/Modal.js +0 -27
  91. package/dist/esm/assets/Asset.d.ts +0 -16
  92. package/dist/esm/assets/Asset.js +0 -27
  93. package/dist/esm/constants/Constant.d.ts +0 -15
  94. package/dist/esm/index.js +0 -3
  95. package/dist/esm/inputs/Input.d.ts +0 -25
  96. package/dist/esm/inputs/Input.js +0 -104
  97. package/dist/esm/inputs/InputSelectionHandler.d.ts +0 -3
  98. package/dist/esm/inputs/InputSelectionHandler.js +0 -31
  99. package/dist/esm/inputs/Select.d.ts +0 -28
  100. package/dist/esm/inputs/Select.js +0 -399
@@ -0,0 +1,380 @@
1
+ import React, { useState } from 'react';
2
+ import { MenuBar, Modal } from '../main';
3
+ import { SVG_SUBMIT, SVG_UNDO, SVG_REQUEST, SVG_ADD } from '../main/assets/Asset';
4
+
5
+
6
+ const TestMenuBar = () => {
7
+
8
+
9
+ const MENUBAR = {
10
+
11
+ dropdown: {
12
+ show: true,
13
+ icon: (<img src="/images/icons/icon-add-graydark.svg" alt="" />),
14
+ title: 'File Test',
15
+ type: 'date-picker-monthly',
16
+ // type: 'date-picker-weekly',
17
+ // type: 'list',
18
+ actions: [
19
+ {
20
+ label: "Leave",
21
+ value: "file-leave", // string optional
22
+
23
+ },
24
+ {
25
+ label: "Overtime",
26
+ value: "file-overtime", // string optional
27
+
28
+ },
29
+ {
30
+ label: "DTR Amendment",
31
+ value: "file-amendment", // string optional
32
+
33
+ },
34
+ {
35
+ label: "Change Shift",
36
+ value: "view-shift-schedule", // string optional
37
+ },
38
+ ]
39
+ },
40
+
41
+ }
42
+
43
+ let [statedata, setStateData] = useState({
44
+
45
+ modal: {
46
+ show: false,
47
+ config: {
48
+ title: 'Test Title',
49
+ icon: SVG_REQUEST,
50
+ showInfo: true,
51
+ iconType: ['standard', 'close'],
52
+ modalSize: 'lg'
53
+ },
54
+ button: {
55
+ show: true,
56
+ actions: [
57
+ {
58
+ class: 'em-button',
59
+ label: "Submit",
60
+ action: "readytosubmit", // string optional
61
+ icon: SVG_SUBMIT
62
+ }
63
+ ]
64
+ },
65
+ },
66
+ menubar: {
67
+ config: {
68
+ title: <div>
69
+ <h3>Hello</h3>
70
+ <span>Sub Hello</span>
71
+ </div>,
72
+ icon: SVG_REQUEST,
73
+ showInfo: true,
74
+ iconType: ['check', "back", 'standard']
75
+ },
76
+
77
+ mainButton: {
78
+ show: true,
79
+ label: 'File a Request',
80
+ icon: SVG_ADD,
81
+ actions: [
82
+ {
83
+
84
+ label: "File Leave",
85
+ action: "leave", // string optional
86
+ icon: SVG_SUBMIT
87
+ },
88
+ {
89
+ label: "File Overtime",
90
+ action: "overtime", // string optional
91
+ icon: SVG_SUBMIT
92
+ },
93
+
94
+ {
95
+ label: "File Toil",
96
+ action: "toil", // string optional
97
+ icon: SVG_SUBMIT
98
+ },
99
+
100
+ {
101
+ label: "File Amendment",
102
+ action: "amendment", // string optional
103
+ icon: SVG_SUBMIT
104
+ }
105
+ ]
106
+ },
107
+
108
+
109
+ button: {
110
+ show: true,
111
+ actions: [
112
+ {
113
+ class: 'em-button',
114
+ label: "Submit",
115
+ action: "readytosubmit", // string optional
116
+ icon: SVG_SUBMIT
117
+ }
118
+ ]
119
+ },
120
+ buttonFooter: {
121
+ show: true,
122
+ actions: [
123
+ {
124
+ class: 'em-button',
125
+ label: "Submit",
126
+ action: "footer-submit", // string optional
127
+ icon: SVG_SUBMIT,
128
+ show: true
129
+ }
130
+ ]
131
+ },
132
+ pagination: {
133
+ show: true,
134
+ hideSummary: false,
135
+ counter: 10,
136
+ perPage: 10,
137
+ page: 1,
138
+ total: 35,
139
+ },
140
+ pivot: {
141
+ show: true,
142
+ selected: 'all',
143
+ actions: [
144
+ {
145
+ label: "All",
146
+ value: "all", // string optional
147
+ },
148
+ {
149
+ label: "Pending",
150
+ value: "pending", // string optional
151
+ },
152
+ {
153
+ label: "Approved",
154
+ value: "approved", // string optional
155
+ },
156
+ {
157
+ label: "Rejected",
158
+ value: "rejected", // string optional
159
+ },
160
+ {
161
+ label: "Cancelled",
162
+ value: "cancelled", // string optional
163
+ },
164
+ ]
165
+ },
166
+ dropdown: {
167
+ show: true,
168
+ title: 'File Test',
169
+ type: 'date-picker-monthly',
170
+ selection: {
171
+ startDate: "Feb 2021",
172
+ endDate: "Feb 2021",
173
+ },
174
+ },
175
+ search: {
176
+ show: true,
177
+ value: ''
178
+ },
179
+ undoButton: {
180
+ show: false,
181
+ isFooter: true,
182
+ actions: [
183
+ {
184
+ class: 'em-button disabled',
185
+ show: true,
186
+ label: "Submit",
187
+ action: "submit", // string optional
188
+ icon: SVG_SUBMIT,
189
+ timer: 3,
190
+ disabled: true
191
+ },
192
+ {
193
+ show: true,
194
+ label: "Undo Request",
195
+ action: "undo-request", // string optional
196
+ icon: SVG_UNDO
197
+ },
198
+ ]
199
+ },
200
+ check: {
201
+ disabled: false,
202
+ selected: 0,
203
+ total: 1
204
+ },
205
+ info: null
206
+ }
207
+
208
+
209
+
210
+ })
211
+
212
+
213
+ let { menubar, modal } = { ...statedata }
214
+
215
+
216
+ const getActions = (action, data) => {
217
+ console.log(action, data, 'action, data')
218
+ switch (action) {
219
+ case 'button':
220
+ if (data === 'readytosubmit') {
221
+ menubar.button.show = false;
222
+ menubar.undoButton.show = true;
223
+ menubar.undoButton.isFooter = false;
224
+ } else if (data === 'footer-submit') {
225
+ menubar.buttonFooter.show = false;
226
+ menubar.undoButton.show = true;
227
+ menubar.undoButton.isFooter = true;
228
+ }
229
+ break;
230
+ case 'undo-button':
231
+ if (menubar.undoButton.isFooter) {
232
+ menubar.buttonFooter.show = true;
233
+ } else {
234
+ menubar.button.show = true;
235
+ }
236
+ menubar.undoButton.show = false;
237
+ break;
238
+
239
+ case 'pivot':
240
+ menubar.pivot.selected = data;
241
+ break;
242
+
243
+ case 'dropdown':
244
+ menubar.dropdown.selection.startDate = data;
245
+ menubar.dropdown.selection.endDate = data;
246
+ break;
247
+
248
+ case 'icon':
249
+ // menubar.info = '<p>In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before the final copy is</p>';
250
+ const infoMenuBar = {
251
+ infoDetails: {
252
+ "companyPolicy": "<p><strong>Certifying Daily Time Records (DTR) </strong></p>\n<p>All Employees are expected to certify all DTRs covering a pay period as true, correct, accurate and final that will serve as basis to compute their pay.</p>\n<p><strong>Failure</strong> to certify DTRs shall result to an Auto-Certification at the end of the pay cutoff. Uncertified DTRs will be deemed true, correct, accurate and final, except for Absences incurred on the day of the cutoff itself, either on the 10th or 26th of the month.</p>\n<p>For these absences, either of the following will apply:</p>\n<p>1. The employee is given until the 12th or the 27th to amend the DTR and seek approval;</p>\n<p>2. The Timekeeping &amp; Benefits department will verify the details of the absence incurred and amend the DTR appropriately.</p>\n<p>The Company has two (2) pay cutoff periods:</p>\n<p>1. Payroll for the 15th -- 26th of the previous month to the 10th of the current month 2. Payroll for the 30th -- 11th to the 25th of the current month.</p>\n<p><strong>Clock In</strong></p>\n<p>When an employee clocks into work, the Company&rsquo;s online system shall provide the applicable status:</p>\n<p><strong> ON TIME</strong> - Clock In before the start of shift and/ or before the grace period (if any) ends</p>\n<p>TARDY - Clock In within the first four (4) hours after the shift has started</p>\n<p>ABSENT (1ST HALF and TARDY) - Clock In beyond the first four (4) hours after the shift has started will be tagged as Tardy. The first four (4) hours after the shift has started will be tagged as Absent - 1st Half.</p>\n<p><strong> Tardiness</strong></p>\n<p>1. Failure to come ON TIME six (6) times or accumulation of at least 60 minutes of TARDINESS (whichever comes first) within the 11th of the current month to the 10th of the following month, shall constitute an offense of TARDINESS.</p>\n<p>Employees are expected to time in upon arriving at their respective office. However, due to unforeseen circumstances preventing the employee to timely Clock In within the Company&rsquo;s online system, employees are allowed to amend their Clock In time, subject to the approval of their respective Department Head / Immediate Superior. Amendments to Clock In within the Company&rsquo;s online system can be done on or before the payroll cutoff.</p>\n<p>2. Employee reporting to work after the official start of the assigned work shift and, if any, after the grace period. Applicable only to Time-bounded Work Shifts.</p>\n<p>Tardiness computed in payroll is equivalent to length of time computed as the difference between the clock in time and the grace period. If no Grace Period allowed, it will be the difference between the clock in time and the start of the shift.</p>\n<p>Example:</p>\n<p>Start Time - 6:00 AM</p>\n<p>Grace Period - 6:10 AM (10 minutes from the start of the shift)</p>\n<p>Clock In - 6:15 AM</p>\n<p>Tardiness = 5 minutes (time in excess of the end of the Grace Period)</p>\n<p>Computed Tardiness will be the basis of payroll deductions.</p>\n<p><strong>Clock Out</strong></p>\n<p>When an employee clocks out of work, the Company&rsquo;s online system shall provide the applicable status:</p>\n<p><strong> SHIFT ENDED</strong> - Clock out on or beyond the end of shift will be tagged as Shift Ended</p>\n<p><strong>UNDERTIME</strong> - Clock out before the expected end of shift will tag the talent as Undertime</p>\n<p><strong>ABSENT (2ND HALF and Undertime)</strong> - Clock out within the first four (4) hours after the shift has started will be tagged as Undertime. The last four (4) hours before the shift ends will be tagged as Absent - 2nd Half.</p>\n<p><strong> Undertime </strong></p>\n<p>An employee leaving work earlier than the required end of a Work Shift. Undertime computed in payroll is equivalent to length of time computed as the difference between the end of shift and the clock out time.</p>\n<p>Example:</p>\n<p>End Time - 3:00 PM</p>\n<p>Clock In - 2:55 PM</p>\n<p>Undertime = 5 minutes (time out short of the end of the Grace Period)</p>\n<p>Computed Undertime will be the basis of payroll deductions.</p>",
253
+ "systemPolicy": "<p><strong>Certify </strong></p>\n<p>1. Certification of DTR can only be done<strong> within the cutoff. </strong></p>\n<p>2. You cannot certify an <strong>incomplete DTR, current day</strong> and <strong>an ongoing shift. </strong></p>\n<p>3. Failure to certify DTRs shall result to an Auto-Certification at the end of the pay cutoff.</p>\n<p><strong>What you can do:</strong></p>\n<p>1. If with time logged (whether complete or incomplete), allows <strong>DTR amendment</strong> or <strong>Certify</strong>.</p>\n<p>2. If registered Absent, allows DTR amendment, File a Leave or Certify.</p>\n<p><strong>Amendment can be done in the following ways: </strong></p>\n<p>1. Time Recorder - Previous Shift</p>\n<p>2. Requests - File Request / DTR amendment</p>\n<p>3. Express Button - Amendment</p>\n<p><strong>Filing of leave can be done in the following ways:</strong></p>\n<p>1. Time Recorder - Previous Shift</p>\n<p>2. Requests - File Request / File Leave</p>\n<p>3. Express Button - File Leave</p>\n<p><strong>Amend DTR</strong></p>\n<p>1. You cannot amend an<strong> Ongoing / Current Shift.</strong> Filing of DTR amendment is allowed the next day after you have Clocked In.</p>\n<p>2. Amendments are disallowed by the end of the cutoff (10th or 25th).</p>\n<p>3. You are expected to amend your DTR within <strong>twenty-four (24) hours upon return to work</strong> in the succeeding Work Shift.</p>\n<p>4. You can only adjust your CLOCK IN DATE one (1) day prior your Chosen Work Date.</p>\n<p><strong>E.g</strong></p>\n<p>Work Date: November 08, 2019 - 12:00am to 09:00am</p>\n<p>Clock in Date: November 07, 2019 Clock In Time:11:00pm</p>\n<p>Clock out Date: November 08, 2019 Clock out Time:09:00am</p>\n<p>5. You can only adjust your CLOCK OUT DATE one (1) day after your Chosen Work Date.</p>\n<p><strong>E.g</strong></p>\n<p>Work Date: November 08, 2019 - 8:00am to 05:00pm</p>\n<p>Clock in Date: November 08, 2019 Clock In Time:08:00am</p>\n<p>Clock out Date: November 09, 2019 Clock out Time:02:00am</p>\n<p>6. DTR amendment request can be canceled / edited provided the request is still pending.</p>\n<p>7. DTR amendment requests that have already passed or requests that have already been denied cannot be canceled.</p>\n<p>8. DTRs that have been previously certified <strong>CANNOT</strong> be amended.</p>\n<p><strong> File Leave </strong></p>\n<p>1. Filing of Sick / Emergency Leave is allowed the next day after you have Clocked In.</p>\n<p>2. You cannot file a backdated Vacation Leave.</p>\n<p>3. You cannot file a future - dated Sick / Emergency Leave.</p>\n<p>4. The employee is expected to file a Sick or Emergency Leave within the Company online system within <strong>twenty-four (24) hours upon return to work</strong> in the succeeding Work Shift.</p>\n<p>5. Leave request can be edited provided the request is still pending.</p>\n<p>6. Approved leave request can be canceled before the effectivity date.</p>\n<p>7. Reporting to work on a day with a pre-approved SIL.</p>\n<p>- Will cancel the leave</p>\n<p>- Credit back the approved SIL to the Leave balance</p>\n<p>- Record the DTR for the day</p>",
254
+ "instruction": "<p><strong>What you can do:</strong></p>\n<p>1. If with time logged (whether complete or incomplete), allows DTR amendment or Certify.</p>\n<p>2. If without time logged, allows DTR Amemdment.</p>\n<p>3. If registered Absent, allows DTR amendment, File a Leave or Certify.</p>\n<p><strong>Amendment can be done in the following ways:</strong></p>\n<p>1. Time Recorder - Previous Shift</p>\n<p>2. Requests - File Request / DTR amendment</p>\n<p>3. Express Button - Amendment</p>\n<p><strong>Filing of leave can be done in the following ways:</strong></p>\n<p>1. Time Recorder - Previous Shift</p>\n<p>2. Requests - File Request / File Leave</p>\n<p>3. Express Button - File Leave</p>"
255
+ },
256
+ listRow: [
257
+ "COMPANY POLICY",
258
+ "SYSTEM POLICY",
259
+ "INSTRUCTION"
260
+ ],
261
+ "loaded": false,
262
+ "cardIconDesc": false
263
+ }
264
+
265
+ menubar.info = infoMenuBar
266
+
267
+
268
+ break;
269
+
270
+ default: break;
271
+ }
272
+ statedata.menubar = menubar;
273
+ statedata.modal = modal;
274
+
275
+ setStateData({...statedata});
276
+ }
277
+
278
+ const displayModal = (event) => {
279
+ event.preventDefault();
280
+ modal.show = true;
281
+ statedata.modal = modal
282
+ setStateData({...statedata});
283
+ }
284
+
285
+ const getModalActions = (action, data) => {
286
+
287
+ console.log(action, data, 'action modal');
288
+ switch (action) {
289
+ case 'icon':
290
+ modal.show = false;
291
+ break;
292
+ default: break;
293
+ }
294
+
295
+ statedata.modal = modal
296
+ setStateData({...statedata});
297
+ }
298
+
299
+ const View = () => {
300
+ return (
301
+ <React.Fragment>
302
+ <MenuBar
303
+ config={menubar.config}
304
+ button={menubar.button}
305
+ mainButton={menubar.mainButton }
306
+ pagination={menubar.pagination}
307
+ pivot={menubar.pivot}
308
+ dropdown={menubar.dropdown}
309
+ search={menubar.search}
310
+ undoButton={menubar.undoButton}
311
+ buttonFooter={menubar.buttonFooter}
312
+ check={menubar.check}
313
+ info={menubar.info}
314
+
315
+ getActions={(action, data) => getActions(action, data)}
316
+ >
317
+ <h2>CHILDREN</h2>
318
+ </MenuBar>
319
+ {/* ------------------- */}
320
+ <MenuBar
321
+ config={menubar.config}
322
+ dropdown={{
323
+ show: true,
324
+ type: 'list',
325
+ icon: SVG_ADD,
326
+ title: 'Title',
327
+ actions: [
328
+ {
329
+ label: "Leave",
330
+ value: "file-leave", // string optional
331
+
332
+ },
333
+ {
334
+ label: "Overtime",
335
+ value: "file-overtime", // string optional
336
+
337
+ },
338
+ {
339
+ label: "DTR Amendment",
340
+ value: "file-amendment", // string optional
341
+
342
+ },
343
+ {
344
+ label: "Change Shift",
345
+ value: "view-shift-schedule", // string optional
346
+ },
347
+ ]
348
+ }}
349
+ getActions={(action, data) => getActions(action, data)}
350
+ >
351
+ <h2>CHILDREN AGAIN</h2>
352
+ </MenuBar>
353
+ <div>
354
+ <button className="em-button" onClick={event => displayModal(event)}>
355
+ <span>
356
+ DISPLAY MODAL
357
+ </span>
358
+ </button>
359
+ </div>
360
+ <Modal
361
+ {...modal}
362
+ getActions={(action, data) => getModalActions(action, data)}
363
+ >
364
+ <div className="card-grid card-grid-multiple">
365
+ <div className="card-grid-col">
366
+ <div className="card-grid-item">
367
+ <div className="card-grid-name">
368
+ <div>
369
+ <a href="#" className="thumb thumb-sm"><span>AU</span></a>
370
+ </div><div><h6>Alvin Uy</h6><label>Product Manager</label></div></div><div className="card-grid-info"><div><div><div data-testid="badge-current" className="badge badge-approved"></div></div><span><b>Approved</b> - 17 Same Request(s)</span></div></div></div></div><div className="card-grid-col"><div className="card-grid-item"><div className="card-grid-name"><div><a href="#" className="thumb thumb-sm"><span>KU</span></a></div><div><h6>Ken Uriarte</h6><label>Principal Developer</label></div></div><div className="card-grid-info"><div><div><div data-testid="badge-current" className="badge badge-approved"></div></div><span><b>Approved</b> - 17 Same Request(s)</span></div></div></div></div><div className="card-grid-col"><div className="card-grid-item"><div className="card-grid-name"><div><a href="#" className="thumb thumb-sm"><span>JC</span></a></div><div><h6>Jacky Alexander Chan</h6><label>Ph Senior Software Developer</label></div></div><div className="card-grid-info"><div><div><div data-testid="badge-current" className="badge badge-approved"></div></div><span><b>Approved</b> - 17 Same Request(s)</span></div></div></div></div><div className="card-grid-col"><div className="card-grid-item"><div className="card-grid-name"><div><a href="#" className="thumb thumb-sm"><span>KU</span></a></div><div><h6>Ken Uriarte</h6><label>Principal Developer</label></div></div><div className="card-grid-info"><div><div><div data-testid="badge-current" className="badge badge-approved"></div></div><span><b>Approved</b> - 17 Same Request(s)</span></div></div></div></div><div className="card-grid-col"><div className="card-grid-item"><div className="card-grid-name"><div><a href="#" className="thumb thumb-sm"><span>KU</span></a></div><div><h6>Ken Uriarte</h6><label>Principal Developer</label></div></div><div className="card-grid-info"><div><div><div data-testid="badge-current" className="badge badge-approved"></div></div><span><b>Approved</b> - 17 Same Request(s)</span></div></div></div></div><div className="card-grid-col"><div className="card-grid-item"><div className="card-grid-name"><div><a href="#" className="thumb thumb-sm"><span>KU</span></a></div><div><h6>Ken Uriarte</h6><label>Principal Developer</label></div></div><div className="card-grid-info"><div><div><div data-testid="badge-current" className="badge badge-approved"></div></div><span><b>Approved</b> - 17 Same Request(s)</span></div></div></div></div><div className="card-grid-col"><div className="card-grid-item"><div className="card-grid-name"><div><a href="#" className="thumb thumb-sm"><span>KU</span></a></div><div><h6>Ken Uriarte</h6><label>Principal Developer</label></div></div><div className="card-grid-info"><div><div><div data-testid="badge-current" className="badge badge-approved"></div></div><span><b>Approved</b> - 17 Same Request(s)</span></div></div></div></div><div className="card-grid-col"><div className="card-grid-item"><div className="card-grid-name"><div><a href="#" className="thumb thumb-sm"><span>KU</span></a></div><div><h6>Ken Uriarte</h6><label>Principal Developer</label></div></div><div className="card-grid-info"><div><div><div data-testid="badge-current" className="badge badge-approved"></div></div><span><b>Approved</b> - 17 Same Request(s)</span></div></div></div></div><div className="card-grid-col"><div className="card-grid-item"><div className="card-grid-name"><div><a href="#" className="thumb thumb-sm"><span>AU</span></a></div><div><h6>Alvin Uy</h6><label>Product Manager</label></div></div><div className="card-grid-info"><div><div><div data-testid="badge-current" className="badge badge-approved"></div></div><span><b>Approved</b> - 17 Same Request(s)</span></div></div></div></div><div className="card-grid-col"><div className="card-grid-item"><div className="card-grid-name"><div><a href="#" className="thumb thumb-sm"><span>KU</span></a></div><div><h6>Ken Uriarte</h6><label>Principal Developer</label></div></div><div className="card-grid-info"><div><div><div data-testid="badge-current" className="badge badge-approved"></div></div><span><b>Approved</b> - 17 Same Request(s)</span></div></div></div></div><div className="card-grid-col"><div className="card-grid-item"><div className="card-grid-name"><div><a href="#" className="thumb thumb-sm"><span>KU</span></a></div><div><h6>Ken Uriarte</h6><label>Principal Developer</label></div></div><div className="card-grid-info"><div><div><div data-testid="badge-current" className="badge badge-approved"></div></div><span><b>Approved</b> - 17 Same Request(s)</span></div></div></div></div><div className="card-grid-col"><div className="card-grid-item"><div className="card-grid-name"><div><a href="#" className="thumb thumb-sm"><span>AU</span></a></div><div><h6>Alvin Uy</h6><label>Product Manager</label></div></div><div className="card-grid-info"><div><div><div data-testid="badge-current" className="badge badge-approved"></div></div><span><b>Approved</b> - 17 Same Request(s)</span></div></div></div></div></div>
371
+ </Modal>
372
+ </React.Fragment>
373
+ )
374
+ }
375
+
376
+ console.log(menubar.info, 'menubar')
377
+ return View();
378
+ };
379
+
380
+ export default TestMenuBar;
@@ -0,0 +1 @@
1
+ /// <reference types="react-scripts" />
@@ -0,0 +1,3 @@
1
+ import { ReportHandler } from 'web-vitals';
2
+ declare const reportWebVitals: (onPerfEntry?: ReportHandler) => void;
3
+ export default reportWebVitals;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ var reportWebVitals = function (onPerfEntry) {
27
+ if (onPerfEntry && onPerfEntry instanceof Function) {
28
+ Promise.resolve().then(function () { return __importStar(require('web-vitals')); }).then(function (_a) {
29
+ var getCLS = _a.getCLS, getFID = _a.getFID, getFCP = _a.getFCP, getLCP = _a.getLCP, getTTFB = _a.getTTFB;
30
+ getCLS(onPerfEntry);
31
+ getFID(onPerfEntry);
32
+ getFCP(onPerfEntry);
33
+ getLCP(onPerfEntry);
34
+ getTTFB(onPerfEntry);
35
+ });
36
+ }
37
+ };
38
+ exports.default = reportWebVitals;
@@ -0,0 +1,15 @@
1
+ import { ReportHandler } from 'web-vitals';
2
+
3
+ const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4
+ if (onPerfEntry && onPerfEntry instanceof Function) {
5
+ import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6
+ getCLS(onPerfEntry);
7
+ getFID(onPerfEntry);
8
+ getFCP(onPerfEntry);
9
+ getLCP(onPerfEntry);
10
+ getTTFB(onPerfEntry);
11
+ });
12
+ }
13
+ };
14
+
15
+ export default reportWebVitals;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // jest-dom adds custom jest matchers for asserting on DOM nodes.
4
+ // allows you to do things like:
5
+ // expect(element).toHaveTextContent(/react/i)
6
+ // learn more: https://github.com/testing-library/jest-dom
7
+ require("@testing-library/jest-dom");
@@ -0,0 +1,5 @@
1
+ // jest-dom adds custom jest matchers for asserting on DOM nodes.
2
+ // allows you to do things like:
3
+ // expect(element).toHaveTextContent(/react/i)
4
+ // learn more: https://github.com/testing-library/jest-dom
5
+ import '@testing-library/jest-dom';
@@ -0,0 +1,36 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "lib": [
5
+ "dom",
6
+ "dom.iterable",
7
+ "esnext",
8
+ "es2016",
9
+ "es2017"
10
+ ],
11
+ "allowJs": true,
12
+ "skipLibCheck": true,
13
+ "esModuleInterop": true,
14
+ "allowSyntheticDefaultImports": true,
15
+ "strict": false,
16
+ "forceConsistentCasingInFileNames": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+ "declaration": true,
19
+ "module": "commonjs",
20
+ "moduleResolution": "node",
21
+ "suppressImplicitAnyIndexErrors": true,
22
+ "jsx": "react",
23
+
24
+
25
+ },
26
+
27
+
28
+
29
+ }
30
+
31
+
32
+
33
+
34
+
35
+
36
+
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,63 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- var jsx_runtime_1 = require("react/jsx-runtime");
38
- var react_1 = __importStar(require("react"));
39
- var Asset_1 = require("./assets/Asset");
40
- var Information = function (_a) {
41
- var items = _a.items, listRow = _a.listRow, desc = _a.desc, title = _a.title, hide = _a.hide;
42
- var _b = (0, react_1.useState)(null), rowAnchorEl = _b[0], setRowAnchorEl = _b[1];
43
- var renderHtml = function (html) {
44
- return (0, jsx_runtime_1.jsx)("div", { dangerouslySetInnerHTML: { __html: html } });
45
- };
46
- var showRowDetails = function (e, idx) {
47
- e && e.preventDefault();
48
- if (rowAnchorEl === idx) {
49
- rowAnchorEl = null;
50
- }
51
- else {
52
- rowAnchorEl = idx;
53
- }
54
- setRowAnchorEl(rowAnchorEl);
55
- };
56
- var View = function () {
57
- return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "em-popover-i" }, { children: typeof desc != 'undefined' && desc ? ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-content" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-title" }, { children: [(0, jsx_runtime_1.jsx)("h6", { children: title }), (0, jsx_runtime_1.jsx)("div", { className: "em-popover-i-close", onClick: hide })] })), (0, jsx_runtime_1.jsx)("div", { children: typeof items != 'undefined' && items ? renderHtml(items) : '' })] }))) : ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-content" }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-title" }, { children: [(0, jsx_runtime_1.jsx)("h6", { children: title }), (0, jsx_runtime_1.jsx)("div", { className: "em-popover-i-close", onClick: hide })] })), listRow ? (listRow.length >= 1 ? (listRow.map(function (item, key) { return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-popover-i-category", onClick: function (event) { return showRowDetails(event, key); } }, { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("h6", { children: item }) }), rowAnchorEl === key ? (Asset_1.SVG_ARROW_UP) : (Asset_1.SVG_ARROWDOWN)] })), rowAnchorEl === key ? ((0, jsx_runtime_1.jsx)("div", __assign({ className: "em-popover-i-details" }, { children: item === 'COMPANY POLICY' ? (typeof items != 'undefined' && typeof items.companyPolicy != 'undefined' && items.companyPolicy ? renderHtml(items.companyPolicy) : '') :
58
- (item === 'SYSTEM POLICY' ? (typeof items != 'undefined' && typeof items.systemPolicy != 'undefined' && items.systemPolicy ? renderHtml(items.systemPolicy) : '') :
59
- (typeof items != 'undefined' && typeof items.instruction != 'undefined' && items.instruction ? renderHtml(items.instruction) : '')) }))) : null] }, key)); })) : null) : null] }))) })) });
60
- };
61
- return View();
62
- };
63
- exports.default = Information;