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(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
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 = AppContainer;
exports["default"] = _default;
//# sourceMappingURL=AppContainer.js.map