@bigbinary/neeto-commons-frontend 3.4.5 → 3.4.7
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/cjs/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js +2 -2
- package/cjs/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js.map +1 -1
- package/cjs/react-utils/HoneybadgerErrorBoundary/constants.js +3 -1
- package/cjs/react-utils/HoneybadgerErrorBoundary/constants.js.map +1 -1
- package/cjs/utils/datetime.js +15 -11
- package/cjs/utils/datetime.js.map +1 -1
- package/package.json +1 -1
- package/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js +3 -3
- package/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js.map +1 -1
- package/react-utils/HoneybadgerErrorBoundary/constants.js +3 -1
- package/react-utils/HoneybadgerErrorBoundary/constants.js.map +1 -1
- package/utils/datetime.js +14 -11
- package/utils/datetime.js.map +1 -1
|
@@ -22,7 +22,7 @@ var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
|
|
|
22
22
|
_react2.Honeybadger.beforeNotify(function (notice) {
|
|
23
23
|
var _globalProps$user;
|
|
24
24
|
if (!notice) return false;
|
|
25
|
-
var isIgnorable = _constants.IGNORABLE_ERRORS_REGEX.test(notice.message) || notice.stack.includes("chrome-extension://") || (filterErrors === null || filterErrors === void 0 ? void 0 : filterErrors(notice)) === false;
|
|
25
|
+
var isIgnorable = _constants.IGNORABLE_ERRORS_REGEX.test(notice.message) || _constants.IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) || notice.stack.includes("chrome-extension://") || (filterErrors === null || filterErrors === void 0 ? void 0 : filterErrors(notice)) === false;
|
|
26
26
|
if (isIgnorable) return false;
|
|
27
27
|
var context = {};
|
|
28
28
|
var user = (_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.email;
|
|
@@ -49,7 +49,7 @@ var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
|
|
|
49
49
|
__self: _this,
|
|
50
50
|
__source: {
|
|
51
51
|
fileName: _jsxFileName,
|
|
52
|
-
lineNumber:
|
|
52
|
+
lineNumber: 58,
|
|
53
53
|
columnNumber: 5
|
|
54
54
|
}
|
|
55
55
|
}, children);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HoneybadgerErrorBoundary.js","names":["_react","_interopRequireDefault","require","_react2","_constants","_FallbackComponent","_utils","_jsxFileName","_this","HoneybadgerErrorBoundary","_ref","children","_ref$ErrorComponent","ErrorComponent","FallbackComponent","_ref$filterErrors","filterErrors","undefined","Honeybadger","beforeNotify","notice","_globalProps$user","isIgnorable","IGNORABLE_ERRORS_REGEX","test","message","stack","includes","context","user","globalProps","email","sessionReplay","getSessionReplayUrl","attachContext","honeybadger","configure","apiKey","honeybadgerApiKey","environment","railsEnv","revision","honeybadgerRevision","developmentEnvironments","enableUncaught","async","breadcrumbsEnabled","projectRoot","enableUnhandledRejection","createElement","__self","__source","fileName","lineNumber","columnNumber","_default","exports"],"sources":["../../../../src/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.jsx"],"sourcesContent":["import React from \"react\";\n\nimport {\n Honeybadger,\n HoneybadgerErrorBoundary as ErrorBoundary,\n} from \"@honeybadger-io/react\";\n\nimport {
|
|
1
|
+
{"version":3,"file":"HoneybadgerErrorBoundary.js","names":["_react","_interopRequireDefault","require","_react2","_constants","_FallbackComponent","_utils","_jsxFileName","_this","HoneybadgerErrorBoundary","_ref","children","_ref$ErrorComponent","ErrorComponent","FallbackComponent","_ref$filterErrors","filterErrors","undefined","Honeybadger","beforeNotify","notice","_globalProps$user","isIgnorable","IGNORABLE_ERRORS_REGEX","test","message","IGNORABLE_ERROR_NAMES_REGEX","name","stack","includes","context","user","globalProps","email","sessionReplay","getSessionReplayUrl","attachContext","honeybadger","configure","apiKey","honeybadgerApiKey","environment","railsEnv","revision","honeybadgerRevision","developmentEnvironments","enableUncaught","async","breadcrumbsEnabled","projectRoot","enableUnhandledRejection","createElement","__self","__source","fileName","lineNumber","columnNumber","_default","exports"],"sources":["../../../../src/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.jsx"],"sourcesContent":["import React from \"react\";\n\nimport {\n Honeybadger,\n HoneybadgerErrorBoundary as ErrorBoundary,\n} from \"@honeybadger-io/react\";\n\nimport {\n IGNORABLE_ERROR_NAMES_REGEX,\n IGNORABLE_ERRORS_REGEX,\n} from \"./constants\";\nimport FallbackComponent from \"./FallbackComponent\";\nimport { attachContext, getSessionReplayUrl } from \"./utils\";\n\n/** @type {import(\"neetocommons/react-utils\").HoneybadgerErrorBoundary} */\nconst HoneybadgerErrorBoundary = ({\n children,\n ErrorComponent = FallbackComponent,\n filterErrors = undefined,\n}) => {\n Honeybadger.beforeNotify(notice => {\n if (!notice) return false;\n\n const isIgnorable =\n IGNORABLE_ERRORS_REGEX.test(notice.message) ||\n IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) ||\n notice.stack.includes(\"chrome-extension://\") ||\n filterErrors?.(notice) === false;\n\n if (isIgnorable) return false;\n\n const context = {};\n\n const user = globalProps.user?.email;\n if (user) context.user = user;\n\n const sessionReplay = getSessionReplayUrl();\n if (sessionReplay) context.sessionReplay = sessionReplay;\n\n attachContext(notice, context);\n\n return true;\n });\n\n const honeybadger = Honeybadger.configure({\n apiKey: globalProps.honeybadgerApiKey,\n environment: globalProps.railsEnv,\n revision: globalProps.honeybadgerRevision,\n developmentEnvironments: [\"development\", \"test\"],\n enableUncaught: true,\n async: true,\n breadcrumbsEnabled: true,\n projectRoot: \"webpack:///./\",\n enableUnhandledRejection: false,\n });\n\n return (\n <ErrorBoundary {...{ ErrorComponent, honeybadger }}>\n {children}\n </ErrorBoundary>\n );\n};\n\nexport default HoneybadgerErrorBoundary;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,O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Aa;IAExD,IAAAE,oBAAa,EAAChB,MAAM,EAAEU,OAAO,CAAC;IAE9B,OAAO,IAAI;EACb,CAAC,CAAC;EAEF,IAAMO,WAAW,GAAGnB,mBAAW,CAACoB,SAAS,CAAC;IACxCC,MAAM,EAAEP,WAAW,CAACQ,iBAAiB;IACrCC,WAAW,EAAET,WAAW,CAACU,QAAQ;IACjCC,QAAQ,EAAEX,WAAW,CAACY,mBAAmB;IACzCC,uBAAuB,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC;IAChDC,cAAc,EAAE,IAAI;IACpBC,KAAK,EAAE,IAAI;IACXC,kBAAkB,EAAE,IAAI;IACxBC,WAAW,EAAE,eAAe;IAC5BC,wBAAwB,EAAE;EAC5B,CAAC,CAAC;EAEF,oBACElD,MAAA,YAAAmD,aAAA,CAAChD,OAAA,CAAAM,wBAAa;IAAOI,cAAc,EAAdA,cAAc;IAAEwB,WAAW,EAAXA,WAAW;IAAAe,MAAA,EAAA5C,KAAA;IAAA6C,QAAA;MAAAC,QAAA,EAAA/C,YAAA;MAAAgD,UAAA;MAAAC,YAAA;IAAA;EAAA,GAC7C7C,QAAQ,CACK;AAEpB,CAAC;AAAC,IAAA8C,QAAA,GAEahD,wBAAwB;AAAAiD,OAAA,cAAAD,QAAA"}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.IGNORABLE_ERRORS_REGEX = void 0;
|
|
6
|
+
exports.IGNORABLE_ERROR_NAMES_REGEX = exports.IGNORABLE_ERRORS_REGEX = void 0;
|
|
7
7
|
var IGNORABLE_ERRORS_REGEX = /(window\.requestAnimationFrame|ResizeObserver|ChunkLoadError|window\.webkit\.messageHandlers|Request aborted|Network Error)/;
|
|
8
8
|
exports.IGNORABLE_ERRORS_REGEX = IGNORABLE_ERRORS_REGEX;
|
|
9
|
+
var IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;
|
|
10
|
+
exports.IGNORABLE_ERROR_NAMES_REGEX = IGNORABLE_ERROR_NAMES_REGEX;
|
|
9
11
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","names":["IGNORABLE_ERRORS_REGEX","exports"],"sources":["../../../../src/react-utils/HoneybadgerErrorBoundary/constants.js"],"sourcesContent":["export const IGNORABLE_ERRORS_REGEX =\n /(window\\.requestAnimationFrame|ResizeObserver|ChunkLoadError|window\\.webkit\\.messageHandlers|Request aborted|Network Error)/;\n"],"mappings":";;;;;;AAAO,IAAMA,sBAAsB,GACjC,6HAA6H;AAACC,OAAA,CAAAD,sBAAA,GAAAA,sBAAA"}
|
|
1
|
+
{"version":3,"file":"constants.js","names":["IGNORABLE_ERRORS_REGEX","exports","IGNORABLE_ERROR_NAMES_REGEX"],"sources":["../../../../src/react-utils/HoneybadgerErrorBoundary/constants.js"],"sourcesContent":["export const IGNORABLE_ERRORS_REGEX =\n /(window\\.requestAnimationFrame|ResizeObserver|ChunkLoadError|window\\.webkit\\.messageHandlers|Request aborted|Network Error)/;\nexport const IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;\n"],"mappings":";;;;;;AAAO,IAAMA,sBAAsB,GACjC,6HAA6H;AAACC,OAAA,CAAAD,sBAAA,GAAAA,sBAAA;AACzH,IAAME,2BAA2B,GAAG,kBAAkB;AAACD,OAAA,CAAAC,2BAAA,GAAAA,2BAAA"}
|
package/cjs/utils/datetime.js
CHANGED
|
@@ -6,10 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.timeFormat = exports.dateFormat = void 0;
|
|
8
8
|
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
9
|
+
var _localizedFormat = _interopRequireDefault(require("dayjs/plugin/localizedFormat"));
|
|
9
10
|
var _relativeTime = _interopRequireDefault(require("dayjs/plugin/relativeTime"));
|
|
10
11
|
var _updateLocale = _interopRequireDefault(require("dayjs/plugin/updateLocale"));
|
|
12
|
+
/* eslint-disable @bigbinary/neeto/use-standard-date-time-formats */
|
|
13
|
+
|
|
11
14
|
_dayjs["default"].extend(_relativeTime["default"]);
|
|
12
15
|
_dayjs["default"].extend(_updateLocale["default"]);
|
|
16
|
+
_dayjs["default"].extend(_localizedFormat["default"]);
|
|
13
17
|
var getDefaultFormat = function getDefaultFormat() {
|
|
14
18
|
var _globalProps$user$dat, _globalProps, _globalProps$user;
|
|
15
19
|
return (_globalProps$user$dat = (_globalProps = globalProps) === null || _globalProps === void 0 ? void 0 : (_globalProps$user = _globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.dateFormat) !== null && _globalProps$user$dat !== void 0 ? _globalProps$user$dat : "DD/MM/YYYY";
|
|
@@ -19,19 +23,19 @@ var timeFormat = {
|
|
|
19
23
|
return (0, _dayjs["default"])(time).fromNow();
|
|
20
24
|
},
|
|
21
25
|
time: function time(_time) {
|
|
22
|
-
return (0, _dayjs["default"])(_time).format("
|
|
26
|
+
return (0, _dayjs["default"])(_time).format("LT");
|
|
23
27
|
},
|
|
24
28
|
timeWithSeconds: function timeWithSeconds(time) {
|
|
25
|
-
return (0, _dayjs["default"])(time).format("
|
|
29
|
+
return (0, _dayjs["default"])(time).format("LTS");
|
|
26
30
|
},
|
|
27
31
|
date: function date(time) {
|
|
28
|
-
return (0, _dayjs["default"])(time).format("
|
|
32
|
+
return (0, _dayjs["default"])(time).format("ll");
|
|
29
33
|
},
|
|
30
34
|
dateWeek: function dateWeek(time) {
|
|
31
|
-
return (0, _dayjs["default"])(time).format("
|
|
35
|
+
return (0, _dayjs["default"])(time).format("ll ddd");
|
|
32
36
|
},
|
|
33
37
|
dateWeekDayExtended: function dateWeekDayExtended(time) {
|
|
34
|
-
return (0, _dayjs["default"])(time).format("
|
|
38
|
+
return (0, _dayjs["default"])(time).format("ll dddd");
|
|
35
39
|
},
|
|
36
40
|
dateWeekWithoutYear: function dateWeekWithoutYear(time) {
|
|
37
41
|
return (0, _dayjs["default"])(time).format("MMM D, ddd");
|
|
@@ -40,19 +44,19 @@ var timeFormat = {
|
|
|
40
44
|
return (0, _dayjs["default"])(time).format("MMM D, dddd");
|
|
41
45
|
},
|
|
42
46
|
dateTime: function dateTime(time) {
|
|
43
|
-
return (0, _dayjs["default"])(time).format("
|
|
47
|
+
return (0, _dayjs["default"])(time).format("ll LT");
|
|
44
48
|
},
|
|
45
49
|
dateTimeWithSeconds: function dateTimeWithSeconds(time) {
|
|
46
|
-
return (0, _dayjs["default"])(time).format("
|
|
50
|
+
return (0, _dayjs["default"])(time).format("ll LTS");
|
|
47
51
|
},
|
|
48
52
|
dateWeekTime: function dateWeekTime(time) {
|
|
49
|
-
return (0, _dayjs["default"])(time).format("
|
|
53
|
+
return (0, _dayjs["default"])(time).format("ll ddd LT");
|
|
50
54
|
},
|
|
51
55
|
dateWeekTimeDayExtended: function dateWeekTimeDayExtended(time) {
|
|
52
|
-
return (0, _dayjs["default"])(time).format("
|
|
56
|
+
return (0, _dayjs["default"])(time).format("ll dddd LT");
|
|
53
57
|
},
|
|
54
58
|
extended: function extended(time) {
|
|
55
|
-
var dateTime = (0, _dayjs["default"])(time).format("dddd
|
|
59
|
+
var dateTime = (0, _dayjs["default"])(time).format("dddd LL LT");
|
|
56
60
|
var fromNow = (0, _dayjs["default"])(time).fromNow();
|
|
57
61
|
return "".concat(dateTime, " (").concat(fromNow, ")");
|
|
58
62
|
},
|
|
@@ -60,7 +64,7 @@ var timeFormat = {
|
|
|
60
64
|
return (0, _dayjs["default"])(time).format(getDefaultFormat());
|
|
61
65
|
},
|
|
62
66
|
defaultWithTime: function defaultWithTime(time) {
|
|
63
|
-
return (0, _dayjs["default"])(time).format("".concat(getDefaultFormat(), "
|
|
67
|
+
return (0, _dayjs["default"])(time).format("".concat(getDefaultFormat(), " LTS"));
|
|
64
68
|
}
|
|
65
69
|
};
|
|
66
70
|
exports.timeFormat = timeFormat;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetime.js","names":["_dayjs","_interopRequireDefault","require","_relativeTime","_updateLocale","dayjs","extend","relativeTime","updateLocale","getDefaultFormat","_globalProps$user$dat","_globalProps","_globalProps$user","globalProps","user","dateFormat","timeFormat","fromNow","time","format","timeWithSeconds","date","dateWeek","dateWeekDayExtended","dateWeekWithoutYear","dateWeekWithoutYearDayExtended","dateTime","dateTimeWithSeconds","dateWeekTime","dateWeekTimeDayExtended","extended","concat","_default","defaultWithTime","exports"],"sources":["../../../src/utils/datetime.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"datetime.js","names":["_dayjs","_interopRequireDefault","require","_localizedFormat","_relativeTime","_updateLocale","dayjs","extend","relativeTime","updateLocale","localizedFormat","getDefaultFormat","_globalProps$user$dat","_globalProps","_globalProps$user","globalProps","user","dateFormat","timeFormat","fromNow","time","format","timeWithSeconds","date","dateWeek","dateWeekDayExtended","dateWeekWithoutYear","dateWeekWithoutYearDayExtended","dateTime","dateTimeWithSeconds","dateWeekTime","dateWeekTimeDayExtended","extended","concat","_default","defaultWithTime","exports"],"sources":["../../../src/utils/datetime.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/use-standard-date-time-formats */\nimport dayjs from \"dayjs\";\nimport localizedFormat from \"dayjs/plugin/localizedFormat\";\nimport relativeTime from \"dayjs/plugin/relativeTime\";\nimport updateLocale from \"dayjs/plugin/updateLocale\";\n\ndayjs.extend(relativeTime);\ndayjs.extend(updateLocale);\ndayjs.extend(localizedFormat);\n\nconst getDefaultFormat = () => globalProps?.user?.dateFormat ?? \"DD/MM/YYYY\";\n\nexport const timeFormat = {\n fromNow: time => dayjs(time).fromNow(),\n time: time => dayjs(time).format(\"LT\"),\n timeWithSeconds: time => dayjs(time).format(\"LTS\"),\n date: time => dayjs(time).format(\"ll\"),\n dateWeek: time => dayjs(time).format(\"ll ddd\"),\n dateWeekDayExtended: time => dayjs(time).format(\"ll dddd\"),\n dateWeekWithoutYear: time => dayjs(time).format(\"MMM D, ddd\"),\n dateWeekWithoutYearDayExtended: time => dayjs(time).format(\"MMM D, dddd\"),\n dateTime: time => dayjs(time).format(\"ll LT\"),\n dateTimeWithSeconds: time => dayjs(time).format(\"ll LTS\"),\n dateWeekTime: time => dayjs(time).format(\"ll ddd LT\"),\n dateWeekTimeDayExtended: time => dayjs(time).format(\"ll dddd LT\"),\n extended: time => {\n const dateTime = dayjs(time).format(\"dddd LL LT\");\n const fromNow = dayjs(time).fromNow();\n\n return `${dateTime} (${fromNow})`;\n },\n default: time => dayjs(time).format(getDefaultFormat()),\n defaultWithTime: time => dayjs(time).format(`${getDefaultFormat()} LTS`),\n};\n\nexport const dateFormat = timeFormat;\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,aAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAJA;;AAMAI,iBAAK,CAACC,MAAM,CAACC,wBAAY,CAAC;AAC1BF,iBAAK,CAACC,MAAM,CAACE,wBAAY,CAAC;AAC1BH,iBAAK,CAACC,MAAM,CAACG,2BAAe,CAAC;AAE7B,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAA;EAAA,IAAAC,qBAAA,EAAAC,YAAA,EAAAC,iBAAA;EAAA,QAAAF,qBAAA,IAAAC,YAAA,GAASE,WAAW,cAAAF,YAAA,wBAAAC,iBAAA,GAAXD,YAAA,CAAaG,IAAI,cAAAF,iBAAA,uBAAjBA,iBAAA,CAAmBG,UAAU,cAAAL,qBAAA,cAAAA,qBAAA,GAAI,YAAY;AAAA;AAErE,IAAMM,UAAU,GAAG;EACxBC,OAAO,EAAE,SAAAA,QAAAC,IAAI;IAAA,OAAI,IAAAd,iBAAK,EAACc,IAAI,CAAC,CAACD,OAAO,EAAE;EAAA;EACtCC,IAAI,EAAE,S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wBAAAX,IAAI;IAAA,OAAI,IAAAd,iBAAK,EAACc,IAAI,CAAC,CAACC,MAAM,CAAC,YAAY,CAAC;EAAA;EACjEW,QAAQ,EAAE,SAAAA,SAAAZ,IAAI,EAAI;IAChB,IAAMQ,QAAQ,GAAG,IAAAtB,iBAAK,EAACc,IAAI,CAAC,CAACC,MAAM,CAAC,YAAY,CAAC;IACjD,IAAMF,OAAO,GAAG,IAAAb,iBAAK,EAACc,IAAI,CAAC,CAACD,OAAO,EAAE;IAErC,UAAAc,MAAA,CAAUL,QAAQ,QAAAK,MAAA,CAAKd,OAAO;EAChC,CAAC;EACD,WAAS,SAAAe,SAAAd,IAAI;IAAA,OAAI,IAAAd,iBAAK,EAACc,IAAI,CAAC,CAACC,MAAM,CAACV,gBAAgB,EAAE,CAAC;EAAA;EACvDwB,eAAe,EAAE,SAAAA,gBAAAf,IAAI;IAAA,OAAI,IAAAd,iBAAK,EAACc,IAAI,CAAC,CAACC,MAAM,IAAAY,MAAA,CAAItB,gBAAgB,EAAE,UAAO;EAAA;AAC1E,CAAC;AAACyB,OAAA,CAAAlB,UAAA,GAAAA,UAAA;AAEK,IAAMD,UAAU,GAAGC,UAAU;AAACkB,OAAA,CAAAnB,UAAA,GAAAA,UAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.7",
|
|
4
4
|
"description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
|
@@ -2,7 +2,7 @@ var _jsxFileName = "/home/runner/work/neeto-commons-frontend/neeto-commons-front
|
|
|
2
2
|
_this = this;
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Honeybadger, HoneybadgerErrorBoundary as ErrorBoundary } from "@honeybadger-io/react";
|
|
5
|
-
import { IGNORABLE_ERRORS_REGEX } from "./constants";
|
|
5
|
+
import { IGNORABLE_ERROR_NAMES_REGEX, IGNORABLE_ERRORS_REGEX } from "./constants";
|
|
6
6
|
import FallbackComponent from "./FallbackComponent";
|
|
7
7
|
import { attachContext, getSessionReplayUrl } from "./utils";
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
|
|
|
16
16
|
Honeybadger.beforeNotify(function (notice) {
|
|
17
17
|
var _globalProps$user;
|
|
18
18
|
if (!notice) return false;
|
|
19
|
-
var isIgnorable = IGNORABLE_ERRORS_REGEX.test(notice.message) || notice.stack.includes("chrome-extension://") || (filterErrors === null || filterErrors === void 0 ? void 0 : filterErrors(notice)) === false;
|
|
19
|
+
var isIgnorable = IGNORABLE_ERRORS_REGEX.test(notice.message) || IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) || notice.stack.includes("chrome-extension://") || (filterErrors === null || filterErrors === void 0 ? void 0 : filterErrors(notice)) === false;
|
|
20
20
|
if (isIgnorable) return false;
|
|
21
21
|
var context = {};
|
|
22
22
|
var user = (_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.email;
|
|
@@ -43,7 +43,7 @@ var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
|
|
|
43
43
|
__self: _this,
|
|
44
44
|
__source: {
|
|
45
45
|
fileName: _jsxFileName,
|
|
46
|
-
lineNumber:
|
|
46
|
+
lineNumber: 58,
|
|
47
47
|
columnNumber: 5
|
|
48
48
|
}
|
|
49
49
|
}, children);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HoneybadgerErrorBoundary.js","names":["React","Honeybadger","HoneybadgerErrorBoundary","ErrorBoundary","IGNORABLE_ERRORS_REGEX","FallbackComponent","attachContext","getSessionReplayUrl","_ref","children","_ref$ErrorComponent","ErrorComponent","_ref$filterErrors","filterErrors","undefined","beforeNotify","notice","_globalProps$user","isIgnorable","test","message","stack","includes","context","user","globalProps","email","sessionReplay","honeybadger","configure","apiKey","honeybadgerApiKey","environment","railsEnv","revision","honeybadgerRevision","developmentEnvironments","enableUncaught","async","breadcrumbsEnabled","projectRoot","enableUnhandledRejection","createElement","__self","_this","__source","fileName","_jsxFileName","lineNumber","columnNumber"],"sources":["../../../src/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.jsx"],"sourcesContent":["import React from \"react\";\n\nimport {\n Honeybadger,\n HoneybadgerErrorBoundary as ErrorBoundary,\n} from \"@honeybadger-io/react\";\n\nimport {
|
|
1
|
+
{"version":3,"file":"HoneybadgerErrorBoundary.js","names":["React","Honeybadger","HoneybadgerErrorBoundary","ErrorBoundary","IGNORABLE_ERROR_NAMES_REGEX","IGNORABLE_ERRORS_REGEX","FallbackComponent","attachContext","getSessionReplayUrl","_ref","children","_ref$ErrorComponent","ErrorComponent","_ref$filterErrors","filterErrors","undefined","beforeNotify","notice","_globalProps$user","isIgnorable","test","message","name","stack","includes","context","user","globalProps","email","sessionReplay","honeybadger","configure","apiKey","honeybadgerApiKey","environment","railsEnv","revision","honeybadgerRevision","developmentEnvironments","enableUncaught","async","breadcrumbsEnabled","projectRoot","enableUnhandledRejection","createElement","__self","_this","__source","fileName","_jsxFileName","lineNumber","columnNumber"],"sources":["../../../src/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.jsx"],"sourcesContent":["import React from \"react\";\n\nimport {\n Honeybadger,\n HoneybadgerErrorBoundary as ErrorBoundary,\n} from \"@honeybadger-io/react\";\n\nimport {\n IGNORABLE_ERROR_NAMES_REGEX,\n IGNORABLE_ERRORS_REGEX,\n} from \"./constants\";\nimport FallbackComponent from \"./FallbackComponent\";\nimport { attachContext, getSessionReplayUrl } from \"./utils\";\n\n/** @type {import(\"neetocommons/react-utils\").HoneybadgerErrorBoundary} */\nconst HoneybadgerErrorBoundary = ({\n children,\n ErrorComponent = FallbackComponent,\n filterErrors = undefined,\n}) => {\n Honeybadger.beforeNotify(notice => {\n if (!notice) return false;\n\n const isIgnorable =\n IGNORABLE_ERRORS_REGEX.test(notice.message) ||\n IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) ||\n notice.stack.includes(\"chrome-extension://\") ||\n filterErrors?.(notice) === false;\n\n if (isIgnorable) return false;\n\n const context = {};\n\n const user = globalProps.user?.email;\n if (user) context.user = user;\n\n const sessionReplay = getSessionReplayUrl();\n if (sessionReplay) context.sessionReplay = sessionReplay;\n\n attachContext(notice, context);\n\n return true;\n });\n\n const honeybadger = Honeybadger.configure({\n apiKey: globalProps.honeybadgerApiKey,\n environment: globalProps.railsEnv,\n revision: globalProps.honeybadgerRevision,\n developmentEnvironments: [\"development\", \"test\"],\n enableUncaught: true,\n async: true,\n breadcrumbsEnabled: true,\n projectRoot: \"webpack:///./\",\n enableUnhandledRejection: false,\n });\n\n return (\n <ErrorBoundary {...{ ErrorComponent, honeybadger }}>\n {children}\n </ErrorBoundary>\n );\n};\n\nexport default HoneybadgerErrorBoundary;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SACEC,WAAW,EACXC,wBAAwB,IAAIC,aAAa,QACpC,uBAAuB;AAE9B,SACEC,2BAA2B,EAC3BC,sBAAsB;AAExB,OAAOC,iBAAiB;AACxB,SAASC,aAAa,EAAEC,mBAAmB;;AAE3C;AACA,IAAMN,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAAO,IAAA,EAIxB;EAAA,IAHJC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,mBAAA,GAAAF,IAAA,CACRG,cAAc;IAAdA,cAAc,GAAAD,mBAAA,cAAGL,iBAAiB,GAAAK,mBAAA;IAAAE,iBAAA,GAAAJ,IAAA,CAClCK,YAAY;IAAZA,YAAY,GAAAD,iBAAA,cAAGE,SAAS,GAAAF,iBAAA;EAExBZ,WAAW,CAACe,YAAY,CAAC,UAAAC,M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AAW,EAAXA,WAAW;IAAAe,MAAA,EAAAC,KAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAC,YAAA;MAAAC,UAAA;MAAAC,YAAA;IAAA;EAAA,GAC7CzC,QAAQ,CACK;AAEpB,CAAC;AAED,eAAeR,wBAAwB"}
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export var IGNORABLE_ERRORS_REGEX = /(window\.requestAnimationFrame|ResizeObserver|ChunkLoadError|window\.webkit\.messageHandlers|Request aborted|Network Error)/;
|
|
1
|
+
export var IGNORABLE_ERRORS_REGEX = /(window\.requestAnimationFrame|ResizeObserver|ChunkLoadError|window\.webkit\.messageHandlers|Request aborted|Network Error)/;
|
|
2
|
+
export var IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;
|
|
3
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","names":["IGNORABLE_ERRORS_REGEX"],"sources":["../../../src/react-utils/HoneybadgerErrorBoundary/constants.js"],"sourcesContent":["export const IGNORABLE_ERRORS_REGEX =\n /(window\\.requestAnimationFrame|ResizeObserver|ChunkLoadError|window\\.webkit\\.messageHandlers|Request aborted|Network Error)/;\n"],"mappings":"AAAA,OAAO,IAAMA,sBAAsB,GACjC,6HAA6H"}
|
|
1
|
+
{"version":3,"file":"constants.js","names":["IGNORABLE_ERRORS_REGEX","IGNORABLE_ERROR_NAMES_REGEX"],"sources":["../../../src/react-utils/HoneybadgerErrorBoundary/constants.js"],"sourcesContent":["export const IGNORABLE_ERRORS_REGEX =\n /(window\\.requestAnimationFrame|ResizeObserver|ChunkLoadError|window\\.webkit\\.messageHandlers|Request aborted|Network Error)/;\nexport const IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;\n"],"mappings":"AAAA,OAAO,IAAMA,sBAAsB,GACjC,6HAA6H;AAC/H,OAAO,IAAMC,2BAA2B,GAAG,kBAAkB"}
|
package/utils/datetime.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
/* eslint-disable @bigbinary/neeto/use-standard-date-time-formats */
|
|
1
2
|
import dayjs from "dayjs";
|
|
3
|
+
import localizedFormat from "dayjs/plugin/localizedFormat";
|
|
2
4
|
import relativeTime from "dayjs/plugin/relativeTime";
|
|
3
5
|
import updateLocale from "dayjs/plugin/updateLocale";
|
|
4
6
|
dayjs.extend(relativeTime);
|
|
5
7
|
dayjs.extend(updateLocale);
|
|
8
|
+
dayjs.extend(localizedFormat);
|
|
6
9
|
var getDefaultFormat = function getDefaultFormat() {
|
|
7
10
|
var _globalProps$user$dat, _globalProps, _globalProps$user;
|
|
8
11
|
return (_globalProps$user$dat = (_globalProps = globalProps) === null || _globalProps === void 0 ? void 0 : (_globalProps$user = _globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.dateFormat) !== null && _globalProps$user$dat !== void 0 ? _globalProps$user$dat : "DD/MM/YYYY";
|
|
@@ -12,19 +15,19 @@ export var timeFormat = {
|
|
|
12
15
|
return dayjs(time).fromNow();
|
|
13
16
|
},
|
|
14
17
|
time: function time(_time) {
|
|
15
|
-
return dayjs(_time).format("
|
|
18
|
+
return dayjs(_time).format("LT");
|
|
16
19
|
},
|
|
17
20
|
timeWithSeconds: function timeWithSeconds(time) {
|
|
18
|
-
return dayjs(time).format("
|
|
21
|
+
return dayjs(time).format("LTS");
|
|
19
22
|
},
|
|
20
23
|
date: function date(time) {
|
|
21
|
-
return dayjs(time).format("
|
|
24
|
+
return dayjs(time).format("ll");
|
|
22
25
|
},
|
|
23
26
|
dateWeek: function dateWeek(time) {
|
|
24
|
-
return dayjs(time).format("
|
|
27
|
+
return dayjs(time).format("ll ddd");
|
|
25
28
|
},
|
|
26
29
|
dateWeekDayExtended: function dateWeekDayExtended(time) {
|
|
27
|
-
return dayjs(time).format("
|
|
30
|
+
return dayjs(time).format("ll dddd");
|
|
28
31
|
},
|
|
29
32
|
dateWeekWithoutYear: function dateWeekWithoutYear(time) {
|
|
30
33
|
return dayjs(time).format("MMM D, ddd");
|
|
@@ -33,19 +36,19 @@ export var timeFormat = {
|
|
|
33
36
|
return dayjs(time).format("MMM D, dddd");
|
|
34
37
|
},
|
|
35
38
|
dateTime: function dateTime(time) {
|
|
36
|
-
return dayjs(time).format("
|
|
39
|
+
return dayjs(time).format("ll LT");
|
|
37
40
|
},
|
|
38
41
|
dateTimeWithSeconds: function dateTimeWithSeconds(time) {
|
|
39
|
-
return dayjs(time).format("
|
|
42
|
+
return dayjs(time).format("ll LTS");
|
|
40
43
|
},
|
|
41
44
|
dateWeekTime: function dateWeekTime(time) {
|
|
42
|
-
return dayjs(time).format("
|
|
45
|
+
return dayjs(time).format("ll ddd LT");
|
|
43
46
|
},
|
|
44
47
|
dateWeekTimeDayExtended: function dateWeekTimeDayExtended(time) {
|
|
45
|
-
return dayjs(time).format("
|
|
48
|
+
return dayjs(time).format("ll dddd LT");
|
|
46
49
|
},
|
|
47
50
|
extended: function extended(time) {
|
|
48
|
-
var dateTime = dayjs(time).format("dddd
|
|
51
|
+
var dateTime = dayjs(time).format("dddd LL LT");
|
|
49
52
|
var fromNow = dayjs(time).fromNow();
|
|
50
53
|
return "".concat(dateTime, " (").concat(fromNow, ")");
|
|
51
54
|
},
|
|
@@ -53,7 +56,7 @@ export var timeFormat = {
|
|
|
53
56
|
return dayjs(time).format(getDefaultFormat());
|
|
54
57
|
},
|
|
55
58
|
defaultWithTime: function defaultWithTime(time) {
|
|
56
|
-
return dayjs(time).format("".concat(getDefaultFormat(), "
|
|
59
|
+
return dayjs(time).format("".concat(getDefaultFormat(), " LTS"));
|
|
57
60
|
}
|
|
58
61
|
};
|
|
59
62
|
export var dateFormat = timeFormat;
|
package/utils/datetime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetime.js","names":["dayjs","relativeTime","updateLocale","extend","getDefaultFormat","_globalProps$user$dat","_globalProps","_globalProps$user","globalProps","user","dateFormat","timeFormat","fromNow","time","format","timeWithSeconds","date","dateWeek","dateWeekDayExtended","dateWeekWithoutYear","dateWeekWithoutYearDayExtended","dateTime","dateTimeWithSeconds","dateWeekTime","dateWeekTimeDayExtended","extended","concat","_default","defaultWithTime"],"sources":["../../src/utils/datetime.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"datetime.js","names":["dayjs","localizedFormat","relativeTime","updateLocale","extend","getDefaultFormat","_globalProps$user$dat","_globalProps","_globalProps$user","globalProps","user","dateFormat","timeFormat","fromNow","time","format","timeWithSeconds","date","dateWeek","dateWeekDayExtended","dateWeekWithoutYear","dateWeekWithoutYearDayExtended","dateTime","dateTimeWithSeconds","dateWeekTime","dateWeekTimeDayExtended","extended","concat","_default","defaultWithTime"],"sources":["../../src/utils/datetime.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/use-standard-date-time-formats */\nimport dayjs from \"dayjs\";\nimport localizedFormat from \"dayjs/plugin/localizedFormat\";\nimport relativeTime from \"dayjs/plugin/relativeTime\";\nimport updateLocale from \"dayjs/plugin/updateLocale\";\n\ndayjs.extend(relativeTime);\ndayjs.extend(updateLocale);\ndayjs.extend(localizedFormat);\n\nconst getDefaultFormat = () => globalProps?.user?.dateFormat ?? \"DD/MM/YYYY\";\n\nexport const timeFormat = {\n fromNow: time => dayjs(time).fromNow(),\n time: time => dayjs(time).format(\"LT\"),\n timeWithSeconds: time => dayjs(time).format(\"LTS\"),\n date: time => dayjs(time).format(\"ll\"),\n dateWeek: time => dayjs(time).format(\"ll ddd\"),\n dateWeekDayExtended: time => dayjs(time).format(\"ll dddd\"),\n dateWeekWithoutYear: time => dayjs(time).format(\"MMM D, ddd\"),\n dateWeekWithoutYearDayExtended: time => dayjs(time).format(\"MMM D, dddd\"),\n dateTime: time => dayjs(time).format(\"ll LT\"),\n dateTimeWithSeconds: time => dayjs(time).format(\"ll LTS\"),\n dateWeekTime: time => dayjs(time).format(\"ll ddd LT\"),\n dateWeekTimeDayExtended: time => dayjs(time).format(\"ll dddd LT\"),\n extended: time => {\n const dateTime = dayjs(time).format(\"dddd LL LT\");\n const fromNow = dayjs(time).fromNow();\n\n return `${dateTime} (${fromNow})`;\n },\n default: time => dayjs(time).format(getDefaultFormat()),\n defaultWithTime: time => dayjs(time).format(`${getDefaultFormat()} LTS`),\n};\n\nexport const dateFormat = timeFormat;\n"],"mappings":"AAAA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,MAAM,8BAA8B;AAC1D,OAAOC,YAAY,MAAM,2BAA2B;AACpD,OAAOC,YAAY,MAAM,2BAA2B;AAEpDH,KAAK,CAACI,MAAM,CAACF,YAAY,CAAC;AAC1BF,KAAK,CAACI,MAAM,CAACD,YAAY,CAAC;AAC1BH,KAAK,CAACI,MAAM,CAACH,eAAe,CAAC;AAE7B,IAAMI,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAA;EAAA,IAAAC,qBAAA,EAAAC,YAAA,EAAAC,iBAAA;EAAA,QAAAF,qBAAA,IAAAC,YAAA,GAASE,WAAW,cAAAF,YAAA,wBAAAC,iBAAA,GAAXD,YAAA,CAAaG,IAAI,cAAAF,iBAAA,uBAAjBA,iBAAA,CAAmBG,UAAU,cAAAL,qBAAA,cAAAA,qBAAA,GAAI,YAAY;AAAA;AAE5E,OAAO,IAAMM,UAAU,GAAG;EACxBC,OAAO,EAAE,SAAAA,QAAAC,IAAI;IAAA,OAAId,KAAK,CAACc,IAAI,CAAC,CAACD,OAAO,EAAE;EAAA;EACtCC,IAAI,EAAE,SAAAA,UAAI;IAAA,OAAId,KAAK,CAACc,KAAI,CAAC,CAACC,MAAM,CAAC,IAAI,CAAC;EAAA;EACtCC,eAAe,EAAE,SAAAA,gBAAAF,IAAI;IAAA,OAAId,KAAK,CAACc,IAAI,CAAC,CAACC,MAAM,CAAC,KAAK,CAAC;EAAA;EAClDE,IAAI,EAAE,SAAAA,KAAAH,IAAI;IAAA,OAAId,KAAK,CAACc,IAAI,CAAC,CAACC,MAAM,CAAC,IAAI,CAAC;E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