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.
- package/dist/cjs/index.js +28 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/stylesheets/shared.css.d.ts +6 -0
- package/dist/esm/index.js +28 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/stylesheets/shared.css.d.ts +6 -0
- package/package.json +1 -1
- package/src/components/AppWrapper.tsx +7 -0
- package/src/helpers/genRouteHandler.ts +7 -1
- package/src/stylesheets/shared.css.ts +18 -0
|
@@ -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/dist/esm/index.js
CHANGED
|
@@ -846,6 +846,23 @@ const logClientEvent = (opts) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
846
846
|
});
|
|
847
847
|
});
|
|
848
848
|
|
|
849
|
+
/**
|
|
850
|
+
* Universal stylesheet
|
|
851
|
+
* @author Gabe Abrams
|
|
852
|
+
*/
|
|
853
|
+
const shared = `
|
|
854
|
+
/* Button with no style */
|
|
855
|
+
.btn-nostyle {
|
|
856
|
+
border: 0 !important;
|
|
857
|
+
background: transparent !important;
|
|
858
|
+
outline: 0 !important;
|
|
859
|
+
font-size: inherit !important;
|
|
860
|
+
color: inherit !important;
|
|
861
|
+
padding: 0 !important;
|
|
862
|
+
margin: 0 !important;
|
|
863
|
+
}
|
|
864
|
+
`;
|
|
865
|
+
|
|
849
866
|
/**
|
|
850
867
|
* A wrapper for the entire React app that adds global functionality like
|
|
851
868
|
* handling for fatal error messages, adds bootstrap support
|
|
@@ -1111,6 +1128,8 @@ const style$9 = `
|
|
|
1111
1128
|
opacity: 1;
|
|
1112
1129
|
}
|
|
1113
1130
|
}
|
|
1131
|
+
|
|
1132
|
+
${shared}
|
|
1114
1133
|
`;
|
|
1115
1134
|
/*------------------------------------------------------------------------*/
|
|
1116
1135
|
/* ------------------------------ Component ----------------------------- */
|
|
@@ -14726,10 +14745,16 @@ const genRouteHandler = (opts) => {
|
|
|
14726
14745
|
* @param [renderOpts.status=500] http status code
|
|
14727
14746
|
*/
|
|
14728
14747
|
const renderErrorPage = (renderOpts = {}) => {
|
|
14729
|
-
var _a, _b;
|
|
14748
|
+
var _a, _b, _c;
|
|
14730
14749
|
const html = genErrorPage(renderOpts);
|
|
14731
14750
|
send(html, (_a = renderOpts.status) !== null && _a !== void 0 ? _a : 500);
|
|
14732
|
-
// Log
|
|
14751
|
+
// Log server-side error if not a session expired error or 404
|
|
14752
|
+
if (renderOpts.status && renderOpts.status === 404) {
|
|
14753
|
+
return;
|
|
14754
|
+
}
|
|
14755
|
+
if ((_b = renderOpts.title) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes('session expired')) {
|
|
14756
|
+
return;
|
|
14757
|
+
}
|
|
14733
14758
|
logServerEvent({
|
|
14734
14759
|
context: LogBuiltInMetadata.Context.ServerRenderedErrorPage,
|
|
14735
14760
|
error: {
|
|
@@ -14741,7 +14766,7 @@ const genRouteHandler = (opts) => {
|
|
|
14741
14766
|
description: renderOpts.description,
|
|
14742
14767
|
code: renderOpts.code,
|
|
14743
14768
|
pageTitle: renderOpts.pageTitle,
|
|
14744
|
-
status: (
|
|
14769
|
+
status: (_c = renderOpts.status) !== null && _c !== void 0 ? _c : 500,
|
|
14745
14770
|
},
|
|
14746
14771
|
});
|
|
14747
14772
|
};
|