dce-reactkit 3.5.13 → 3.6.1

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 (34) hide show
  1. package/dist/cjs/index.js +355 -298
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/client/initClient.d.ts +7 -0
  4. package/dist/cjs/types/components/AppWrapper.d.ts +0 -1
  5. package/dist/cjs/types/helpers/makeLinksClickable.d.ts +4 -2
  6. package/dist/esm/index.js +355 -298
  7. package/dist/esm/index.js.map +1 -1
  8. package/dist/esm/types/client/initClient.d.ts +7 -0
  9. package/dist/esm/types/components/AppWrapper.d.ts +0 -1
  10. package/dist/esm/types/helpers/makeLinksClickable.d.ts +4 -2
  11. package/dist/index.d.ts +5 -3
  12. package/package.json +1 -1
  13. package/src/client/initClient.tsx +20 -4
  14. package/src/components/AppWrapper.tsx +8 -6
  15. package/src/components/ButtonInputGroup.tsx +6 -6
  16. package/src/components/CSVDownloadButton.tsx +6 -6
  17. package/src/components/CheckboxButton.tsx +19 -8
  18. package/src/components/CopiableBox.tsx +8 -8
  19. package/src/components/Drawer.tsx +7 -7
  20. package/src/components/ErrorBox.tsx +5 -5
  21. package/src/components/IntelliTable.tsx +135 -135
  22. package/src/components/ItemPicker/NestableItemList.tsx +7 -7
  23. package/src/components/ItemPicker/index.tsx +7 -7
  24. package/src/components/LoadingSpinner.tsx +4 -4
  25. package/src/components/LogReviewer.tsx +21 -22
  26. package/src/components/Modal.tsx +163 -75
  27. package/src/components/PopFailureMark.tsx +7 -7
  28. package/src/components/PopPendingMark.tsx +7 -7
  29. package/src/components/PopSuccessMark.tsx +7 -7
  30. package/src/components/RadioButton.tsx +17 -8
  31. package/src/components/SimpleDateChooser.tsx +14 -13
  32. package/src/components/TabBox.tsx +7 -7
  33. package/src/helpers/genRouteHandler.ts +45 -41
  34. package/src/helpers/makeLinksClickable.tsx +6 -4
@@ -52,7 +52,7 @@ import ButtonInputGroup from './ButtonInputGroup';
52
52
  import IntelliTable from './IntelliTable';
53
53
 
54
54
  /*------------------------------------------------------------------------*/
55
- /* Types */
55
+ /* -------------------------------- Types ------------------------------- */
56
56
  /*------------------------------------------------------------------------*/
57
57
 
58
58
  // Props
@@ -177,7 +177,7 @@ type AdvancedFilterState = {
177
177
  };
178
178
 
179
179
  /*------------------------------------------------------------------------*/
180
- /* Style */
180
+ /* -------------------------------- Style ------------------------------- */
181
181
  /*------------------------------------------------------------------------*/
182
182
 
183
183
  const style = `
@@ -265,7 +265,7 @@ const style = `
265
265
  `;
266
266
 
267
267
  /*------------------------------------------------------------------------*/
268
- /* Constants */
268
+ /* ------------------------------ Constants ----------------------------- */
269
269
  /*------------------------------------------------------------------------*/
270
270
 
271
271
  const columns: IntelliTableColumn[] = [
@@ -456,7 +456,7 @@ const columns: IntelliTableColumn[] = [
456
456
  ];
457
457
 
458
458
  /*------------------------------------------------------------------------*/
459
- /* Static Functions */
459
+ /* -------------------------- Static Functions -------------------------- */
460
460
  /*------------------------------------------------------------------------*/
461
461
 
462
462
  /**
@@ -523,7 +523,7 @@ const genHumanReadableName = (machineReadableName: string) => {
523
523
  };
524
524
 
525
525
  /*------------------------------------------------------------------------*/
526
- /* State */
526
+ /* -------------------------------- State ------------------------------- */
527
527
  /*------------------------------------------------------------------------*/
528
528
 
529
529
  /* -------- State Definition -------- */
@@ -722,12 +722,12 @@ const reducer = (state: State, action: Action): State => {
722
722
  };
723
723
 
724
724
  /*------------------------------------------------------------------------*/
725
- /* Component */
725
+ /* ------------------------------ Component ----------------------------- */
726
726
  /*------------------------------------------------------------------------*/
727
727
 
728
728
  const LogReviewer: React.FC<Props> = (props) => {
729
729
  /*------------------------------------------------------------------------*/
730
- /* Setup */
730
+ /* -------------------------------- Setup ------------------------------- */
731
731
  /*------------------------------------------------------------------------*/
732
732
 
733
733
  /* -------------- Props ------------- */
@@ -746,7 +746,7 @@ const LogReviewer: React.FC<Props> = (props) => {
746
746
  ].forEach((partialContextMap) => {
747
747
  Object.keys(partialContextMap).forEach((context) => {
748
748
  // Add context
749
- contextMap[context] = partialContextMap[context];
749
+ contextMap[context] = (partialContextMap as any)[context];
750
750
 
751
751
  // If context has children, add an "uncategorized" subcontext
752
752
  if (typeof contextMap[context] !== 'string') {
@@ -764,7 +764,7 @@ const LogReviewer: React.FC<Props> = (props) => {
764
764
  LogBuiltInMetadata.Target,
765
765
  ].forEach((partialTargetMap) => {
766
766
  Object.keys(partialTargetMap).forEach((target) => {
767
- targetMap[target] = partialTargetMap[target];
767
+ targetMap[target] = (partialTargetMap as any)[target];
768
768
  });
769
769
  });
770
770
 
@@ -875,7 +875,7 @@ const LogReviewer: React.FC<Props> = (props) => {
875
875
  } = state;
876
876
 
877
877
  /*------------------------------------------------------------------------*/
878
- /* Component Functions */
878
+ /* ------------------------- Component Functions ------------------------ */
879
879
  /*------------------------------------------------------------------------*/
880
880
 
881
881
  /**
@@ -892,8 +892,7 @@ const LogReviewer: React.FC<Props> = (props) => {
892
892
  const toLoad: { year: number, month: number }[] = [];
893
893
 
894
894
  // Loop through dates
895
- let year = newDateFilterState.startDate.year;
896
- let month = newDateFilterState.startDate.month;
895
+ let { year, month } = newDateFilterState.startDate;
897
896
  while (
898
897
  // Earlier year
899
898
  (year < newDateFilterState.endDate.year)
@@ -913,7 +912,7 @@ const LogReviewer: React.FC<Props> = (props) => {
913
912
  month,
914
913
  });
915
914
  }
916
-
915
+
917
916
  // Increment
918
917
  month += 1;
919
918
  if (month > 12) {
@@ -983,7 +982,7 @@ const LogReviewer: React.FC<Props> = (props) => {
983
982
  };
984
983
 
985
984
  /*------------------------------------------------------------------------*/
986
- /* Lifecycle Functions */
985
+ /* ------------------------- Lifecycle Functions ------------------------ */
987
986
  /*------------------------------------------------------------------------*/
988
987
 
989
988
  /**
@@ -999,11 +998,11 @@ const LogReviewer: React.FC<Props> = (props) => {
999
998
  );
1000
999
 
1001
1000
  /*------------------------------------------------------------------------*/
1002
- /* Render */
1001
+ /* ------------------------------- Render ------------------------------- */
1003
1002
  /*------------------------------------------------------------------------*/
1004
1003
 
1005
1004
  /*----------------------------------------*/
1006
- /* Main UI */
1005
+ /* --------------- Main UI -------------- */
1007
1006
  /*----------------------------------------*/
1008
1007
 
1009
1008
  // Body that will be filled with the contents of the panel
@@ -1023,7 +1022,7 @@ const LogReviewer: React.FC<Props> = (props) => {
1023
1022
 
1024
1023
  if (!loading) {
1025
1024
  /*----------------------------------------*/
1026
- /* Filters */
1025
+ /* --------------- Filters -------------- */
1027
1026
  /*----------------------------------------*/
1028
1027
 
1029
1028
  // Filter toggle
@@ -1610,7 +1609,7 @@ const LogReviewer: React.FC<Props> = (props) => {
1610
1609
  placeholder="e.g. 104985"
1611
1610
  onChange={(e) => {
1612
1611
  const { value } = e.target;
1613
- // Only update if value contains only numbers
1612
+ // Only update if value contains only numbers
1614
1613
  if (/^\d+$/.test(value)) {
1615
1614
  advancedFilterState.userId = (
1616
1615
  (e.target.value)
@@ -1700,7 +1699,7 @@ const LogReviewer: React.FC<Props> = (props) => {
1700
1699
  placeholder="e.g. 15948"
1701
1700
  onChange={(e) => {
1702
1701
  const { value } = e.target;
1703
- // Only update if value contains only numbers
1702
+ // Only update if value contains only numbers
1704
1703
  if (/^\d+$/.test(value)) {
1705
1704
  advancedFilterState.courseId = (
1706
1705
  (e.target.value)
@@ -1878,7 +1877,7 @@ const LogReviewer: React.FC<Props> = (props) => {
1878
1877
  Object.keys(logMap[year]).forEach((month) => {
1879
1878
  logMap[year][month].forEach((log) => {
1880
1879
  /* ----------- Date Filter ---------- */
1881
-
1880
+
1882
1881
  // Before start date
1883
1882
  if (
1884
1883
  // Previous year
@@ -2200,7 +2199,7 @@ const LogReviewer: React.FC<Props> = (props) => {
2200
2199
  });
2201
2200
 
2202
2201
  /*----------------------------------------*/
2203
- /* Data */
2202
+ /* ---------------- Data ---------------- */
2204
2203
  /*----------------------------------------*/
2205
2204
 
2206
2205
  // Nothing to show notice
@@ -2279,7 +2278,7 @@ const LogReviewer: React.FC<Props> = (props) => {
2279
2278
  };
2280
2279
 
2281
2280
  /*------------------------------------------------------------------------*/
2282
- /* Wrap Up */
2281
+ /* ------------------------------- Wrap Up ------------------------------ */
2283
2282
  /*------------------------------------------------------------------------*/
2284
2283
 
2285
2284
  // Export component
@@ -1,3 +1,8 @@
1
+ /* eslint-disable react/no-unused-prop-types */
2
+ /* eslint-disable jsx-a11y/no-static-element-interactions */
3
+ /* eslint-disable jsx-a11y/click-events-have-key-events */
4
+ /* eslint-disable react/destructuring-assignment */
5
+
1
6
  /**
2
7
  * A generic popup modal
3
8
  * @author Gabe Abrams
@@ -15,8 +20,13 @@ import ModalButtonType from '../types/ModalButtonType';
15
20
  import ModalSize from '../types/ModalSize';
16
21
  import ModalType from '../types/ModalType';
17
22
 
23
+ // Import shared helpers
24
+ // TODO: fix dependency cycle
25
+ // eslint-disable-next-line import/no-cycle
26
+ import { isDarkModeOn } from '../client/initClient';
27
+
18
28
  /*------------------------------------------------------------------------*/
19
- /* Constants */
29
+ /* ------------------------------ Constants ----------------------------- */
20
30
  /*------------------------------------------------------------------------*/
21
31
 
22
32
  // Constants
@@ -60,52 +70,75 @@ const modalTypeToModalButtonTypes: {
60
70
  ],
61
71
  };
62
72
 
63
- // Button type styling and labels
64
- const ModalButtonTypeToLabelAndVariant = {
65
- [ModalButtonType.Okay]: {
66
- label: 'Okay',
67
- variant: Variant.Dark,
68
- },
69
- [ModalButtonType.Cancel]: {
70
- label: 'Cancel',
71
- variant: Variant.Secondary,
72
- },
73
- [ModalButtonType.Yes]: {
74
- label: 'Yes',
75
- variant: Variant.Dark,
76
- },
77
- [ModalButtonType.No]: {
78
- label: 'No',
79
- variant: Variant.Secondary,
80
- },
81
- [ModalButtonType.Abandon]: {
82
- label: 'Abandon Changes',
83
- variant: Variant.Warning,
84
- },
85
- [ModalButtonType.GoBack]: {
86
- label: 'Go Back',
87
- variant: Variant.Secondary,
88
- },
89
- [ModalButtonType.Continue]: {
90
- label: 'Continue',
91
- variant: Variant.Dark,
92
- },
93
- [ModalButtonType.ImSure]: {
94
- label: 'I am sure',
95
- variant: Variant.Warning,
96
- },
97
- [ModalButtonType.Delete]: {
98
- label: 'Yes, Delete',
99
- variant: Variant.Danger,
100
- },
101
- [ModalButtonType.Confirm]: {
102
- label: 'Confirm',
103
- variant: Variant.Dark,
104
- },
73
+ /**
74
+ * Get button type styling and labels
75
+ * @author Gabe Abrams
76
+ * @returns map of button type to label and variant
77
+ */
78
+ const getModalButtonTypeToLabelAndVariant = () => {
79
+ const dark = isDarkModeOn();
80
+ return {
81
+ [ModalButtonType.Okay]: {
82
+ label: 'Okay',
83
+ variant: (
84
+ dark
85
+ ? Variant.Light
86
+ : Variant.Dark
87
+ ),
88
+ },
89
+ [ModalButtonType.Cancel]: {
90
+ label: 'Cancel',
91
+ variant: Variant.Secondary,
92
+ },
93
+ [ModalButtonType.Yes]: {
94
+ label: 'Yes',
95
+ variant: (
96
+ dark
97
+ ? Variant.Light
98
+ : Variant.Dark
99
+ ),
100
+ },
101
+ [ModalButtonType.No]: {
102
+ label: 'No',
103
+ variant: Variant.Secondary,
104
+ },
105
+ [ModalButtonType.Abandon]: {
106
+ label: 'Abandon Changes',
107
+ variant: Variant.Warning,
108
+ },
109
+ [ModalButtonType.GoBack]: {
110
+ label: 'Go Back',
111
+ variant: Variant.Secondary,
112
+ },
113
+ [ModalButtonType.Continue]: {
114
+ label: 'Continue',
115
+ variant: (
116
+ dark
117
+ ? Variant.Light
118
+ : Variant.Dark
119
+ ),
120
+ },
121
+ [ModalButtonType.ImSure]: {
122
+ label: 'I am sure',
123
+ variant: Variant.Warning,
124
+ },
125
+ [ModalButtonType.Delete]: {
126
+ label: 'Yes, Delete',
127
+ variant: Variant.Danger,
128
+ },
129
+ [ModalButtonType.Confirm]: {
130
+ label: 'Confirm',
131
+ variant: (
132
+ dark
133
+ ? Variant.Light
134
+ : Variant.Dark
135
+ ),
136
+ },
137
+ };
105
138
  };
106
139
 
107
140
  /*------------------------------------------------------------------------*/
108
- /* Style */
141
+ /* -------------------------------- Style ------------------------------- */
109
142
  /*------------------------------------------------------------------------*/
110
143
 
111
144
  const style = `
@@ -173,7 +206,7 @@ const style = `
173
206
  `;
174
207
 
175
208
  /*------------------------------------------------------------------------*/
176
- /* Types */
209
+ /* -------------------------------- Types ------------------------------- */
177
210
  /*------------------------------------------------------------------------*/
178
211
 
179
212
  type Props = {
@@ -234,12 +267,12 @@ type Props = {
234
267
  };
235
268
 
236
269
  /*------------------------------------------------------------------------*/
237
- /* Component */
270
+ /* ------------------------------ Component ----------------------------- */
238
271
  /*------------------------------------------------------------------------*/
239
272
 
240
273
  const Modal: React.FC<Props> = (props) => {
241
274
  /*------------------------------------------------------------------------*/
242
- /* Setup */
275
+ /* -------------------------------- Setup ------------------------------- */
243
276
  /*------------------------------------------------------------------------*/
244
277
 
245
278
  /* -------------- Props ------------- */
@@ -256,9 +289,6 @@ const Modal: React.FC<Props> = (props) => {
256
289
 
257
290
  /* -------------- State ------------- */
258
291
 
259
- // If true, the modal is shown
260
- const [visible, setVisible] = useState(false);
261
-
262
292
  // True if animation is in use
263
293
  const [animatingIn, setAnimatingIn] = useState(true);
264
294
  const [animatingPop, setAnimatingPop] = useState(false);
@@ -267,7 +297,7 @@ const Modal: React.FC<Props> = (props) => {
267
297
  const mounted = useRef(false);
268
298
 
269
299
  /*------------------------------------------------------------------------*/
270
- /* Lifecycle Functions */
300
+ /* ------------------------- Lifecycle Functions ------------------------ */
271
301
  /*------------------------------------------------------------------------*/
272
302
 
273
303
  /**
@@ -278,14 +308,12 @@ const Modal: React.FC<Props> = (props) => {
278
308
  () => {
279
309
  (async () => {
280
310
  // Set defaults
281
- setVisible(false);
282
311
  setAnimatingIn(true);
283
312
  setAnimatingPop(false);
284
313
  // Wait for animation
285
314
  await waitMs(MS_TO_ANIMATE);
286
315
  // Update to state after animated in
287
316
  if (mounted.current) {
288
- setVisible(true);
289
317
  setAnimatingIn(false);
290
318
  }
291
319
  })();
@@ -298,49 +326,48 @@ const Modal: React.FC<Props> = (props) => {
298
326
  );
299
327
 
300
328
  /*------------------------------------------------------------------------*/
301
- /* Component Functions */
329
+ /* ------------------------- Component Functions ------------------------ */
302
330
  /*------------------------------------------------------------------------*/
303
331
 
304
332
  /**
305
333
  * Handles the closing of the modal
306
334
  * @author Gabe Abrams
307
- * @param ModalButtonType the button that was clicked when closing the
335
+ * @param modalButtonType the button that was clicked when closing the
308
336
  * modal
309
337
  */
310
- const handleClose = async (ModalButtonType: ModalButtonType) => {
338
+ const handleClose = async (modalButtonType: ModalButtonType) => {
311
339
  // Don't close if no handler
312
340
  if (!onClose) {
313
341
  return;
314
342
  }
315
343
 
316
- onClose(ModalButtonType);
344
+ onClose(modalButtonType);
317
345
  };
318
346
 
319
347
  /*------------------------------------------------------------------------*/
320
- /* Render */
348
+ /* ------------------------------- Render ------------------------------- */
321
349
  /*------------------------------------------------------------------------*/
322
350
 
323
- /*----------------------------------------*/
324
- /* Footer */
325
- /*----------------------------------------*/
326
-
327
351
  // Get list of buttons for this modal type
328
352
  const ModalButtonTypes: ModalButtonType[] = modalTypeToModalButtonTypes[type] ?? [];
329
353
 
354
+ // Get map of button type to label and variant
355
+ const ModalButtonTypeToLabelAndVariant = getModalButtonTypeToLabelAndVariant();
356
+
330
357
  // Create buttons
331
- const buttons = ModalButtonTypes.map((ModalButtonType: ModalButtonType, i) => {
358
+ const buttons = ModalButtonTypes.map((modalButtonType: ModalButtonType, i) => {
332
359
  // Get default style
333
360
  let {
334
361
  label,
335
362
  variant,
336
- } = ModalButtonTypeToLabelAndVariant[ModalButtonType];
363
+ } = ModalButtonTypeToLabelAndVariant[modalButtonType];
337
364
 
338
365
  // Override with customizations
339
- const newLabel = props[`${ModalButtonType}Label`];
366
+ const newLabel = props[`${modalButtonType}Label`];
340
367
  if (newLabel) {
341
368
  label = newLabel;
342
369
  }
343
- const newVariant = props[`${ModalButtonType}Variant`];
370
+ const newVariant = props[`${modalButtonType}Variant`];
344
371
  if (newVariant) {
345
372
  variant = newVariant;
346
373
  }
@@ -351,11 +378,11 @@ const Modal: React.FC<Props> = (props) => {
351
378
  // Create the button
352
379
  return (
353
380
  <button
354
- key={ModalButtonType}
381
+ key={modalButtonType}
355
382
  type="button"
356
- className={`Modal-${ModalButtonType}-button btn btn-${variant} ${last ? '' : 'me-1'}`}
383
+ className={`Modal-${modalButtonType}-button btn btn-${variant} ${last ? '' : 'me-1'}`}
357
384
  onClick={() => {
358
- handleClose(ModalButtonType);
385
+ handleClose(modalButtonType);
359
386
  }}
360
387
  >
361
388
  {label}
@@ -387,7 +414,7 @@ const Modal: React.FC<Props> = (props) => {
387
414
  // Render the modal
388
415
  return (
389
416
  <div
390
- className={`modal show modal-dialog-scrollable modal-dialog-centered`}
417
+ className="modal show modal-dialog-scrollable modal-dialog-centered"
391
418
  tabIndex={-1}
392
419
  style={{
393
420
  zIndex: (
@@ -430,8 +457,36 @@ const Modal: React.FC<Props> = (props) => {
430
457
  zIndex: 5000000002,
431
458
  }}
432
459
  >
433
- <div className="modal-content">
434
- <div className="modal-header">
460
+ <div
461
+ className="modal-content"
462
+ style={{
463
+ borderColor: (
464
+ isDarkModeOn()
465
+ ? 'gray'
466
+ : undefined
467
+ ),
468
+ }}
469
+ >
470
+ <div
471
+ className="modal-header"
472
+ style={{
473
+ color: (
474
+ isDarkModeOn()
475
+ ? 'white'
476
+ : undefined
477
+ ),
478
+ backgroundColor: (
479
+ isDarkModeOn()
480
+ ? '#444'
481
+ : undefined
482
+ ),
483
+ borderBottom: (
484
+ isDarkModeOn()
485
+ ? '0.1rem solid gray'
486
+ : undefined
487
+ ),
488
+ }}
489
+ >
435
490
  <h5
436
491
  className="modal-title"
437
492
  style={{
@@ -454,12 +509,45 @@ const Modal: React.FC<Props> = (props) => {
454
509
  )}
455
510
  </div>
456
511
  {children && (
457
- <div className="modal-body">
512
+ <div
513
+ className="modal-body"
514
+ style={{
515
+ color: (
516
+ isDarkModeOn()
517
+ ? 'white'
518
+ : undefined
519
+ ),
520
+ backgroundColor: (
521
+ isDarkModeOn()
522
+ ? '#444'
523
+ : undefined
524
+ ),
525
+ }}
526
+ >
458
527
  {children}
459
528
  </div>
460
529
  )}
461
530
  {footer && (
462
- <div className="modal-footer pt-1 pb-1">
531
+ <div
532
+ className="modal-footer pt-1 pb-1"
533
+ style={{
534
+ color: (
535
+ isDarkModeOn()
536
+ ? 'white'
537
+ : undefined
538
+ ),
539
+ backgroundColor: (
540
+ isDarkModeOn()
541
+ ? '#444'
542
+ : undefined
543
+ ),
544
+ borderTop: (
545
+ isDarkModeOn()
546
+ ? '0.1rem solid gray'
547
+ : undefined
548
+ ),
549
+ }}
550
+ >
463
551
  {footer}
464
552
  </div>
465
553
  )}
@@ -470,7 +558,7 @@ const Modal: React.FC<Props> = (props) => {
470
558
  };
471
559
 
472
560
  /*------------------------------------------------------------------------*/
473
- /* Wrap Up */
561
+ /* ------------------------------- Wrap Up ------------------------------ */
474
562
  /*------------------------------------------------------------------------*/
475
563
 
476
564
  export default Modal;
@@ -7,7 +7,7 @@
7
7
  import React from 'react';
8
8
 
9
9
  /*------------------------------------------------------------------------*/
10
- /* Types */
10
+ /* -------------------------------- Types ------------------------------- */
11
11
  /*------------------------------------------------------------------------*/
12
12
 
13
13
  // Props definition
@@ -21,7 +21,7 @@ type Props = {
21
21
  };
22
22
 
23
23
  /*------------------------------------------------------------------------*/
24
- /* Style */
24
+ /* -------------------------------- Style ------------------------------- */
25
25
  /*------------------------------------------------------------------------*/
26
26
 
27
27
  const style = `
@@ -110,12 +110,12 @@ const style = `
110
110
  `;
111
111
 
112
112
  /*------------------------------------------------------------------------*/
113
- /* Component */
113
+ /* ------------------------------ Component ----------------------------- */
114
114
  /*------------------------------------------------------------------------*/
115
115
 
116
116
  const PopFailureMark: React.FC<Props> = (props) => {
117
117
  /*------------------------------------------------------------------------*/
118
- /* Setup */
118
+ /* -------------------------------- Setup ------------------------------- */
119
119
  /*------------------------------------------------------------------------*/
120
120
 
121
121
  /* -------------- Props ------------- */
@@ -128,11 +128,11 @@ const PopFailureMark: React.FC<Props> = (props) => {
128
128
  } = props;
129
129
 
130
130
  /*------------------------------------------------------------------------*/
131
- /* Render */
131
+ /* ------------------------------- Render ------------------------------- */
132
132
  /*------------------------------------------------------------------------*/
133
133
 
134
134
  /*----------------------------------------*/
135
- /* Main UI */
135
+ /* --------------- Main UI -------------- */
136
136
  /*----------------------------------------*/
137
137
 
138
138
  return (
@@ -164,7 +164,7 @@ const PopFailureMark: React.FC<Props> = (props) => {
164
164
  };
165
165
 
166
166
  /*------------------------------------------------------------------------*/
167
- /* Wrap Up */
167
+ /* ------------------------------- Wrap Up ------------------------------ */
168
168
  /*------------------------------------------------------------------------*/
169
169
 
170
170
  // Export component
@@ -11,7 +11,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
11
11
  import { faHourglass } from '@fortawesome/free-solid-svg-icons';
12
12
 
13
13
  /*------------------------------------------------------------------------*/
14
- /* Types */
14
+ /* -------------------------------- Types ------------------------------- */
15
15
  /*------------------------------------------------------------------------*/
16
16
 
17
17
  // Props definition
@@ -25,7 +25,7 @@ type Props = {
25
25
  };
26
26
 
27
27
  /*------------------------------------------------------------------------*/
28
- /* Style */
28
+ /* -------------------------------- Style ------------------------------- */
29
29
  /*------------------------------------------------------------------------*/
30
30
 
31
31
  const style = `
@@ -83,12 +83,12 @@ const style = `
83
83
  `;
84
84
 
85
85
  /*------------------------------------------------------------------------*/
86
- /* Component */
86
+ /* ------------------------------ Component ----------------------------- */
87
87
  /*------------------------------------------------------------------------*/
88
88
 
89
89
  const PopPendingMark: React.FC<Props> = (props) => {
90
90
  /*------------------------------------------------------------------------*/
91
- /* Setup */
91
+ /* -------------------------------- Setup ------------------------------- */
92
92
  /*------------------------------------------------------------------------*/
93
93
 
94
94
  /* -------------- Props ------------- */
@@ -101,11 +101,11 @@ const PopPendingMark: React.FC<Props> = (props) => {
101
101
  } = props;
102
102
 
103
103
  /*------------------------------------------------------------------------*/
104
- /* Render */
104
+ /* ------------------------------- Render ------------------------------- */
105
105
  /*------------------------------------------------------------------------*/
106
106
 
107
107
  /*----------------------------------------*/
108
- /* Main UI */
108
+ /* --------------- Main UI -------------- */
109
109
  /*----------------------------------------*/
110
110
 
111
111
  return (
@@ -134,7 +134,7 @@ const PopPendingMark: React.FC<Props> = (props) => {
134
134
  };
135
135
 
136
136
  /*------------------------------------------------------------------------*/
137
- /* Wrap Up */
137
+ /* ------------------------------- Wrap Up ------------------------------ */
138
138
  /*------------------------------------------------------------------------*/
139
139
 
140
140
  // Export component