All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.cjs.initializers.index.js Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof3 = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = initializeApplication;
exports.globalProps = void 0;
Object.defineProperty(exports, "taxonomies", {
  enumerable: true,
  get: function get() {
    return _i18n.taxonomies;
  }
});
Object.defineProperty(exports, "useDisplayErrorPage", {
  enumerable: true,
  get: function get() {
    return _useDisplayErrorPage["default"];
  }
});
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
var _useDisplayErrorPage = _interopRequireDefault(require("../react-utils/useDisplayErrorPage"));
var _axios = _interopRequireDefault(require("./axios"));
var _dayjs = _interopRequireDefault(require("./dayjs"));
var _globalProps = _interopRequireDefault(require("./globalProps"));
var _i18n = _interopRequireWildcard(require("./i18n"));
var _logger = _interopRequireDefault(require("./logger"));
var _mixpanel = _interopRequireDefault(require("./mixpanel"));
var _reactDevTools = _interopRequireDefault(require("./reactDevTools"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
// TODO: kept for backward compatibility.

// eslint-disable-next-line import/no-mutable-exports
var globalProps = exports.globalProps = {};
function initializeApplication(_ref) {
  var translationResources = _ref.translationResources,
    skip = _ref.skip;
  if (!(skip !== null && skip !== void 0 && skip.globalProps)) {
    (0, _globalProps["default"])();
    // eslint-disable-next-line @bigbinary/neeto/no-globalProps-reassignment
    exports.globalProps = globalProps = window.globalProps;
  }
  if ((0, _typeof2["default"])(skip === null || skip === void 0 ? void 0 : skip.axios) === "object" || !(skip !== null && skip !== void 0 && skip.axios)) {
    (0, _axios["default"])(skip === null || skip === void 0 ? void 0 : skip.axios);
  }
  if (!(skip !== null && skip !== void 0 && skip.i18n)) (0, _i18n["default"])(translationResources);
  if (!(skip !== null && skip !== void 0 && skip.logger)) (0, _logger["default"])();
  if (!(skip !== null && skip !== void 0 && skip.dayjs)) (0, _dayjs["default"])(skip === null || skip === void 0 ? void 0 : skip.timezone);
  if (process.env.NODE_ENV === "production") (0, _reactDevTools["default"])();
  var pageLoader = document.getElementById("neeto-page-loader");
  if (pageLoader) pageLoader.remove();
  (0, _mixpanel["default"])(skip);
}
//# sourceMappingURL=index.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy