dce-reactkit 3.7.17 → 3.7.18

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.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Universal stylesheet
3
+ * @author Gabe Abrams
4
+ */
5
+ declare const shared = "\n/* Button with no style */\n.btn-nostyle {\n border: 0 !important;\n background: transparent !important;\n outline: 0 !important;\n font-size: inherit !important;\n color: inherit !important;\n padding: 0 !important;\n margin: 0 !important;\n}\n";
6
+ export default shared;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dce-reactkit",
3
- "version": "3.7.17",
3
+ "version": "3.7.18",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -37,8 +37,13 @@ import {
37
37
  isDarkModeOn,
38
38
  } from '../client/initClient';
39
39
  import waitMs from '../helpers/waitMs';
40
+
41
+ // Import constants
40
42
  import NUM_MODAL_PORTALS from '../constants/NUM_MODAL_PORTALS';
41
43
 
44
+ // Import style
45
+ import sharedStyle from '../stylesheets/shared.css';
46
+
42
47
  /*------------------------------------------------------------------------*/
43
48
  /* -------------------------------- Props ------------------------------- */
44
49
  /*------------------------------------------------------------------------*/
@@ -383,6 +388,8 @@ const style = `
383
388
  opacity: 1;
384
389
  }
385
390
  }
391
+
392
+ ${sharedStyle}
386
393
  `;
387
394
 
388
395
  /*------------------------------------------------------------------------*/
@@ -738,7 +738,13 @@ const genRouteHandler = (
738
738
  const html = genErrorPage(renderOpts);
739
739
  send(html, renderOpts.status ?? 500);
740
740
 
741
- // Log
741
+ // Log server-side error if not a session expired error or 404
742
+ if (renderOpts.status && renderOpts.status === 404) {
743
+ return;
744
+ }
745
+ if (renderOpts.title?.toLowerCase().includes('session expired')) {
746
+ return;
747
+ }
742
748
  logServerEvent({
743
749
  context: LogBuiltInMetadata.Context.ServerRenderedErrorPage,
744
750
  error: {
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Universal stylesheet
3
+ * @author Gabe Abrams
4
+ */
5
+ const shared = `
6
+ /* Button with no style */
7
+ .btn-nostyle {
8
+ border: 0 !important;
9
+ background: transparent !important;
10
+ outline: 0 !important;
11
+ font-size: inherit !important;
12
+ color: inherit !important;
13
+ padding: 0 !important;
14
+ margin: 0 !important;
15
+ }
16
+ `;
17
+
18
+ export default shared;