package.cjs.react-utils.AppContainer.AppContainer.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neeto-commons-frontend Show documentation
Show all versions of neeto-commons-frontend Show documentation
A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _reactQueryDevtools = require("@tanstack/react-query-devtools");
require("../../assets/stylesheets/app-container.css");
var _BrowserSupport = _interopRequireDefault(require("@bigbinary/neeto-molecules/BrowserSupport"));
var _StickyRibbonsContainer = _interopRequireDefault(require("@bigbinary/neeto-molecules/StickyRibbonsContainer"));
var _reactRouterDom = require("react-router-dom");
var _reactToastify = require("react-toastify");
var _HoneybadgerErrorBoundary = _interopRequireDefault(require("../HoneybadgerErrorBoundary"));
var _QueryClientProvider = _interopRequireDefault(require("../QueryClientProvider/QueryClientProvider"));
var _jsxRuntime = require("react/jsx-runtime");
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var AppContainer = function AppContainer(_ref) {
var children = _ref.children,
browserSupportProps = _ref.browserSupportProps,
_ref$enableStickyRibb = _ref.enableStickyRibbons,
enableStickyRibbons = _ref$enableStickyRibb === void 0 ? true : _ref$enableStickyRibb,
honeybadgerErrorBoundaryProps = _ref.honeybadgerErrorBoundaryProps,
reactQueryDevtoolsProps = _ref.reactQueryDevtoolsProps,
toastContainerProps = _ref.toastContainerProps;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_HoneybadgerErrorBoundary["default"], _objectSpread(_objectSpread({}, honeybadgerErrorBoundaryProps), {}, {
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_BrowserSupport["default"], _objectSpread(_objectSpread({}, browserSupportProps), {}, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactToastify.ToastContainer, _objectSpread({}, toastContainerProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_QueryClientProvider["default"], {
children: [globalProps.authenticated && enableStickyRibbons && /*#__PURE__*/(0, _jsxRuntime.jsx)(_StickyRibbonsContainer["default"], {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.BrowserRouter, {
children: children
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactQueryDevtools.ReactQueryDevtools, _objectSpread({
initialIsOpen: false,
position: "bottom"
}, reactQueryDevtoolsProps))]
})]
}))
}));
};
var _default = exports["default"] = AppContainer;
//# sourceMappingURL=AppContainer.js.map