App.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _react = _interopRequireWildcard(require("react"));
  7. var _modularityFront = _interopRequireDefault(require("modularity-front"));
  8. require("./App.css");
  9. require("@trendmicro/react-sidenav/dist/react-sidenav.css");
  10. var _logo = _interopRequireDefault(require("./logo.svg"));
  11. var _reactMaterialize = require("react-materialize");
  12. var _NavbarModule = _interopRequireDefault(require("./Modules/NavbarModule"));
  13. var _Product = _interopRequireDefault(require("./Modules/Product"));
  14. var _ProductView = _interopRequireDefault(require("./Modules/ProductView"));
  15. var _ProductService = _interopRequireDefault(require("./Services/ProductService"));
  16. var _FileUploader = _interopRequireDefault(require("./Modules/FileUploader"));
  17. var _Form = _interopRequireDefault(require("./Modules/Form"));
  18. var _Card = _interopRequireDefault(require("./Modules/Card"));
  19. var _CarouselPanel = _interopRequireDefault(require("./Modules/CarouselPanel"));
  20. var _Carousel = _interopRequireDefault(require("./Modules/Carousel"));
  21. var _Table = _interopRequireDefault(require("./Modules/Table"));
  22. var _Pagination = _interopRequireDefault(require("./Modules/Pagination"));
  23. var _Footer = _interopRequireDefault(require("./Modules/Footer"));
  24. var _SideNav = _interopRequireDefault(require("./Modules/SideNav"));
  25. var _HorizontalContainer = _interopRequireDefault(require("./Modules/HorizontalContainer"));
  26. var _View = _interopRequireDefault(require("./Modules/View"));
  27. var _ListModule = _interopRequireDefault(require("./HigherModules/ListModule"));
  28. var _TableData = _interopRequireDefault(require("./HigherModules/TableData"));
  29. var _UserService = _interopRequireDefault(require("./Services/UserService"));
  30. var _CrudService = _interopRequireDefault(require("./Services/CrudService"));
  31. var _LoadedModulesService = _interopRequireDefault(require("./Services/LoadedModulesService"));
  32. var _CrudListPackage = _interopRequireDefault(require("./Packages/CrudListPackage"));
  33. var _UserPackage = _interopRequireDefault(require("./Packages/UserPackage"));
  34. var _VerticalNavbarPackage = _interopRequireDefault(require("./Packages/VerticalNavbarPackage"));
  35. var _miniCart = _interopRequireDefault(require("./Modules/mini-cart"));
  36. var _VerticalNavbar = _interopRequireDefault(require("./Modules/VerticalNavbar"));
  37. var _parallax = _interopRequireDefault(require("./Modules/parallax"));
  38. var _Modal = _interopRequireDefault(require("./Modules/Modal"));
  39. var _searchbar = _interopRequireDefault(require("./Modules/searchbar.js"));
  40. var _CustomTable = _interopRequireDefault(require("./Modules/CustomTable.js"));
  41. var _FullScreenContainer = _interopRequireDefault(require("./Modules/FullScreenContainer.js"));
  42. var _Presentation = _interopRequireDefault(require("./Packages/Tonersales/Presentation1"));
  43. var _ClientForm = _interopRequireDefault(require("./Modules/ClientForm"));
  44. var _SearchBarPackage = _interopRequireDefault(require("./Packages/Tonersales/SearchBarPackage"));
  45. var _CartPage = _interopRequireDefault(require("./Packages/Tonersales/CartPage"));
  46. var _FiltersPackage = _interopRequireDefault(require("./Packages/FiltersPackage"));
  47. var _Chip = _interopRequireDefault(require("./Modules/Chip"));
  48. var _HorizontalCard = _interopRequireDefault(require("./Modules/HorizontalCard"));
  49. var _Import = _interopRequireDefault(require("./Modules/Import"));
  50. var _Present = _interopRequireDefault(require("./Modules/Product/Present"));
  51. var _GoogleMap = _interopRequireDefault(require("./Modules/GoogleMap"));
  52. var _ProductPresentPackage = _interopRequireDefault(require("./Packages/Tonersales/ProductPresentPackage"));
  53. var _PrinterPresentPackage = _interopRequireDefault(require("./Packages/Tonersales/PrinterPresentPackage"));
  54. var _UserAccount = _interopRequireDefault(require("./Packages/Tonersales/UserAccount"));
  55. var _OrderPackage = _interopRequireDefault(require("./Packages/Tonersales/OrderPackage"));
  56. var _ContactPackage = _interopRequireDefault(require("./Packages/Tonersales/ContactPackage"));
  57. var _FilterModule = _interopRequireDefault(require("./Modules/FilterModule"));
  58. var _Frontend = _interopRequireDefault(require("./Environments/Frontend.js"));
  59. var _ViewOrder = _interopRequireDefault(require("./HigherModules/ViewOrder"));
  60. var _TextEditor = _interopRequireDefault(require("./Modules/TextEditor"));
  61. var _Modules = _interopRequireDefault(require("./Modules"));
  62. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  63. function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
  64. function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  65. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  66. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  67. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  68. function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
  69. function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  70. function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  71. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
  72. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  73. var Core = _modularityFront.default.Systems.getCore();
  74. _modularityFront.default.Systems.addModule(_ProductView.default);
  75. _modularityFront.default.Systems.addModule(_Product.default);
  76. _modularityFront.default.Systems.addService(_ProductService.default);
  77. _modularityFront.default.Systems.addService(_LoadedModulesService.default);
  78. _modularityFront.default.Systems.addService(_CrudService.default);
  79. _modularityFront.default.Systems.addService(_UserService.default);
  80. _modularityFront.default.Systems.addModule(_UserPackage.default);
  81. _modularityFront.default.Systems.addModule(_FileUploader.default);
  82. _modularityFront.default.Systems.addModule(_NavbarModule.default);
  83. _modularityFront.default.Systems.addModule(_Form.default);
  84. _modularityFront.default.Systems.addModule(_Card.default);
  85. _modularityFront.default.Systems.addModule(_CarouselPanel.default);
  86. _modularityFront.default.Systems.addModule(_Carousel.default);
  87. _modularityFront.default.Systems.addModule(_Table.default);
  88. _modularityFront.default.Systems.addModule(_Pagination.default);
  89. _modularityFront.default.Systems.addModule(_Footer.default);
  90. _modularityFront.default.Systems.addModule(_SideNav.default);
  91. _modularityFront.default.Systems.addModule(_ListModule.default);
  92. _modularityFront.default.Systems.addModule(_View.default);
  93. _modularityFront.default.Systems.addModule(_VerticalNavbar.default);
  94. _modularityFront.default.Systems.addModule(_VerticalNavbarPackage.default);
  95. _modularityFront.default.Systems.addModule(_CrudListPackage.default);
  96. _modularityFront.default.Systems.addModule(_parallax.default);
  97. _modularityFront.default.Systems.addModule(_Modal.default);
  98. _modularityFront.default.Systems.addModule(_searchbar.default);
  99. _modularityFront.default.Systems.addModule(_FilterModule.default);
  100. _modularityFront.default.Systems.addModule(_HorizontalContainer.default);
  101. _modularityFront.default.Systems.addModule(_HorizontalCard.default);
  102. _modularityFront.default.Systems.addModule(_FullScreenContainer.default);
  103. _modularityFront.default.Systems.addModule(_miniCart.default);
  104. _modularityFront.default.Systems.addModule(_Presentation.default);
  105. _modularityFront.default.Systems.addModule(_SearchBarPackage.default);
  106. _modularityFront.default.Systems.addModule(_FiltersPackage.default);
  107. _modularityFront.default.Systems.addModule(_Import.default);
  108. _modularityFront.default.Systems.addModule(_Chip.default);
  109. _modularityFront.default.Systems.addModule(_CartPage.default);
  110. _modularityFront.default.Systems.addModule(_CustomTable.default);
  111. _modularityFront.default.Systems.addModule(_ClientForm.default);
  112. _modularityFront.default.Systems.addModule(_Present.default);
  113. _modularityFront.default.Systems.addModule(_ProductPresentPackage.default);
  114. _modularityFront.default.Systems.addModule(_PrinterPresentPackage.default);
  115. _modularityFront.default.Systems.addModule(_UserAccount.default);
  116. _modularityFront.default.Systems.addModule(_TableData.default);
  117. _modularityFront.default.Systems.addModule(_OrderPackage.default);
  118. _modularityFront.default.Systems.addModule(_ViewOrder.default);
  119. _modularityFront.default.Systems.addModule(_TextEditor.default);
  120. _modularityFront.default.Systems.addModule(_ContactPackage.default);
  121. _modularityFront.default.Systems.addModule(_GoogleMap.default);
  122. console.log("HERE MODULES INIT");
  123. var App =
  124. /*#__PURE__*/
  125. function (_Component) {
  126. _inherits(App, _Component);
  127. function App(props) {
  128. var _this;
  129. _classCallCheck(this, App);
  130. _this = _possibleConstructorReturn(this, _getPrototypeOf(App).call(this, props));
  131. _this.state = {
  132. SiteMode: localStorage.getItem("SolidLoader") == "true",
  133. script: {}
  134. };
  135. if (process.env.NODE_ENV !== 'production') window.addEventListener('keypress', function (e) {
  136. var keynum;
  137. if (window.event) {
  138. // IE
  139. keynum = e.keyCode;
  140. } else if (e.which) {
  141. // Netscape/Firefox/Opera
  142. keynum = e.which;
  143. }
  144. if (keynum === 61) {
  145. localStorage.setItem("AdminMode", !_this.state.SiteMode ? "" : "admin");
  146. localStorage.setItem("AdminVision", !_this.state.SiteMode ? "" : "admin");
  147. localStorage.setItem("SolidLoader", !_this.state.SiteMode);
  148. _this.setState({
  149. SiteMode: !_this.state.SiteMode
  150. });
  151. }
  152. });
  153. return _this;
  154. }
  155. _createClass(App, [{
  156. key: "render",
  157. value: function render() {
  158. return _react.default.createElement("div", null, _react.default.createElement("div", {
  159. className: "",
  160. key: 'App'
  161. }, process.env.NODE_ENV !== 'production' ? this.state.SiteMode ? _react.default.createElement(_modularityFront.default.ModuleLoader.SolidLoader, {
  162. script: _Frontend.default
  163. }) : _react.default.createElement(_modularityFront.default.ModuleLoader.MemoryLoader, null) : _react.default.createElement(_modularityFront.default.ModuleLoader.SolidLoader, {
  164. script: _Frontend.default
  165. })));
  166. }
  167. }]);
  168. return App;
  169. }(_react.Component);
  170. var _default = App;
  171. exports.default = _default;