@bigbinary/neeto-commons-frontend 2.0.32 → 2.0.34
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/README.md +2 -0
- package/configs/webpack/index.js +5 -1
- package/cypress-utils.cjs.js +28 -1017
- package/cypress-utils.d.ts +8 -8
- package/cypress-utils.js +28 -1018
- package/package.json +1 -1
- package/react-utils.cjs.js +6 -1
- package/react-utils.d.ts +5 -0
- package/react-utils.js +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.34",
|
|
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>",
|
package/react-utils.cjs.js
CHANGED
|
@@ -4185,7 +4185,7 @@ var FallbackComponent = function FallbackComponent() {
|
|
|
4185
4185
|
}
|
|
4186
4186
|
}))));
|
|
4187
4187
|
};
|
|
4188
|
-
var ignorableErrorsRegex = /(window\.requestAnimationFrame|ResizeObserver)/;
|
|
4188
|
+
var ignorableErrorsRegex = /(window\.requestAnimationFrame|ResizeObserver|ChunkLoadError)/;
|
|
4189
4189
|
var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
|
|
4190
4190
|
var children = _ref.children,
|
|
4191
4191
|
_ref$ErrorComponent = _ref.ErrorComponent,
|
|
@@ -91897,6 +91897,10 @@ var registerBrowserNotifications = /*#__PURE__*/function () {
|
|
|
91897
91897
|
};
|
|
91898
91898
|
}();
|
|
91899
91899
|
|
|
91900
|
+
var handleMetaClick = ramda.curry(function (history, params, event) {
|
|
91901
|
+
return event.ctrlKey || event.metaKey ? window.open(params.pathname || params, "_blank") : history.push(params);
|
|
91902
|
+
});
|
|
91903
|
+
|
|
91900
91904
|
var withTitle = function withTitle(Component) {
|
|
91901
91905
|
var title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
91902
91906
|
return function PageTitle(props) {
|
|
@@ -95412,6 +95416,7 @@ exports.Schedule = Schedule;
|
|
|
95412
95416
|
exports.Sidebar = Sidebar;
|
|
95413
95417
|
exports.TimeFormat = TimeFormat;
|
|
95414
95418
|
exports.destroyBrowserSubscription = destroyBrowserSubscription;
|
|
95419
|
+
exports.handleMetaClick = handleMetaClick;
|
|
95415
95420
|
exports.registerBrowserNotifications = registerBrowserNotifications;
|
|
95416
95421
|
exports.useDebounce = useDebounce;
|
|
95417
95422
|
exports.useDisplayErrorPage = useDisplayErrorPage;
|
package/react-utils.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { RouteProps } from "react-router-dom";
|
|
|
13
13
|
import { Notice } from "@honeybadger-io/js/dist/server/types/core/types";
|
|
14
14
|
import { ObjectAndPrimitives } from "./pure";
|
|
15
15
|
import { DateTimeType, timeFormat } from "./utils";
|
|
16
|
+
import { History } from "history";
|
|
16
17
|
|
|
17
18
|
export const HoneybadgerErrorBoundary: React.FC<{
|
|
18
19
|
ErrorComponent?: React.ReactNode | React.ComponentType<any>;
|
|
@@ -187,3 +188,7 @@ export function withTitle(
|
|
|
187
188
|
export async function registerBrowserNotifications(): Promise<void>;
|
|
188
189
|
|
|
189
190
|
export async function destroyBrowserSubscription(): Promise<void>;
|
|
191
|
+
|
|
192
|
+
export function handleMetaClick(history: History, params: string | object, event: React.MouseEvent<HTMLElement, MouseEvent>): void;
|
|
193
|
+
export function handleMetaClick(history: History, params: string | object): (event: React.MouseEvent<HTMLElement, MouseEvent> ) => void;
|
|
194
|
+
export function handleMetaClick(history: History): (params: string | object, event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
package/react-utils.js
CHANGED
|
@@ -4148,7 +4148,7 @@ var FallbackComponent = function FallbackComponent() {
|
|
|
4148
4148
|
}
|
|
4149
4149
|
}))));
|
|
4150
4150
|
};
|
|
4151
|
-
var ignorableErrorsRegex = /(window\.requestAnimationFrame|ResizeObserver)/;
|
|
4151
|
+
var ignorableErrorsRegex = /(window\.requestAnimationFrame|ResizeObserver|ChunkLoadError)/;
|
|
4152
4152
|
var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
|
|
4153
4153
|
var children = _ref.children,
|
|
4154
4154
|
_ref$ErrorComponent = _ref.ErrorComponent,
|
|
@@ -91860,6 +91860,10 @@ var registerBrowserNotifications = /*#__PURE__*/function () {
|
|
|
91860
91860
|
};
|
|
91861
91861
|
}();
|
|
91862
91862
|
|
|
91863
|
+
var handleMetaClick = curry(function (history, params, event) {
|
|
91864
|
+
return event.ctrlKey || event.metaKey ? window.open(params.pathname || params, "_blank") : history.push(params);
|
|
91865
|
+
});
|
|
91866
|
+
|
|
91863
91867
|
var withTitle = function withTitle(Component) {
|
|
91864
91868
|
var title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
91865
91869
|
return function PageTitle(props) {
|
|
@@ -95361,4 +95365,4 @@ var zig = /*#__PURE__*/_mergeNamespaces({
|
|
|
95361
95365
|
'default': zigExports
|
|
95362
95366
|
}, [zigExports]);
|
|
95363
95367
|
|
|
95364
|
-
export { BrowserSupport, Columns, CustomDomain, DateFormat, ErrorPage, HoneybadgerErrorBoundary, IpRestriction, SignIn as LoginPage, NeetoWidget, PrivateRoute, Schedule, Sidebar, TimeFormat, destroyBrowserSubscription, registerBrowserNotifications, useDebounce, useDisplayErrorPage, useFuncDebounce, useIsElementVisibleInDom, useLocalStorage, useOnClickOutside, usePrevious, useUpdateEffect, withImmutableActions, withTitle };
|
|
95368
|
+
export { BrowserSupport, Columns, CustomDomain, DateFormat, ErrorPage, HoneybadgerErrorBoundary, IpRestriction, SignIn as LoginPage, NeetoWidget, PrivateRoute, Schedule, Sidebar, TimeFormat, destroyBrowserSubscription, handleMetaClick, registerBrowserNotifications, useDebounce, useDisplayErrorPage, useFuncDebounce, useIsElementVisibleInDom, useLocalStorage, useOnClickOutside, usePrevious, useUpdateEffect, withImmutableActions, withTitle };
|