Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require("source-map-support").install();
- module.exports =
- /******/ (function(modules) { // webpackBootstrap
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId]) {
- /******/ return installedModules[moduleId].exports;
- /******/ }
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ i: moduleId,
- /******/ l: false,
- /******/ exports: {}
- /******/ };
- /******/
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- /******/
- /******/ // Flag the module as loaded
- /******/ module.l = true;
- /******/
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/
- /******/
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/
- /******/ // identity function for calling harmony imports with the correct context
- /******/ __webpack_require__.i = function(value) { return value; };
- /******/
- /******/ // define getter function for harmony exports
- /******/ __webpack_require__.d = function(exports, name, getter) {
- /******/ if(!__webpack_require__.o(exports, name)) {
- /******/ Object.defineProperty(exports, name, {
- /******/ configurable: false,
- /******/ enumerable: true,
- /******/ get: getter
- /******/ });
- /******/ }
- /******/ };
- /******/
- /******/ // getDefaultExport function for compatibility with non-harmony modules
- /******/ __webpack_require__.n = function(module) {
- /******/ var getter = module && module.__esModule ?
- /******/ function getDefault() { return module['default']; } :
- /******/ function getModuleExports() { return module; };
- /******/ __webpack_require__.d(getter, 'a', getter);
- /******/ return getter;
- /******/ };
- /******/
- /******/ // Object.prototype.hasOwnProperty.call
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
- /******/
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "/assets/";
- /******/
- /******/ // Load entry module and return exports
- /******/ return __webpack_require__(__webpack_require__.s = 161);
- /******/ })
- /************************************************************************/
- /******/ ([
- /* 0 */
- /***/ (function(module, exports) {
- module.exports = require("react");
- /***/ }),
- /* 1 */
- /***/ (function(module, exports) {
- module.exports = require("prop-types");
- /***/ }),
- /* 2 */
- /***/ (function(module, exports) {
- module.exports = require("react-redux");
- /***/ }),
- /* 3 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export AuthServiceClass */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Cookies_cookies_service__ = __webpack_require__(30);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Communication_socket_Socket_service__ = __webpack_require__(10);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__modules_users_models_User_model__ = __webpack_require__(29);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__my_redux_actions_UserAuthenticated_actions__ = __webpack_require__(21);
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 5/12/2017.
- * (C) BIT TECHNOLOGIES
- */
- let AuthServiceClass = class AuthServiceClass {
- //from redux
- constructor() {
- this.dispatch = null;
- this.userAuthenticated = null;
- console.log(" @@@ AUTH SERVICE CLASS");
- }
- startService(dispatch, userAuthenticated, SocketService) {
- this.dispatch = dispatch;
- this.userAuthenticated = userAuthenticated;
- this.loadCookieUserDocumentReady();
- }
- loadCookieUserDocumentReady() {
- // this.loadCookieInterval = setInterval(::this.loadCookieUser,500);
- // this.loadCookieUser();
- }
- loadCookieUser() {
- if (this.userAuthenticated.user.isLoggedIn() === true) return; //already logged in
- if (typeof window !== "undefined" && typeof window.document !== "undefined") {
- var sessionId = __WEBPACK_IMPORTED_MODULE_0__Cookies_cookies_service__["a" /* default */].getSessionCookie();
- if (sessionId !== "") this.loginSessionAsync(sessionId);
- __WEBPACK_IMPORTED_MODULE_1__Communication_socket_Socket_service__["a" /* default */].setSocketReadObservable("connect").subscribe(response => {
- var sessionId = __WEBPACK_IMPORTED_MODULE_0__Cookies_cookies_service__["a" /* default */].getSessionCookie();
- if (sessionId !== "") this.loginSessionAsync(sessionId);
- });
- clearInterval(this.loadCookieInterval);
- }
- }
- loginAsync(sEmailUserName, sPassword) {
- this.logout();
- return new Promise(resolve => {
- if (this.userAuthenticated.user.isLoggedIn() === true) {
- console.log("user already logged in");resolve(true);return;
- }; //already logged in
- //Using Promise
- __WEBPACK_IMPORTED_MODULE_1__Communication_socket_Socket_service__["a" /* default */].sendRequestGetDataPromise("auth/login", { emailUsername: sEmailUserName, password: sPassword }).then(resData => {
- console.log('Answer from Server Auth Login');
- console.log(resData);
- if (resData.result === true) this.loginProvidingUser(resData.user, resData.sessionId);
- resolve(resData);
- });
- });
- }
- loginProvidingUser(userJSON, sessionId) {
- let userLogged = new __WEBPACK_IMPORTED_MODULE_2__modules_users_models_User_model__["a" /* default */](userJSON);
- this.dispatch(__WEBPACK_IMPORTED_MODULE_3__my_redux_actions_UserAuthenticated_actions__["a" /* newUserAuthenticated */](userLogged));
- __WEBPACK_IMPORTED_MODULE_0__Cookies_cookies_service__["a" /* default */].setCookie('sessionId', sessionId, 365 * 5, '/');
- console.log('setting cookie ' + sessionId);
- }
- loginSessionAsync(sessionId) {
- return new Promise(resolve => {
- //Using Promise
- if (this.userAuthenticated.user.isLoggedIn() === true) {
- resolve(true);return;
- }; //already logged in
- //SocketService.createClientSocket();
- __WEBPACK_IMPORTED_MODULE_1__Communication_socket_Socket_service__["a" /* default */].sendRequestGetDataPromise("auth/login-session", { sessionId: sessionId }).then(resData => {
- console.log('Answer from Login sessionId Async');
- console.log(resData);
- if (resData.result == true) {
- let userLogged = new __WEBPACK_IMPORTED_MODULE_2__modules_users_models_User_model__["a" /* default */](resData.user);
- this.dispatch(__WEBPACK_IMPORTED_MODULE_3__my_redux_actions_UserAuthenticated_actions__["a" /* newUserAuthenticated */](userLogged));
- }
- resolve(resData);
- });
- });
- }
- registerAsync(sUsername, sEmailAddress, sPassword, sFirstName, sLastName, sCountry, sLanguage, sCity, sLatitude, sLongitude, iTimeZone) {
- return new Promise(resolve => {
- //Using Promise
- __WEBPACK_IMPORTED_MODULE_1__Communication_socket_Socket_service__["a" /* default */].sendRequestGetDataPromise("auth/register", { email: sEmailAddress, username: sUsername, password: sPassword,
- firstName: sFirstName, lastName: sLastName, country: sCountry, language: sLanguage, city: sCity, latitude: sLatitude, longitude: sLongitude, timeZone: iTimeZone }).then(resData => {
- console.log('Answer from Server Auth Register', resData);
- if (resData.result === true) {
- this.loginAsync(sEmailAddress, sPassword);
- }
- resolve(resData);
- });
- });
- }
- registerOAuthAsync(sSocialNetworkName, sSocialNetworkId, sAccessToken, sEmail, sFirstName, sLastName, sProfilePic, sCoverImage, sCountryCode, sLanguage, sCity, latitude, longitude, sShortBio, iAge, sGender, iTimeZone, bVerified) {
- return new Promise(resolve => {
- //Using Promise
- __WEBPACK_IMPORTED_MODULE_1__Communication_socket_Socket_service__["a" /* default */].sendRequestGetDataPromise("auth/register-oauth", { socialNetwork: sSocialNetworkName, socialNetworkId: sSocialNetworkId, accessToken: sAccessToken,
- email: sEmail, firstName: sFirstName, lastName: sLastName, profilePic: sProfilePic, coverPic: sCoverImage, country: sCountryCode, language: sLanguage, city: sCity,
- latitude: latitude, longitude: longitude, shortBio: sShortBio, age: iAge, gender: sGender, timeZone: iTimeZone, verified: bVerified }).then(resData => {
- console.log('Answer from Oauth', resData);
- if (resData.result === true) {
- this.loginProvidingUser(resData.user, resData.sessionId);
- }
- resolve(resData);
- });
- });
- }
- logout() {
- console.log("LOGOUT");
- __WEBPACK_IMPORTED_MODULE_1__Communication_socket_Socket_service__["a" /* default */].sendRequest("auth/logout", {});
- __WEBPACK_IMPORTED_MODULE_0__Cookies_cookies_service__["a" /* default */].deleteCookie("sessionId");
- this.dispatch(__WEBPACK_IMPORTED_MODULE_3__my_redux_actions_UserAuthenticated_actions__["b" /* logoutUserAuthenticated */]());
- }
- };
- var AuthService = new AuthServiceClass();
- /* harmony default export */ __webpack_exports__["a"] = (AuthService);
- // export default {
- // AuthService: AuthService,
- //
- // createNewInstance: function () {
- // AuthService = new AuthServiceClass();
- // }
- //
- // }
- /***/ }),
- /* 4 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Template_components_Body__ = __webpack_require__(55);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Feedback_Feedback__ = __webpack_require__(53);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__my_redux_actions_Localization_actions__ = __webpack_require__(12);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- var _class, _temp;
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- // external-global styles must be imported in your JS.
- var _ref = _jsx(__WEBPACK_IMPORTED_MODULE_3__Feedback_Feedback__["a" /* default */], {});
- let Layout = (_temp = _class = class Layout extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- getChildContext() {
- return {
- userAuthenticated: this.props.userAuthenticated
- };
- }
- constructor(props) {
- super(props);
- }
- componentDidMount() {
- return _asyncToGenerator(function* () {
- // this.props.dispatch(startLocalizationFetchingAsync());
- requestAnimationFrame(function () {//Make sure it is on client only
- });
- })();
- }
- render() {
- //console.log("################### Layout",this);
- return _jsx('div', {
- id: 'wrapper'
- }, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_2__Template_components_Body__["a" /* default */], {}, void 0, 'Country: ', this.props.localization.country, this.props.children), _ref);
- }
- }, _class.contextTypes = {
- SocketService: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
- AuthService: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
- }, _class.childContextTypes = {
- userAuthenticated: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.any
- }, _temp);
- function mapState(state) {
- return {
- localization: state.localization,
- userAuthenticated: state.userAuthenticated
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4_react_redux__["connect"])(mapState, mapDispatch)(Layout));
- /***/ }),
- /* 5 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__history__ = __webpack_require__(88);
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- var _class, _temp2;
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- function isLeftClickEvent(event) {
- return event.button === 0;
- }
- function isModifiedEvent(event) {
- return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
- }
- let Link = (_temp2 = _class = class Link extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(...args) {
- var _temp;
- return _temp = super(...args), this.handleClick = event => {
- if (this.props.onClick) {
- this.props.onClick(event);
- }
- if (isModifiedEvent(event) || !isLeftClickEvent(event)) {
- return;
- }
- if (event.defaultPrevented === true) {
- return;
- }
- event.preventDefault();
- __WEBPACK_IMPORTED_MODULE_2__history__["a" /* default */].push(this.props.to);
- }, _temp;
- }
- render() {
- const _props = this.props,
- { to, children } = _props,
- props = _objectWithoutProperties(_props, ['to', 'children']);
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
- 'a',
- _extends({ href: to }, props, { onClick: this.handleClick }),
- children
- );
- }
- }, _class.defaultProps = {
- onClick: null
- }, _temp2);
- /* harmony default export */ __webpack_exports__["a"] = (Link);
- /***/ }),
- /* 6 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Forum; });
- /**
- * Created by BIT TECHNOLOGIES on 5/28/2017.
- */
- /* eslint-disable import/prefer-default-export */
- let Forum = class Forum {
- constructor(data = {}) {
- this.title = data.title || '';
- this.description = data.description || '';
- this.URL = data.URL || '';
- this.iconPic = data.iconPic || '';
- this.coverPic = data.coverPic || '';
- this.coverColor = data.coverColor || '';
- this.preferredLang = data.preferredLang || data.language || null;
- this.country = data.country || '';
- this.city = data.city || '';
- this.dtCreation = data.dtCreation || Date.now();
- this.dtLastActivity = data.dtLastActivity || Date.now();
- this.longitude = data.longitude || -666;
- this.latitude = data.latitude || -666;
- console.log('Forum Assigned');
- }
- getAuthor() {
- return null;
- }
- };
- /***/ }),
- /* 7 */
- /***/ (function(module, exports) {
- module.exports = require("isomorphic-style-loader/lib/withStyles");
- /***/ }),
- /* 8 */
- /***/ (function(module, exports) {
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- // css base code, injected by the css-loader
- module.exports = function(useSourceMap) {
- var list = [];
- // return the list of modules as css string
- list.toString = function toString() {
- return this.map(function (item) {
- var content = cssWithMappingToString(item, useSourceMap);
- if(item[2]) {
- return "@media " + item[2] + "{" + content + "}";
- } else {
- return content;
- }
- }).join("");
- };
- // import a list of modules into the list
- list.i = function(modules, mediaQuery) {
- if(typeof modules === "string")
- modules = [[null, modules, ""]];
- var alreadyImportedModules = {};
- for(var i = 0; i < this.length; i++) {
- var id = this[i][0];
- if(typeof id === "number")
- alreadyImportedModules[id] = true;
- }
- for(i = 0; i < modules.length; i++) {
- var item = modules[i];
- // skip already imported module
- // this implementation is not 100% perfect for weird media query combinations
- // when a module is imported multiple times with different media queries.
- // I hope this will never occur (Hey this way we have smaller bundles)
- if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
- if(mediaQuery && !item[2]) {
- item[2] = mediaQuery;
- } else if(mediaQuery) {
- item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
- }
- list.push(item);
- }
- }
- };
- return list;
- };
- function cssWithMappingToString(item, useSourceMap) {
- var content = item[1] || '';
- var cssMapping = item[3];
- if (!cssMapping) {
- return content;
- }
- if (useSourceMap && typeof btoa === 'function') {
- var sourceMapping = toComment(cssMapping);
- var sourceURLs = cssMapping.sources.map(function (source) {
- return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
- });
- return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
- }
- return [content].join('\n');
- }
- // Adapted from convert-source-map (MIT)
- function toComment(sourceMap) {
- // eslint-disable-next-line no-undef
- var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
- var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
- return '/*# ' + data + ' */';
- }
- /***/ }),
- /* 9 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _stringify = __webpack_require__(138);
- var _stringify2 = _interopRequireDefault(_stringify);
- var _slicedToArray2 = __webpack_require__(139);
- var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- /**
- * Isomorphic CSS style loader for Webpack
- *
- * Copyright © 2015-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- var prefix = 's';
- var inserted = {};
- // Base64 encoding and decoding - The "Unicode Problem"
- // https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem
- function b64EncodeUnicode(str) {
- return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) {
- return String.fromCharCode('0x' + p1);
- }));
- }
- /**
- * Remove style/link elements for specified node IDs
- * if they are no longer referenced by UI components.
- */
- function removeCss(ids) {
- ids.forEach(function (id) {
- if (--inserted[id] <= 0) {
- var elem = document.getElementById(prefix + id);
- if (elem) {
- elem.parentNode.removeChild(elem);
- }
- }
- });
- }
- /**
- * Example:
- * // Insert CSS styles object generated by `css-loader` into DOM
- * var removeCss = insertCss([[1, 'body { color: red; }']]);
- *
- * // Remove it from the DOM
- * removeCss();
- */
- function insertCss(styles) {
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
- _ref$replace = _ref.replace,
- replace = _ref$replace === undefined ? false : _ref$replace,
- _ref$prepend = _ref.prepend,
- prepend = _ref$prepend === undefined ? false : _ref$prepend;
- var ids = [];
- for (var i = 0; i < styles.length; i++) {
- var _styles$i = (0, _slicedToArray3.default)(styles[i], 4),
- moduleId = _styles$i[0],
- css = _styles$i[1],
- media = _styles$i[2],
- sourceMap = _styles$i[3];
- var id = moduleId + '-' + i;
- ids.push(id);
- if (inserted[id]) {
- if (!replace) {
- inserted[id]++;
- continue;
- }
- }
- inserted[id] = 1;
- var elem = document.getElementById(prefix + id);
- var create = false;
- if (!elem) {
- create = true;
- elem = document.createElement('style');
- elem.setAttribute('type', 'text/css');
- elem.id = prefix + id;
- if (media) {
- elem.setAttribute('media', media);
- }
- }
- var cssText = css;
- if (sourceMap && typeof btoa === 'function') {
- // skip IE9 and below, see http://caniuse.com/atob-btoa
- cssText += '\n/*# sourceMappingURL=data:application/json;base64,' + b64EncodeUnicode((0, _stringify2.default)(sourceMap)) + '*/';
- cssText += '\n/*# sourceURL=' + sourceMap.file + '?' + id + '*/';
- }
- if ('textContent' in elem) {
- elem.textContent = cssText;
- } else {
- elem.styleSheet.cssText = cssText;
- }
- if (create) {
- if (prepend) {
- document.head.insertBefore(elem, document.head.childNodes[0]);
- } else {
- document.head.appendChild(elem);
- }
- }
- }
- return removeCss.bind(null, ids);
- }
- module.exports = insertCss;
- /***/ }),
- /* 10 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_socket_io_client__ = __webpack_require__(48);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_socket_io_client___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_socket_io_client__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__ = __webpack_require__(47);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Cookies_cookies_service__ = __webpack_require__(30);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__my_redux_actions_SocketStatus_actions__ = __webpack_require__(34);
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/6/2017.
- * (C) BIT TECHNOLOGIES
- */
- let SocketServiceClass = class SocketServiceClass {
- constructor() {
- this.sServerSocketAddress = "myskyhub.ddns.net:4000";
- this.sServerSocketApi = "api/";
- this.sServerSocketVersion = "";
- console.log(' @@@@@@ Socket Client constructor');
- }
- startService(dispatch) {
- this.dispatch = dispatch;
- this.createClientSocketDocumentReady();
- }
- createClientSocketDocumentReady() {
- //this.createClientSocketInterval = setInterval(::this.createClientSocket,500);
- this.createClientSocket();
- }
- createClientSocket() {
- // console.log("Trying to create Client...");
- //
- // if ((typeof window === "undefined") || (typeof window.document === "undefined")) return; //in case it is not executed on the Client Browser
- //
- // console.log('createClientSocket ');
- // clearInterval(this.createClientSocketInterval);
- this.socket = __WEBPACK_IMPORTED_MODULE_0_socket_io_client__["connect"](this.sServerSocketAddress, {
- //query: "token=aaa" //JWT Token
- query: "token=" + __WEBPACK_IMPORTED_MODULE_2__Cookies_cookies_service__["a" /* default */].getSessionCookie //JWT Token
- () });
- this.setSocketReadObservable("connect").subscribe(response => {
- console.log('Client has connected to the server!');
- this.dispatch(__WEBPACK_IMPORTED_MODULE_3__my_redux_actions_SocketStatus_actions__["a" /* socketConnectionSuccessfully */]());
- });
- this.socket.on("connect_failed", function () {
- console.log('Connecting failed 222');
- });
- this.setSocketReadObservable("connect_error").subscribe(response => {
- console.log('Connecting Error', response);
- this.dispatch(__WEBPACK_IMPORTED_MODULE_3__my_redux_actions_SocketStatus_actions__["b" /* socketConnectingError */]());
- });
- this.socket.on("error", function () {
- console.log('error 222');
- });
- this.socket.on('api/news', function (res) {
- console.log('news');
- console.log(res);
- });
- // THE SAME CODE written but using OBSERVABLE
- this.setSocketReadObservable("connectionReady").subscribe(response => {
- console.log("Connection Ready: " + response);
- this.sendRequestObservable("version", '').subscribe(response => {
- this.sServerSocketVersion = response.version;
- console.log("API VERSION: " + response.version);
- });
- });
- // Add a connect listener
- this.socket.on('api/message', function (data) {
- console.log('Received a message from the server!', data);
- });
- // Add a disconnect listener
- this.setSocketReadObservable("disconnect").subscribe(response => {
- console.log('The client has disconnected!');
- this.dispatch(__WEBPACK_IMPORTED_MODULE_3__my_redux_actions_SocketStatus_actions__["c" /* socketDisconnected */]());
- });
- }
- /*
- FUNCTIONS
- */
- sendRequest(sRequestName, requestData) {
- //console.log('sending'+sRequestName); console.log(sRequestData);
- var token = __WEBPACK_IMPORTED_MODULE_2__Cookies_cookies_service__["a" /* default */].getSessionCookie();
- if (token !== "" && !requestData.hasOwnProperty('token') && typeof requestData !== "string") {
- requestData.token = token;
- }
- if (sRequestName !== '' || requestData !== '') return this.socket.emit(this.sServerSocketApi + sRequestName, requestData);
- }
- /*
- Sending the Request and Obtain the Promise to Wait Async
- */
- sendRequestGetDataPromise(sRequestName, sRequestData) {
- return new Promise(resolve => {
- this.sendRequest(sRequestName, sRequestData);
- this.socket.once(this.sServerSocketApi + sRequestName, function (resData) {
- /*console.log('SOCKET RECEIVED: ');
- console.log(resData);*/
- resolve(resData);
- });
- });
- }
- sendMessage(msg) {
- return this.sendRequest("message", msg);
- }
- /*
- Sending Request and Obtain the Observable Object
- */
- sendRequestObservable(sRequestName, sRequestData) {
- var result = this.sendRequest(sRequestName, sRequestData);
- return this.setSocketReadObservable(sRequestName);
- }
- setSocketReadObservable(sRequestName) {
- if (sRequestName !== "connect" && sRequestName !== "disconnect" && sRequestName !== 'connect_failed' && sRequestName !== 'connect_error') sRequestName = this.sServerSocketApi + sRequestName;
- //let observable = new Observable < Object > (observer => {
- let observable = __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__["Observable"].create(observer => {
- this.socket.on(sRequestName, data => {
- observer.next(data);
- });
- });
- console.log("OBSERVABLE for " + sRequestName, observable);
- return observable;
- }
- };
- var SocketService = new SocketServiceClass();
- /* harmony default export */ __webpack_exports__["a"] = (SocketService);
- // var SocketService = new SocketServiceClass();
- //
- // export default {
- // SocketService: SocketService,
- // createNewInstance: function (){
- // SocketService = new SocketServiceClass();
- // }
- // };
- /***/ }),
- /* 11 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sequelize__ = __webpack_require__(13);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sequelize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_sequelize__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__config__ = __webpack_require__(15);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__config___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__config__);
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- const sequelize = new __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a(__WEBPACK_IMPORTED_MODULE_1__config___default.a.databaseUrl, {
- define: {
- freezeTableName: true
- }
- });
- /* harmony default export */ __webpack_exports__["a"] = (sequelize);
- /***/ }),
- /* 12 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = extractIP;
- /* harmony export (immutable) */ __webpack_exports__["b"] = startLocalizationFetchingAsync;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_axios__ = __webpack_require__(43);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_axios__);
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 5/26/2017.
- * (C) BIT TECHNOLOGIES
- */
- /* eslint-disable import/prefer-default-export */
- function extractIP(req) {
- var ip = req.headers['x-real-ip'] || req.connection.remoteAddress;
- //const requestIp = require('request-ip');
- //const ip = requestIp.getClientIp(req);
- console.log('IP::');console.log(ip);
- return {
- type: 'NEW_LOCALIZATION_IP',
- payload: {
- clientIP: ip
- }
- };
- }
- function startLocalizationFetchingAsync() {
- return (() => {
- var _ref = _asyncToGenerator(function* (dispatch, getState) {
- //console.log("startLocalizationFetchingAsync ",getState());
- if (getState().localization.request.sent) {
- return dispatch({
- type: "LOCALIZATION_SKIPPED",
- payload: {}
- });
- }
- let payload = {
- request: {
- sent: true
- }
- };
- dispatch({
- type: "NEW_LOCALIZATION_REQUEST_SENT",
- payload: payload
- });
- return __WEBPACK_IMPORTED_MODULE_0_axios___default.a.get("http://freegeoip.net/json/" + getState().localization.IP).then(function (res) {
- res = res.data;
- var payload = {
- country: res.country_name || '',
- countryCode: res.country_code || '',
- city: res.city || '',
- latitude: res.latitude || '',
- longitude: res.longitude || '',
- ip: res.ip || '',
- timeZone: res.time_zone || '',
- request: {
- sent: true,
- done: true,
- error: false
- }
- };
- //console.log("IP STATUS",payload);
- dispatch({
- type: "NEW_LOCALIZATION",
- payload: payload
- });
- }).catch(function (error) {
- console.log("Promise Rejected", error);
- dispatch({
- type: "NEW_LOCALIZATION_REQUEST_ERROR",
- payload: null
- });
- });
- });
- return function (_x, _x2) {
- return _ref.apply(this, arguments);
- };
- })();
- }
- /***/ }),
- /* 13 */
- /***/ (function(module, exports) {
- module.exports = require("sequelize");
- /***/ }),
- /* 14 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__services_Communication_socket_Socket_service__ = __webpack_require__(10);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__my_redux_actions_UserAuthenticated_actions__ = __webpack_require__(21);
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 5/26/2017.
- * (C) BIT TECHNOLOGIES
- */
- let ForumsServiceClass = class ForumsServiceClass {
- constructor() {
- this.dispatch = null;
- }
- startService(dispatch) {
- this.dispatch = dispatch;
- }
- forumAddAsync(sParentId, sTitle, sDescription, arrKeywords, sCountryCode, sLanguage, sCity, latitude, longitude, iTimeZone) {
- return new Promise(resolve => {
- //Using Promise
- __WEBPACK_IMPORTED_MODULE_0__services_Communication_socket_Socket_service__["a" /* default */].sendRequestGetDataPromise("forums/add-forum", { parent: sParentId, title: sTitle, description: sDescription, keywords: arrKeywords,
- country: sCountryCode, language: sLanguage, city: sCity, latitude: latitude, longitude: longitude, timeZone: iTimeZone }).then(resData => {
- console.log('Answer from FORUM ', resData);
- // if(resData.result === true) {
- // this.loginProvidingUser(resData.user, resData.token);
- // }
- resolve(resData);
- });
- });
- }
- getForumAsync(sId) {
- //Using Promise
- return __WEBPACK_IMPORTED_MODULE_0__services_Communication_socket_Socket_service__["a" /* default */].sendRequestGetDataPromise("forums/get-forum", { id: sId });
- }
- };
- var ForumsService = new ForumsServiceClass();
- /* harmony default export */ __webpack_exports__["a"] = (ForumsService);
- /***/ }),
- /* 15 */
- /***/ (function(module, exports, __webpack_require__) {
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- /* eslint-disable max-len */
- if (false) {
- throw new Error('Do not import `config.js` from inside the client-side code.');
- }
- module.exports = {
- // Node.js app
- port: process.env.PORT || 8000,
- // API Gateway
- api: {
- // API URL to be used in the client-side code
- clientUrl: process.env.API_CLIENT_URL || '',
- // API URL to be used in the server-side code
- serverUrl: process.env.API_SERVER_URL || `http://localhost:${process.env.PORT || 8000}`
- },
- // Database
- databaseUrl: process.env.DATABASE_URL || 'sqlite:database.sqlite',
- // Web analytics
- analytics: {
- // https://analytics.google.com/
- googleTrackingId: process.env.GOOGLE_TRACKING_ID // UA-XXXXX-X
- },
- // Authentication
- auth: {
- jwt: { secret: process.env.JWT_SECRET || 'SKYHUB_SECRET_44442222' },
- // https://developers.facebook.com/
- facebook: {
- id: process.env.FACEBOOK_APP_ID || '622709767918813',
- secret: process.env.FACEBOOK_APP_SECRET || 'f4fb647d60c8569d4048d0a1a3a50e89'
- },
- // https://cloud.google.com/console/project
- google: {
- id: process.env.GOOGLE_CLIENT_ID || '658977310896-knrl3gka66fldh83dao2rhgbblmd4un9.apps.googleusercontent.com',
- secret: process.env.GOOGLE_CLIENT_SECRET || 'Y8yR9yZAhm9jQ8FKAL8QIEcd'
- },
- // https://apps.twitter.com/
- twitter: {
- key: process.env.TWITTER_CONSUMER_KEY || 'Ie20AZvLJI2lQD5Dsgxgjauns',
- secret: process.env.TWITTER_CONSUMER_SECRET || 'KTZ6cxoKnEakQCeSpZlaUCJWGAlTEBJj0y2EMkUBujA7zWSvaQ'
- }
- }
- };
- /***/ }),
- /* 16 */
- /***/ (function(module, exports) {
- module.exports = require("graphql");
- /***/ }),
- /* 17 */
- /***/ (function(module, exports) {
- module.exports = require("react-select");
- /***/ }),
- /* 18 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Page_css__ = __webpack_require__(131);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Page_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__Page_css__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- let Page = function () {
- function Page(props) {
- const { title, html } = props;
- return _jsx('div', {
- className: __WEBPACK_IMPORTED_MODULE_3__Page_css___default.a.root
- }, void 0, _jsx('div', {
- className: __WEBPACK_IMPORTED_MODULE_3__Page_css___default.a.container
- }, void 0, _jsx('h1', {}, void 0, title), _jsx('div', {
- dangerouslySetInnerHTML: { __html: html }
- }), _jsx('div', {}, void 0, props.children || null)));
- }
- return Page;
- }();
- /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles___default()(__WEBPACK_IMPORTED_MODULE_3__Page_css___default.a)(Page));
- /***/ }),
- /* 19 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_axios__ = __webpack_require__(43);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_axios__);
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/6/2017.
- * (C) BIT TECHNOLOGIES
- */
- //import CookiesService from 'modules/services/Cookies/Cookies.service';
- //import { Configuration } from '../app.constants';
- let HTTPServiceClass = class HTTPServiceClass {
- constructor() {
- this.serverHTTP = "http://myskyhub.ddns.net:4000/";
- this.serverHTTPApi = this.serverHTTP + "api/";
- console.log("Creating HTTP Service");
- }
- getRequest(sRequest, req) {
- var _this = this;
- return _asyncToGenerator(function* () {
- //console.log(""); console.log(""); console.log(""); console.log(this.addTrailingSlash(this.serverHTTPApi)+sRequest); console.log(req);
- req = { data: req };
- let answer = yield __WEBPACK_IMPORTED_MODULE_0_axios___default.a.get(_this.addTrailingSlash(_this.serverHTTPApi) + sRequest, req);
- return answer.data;
- })();
- }
- getRequestURL(sRequest, req) {
- return _asyncToGenerator(function* () {
- req = { data: req };
- let answer = yield __WEBPACK_IMPORTED_MODULE_0_axios___default.a.get(sRequest, req);
- return answer.data;
- })();
- }
- postRequest(sRequest, post) {
- var _this2 = this;
- return _asyncToGenerator(function* () {
- let answer = yield __WEBPACK_IMPORTED_MODULE_0_axios___default.a.post(_this2.addTrailingSlash(_this2.serverHTTPApi) + sRequest, post);
- return answer.data;
- })();
- }
- checkAuthCookie(cookie) {
- var _this3 = this;
- return _asyncToGenerator(function* () {
- let sessionId = '';
- //based on this https://stackoverflow.com/questions/3393854/get-and-set-a-single-cookie-with-node-js-http-server
- cookie && cookie.split(';').forEach(function (cookie) {
- let parts = cookie.split('=');
- let cookieName = parts.shift().trim();
- if (cookieName === 'sessionId') sessionId = decodeURI(parts.join('='));
- });
- if (sessionId !== '' && sessionId.length > 5) {
- return yield _this3.getRequest("auth/login-session", { sessionId: sessionId });
- } else {
- return {
- data: {
- result: false,
- message: "cookie invalid"
- }
- };
- }
- })();
- }
- addTrailingSlash(url) {
- var lastChar = url.substr(-1); // Selects the last character
- if (lastChar != '/') {
- // If the last character is not a slash
- url = url + '/'; // Append a slash to it.
- }
- return url;
- }
- };
- var HTTPServiceInstance = new HTTPServiceClass();
- /* harmony default export */ __webpack_exports__["a"] = (HTTPServiceInstance);
- // module.exports = {
- // HTTPService : new HTTPServiceClass(),
- // }
- /***/ }),
- /* 20 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__my_redux_actions_ContentState_actions__ = __webpack_require__(89);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__modules_forums_forums_models_Forum_model__ = __webpack_require__(6);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_Communication_socket_Socket_service__ = __webpack_require__(10);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Communication_http_Http_service__ = __webpack_require__(19);
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- /**
- * Created by ERAZER-ALEX on 6/4/2017.
- */
- let ContentServiceClass = class ContentServiceClass {
- constructor(props) {
- this.contentState = null;
- this.dispatch = null;
- console.log("@@@@ ContentService - CREATE instance");
- } //from redux store
- startService(dispatch, contentState) {
- this.dispatch = dispatch;
- this.contentState = contentState;
- //console.log("@@@@ ContentService - STARTING Service", dispatch, contentState);
- }
- getTopContent(parent, pageIndex, pageCount) {
- return _asyncToGenerator(function* () {
- return __WEBPACK_IMPORTED_MODULE_2__services_Communication_socket_Socket_service__["a" /* default */].sendRequestGetDataPromise("content/get-top-content", { parent: parent, pageIndex: pageIndex, pageCount: pageCount });
- })();
- }
- getTopContentHTTP(parent, pageIndex, pageCount) {
- return _asyncToGenerator(function* () {
- return __WEBPACK_IMPORTED_MODULE_3__Communication_http_Http_service__["a" /* default */].getRequest("content/get-top-content", { parent: parent, pageIndex: pageIndex, pageCount: pageCount });
- })();
- }
- fetchTopContent(parent, pageIndex, pageCount, protocol) {
- var _this = this;
- return _asyncToGenerator(function* () {
- let answer = { result: false };
- if (protocol === 'http') answer = yield _this.getTopContentHTTP(parent, pageIndex, pageCount);else answer = yield _this.getTopContent(parent, pageIndex, pageCount);
- console.log("ANSWER TOP CONTENT", answer);
- if (answer.result === true) {
- let toBeAdded = _this.processNewContent(answer.content);
- if (toBeAdded !== []) yield _this.dispatch(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__my_redux_actions_ContentState_actions__["a" /* setContentState_AddContentObjects_Action */])(toBeAdded));
- return toBeAdded;
- }
- })();
- }
- processNewContent(newContentObjects) {
- if (newContentObjects.constructor !== Array) newContentObjects = [newContentObjects];
- let toBeAdded = [];
- for (let i = 0; i < newContentObjects.length; i++) {
- let newObject = newContentObjects[i].object;
- let bFound = false;
- if (this.contentState.contentObjects !== null) for (let obj in this.contentState.contentObjects) if (newObject.id === obj.id) {
- bFound = true;
- break;
- }
- if (!bFound && newObject !== null && newObject.id !== null) {
- toBeAdded.push(newObject);
- }
- }
- return toBeAdded;
- }
- getRouterObjectContent(sContentToSearchId) {
- return _asyncToGenerator(function* () {
- if (sContentToSearchId !== '') return __WEBPACK_IMPORTED_MODULE_2__services_Communication_socket_Socket_service__["a" /* default */].sendRequestGetDataPromise("content/get-content", { id: sContentToSearchId });else return { result: true, data: { content: null } };
- })();
- }
- getRouterObjectContentHTTP(sContentToSearchId) {
- return _asyncToGenerator(function* () {
- if (sContentToSearchId !== '') {
- return __WEBPACK_IMPORTED_MODULE_3__Communication_http_Http_service__["a" /* default */].getRequest('content/get-content', { id: sContentToSearchId });
- } else return { result: true, data: { content: null } };
- })();
- }
- /*
- IT WILL FETCH THE DATA from the BACKEND AND STORE THE ANSWER IN THE REDUX
- */
- fetchRouterObjectAndContent(sContentToSearchId, protocol) {
- var _this2 = this;
- return _asyncToGenerator(function* () {
- let answer = { result: false };
- if (protocol === "http") answer = yield _this2.getRouterObjectContentHTTP(sContentToSearchId);else answer = yield _this2.getRouterObjectContent(sContentToSearchId);
- console.log("ANSWER FOR ", sContentToSearchId, answer);
- if (answer.result === true) {
- yield _this2.dispatch(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__my_redux_actions_ContentState_actions__["b" /* setContentState_NewRouterObject_Action */])(answer.data.content, false, sContentToSearchId, 1, 8, []));
- yield _this2.fetchTopContent(sContentToSearchId, 1, 8, protocol);
- return answer.data.content;
- } else {
- yield _this2.dispatch(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__my_redux_actions_ContentState_actions__["b" /* setContentState_NewRouterObject_Action */])(null, true, sContentToSearchId, 1, 8, []));
- }
- return null;
- })();
- }
- };
- var ContentServiceInstance = new ContentServiceClass();
- /* harmony default export */ __webpack_exports__["a"] = (ContentServiceInstance);
- /***/ }),
- /* 21 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = newUserAuthenticated;
- /* harmony export (immutable) */ __webpack_exports__["b"] = logoutUserAuthenticated;
- /* eslint-disable import/prefer-default-export */
- function newUserAuthenticated(user) {
- user.loggedIn = true;
- return {
- type: "NEW_USER_AUTHENTICATED",
- payload: {
- user: user,
- error: ''
- }
- };
- }
- function logoutUserAuthenticated() {
- return {
- type: "LOGOUT_USER"
- };
- }
- /***/ }),
- /* 22 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HeaderCover; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by BIT TECHNOLOGIES on 5/28/2017.
- */
- var _ref = _jsx('h4', {
- className: 'fg-white text-center'
- }, void 0, 'Anna Sanchez');
- var _ref2 = _jsx('br', {});
- var _ref3 = _jsx('i', {
- className: 'icon-fontello-heart-1'
- });
- var _ref4 = _jsx('div', {
- className: 'header-cover-layover'
- }, void 0, ' ');
- let HeaderCover = class HeaderCover extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- this.state = {
- follow: 'follow me',
- followActive: false,
- likeCount: 999,
- likeActive: false,
- likeTextStyle: 'fg-white'
- };
- }
- handleFollow() {
- this.setState({
- follow: 'followed',
- followActive: true
- });
- }
- handleLike() {
- this.setState({
- likeCount: 1000,
- likeActive: true,
- likeTextStyle: 'fg-orange75'
- });
- }
- renderSocialMenu() {
- return _jsx('div', {
- className: 'col-xs-12 col-sm-4'
- }, void 0, _jsx('div', {
- className: 'header-cover-avatar'
- }, void 0, _jsx('image', {
- src: '/imgs/app/avatars/avatar.jpg',
- height: '100',
- width: '100',
- style: { display: 'block', borderRadius: 100, border: '2px solid #fff', margin: 'auto', marginTop: 50 }
- }), _ref, _jsx('h5', {
- className: 'fg-white text-center',
- style: { opacity: 0.8 }
- }, void 0, 'DevOps Engineer, NY'), _jsx('hr', {
- className: 'border-black75',
- style: { borderWidth: 2 }
- }), _jsx('div', {
- className: 'text-center'
- }, void 0, _jsx('button', {
- active: this.state.followActive,
- onClick: this.handleFollow.bind(this)
- }, void 0, _jsx('span', {}, void 0, this.state.follow)))));
- }
- renderDescriptionMenu() {
- return _jsx('div', {}, void 0, _jsx('div', {
- className: 'col-xs-12 col-sm-8'
- }, void 0, _jsx('div', {
- className: 'header-cover-description'
- }, void 0, _jsx('div', {}, void 0, _jsx('image', {
- src: this.props.icon || '/res/logo/SkyHub-logo.png'
- }), _jsx('div', {
- className: 'row'
- }, void 0, _jsx('h1', {
- className: 'fg-white'
- }, void 0, this.props.title), _ref2, _jsx('h4', {
- className: 'fg-white',
- style: { opacity: 0.8 }
- }, void 0, this.props.subTitle)), _jsx('div', {
- className: 'header-cover-toolbar'
- }, void 0, _jsx('div', {
- style: { display: 'inline-block' }
- }, void 0, this.props.buttons, _jsx('button', {
- type: 'button',
- id: 'likeCount',
- onClick: this.handleLike.bind(this)
- }, void 0, _ref3), _jsx('label', {
- className: 'header-cover-toolbar-label'
- }, void 0, _jsx('span', {
- className: this.state.likeTextStyle
- }, void 0, this.state.likeCount, ' likes'))))))), false ? this.renderSocialMenu.bind(this) : '');
- }
- render() {
- return _jsx('div', {
- className: 'header-cover',
- style: { backgroundImage: 'url(' + this.props.coverPic + ')', backgroundColor: this.props.coverColor || 'darkblue' }
- }, void 0, (this.props.showLayOver || false) == true ? _ref4 : '', (this.props.showDescriptionMenu || true) == true ? this.renderDescriptionMenu() : 'NU AFISEZ NIMIC');
- }
- };
- /***/ }),
- /* 23 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(142);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_select__ = __webpack_require__(17);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_select__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/10/2017.
- * (C) BIT TECHNOLOGIES
- */
- const FLAGS = __webpack_require__(71);
- const FLAGS_SIZE = 18;
- const FlagOption = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({
- propTypes: {
- children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node,
- className: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,
- isDisabled: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,
- isFocused: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,
- isSelected: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,
- onFocus: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,
- onSelect: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,
- option: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired
- },
- handleMouseDown(event) {
- event.preventDefault();
- event.stopPropagation();
- //console.log(this);
- this.props.onSelect(this.props.option, event);
- },
- handleMouseEnter(event) {
- //console.log(this);
- this.props.onFocus(this.props.option, event);
- },
- handleMouseMove(event) {
- //console.log(this);
- if (this.props.isFocused) return;
- this.props.onFocus(this.props.option, event);
- },
- render() {
- let flagStyle = {
- display: 'inline-block',
- marginRight: 10,
- position: 'relative',
- top: -2,
- verticalAlign: 'middle'
- };
- return _jsx('div', {
- className: this.props.className,
- onMouseDown: this.handleMouseDown,
- onMouseEnter: this.handleMouseEnter,
- onMouseMove: this.handleMouseMove,
- title: this.props.option.title
- }, void 0, _jsx('img', {
- src: this.props.option.flag,
- size: FLAGS_SIZE,
- className: this.props.option.imageCSS,
- style: flagStyle
- }), this.props.children);
- }
- });
- const FlagValue = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({
- propTypes: {
- children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node,
- placeholder: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,
- value: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object
- },
- render() {
- var flagStyle = {
- display: 'inline-block',
- position: 'relative',
- top: 10,
- verticalAlign: 'middle'
- };
- return _jsx('div', {
- className: 'Select-value',
- title: this.props.value.title
- }, void 0, _jsx('span', {
- className: 'Select-value-label'
- }, void 0, _jsx('img', {
- src: this.props.value.flag,
- size: FLAGS_SIZE,
- className: this.props.value.imageCSS,
- style: flagStyle
- }), this.props.children));
- }
- });
- var _ref = _jsx('span', {}, void 0, 'Select Country');
- const MyCountrySelect = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({
- propTypes: {
- hint: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,
- label: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,
- initialCountry: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,
- onSelect: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func
- },
- getInitialState() {
- return { value: "" };
- },
- setValue(value) {
- this.setState({ value });
- if (this.props.onSelect !== null) this.props.onSelect(value);
- },
- render() {
- var placeholder = _ref;
- return _jsx(__WEBPACK_IMPORTED_MODULE_3_react_select___default.a, {
- arrowRenderer: arrowRenderer,
- onChange: this.setValue,
- optionComponent: FlagOption,
- options: FLAGS,
- clearable: false,
- placeholder: placeholder,
- value: this.state.value === '' ? this.props.initialCountry.toLowerCase() : this.state.value,
- valueComponent: FlagValue
- });
- }
- });
- var _ref2 = _jsx('span', {}, void 0, '+');
- function arrowRenderer() {
- return _ref2;
- }
- /* harmony default export */ __webpack_exports__["a"] = (MyCountrySelect);
- /***/ }),
- /* 24 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_REST_authentication_Auth_service__ = __webpack_require__(3);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_REST_forums_content_Content_service__ = __webpack_require__(20);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_ContentButtons_component__ = __webpack_require__(72);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__components_PreviewContent_component__ = __webpack_require__(73);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__forums_view_forum_PreviewForum_component__ = __webpack_require__(25);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 5/24/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx(__WEBPACK_IMPORTED_MODULE_4__components_ContentButtons_component__["a" /* default */], {});
- var _ref2 = _jsx('div', {
- className: 'navy-line'
- });
- let DisplayContent = class DisplayContent extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- }
- renderForums() {
- const objects = this.props.contentState.contentForums.objects;
- if (objects === null || typeof objects === "undefined") return '';
- return objects.map(object => _jsx(__WEBPACK_IMPORTED_MODULE_6__forums_view_forum_PreviewForum_component__["a" /* default */], {
- object: object
- }, object.id));
- }
- renderContent() {
- const objects = this.props.contentState.contentObjects.objects;
- if (objects === null || typeof objects === "undefined") return '';
- return objects.map(object => _jsx(__WEBPACK_IMPORTED_MODULE_5__components_PreviewContent_component__["a" /* default */], {
- object: object
- }, object.id));
- }
- render() {
- return _jsx('div', {
- style: { marginBottom: 0 }
- }, void 0, _jsx('div', {
- className: 'row'
- }, void 0, _jsx('div', {
- className: 'lightBoxGallery'
- }, void 0, this.renderForums.call(this))), _ref, _jsx('div', {
- className: 'row',
- style: { paddingBottom: 20 }
- }, void 0, _jsx('div', {
- className: 'text-center'
- }, void 0, _ref2, _jsx('h4', {
- style: { fontSize: 30 }
- }, void 0, 'What\'s hot on SkyHub'))), _jsx('div', {
- className: 'row'
- }, void 0, this.renderContent.call(this)));
- }
- };
- function mapState(state) {
- return {
- userAuthenticated: state.userAuthenticated,
- contentState: state.contentState
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"])(mapState, mapDispatch)(DisplayContent));
- /***/ }),
- /* 25 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__my_redux_actions_RouterState_actions__ = __webpack_require__(33);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_REST_authentication_Auth_service_js__ = __webpack_require__(3);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__services_REST_forums_forums_Forums_service__ = __webpack_require__(14);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__models_Forum_model__ = __webpack_require__(6);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by BIT TECHNOLOGIES on 5/28/2017.
- */
- /*
- PreviewForum can also work with a prop id="1_frm_3333", and it fetch automatically the forum from you
- */
- var _ref = _jsx('span', {}, void 0, 'Forum not found!');
- let PreviewForum = class PreviewForum extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- this.state = {
- forum: props.forum || new __WEBPACK_IMPORTED_MODULE_5__models_Forum_model__["a" /* default */]({ title: "TEST FORUM", description: "DESCRIPTION" }),
- forumNotFound: props.forumNotFound || false
- };
- }
- componentDidMount() {
- if (typeof this.props.forum !== "undefined") {
- this.setState({
- forum: new __WEBPACK_IMPORTED_MODULE_5__models_Forum_model__["a" /* default */](this.props.forum),
- forumNotFound: this.props.forum === null
- });
- return;
- }
- if (typeof this.props.id !== "undefined") {
- let forumId = this.props.id || '';
- __WEBPACK_IMPORTED_MODULE_4__services_REST_forums_forums_Forums_service__["a" /* default */].getForumAsync(forumId).then(forumAnswer => {
- this.setState({
- forum: forumAnswer,
- forumNotFound: forumAnswer !== null
- });
- });
- }
- }
- renderError() {
- return _jsx('a', {
- title: 'Forum not found',
- 'data-gallery': ''
- }, void 0, _jsx('img', {
- style: { backgroundColor: "red" }
- }), _ref);
- }
- setForumArgument() {}
- render() {
- return _jsx('div', {}, void 0, this.state.forum !== null && this.state.forumNotFound === false ? _jsx('a', {
- href: 'http://webapplayers.com/inspinia_admin-v2.7.1/img/gallery/1.jpg',
- title: this.state.forum.title,
- 'data-gallery': ''
- }, void 0, _jsx('img', {
- src: this.state.forum.iconPic,
- style: { backgroundColor: this.state.forum.coverColor || "#79B0EC" }
- }), _jsx('span', {}, void 0, this.state.forum.title)) : this.renderError.call(this));
- }
- };
- function mapState(state) {
- return {
- userAuthenticated: state.userAuthenticated
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"])(mapState, mapDispatch)(PreviewForum));
- /***/ }),
- /* 26 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LoginForm; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(44);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_Link_Link__ = __webpack_require__(5);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__oauth_social_networks_form_oauth_social_networks_component__ = __webpack_require__(27);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__services_REST_authentication_Auth_service__ = __webpack_require__(3);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- var _ref = _jsx('label', {}, void 0, 'Username or Email');
- var _ref2 = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-user'
- }));
- var _ref3 = _jsx('br', {});
- var _ref4 = _jsx('label', {}, void 0, 'Password');
- var _ref5 = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-key'
- }));
- var _ref6 = _jsx('strong', {}, void 0, ' Register ');
- var _ref7 = _jsx('i', {
- className: 'fa fa-sign-in'
- });
- let LoginForm = class LoginForm extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- this.state = {
- userEmail: '',
- password: '',
- userEmailValidationStatus: [null, ''],
- passwordValidationStatus: [null, '']
- };
- }
- componentDidMount() {
- requestAnimationFrame(() => {//Make sure it is on client only
- //console.log("#################### LOGIN ",AuthService);
- });
- }
- back(e) {
- e.preventDefault();e.stopPropagation();
- //this.props.router.goBack();
- }
- handleCheckLogin(e) {
- e.preventDefault();e.stopPropagation();
- console.log(this.state.userEmail, this.state.password);
- __WEBPACK_IMPORTED_MODULE_5__services_REST_authentication_Auth_service__["a" /* default */].loginAsync(this.state.userEmail, this.state.password).then(res => {
- let userEmailValidationStatus = [null, ''],
- passwordValidationStatus = [null, ''];
- console.log("LOGIN ANSWER", res);
- if (res.result === true) {
- this.loginSuccessfully(res);
- } else if (res.result === false) {
- if (res.message === "No User Found") {
- userEmailValidationStatus = ["error", "No User Found"];
- }
- if (res.message === "Password Incorrect") {
- userEmailValidationStatus = ["success", ''];
- passwordValidationStatus = ["error", "Incorrect Password"];
- }
- this.loginFailure(res);
- }
- this.setState({
- userEmailValidationStatus: userEmailValidationStatus,
- passwordValidationStatus: passwordValidationStatus
- });
- });
- }
- handleUserEmailChange(e) {
- this.setState({
- userEmail: e.target.value,
- userEmailValidationStatus: [null, '']
- });
- }
- handlePasswordChange(e) {
- this.setState({
- password: e.target.value,
- passwordValidationStatus: [null, '']
- });
- }
- loginSuccessfully(res) {
- var onSuccess = this.props.onSuccess || function () {};
- onSuccess(res);
- }
- loginFailure(res) {
- var onError = this.props.onError || function () {};
- onError(res);
- }
- //https://www.w3schools.com/bootstrap/bootstrap_forms_inputs2.asp DOC
- showInputStatus(status) {
- return status[0] === 'error' ? "has-error has-feedback" : status[0] === 'success' ? "has-success has-feedback" : '';
- }
- showInputFeedback(status) {
- return status[0] === 'error' ? "fa fa-remove form-control-feedback" : status[0] === 'success' ? "fa fa-check form-control-feedback" : '';
- }
- render() {
- var onSwitch = this.props.onSwitch || function () {};
- return _jsx('div', {}, void 0, _jsx('div', {
- style: { padding: 25, paddingTop: 0, paddingBottom: 0, margin: 'auto', marginBottom: 25, marginTop: 5 }
- }, void 0, _jsx('form', {
- onSubmit: this.handleCheckLogin.bind(this),
- autoComplete: 'on'
- }, void 0, _ref, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.userEmailValidationStatus)
- }, void 0, _ref2, _jsx('input', {
- autoFocus: true,
- type: 'text',
- className: 'form-control input-lg',
- placeholder: 'username or email',
- name: 'username',
- value: this.state.userEmail,
- onChange: this.handleUserEmailChange.bind(this)
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.userEmailValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.userEmailValidationStatus[1]), ' ', _ref3, _ref4, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.passwordValidationStatus)
- }, void 0, _ref5, _jsx('input', {
- autoFocus: true,
- type: 'password',
- className: 'form-control input-lg',
- placeholder: 'password',
- name: 'password',
- value: this.state.password,
- onChange: this.handlePasswordChange.bind(this)
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.passwordValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.passwordValidationStatus[1]), _jsx('div', {
- className: 'form-group'
- }, void 0, _jsx('div', {
- className: 'row'
- }, void 0, _jsx('div', {
- className: 'col-xs-6',
- style: { paddingTop: 10 }
- }, void 0, _jsx('div', {}, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_3__components_Link_Link__["a" /* default */], {
- to: 'register',
- onClick: onSwitch.bind(this)
- }, void 0, ' ', _ref6), 'to SkyHub')), _jsx('div', {
- className: 'col-xs-6 text-right'
- }, void 0, _jsx('button', {
- type: 'button',
- className: 'btn btn-success ',
- onClick: this.handleCheckLogin.bind(this)
- }, void 0, _ref7, ' Login')))))), _jsx(__WEBPACK_IMPORTED_MODULE_4__oauth_social_networks_form_oauth_social_networks_component__["a" /* default */], {
- onSuccess: this.loginSuccessfully.bind(this),
- onError: this.loginFailure.bind(this)
- }));
- }
- };
- /***/ }),
- /* 27 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_facebook_login__ = __webpack_require__(155);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_facebook_login___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_facebook_login__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_google_login__ = __webpack_require__(156);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_google_login___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_google_login__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__services_REST_authentication_Auth_service__ = __webpack_require__(3);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 5/14/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx('strong', {}, void 0, 'SIGN UP with');
- var _ref2 = _jsx('i', {
- className: 'fa fa-google-plus'
- });
- var _ref3 = _jsx('span', {
- className: 'fa fa-twitter'
- });
- var _ref4 = _jsx('button', {
- 'aria-hidden': 'true',
- 'data-dismiss': 'alert',
- className: 'close',
- type: 'button'
- }, void 0, '\xD7');
- let OauthSocialNetworkComponent = class OauthSocialNetworkComponent extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- this.state = {
- error: ''
- };
- }
- componentDidMount() {
- requestAnimationFrame(() => {//Make sure it is on client only
- //console.log("#################### REGISTER ",AuthService);
- });
- }
- responseFacebook(response) {
- this.setState({
- error: ''
- });
- // accessToken:"EAAI2WeqD1N0BAH11ZBrtE66a2ZAF1BMoVPNBf9WVS6thiRjLqsWloXNswva5uZAp48iFmNARJFYkd6y4OzqhyU36vyjhp5idDjSfGoEoC6TfaK7VZCE63u34WFwoeaqPLQBmzVJWAWxdqVkJUVBZBW2JZAZB72IrhRw7jSvTJ86mBK1GeJstFR1lSXZBgqZCSAqQZD"
- // age_range: {min: 21}
- // cover: {id: "" , offset_y: 2, source: "location.jpg"}
- // expiresIn:6803
- // first_name:"Alexandru"
- // gender:"male"
- // id:"1899824400275208"
- // last_name : "Ionut"
- // link:"https://www.facebook.com/app_scoped_user_id/1899824400275208/"
- // locale:"en_US"
- // name:"Alexandru Ionut"
- // picture:{ data: { is_silhoette: false, url : "picture"}}
- // signedRequest: "ASS-ky4D-1KsC1Rbksly-QiCPN5sYQDYAK7xqLN_v9I.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImNvZGUiOiJBUUJ6VXFicHlvNU1CVnNSTHRJbWwzcnBFOGwyN2xURTk4Ny1XRWNzZHQyWlJkc1JxR2k4QVE3SDEzMjFwTFFrTzJaWm80LUEwcWRyZDM1dHU4UUtMb0JKa3k2eWpGMUFkLVVLb0Q0Q3piU3hVdm1xeGhHWjRuQ2pqSDY5NXpFLWJfT0dMdDM0Sll4ZHdCTlN0aHNSaGZVWHJESno5Z2NaTDhaQlZqb3NFdmRIRV90dVpFQ3VKODVEZk9MVTZvZ1BhVkVFSnpqdkxhQ0tuWjg2ckw3c0cwY2w1UVdFb04ydEtVdks2UXJZcGtTZE9BUXlhUlpGc3N0Z2FkVWl2ZzA0SmstWGY4X1hXSmhuWnlQaTk0bmJOUUVQdlZyc3h0SW5PWnY3NGw0QUIzTHBlLXVQakxQQ2p5OVhnRHVvbUgtTkZkTkNlZEtUYjZtVGp1U2ZvSmtONEZFWSIsImlzc3VlZF9hdCI6MTQ5NDc4NTE5NywidXNlcl9pZCI6IjE4OTk4MjQ0MDAyNzUyMDgifQ"
- // timezone:3
- // updated_time:"2017-04-09T16:31:48+0000"
- // userID: "1899824400275208"
- // verified : true
- try {
- var sFacebookId = response.id || '';
- try {
- var objCover = response.cover || {};
- var sCoverImage = objCover.source || '';
- var sProfilePic = "http://graph.facebook.com/" + sFacebookId + "/picture?type=large";
- // var objProfile = response.picture || {};
- // objProfile = objProfile.data || {};
- // var sProfilePic = objProfile.url || '';
- } catch (Exception) {
- console.log('Error extracting CoverImage and Profile Pic');
- }
- var sAccessToken = response.accessToken || '';
- var sEmail = response.email || '';
- var sFirstName = response.first_name || '';
- var sLastName = response.last_name || '';
- var sGender = response.gender || '';
- var iAge = response.age_range.min || 0;
- var iTimeZone = response.time_zone || 0;
- var sLanguage = response.locale;
- var sShortBio = response.user_about_me || '';
- var bVerified = response.verified;
- console.log("OAUTH Instance", this);
- __WEBPACK_IMPORTED_MODULE_4__services_REST_authentication_Auth_service__["a" /* default */].registerOAuthAsync('facebook', sFacebookId, sAccessToken, sEmail, sFirstName, sLastName, sProfilePic, sCoverImage, this.props.localization.countryCode, sLanguage, this.props.localization.city, this.props.localization.latitude, this.props.localization.longitude, sShortBio, iAge, sGender, iTimeZone, bVerified).then(res => {
- console.log("Auth Service answer ", res);
- if (res.result === true) this.registrationSuccessfully(res);else if (res.result === false) {
- this.errorRegisteringFacebook(response);
- }
- });
- } catch (Exception) {
- console.log('error facebook registering', Exception);
- this.errorRegisteringFacebook(response);
- }
- console.log(response);
- }
- errorRegisteringFacebook(response) {
- this.setState({
- error: "Error registering with Facebook"
- });
- //this.modalRef.showAlert('Error registering with Facebook','',"Ops! It didn't work");
- this.registrationFailure(response);
- }
- responseSuccessGoogle(response) {
- console.log(response);
- }
- responseFailureGoogle(response) {
- this.setState({
- error: "Error registering with Google"
- });
- this.modalRef.showAlert('Error registering with Google', '', "Ops! It didn't work");
- }
- registrationSuccessfully(response) {
- var onSuccess = this.props.onSuccess || function () {};
- onSuccess(response);
- }
- registrationFailure(response) {
- var onError = this.props.onError || function () {};
- onError(response);
- }
- render() {
- return _jsx('div', {
- className: 'text-center',
- style: { padding: 10 }
- }, void 0, _ref, _jsx('div', {}, void 0, _jsx('div', {
- style: { marginTop: 12.5, marginBottom: 12.5, display: "inline-flex" }
- }, void 0, _jsx('div', {
- style: { marginRight: 20 }
- }, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_2_react_facebook_login___default.a, {
- appId: '622709767918813',
- autoLoad: false,
- fields: 'id,name,email,picture,cover,first_name,last_name,age_range,link,gender,locale,timezone,updated_time,verified',
- scope: 'public_profile,user_friends,user_about_me',
- icon: 'fa fa-facebook',
- textButton: '',
- callback: this.responseFacebook.bind(this),
- cssClass: 'btn btn-social-icon btn-facebook btn-lg'
- })), _jsx('div', {
- style: { marginRight: 20 }
- }, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_3_react_google_login___default.a, {
- clientId: '658977310896-knrl3gka66fldh83dao2rhgbblmd4un9.apps.googleusercontent.com',
- buttonText: '',
- autoLoad: false,
- className: 'btn btn-social-icon btn-google btn-lg',
- onSuccess: this.responseSuccessGoogle.bind(this),
- fetchBasicProfile: true
- }, void 0, _ref2)), _jsx('a', {
- className: 'btn btn-social-icon btn-twitter ',
- style: { "marginRight": 20 }
- }, void 0, _ref3)), this.state.error !== '' ? _jsx('div', {}, void 0, _jsx('div', {
- className: 'alert alert-danger alert-dismissable'
- }, void 0, _ref4, this.state.error)) : ''));
- }
- };
- function mapState(state) {
- return {
- authenticate: state.authenticate,
- localization: state.localization
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"])(mapState, mapDispatch)(OauthSocialNetworkComponent));
- /***/ }),
- /* 28 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export RegistrationForm */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_Link_Link__ = __webpack_require__(5);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_select__ = __webpack_require__(17);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_select__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_util_components_select_MyCountry_select_component__ = __webpack_require__(23);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__oauth_social_networks_form_oauth_social_networks_component__ = __webpack_require__(27);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__services_Communication_socket_Socket_service__ = __webpack_require__(10);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__services_REST_authentication_Auth_service__ = __webpack_require__(3);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub
- * (C) BIT TECHNOLOGIES
- */
- //import CountrySelect from "react-country-select";
- var _ref = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-user'
- }));
- var _ref2 = _jsx('br', {});
- var _ref3 = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-envelope'
- }));
- var _ref4 = _jsx('br', {});
- var _ref5 = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-font'
- }));
- var _ref6 = _jsx('br', {});
- var _ref7 = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-bold'
- }));
- var _ref8 = _jsx('br', {});
- var _ref9 = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-key'
- }));
- var _ref10 = _jsx('br', {});
- var _ref11 = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-key'
- }));
- var _ref12 = _jsx('br', {});
- var _ref13 = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-flag'
- }));
- var _ref14 = _jsx('br', {});
- var _ref15 = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-institution'
- }));
- var _ref16 = _jsx('br', {});
- var _ref17 = _jsx('strong', {}, void 0, ' Login ');
- var _ref18 = _jsx('i', {
- className: 'fa fa-sign-up'
- });
- let RegistrationForm = class RegistrationForm extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- this.state = {
- userName: '',
- emailAddress: '',
- password: '',
- retypePassword: '',
- city: null,
- country: null,
- countryCode: null,
- timeZone: '',
- ip: '',
- latitude: null, longitude: null,
- userNameValidationStatus: [null, ''],
- emailAddressValidationStatus: [null, ''],
- firstNameValidationStatus: [null, ''],
- lastNameValidationStatus: [null, ''],
- passwordValidationStatus: [null, ''],
- retypePasswordValidationStatus: [null, ''],
- countryValidationStatus: [null, ''],
- cityValidationStatus: [null, '']
- };
- }
- componentDidMount() {
- requestAnimationFrame(() => {//Make sure it is on client only
- //console.log("#################### REGISTER ",AuthService);
- });
- }
- back(e) {
- e.preventDefault();
- e.stopPropagation();
- //this.props.router.goBack();
- }
- handleCheckRegister(e) {
- e.preventDefault();e.stopPropagation();
- console.log(this.state.userName, this.state.emailAddress, this.state.firstName, this.state.lastName, this.state.password, this.state.retypePassword, this.state.latitude, this.state.longitude, this.state.city, this.state.country, this.state.ip);
- let userNameValidationStatus = [null, ''],
- emailAddressValidationStatus = [null, ''],
- firstNameValidationStatus = [null, ''],
- lastNameValidationStatus = [null, ''],
- passwordValidationStatus = [null, ''],
- retypePasswordValidationStatus = [null, ''],
- countryValidationStatus = [null, ''],
- cityValidationStatus = [null, ''];
- let bValidationError = false;
- if (this.state.password.length < 4) {
- passwordValidationStatus = ["error", "To weak. At least 4 characters"];
- bValidationError = true;
- }
- if (this.state.password !== this.state.retypePassword && this.state.password !== '') {
- retypePasswordValidationStatus = ["error", "The passwords don't match"];
- bValidationError = true;
- }
- this.setState({
- userNameValidationStatus: userNameValidationStatus, emailAddressValidationStatus: emailAddressValidationStatus,
- firstNameValidationStatus: firstNameValidationStatus, lastNameValidationStatus: lastNameValidationStatus,
- passwordValidationStatus: passwordValidationStatus, retypePasswordValidationStatus: retypePasswordValidationStatus,
- countryValidationStatus: countryValidationStatus, cityValidationStatus: cityValidationStatus
- });
- console.log(bValidationError);
- if (!bValidationError) __WEBPACK_IMPORTED_MODULE_7__services_REST_authentication_Auth_service__["a" /* default */].registerAsync(this.state.userName, this.state.emailAddress, this.state.password, this.state.firstName, this.state.lastName, this.state.countryCode || this.props.localization.countryCode, '', this.state.city || this.props.localization.city, this.state.latitude || this.props.localization.latitude, this.state.longitude || this.props.localization.longtitude, this.state.timeZone).then(res => {
- console.log(res);
- if (res.result === true) {
- this.registrationSuccessfully(res);
- } else if (res.result === false) {
- if (typeof res.errors.username !== "undefined" && Object.keys(res.errors.username).length !== 0) this.setState({ userNameValidationStatus: ["error", this.convertValidationErrorToString(res.errors.username[0])] });
- if (typeof res.errors.email !== "undefined" && Object.keys(res.errors.email).length !== 0) this.setState({ emailAddressValidationStatus: ["error", this.convertValidationErrorToString(res.errors.email[0])] });
- if (typeof res.errors.firstName !== "undefined" && Object.keys(res.errors.firstName).length !== 0) this.setState({ firstNameValidationStatus: ["error", this.convertValidationErrorToString(res.errors.firstName[0])] });
- if (typeof res.errors.lastName !== "undefined" && Object.keys(res.errors.lastName).length !== 0) this.setState({ lastNameValidationStatus: ["error", this.convertValidationErrorToString(res.errors.lastName[0])] });
- if (typeof res.errors.country !== "undefined" && Object.keys(res.errors.country).length !== 0) this.setState({ countryValidationStatus: ["error", this.convertValidationErrorToString(res.errors.country[0])] });
- if (typeof res.errors.city !== "undefined" && Object.keys(res.errors.city).length !== 0) this.setState({ cityValidationStatus: ["error", this.convertValidationErrorToString(res.errors.city[0])] });
- this.registrationFailure(res);
- }
- });
- }
- handleUserNameChange(e) {
- this.setState({
- userName: e.target.value,
- userNameValidationStatus: [null, '']
- });
- }
- handleEmailAddressChange(e) {
- this.setState({
- emailAddress: e.target.value,
- emailAddressValidationStatus: [null, '']
- });
- }
- handleFirstNameChange(e) {
- this.setState({
- firstName: e.target.value,
- firstNameValidationStatus: [null, '']
- });
- }
- handleLastNameChange(e) {
- this.setState({
- lastName: e.target.value,
- lastNameValidationStatus: [null, '']
- });
- }
- handlePasswordChange(e) {
- this.setState({
- password: e.target.value,
- passwordValidationStatus: [null, '']
- });
- }
- handleRetypePasswordChange(e) {
- this.setState({
- retypePassword: e.target.value,
- retypePasswordValidationStatus: [null, '']
- });
- }
- handleCountrySelect(val) {
- this.setState({
- country: val.label,
- countryCode: val.value,
- countryValidationStatus: [null, '']
- });
- console.log("values selected are:", val);
- }
- handleCityChange(e) {
- this.setState({
- city: e.target.value,
- cityValidationStatus: null, cityValidationStatusText: ''
- });
- }
- registrationSuccessfully(res) {
- var onSuccess = this.props.onSuccess || function () {};
- onSuccess(res);
- }
- registrationFailure(res) {
- var onError = this.props.onError || function () {};
- onError(res);
- }
- convertValidationErrorToString(error) {
- if (error === "notUnique") return "Already exists in the Database";else if (error === "notEmpty") return "It's empty";else if (error === "validateUsername") return " Invalid username";
- return error;
- }
- //https://www.w3schools.com/bootstrap/bootstrap_forms_inputs2.asp DOC
- showInputStatus(status) {
- return status[0] === 'error' ? "has-error has-feedback" : status[0] === 'success' ? "has-success has-feedback" : '';
- }
- showInputFeedback(status) {
- return status[0] === 'error' ? "fa fa-remove form-control-feedback" : status[0] === 'success' ? "fa fa-check form-control-feedback" : '';
- }
- render() {
- var onSuccess = this.props.onSuccess || function () {};
- var onSwitch = this.props.onSwitch || function () {};
- return _jsx('div', {}, void 0, _jsx('div', {
- style: { padding: 25, paddingTop: 0, paddingBottom: 0, margin: 'auto', marginBottom: 25, marginTop: 5 }
- }, void 0, _jsx('form', {
- onSubmit: this.handleCheckRegister.bind(this),
- autoComplete: 'on'
- }, void 0, _jsx('div', {
- className: 'row'
- }, void 0, _jsx('div', {
- className: 'col-sm-6'
- }, void 0, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.userNameValidationStatus)
- }, void 0, _ref, _jsx('input', {
- autoFocus: true,
- type: 'text',
- className: 'form-control input-lg',
- placeholder: 'username',
- name: 'username',
- value: this.state.userName,
- onChange: this.handleUserNameChange.bind(this)
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.userNameValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.userNameValidationStatus[1]), ' ', _ref2), _jsx('div', {
- className: 'col-sm-6'
- }, void 0, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.emailAddressValidationStatus)
- }, void 0, _ref3, _jsx('input', {
- type: 'text',
- className: 'form-control input-lg',
- placeholder: 'E-mail',
- name: 'email',
- value: this.state.emailAddress,
- onChange: this.handleEmailAddressChange.bind(this)
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.emailAddressValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.emailAddressValidationStatus[1]), ' ', _ref4)), _jsx('div', {
- className: 'row'
- }, void 0, _jsx('div', {
- className: 'col-sm-6'
- }, void 0, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.firstNameValidationStatus)
- }, void 0, _ref5, _jsx('input', {
- type: 'text',
- className: 'form-control input-lg',
- placeholder: 'First Name',
- name: 'firstname',
- value: this.state.firstName,
- onChange: this.handleFirstNameChange.bind(this)
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.firstNameValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.firstNameValidationStatus[1]), ' ', _ref6), _jsx('div', {
- className: 'col-sm-6'
- }, void 0, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.lastNameValidationStatus)
- }, void 0, _ref7, _jsx('input', {
- type: 'text',
- className: 'form-control input-lg',
- placeholder: 'Last Name',
- name: 'lastname',
- value: this.state.lastName,
- onChange: this.handleLastNameChange.bind(this)
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.lastNameValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.lastNameValidationStatus[1]), ' ', _ref8)), _jsx('div', {
- className: 'row'
- }, void 0, _jsx('div', {
- className: 'col-sm-6'
- }, void 0, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.passwordValidationStatus)
- }, void 0, _ref9, _jsx('input', {
- type: 'password',
- className: 'form-control input-lg',
- placeholder: 'password',
- name: 'password',
- value: this.state.password,
- onChange: this.handlePasswordChange.bind(this)
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.passwordValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.passwordValidationStatus[1]), ' ', _ref10), _jsx('div', {
- className: 'col-sm-6'
- }, void 0, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.retypePasswordValidationStatus)
- }, void 0, _ref11, _jsx('input', {
- type: 'password',
- className: 'form-control input-lg',
- placeholder: 'password',
- value: this.state.retypePassword,
- onChange: this.handleRetypePasswordChange.bind(this)
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.retypePasswordValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.retypePasswordValidationStatus[1]), ' ', _ref12)), _jsx('div', {
- className: 'row'
- }, void 0, _jsx('div', {
- className: 'col-sm-6'
- }, void 0, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.countryValidationStatus)
- }, void 0, _ref13, _jsx(__WEBPACK_IMPORTED_MODULE_4__components_util_components_select_MyCountry_select_component__["a" /* default */], {
- initialCountry: this.props.localization.countryCode || '',
- onSelect: this.handleCountrySelect.bind(this)
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.countryValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.countryValidationStatus[1]), ' ', _ref14), _jsx('div', {
- className: 'col-sm-6',
- style: { paddingBottom: 5 }
- }, void 0, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.cityValidationStatus)
- }, void 0, _ref15, _jsx('input', {
- type: 'text',
- className: 'form-control input-lg',
- placeholder: 'city',
- value: this.props.localization.city || this.state.city,
- onChange: this.handleCityChange.bind(this)
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.cityValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.cityValidationStatus[1]), ' ', _ref16)), _jsx('div', {
- className: 'form-group'
- }, void 0, _jsx('div', {
- className: 'row'
- }, void 0, _jsx('div', {
- className: 'col-xs-6',
- style: { paddingTop: 5 }
- }, void 0, _jsx('div', {}, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_2__components_Link_Link__["a" /* default */], {
- to: 'login',
- onClick: onSwitch.bind(this)
- }, void 0, ' ', _ref17), 'to SkyHub')), _jsx('div', {
- className: 'col-xs-6 text-right'
- }, void 0, _jsx('button', {
- type: 'button',
- className: 'btn btn-success',
- onClick: this.handleCheckRegister.bind(this)
- }, void 0, _ref18, ' Register')))))), _jsx(__WEBPACK_IMPORTED_MODULE_5__oauth_social_networks_form_oauth_social_networks_component__["a" /* default */], {
- onSuccess: this.registrationSuccessfully.bind(this),
- onError: this.registrationFailure.bind(this)
- }));
- }
- };
- function mapState(state) {
- return {
- localization: state.localization
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"])(mapState, mapDispatch)(RegistrationForm));
- /***/ }),
- /* 29 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return User; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__User_properties_js__ = __webpack_require__(76);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__User_properties_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__User_properties_js__);
- /* eslint-disable import/prefer-default-export */
- //var UserProperties = require ('./User.properties.ts');
- let User = class User {
- constructor(data = {}) {
- this.firstName = data.firstName || '';
- this.lastName = data.lastName || '';
- this.email = data.email || '';
- this.username = data.username || '';
- this.loggedIn = data.loggedIn || false;
- this.preferredLang = data.preferredLang || data.language || null;
- this.connected = data.connected || false;
- this.profilePic = data.profilePic || '';
- this.coverPic = data.coverPic || '';
- this.country = data.country || '';
- this.city = data.city || '';
- this.dtCreation = data.dtCreation || Date.now();
- this.dtLastActivity = data.dtLastActivity || Date.now();
- this.gender = data.gender || '';
- this.role = data.role || __WEBPACK_IMPORTED_MODULE_0__User_properties_js__["UserRolesEnum"].NOT_REGISTERED;
- this.timeZone = data.timeZone || 0;
- this.shortBio = data.shortBio || '';
- this.longitude = data.longitude || -666;
- this.latitude = data.latitude || -666;
- console.log('User assigned ', data, data.firstName, data.userName);
- }
- getName() {
- return this.firstName + ' ' + this.lastName;
- }
- isLoggedIn() {
- return this.loggedIn || false;
- }
- getProfilePic() {
- return this.profilePic;
- }
- };
- /***/ }),
- /* 30 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CookiesService; });
- /*
- TUTORIAL BASED on http://stackoverflow.com/questions/34298133/angular-2-cookies
- */
- let CookiesService = class CookiesService {
- static getSessionCookie() {
- return this.readCookie2('sessionId');
- }
- static readCookie(cookieName) {
- var theCookie = " " + window.document.cookie;
- var ind = theCookie.indexOf(" " + cookieName + "=");
- if (ind == -1) ind = theCookie.indexOf(";" + cookieName + "=");
- if (ind == -1 || cookieName == "") return "";
- var ind1 = theCookie.indexOf(";", ind + 1);
- if (ind1 == -1) ind1 = theCookie.length;
- return theCookie.substring(ind + cookieName.length + 2, ind1);
- }
- static readCookie2(a) {
- var b = window.document.cookie.match('(^|;)\\s*' + a + '\\s*=\\s*([^;]+)');
- return b ? b.pop() : '';
- }
- static deleteCookie(name) {
- console.log('deleting cookie');
- this.setCookie(name, '', -1);
- }
- static setCookie(name, value, days) {
- var expires = "";
- if (days) {
- var date = new Date();
- date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
- expires = "; expires=" + date.toUTCString();
- }
- document.cookie = name + "=" + value + expires + "; path=/";
- }
- };
- /***/ }),
- /* 31 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__modules_forums_forums_models_Forum_model__ = __webpack_require__(6);
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/8/2017.
- * (C) BIT TECHNOLOGIES
- */
- let ContentObjectServiceClass = class ContentObjectServiceClass {
- /*
- Loading forum/topic/reply from the Id
- sObjectId contains inside also the type of the object example: 1_frm_14958198943447852
- */
- extractDataFromIds(objectId) {
- if (typeof objectId === "object" && objectId !== null) objectId = objectId.id;
- if (typeof objectId !== "string") return null;
- //console.log("extract data from Ids",objectId);
- var iDelimitatorPosLeft = objectId.indexOf("_");
- var iDelimitatorPosRight = objectId.indexOf("_", iDelimitatorPosLeft + 1);
- var iRedisDB = objectId.substring(0, iDelimitatorPosLeft);
- var sObjectType = objectId.substring(iDelimitatorPosLeft + 1, iDelimitatorPosRight);
- //console.log("finding OBJECT ID: ", iRedisDB, " :::: ", sObjectType, " :::: ", sObjectId);
- if (iRedisDB !== 0 && sObjectType !== '') return { redisDB: iRedisDB, objectType: sObjectType };else return null;
- }
- extractObjectTypeFromId(object) {
- let extractedIdData = this.extractDataFromIds(object);
- if (extractedIdData === null) return 'none';
- switch (extractedIdData.objectType || '') {
- case 'frm':
- return 'forum';
- case 'us':
- return 'user';
- case 'top':
- return 'topic';
- }
- return 'none';
- }
- createObject(object) {
- //console.log(this.extractObjectTypeFromId(object));
- switch (this.extractObjectTypeFromId(object)) {
- case 'forum':
- return new __WEBPACK_IMPORTED_MODULE_0__modules_forums_forums_models_Forum_model__["a" /* default */](object);
- break;
- /*case 'topic':
- return New Fo*/
- }
- return null;
- }
- };
- var ContentObjectService = new ContentObjectServiceClass();
- /* harmony default export */ __webpack_exports__["a"] = (ContentObjectService);
- // export function ContentObjectService(){
- // return ContentObjectServiceInstance;
- // };
- /***/ }),
- /* 32 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* eslint-disable import/prefer-default-export */
- const SET_RUNTIME_VARIABLE = 'SET_RUNTIME_VARIABLE';
- /* harmony export (immutable) */ __webpack_exports__["a"] = SET_RUNTIME_VARIABLE;
- const SET_NEW_LOCALIZATION = 'SET_NEW_LOCALIZATION';
- /* unused harmony export SET_NEW_LOCALIZATION */
- const SET_NEW_ROUTER_OBJECT_ARGUMENT = 'SET_NEW_ROUTER_OBJECT_ARGUMENT';
- /* unused harmony export SET_NEW_ROUTER_OBJECT_ARGUMENT */
- const SET_NEW_ROUTER_TOPIC_ARGUMENT = 'SET_NEW_ROUTER_TOPIC_ARGUMENT';
- /* unused harmony export SET_NEW_ROUTER_TOPIC_ARGUMENT */
- const SET_NEW_SOCKET_STATUS = 'SET_NEW_SOCKET_STATUS';
- /* unused harmony export SET_NEW_SOCKET_STATUS */
- const SET_NEW_USER_AUTHENTICATED = 'SET_NEW_USER_AUTHENTICATED';
- /* unused harmony export SET_NEW_USER_AUTHENTICATED */
- const SET_LOGOUT_USER = 'SET_LOGOUT_USER';
- /* unused harmony export SET_LOGOUT_USER */
- /***/ }),
- /* 33 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = setAuthenticationModalElement;
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/5/2017.
- * (C) BIT TECHNOLOGIES
- */
- /* eslint-disable import/prefer-default-export */
- function setAuthenticationModalElement(refAuthenticationModal) {
- return {
- type: 'SET_AUTHENTICATION_MODAL_ELEMENT',
- payload: {
- refAuthenticationModal: refAuthenticationModal
- }
- };
- }
- /***/ }),
- /* 34 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["b"] = socketConnectingError;
- /* harmony export (immutable) */ __webpack_exports__["c"] = socketDisconnected;
- /* harmony export (immutable) */ __webpack_exports__["a"] = socketConnectionSuccessfully;
- /* harmony export (immutable) */ __webpack_exports__["d"] = socketHideSocketStatusMessage;
- /* eslint-disable import/prefer-default-export */
- function socketConnectingError() {
- return {
- type: "NEW_SOCKET_STATUS",
- payload: {
- connectionOffline: true,
- showOnlineStatus: false,
- message: 'Error Connecting to the SkyHub Server. Check your internet connection or contact us at contact@skyhub.me',
- icon: 'fa fa-warning'
- }
- };
- }
- function socketDisconnected() {
- return {
- type: "NEW_SOCKET_STATUS",
- payload: {
- connectionOffline: true,
- showOnlineStatus: false,
- message: 'Connection Problem',
- icon: 'fa fa-warning'
- }
- };
- }
- function socketConnectionSuccessfully() {
- return {
- type: "NEW_SOCKET_STATUS",
- payload: {
- connectionOffline: false,
- showOnlineStatus: true,
- message: 'Connection established to SkyHub',
- icon: 'fa fa-check'
- }
- };
- }
- function socketHideSocketStatusMessage() {
- return {
- type: "NEW_SOCKET_STATUS",
- payload: {
- connectionOffline: false,
- showOnlineStatus: false,
- message: '',
- icon: ''
- }
- };
- }
- /***/ }),
- /* 35 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = defaultContentState;
- /* harmony export (immutable) */ __webpack_exports__["b"] = ContentStateReducer;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__client_modules_forums_forums_models_Forum_model__ = __webpack_require__(6);
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/13/2017.
- * (C) BIT TECHNOLOGIES
- */
- function defaultContentState(initial) {
- return {
- routerObject: initial.routerObject || {
- type: 'none', //'none','forum','topic','user',
- object: null,
- notFound: false,
- pageURL: ''
- },
- contentObjects: initial.contentObjects || {
- pageIndex: 1,
- pageCount: 8,
- hasNext: true,
- objects: []
- },
- contentForums: initial.contentForums || {
- pageIndex: 1,
- pageCount: 8,
- hasNext: true,
- objects: []
- },
- contentReplies: initial.contentReplies || {
- pageIndex: 1,
- pageCount: 8,
- hasNext: true,
- objects: []
- }
- };
- };
- function ContentStateReducer(state = defaultContentState, action) {
- switch (action.type) {
- case 'SET_NEW_CONTENT_STATE_ROUTER_OBJECT':
- console.log("!!!!!!!!!!!!!!! SET_NEW_CONTENT_STATE_ROUTER_OBJECT", action);
- return _extends({}, state, {
- routerObject: _extends({}, state.routerObject, {
- type: action.payload.routerObject.type,
- object: action.payload.routerObject.object,
- notFound: action.payload.routerObject.notFound,
- pageURL: action.payload.routerObject.pageURL
- }),
- ['contentObjects']: action.payload.contentObjects,
- ['contentForums']: action.payload.contentForums,
- ['contentReplies']: action.payload.contentReplies
- });
- case 'ADD_CONTENT_OBJECTS':
- //console.log("NEW_ROUTER_OBJECT_ARGUMENT_ADD_TO_CONTENT_ARRAY",action);
- return _extends({}, state, {
- contentObjects: _extends({}, state.contentObjects, {
- objects: Array.concat(...state.contentObjects.objects, action.payload)
- })
- });
- case 'ADD_CONTENT_FORUMS':
- return _extends({}, state, {
- contentForums: _extends({}, state.contentForums, {
- objects: Array.concat(...state.contentForums.objects, action.payload)
- })
- });
- case 'ADD_CONTENT_REPLIES':
- return _extends({}, state, {
- contentReplies: _extends({}, state.contentReplies, {
- objects: Array.concat(...state.contentReplies.objects, action.payload)
- })
- });
- default:
- return state;
- }
- };
- /***/ }),
- /* 36 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = defaultLocalization;
- /* harmony export (immutable) */ __webpack_exports__["b"] = LocalizationReducer;
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 5/26/2017.
- * (C) BIT TECHNOLOGIES
- */
- /* eslint-disable import/prefer-default-export */
- function defaultLocalization(initial) {
- return {
- country: initial.country || '',
- countryCode: initial.countryCode || '',
- city: initial.city || '',
- latitude: initial.latitude || '',
- longitude: initial.longtitude || '',
- IP: initial.IP || '',
- timeZone: initial.timeZone || '',
- clientIP: initial.clientIP || '',
- request: initial.request || {
- sent: false,
- done: false,
- error: false
- }
- };
- };
- function LocalizationReducer(state = defaultLocalization, action) {
- switch (action.type) {
- case 'NEW_LOCALIZATION_IP':
- return _extends({}, state, {
- ['clientIP']: action.payload.clientIP
- });
- case 'NEW_LOCALIZATION_REQUEST_SENT':
- return _extends({}, state, {
- ['request.sent']: action.payload.request.sent
- });
- case 'NEW_LOCALIZATION':
- return _extends({}, state, {
- ['country']: action.payload.country,
- ['countryCode']: action.payload.countryCode,
- ['city']: action.payload.city,
- ['latitude']: action.payload.latitude,
- ['longtitude']: action.payload.longitude,
- ['ip']: action.payload.ip,
- ['timeZone']: action.payload.timeZone,
- ['request']: action.payload.request
- });
- case 'NEW_LOCALIZATION_REQUEST_ERROR':
- return _extends({}, state, {
- ['request.error']: true
- });
- default:
- return state;
- }
- }
- /***/ }),
- /* 37 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = defaultRouterState;
- /* harmony export (immutable) */ __webpack_exports__["b"] = RouterStateReducer;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__client_modules_forums_forums_models_Forum_model__ = __webpack_require__(6);
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/5/2017.
- * (C) BIT TECHNOLOGIES
- */
- function defaultRouterState(initial) {
- return {
- refAuthenticationModal: initial.refAuthenticationModal || null
- };
- };
- function RouterStateReducer(state = defaultRouterState, action) {
- switch (action.type) {
- case 'SET_AUTHENTICATION_MODAL_ELEMENT':
- return _extends({}, state, {
- ['refAuthenticationModal']: action.payload.refAuthenticationModal
- });
- default:
- return state;
- }
- };
- /***/ }),
- /* 38 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["b"] = SocketStatusReducer;
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- /* eslint-disable import/prefer-default-export */
- const defaultSocketStatus = {
- connectionOffline: false,
- message: '',
- icon: '',
- showOnlineStatus: false
- };
- /* harmony export (immutable) */ __webpack_exports__["a"] = defaultSocketStatus;
- function SocketStatusReducer(state = defaultSocketStatus, action) {
- switch (action.type) {
- case 'NEW_SOCKET_STATUS':
- return _extends({}, state, {
- ['connectionOffline']: action.payload.connectionOffline,
- ['message']: action.payload.message,
- ['icon']: action.payload.icon,
- ['showOnlineStatus']: action.payload.showOnlineStatus
- });
- default:
- return state;
- }
- };
- /***/ }),
- /* 39 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = defaultUserState;
- /* harmony export (immutable) */ __webpack_exports__["b"] = UserReducer;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__client_modules_users_models_User_model__ = __webpack_require__(29);
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- /* eslint-disable import/prefer-default-export */
- function defaultUserState(initial) {
- return {
- user: new __WEBPACK_IMPORTED_MODULE_0__client_modules_users_models_User_model__["a" /* default */](initial.user || {}),
- error: initial.error || ''
- };
- };
- function UserReducer(state = defaultUserState, action) {
- switch (action.type) {
- case 'NEW_USER_AUTHENTICATED':
- var newState = _extends({}, state, {
- ['user']: new __WEBPACK_IMPORTED_MODULE_0__client_modules_users_models_User_model__["a" /* default */](action.payload.user),
- ['error']: action.payload.error
- });
- if (typeof document !== "undefined" && newState.user.isLoggedIn()) document.body.classList.remove("top-navigation");
- // document.body.addClass("top-navigation");
- return newState;
- case 'LOGOUT_USER':
- var newState = _extends({}, state, {
- ['user']: defaultUserState({}).user,
- ['error']: defaultUserState({}).error
- });
- if (typeof document !== "undefined" && !newState.user.isLoggedIn()) document.body.classList.add("top-navigation");
- return newState;
- default:
- return state;
- }
- };
- /***/ }),
- /* 40 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__actions_TestRedux_actions__ = __webpack_require__(98);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/9/2017.
- * (C) BIT TECHNOLOGIES
- */
- /* eslint-disable import/prefer-default-export */
- /*@connect(
- state => (console.log('STATE @connect',state),{
- testReduxState: state.testReduxState.value1,
- runtime: state.testReduxState.runtime,
- },
- dispatch => ({dispatch})
- ))*/
- var _ref = _jsx('div', {}, void 0, 'NASOL');
- var _ref2 = _jsx('br', {});
- var _ref3 = _jsx('br', {});
- var _ref4 = _jsx('br', {});
- let TestRedux = class TestRedux extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- }
- button1Click(e) {
- //this.newTestReduxValue1(this.props.testReduxState.value1+1);
- console.log("button1 clicked");
- this.props.dispatch(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__actions_TestRedux_actions__["a" /* newTestReduxValue1 */])(this.props.testReduxState.value1 + 1));
- }
- button2Click(e) {
- //this.props.newTestReduxValue2(this.props.testReduxState.value2+5);
- console.log("button2 clicked");
- this.props.dispatch(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__actions_TestRedux_actions__["b" /* newTestReduxValue2 */])(this.props.testReduxState.value2 + 5));
- }
- renderStatus() {
- return _ref;
- }
- render() {
- console.log('---');console.log('---');console.log('---');console.log('---');
- console.log(this);
- return _jsx('div', {}, void 0, _jsx('button', {
- onClick: this.button1Click.bind(this)
- }, 'buttonRedux1', ' INC Val1 by 1'), _jsx('button', {
- onClick: this.button2Click.bind(this)
- }, 'buttonRedux2', ' INC Val2 by 5'), ' ', _ref2, this.props.testReduxState !== null ? this.renderStatus.bind(this) : 'KKKT', 'Val 1 ====', _jsx('b', {}, void 0, this.props.testReduxState.value1), ' ', _ref3, ' Val 2 ====', _jsx('b', {}, void 0, this.props.testReduxState.value2), ' ', _ref4);
- }
- };
- function mapState(state) {
- return {
- testReduxState: state.testReduxState
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"])(mapState, mapDispatch)(TestRedux));
- /***/ }),
- /* 41 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["b"] = testReduxReducer;
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/9/2017.
- * (C) BIT TECHNOLOGIES
- */
- const defaultTestReduxState = {
- value1: 0,
- value2: 0
- };
- /* harmony export (immutable) */ __webpack_exports__["a"] = defaultTestReduxState;
- function testReduxReducer(state = {}, action) {
- switch (action.type) {
- case 'NEW_TEST_REDUX_VALUE_1':
- return _extends({}, state, {
- ['value1']: action.payload.value
- });
- case 'NEW_TEST_REDUX_VALUE_2':
- return _extends({}, state, {
- ['value2']: action.payload.value
- });
- default:
- return state;
- }
- }
- /***/ }),
- /* 42 */
- /***/ (function(module, exports, __webpack_require__) {
- var content = __webpack_require__(128);
- var insertCss = __webpack_require__(9);
- if (typeof content === 'string') {
- content = [[module.i, content, '']];
- }
- module.exports = content.locals || {};
- module.exports._getContent = function() { return content; };
- module.exports._getCss = function() { return content.toString(); };
- module.exports._insertCss = function(options) { return insertCss(content, options) };
- // Hot Module Replacement
- // https://webpack.github.io/docs/hot-module-replacement
- // Only activated in browser context
- if (false) {
- var removeCss = function() {};
- module.hot.accept("!!../../../node_modules/css-loader/index.js??ref--1-1!../../../node_modules/postcss-loader/lib/index.js??ref--1-2!./ErrorPage.css", function() {
- content = require("!!../../../node_modules/css-loader/index.js??ref--1-1!../../../node_modules/postcss-loader/lib/index.js??ref--1-2!./ErrorPage.css");
- if (typeof content === 'string') {
- content = [[module.id, content, '']];
- }
- removeCss = insertCss(content, { replace: true });
- });
- module.hot.dispose(function() { removeCss(); });
- }
- /***/ }),
- /* 43 */
- /***/ (function(module, exports) {
- module.exports = require("axios");
- /***/ }),
- /* 44 */
- /***/ (function(module, exports) {
- module.exports = require("classnames");
- /***/ }),
- /* 45 */
- /***/ (function(module, exports) {
- module.exports = require("isomorphic-fetch");
- /***/ }),
- /* 46 */
- /***/ (function(module, exports) {
- module.exports = require("redux");
- /***/ }),
- /* 47 */
- /***/ (function(module, exports) {
- module.exports = require("rxjs/Observable");
- /***/ }),
- /* 48 */
- /***/ (function(module, exports) {
- module.exports = require("socket.io-client");
- /***/ }),
- /* 49 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path__ = __webpack_require__(151);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_express__ = __webpack_require__(144);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_express___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_express__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_cookie_parser__ = __webpack_require__(141);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_cookie_parser___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_cookie_parser__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_body_parser__ = __webpack_require__(140);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_body_parser___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_body_parser__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_express_graphql__ = __webpack_require__(145);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_express_graphql___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_express_graphql__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_dom_server__ = __webpack_require__(154);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_dom_server___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_dom_server__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_pretty_error__ = __webpack_require__(152);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_pretty_error___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_pretty_error__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__client_App__ = __webpack_require__(51);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__client_Html__ = __webpack_require__(52);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__routes_error_ErrorPage__ = __webpack_require__(105);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__routes_error_ErrorPage_css__ = __webpack_require__(42);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__routes_error_ErrorPage_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11__routes_error_ErrorPage_css__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__createFetch__ = __webpack_require__(77);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__router__ = __webpack_require__(99);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__data_models__ = __webpack_require__(82);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__data_schema__ = __webpack_require__(85);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__assets_json__ = __webpack_require__(137);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__assets_json___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_16__assets_json__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__my_redux_store_configureStore__ = __webpack_require__(95);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__config__ = __webpack_require__(15);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__config___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_18__config__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__my_redux_actions_Runtime_actions__ = __webpack_require__(90);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__my_redux_actions_UserAuthenticated_actions__ = __webpack_require__(21);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__my_redux_actions_Localization_actions__ = __webpack_require__(12);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__client_services_Communication_http_Http_service__ = __webpack_require__(19);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__utils_socket_worker_SocketWorker__ = __webpack_require__(123);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__utils_passport_PassportDefined_js__ = __webpack_require__(122);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- // eslint-disable-line import/no-unresolved
- var app = __WEBPACK_IMPORTED_MODULE_1_express___default()();
- //SocketWorker.startService();
- // let SocketWorkerFile = require('./utils/socket-worker/SocketWorker');
- // let SocketWorker = SocketWorkerFile.default.SocketWorker;
- // let SocketClientFile = require('./client/services/Communication/socket/socket.service');
- // let SocketClient = SocketClientFile.default.SocketService;
- // SocketClient.startService(null);
- //
- // Tell any CSS tooling (such as Material UI) to use all vendor prefixes if the
- // user agent is not known.
- // -----------------------------------------------------------------------------
- global.navigator = global.navigator || {};
- global.navigator.userAgent = global.navigator.userAgent || 'all';
- //
- // Register Node.js middleware
- // -----------------------------------------------------------------------------
- app.use(__WEBPACK_IMPORTED_MODULE_1_express___default.a.static(__WEBPACK_IMPORTED_MODULE_0_path___default.a.join(__dirname, 'public')));
- app.use(__WEBPACK_IMPORTED_MODULE_2_cookie_parser___default()());
- app.use(__WEBPACK_IMPORTED_MODULE_3_body_parser___default.a.urlencoded({ extended: true }));
- app.use(__WEBPACK_IMPORTED_MODULE_3_body_parser___default.a.json());
- __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_24__utils_passport_PassportDefined_js__["a" /* initializePassport */])(app);
- //
- // Register API middleware
- // -----------------------------------------------------------------------------
- app.use('/graphql', __WEBPACK_IMPORTED_MODULE_4_express_graphql___default()(req => ({
- schema: __WEBPACK_IMPORTED_MODULE_15__data_schema__["a" /* default */],
- graphiql: false,
- rootValue: { request: req },
- pretty: false
- })));
- //
- // Register server-side rendering middleware
- // -----------------------------------------------------------------------------
- app.get('*', (() => {
- var _ref = _asyncToGenerator(function* (req, res, next) {
- try {
- console.log("HELLO WORLD");
- const css = new Set();
- const fetch = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__createFetch__["a" /* default */])({
- baseUrl: __WEBPACK_IMPORTED_MODULE_18__config___default.a.api.serverUrl,
- cookie: req.headers.cookie
- });
- const initialState = {
- user: req.user || null
- // userAuthenticated : defaultUserState, //Current User Authenticated
- // socketStatus : defaultSocketStatus, //Socket Status
- // localization : defaultLocalization, //Location
- // routerState : defaultRouterState, //Router Arguments
- // testReduxState : defaultTestReduxState,
- };
- const store = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_17__my_redux_store_configureStore__["a" /* default */])(initialState, {
- fetch
- // I should not use `history` on server.. but how I do redirection? follow universal-router
- });
- store.dispatch(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_19__my_redux_actions_Runtime_actions__["a" /* setRuntimeVariable */])({
- name: 'initialNow',
- value: Date.now()
- }));
- // Global (context) variables that can be easily accessed from any React component
- // https://facebook.github.io/react/docs/context.html
- const context = {
- // Enables critical path CSS rendering
- // https://github.com/kriasoft/isomorphic-style-loader
- insertCss: function (...styles) {
- // eslint-disable-next-line no-underscore-dangle
- styles.forEach(function (style) {
- return css.add(style._getCss());
- });
- },
- fetch,
- // You can access redux through react-redux connect
- store,
- storeSubscription: null
- };
- if (req.path.indexOf("res/") === 1) return show404(app, req.path, res);
- //checking the cookie user
- if (req.headers.cookie) {
- let cookieAnswer = yield __WEBPACK_IMPORTED_MODULE_22__client_services_Communication_http_Http_service__["a" /* default */].checkAuthCookie(req.headers.cookie);
- //console.log("COOOKIE ANSWER", cookieAnswer);
- //we have a registered user already in the cookie
- if ((cookieAnswer.result || false) === true) {
- store.dispatch(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_20__my_redux_actions_UserAuthenticated_actions__["a" /* newUserAuthenticated */])(cookieAnswer.user));
- }
- }
- const route = yield __WEBPACK_IMPORTED_MODULE_13__router__["a" /* default */].resolve(_extends({}, context, {
- path: req.path,
- query: req.query
- }));
- if (route.status === 404) return show404(app, req.path, res);
- console.log("route:: ", req.path);
- console.log("cookie:: ", req.headers.cookie);
- if (route.redirect) {
- res.redirect(route.status || 302, route.redirect);
- return;
- }
- store.dispatch(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_21__my_redux_actions_Localization_actions__["a" /* extractIP */])(req));
- // var sleep = require('sleep'); sleep.sleep(5); // sleep for ten seconds
- const data = _extends({}, route);
- data.children = __WEBPACK_IMPORTED_MODULE_6_react_dom_server___default.a.renderToString(_jsx(__WEBPACK_IMPORTED_MODULE_8__client_App__["a" /* default */], {
- context: context,
- store: store
- }, void 0, route.component));
- data.styles = [{ id: 'css', cssText: [...css].join('') }];
- data.scripts = [__WEBPACK_IMPORTED_MODULE_16__assets_json___default.a.vendor.js, __WEBPACK_IMPORTED_MODULE_16__assets_json___default.a.client.js];
- if (__WEBPACK_IMPORTED_MODULE_16__assets_json___default.a[route.chunk]) {
- data.scripts.push(__WEBPACK_IMPORTED_MODULE_16__assets_json___default.a[route.chunk].js);
- }
- data.app = {
- apiUrl: __WEBPACK_IMPORTED_MODULE_18__config___default.a.api.clientUrl,
- state: context.store.getState()
- };
- const html = __WEBPACK_IMPORTED_MODULE_6_react_dom_server___default.a.renderToStaticMarkup(__WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__client_Html__["a" /* default */], data));
- res.status(route.status || 200);
- res.send(`<!doctype html>${html}`);
- } catch (err) {
- next(err);
- }
- });
- return function (_x, _x2, _x3) {
- return _ref.apply(this, arguments);
- };
- })());
- //
- // Error handling
- // -----------------------------------------------------------------------------
- const pe = new __WEBPACK_IMPORTED_MODULE_7_pretty_error___default.a();
- pe.skipNodeFiles();
- pe.skipPackage('express');
- app.use((err, req, res, next) => {
- // eslint-disable-line no-unused-vars
- console.error(pe.render(err));
- const html = __WEBPACK_IMPORTED_MODULE_6_react_dom_server___default.a.renderToStaticMarkup(_jsx(__WEBPACK_IMPORTED_MODULE_9__client_Html__["a" /* default */], {
- title: 'Internal Server Error',
- description: err.message,
- styles: [{ id: 'css', cssText: __WEBPACK_IMPORTED_MODULE_11__routes_error_ErrorPage_css___default.a._getCss() }]
- }, void 0, __WEBPACK_IMPORTED_MODULE_6_react_dom_server___default.a.renderToString(_jsx(__WEBPACK_IMPORTED_MODULE_10__routes_error_ErrorPage__["a" /* ErrorPageWithoutStyle */], {
- error: err
- }))));
- res.status(err.status || 500);
- res.send(`<!doctype html>${html}`);
- });
- //
- // Launch the server
- // -----------------------------------------------------------------------------
- __WEBPACK_IMPORTED_MODULE_14__data_models__["a" /* default */].sync().catch(err => console.error(err.stack)).then(() => {
- app.listen(__WEBPACK_IMPORTED_MODULE_18__config___default.a.port, () => {
- console.info(`The server is running at http://localhost:${__WEBPACK_IMPORTED_MODULE_18__config___default.a.port}/`);
- });
- });
- function show404(app, path, res) {
- let Error404 = __webpack_require__(54);
- Error404.show404(app, path, res);
- }
- /***/ }),
- /* 50 */
- /***/ (function(module, exports) {
- module.exports = require("babel-polyfill");
- /***/ }),
- /* 51 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__my_redux_actions_Localization_actions__ = __webpack_require__(12);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__services_Communication_socket_Socket_service__ = __webpack_require__(10);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__services_REST_authentication_Auth_service__ = __webpack_require__(3);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__services_REST_forums_forums_Forums_service__ = __webpack_require__(14);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__services_REST_forums_content_Content_service__ = __webpack_require__(20);
- var _class, _temp;
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- //Creating the Socket Service
- const ContextType = _extends({
- // Enables critical path CSS rendering
- // https://github.com/kriasoft/isomorphic-style-loader
- insertCss: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,
- // Universal HTTP client
- fetch: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,
- // Integrate Redux
- // http://redux.js.org/docs/basics/UsageWithReact.html
- SocketService: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
- AuthService: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
- }, __WEBPACK_IMPORTED_MODULE_2_react_redux__["Provider"].childContextTypes);
- /**
- * The top-level React component setting context (global) variables
- * that can be accessed from all the child components.
- *
- * https://facebook.github.io/react/docs/context.html
- *
- * Usage example:
- *
- * const context = {
- * history: createBrowserHistory(),
- * store: createStore(),
- * };
- *
- * ReactDOM.render(
- * <App context={context}>
- * <Layout>
- * <LandingPage />
- * </Layout>
- * </App>,
- * container,
- * );
- */
- let App = (_temp = _class = class App extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.PureComponent {
- getChildContext() {
- return _extends({}, this.props.context, {
- SocketService: __WEBPACK_IMPORTED_MODULE_4__services_Communication_socket_Socket_service__["a" /* default */],
- AuthService: __WEBPACK_IMPORTED_MODULE_5__services_REST_authentication_Auth_service__["a" /* default */]
- });
- }
- constructor(props) {
- super(props);
- this.bInitialized = false;
- this.AuthService = null;
- }
- initializeClientApp() {
- if (this.bInitialized) return;
- this.bInitialized = true;
- console.log("APP", this.props);
- //Async Localization in case I don't have anything there
- this.props.context.store.dispatch(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__my_redux_actions_Localization_actions__["b" /* startLocalizationFetchingAsync */])());
- //Creating the Socket Service
- __WEBPACK_IMPORTED_MODULE_4__services_Communication_socket_Socket_service__["a" /* default */].startService(this.props.context.store.dispatch);
- __WEBPACK_IMPORTED_MODULE_5__services_REST_authentication_Auth_service__["a" /* default */].startService(this.props.context.store.dispatch, this.props.context.store.getState().userAuthenticated);
- __WEBPACK_IMPORTED_MODULE_6__services_REST_forums_forums_Forums_service__["a" /* default */].startService(this.props.context.store.dispatch);
- __WEBPACK_IMPORTED_MODULE_7__services_REST_forums_content_Content_service__["a" /* default */].startService(this.props.context.store.dispatch, this.props.context.store.getState().routerState);
- }
- componentDidMount() {
- requestAnimationFrame(() => {
- //Make sure it is on client only
- this.setState({ appIsMounted: true });
- });
- }
- render() {
- if (false) {
- console.log("APP RENDERED FIRST");
- this.initializeClientApp();
- }
- // NOTE: If you need to add or modify header, footer etc. of the app,
- // please do that inside the Layout component.
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.only(this.props.children);
- }
- }, _class.childContextTypes = ContextType, _temp);
- /* harmony default export */ __webpack_exports__["a"] = (App);
- /***/ }),
- /* 52 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_serialize_javascript__ = __webpack_require__(158);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_serialize_javascript___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_serialize_javascript__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__config__ = __webpack_require__(15);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__config___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__config__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_redux__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- /* eslint-disable react/no-danger */
- var _ref = _jsx('meta', {
- charSet: 'utf-8'
- });
- var _ref2 = _jsx('meta', {
- httpEquiv: 'x-ua-compatible',
- content: 'ie=edge'
- });
- var _ref3 = _jsx('meta', {
- name: 'viewport',
- content: 'width=device-width, initial-scale=1'
- });
- var _ref4 = _jsx('link', {
- rel: 'apple-touch-icon',
- href: 'apple-touch-icon.png'
- });
- var _ref5 = _jsx('link', {
- rel: 'stylesheet',
- type: 'text/css',
- href: 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'
- });
- var _ref6 = _jsx('link', {
- rel: 'stylesheet',
- type: 'text/css',
- href: 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'
- });
- var _ref7 = _jsx('link', {
- rel: 'stylesheet',
- type: 'text/css',
- href: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css'
- });
- var _ref8 = _jsx('link', {
- rel: 'stylesheet',
- type: 'text/css',
- href: '/res/template/css/style.css'
- });
- var _ref9 = _jsx('link', {
- rel: 'stylesheet',
- type: 'text/css',
- href: '/res/components/react-select.css'
- });
- var _ref10 = _jsx('link', {
- rel: 'stylesheet',
- type: 'text/css',
- href: '/res/customSkyHubStyle.css'
- });
- var _ref11 = _jsx('link', {
- rel: 'stylesheet',
- type: 'text/css',
- href: 'http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/css/msdropdown/flags.css'
- });
- var _ref12 = _jsx('link', {
- rel: 'stylesheet',
- type: 'text/css',
- href: 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-social/5.1.1/bootstrap-social.min.css'
- });
- var _ref13 = _jsx('script', {
- src: 'https://code.jquery.com/jquery-3.2.1.min.js'
- });
- var _ref14 = _jsx('script', {
- src: 'https://cdnjs.cloudflare.com/ajax/libs/metisMenu/2.7.0/metisMenu.min.js'
- });
- var _ref15 = _jsx('script', {
- src: 'https://cdnjs.cloudflare.com/ajax/libs/jQuery-slimScroll/1.3.8/jquery.slimscroll.min.js'
- });
- var _ref16 = _jsx('script', {
- src: 'https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/2.25.1/js/blueimp-gallery.min.js'
- });
- var _ref17 = _jsx('script', {
- src: 'https://www.google-analytics.com/analytics.js',
- async: true,
- defer: true
- });
- var _ref18 = _jsx('script', {
- src: 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js'
- });
- var _ref19 = _jsx('script', {
- src: '/res/template/js/inspinia.js'
- });
- var _ref20 = _jsx('script', {
- src: '/res/template/js/plugins/pace/pace.min.js'
- });
- let Html = function () {
- function Html(props) {
- const { title, description, styles, scripts, app, children } = props;
- return _jsx('html', {
- className: 'no-js',
- lang: 'en'
- }, void 0, _jsx('head', {}, void 0, _ref, _ref2, _jsx('title', {}, void 0, title), _jsx('meta', {
- name: 'description',
- content: description
- }), _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, styles.map(style => _jsx('style', {
- id: style.id,
- dangerouslySetInnerHTML: { __html: style.cssText }
- }, style.id))), _jsx('body', {
- style: { margin: 0 },
- className: ' mini-navbar pace-done'
- }, void 0, _jsx('div', {
- id: 'app',
- dangerouslySetInnerHTML: { __html: children }
- }), _jsx('script', {
- dangerouslySetInnerHTML: { __html: `window.App=${__WEBPACK_IMPORTED_MODULE_2_serialize_javascript___default()(app)}` }
- }), scripts.map(script => _jsx('script', {
- src: script
- }, script)), __WEBPACK_IMPORTED_MODULE_3__config___default.a.analytics.googleTrackingId && _jsx('script', {
- dangerouslySetInnerHTML: { __html: 'window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;' + `ga('create','${__WEBPACK_IMPORTED_MODULE_3__config___default.a.analytics.googleTrackingId}','auto');ga('send','pageview')` }
- }), __WEBPACK_IMPORTED_MODULE_3__config___default.a.analytics.googleTrackingId && _ref17), _ref18, _ref19, _ref20);
- }
- Html.defaultProps = {
- styles: [],
- scripts: []
- };
- return Html;
- }();
- /* harmony default export */ __webpack_exports__["a"] = (Html);
- /***/ }),
- /* 53 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_isomorphic_style_loader_lib_withStyles__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_isomorphic_style_loader_lib_withStyles___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_isomorphic_style_loader_lib_withStyles__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Feedback_css__ = __webpack_require__(130);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Feedback_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Feedback_css__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- let Feedback = function () {
- function Feedback(props) {
- return _jsx('div', {
- className: __WEBPACK_IMPORTED_MODULE_2__Feedback_css___default.a.root
- }, void 0, _jsx('div', {
- className: __WEBPACK_IMPORTED_MODULE_2__Feedback_css___default.a.container
- }, void 0, _jsx('a', {
- className: __WEBPACK_IMPORTED_MODULE_2__Feedback_css___default.a.link,
- href: 'https://gitter.im/kriasoft/react-starter-kit'
- }, void 0, 'Ask a question'), _jsx('span', {
- className: __WEBPACK_IMPORTED_MODULE_2__Feedback_css___default.a.spacer
- }, void 0, '|'), _jsx('a', {
- className: __WEBPACK_IMPORTED_MODULE_2__Feedback_css___default.a.link,
- href: 'https://github.com/kriasoft/react-starter-kit/issues/new'
- }, void 0, 'Report an issue')));
- }
- return Feedback;
- }();
- /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1_isomorphic_style_loader_lib_withStyles___default()(__WEBPACK_IMPORTED_MODULE_2__Feedback_css___default.a)(Feedback));
- /***/ }),
- /* 54 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony export (immutable) */ __webpack_exports__["show404"] = show404;
- function show404(app, path, res) {
- app.engine('.html', __webpack_require__(143).__express);
- app.set('views', __dirname + '/../src/client/components/Template/404');
- app.set('view engine', 'html');
- //console.log("404",path);
- res.render('404.html', {
- filePath: path
- });
- }
- /***/ }),
- /* 55 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link_Link__ = __webpack_require__(5);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Header_Header__ = __webpack_require__(63);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Left_sidebar_LeftSidebar__ = __webpack_require__(59);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Right_sidebar_RightSidebar__ = __webpack_require__(60);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Content_Content__ = __webpack_require__(58);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Footer_Footer__ = __webpack_require__(61);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Chat_Chat__ = __webpack_require__(56);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Chat_ChatButton__ = __webpack_require__(57);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__modules_users_authentication_modals_Authentication_modal__ = __webpack_require__(75);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__my_redux_actions_RouterState_actions_js__ = __webpack_require__(33);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_react_redux__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- var _class, _temp2;
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- var _ref = _jsx(__WEBPACK_IMPORTED_MODULE_4__Left_sidebar_LeftSidebar__["a" /* default */], {});
- var _ref2 = _jsx(__WEBPACK_IMPORTED_MODULE_3__Header_Header__["a" /* default */], {});
- var _ref3 = _jsx(__WEBPACK_IMPORTED_MODULE_7__Footer_Footer__["a" /* default */], {});
- var _ref4 = _jsx(__WEBPACK_IMPORTED_MODULE_8__Chat_Chat__["a" /* default */], {});
- var _ref5 = _jsx(__WEBPACK_IMPORTED_MODULE_9__Chat_ChatButton__["a" /* default */], {});
- var _ref6 = _jsx(__WEBPACK_IMPORTED_MODULE_5__Right_sidebar_RightSidebar__["a" /* default */], {});
- let Body = (_temp2 = _class = class Body extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(...args) {
- var _temp;
- return _temp = super(...args), this.refAuthenticationModal = null, _temp;
- }
- getChildContext() {
- return {
- refAuthenticationModal: this.refAuthenticationModal
- };
- }
- componentDidMount() {
- requestAnimationFrame(() => {
- //Make sure it is on client only
- this.props.dispatch(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__my_redux_actions_RouterState_actions_js__["a" /* setAuthenticationModalElement */])(this.refAuthenticationModal));
- });
- }
- render() {
- //console.log("XXXXXXXXXXXXXXXXXXXXXXXXXX BODYY", this);
- return _jsx('div', {}, void 0, _ref, _jsx('div', {
- id: 'page-wrapper',
- className: 'gray-bg',
- style: { minHeight: 785 }
- }, void 0, _ref2, _jsx('div', {
- className: 'container',
- style: { padding: 0 }
- }, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_6__Content_Content__["a" /* default */], {}, void 0, this.props.children, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__modules_users_authentication_modals_Authentication_modal__["a" /* default */], { ref: c => this.refAuthenticationModal = c })))), _ref3, _ref4, _ref5, _ref6);
- }
- }, _class.childContextTypes = {
- refAuthenticationModal: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.any
- }, _temp2);
- function mapState(state) {
- return {
- userAuthenticated: state.userAuthenticated,
- localization: state.localization
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12_react_redux__["connect"])(mapState, mapDispatch)(Body));
- /***/ }),
- /* 56 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/9/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx('div', {
- className: 'heading',
- draggable: 'true'
- }, void 0, _jsx('small', {
- className: 'chat-date pull-right'
- }, void 0, '02.19.2015'), 'Small chat');
- var _ref2 = _jsx('div', {
- className: 'left'
- }, void 0, _jsx('div', {
- className: 'author-name'
- }, void 0, 'Monica Jackson', _jsx('small', {
- className: 'chat-date'
- }, void 0, '10:02 am')), _jsx('div', {
- className: 'chat-message active'
- }, void 0, 'Lorem Ipsum is simply dummy text input.'));
- var _ref3 = _jsx('div', {
- className: 'right'
- }, void 0, _jsx('div', {
- className: 'author-name'
- }, void 0, 'Mick Smith', _jsx('small', {
- className: 'chat-date'
- }, void 0, '11:24 am')), _jsx('div', {
- className: 'chat-message'
- }, void 0, 'Lorem Ipsum is simpl.'));
- var _ref4 = _jsx('div', {
- className: 'left'
- }, void 0, _jsx('div', {
- className: 'author-name'
- }, void 0, 'Alice Novak', _jsx('small', {
- className: 'chat-date'
- }, void 0, '08:45 pm')), _jsx('div', {
- className: 'chat-message active'
- }, void 0, 'Check this stock char.'));
- var _ref5 = _jsx('div', {
- className: 'right'
- }, void 0, _jsx('div', {
- className: 'author-name'
- }, void 0, 'Anna Lamson', _jsx('small', {
- className: 'chat-date'
- }, void 0, '11:24 am')), _jsx('div', {
- className: 'chat-message'
- }, void 0, 'The standard chunk of Lorem Ipsum'));
- var _ref6 = _jsx('div', {
- className: 'left'
- }, void 0, _jsx('div', {
- className: 'author-name'
- }, void 0, 'Mick Lane', _jsx('small', {
- className: 'chat-date'
- }, void 0, '08:45 pm')), _jsx('div', {
- className: 'chat-message active'
- }, void 0, 'I belive that. Lorem Ipsum is simply dummy text.'));
- var _ref7 = _jsx('div', {
- className: 'form-chat'
- }, void 0, _jsx('div', {
- className: 'input-group input-group-sm'
- }, void 0, _jsx('input', {
- type: 'text',
- className: 'form-control'
- }), _jsx('span', {
- className: 'input-group-btn'
- }, void 0, _jsx('button', {
- className: 'btn btn-primary',
- type: 'button'
- }, void 0, ' Send '))));
- let Chat = function () {
- function Chat(props) {
- return _jsx('div', {
- className: 'small-chat-box fadeInRight animated'
- }, void 0, _ref, _jsx('div', {
- className: 'slimScrollDiv',
- style: { position: "relative", overflow: "hidden", width: "auto", height: 234 }
- }, void 0, _jsx('div', {
- className: 'content',
- style: { overflow: "hidden", width: "auto", height: 234 }
- }, void 0, _ref2, _ref3, _ref4, _ref5, _ref6), _jsx('div', {
- className: 'slimScrollBar',
- style: { background: 0, width: 7, position: "absolute", top: 0, opacity: 0.4, display: "block", borderRadius: 7, zIndex: 99, right: 1 }
- }, void 0), _jsx('div', {
- className: 'slimScrollRail',
- style: { width: 7, height: "100%", position: "absolute", top: 0, display: "none", borderRadius: 7, background: "#333333", opacity: 0.4, zIndex: 90, right: 1 }
- }, void 0)), _ref7);
- }
- return Chat;
- }();
- /* harmony default export */ __webpack_exports__["a"] = (Chat);
- /***/ }),
- /* 57 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/9/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx('div', {
- id: 'small-chat'
- }, void 0, _jsx('span', {
- className: 'badge badge-warning pull-right'
- }, void 0, '5'), _jsx('a', {
- className: 'open-small-chat'
- }, void 0, _jsx('i', {
- className: 'fa fa-comments'
- })));
- let ChatButton = function () {
- function ChatButton(props) {
- return _ref;
- }
- return ChatButton;
- }();
- /* harmony default export */ __webpack_exports__["a"] = (ChatButton);
- /***/ }),
- /* 58 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/8/2017.
- * (C) BIT TECHNOLOGIES
- */
- let Content = function () {
- function Content(props) {
- return _jsx('div', {
- className: 'wrapper wrapper-content'
- }, void 0, _jsx('div', {
- className: 'col-xl-8 col-xl-offset-2 col-lg-10 col-lg-offset-1 col-md-10 col-md-offset-1 col-sm-10 col-sm-offset-1 col-xs-12',
- style: { padding: 0 }
- }, void 0, props.children));
- }
- return Content;
- }();
- /* harmony default export */ __webpack_exports__["a"] = (Content);
- /***/ }),
- /* 59 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/8/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx('div', {
- className: 'logo-element'
- }, void 0, 'IN+');
- var _ref2 = _jsx('li', {
- className: 'active'
- }, void 0, _jsx('a', {
- href: 'index-2.html'
- }, void 0, _jsx('i', {
- className: 'fa fa-th-large'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Dashboards'), ' ', _jsx('span', {
- className: 'fa arrow'
- })), _jsx('ul', {
- className: 'nav nav-second-level collapse in'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: 'index-2.html'
- }, void 0, 'Dashboard v.1')), _jsx('li', {
- className: 'active'
- }, void 0, _jsx('a', {
- href: 'dashboard_2.html'
- }, void 0, 'Dashboard v.2')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'dashboard_3.html'
- }, void 0, 'Dashboard v.3')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'dashboard_4_1.html'
- }, void 0, 'Dashboard v.4')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'dashboard_5.html'
- }, void 0, 'Dashboard v.5 '))));
- var _ref3 = _jsx('li', {}, void 0, _jsx('a', {
- href: 'layouts.html'
- }, void 0, _jsx('i', {
- className: 'fa fa-diamond'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Layouts')));
- var _ref4 = _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('i', {
- className: 'fa fa-bar-chart-o'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Graphs'), _jsx('span', {
- className: 'fa arrow'
- })), _jsx('ul', {
- className: 'nav nav-second-level collapse'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: 'graph_flot.html'
- }, void 0, 'Flot Charts')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'graph_morris.html'
- }, void 0, 'Morris.js Charts')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'graph_rickshaw.html'
- }, void 0, 'Rickshaw Charts')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'graph_chartjs.html'
- }, void 0, 'Chart.js')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'graph_chartist.html'
- }, void 0, 'Chartist')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'c3.html'
- }, void 0, 'c3 charts')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'graph_peity.html'
- }, void 0, 'Peity Charts')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'graph_sparkline.html'
- }, void 0, 'Sparkline Charts'))));
- var _ref5 = _jsx('li', {}, void 0, _jsx('a', {
- href: 'mailbox.html'
- }, void 0, _jsx('i', {
- className: 'fa fa-envelope'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Mailbox '), _jsx('span', {
- className: 'label label-warning pull-right'
- }, void 0, '16/24')), _jsx('ul', {
- className: 'nav nav-second-level collapse'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: 'mailbox.html'
- }, void 0, 'Inbox')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'mail_detail.html'
- }, void 0, 'Email view')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'mail_compose.html'
- }, void 0, 'Compose email')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'email_template.html'
- }, void 0, 'Email templates'))));
- var _ref6 = _jsx('li', {}, void 0, _jsx('a', {
- href: 'metrics.html'
- }, void 0, _jsx('i', {
- className: 'fa fa-pie-chart'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Metrics'), ' '));
- var _ref7 = _jsx('li', {}, void 0, _jsx('a', {
- href: 'widgets.html'
- }, void 0, _jsx('i', {
- className: 'fa fa-flask'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Widgets')));
- var _ref8 = _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('i', {
- className: 'fa fa-edit'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Forms'), _jsx('span', {
- className: 'fa arrow'
- })), _jsx('ul', {
- className: 'nav nav-second-level collapse'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: 'form_basic.html'
- }, void 0, 'Basic form')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'form_advanced.html'
- }, void 0, 'Advanced Plugins')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'form_wizard.html'
- }, void 0, 'Wizard')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'form_file_upload.html'
- }, void 0, 'File Upload')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'form_editors.html'
- }, void 0, 'Text Editor')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'form_autocomplete.html'
- }, void 0, 'Autocomplete')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'form_markdown.html'
- }, void 0, 'Markdown'))));
- var _ref9 = _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('i', {
- className: 'fa fa-desktop'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'App Views'), ' ', _jsx('span', {
- className: 'pull-right label label-primary'
- }, void 0, 'SPECIAL')), _jsx('ul', {
- className: 'nav nav-second-level collapse'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: 'contacts.html'
- }, void 0, 'Contacts')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'profile.html'
- }, void 0, 'Profile')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'profile_2.html'
- }, void 0, 'Profile v.2')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'contacts_2.html'
- }, void 0, 'Contacts v.2')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'projects.html'
- }, void 0, 'Projects')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'project_detail.html'
- }, void 0, 'Project detail')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'activity_stream.html'
- }, void 0, 'Activity stream')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'teams_board.html'
- }, void 0, 'Teams board')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'social_feed.html'
- }, void 0, 'Social feed')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'clients.html'
- }, void 0, 'Clients')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'full_height.html'
- }, void 0, 'Outlook view')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'vote_list.html'
- }, void 0, 'Vote list')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'file_manager.html'
- }, void 0, 'File manager')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'calendar.html'
- }, void 0, 'Calendar')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'issue_tracker.html'
- }, void 0, 'Issue tracker')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'blog.html'
- }, void 0, 'Blog')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'article.html'
- }, void 0, 'Article')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'faq.html'
- }, void 0, 'FAQ')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'timeline.html'
- }, void 0, 'Timeline')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'pin_board.html'
- }, void 0, 'Pin board'))));
- var _ref10 = _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('i', {
- className: 'fa fa-files-o'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Other Pages'), _jsx('span', {
- className: 'fa arrow'
- })), _jsx('ul', {
- className: 'nav nav-second-level collapse'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: 'search_results.html'
- }, void 0, 'Search results')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'lockscreen.html'
- }, void 0, 'Lockscreen')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'invoice.html'
- }, void 0, 'Invoice')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'login.html'
- }, void 0, 'Login')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'login_two_columns.html'
- }, void 0, 'Login v.2')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'forgot_password.html'
- }, void 0, 'Forget password')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'register.html'
- }, void 0, 'Register')), _jsx('li', {}, void 0, _jsx('a', {
- href: '404.html'
- }, void 0, '404 Page')), _jsx('li', {}, void 0, _jsx('a', {
- href: '500.html'
- }, void 0, '500 Page')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'empty_page.html'
- }, void 0, 'Empty page'))));
- var _ref11 = _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('i', {
- className: 'fa fa-globe'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Miscellaneous'), _jsx('span', {
- className: 'label label-info pull-right'
- }, void 0, 'NEW')), _jsx('ul', {
- className: 'nav nav-second-level collapse'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: 'toastr_notifications.html'
- }, void 0, 'Notification')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'nestable_list.html'
- }, void 0, 'Nestable list')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'agile_board.html'
- }, void 0, 'Agile board')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'timeline_2.html'
- }, void 0, 'Timeline v.2')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'diff.html'
- }, void 0, 'Diff')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'pdf_viewer.html'
- }, void 0, 'PDF viewer')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'i18support.html'
- }, void 0, 'i18 support')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'sweetalert.html'
- }, void 0, 'Sweet alert')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'idle_timer.html'
- }, void 0, 'Idle timer')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'truncate.html'
- }, void 0, 'Truncate')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'password_meter.html'
- }, void 0, 'Password meter')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'spinners.html'
- }, void 0, 'Spinners')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'spinners_usage.html'
- }, void 0, 'Spinners usage')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'tinycon.html'
- }, void 0, 'Live favicon')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'google_maps.html'
- }, void 0, 'Google maps')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'datamaps.html'
- }, void 0, 'Datamaps')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'social_buttons.html'
- }, void 0, 'Social buttons')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'code_editor.html'
- }, void 0, 'Code editor')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'modal_window.html'
- }, void 0, 'Modal window')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'clipboard.html'
- }, void 0, 'Clipboard')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'text_spinners.html'
- }, void 0, 'Text spinners')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'forum_main.html'
- }, void 0, 'Forum view')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'validation.html'
- }, void 0, 'Validation')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'tree_view.html'
- }, void 0, 'Tree view')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'loading_buttons.html'
- }, void 0, 'Loading buttons')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'chat_view.html'
- }, void 0, 'Chat view')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'masonry.html'
- }, void 0, 'Masonry')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'tour.html'
- }, void 0, 'Tour'))));
- var _ref12 = _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('i', {
- className: 'fa fa-flask'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'UI Elements'), _jsx('span', {
- className: 'fa arrow'
- })), _jsx('ul', {
- className: 'nav nav-second-level collapse'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: 'typography.html'
- }, void 0, 'Typography')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'icons.html'
- }, void 0, 'Icons')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'draggable_panels.html'
- }, void 0, 'Draggable Panels')), ' ', _jsx('li', {}, void 0, _jsx('a', {
- href: 'resizeable_panels.html'
- }, void 0, 'Resizeable Panels')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'buttons.html'
- }, void 0, 'Buttons')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'video.html'
- }, void 0, 'Video')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'tabs_panels.html'
- }, void 0, 'Panels')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'tabs.html'
- }, void 0, 'Tabs')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'notifications.html'
- }, void 0, 'Notifications & Tooltips')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'helper_classNamees.html'
- }, void 0, 'Helper css classNamees')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'badges_labels.html'
- }, void 0, 'Badges, Labels, Progress'))));
- var _ref13 = _jsx('li', {}, void 0, _jsx('a', {
- href: 'grid_options.html'
- }, void 0, _jsx('i', {
- className: 'fa fa-laptop'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Grid options')));
- var _ref14 = _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('i', {
- className: 'fa fa-table'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Tables'), _jsx('span', {
- className: 'fa arrow'
- })), _jsx('ul', {
- className: 'nav nav-second-level collapse'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: 'table_basic.html'
- }, void 0, 'Static Tables')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'table_data_tables.html'
- }, void 0, 'Data Tables')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'table_foo_table.html'
- }, void 0, 'Foo Tables')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'jq_grid.html'
- }, void 0, 'jqGrid'))));
- var _ref15 = _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('i', {
- className: 'fa fa-shopping-cart'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'E-commerce'), _jsx('span', {
- className: 'fa arrow'
- })), _jsx('ul', {
- className: 'nav nav-second-level collapse'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: 'ecommerce_products_grid.html'
- }, void 0, 'Products grid')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'ecommerce_product_list.html'
- }, void 0, 'Products list')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'ecommerce_product.html'
- }, void 0, 'Product edit')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'ecommerce_product_detail.html'
- }, void 0, 'Product detail')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'ecommerce-cart.html'
- }, void 0, 'Cart')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'ecommerce-orders.html'
- }, void 0, 'Orders')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'ecommerce_payments.html'
- }, void 0, 'Credit Card form'))));
- var _ref16 = _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('i', {
- className: 'fa fa-picture-o'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Gallery'), _jsx('span', {
- className: 'fa arrow'
- })), _jsx('ul', {
- className: 'nav nav-second-level collapse'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: 'basic_gallery.html'
- }, void 0, 'Lightbox Gallery')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'slick_carousel.html'
- }, void 0, 'Slick Carousel')), _jsx('li', {}, void 0, _jsx('a', {
- href: 'carousel.html'
- }, void 0, 'Bootstrap Carousel'))));
- var _ref17 = _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('i', {
- className: 'fa fa-sitemap'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Menu Levels '), _jsx('span', {
- className: 'fa arrow'
- })), _jsx('ul', {
- className: 'nav nav-second-level collapse'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, 'Third Level ', _jsx('span', {
- className: 'fa arrow'
- })), _jsx('ul', {
- className: 'nav nav-third-level collapse'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, 'Third Level Item')), _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, 'Third Level Item')), _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, 'Third Level Item')))), _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, 'Second Level Item')), _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, 'Second Level Item')), _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, 'Second Level Item'))));
- var _ref18 = _jsx('li', {}, void 0, _jsx('a', {
- href: 'css_animation.html'
- }, void 0, _jsx('i', {
- className: 'fa fa-magic'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'CSS Animations '), _jsx('span', {
- className: 'label label-info pull-right'
- }, void 0, '62')));
- var _ref19 = _jsx('li', {
- className: 'landing_link'
- }, void 0, _jsx('a', {
- target: '_blank',
- href: 'landing.html'
- }, void 0, _jsx('i', {
- className: 'fa fa-star'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Landing Page'), ' ', _jsx('span', {
- className: 'label label-warning pull-right'
- }, void 0, 'NEW')));
- var _ref20 = _jsx('li', {
- className: 'special_link'
- }, void 0, _jsx('a', {
- href: 'package.html'
- }, void 0, _jsx('i', {
- className: 'fa fa-database'
- }), ' ', _jsx('span', {
- className: 'nav-label'
- }, void 0, 'Package')));
- let LeftSidebar = function () {
- function LeftSidebar(props) {
- //console.log("#################### LEFT SIDEBAR ",this);
- if (props.userAuthenticated.user.isLoggedIn() === false) return null;
- return _jsx('nav', {
- className: 'navbar-default navbar-static-side',
- role: 'navigation'
- }, void 0, _jsx('div', {
- className: 'sidebar-collapse'
- }, void 0, _jsx('ul', {
- className: 'nav metismenu',
- id: 'side-menu',
- style: { backgroundColor: "#2f4050" }
- }, void 0, _jsx('li', {
- className: 'nav-header',
- style: { paddingTop: 15 }
- }, void 0, _jsx('div', {
- className: 'dropdown profile-element'
- }, void 0, _jsx('span', {}, void 0, _jsx('img', {
- alt: 'image',
- className: 'img-circle',
- src: props.userAuthenticated.user.getProfilePic(),
- style: { maxWidth: 145, maxHeight: 145, paddingBottom: 15, marginLeft: "auto", marginRight: "auto", display: "block" }
- })), _jsx('a', {
- 'data-toggle': 'dropdown',
- className: 'dropdown-toggle',
- href: '#'
- }, void 0, _jsx('span', {
- className: 'clear',
- style: { textAlign: "center" }
- }, void 0, _jsx('span', {
- className: 'block m-t-xs'
- }, void 0, _jsx('strong', {
- className: 'font-bold'
- }, void 0, props.userAuthenticated.user.getName())), _jsx('span', {
- className: 'text-muted text-xs block',
- style: { align: "center" }
- }, void 0, props.userAuthenticated.user.shortBio)))), _ref), _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20)));
- }
- return LeftSidebar;
- }();
- ;
- function mapState(state) {
- return {
- userAuthenticated: state.userAuthenticated
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"])(mapState, mapDispatch)(LeftSidebar));
- /***/ }),
- /* 60 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/9/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx('ul', {
- className: 'nav nav-tabs navs-3'
- }, void 0, _jsx('li', {
- className: 'active'
- }, void 0, _jsx('a', {
- 'data-toggle': 'tab',
- href: '#tab-1'
- }, void 0, 'Notes')), _jsx('li', {}, void 0, _jsx('a', {
- 'data-toggle': 'tab',
- href: '#tab-2'
- }, void 0, 'Projects')), _jsx('li', {
- className: ''
- }, void 0, _jsx('a', {
- 'data-toggle': 'tab',
- href: '#tab-3'
- }, void 0, _jsx('i', {
- className: 'fa fa-gear'
- }))));
- var _ref2 = _jsx('div', {
- id: 'tab-1',
- className: 'tab-pane active'
- }, void 0, _jsx('div', {
- className: 'sidebar-title'
- }, void 0, _jsx('h3', {}, void 0, _jsx('i', {
- className: 'fa fa-comments-o'
- }), ' Latest Notes'), _jsx('small', {}, void 0, _jsx('i', {
- className: 'fa fa-tim'
- }), ' You have 10 new message.')), _jsx('div', {}, void 0, _jsx('div', {
- className: 'sidebar-message'
- }, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('div', {
- className: 'pull-left text-center'
- }, void 0, _jsx('img', {
- alt: 'image',
- className: 'img-circle message-avatar',
- src: '/res/logo/SkyHub-logo.png'
- }), _jsx('div', {
- className: 'm-t-xs'
- }, void 0, _jsx('i', {
- className: 'fa fa-star text-warning'
- }), _jsx('i', {
- className: 'fa fa-star text-warning'
- }))), _jsx('div', {
- className: 'media-body'
- }, void 0, 'There are many variations of passages of Lorem Ipsum available.', _jsx('br', {}), _jsx('small', {
- className: 'text-muted'
- }, void 0, 'Today 4:21 pm')))), _jsx('div', {
- className: 'sidebar-message'
- }, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('div', {
- className: 'pull-left text-center'
- }, void 0, _jsx('img', {
- alt: 'image',
- className: 'img-circle message-avatar',
- src: '/res/logo/SkyHub-logo.png'
- })), _jsx('div', {
- className: 'media-body'
- }, void 0, 'The point of using Lorem Ipsum is that it has a more-or-less normal.', _jsx('br', {}), _jsx('small', {
- className: 'text-muted'
- }, void 0, 'Yesterday 2:45 pm')))), _jsx('div', {
- className: 'sidebar-message'
- }, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('div', {
- className: 'pull-left text-center'
- }, void 0, _jsx('img', {
- alt: 'image',
- className: 'img-circle message-avatar',
- src: '/res/logo/SkyHub-logo.png'
- }), _jsx('div', {
- className: 'm-t-xs'
- }, void 0, _jsx('i', {
- className: 'fa fa-star text-warning'
- }), _jsx('i', {
- className: 'fa fa-star text-warning'
- }), _jsx('i', {
- className: 'fa fa-star text-warning'
- }))), _jsx('div', {
- className: 'media-body'
- }, void 0, 'Mevolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).', _jsx('br', {}), _jsx('small', {
- className: 'text-muted'
- }, void 0, 'Yesterday 1:10 pm')))), _jsx('div', {
- className: 'sidebar-message'
- }, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('div', {
- className: 'pull-left text-center'
- }, void 0, _jsx('img', {
- alt: 'image',
- className: 'img-circle message-avatar',
- src: '/res/logo/SkyHub-logo.png'
- })), _jsx('div', {
- className: 'media-body'
- }, void 0, 'Lorem Ipsum, you need to be sure there isn\'t anything embarrassing hidden in the', _jsx('br', {}), _jsx('small', {
- className: 'text-muted'
- }, void 0, 'Monday 8:37 pm')))), _jsx('div', {
- className: 'sidebar-message'
- }, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('div', {
- className: 'pull-left text-center'
- }, void 0, _jsx('img', {
- alt: 'image',
- className: 'img-circle message-avatar',
- src: '/res/logo/SkyHub-logo.png'
- })), _jsx('div', {
- className: 'media-body'
- }, void 0, 'All the Lorem Ipsum generators on the Internet tend to repeat.', _jsx('br', {}), _jsx('small', {
- className: 'text-muted'
- }, void 0, 'Today 4:21 pm')))), _jsx('div', {
- className: 'sidebar-message'
- }, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('div', {
- className: 'pull-left text-center'
- }, void 0, _jsx('img', {
- alt: 'image',
- className: 'img-circle message-avatar',
- src: '/res/logo/SkyHub-logo.png'
- })), _jsx('div', {
- className: 'media-body'
- }, void 0, 'Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.', _jsx('br', {}), _jsx('small', {
- className: 'text-muted'
- }, void 0, 'Yesterday 2:45 pm')))), _jsx('div', {
- className: 'sidebar-message'
- }, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('div', {
- className: 'pull-left text-center'
- }, void 0, _jsx('img', {
- alt: 'image',
- className: 'img-circle message-avatar',
- src: '/res/logo/SkyHub-logo.png'
- }), _jsx('div', {
- className: 'm-t-xs'
- }, void 0, _jsx('i', {
- className: 'fa fa-star text-warning'
- }), _jsx('i', {
- className: 'fa fa-star text-warning'
- }), _jsx('i', {
- className: 'fa fa-star text-warning'
- }))), _jsx('div', {
- className: 'media-body'
- }, void 0, 'The standard chunk of Lorem Ipsum used since the 1500s is reproduced below.', _jsx('br', {}), _jsx('small', {
- className: 'text-muted'
- }, void 0, 'Yesterday 1:10 pm')))), _jsx('div', {
- className: 'sidebar-message'
- }, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('div', {
- className: 'pull-left text-center'
- }, void 0, _jsx('img', {
- alt: 'image',
- className: 'img-circle message-avatar',
- src: '/res/logo/SkyHub-logo.png'
- })), _jsx('div', {
- className: 'media-body'
- }, void 0, 'Uncover many web sites still in their infancy. Various versions have.', _jsx('br', {}), _jsx('small', {
- className: 'text-muted'
- }, void 0, 'Monday 8:37 pm'))))));
- var _ref3 = _jsx('div', {
- className: 'sidebar-title'
- }, void 0, _jsx('h3', {}, void 0, _jsx('i', {
- className: 'fa fa-cube'
- }), ' Latest projects'), _jsx('small', {}, void 0, _jsx('i', {
- className: 'fa fa-tim'
- }), ' You have 14 projects. 10 not completed.'));
- var _ref4 = _jsx('div', {
- className: 'small pull-right m-t-xs'
- }, void 0, '9 hours ago');
- var _ref5 = _jsx('h4', {}, void 0, 'Business valuation');
- var _ref6 = _jsx('div', {
- className: 'small'
- }, void 0, 'Completion with: 22%');
- var _ref7 = _jsx('div', {
- className: 'small text-muted m-t-xs'
- }, void 0, 'Project end: 4:00 pm - 12.06.2014');
- var _ref8 = _jsx('div', {
- className: 'small pull-right m-t-xs'
- }, void 0, '9 hours ago');
- var _ref9 = _jsx('h4', {}, void 0, 'Contract with Company ');
- var _ref10 = _jsx('div', {
- className: 'small'
- }, void 0, 'Completion with: 48%');
- var _ref11 = _jsx('div', {
- className: 'small pull-right m-t-xs'
- }, void 0, '9 hours ago');
- var _ref12 = _jsx('h4', {}, void 0, 'Meeting');
- var _ref13 = _jsx('div', {
- className: 'small'
- }, void 0, 'Completion with: 14%');
- var _ref14 = _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('span', {
- className: 'label label-primary pull-right'
- }, void 0, 'NEW'), _jsx('h4', {}, void 0, 'The generated'), 'There are many variations of passages of Lorem Ipsum available.', _jsx('div', {
- className: 'small'
- }, void 0, 'Completion with: 22%'), _jsx('div', {
- className: 'small text-muted m-t-xs'
- }, void 0, 'Project end: 4:00 pm - 12.06.2014')));
- var _ref15 = _jsx('div', {
- className: 'small pull-right m-t-xs'
- }, void 0, '9 hours ago');
- var _ref16 = _jsx('h4', {}, void 0, 'Business valuation');
- var _ref17 = _jsx('div', {
- className: 'small'
- }, void 0, 'Completion with: 22%');
- var _ref18 = _jsx('div', {
- className: 'small text-muted m-t-xs'
- }, void 0, 'Project end: 4:00 pm - 12.06.2014');
- var _ref19 = _jsx('div', {
- className: 'small pull-right m-t-xs'
- }, void 0, '9 hours ago');
- var _ref20 = _jsx('h4', {}, void 0, 'Contract with Company ');
- var _ref21 = _jsx('div', {
- className: 'small'
- }, void 0, 'Completion with: 48%');
- var _ref22 = _jsx('div', {
- className: 'small pull-right m-t-xs'
- }, void 0, '9 hours ago');
- var _ref23 = _jsx('h4', {}, void 0, 'Meeting');
- var _ref24 = _jsx('div', {
- className: 'small'
- }, void 0, 'Completion with: 14%');
- var _ref25 = _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _jsx('span', {
- className: 'label label-primary pull-right'
- }, void 0, 'NEW'), _jsx('h4', {}, void 0, 'The generated'), 'There are many variations of passages of Lorem Ipsum available.', _jsx('div', {
- className: 'small'
- }, void 0, 'Completion with: 22%'), _jsx('div', {
- className: 'small text-muted m-t-xs'
- }, void 0, 'Project end: 4:00 pm - 12.06.2014')));
- var _ref26 = _jsx('div', {
- id: 'tab-3',
- className: 'tab-pane'
- }, void 0, _jsx('div', {
- className: 'sidebar-title'
- }, void 0, _jsx('h3', {}, void 0, _jsx('i', {
- className: 'fa fa-gears'
- }), ' Settings'), _jsx('small', {}, void 0, _jsx('i', {
- className: 'fa fa-tim'
- }), ' You have 14 projects. 10 not completed.')), _jsx('div', {
- className: 'setings-item'
- }, void 0, _jsx('span', {}, void 0, 'Show notifications'), _jsx('div', {
- className: 'switch'
- }, void 0, _jsx('div', {
- className: 'onoffswitch'
- }, void 0, _jsx('input', {
- type: 'checkbox',
- name: 'collapsemenu',
- className: 'onoffswitch-checkbox',
- id: 'example'
- }), _jsx('label', {
- className: 'onoffswitch-label'
- }, void 0, _jsx('span', {
- className: 'onoffswitch-inner'
- }), _jsx('span', {
- className: 'onoffswitch-switch'
- }))))), _jsx('div', {
- className: 'setings-item'
- }, void 0, _jsx('span', {}, void 0, 'Disable Chat'), _jsx('div', {
- className: 'switch'
- }, void 0, _jsx('div', {
- className: 'onoffswitch'
- }, void 0, _jsx('input', {
- type: 'checkbox',
- name: 'collapsemenu',
- checked: '',
- className: 'onoffswitch-checkbox',
- id: 'example2'
- }), _jsx('label', {
- className: 'onoffswitch-label'
- }, void 0, _jsx('span', {
- className: 'onoffswitch-inner'
- }), _jsx('span', {
- className: 'onoffswitch-switch'
- }))))), _jsx('div', {
- className: 'setings-item'
- }, void 0, _jsx('span', {}, void 0, 'Enable history'), _jsx('div', {
- className: 'switch'
- }, void 0, _jsx('div', {
- className: 'onoffswitch'
- }, void 0, _jsx('input', {
- type: 'checkbox',
- name: 'collapsemenu',
- className: 'onoffswitch-checkbox',
- id: 'example3'
- }), _jsx('label', {
- className: 'onoffswitch-label'
- }, void 0, _jsx('span', {
- className: 'onoffswitch-inner'
- }), _jsx('span', {
- className: 'onoffswitch-switch'
- }))))), _jsx('div', {
- className: 'setings-item'
- }, void 0, _jsx('span', {}, void 0, 'Show charts'), _jsx('div', {
- className: 'switch'
- }, void 0, _jsx('div', {
- className: 'onoffswitch'
- }, void 0, _jsx('input', {
- type: 'checkbox',
- name: 'collapsemenu',
- className: 'onoffswitch-checkbox',
- id: 'example4'
- }), _jsx('label', {
- className: 'onoffswitch-label'
- }, void 0, _jsx('span', {
- className: 'onoffswitch-inner'
- }), _jsx('span', {
- className: 'onoffswitch-switch'
- }))))), _jsx('div', {
- className: 'setings-item'
- }, void 0, _jsx('span', {}, void 0, 'Offline users'), _jsx('div', {
- className: 'switch'
- }, void 0, _jsx('div', {
- className: 'onoffswitch'
- }, void 0, _jsx('input', {
- type: 'checkbox',
- checked: '',
- name: 'collapsemenu',
- className: 'onoffswitch-checkbox',
- id: 'example5'
- }), _jsx('label', {
- className: 'onoffswitch-label'
- }, void 0, _jsx('span', {
- className: 'onoffswitch-inner'
- }), _jsx('span', {
- className: 'onoffswitch-switch'
- }))))), _jsx('div', {
- className: 'setings-item'
- }, void 0, _jsx('span', {}, void 0, 'Global search'), _jsx('div', {
- className: 'switch'
- }, void 0, _jsx('div', {
- className: 'onoffswitch'
- }, void 0, _jsx('input', {
- type: 'checkbox',
- checked: '',
- name: 'collapsemenu',
- className: 'onoffswitch-checkbox',
- id: 'example6'
- }), _jsx('label', {
- className: 'onoffswitch-label'
- }, void 0, _jsx('span', {
- className: 'onoffswitch-inner'
- }), _jsx('span', {
- className: 'onoffswitch-switch'
- }))))), _jsx('div', {
- className: 'setings-item'
- }, void 0, _jsx('span', {}, void 0, 'Update everyday'), _jsx('div', {
- className: 'switch'
- }, void 0, _jsx('div', {
- className: 'onoffswitch'
- }, void 0, _jsx('input', {
- type: 'checkbox',
- name: 'collapsemenu',
- className: 'onoffswitch-checkbox',
- id: 'example7'
- }), _jsx('label', {
- className: 'onoffswitch-label'
- }, void 0, _jsx('span', {
- className: 'onoffswitch-inner'
- }), _jsx('span', {
- className: 'onoffswitch-switch'
- }))))), _jsx('div', {
- className: 'sidebar-content'
- }, void 0, _jsx('h4', {}, void 0, 'Settings'), _jsx('div', {
- className: 'small'
- }, void 0, 'I belive that. Lorem Ipsum is simply dummy text of the printing and typesetting industry. And typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s. Over the years, sometimes by accident, sometimes on purpose (injected humour and the like).')));
- let RightSidebar = function () {
- function RightSidebar(props) {
- return _jsx('div', {
- id: 'right-sidebar',
- className: 'animated'
- }, void 0, _jsx('div', {
- className: 'slimScrollDiv',
- style: { position: "relative", overflow: "hidden", width: "auto", height: "100%" }
- }, void 0, _jsx('div', {
- className: 'sidebar-container',
- style: { overflow: "hidden", width: "auto", height: "100%" }
- }, void 0, _ref, _jsx('div', {
- className: 'tab-content'
- }, void 0, _ref2, _jsx('div', {
- id: 'tab-2',
- className: 'tab-pane'
- }, void 0, _ref3, _jsx('ul', {
- className: 'sidebar-list'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _ref4, _ref5, 'It is a long established fact that a reader will be distracted.', _ref6, _jsx('div', {
- className: 'progress progress-mini'
- }, void 0, _jsx('div', {
- style: { width: "22%" },
- className: 'progress-bar progress-bar-warning'
- })), _ref7)), _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _ref8, _ref9, 'Many desktop publishing packages and web page editors.', _ref10, _jsx('div', {
- className: 'progress progress-mini'
- }, void 0, _jsx('div', {
- style: { width: "48%" },
- className: 'progress-bar'
- })))), _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _ref11, _ref12, 'By the readable content of a page when looking at its layout.', _ref13, _jsx('div', {
- className: 'progress progress-mini'
- }, void 0, _jsx('div', {
- style: { width: "14%" },
- className: 'progress-bar progress-bar-info'
- })))), _ref14, _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _ref15, _ref16, 'It is a long established fact that a reader will be distracted.', _ref17, _jsx('div', {
- className: 'progress progress-mini'
- }, void 0, _jsx('div', {
- style: { width: "22%" },
- className: 'progress-bar progress-bar-warning'
- })), _ref18)), _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _ref19, _ref20, 'Many desktop publishing packages and web page editors.', _ref21, _jsx('div', {
- className: 'progress progress-mini'
- }, void 0, _jsx('div', {
- style: { width: "48%" },
- className: 'progress-bar'
- })))), _jsx('li', {}, void 0, _jsx('a', {
- href: '#'
- }, void 0, _ref22, _ref23, 'By the readable content of a page when looking at its layout.', _ref24, _jsx('div', {
- className: 'progress progress-mini'
- }, void 0, _jsx('div', {
- style: { width: "14%" },
- className: 'progress-bar progress-bar-info'
- })))), _ref25)), _ref26)), _jsx('div', {
- className: 'slimScrollBar',
- style: { background: 0, width: 7, position: "absolute", top: 0, opacity: 0.4, display: "block", borderRadius: 7, zIndex: 99, right: 1, height: 546.017
- }
- }, void 0), _jsx('div', {
- className: 'slimScrollRail',
- style: { width: 7, height: "100%", position: "absolute", top: 0, display: "none", borderRadius: 7, background: "#333333", opacity: 0.4, zIndex: 90, right: 1
- }
- }, void 0)));
- }
- return RightSidebar;
- }();
- /* harmony default export */ __webpack_exports__["a"] = (RightSidebar);
- /***/ }),
- /* 61 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_isomorphic_style_loader_lib_withStyles__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_isomorphic_style_loader_lib_withStyles___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_isomorphic_style_loader_lib_withStyles__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link_Link__ = __webpack_require__(5);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- var _ref = _jsx('strong', {}, void 0, 'Copyright');
- var _ref2 = _jsx('a', {
- href: 'http://bit-technologies.net/'
- }, void 0, ' BIT TECHNOLOGIES ');
- let Footer = function () {
- function Footer(props) {
- return _jsx('div', {
- className: 'footer fixed',
- style: { zIndex: 200, marginLeft: 0 }
- }, void 0, _jsx('div', {
- style: { textAlign: "right" }
- }, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_2__Link_Link__["a" /* default */], {
- style: { marginLeft: 10 },
- to: '/'
- }, void 0, 'Home'), _jsx(__WEBPACK_IMPORTED_MODULE_2__Link_Link__["a" /* default */], {
- style: { marginLeft: 10 },
- to: '/admin'
- }, void 0, 'Admin'), _jsx(__WEBPACK_IMPORTED_MODULE_2__Link_Link__["a" /* default */], {
- style: { marginLeft: 10 },
- to: '/privacy'
- }, void 0, 'Privacy'), _jsx(__WEBPACK_IMPORTED_MODULE_2__Link_Link__["a" /* default */], {
- style: { marginLeft: 10 },
- to: '/not-found'
- }, void 0, 'Not Found'), _jsx(__WEBPACK_IMPORTED_MODULE_2__Link_Link__["a" /* default */], {
- style: { marginLeft: 10 },
- to: '/about'
- }, void 0, 'About'), _jsx(__WEBPACK_IMPORTED_MODULE_2__Link_Link__["a" /* default */], {
- style: { marginLeft: 10 },
- to: '/contact'
- }, void 0, 'Contact')), _jsx('div', {
- style: { textAlign: "center" }
- }, void 0, _ref, ' SkyHub 2016-2017 by ', _ref2));
- }
- return Footer;
- }();
- /* harmony default export */ __webpack_exports__["a"] = (Footer);
- /***/ }),
- /* 62 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WebsiteHeaderCover; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HeaderCover_component__ = __webpack_require__(22);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by BIT TECHNOLOGIES on 5/28/2017.
- */
- var _ref = _jsx(__WEBPACK_IMPORTED_MODULE_1__HeaderCover_component__["a" /* default */], {
- title: 'SkyHub - Forum 2.0',
- subTitle: 'Discover, Connect and Change the world together',
- coverPic: 'http://spitfiresocial.com/wp-content/uploads/2015/03/worldsocial.jpg'
- }, void 0);
- let WebsiteHeaderCover = class WebsiteHeaderCover extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- }
- render() {
- return _ref;
- }
- };
- /***/ }),
- /* 63 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Socket_status_bar_HeaderBarSocketStatus_component__ = __webpack_require__(64);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link_Link__ = __webpack_require__(5);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Top_navbar_TopNavbar__ = __webpack_require__(68);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- var _class, _temp;
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- var _ref = _jsx('div', {
- className: 'row border-bottom'
- }, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_4__Top_navbar_TopNavbar__["a" /* default */], {}), _jsx(__WEBPACK_IMPORTED_MODULE_1__Socket_status_bar_HeaderBarSocketStatus_component__["a" /* default */], {}));
- let Header = (_temp = _class = function () {
- function Header(props) {
- //console.log("###### HEADER",this);
- return _ref;
- }
- return Header;
- }(), _class.contextTypes = {
- refAuthenticationModal: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.any
- }, _temp);
- /* harmony default export */ __webpack_exports__["a"] = (Header);
- /***/ }),
- /* 64 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__my_redux_actions_SocketStatus_actions_js__ = __webpack_require__(34);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on ${DATE}.
- * (C) BIT TECHNOLOGIES
- */
- let HeaderBarSocketStatus = class HeaderBarSocketStatus extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(...args) {
- var _temp;
- return _temp = super(...args), this.sBackgroundColor = 'yellow', this.sTextColor = 'black', _temp;
- }
- renderStatusBar() {
- if (this.props.socketStatus.connectionOffline) {
- this.sBackgroundColor = 'red';
- this.sTextColor = 'yellow';
- } else if (this.props.socketStatus.showOnlineStatus) {
- this.sBackgroundColor = 'yellow';
- this.sTextColor = 'navy';
- }
- return _jsx('nav', {
- className: 'navbar navbar-default',
- style: { display: 'inline-block', width: '100%', marginBottom: -5, minHeight: 26, background: this.sBackgroundColor }
- }, void 0, _jsx('div', {
- style: { textAlign: 'center', margiTop: 5, color: this.sTextColor }
- }, void 0, _jsx('i', {
- className: this.props.socketStatus.icon,
- 'aria-hidden': 'true'
- }), _jsx('a', {
- href: '#'
- }, void 0, _jsx('b', {
- style: { color: this.sTextColor }
- }, void 0, this.props.socketStatus.message))));
- }
- hideSocketStatusTimeout() {
- console.log('Hide Socket Status');
- setTimeout(this.hideSocketStatus.bind(this), 3000);
- }
- hideSocketStatus() {
- this.props.dispatch(__WEBPACK_IMPORTED_MODULE_2__my_redux_actions_SocketStatus_actions_js__["d" /* socketHideSocketStatusMessage */]());
- }
- render() {
- return _jsx('div', {}, void 0, this.props.socketStatus.connectionOffline || this.props.socketStatus.showOnlineStatus ? this.renderStatusBar.call(this) : '', this.props.socketStatus.showOnlineStatus ? this.hideSocketStatusTimeout.call(this) : '');
- }
- };
- function mapState(state) {
- return {
- socketStatus: state.socketStatus
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"])(mapState, mapDispatch)(HeaderBarSocketStatus));
- /***/ }),
- /* 65 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link_Link__ = __webpack_require__(5);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_REST_authentication_Auth_service__ = __webpack_require__(3);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/10/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx('li', {}, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_1__Link_Link__["a" /* default */], {
- to: '/'
- }, void 0, _jsx('i', {
- className: 'fa fa-home'
- }), _jsx('span', {
- className: 'm-r-sm text-muted welcome-message'
- }, void 0, 'Home')));
- var _ref2 = _jsx('li', {}, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_1__Link_Link__["a" /* default */], {
- to: '/'
- }, void 0, _jsx('i', {
- className: 'fa fa-home'
- }), _jsx('span', {
- className: 'm-r-sm text-muted welcome-message'
- }, void 0, 'Profile')));
- var _ref3 = _jsx('li', {
- className: 'dropdown'
- }, void 0, _jsx('a', {
- className: 'dropdown-toggle count-info',
- 'data-toggle': 'dropdown',
- href: '#'
- }, void 0, _jsx('i', {
- className: 'fa fa-envelope'
- }), ' ', _jsx('span', {
- className: 'label label-warning'
- }, void 0, '16')), _jsx('ul', {
- className: 'dropdown-menu dropdown-messages'
- }, void 0, _jsx('li', {}, void 0, _jsx('div', {
- className: 'dropdown-messages-box'
- }, void 0, _jsx('a', {
- href: 'profile.html',
- className: 'pull-left'
- }, void 0, _jsx('img', {
- alt: 'image',
- className: 'img-circle',
- src: '/res/logo/SkyHub-logo.png'
- })), _jsx('div', {}, void 0, _jsx('small', {
- className: 'pull-right'
- }, void 0, '46h ago'), _jsx('strong', {}, void 0, 'Mike Loreipsum'), ' started following ', _jsx('strong', {}, void 0, 'Monica Smith'), '. ', _jsx('br', {}), _jsx('small', {
- className: 'text-muted'
- }, void 0, '3 days ago at 7:58 pm - 10.06.2014')))), _jsx('li', {
- className: 'divider'
- }), _jsx('li', {}, void 0, _jsx('div', {
- className: 'dropdown-messages-box'
- }, void 0, _jsx('a', {
- href: 'profile.html',
- className: 'pull-left'
- }, void 0, _jsx('img', {
- alt: 'image',
- className: 'img-circle',
- src: '/res/logo/SkyHub-logo.png'
- })), _jsx('div', {}, void 0, _jsx('small', {
- className: 'pull-right text-navy'
- }, void 0, '5h ago'), _jsx('strong', {}, void 0, 'Chris Johnatan Overtunk'), ' started following ', _jsx('strong', {}, void 0, 'Monica Smith'), '. ', _jsx('br', {}), _jsx('small', {
- className: 'text-muted'
- }, void 0, 'Yesterday 1:21 pm - 11.06.2014')))), _jsx('li', {
- className: 'divider'
- }), _jsx('li', {}, void 0, _jsx('div', {
- className: 'dropdown-messages-box'
- }, void 0, _jsx('a', {
- href: 'profile.html',
- className: 'pull-left'
- }, void 0, _jsx('img', {
- alt: 'image',
- className: 'img-circle',
- src: '/res/logo/SkyHub-logo.png'
- })), _jsx('div', {}, void 0, _jsx('small', {
- className: 'pull-right'
- }, void 0, '23h ago'), _jsx('strong', {}, void 0, 'Monica Smith'), ' love ', _jsx('strong', {}, void 0, 'Kim Smith'), '. ', _jsx('br', {}), _jsx('small', {
- className: 'text-muted'
- }, void 0, '2 days ago at 2:30 am - 11.06.2014')))), _jsx('li', {
- className: 'divider'
- }), _jsx('li', {}, void 0, _jsx('div', {
- className: 'text-center link-block'
- }, void 0, _jsx('a', {
- href: 'mailbox.html'
- }, void 0, _jsx('i', {
- className: 'fa fa-envelope'
- }), ' ', _jsx('strong', {}, void 0, 'Read All Messages'))))));
- var _ref4 = _jsx('li', {
- className: 'dropdown'
- }, void 0, _jsx('a', {
- className: 'dropdown-toggle count-info',
- 'data-toggle': 'dropdown',
- href: '#'
- }, void 0, _jsx('i', {
- className: 'fa fa-bell'
- }), ' ', _jsx('span', {
- className: 'label label-primary'
- }, void 0, '8')), _jsx('ul', {
- className: 'dropdown-menu dropdown-alerts'
- }, void 0, _jsx('li', {}, void 0, _jsx('a', {
- href: 'mailbox.html'
- }, void 0, _jsx('div', {}, void 0, _jsx('i', {
- className: 'fa fa-envelope fa-fw'
- }), ' You have 16 messages', _jsx('span', {
- className: 'pull-right text-muted small'
- }, void 0, '4 minutes ago')))), _jsx('li', {
- className: 'divider'
- }), _jsx('li', {}, void 0, _jsx('a', {
- href: 'profile.html'
- }, void 0, _jsx('div', {}, void 0, _jsx('i', {
- className: 'fa fa-twitter fa-fw'
- }), ' 3 New Followers', _jsx('span', {
- className: 'pull-right text-muted small'
- }, void 0, '12 minutes ago')))), _jsx('li', {
- className: 'divider'
- }), _jsx('li', {}, void 0, _jsx('a', {
- href: 'grid_options.html'
- }, void 0, _jsx('div', {}, void 0, _jsx('i', {
- className: 'fa fa-upload fa-fw'
- }), ' Server Rebooted', _jsx('span', {
- className: 'pull-right text-muted small'
- }, void 0, '4 minutes ago')))), _jsx('li', {
- className: 'divider'
- }), _jsx('li', {}, void 0, _jsx('div', {
- className: 'text-center link-block'
- }, void 0, _jsx('a', {
- href: 'notifications.html'
- }, void 0, _jsx('strong', {}, void 0, 'See All Alerts'), _jsx('i', {
- className: 'fa fa-angle-right'
- }))))));
- var _ref5 = _jsx('i', {
- className: 'fa fa-sign-out'
- });
- var _ref6 = _jsx('li', {}, void 0, _jsx('a', {
- className: 'right-sidebar-toggle'
- }, void 0, _jsx('i', {
- className: 'fa fa-tasks'
- })));
- let AuthenticatedHeaderNavigationMenu = class AuthenticatedHeaderNavigationMenu extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(...args) {
- var _temp;
- return _temp = super(...args), this.AuthService = null, _temp;
- }
- componentDidMount() {
- requestAnimationFrame(() => {//Make sure it is on client only
- });
- }
- handleLogout(e) {
- e.preventDefault();e.stopPropagation();
- __WEBPACK_IMPORTED_MODULE_2__services_REST_authentication_Auth_service__["a" /* default */].logout();
- }
- render() {
- //console.log("######## AUTHENTICATED HEADER", this);
- return _jsx('ul', {
- className: 'nav navbar-top-links navbar-right'
- }, void 0, _ref, _ref2, _ref3, _ref4, _jsx('li', {}, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_1__Link_Link__["a" /* default */], {
- to: '/logout',
- onClick: this.handleLogout.bind(this)
- }, void 0, _ref5, ' Log out')), _ref6);
- }
- };
- /* harmony default export */ __webpack_exports__["a"] = (AuthenticatedHeaderNavigationMenu);
- /***/ }),
- /* 66 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__AuthenticatedHeaderNavigationMenu__ = __webpack_require__(65);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__NotAuthenticatedHeaderNavigationMenu__ = __webpack_require__(67);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_redux__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- var _class, _temp;
- var _ref = _jsx(__WEBPACK_IMPORTED_MODULE_2__AuthenticatedHeaderNavigationMenu__["a" /* default */], {});
- var _ref2 = _jsx(__WEBPACK_IMPORTED_MODULE_3__NotAuthenticatedHeaderNavigationMenu__["a" /* default */], {});
- let HeaderNavigationMenu = (_temp = _class = class HeaderNavigationMenu extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- }
- renderNavigationAuthenticated() {
- return _ref;
- }
- renderNavigationNotAuthenticated() {
- return _ref2;
- }
- render() {
- //console.log("###### HEADER NAVIGATION",this);
- if (typeof this.context.userAuthenticated !== "undefined" && this.context.userAuthenticated.user !== null) {
- if (this.context.userAuthenticated.user.isLoggedIn()) return this.renderNavigationAuthenticated.call(this);
- }
- return this.renderNavigationNotAuthenticated.call(this);
- }
- }, _class.contextTypes = {
- refAuthenticationModal: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.any,
- userAuthenticated: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
- }, _temp);
- function mapState(state) {
- return {
- userAuthenticated: state.userAuthenticated
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (HeaderNavigationMenu);
- /***/ }),
- /* 67 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link_Link__ = __webpack_require__(5);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom__ = __webpack_require__(153);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_dom__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_redux__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/10/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx('li', {}, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_1__Link_Link__["a" /* default */], {
- to: '/'
- }, void 0, _jsx('i', {
- className: 'fa fa-home'
- }), _jsx('span', {
- className: 'm-r-sm text-muted welcome-message'
- }, void 0, 'Home')));
- var _ref2 = _jsx('i', {
- className: 'fa fa-sign-in'
- });
- var _ref3 = _jsx('span', {
- className: 'm-r-sm text-muted welcome-message'
- }, void 0, 'Log in');
- var _ref4 = _jsx('i', {
- className: 'fa fa-user-plus'
- });
- var _ref5 = _jsx('span', {
- className: 'm-r-sm text-muted welcome-message'
- }, void 0, 'Register');
- let NotAuthenticatedHeaderNavigationMenu = class NotAuthenticatedHeaderNavigationMenu extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- // static contextTypes = {
- // refAuthenticationModal: PropTypes.any,
- // };
- handleSignIn(e) {
- e.preventDefault();e.stopPropagation();
- console.log("SIGN IN");
- if (this.props.routerState !== null && this.props.routerState.refAuthenticationModal !== null) this.props.routerState.refAuthenticationModal.openLogin();
- //using props & context
- // if ((this.context.refAuthenticationModal !== null)&&(typeof this.context.refAuthenticationModal !== "undefined"))
- // this.context.refAuthenticationModal.openLogin();
- }
- handleRegister(e) {
- e.preventDefault();e.stopPropagation();
- if (this.props.routerState !== null && this.props.routerState.refAuthenticationModal !== null) this.props.routerState.refAuthenticationModal.openRegistration();
- // if ((this.context.refAuthenticationModal !== null)&&(typeof this.context.refAuthenticationModal !== "undefined"))
- // this.context.refAuthenticationModal.openRegistration();
- }
- render() {
- //console.log("######## NOT AUTHENTICATED HEADER", this);
- return _jsx('ul', {
- className: 'nav navbar-top-links navbar-right'
- }, void 0, _ref, _jsx('li', {}, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_1__Link_Link__["a" /* default */], {
- to: '/login',
- onClick: this.handleSignIn.bind(this)
- }, void 0, _ref2, _ref3)), _jsx('li', {}, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_1__Link_Link__["a" /* default */], {
- to: '/register',
- onClick: this.handleRegister.bind(this)
- }, void 0, _ref4, _ref5)));
- }
- };
- function mapState(state) {
- return {
- routerState: state.routerState
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4_react_redux__["connect"])(mapState, mapDispatch)(NotAuthenticatedHeaderNavigationMenu));
- /***/ }),
- /* 68 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link_Link__ = __webpack_require__(5);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Header_Navigation_Menu_HeaderNavigationMenu__ = __webpack_require__(66);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- var _class, _temp;
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/8/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx('div', {
- className: 'navbar-header'
- }, void 0, _jsx('a', {
- className: 'navbar-minimalize minimalize-styl-2 btn btn-primary ',
- href: '#'
- }, void 0, _jsx('i', {
- className: 'fa fa-bars'
- }), ' '), _jsx('form', {
- role: 'search',
- className: 'navbar-form-custom',
- action: 'http://webapplayers.com/inspinia_admin-v2.7.1/search_results.html'
- }, void 0, _jsx('div', {
- className: 'form-group'
- }, void 0, _jsx('input', {
- type: 'text',
- placeholder: 'Search for something...',
- className: 'form-control',
- name: 'top-search',
- id: 'top-search'
- }))));
- var _ref2 = _jsx(__WEBPACK_IMPORTED_MODULE_3__Header_Navigation_Menu_HeaderNavigationMenu__["a" /* default */], {});
- let TopNavbar = (_temp = _class = function () {
- function TopNavbar(props) {
- //console.log("###### TOP NAVBAR",this);
- return _jsx('div', {
- className: 'row border-bottom'
- }, void 0, _jsx('nav', {
- className: 'navbar navbar-static-top white-bg',
- role: 'navigation',
- style: { marginBottom: 0 }
- }, void 0, _ref, _ref2));
- }
- return TopNavbar;
- }(), _class.contextTypes = {
- refAuthenticationModal: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.any
- }, _temp);
- /* harmony default export */ __webpack_exports__["a"] = (TopNavbar);
- /***/ }),
- /* 69 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ModalComponent; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/11/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx('button', {
- type: 'button',
- className: 'close',
- 'data-dismiss': 'modal'
- }, void 0, _jsx('span', {
- 'aria-hidden': 'true'
- }, void 0, '\xD7'), _jsx('span', {
- className: 'sr-only'
- }, void 0, 'Close'));
- let ModalComponent = class ModalComponent extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- this.modalRef = null;
- this.state = {
- isModalOpen: props.showModal || true,
- title: 'TITLE',
- subTitle: 'SUB TITLE',
- body: 'BODY',
- closable: true,
- buttons: [{ className: 'btn-white', closable: true, text: 'Close' }, { className: 'btn-primary', closable: false, text: 'Save' }],
- animation: "animated flipInY"
- };
- }
- showAlert(title, subTitle, body, buttons) {
- this.setState({
- title: title,
- subTitle: subTitle,
- body: body,
- closable: true,
- buttons: buttons,
- animation: "animated flipInY"
- });
- this.showModal();
- }
- showModal() {
- $(this.modalRef).modal("show");
- this.setState({
- isModalOpen: true
- });
- }
- hideModal() {
- $(this.modalRef).modal("hide");
- this.setState({
- isModalOpen: false
- });
- }
- closeModal() {
- this.hideModal();
- }
- handleToggle() {
- if (this.state.isModalOpen === true) this.hideModal();else this.showModal();
- }
- renderButtons(buttons) {
- let output = [];
- if (typeof buttons === "undefined") return '';
- for (let i = 0; i < buttons.length; i++) {
- let button = buttons[i];
- output.push(_jsx('button', {
- type: 'button',
- className: "btn " + buttons[i].className || '',
- onClick: button.onClick || function () {},
- 'data-dismiss': (button.closable || false) === true ? "modal" : ''
- }, "modal" + this.props.modalId + "_Button" + i, ' ', button.text || '', ' '));
- }
- if (output === []) return '';
- return _jsx('div', {
- className: 'modal-footer'
- }, void 0, output);
- }
- render() {
- let body = this.props.body || this.state.body;
- let children = this.props.children || null;
- let title = this.props.title || this.state.title;
- let subTitle = this.props.subTitle || this.state.subTitle;
- let closable = this.props.closable || this.state.subTitle;
- let buttons = this.props.buttons || this.state.buttons;
- let animation = this.props.animation || this.state.animation;
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
- 'div',
- { className: 'modal inmodal in', key: "modal" + this.props.modalId, ref: c => this.modalRef = c, role: 'dialog', 'aria-hidden': 'true' },
- _jsx('div', {
- className: 'modal-dialog'
- }, void 0, _jsx('div', {
- className: "modal-content " + (animation !== '' ? animation : '')
- }, void 0, _jsx('div', {
- className: 'modal-header'
- }, void 0, closable === true ? _ref : '', title !== '' ? _jsx('h4', {
- className: 'modal-title'
- }, void 0, title) : '', subTitle !== '' ? _jsx('small', {
- className: 'font-bold'
- }, void 0, subTitle) : ''), body !== '' && typeof body !== "undefined" || children !== null ? _jsx('div', {
- className: 'modal-body'
- }, void 0, body !== '' ? _jsx('p', {}, void 0, body) : '', children) : '', buttons !== [] && buttons !== null && typeof buttons !== "undefined" ? this.renderButtons.call(this, buttons) : ''))
- );
- }
- };
- /***/ }),
- /* 70 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AutocompleteSelect; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_select__ = __webpack_require__(17);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_select__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_jsonp__ = __webpack_require__(148);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_jsonp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_jsonp__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 5/25/2017.
- * (C) BIT TECHNOLOGIES
- */
- let AutocompleteSelect = class AutocompleteSelect extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- this.state = {
- backspaceRemoves: false,
- creatable: true,
- value: props.value || ''
- };
- }
- onChange(value) {
- this.setState({
- value: value
- });
- let answer;
- if ((this.props.multi || false) === true) {
- //multiple keywords
- if (!Array.isArray(value)) value = [value];
- answer = [];
- value.forEach(function (element) {
- answer.push(element.value);
- });
- } else //just value
- answer = value;
- console.log("AUTOCOMPLETE:: ", answer);
- let onSelect = this.props.onSelect || function () {};
- onSelect(answer);
- }
- getSuggestionsGitHub(input) {
- if (!input) return Promise.resolve({ options: [] });
- return fetch(`https://api.github.com/search/users?q=${input}`).then(response => response.json()).then(json => {
- return { options: json.items };
- });
- }
- //using Google http://google.com/complete/search?client=firefox&hl=ro&q=theory
- getSuggestions(input) {
- if (!input) return Promise.resolve({ options: [] });
- return new Promise(resolve => {
- __WEBPACK_IMPORTED_MODULE_3_jsonp___default()(`http://google.com/complete/search?client=firefox&hl=ro&q=${input}`, null, function (err, data) {
- if (err) {
- console.error('Error getting KEYWORDS ' + err.message);
- } else {
- //console.log({options: data[1]});
- var keywords = data[1];
- var optionsKeywords = [];
- keywords.forEach(function (entry) {
- optionsKeywords.push({
- value: entry,
- label: entry
- });
- });
- //console.log({options: optionsKeywords});
- resolve({ options: optionsKeywords });
- }
- });
- });
- }
- render() {
- const AsyncSelectComponent = this.state.creatable ? __WEBPACK_IMPORTED_MODULE_2_react_select___default.a.AsyncCreatable : __WEBPACK_IMPORTED_MODULE_2_react_select___default.a.Async;
- return _jsx('div', {
- className: 'section'
- }, void 0, (this.props.label || '') !== '' ? _jsx('h3', {
- className: 'section-heading'
- }, void 0, this.props.label) : '', _jsx(AsyncSelectComponent, {
- multi: this.props.multi || false,
- value: this.state.value,
- onChange: this.onChange.bind(this),
- valueKey: 'value',
- labelKey: 'label',
- loadOptions: this.getSuggestions.bind(this),
- backspaceRemoves: this.state.backspaceRemoves
- }));
- }
- };
- /***/ }),
- /* 71 */
- /***/ (function(module, exports) {
- module.exports = [{ value: 'ad', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ad", label: "Andorra" }, { value: 'ae', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ae", label: "United Arab Emirates" }, { value: 'af', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag af", label: "Afghanistan" }, { value: 'ag', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ag", label: "Antigua and Barbuda" }, { value: 'ai', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ai", label: "Anguilla" }, { value: 'al', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag al", label: "Albania" }, { value: 'am', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag am", label: "Armenia" }, { value: 'an', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag an", label: "Netherlands Antilles" }, { value: 'ao', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ao", label: "Angola" }, { value: 'aq', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag aq", label: "Antarctica" }, { value: 'ar', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ar", label: "Argentina" }, { value: 'as', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag as", label: "American Samoa" }, { value: 'at', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag at", label: "Austria" }, { value: 'au', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag au", label: "Australia" }, { value: 'aw', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag aw", label: "Aruba" }, { value: 'ax', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ax", label: "Aland Islands" }, { value: 'az', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag az", label: "Azerbaijan" }, { value: 'ba', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ba", label: "Bosnia and Herzegovina" }, { value: 'bb', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bb", label: "Barbados" }, { value: 'bd', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bd", label: "Bangladesh" }, { value: 'be', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag be", label: "Belgium" }, { value: 'bf', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bf", label: "Burkina Faso" }, { value: 'bg', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bg", label: "Bulgaria" }, { value: 'bh', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bh", label: "Bahrain" }, { value: 'bi', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bi", label: "Burundi" }, { value: 'bj', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bj", label: "Benin" }, { value: 'bm', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bm", label: "Bermuda" }, { value: 'bn', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bn", label: "Brunei Darussalam" }, { value: 'bo', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bo", label: "Bolivia" }, { value: 'br', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag br", label: "Brazil" }, { value: 'bs', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bs", label: "Bahamas" }, { value: 'bt', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bt", label: "Bhutan" }, { value: 'bv', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bv", label: "Bouvet Island" }, { value: 'bw', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bw", label: "Botswana" }, { value: 'by', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag by", label: "Belarus" }, { value: 'bz', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag bz", label: "Belize" }, { value: 'ca', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ca", label: "Canada" }, { value: 'cc', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag cc", label: "Cocos (Keeling) Islands" }, { value: 'cd', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag cd", label: "Democratic Republic of the Congo" }, { value: 'cf', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag cf", label: "Central African Republic" }, { value: 'cg', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag cg", label: "Congo" }, { value: 'ch', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ch", label: "Switzerland" }, { value: 'ci', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ci", label: "Cote D'Ivoire (Ivory Coast)" }, { value: 'ck', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ck", label: "Cook Islands" }, { value: 'cl', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag cl", label: "Chile" }, { value: 'cm', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag cm", label: "Cameroon" }, { value: 'cn', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag cn", label: "China" }, { value: 'co', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag co", label: "Colombia" }, { value: 'cr', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag cr", label: "Costa Rica" }, { value: 'cs', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag cs", label: "Serbia and Montenegro" }, { value: 'cu', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag cu", label: "Cuba" }, { value: 'cv', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag cv", label: "Cape Verde" }, { value: 'cx', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag cx", label: "Christmas Island" }, { value: 'cy', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag cy", label: "Cyprus" }, { value: 'cz', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag cz", label: "Czech Republic" }, { value: 'de', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag de", label: "Germany" }, { value: 'dj', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag dj", label: "Djibouti" }, { value: 'dk', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag dk", label: "Denmark" }, { value: 'dm', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag dm", label: "Dominica" }, { value: 'do', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag do", label: "Dominican Republic" }, { value: 'dz', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag dz", label: "Algeria" }, { value: 'ec', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ec", label: "Ecuador" }, { value: 'ee', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ee", label: "Estonia" }, { value: 'eg', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag eg", label: "Egypt" }, { value: 'eh', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag eh", label: "Western Sahara" }, { value: 'er', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag er", label: "Eritrea" }, { value: 'es', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag es", label: "Spain" }, { value: 'et', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag et", label: "Ethiopia" }, { value: 'fi', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag fi", label: "Finland" }, { value: 'fj', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag fj", label: "Fiji" }, { value: 'fk', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag fk", label: "Falkland Islands (Malvinas)" }, { value: 'fm', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag fm", label: "Federated States of Micronesia" }, { value: 'fo', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag fo", label: "Faroe Islands" }, { value: 'fr', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag fr", label: "France" }, { value: 'fx', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag fx", label: "France, Metropolitan" }, { value: 'ga', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ga", label: "Gabon" }, { value: 'gb', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gb", label: "Great Britain (UK)" }, { value: 'gd', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gd", label: "Grenada" }, { value: 'ge', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ge", label: "Georgia" }, { value: 'gf', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gf", label: "French Guiana" }, { value: 'gh', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gh", label: "Ghana" }, { value: 'gi', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gi", label: "Gibraltar" }, { value: 'gl', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gl", label: "Greenland" }, { value: 'gm', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gm", label: "Gambia" }, { value: 'gn', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gn", label: "Guinea" }, { value: 'gp', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gp", label: "Guadeloupe" }, { value: 'gq', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gq", label: "Equatorial Guinea" }, { value: 'gr', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gr", label: "Greece" }, { value: 'gs', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gs", label: "S. Georgia and S. Sandwich Islands" }, { value: 'gt', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gt", label: "Guatemala" }, { value: 'gu', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gu", label: "Guam" }, { value: 'gw', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gw", label: "Guinea-Bissau" }, { value: 'gy', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag gy", label: "Guyana" }, { value: 'hk', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag hk", label: "Hong Kong" }, { value: 'hm', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag hm", label: "Heard Island and McDonald Islands" }, { value: 'hn', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag hn", label: "Honduras" }, { value: 'hr', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag hr", label: "Croatia (Hrvatska)" }, { value: 'ht', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ht", label: "Haiti" }, { value: 'hu', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag hu", label: "Hungary" }, { value: 'id', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag id", label: "Indonesia" }, { value: 'ie', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ie", label: "Ireland" }, { value: 'il', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag il", label: "Israel" }, { value: 'in', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag in", label: "India" }, { value: 'io', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag io", label: "British Indian Ocean Territory" }, { value: 'iq', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag iq", label: "Iraq" }, { value: 'ir', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ir", label: "Iran" }, { value: 'is', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag is", label: "Iceland" }, { value: 'it', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag it", label: "Italy" }, { value: 'jm', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag jm", label: "Jamaica" }, { value: 'jo', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag jo", label: "Jordan" }, { value: 'jp', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag jp", label: "Japan" }, { value: 'ke', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ke", label: "Kenya" }, { value: 'kg', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag kg", label: "Kyrgyzstan" }, { value: 'kh', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag kh", label: "Cambodia" }, { value: 'ki', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ki", label: "Kiribati" }, { value: 'km', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag km", label: "Comoros" }, { value: 'kn', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag kn", label: "Saint Kitts and Nevis" }, { value: 'kp', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag kp", label: "Korea (North)" }, { value: 'kr', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag kr", label: "Korea (South)" }, { value: 'kw', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag kw", label: "Kuwait" }, { value: 'ky', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ky", label: "Cayman Islands" }, { value: 'kz', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag kz", label: "Kazakhstan" }, { value: 'la', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag la", label: "Laos" }, { value: 'lb', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag lb", label: "Lebanon" }, { value: 'lc', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag lc", label: "Saint Lucia" }, { value: 'li', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag li", label: "Liechtenstein" }, { value: 'lk', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag lk", label: "Sri Lanka" }, { value: 'lr', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag lr", label: "Liberia" }, { value: 'ls', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ls", label: "Lesotho" }, { value: 'lt', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag lt", label: "Lithuania" }, { value: 'lu', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag lu", label: "Luxembourg" }, { value: 'lv', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag lv", label: "Latvia" }, { value: 'ly', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ly", label: "Libya" }, { value: 'ma', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ma", label: "Morocco" }, { value: 'mc', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mc", label: "Monaco" }, { value: 'md', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag md", label: "Moldova" }, { value: 'mg', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mg", label: "Madagascar" }, { value: 'mh', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mh", label: "Marshall Islands" }, { value: 'mk', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mk", label: "Macedonia" }, { value: 'ml', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ml", label: "Mali" }, { value: 'mm', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mm", label: "Myanmar" }, { value: 'mn', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mn", label: "Mongolia" }, { value: 'mo', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mo", label: "Macao" }, { value: 'mp', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mp", label: "Northern Mariana Islands" }, { value: 'mq', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mq", label: "Martinique" }, { value: 'mr', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mr", label: "Mauritania" }, { value: 'ms', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ms", label: "Montserrat" }, { value: 'mt', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mt", label: "Malta" }, { value: 'mu', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mu", label: "Mauritius" }, { value: 'mv', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mv", label: "Maldives" }, { value: 'mw', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mw", label: "Malawi" }, { value: 'mx', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mx", label: "Mexico" }, { value: 'my', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag my", label: "Malaysia" }, { value: 'mz', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag mz", label: "Mozambique" }, { value: 'na', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag na", label: "Namibia" }, { value: 'nc', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag nc", label: "New Caledonia" }, { value: 'ne', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ne", label: "Niger" }, { value: 'nf', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag nf", label: "Norfolk Island" }, { value: 'ng', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ng", label: "Nigeria" }, { value: 'ni', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ni", label: "Nicaragua" }, { value: 'nl', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag nl", label: "Netherlands" }, { value: 'no', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag no", label: "Norway" }, { value: 'np', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag np", label: "Nepal" }, { value: 'nr', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag nr", label: "Nauru" }, { value: 'nu', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag nu", label: "Niue" }, { value: 'nz', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag nz", label: "New Zealand (Aotearoa)" }, { value: 'om', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag om", label: "Oman" }, { value: 'pa', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag pa", label: "Panama" }, { value: 'pe', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag pe", label: "Peru" }, { value: 'pf', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag pf", label: "French Polynesia" }, { value: 'pg', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag pg", label: "Papua New Guinea" }, { value: 'ph', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ph", label: "Philippines" }, { value: 'pk', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag pk", label: "Pakistan" }, { value: 'pl', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag pl", label: "Poland" }, { value: 'pm', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag pm", label: "Saint Pierre and Miquelon" }, { value: 'pn', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag pn", label: "Pitcairn" }, { value: 'pr', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag pr", label: "Puerto Rico" }, { value: 'ps', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ps", label: "Palestinian Territory" }, { value: 'pt', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag pt", label: "Portugal" }, { value: 'pw', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag pw", label: "Palau" }, { value: 'py', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag py", label: "Paraguay" }, { value: 'qa', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag qa", label: "Qatar" }, { value: 're', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag re", label: "Reunion" }, { value: 'ro', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ro", label: "Romania" }, { value: 'ru', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ru", label: "Russian Federation" }, { value: 'rw', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag rw", label: "Rwanda" }, { value: 'sa', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sa", label: "Saudi Arabia" }, { value: 'sb', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sb", label: "Solomon Islands" }, { value: 'sc', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sc", label: "Seychelles" }, { value: 'sd', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sd", label: "Sudan" }, { value: 'se', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag se", label: "Sweden" }, { value: 'sg', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sg", label: "Singapore" }, { value: 'sh', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sh", label: "Saint Helena" }, { value: 'si', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag si", label: "Slovenia" }, { value: 'sj', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sj", label: "Svalbard and Jan Mayen" }, { value: 'sk', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sk", label: "Slovakia" }, { value: 'sl', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sl", label: "Sierra Leone" }, { value: 'sm', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sm", label: "San Marino" }, { value: 'sn', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sn", label: "Senegal" }, { value: 'so', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag so", label: "Somalia" }, { value: 'sr', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sr", label: "Suriname" }, { value: 'st', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag st", label: "Sao Tome and Principe" }, { value: 'su', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag su", label: "USSR (former)" }, { value: 'sv', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sv", label: "El Salvador" }, { value: 'sy', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sy", label: "Syria" }, { value: 'sz', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag sz", label: "Swaziland" }, { value: 'tc', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag tc", label: "Turks and Caicos Islands" }, { value: 'td', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag td", label: "Chad" }, { value: 'tf', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag tf", label: "French Southern Territories" }, { value: 'tg', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag tg", label: "Togo" }, { value: 'th', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag th", label: "Thailand" }, { value: 'tj', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag tj", label: "Tajikistan" }, { value: 'tk', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag tk", label: "Tokelau" }, { value: 'tl', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag tl", label: "Timor-Leste" }, { value: 'tm', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag tm", label: "Turkmenistan" }, { value: 'tn', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag tn", label: "Tunisia" }, { value: 'to', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag to", label: "Tonga" }, { value: 'tp', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag tp", label: "East Timor" }, { value: 'tr', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag tr", label: "Turkey" }, { value: 'tt', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag tt", label: "Trinidad and Tobago" }, { value: 'tv', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag tv", label: "Tuvalu" }, { value: 'tw', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag tw", label: "Taiwan" }, { value: 'tz', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag tz", label: "Tanzania" }, { value: 'ua', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ua", label: "Ukraine" }, { value: 'ug', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ug", label: "Uganda" }, { value: 'uk', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag uk", label: "United Kingdom" }, { value: 'um', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag um", label: "United States Minor Outlying Islands" }, { value: 'us', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag us", label: "United States" }, { value: 'uy', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag uy", label: "Uruguay" }, { value: 'uz', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag uz", label: "Uzbekistan" }, { value: 'va', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag va", label: "Vatican City State (Holy See)" }, { value: 'vc', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag vc", label: "Saint Vincent and the Grenadines" }, { value: 've', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ve", label: "Venezuela" }, { value: 'vg', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag vg", label: "Virgin Islands (British)" }, { value: 'vi', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag vi", label: "Virgin Islands (U.S.)" }, { value: 'vn', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag vn", label: "Viet Nam" }, { value: 'vu', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag vu", label: "Vanuatu" }, { value: 'wf', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag wf", label: "Wallis and Futuna" }, { value: 'ws', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ws", label: "Samoa" }, { value: 'ye', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag ye", label: "Yemen" }, { value: 'yt', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag yt", label: "Mayotte" }, { value: 'yu', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag yu", label: "Yugoslavia (former)" }, { value: 'za', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag za", label: "South Africa" }, { value: 'zm', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag zm", label: "Zambia" }, { value: 'zr', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag zr", label: "Zaire (former)" }, { value: 'zw', flag: "http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/images/msdropdown/icons/blank.gif", imageCSS: "flag zw", label: "Zimbabwe" }];
- /***/ }),
- /* 72 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ButtonsContent; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_REST_authentication_Auth_service__ = __webpack_require__(3);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__forums_components_AddForum_form_component__ = __webpack_require__(74);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 5/24/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx(__WEBPACK_IMPORTED_MODULE_3__forums_components_AddForum_form_component__["a" /* default */], {});
- var _ref2 = _jsx(__WEBPACK_IMPORTED_MODULE_3__forums_components_AddForum_form_component__["a" /* default */], {});
- let ButtonsContent = class ButtonsContent extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- console.log("FORUM BUTTONS CONSTRUCTOR");
- this.state = {
- showAddTopicForm: props.showAddTopicForm || false,
- showAddForumForm: props.showAddForumForm || false,
- showAddReplyForm: props.showAddReplyForm || false,
- btnAddTopic: props.btnAddTopic || true,
- btnAddForum: props.btnAddForum || true,
- btnAddReply: props.btnAddReply || true
- };
- }
- handleAddForum(e) {
- //e.preventDefault(); e.stopPropagation();
- this.setState({
- showAddForumForm: true
- });
- }
- handleAddTopic(e) {
- e.preventDefault();e.stopPropagation();
- }
- handleAddReply(e) {
- e.preventDefault();e.stopPropagation();
- }
- showAddForum() {
- console.log('a mers222');
- return _ref;
- }
- showAddTopic() {
- return _ref2;
- }
- render() {
- return _jsx('div', {
- className: 'row'
- }, void 0, console.log(this.state), _jsx('div', {
- style: { paddingTop: 20 }
- }, void 0, this.state.btnAddForum ? _jsx('button', {
- type: 'button',
- className: 'btn btn-warning dim btn-rounded',
- 'data-toggle': 'button',
- 'aria-pressed': 'true',
- onClick: this.handleAddForum.bind(this),
- style: { marginRight: 5 }
- }, void 0, _jsx('i', {
- className: 'fa fa-users',
- style: { marginRight: 5 }
- }), 'Forum') : '', this.state.btnAddTopic ? _jsx('button', {
- type: 'button',
- className: 'btn btn-success dim btn-rounded',
- onClick: this.handleAddTopic.bind(this),
- style: { marginRight: 5 }
- }, void 0, _jsx('i', {
- className: 'fa fa-pencil',
- style: { marginRight: 5 }
- }), 'Topic') : '', this.state.btnAddReply ? _jsx('button', {
- type: 'button',
- className: 'btn btn-danger dim btn-rounded',
- onClick: this.handleAddTopic.bind(this),
- style: { marginRight: 5 }
- }, void 0, _jsx('i', {
- className: 'fa fa-comment',
- style: { marginRight: 5 }
- }), 'Reply') : ''), this.state.showAddForumForm ? this.showAddForum() : '');
- }
- };
- /***/ }),
- /* 73 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_REST_authentication_Auth_service__ = __webpack_require__(3);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_REST_forums_content_ContentObject_service__ = __webpack_require__(31);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__forums_models_Forum_model__ = __webpack_require__(6);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__forums_view_forum_PreviewForum_component__ = __webpack_require__(25);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/4/2017.
- * (C) BIT TECHNOLOGIES
- */
- let PreviewContent = class PreviewContent extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- }
- renderForum() {
- let forum = new __WEBPACK_IMPORTED_MODULE_4__forums_models_Forum_model__["a" /* default */](this.props.object);
- return _jsx(__WEBPACK_IMPORTED_MODULE_5__forums_view_forum_PreviewForum_component__["a" /* default */], {
- forum: forum
- }, forum.id);
- }
- render() {
- let extractedIdData = __WEBPACK_IMPORTED_MODULE_3__services_REST_forums_content_ContentObject_service__["a" /* default */].extractDataFromIds(this.props.object.id);
- let objectType = extractedIdData.objectType || '';
- switch (objectType) {
- case 'frm':
- return this.renderForum();
- case 'us':
- return this.renderForum();
- case 'top':
- return this.renderForum();
- }
- }
- };
- function mapState(state) {
- return {
- userAuthenticated: state.userAuthenticated
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"])(mapState, mapDispatch)(PreviewContent));
- /***/ }),
- /* 74 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_REST_forums_forums_Forums_service__ = __webpack_require__(14);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__client_components_util_components_select_Autocomplete_select_component__ = __webpack_require__(70);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__client_components_util_components_select_MyCountry_select_component__ = __webpack_require__(23);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_select__ = __webpack_require__(17);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react_select__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 5/16/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx('div', {
- className: 'panel-heading'
- }, void 0, _jsx('h2', {}, void 0, 'Create a ', _jsx('strong', {}, void 0, 'Forum')));
- var _ref2 = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-header'
- }));
- var _ref3 = _jsx('br', {});
- var _ref4 = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-info'
- }));
- var _ref5 = _jsx('br', {});
- var _ref6 = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-tags'
- }));
- var _ref7 = _jsx('br', {});
- var _ref8 = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-flag'
- }));
- var _ref9 = _jsx('br', {});
- var _ref10 = _jsx('span', {
- className: 'input-group-addon'
- }, void 0, _jsx('i', {
- className: 'fa fa-institution'
- }));
- var _ref11 = _jsx('br', {});
- var _ref12 = _jsx('i', {
- className: 'fa fa-plus'
- });
- let AddForumForm = class AddForumForm extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- this.state = {
- title: '',
- description: '',
- keywords: [],
- countryCode: '', country: '',
- city: '',
- language: '',
- latitude: 0, longitude: 0,
- parentName: '',
- parentId: '',
- titleValidationStatus: [null, ''],
- descriptionValidationStatus: [null, ''],
- keywordsValidationStatus: [null, ''],
- countryValidationStatus: [null, ''],
- cityValidationStatus: [null, '']
- };
- }
- handleAddForum(e) {
- if (typeof e !== "undefined") {
- e.preventDefault();
- e.stopPropagation();
- }
- var onSuccess = this.props.onSuccess || function () {};
- var onError = this.props.onError || function () {};
- var titleValidationStatus = [null, ''],
- descriptionValidationStatus = [null, ''],
- keywordsValidationStatus = [null, ''],
- countryValidationStatus = [null, ''],
- cityValidationStatus = [null, ''];
- var bValidationError = false;
- this.setState({
- titleValidationStatus: titleValidationStatus,
- descriptionValidationStatus: descriptionValidationStatus,
- keywordsValidationStatus: keywordsValidationStatus,
- countryValidationStatus: countryValidationStatus,
- cityValidationStatus: cityValidationStatus
- });
- console.log('ADDing forum... ');
- let sCountryCode = this.state.countryCode;
- if (sCountryCode === '') sCountryCode = this.props.localization.countryCode;
- let sCity = this.state.city;
- if (sCity === '') sCity = this.props.localization.city;
- if (!bValidationError) __WEBPACK_IMPORTED_MODULE_2__services_REST_forums_forums_Forums_service__["a" /* default */].forumAddAsync(this.state.parentId, this.state.title, this.state.description, this.state.keywords, sCountryCode, '', sCity, this.state.latitude, this.state.longitude, this.state.timeZone).then(res => {
- console.log("ANSWER FROM adding forum", res);
- if (res.result === true) {
- onSuccess(res);
- } else if (res.result === false) {
- if (typeof res.errors.title !== "undefined" && Object.keys(res.errors.title).length !== 0) titleValidationStatus = ["error", this.convertValidationErrorToString(res.errors.title[0])];
- if (typeof res.errors.description !== "undefined" && Object.keys(res.errors.description).length !== 0) descriptionValidationStatus = ["error", this.convertValidationErrorToString(res.errors.description[0])];
- if (typeof res.errors.keywords !== "undefined" && Object.keys(res.errors.keywords).length !== 0) keywordsValidationStatus = ["error", this.convertValidationErrorToString(res.errors.keywords[0])];
- if (typeof res.errors.country !== "undefined" && Object.keys(res.errors.country).length !== 0) countryValidationStatus = ["error", this.convertValidationErrorToString(res.errors.country[0])];
- if (typeof res.errors.city !== "undefined" && Object.keys(res.errors.city).length !== 0) cityValidationStatus = ["error", this.convertValidationErrorToString(res.errors.city[0])];
- //in case there are no other errors, except the fact that I am not logged In
- if (typeof res.errors.authorId !== "undefined" && Object.keys(res.errors.authorId).length !== 0) if (titleValidationStatus[0] === null && descriptionValidationStatus[0] === null && keywordsValidationStatus[0] === null && countryValidationStatus[0] === null && cityValidationStatus[0] === null) this.openLogin();
- this.setState({
- titleValidationStatus: titleValidationStatus,
- descriptionValidationStatus: descriptionValidationStatus,
- keywordsValidationStatus: keywordsValidationStatus,
- countryValidationStatus: countryValidationStatus,
- cityValidationStatus: cityValidationStatus
- });
- onError(res);
- }
- });
- }
- handleTitleChangeSelect(value) {
- this.setState({
- title: value,
- titleValidationStatus: [null, '']
- });
- }
- handleTitleChange(e) {
- this.handleTitleChangeSelect(e.target.value);
- }
- handleDescriptionChange(e) {
- this.setState({
- description: e.target.value,
- descriptionValidationStatus: [null, '']
- });
- }
- handleKeywordsSelect(value) {
- this.setState({
- keywords: value,
- keywordsValidationStatus: [null, '']
- });
- console.log("KEYWORDS SELECTED: ", value);
- }
- handleCountrySelect(val) {
- this.setState({
- country: val.label,
- countryCode: val.value,
- countryValidationStatus: [null, '']
- });
- console.log("values selected are:", val);
- }
- handleCityChange(e) {
- this.setState({
- city: e.target.value,
- cityValidationStatus: null, cityValidationStatusText: ''
- });
- }
- openLogin() {
- if (typeof this.props.routerState.refAuthenticationModal !== "undefined") {
- this.props.routerState.refAuthenticationModal.setOnSuccessEvent(this.authenticationSuccessfully);
- this.props.routerState.refAuthenticationModal.openLogin();
- }
- }
- authenticationSuccessfully(resource) {
- this.handleAddForum();
- }
- convertValidationErrorToString(error) {
- if (error === "notUnique") return "Already exists in the Database";else if (error === "notEmpty") return "It's empty";else if (error === "validateUsername") return " Invalid username";else if (error === "validateKeywords") return " Too few keywords. Minimum 3";
- return error;
- }
- //https://www.w3schools.com/bootstrap/bootstrap_forms_inputs2.asp DOC
- showInputStatus(status) {
- return status[0] === 'error' ? "has-error has-feedback" : status[0] === 'success' ? "has-success has-feedback" : '';
- }
- showInputFeedback(status) {
- return status[0] === 'error' ? "fa fa-remove form-control-feedback" : status[0] === 'success' ? "fa fa-check form-control-feedback" : '';
- }
- render() {
- return _jsx('div', {
- className: 'col-sm-8 col-sm-offset-2',
- style: { padding: 0 }
- }, void 0, _jsx('div', {
- className: 'panel panel-warning'
- }, void 0, _ref, _jsx('div', {
- className: 'panel-body'
- }, void 0, _jsx('form', {
- onSubmit: this.handleAddForum.bind(this),
- autoComplete: 'on'
- }, void 0, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.titleValidationStatus)
- }, void 0, _ref2, _jsx('input', {
- autoFocus: true,
- type: 'text',
- className: 'form-control input-lg',
- placeholder: 'title',
- name: 'title',
- value: this.state.title,
- onChange: this.handleTitleChange.bind(this)
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.titleValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.titleValidationStatus[1]), ' ', _ref3, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.descriptionValidationStatus)
- }, void 0, _ref4, _jsx('textarea', {
- type: 'text',
- className: 'form-control input-lg',
- rows: '5',
- placeholder: 'description',
- name: 'description',
- value: this.state.description,
- onChange: this.handleDescriptionChange.bind(this)
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.descriptionValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.descriptionValidationStatus[1]), ' ', _ref5, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.keywordsValidationStatus)
- }, void 0, _ref6, _jsx(__WEBPACK_IMPORTED_MODULE_3__client_components_util_components_select_Autocomplete_select_component__["a" /* default */], {
- controlId: 'keywordsSelect',
- value: this.state.keywords,
- multi: true,
- onSelect: this.handleKeywordsSelect.bind(this),
- style: { zIndex: 0 }
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.keywordsValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.keywordsValidationStatus[1]), ' ', _ref7, _jsx('div', {
- className: 'row'
- }, void 0, _jsx('div', {
- className: 'col-sm-6'
- }, void 0, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.countryValidationStatus)
- }, void 0, _ref8, _jsx(__WEBPACK_IMPORTED_MODULE_4__client_components_util_components_select_MyCountry_select_component__["a" /* default */], {
- initialCountry: this.props.localization.countryCode || '',
- onSelect: this.handleCountrySelect.bind(this)
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.countryValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.countryValidationStatus[1]), ' ', _ref9), _jsx('div', {
- className: 'col-sm-6',
- style: { paddingBottom: 5 }
- }, void 0, _jsx('div', {
- className: "input-group " + this.showInputStatus(this.state.cityValidationStatus)
- }, void 0, _ref10, _jsx('input', {
- type: 'text',
- className: 'form-control input-lg',
- placeholder: 'city',
- value: this.props.localization.city || this.state.city,
- onChange: this.handleCityChange.bind(this)
- }), _jsx('span', {
- className: this.showInputFeedback.call(this, this.state.cityValidationStatus)
- })), _jsx('label', {
- className: 'error'
- }, void 0, this.state.cityValidationStatus[1]), ' ', _ref11)))), _jsx('div', {
- className: 'panel-footer text-right',
- style: { paddingTop: 20, paddingBottom: 20, paddingRight: 20 }
- }, void 0, _jsx('button', {
- className: 'btn btn-primary',
- type: 'button',
- onClick: this.handleAddForum.bind(this)
- }, void 0, ' ', _ref12, ' Create Forum'))));
- }
- };
- function mapState(state) {
- return {
- userAuthenticated: state.userAuthenticated,
- routerState: state.routerState,
- localization: state.localization
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"])(mapState, mapDispatch)(AddForumForm));
- /***/ }),
- /* 75 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__login_login_form__ = __webpack_require__(26);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__registration_registration_form__ = __webpack_require__(28);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__client_components_util_components_modals_Modal_component__ = __webpack_require__(69);
- let AuthenticationModal = class AuthenticationModal extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- this.refModal = null;
- this.loginRef = null;
- this.registrationRef = null;
- this.state = { modalType: 'login', modalTitle: 'Login', onSuccess: function () {} };
- }
- setOnSuccessEvent(onSuccess) {
- this.setState({
- onSuccess: onSuccess || function () {}
- });
- }
- close() {
- this.refModal.closeModal();
- }
- open() {
- this.refModal.showAlert();
- }
- setLogin() {
- this.setState({
- modalType: "login",
- modalTitle: "Login to SkyHub"
- });
- }
- openLogin() {
- this.setLogin();
- this.open("login");
- }
- setRegistration() {
- this.setState({
- modalType: "registration",
- modalTitle: "Register to SkyHub"
- });
- }
- openRegistration() {
- this.setRegistration();
- this.open("registration");
- }
- renderLogin() {
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__login_login_form__["a" /* default */], { ref: c => this.loginRef = c, onSuccess: this.loginSuccess.bind(this), onSwitch: this.switchLoginToRegistration.bind(this) });
- }
- renderRegistration() {
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__registration_registration_form__["a" /* default */], { ref: c => this.registrationRef = c, onSuccess: this.registrationSuccess.bind(this), onSwitch: this.switchRegistrationToLogin.bind(this) });
- }
- render() {
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
- __WEBPACK_IMPORTED_MODULE_3__client_components_util_components_modals_Modal_component__["a" /* default */],
- { modalId: 'AuthenticationModal', ref: c => this.refModal = c, title: this.state.modalTitle, subTitle: '', buttons: [] },
- this.state.modalType === "login" ? this.renderLogin.call(this) : this.renderRegistration.call(this)
- );
- }
- loginSuccess(resource) {
- let onSuccess = this.props.onSuccess || function () {};
- onSuccess(resource);
- onSuccess = this.state.onSuccess || function () {};
- onSuccess(resource);
- this.close();
- }
- registrationSuccess(resource) {
- let onSuccess = this.props.onSuccess || function () {};
- onSuccess(resource);
- onSuccess = this.state.onSuccess || function () {};
- onSuccess(resource);
- this.close();
- }
- switchLoginToRegistration(e) {
- e.preventDefault();e.stopPropagation();
- this.setRegistration();
- }
- switchRegistrationToLogin(e) {
- e.preventDefault();e.stopPropagation();
- this.setLogin();
- }
- };
- /* harmony default export */ __webpack_exports__["a"] = (AuthenticationModal);
- /***/ }),
- /* 76 */
- /***/ (function(module, exports) {
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 5/16/2017.
- * (C) BIT TECHNOLOGIES
- */
- /* eslint-disable import/prefer-default-export */
- const UserGenderEnum = {
- MALE: 0,
- FEMALE: 1,
- NOT_SPECIFIED: 2
- };
- const UserRolesEnum = {
- NOT_REGISTERED: 0,
- USER: 3,
- MODERATOR: 5,
- ADMIN: 8,
- SYS_ADMIN: 666
- };
- module.exports = {
- UserGenderEnum: UserGenderEnum,
- UserRolesEnum: UserRolesEnum,
- convertGenderString(sGender) {
- sGender = sGender.toLowerCase();
- switch (sGender) {
- case 'male':
- return UserGenderEnum.MALE;
- case 'female':
- return UserGenderEnum.FEMALE;
- case 'not specified':
- default:
- return UserGenderEnum.NOT_SPECIFIED;
- }
- },
- convertRoleType(sUserRoleType) {
- sUserRoleType = sUserRoleType.toLowerCase();
- switch (sUserRoleType) {
- case 'user':
- return UserRolesEnum.USER;
- case 'admin':
- case 'administrator':
- return UserRolesEnum.ADMIN;
- case 'moderator':
- return UserRolesEnum.MODERATOR;
- case 'sys admin':
- case 'system admin':
- return UserRolesEnum.SYS_ADMIN;
- case 'not registered':
- case 'anonymous':
- return UserRolesEnum.NOT_REGISTERED;
- default:
- return UserRolesEnum.USER;
- }
- },
- getTimeZone: function (timeZone) {
- return '';
- },
- getGenderString: function (gender) {
- switch (gender) {
- case UserGenderEnum.FEMALE:
- return 'female';
- case UserGenderEnum.MALE:
- return 'male';
- case UserGenderEnum.NOT_SPECIFIED:
- default:
- return 'not specified';
- }
- },
- getRoleString: function (role) {
- switch (role) {
- case UserRolesEnum.ADMIN:
- return 'admin';
- case UserRolesEnum.MODERATOR:
- return 'moderator';
- case UserRolesEnum.NOT_REGISTERED:
- return 'not registered';
- case UserRolesEnum.SYS_ADMIN:
- return 'system admin';
- case UserRolesEnum.USER:
- return 'user';
- default:
- return 'not specified';
- }
- }
- };
- /***/ }),
- /* 77 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_isomorphic_fetch__ = __webpack_require__(45);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_isomorphic_fetch___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_isomorphic_fetch__);
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- /**
- * Creates a wrapper function around the HTML5 Fetch API that provides
- * default arguments to fetch(...) and is intended to reduce the amount
- * of boilerplate code in the application.
- * https://developer.mozilla.org/docs/Web/API/Fetch_API/Using_Fetch
- */
- function createFetch({ baseUrl, cookie }) {
- // NOTE: Tweak the default options to suite your application needs
- const defaults = {
- method: 'POST', // handy with GraphQL backends
- mode: baseUrl ? 'cors' : 'same-origin',
- credentials: baseUrl ? 'include' : 'same-origin',
- headers: _extends({
- Accept: 'application/json',
- 'Content-Type': 'application/json'
- }, cookie ? { Cookie: cookie } : null)
- };
- return (url, options) => url.startsWith('/graphql') || url.startsWith('/api') ? __WEBPACK_IMPORTED_MODULE_0_isomorphic_fetch___default()(`${baseUrl}${url}`, _extends({}, defaults, options, {
- headers: _extends({}, defaults.headers, options && options.headers)
- })) : __WEBPACK_IMPORTED_MODULE_0_isomorphic_fetch___default()(url, options);
- }
- /* harmony default export */ __webpack_exports__["a"] = (createFetch);
- /***/ }),
- /* 78 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sequelize__ = __webpack_require__(13);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sequelize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_sequelize__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sequelize__ = __webpack_require__(11);
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- const User = __WEBPACK_IMPORTED_MODULE_1__sequelize__["a" /* default */].define('User', {
- id: {
- type: __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a.UUID,
- defaultValue: __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a.UUIDV1,
- primaryKey: true
- },
- email: {
- type: __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a.STRING(255),
- validate: { isEmail: true }
- },
- emailConfirmed: {
- type: __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a.BOOLEAN,
- defaultValue: false
- }
- }, {
- indexes: [{ fields: ['email'] }]
- });
- /* harmony default export */ __webpack_exports__["a"] = (User);
- /***/ }),
- /* 79 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sequelize__ = __webpack_require__(13);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sequelize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_sequelize__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sequelize__ = __webpack_require__(11);
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- const UserClaim = __WEBPACK_IMPORTED_MODULE_1__sequelize__["a" /* default */].define('UserClaim', {
- type: {
- type: __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a.STRING
- },
- value: {
- type: __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a.STRING
- }
- });
- /* harmony default export */ __webpack_exports__["a"] = (UserClaim);
- /***/ }),
- /* 80 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sequelize__ = __webpack_require__(13);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sequelize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_sequelize__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sequelize__ = __webpack_require__(11);
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- const UserLogin = __WEBPACK_IMPORTED_MODULE_1__sequelize__["a" /* default */].define('UserLogin', {
- name: {
- type: __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a.STRING(50),
- primaryKey: true
- },
- key: {
- type: __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a.STRING(100),
- primaryKey: true
- }
- });
- /* harmony default export */ __webpack_exports__["a"] = (UserLogin);
- /***/ }),
- /* 81 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sequelize__ = __webpack_require__(13);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sequelize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_sequelize__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sequelize__ = __webpack_require__(11);
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- const UserProfile = __WEBPACK_IMPORTED_MODULE_1__sequelize__["a" /* default */].define('UserProfile', {
- userId: {
- type: __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a.UUID,
- primaryKey: true
- },
- displayName: {
- type: __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a.STRING(100)
- },
- picture: {
- type: __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a.STRING(255)
- },
- gender: {
- type: __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a.STRING(50)
- },
- location: {
- type: __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a.STRING(100)
- },
- website: {
- type: __WEBPACK_IMPORTED_MODULE_0_sequelize___default.a.STRING(255)
- }
- });
- /* harmony default export */ __webpack_exports__["a"] = (UserProfile);
- /***/ }),
- /* 82 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sequelize__ = __webpack_require__(11);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__User__ = __webpack_require__(78);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__UserLogin__ = __webpack_require__(80);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__UserClaim__ = __webpack_require__(79);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__UserProfile__ = __webpack_require__(81);
- /* unused harmony reexport User */
- /* unused harmony reexport UserLogin */
- /* unused harmony reexport UserClaim */
- /* unused harmony reexport UserProfile */
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- __WEBPACK_IMPORTED_MODULE_1__User__["a" /* default */].hasMany(__WEBPACK_IMPORTED_MODULE_2__UserLogin__["a" /* default */], {
- foreignKey: 'userId',
- as: 'logins',
- onUpdate: 'cascade',
- onDelete: 'cascade'
- });
- __WEBPACK_IMPORTED_MODULE_1__User__["a" /* default */].hasMany(__WEBPACK_IMPORTED_MODULE_3__UserClaim__["a" /* default */], {
- foreignKey: 'userId',
- as: 'claims',
- onUpdate: 'cascade',
- onDelete: 'cascade'
- });
- __WEBPACK_IMPORTED_MODULE_1__User__["a" /* default */].hasOne(__WEBPACK_IMPORTED_MODULE_4__UserProfile__["a" /* default */], {
- foreignKey: 'userId',
- as: 'profile',
- onUpdate: 'cascade',
- onDelete: 'cascade'
- });
- function sync(...args) {
- return __WEBPACK_IMPORTED_MODULE_0__sequelize__["a" /* default */].sync(...args);
- }
- /* harmony default export */ __webpack_exports__["a"] = ({ sync });
- /***/ }),
- /* 83 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__types_UserType__ = __webpack_require__(87);
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- const me = {
- type: __WEBPACK_IMPORTED_MODULE_0__types_UserType__["a" /* default */],
- resolve({ request }) {
- return request.user && {
- id: request.user.id,
- email: request.user.email
- };
- }
- };
- /* harmony default export */ __webpack_exports__["a"] = (me);
- /***/ }),
- /* 84 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_graphql__ = __webpack_require__(16);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_graphql___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_graphql__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_isomorphic_fetch__ = __webpack_require__(45);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_isomorphic_fetch___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_isomorphic_fetch__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__types_NewsItemType__ = __webpack_require__(86);
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- // React.js News Feed (RSS)
- const url = 'https://api.rss2json.com/v1/api.json' + '?rss_url=https%3A%2F%2Freactjsnews.com%2Ffeed.xml';
- let items = [];
- let lastFetchTask;
- let lastFetchTime = new Date(1970, 0, 1);
- const news = {
- type: new __WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLList"](__WEBPACK_IMPORTED_MODULE_2__types_NewsItemType__["a" /* default */]),
- resolve() {
- if (lastFetchTask) {
- return lastFetchTask;
- }
- if (new Date() - lastFetchTime > 1000 * 60 * 10 /* 10 mins */) {
- lastFetchTime = new Date();
- lastFetchTask = __WEBPACK_IMPORTED_MODULE_1_isomorphic_fetch___default()(url).then(response => response.json()).then(data => {
- if (data.status === 'ok') {
- items = data.items;
- }
- lastFetchTask = null;
- return items;
- }).catch(err => {
- lastFetchTask = null;
- throw err;
- });
- if (items.length) {
- return items;
- }
- return lastFetchTask;
- }
- return items;
- }
- };
- /* harmony default export */ __webpack_exports__["a"] = (news);
- /***/ }),
- /* 85 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_graphql__ = __webpack_require__(16);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_graphql___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_graphql__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__queries_me__ = __webpack_require__(83);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__queries_news__ = __webpack_require__(84);
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- const schema = new __WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLSchema"]({
- query: new __WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLObjectType"]({
- name: 'Query',
- fields: {
- me: __WEBPACK_IMPORTED_MODULE_1__queries_me__["a" /* default */],
- news: __WEBPACK_IMPORTED_MODULE_2__queries_news__["a" /* default */]
- }
- })
- });
- /* harmony default export */ __webpack_exports__["a"] = (schema);
- /***/ }),
- /* 86 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_graphql__ = __webpack_require__(16);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_graphql___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_graphql__);
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- const NewsItemType = new __WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLObjectType"]({
- name: 'NewsItem',
- fields: {
- title: { type: new __WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLNonNull"](__WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLString"]) },
- link: { type: new __WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLNonNull"](__WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLString"]) },
- author: { type: __WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLString"] },
- pubDate: { type: new __WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLNonNull"](__WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLString"]) },
- content: { type: __WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLString"] }
- }
- });
- /* harmony default export */ __webpack_exports__["a"] = (NewsItemType);
- /***/ }),
- /* 87 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_graphql__ = __webpack_require__(16);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_graphql___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_graphql__);
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- const UserType = new __WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLObjectType"]({
- name: 'User',
- fields: {
- id: { type: new __WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLNonNull"](__WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLID"]) },
- email: { type: __WEBPACK_IMPORTED_MODULE_0_graphql__["GraphQLString"] }
- }
- });
- /* harmony default export */ __webpack_exports__["a"] = (UserType);
- /***/ }),
- /* 88 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_createBrowserHistory__ = __webpack_require__(147);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_createBrowserHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_createBrowserHistory__);
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- // Navigation manager, e.g. history.push('/home')
- // https://github.com/mjackson/history
- /* harmony default export */ __webpack_exports__["a"] = (false && __WEBPACK_IMPORTED_MODULE_0_history_createBrowserHistory___default()());
- /***/ }),
- /* 89 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["b"] = setContentState_NewRouterObject_Action;
- /* harmony export (immutable) */ __webpack_exports__["a"] = setContentState_AddContentObjects_Action;
- /* unused harmony export setContentState_AddForums_Action */
- /* unused harmony export newRouterObjectArgument_AddReplies_Action */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__client_services_REST_forums_content_ContentObject_service__ = __webpack_require__(31);
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/13/2017.
- * (C) BIT TECHNOLOGIES
- */
- function setContentState_NewRouterObject_Action(newRouterObject, objectNotFound, pageURL, pageIndex, pageCount, initialContentObjects) {
- return {
- type: "SET_NEW_CONTENT_STATE_ROUTER_OBJECT",
- payload: {
- routerObject: {
- type: __WEBPACK_IMPORTED_MODULE_0__client_services_REST_forums_content_ContentObject_service__["a" /* default */].extractObjectTypeFromId(newRouterObject),
- object: __WEBPACK_IMPORTED_MODULE_0__client_services_REST_forums_content_ContentObject_service__["a" /* default */].createObject(newRouterObject),
- notFound: objectNotFound !== null ? objectNotFound : true,
- pageURL: pageURL || ''
- },
- contentObjects: {
- pageIndex: pageIndex || 1,
- pageCount: pageCount || 8,
- hasNext: true,
- objects: initialContentObjects || []
- },
- contentForums: {
- pageIndex: 1,
- pageCount: 8,
- hasNext: true,
- objects: []
- },
- contentReplies: {
- pageIndex: 1,
- pageCount: 8,
- hasNext: true,
- objects: []
- }
- }
- };
- }
- function setContentState_AddContentObjects_Action(toBeAdded) {
- return {
- type: "ADD_CONTENT_OBJECTS",
- payload: toBeAdded
- };
- }
- function setContentState_AddForums_Action(toBeAdded) {
- return {
- type: "ADD_CONTENT_FORUMS",
- payload: toBeAdded
- };
- }
- function newRouterObjectArgument_AddReplies_Action(toBeAdded) {
- return {
- type: "ADD_CONTENT_REPLIES",
- payload: toBeAdded
- };
- }
- /***/ }),
- /* 90 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = setRuntimeVariable;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_index__ = __webpack_require__(32);
- /* eslint-disable import/prefer-default-export */
- function setRuntimeVariable({ name, value }) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__constants_index__["a" /* SET_RUNTIME_VARIABLE */],
- payload: {
- name,
- value
- }
- };
- }
- /***/ }),
- /* 91 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = runtime;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_index__ = __webpack_require__(32);
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- function runtime(state = {}, action) {
- switch (action.type) {
- case __WEBPACK_IMPORTED_MODULE_0__constants_index__["a" /* SET_RUNTIME_VARIABLE */]:
- return _extends({}, state, {
- [action.payload.name]: action.payload.value
- });
- default:
- return state;
- }
- }
- /***/ }),
- /* 92 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(46);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__user_reducer__ = __webpack_require__(93);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Runtime_reducer__ = __webpack_require__(91);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Localization_reducer__ = __webpack_require__(36);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouterState_reducer__ = __webpack_require__(37);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__SocketStatus_reducer__ = __webpack_require__(38);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__UserAuthenticated_reducer__ = __webpack_require__(39);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ContentState_reducer__ = __webpack_require__(35);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__test_redux_reducers_TestRedux_reducer__ = __webpack_require__(41);
- //including TEST-REDUX
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_redux__["combineReducers"])({
- user: __WEBPACK_IMPORTED_MODULE_1__user_reducer__["a" /* default */],
- runtime: __WEBPACK_IMPORTED_MODULE_2__Runtime_reducer__["a" /* default */],
- userAuthenticated: __WEBPACK_IMPORTED_MODULE_6__UserAuthenticated_reducer__["b" /* default */],
- socketStatus: __WEBPACK_IMPORTED_MODULE_5__SocketStatus_reducer__["b" /* default */],
- localization: __WEBPACK_IMPORTED_MODULE_3__Localization_reducer__["b" /* default */],
- routerState: __WEBPACK_IMPORTED_MODULE_4__RouterState_reducer__["b" /* default */],
- contentState: __WEBPACK_IMPORTED_MODULE_7__ContentState_reducer__["b" /* default */],
- //including TEST-REDUX
- testReduxState: __WEBPACK_IMPORTED_MODULE_8__test_redux_reducers_TestRedux_reducer__["b" /* default */]
- }));
- /***/ }),
- /* 93 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = user;
- function user(state = {}, action) {
- switch (action.type) {
- default:
- return state;
- }
- }
- /***/ }),
- /* 94 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export default */
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/10/2017.
- * (C) BIT TECHNOLOGIES
- */
- // Middleware
- function promiseMiddleware() {
- return next => action => {
- const { promise } = action,
- rest = _objectWithoutProperties(action, ['promise']);
- if (!promise) {
- return next(action);
- }
- next(_extends({}, rest, { readyState: 'request' }));
- return promise.then(result => next(_extends({}, rest, { result, readyState: 'success' })), error => next(_extends({}, rest, { error, readyState: 'failure' })));
- };
- }
- /***/ }),
- /* 95 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = configureStore;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(46);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux_thunk__ = __webpack_require__(157);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux_thunk___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_redux_thunk__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__reducers_index__ = __webpack_require__(92);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createHelpers__ = __webpack_require__(96);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__logger_logger_server__ = __webpack_require__(97);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__async_middleware_AsyncMiddleware__ = __webpack_require__(94);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__reducers_UserAuthenticated_reducer__ = __webpack_require__(39);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__reducers_SocketStatus_reducer__ = __webpack_require__(38);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__reducers_Localization_reducer__ = __webpack_require__(36);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__reducers_RouterState_reducer__ = __webpack_require__(37);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__reducers_ContentState_reducer__ = __webpack_require__(35);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__test_redux_reducers_TestRedux_reducer__ = __webpack_require__(41);
- function configureStore(initialState, helpersConfig) {
- const helpers = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__createHelpers__["a" /* default */])(helpersConfig);
- const middleware = [__WEBPACK_IMPORTED_MODULE_1_redux_thunk___default.a.withExtraArgument(helpers)];
- let enhancer;
- if (false) {
- middleware.push(createLogger());
- //middleware.push(AsyncMiddleware());
- // https://github.com/zalmoxisus/redux-devtools-extension#redux-devtools-extension
- let devToolsExtension = f => f;
- if (process.env.BROWSER && window.devToolsExtension) {
- devToolsExtension = window.devToolsExtension();
- }
- enhancer = compose(applyMiddleware(...middleware), devToolsExtension);
- } else {
- enhancer = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_redux__["applyMiddleware"])(...middleware);
- }
- //Initial Redux Store State
- console.log(initialState, helpersConfig);
- initialState.userAuthenticated = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__reducers_UserAuthenticated_reducer__["a" /* defaultUserState */])(initialState.userAuthenticated || {}); //Current User Authenticated
- initialState.socketStatus = __WEBPACK_IMPORTED_MODULE_7__reducers_SocketStatus_reducer__["a" /* defaultSocketStatus */]; //Socket Status
- initialState.localization = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__reducers_Localization_reducer__["a" /* defaultLocalization */])(initialState.localization || {}); //Location
- initialState.routerState = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__reducers_RouterState_reducer__["a" /* defaultRouterState */])(initialState.routerState || {}); //Router
- initialState.contentState = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__reducers_ContentState_reducer__["a" /* defaultContentState */])(initialState.contentState || {}); //Content Redux State
- initialState.testReduxState = __WEBPACK_IMPORTED_MODULE_11__test_redux_reducers_TestRedux_reducer__["a" /* defaultTestReduxState */];
- if (typeof document !== "undefined" && initialState.userAuthenticated.user.isLoggedIn()) document.body.classList.remove("top-navigation");
- // See https://github.com/rackt/redux/releases/tag/v3.1.0
- const store = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_redux__["createStore"])(__WEBPACK_IMPORTED_MODULE_2__reducers_index__["a" /* default */], initialState, enhancer);
- // Hot reload reducers (requires Webpack or Browserify HMR to be enabled)
- if (false) {
- module.hot.accept('../reducers', () =>
- // eslint-disable-next-line global-require
- store.replaceReducer(require('../reducers/index').default));
- }
- return store;
- }
- /***/ }),
- /* 96 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = createHelpers;
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- function createGraphqlRequest(fetch) {
- return (() => {
- var _ref = _asyncToGenerator(function* (query, variables) {
- const fetchConfig = {
- method: 'post',
- headers: {
- Accept: 'application/json',
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify({ query, variables }),
- credentials: 'include'
- };
- const resp = yield fetch('/graphql', fetchConfig);
- if (resp.status !== 200) throw new Error(resp.statusText);
- return resp.json();
- });
- function graphqlRequest(_x, _x2) {
- return _ref.apply(this, arguments);
- }
- return graphqlRequest;
- })();
- }
- function createHelpers({ fetch, history }) {
- return {
- fetch,
- history,
- graphqlRequest: createGraphqlRequest(fetch)
- };
- }
- /***/ }),
- /* 97 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export default */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_util__ = __webpack_require__(160);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_util___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_util__);
- function inspectObject(object) {
- return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_util__["inspect"])(object, {
- colors: true
- });
- }
- function singleLine(str) {
- return str.replace(/\s+/g, ' ');
- }
- const actionFormatters = {
- // This is used at feature/apollo branch, but it can help you when implementing Apollo
- APOLLO_QUERY_INIT: a => `queryId:${a.queryId} variables:${inspectObject(a.variables)}\n ${singleLine(a.queryString)}`,
- APOLLO_QUERY_RESULT: a => `queryId:${a.queryId}\n ${singleLine(inspectObject(a.result))}`,
- APOLLO_QUERY_STOP: a => `queryId:${a.queryId}`
- };
- // Server side redux action logger
- function createLogger() {
- // eslint-disable-next-line no-unused-vars
- return store => next => action => {
- let formattedPayload = '';
- const actionFormatter = actionFormatters[action.type];
- if (typeof actionFormatter === 'function') {
- formattedPayload = actionFormatter(action);
- } else if (action.toString !== Object.prototype.toString) {
- formattedPayload = action.toString();
- } else if (typeof action.payload !== 'undefined') {
- formattedPayload = inspectObject(action.payload);
- } else {
- formattedPayload = inspectObject(action);
- }
- console.log(` * ${action.type}: ${formattedPayload}`); // eslint-disable-line no-console
- return next(action);
- };
- }
- /***/ }),
- /* 98 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = newTestReduxValue1;
- /* harmony export (immutable) */ __webpack_exports__["b"] = newTestReduxValue2;
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/9/2017.
- * (C) BIT TECHNOLOGIES
- */
- /* eslint-disable import/prefer-default-export */
- function newTestReduxValue1(iNewValue) {
- console.log("ACTION 1 FIRED", iNewValue);
- return {
- type: "NEW_TEST_REDUX_VALUE_1",
- payload: {
- value: iNewValue
- }
- };
- }
- function newTestReduxValue2(iNewValue) {
- console.log("ACTION 2 FIRED", iNewValue);
- return {
- type: "NEW_TEST_REDUX_VALUE_2",
- payload: {
- value: iNewValue
- }
- };
- }
- /***/ }),
- /* 99 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_universal_router__ = __webpack_require__(159);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_universal_router___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_universal_router__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__routes__ = __webpack_require__(112);
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- /* harmony default export */ __webpack_exports__["a"] = (new __WEBPACK_IMPORTED_MODULE_0_universal_router___default.a(__WEBPACK_IMPORTED_MODULE_1__routes__["a" /* default */]));
- /***/ }),
- /* 100 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__ = __webpack_require__(4);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__client_components_Page__ = __webpack_require__(18);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__my_redux_test_redux_TestRedux_component__ = __webpack_require__(40);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- var _ref = _jsx(__WEBPACK_IMPORTED_MODULE_3__my_redux_test_redux_TestRedux_component__["a" /* default */], {});
- /* harmony default export */ __webpack_exports__["default"] = ({
- path: '/about',
- action() {
- return _asyncToGenerator(function* () {
- const data = yield new Promise(function(resolve) { resolve(); }).then((function (require) {
- return __webpack_require__(135);
- }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
- return {
- title: data.title,
- description: 'About SkyHub',
- chunk: 'about',
- component: _jsx(__WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__["a" /* default */], {}, void 0, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
- __WEBPACK_IMPORTED_MODULE_2__client_components_Page__["a" /* default */],
- data,
- _ref
- ))
- };
- })();
- }
- });
- /***/ }),
- /* 101 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Admin_css__ = __webpack_require__(132);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Admin_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__Admin_css__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- var _ref = _jsx('p', {}, void 0, '...');
- let Admin = function () {
- function Admin(props) {
- return _jsx('div', {
- className: __WEBPACK_IMPORTED_MODULE_3__Admin_css___default.a.root
- }, void 0, _jsx('div', {
- className: __WEBPACK_IMPORTED_MODULE_3__Admin_css___default.a.container
- }, void 0, _jsx('h1', {}, void 0, props.title), _ref));
- }
- return Admin;
- }();
- /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles___default()(__WEBPACK_IMPORTED_MODULE_3__Admin_css___default.a)(Admin));
- /***/ }),
- /* 102 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__ = __webpack_require__(4);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- const title = 'Admin Page';
- const isAdmin = false;
- /* harmony default export */ __webpack_exports__["default"] = ({
- path: '/admin',
- action() {
- return _asyncToGenerator(function* () {
- if (!isAdmin) {
- return { redirect: '/login' };
- }
- const Admin = yield new Promise(function(resolve) { resolve(); }).then((function (require) {
- return __webpack_require__(101).default;
- }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
- return {
- title,
- chunk: 'admin',
- component: _jsx(__WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__["a" /* default */], {}, void 0, _jsx(Admin, {
- title: title
- }))
- };
- })();
- }
- });
- /***/ }),
- /* 103 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Contact_css__ = __webpack_require__(133);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Contact_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__Contact_css__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- var _ref = _jsx('p', {}, void 0, '...');
- let Contact = function () {
- function Contact(props) {
- return _jsx('div', {
- className: __WEBPACK_IMPORTED_MODULE_3__Contact_css___default.a.root
- }, void 0, _jsx('div', {
- className: __WEBPACK_IMPORTED_MODULE_3__Contact_css___default.a.container
- }, void 0, _jsx('h1', {}, void 0, props.title), _ref));
- }
- return Contact;
- }();
- /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles___default()(__WEBPACK_IMPORTED_MODULE_3__Contact_css___default.a)(Contact));
- /***/ }),
- /* 104 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__ = __webpack_require__(4);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Contact__ = __webpack_require__(103);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- const title = 'Contact Us';
- var _ref = _jsx(__WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__["a" /* default */], {}, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_2__Contact__["a" /* default */], {
- title: title
- }));
- /* harmony default export */ __webpack_exports__["default"] = ({
- path: '/contact',
- action() {
- return {
- title,
- component: _ref
- };
- }
- });
- /***/ }),
- /* 105 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ErrorPage; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ErrorPage_css__ = __webpack_require__(42);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ErrorPage_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__ErrorPage_css__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- var _ref = _jsx('div', {}, void 0, _jsx('h1', {}, void 0, 'Error'), _jsx('p', {}, void 0, 'Sorry, a critical error occurred on this page.'));
- let ErrorPage = function () {
- function ErrorPage(props) {
- if (false) {
- const { error } = props;
- return _jsx('div', {}, void 0, _jsx('h1', {}, void 0, error.name), _jsx('p', {}, void 0, error.message), _jsx('pre', {}, void 0, error.stack));
- }
- return _ref;
- }
- return ErrorPage;
- }();
- /* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles___default()(__WEBPACK_IMPORTED_MODULE_3__ErrorPage_css___default.a)(ErrorPage));
- /***/ }),
- /* 106 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__client_modules_forums_content_DisplayContent_component__ = __webpack_require__(24);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__home_content_pages_HomeContentPage__ = __webpack_require__(107);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__home_authenticated_Authenticated_home_component__ = __webpack_require__(110);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__home_NotAuthenticatedHome_component__ = __webpack_require__(109);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_redux__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- var _ref = _jsx(__WEBPACK_IMPORTED_MODULE_4__home_authenticated_Authenticated_home_component__["a" /* default */], {});
- var _ref2 = _jsx(__WEBPACK_IMPORTED_MODULE_5__home_NotAuthenticatedHome_component__["a" /* default */], {});
- var _ref3 = _jsx(__WEBPACK_IMPORTED_MODULE_3__home_content_pages_HomeContentPage__["a" /* default */], {});
- var _ref4 = _jsx(__WEBPACK_IMPORTED_MODULE_2__client_modules_forums_content_DisplayContent_component__["a" /* default */], {});
- let Home = class Home extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- renderError() {
- return _jsx('div', {
- className: 'row'
- }, void 0, _jsx('div', {
- className: 'col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3'
- }, void 0, _jsx('div', {
- className: 'alert alert-danger '
- }, void 0, _jsx('h4', {
- style: { textAlign: "center" }
- }, void 0, 'NOT Found'), _jsx('strong', {}, void 0, this.props.URL || "/"), ' was not found. Probably what you\'ve been looking for doesn\'t exists or has been deleted in the mean while.')));
- }
- renderSimpleWebsite() {
- return _jsx('div', {}, void 0, this.props.userAuthenticated.user.isLoggedIn() ? _ref : _ref2);
- }
- renderHomepageComponent() {
- return _ref3;
- }
- render() {
- return _jsx('div', {}, void 0, this.props.contentState.routerObject.object === null ? this.renderSimpleWebsite.call(this) : this.renderHomepageComponent.call(this), this.props.contentState.routerObject.notFound ? this.renderError.call(this) : ' A FOST GASIT', _ref4);
- }
- };
- function mapState(state) {
- return {
- userAuthenticated: state.userAuthenticated,
- contentState: state.contentState
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6_react_redux__["connect"])(mapState, mapDispatch)(Home));
- /***/ }),
- /* 107 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export HomeContentPage */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__client_services_REST_authentication_Auth_service__ = __webpack_require__(3);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__client_services_Communication_http_Http_service__ = __webpack_require__(19);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__client_modules_forums_forums_models_Forum_model__ = __webpack_require__(6);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pages_ViewForum_component__ = __webpack_require__(108);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/12/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx(__WEBPACK_IMPORTED_MODULE_5__pages_ViewForum_component__["a" /* default */], {});
- var _ref2 = _jsx('b', {}, void 0, 'no valid content');
- let HomeContentPage = class HomeContentPage extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- }
- renderForum() {
- //console.log("%%%%%%%%%%%RENDER FORUM ",this.props.object);
- return _ref;
- }
- render() {
- console.log('@@@@', this.props.contentState.routerObject.type);
- switch (this.props.contentState.routerObject.type) {
- case 'forum':
- return this.renderForum();
- case 'user':
- return this.renderForum();
- case 'topic':
- return this.renderForum();
- }
- return _ref2;
- }
- };
- function mapState(state) {
- return {
- userAuthenticated: state.userAuthenticated,
- contentState: state.contentState
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"])(mapState, mapDispatch)(HomeContentPage));
- /***/ }),
- /* 108 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* unused harmony export ViewForum */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__client_services_REST_authentication_Auth_service__ = __webpack_require__(3);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__client_services_REST_forums_forums_Forums_service__ = __webpack_require__(14);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__client_components_Template_Template_components_Header_Cover_HeaderCover_component__ = __webpack_require__(22);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__client_components_Template_Template_components_Header_Cover_WebsiteHeaderCover_component__ = __webpack_require__(62);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__client_modules_forums_content_DisplayContent_component__ = __webpack_require__(24);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 5/24/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx('h4', {}, void 0, 'Forum NOT Found');
- var _ref2 = _jsx(__WEBPACK_IMPORTED_MODULE_5__client_components_Template_Template_components_Header_Cover_WebsiteHeaderCover_component__["a" /* default */], {});
- var _ref3 = _jsx(__WEBPACK_IMPORTED_MODULE_6__client_modules_forums_content_DisplayContent_component__["a" /* default */], {});
- let ViewForum = class ViewForum extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(props) {
- super(props);
- }
- renderForum() {
- return _jsx('div', {}, void 0, _jsx(HeroHeader, {}, void 0, _jsx('span', {}, void 0, this.props.routerState.currentRouterObject.object.title)));
- }
- renderError() {
- return _jsx(Alert, {
- danger: true
- }, void 0, _ref, _jsx('strong', {}, void 0, this.props.params.forumURL || ""), ' was not found. Probably the forum you are looking for doesn\'t exists or has been deleted.');
- }
- render() {
- console.log("%%%%%%%%%%% VIEW FORUM ", this.props.routerState.currentRouterObject.object);
- return _jsx('div', {}, void 0, this.props.routerState.currentRouterObject.object !== null && this.props.routerState.currentRouterObject.objectNotFound === false ? _jsx(__WEBPACK_IMPORTED_MODULE_4__client_components_Template_Template_components_Header_Cover_HeaderCover_component__["a" /* default */], {
- title: this.props.routerState.currentRouterObject.object.title || "",
- subTitle: this.props.routerState.currentRouterObject.object.description || "",
- icon: this.props.routerState.currentRouterObject.object.iconPic || "",
- cover: this.props.routerState.currentRouterObject.object.coverPic || '',
- backgroundColor: this.props.routerState.currentRouterObject.object.coverColor || ''
- }) : _ref2, _jsx(Hero, {
- style: { position: 'relative', zIndex: 2 }
- }, void 0, this.props.routerState.currentRouterObject.object !== null ? this.renderForum.call(this) : this.renderError.bind(this)), _ref3);
- }
- };
- function mapState(state) {
- return {
- userAuthenticated: state.userAuthenticated,
- routerState: state.routerState
- };
- };
- function mapDispatch(dispatch) {
- return {
- dispatch: dispatch
- };
- };
- /* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"])(mapState, mapDispatch)(ViewForum));
- /***/ }),
- /* 109 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NotAuthenticatedHome; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 5/16/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx("div", {}, void 0, _jsx("section", {
- id: "team",
- className: "gray-section team"
- }, void 0, _jsx("div", {
- className: "container"
- }, void 0, _jsx("div", {
- className: "row m-b-lg"
- }, void 0, _jsx("div", {
- className: "col-lg-12 text-center"
- }, void 0, _jsx("div", {
- className: "navy-line"
- }), _jsx("h1", {}, void 0, _jsx("strong", {}, void 0, "SkyHub")), _jsx("p", {}, void 0, "SkyHub is a new Social Network that allows people to ", _jsx("strong", {}, void 0, "discover, talk and change "), " the world together"))), _jsx("div", {
- className: "row"
- }, void 0, _jsx("div", {
- className: "col-lg-8 col-lg-offset-2 text-center m-t-lg m-b-lg"
- }, void 0, _jsx("p", {}, void 0, "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut eaque, laboriosam veritatis, quos non quis ad perspiciatis, totam corporis ea, alias ut unde."))))));
- let NotAuthenticatedHome = function () {
- function NotAuthenticatedHome(props) {
- return _ref;
- }
- return NotAuthenticatedHome;
- }();
- /***/ }),
- /* 110 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AuthenticatedHomeComponent; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 5/16/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx("div", {}, void 0, "HELLO WORLD");
- let AuthenticatedHomeComponent = function () {
- function AuthenticatedHomeComponent(props) {
- return _ref;
- }
- return AuthenticatedHomeComponent;
- }();
- /***/ }),
- /* 111 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Home__ = __webpack_require__(106);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__client_components_Template_Layout__ = __webpack_require__(4);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__my_redux_actions_Localization_actions__ = __webpack_require__(12);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__client_services_REST_forums_content_Content_service__ = __webpack_require__(20);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- /* harmony default export */ __webpack_exports__["default"] = ({
- path: '/:url*',
- //path: '/:filter(active|completed|)',
- action({ params, fetch, store }) {
- return _asyncToGenerator(function* () {
- yield store.dispatch(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__my_redux_actions_Localization_actions__["b" /* startLocalizationFetchingAsync */])());
- __WEBPACK_IMPORTED_MODULE_4__client_services_REST_forums_content_Content_service__["a" /* default */].startService(store.dispatch, store.getState().routerState);
- var contentData = yield __WEBPACK_IMPORTED_MODULE_4__client_services_REST_forums_content_Content_service__["a" /* default */].fetchRouterObjectAndContent(params.url || '', 'http');
- //if (!data || !data.news) throw new Error('Failed to load the news feed.');
- console.log("DATA ", contentData);
- return {
- title: 'React Starter Kit',
- component: _jsx(__WEBPACK_IMPORTED_MODULE_2__client_components_Template_Layout__["a" /* default */], {}, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_1__Home__["a" /* default */], {
- URL: params.url
- }))
- };
- })();
- }
- });
- /***/ }),
- /* 112 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__my_redux_actions_Localization_actions__ = __webpack_require__(12);
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- /* eslint-disable global-require */
- // The top-level (parent) route
- /* harmony default export */ __webpack_exports__["a"] = ({
- path: '/',
- // Keep in mind, routes are evaluated in order
- children: [__webpack_require__(104).default, __webpack_require__(113).default, __webpack_require__(118).default, __webpack_require__(100).default, __webpack_require__(117).default, __webpack_require__(102).default, __webpack_require__(120).default, __webpack_require__(111).default,
- // Wildcard routes, e.g. { path: '*', ... } (must go last)
- __webpack_require__(116).default],
- action({ next, store }) {
- return _asyncToGenerator(function* () {
- // Execute each child route until one of them return the result
- const route = yield next();
- // Provide default values for title, description etc.
- route.title = `${route.title || 'SkyHub Social Network'} - www.skyhub.me`;
- route.description = route.description || '';
- return route;
- })();
- }
- });
- /***/ }),
- /* 113 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__ = __webpack_require__(4);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__login_page__ = __webpack_require__(114);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- //import Login from './Login';
- const title = 'Log In';
- var _ref = _jsx(__WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__["a" /* default */], {}, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_2__login_page__["a" /* default */], {
- title: title
- }));
- /* harmony default export */ __webpack_exports__["default"] = ({
- path: '/login',
- action() {
- return {
- title,
- component: _ref
- };
- }
- });
- /***/ }),
- /* 114 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LoginPage; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(44);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__client_modules_users_authentication_login_login_form__ = __webpack_require__(26);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- var _ref = _jsx('div', {
- className: 'panel-heading'
- }, void 0, _jsx('h2', {}, void 0, _jsx('strong', {}, void 0, 'Login to '), 'SkyHub'));
- let LoginPage = class LoginPage extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- constructor(...args) {
- var _temp;
- return _temp = super(...args), this.loginForm = null, _temp;
- }
- back(e) {
- e.preventDefault();e.stopPropagation();
- //this.props.router.goBack();
- }
- componentDidMount() {
- $('html').addClass('authentication');
- }
- componentWillUnmount() {
- $('html').removeClass('authentication');
- }
- render() {
- return _jsx('div', {
- id: 'auth-container',
- className: 'login',
- style: { marginTop: 75 }
- }, void 0, _jsx('div', {
- className: 'col-sm-7 col-sm-offset-3 col-xs-10 col-xs-offset-1'
- }, void 0, _jsx('div', {
- className: 'panel panel-success'
- }, void 0, _ref, _jsx('div', {
- className: 'panel-body'
- }, void 0, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__client_modules_users_authentication_login_login_form__["a" /* default */], { ref: c => this.loginForm = c, onSuccess: this.back.bind(this) })))));
- }
- };
- /***/ }),
- /* 115 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__NotFound_css__ = __webpack_require__(134);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__NotFound_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__NotFound_css__);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- var _ref = _jsx('p', {}, void 0, 'Sorry, the page you were trying to view does not exist.');
- let NotFound = function () {
- function NotFound(props) {
- return _jsx('div', {
- className: __WEBPACK_IMPORTED_MODULE_3__NotFound_css___default.a.root
- }, void 0, _jsx('div', {
- className: __WEBPACK_IMPORTED_MODULE_3__NotFound_css___default.a.container
- }, void 0, _jsx('h1', {}, void 0, props.title), _ref));
- }
- return NotFound;
- }();
- /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_2_isomorphic_style_loader_lib_withStyles___default()(__WEBPACK_IMPORTED_MODULE_3__NotFound_css___default.a)(NotFound));
- /***/ }),
- /* 116 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__ = __webpack_require__(4);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__NotFound__ = __webpack_require__(115);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- const title = 'Page Not Found';
- var _ref = _jsx(__WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__["a" /* default */], {}, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_2__NotFound__["a" /* default */], {
- title: title
- }));
- /* harmony default export */ __webpack_exports__["default"] = ({
- path: '*',
- action() {
- return {
- title,
- component: _ref,
- status: 404
- };
- }
- });
- /***/ }),
- /* 117 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__ = __webpack_require__(4);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__client_components_Page__ = __webpack_require__(18);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- /* harmony default export */ __webpack_exports__["default"] = ({
- path: '/privacy',
- action() {
- return _asyncToGenerator(function* () {
- const data = yield new Promise(function(resolve) { resolve(); }).then((function (require) {
- return __webpack_require__(136);
- }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
- return {
- title: data.title,
- chunk: 'privacy',
- component: _jsx(__WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__["a" /* default */], {}, void 0, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__client_components_Page__["a" /* default */], data))
- };
- })();
- }
- });
- /***/ }),
- /* 118 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__ = __webpack_require__(4);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__registration_page__ = __webpack_require__(119);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * React Starter Kit (https://www.reactstarterkit.com/)
- *
- * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.txt file in the root directory of this source tree.
- */
- //import Register from './Register';
- const title = 'New User Registration';
- var _ref = _jsx(__WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__["a" /* default */], {}, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_2__registration_page__["a" /* default */], {
- title: title
- }));
- /* harmony default export */ __webpack_exports__["default"] = ({
- path: '/register',
- action() {
- return {
- title,
- component: _ref
- };
- }
- });
- /***/ }),
- /* 119 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return RegistrationPage; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__client_modules_users_authentication_registration_registration_form__ = __webpack_require__(28);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx('div', {
- className: 'panel-heading'
- }, void 0, _jsx('h2', {}, void 0, _jsx('strong', {}, void 0, 'Register '), 'SkyHub'));
- let RegistrationPage = class RegistrationPage extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {
- back(e) {
- e.preventDefault();e.stopPropagation();
- // this.props.router.goBack();
- }
- componentDidMount() {
- $('html').addClass('authentication');
- }
- componentWillUnmount() {
- $('html').removeClass('authentication');
- }
- render() {
- return _jsx('div', {
- id: 'auth-container',
- className: 'login',
- style: { marginTop: 75 }
- }, void 0, _jsx('div', {
- className: 'col-sm-7 col-sm-offset-3 col-xs-10 col-xs-offset-1'
- }, void 0, _jsx('div', {
- className: 'panel panel-warning'
- }, void 0, _ref, _jsx('div', {
- className: 'panel-body'
- }, void 0, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__client_modules_users_authentication_registration_registration_form__["a" /* default */], { ref: c => this.loginForm = c, onSuccess: this.back.bind(this) })))));
- }
- };
- /***/ }),
- /* 120 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__test_redux_TestRedux__ = __webpack_require__(121);
- /* eslint-disable import/prefer-default-export */
- const title = 'SkyHub Testing';
- /* harmony default export */ __webpack_exports__["default"] = ({
- path: '/testing/redux',
- action() {
- return __WEBPACK_IMPORTED_MODULE_1__test_redux_TestRedux__["a" /* default */].action();
- }
- });
- /***/ }),
- /* 121 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__ = __webpack_require__(4);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__client_components_Page__ = __webpack_require__(18);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__my_redux_test_redux_TestRedux_component__ = __webpack_require__(40);
- var _jsx = function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, props, key, children) { var defaultProps = type && type.defaultProps; var childrenLength = arguments.length - 3; if (!props && childrenLength !== 0) { props = {}; } if (props && defaultProps) { for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } else if (!props) { props = defaultProps || {}; } if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 3]; } props.children = childArray; } return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : '' + key, ref: null, props: props, _owner: null }; }; }();
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/9/2017.
- * (C) BIT TECHNOLOGIES
- */
- var _ref = _jsx(__WEBPACK_IMPORTED_MODULE_1__client_components_Template_Layout__["a" /* default */], {}, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_2__client_components_Page__["a" /* default */], {
- title: 'TESTING REDUX',
- html: ''
- }, void 0, _jsx(__WEBPACK_IMPORTED_MODULE_3__my_redux_test_redux_TestRedux_component__["a" /* default */], {})));
- /* harmony default export */ __webpack_exports__["a"] = ({
- path: '/about',
- action() {
- return _asyncToGenerator(function* () {
- return {
- title: "TESTING REDUX",
- description: 'TESTING REDUX',
- chunk: 'test-redux',
- component: _ref
- };
- })();
- }
- });
- /***/ }),
- /* 122 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = initializePassport;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_express_jwt__ = __webpack_require__(146);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_express_jwt___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_express_jwt__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_jsonwebtoken__ = __webpack_require__(149);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_jsonwebtoken___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_jsonwebtoken__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_passport__ = __webpack_require__(150);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_passport___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_passport__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__config__ = __webpack_require__(15);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__config___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__config__);
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/9/2017.
- * (C) BIT TECHNOLOGIES
- */
- function initializePassport(app) {
- //
- // Authentication
- // -----------------------------------------------------------------------------
- app.use(__WEBPACK_IMPORTED_MODULE_0_express_jwt___default()({
- secret: __WEBPACK_IMPORTED_MODULE_3__config___default.a.auth.jwt.secret,
- credentialsRequired: false,
- getToken: req => req.cookies.id_token
- }));
- // Error handler for express-jwt
- app.use((err, req, res, next) => {
- // eslint-disable-line no-unused-vars
- if (err instanceof __WEBPACK_IMPORTED_MODULE_0_express_jwt__["UnauthorizedError"]) {
- console.error('[express-jwt-error]', req.cookies.id_token);
- // `clearCookie`, otherwise user can't use web-app until cookie expires
- res.clearCookie('id_token');
- }
- next(err);
- });
- app.use(__WEBPACK_IMPORTED_MODULE_2_passport___default.a.initialize());
- if (false) {
- app.enable('trust proxy');
- }
- app.get('/login/facebook', __WEBPACK_IMPORTED_MODULE_2_passport___default.a.authenticate('facebook', { scope: ['email', 'user_location'], session: false }));
- app.get('/login/facebook/return', __WEBPACK_IMPORTED_MODULE_2_passport___default.a.authenticate('facebook', { failureRedirect: '/login', session: false }), (req, res) => {
- const expiresIn = 60 * 60 * 24 * 180; // 180 days
- const token = __WEBPACK_IMPORTED_MODULE_1_jsonwebtoken___default.a.sign(req.user, __WEBPACK_IMPORTED_MODULE_3__config___default.a.auth.jwt.secret, { expiresIn });
- res.cookie('id_token', token, { maxAge: 1000 * expiresIn, httpOnly: true });
- res.redirect('/');
- });
- }
- /***/ }),
- /* 123 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_socket_io_client__ = __webpack_require__(48);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_socket_io_client___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_socket_io_client__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__ = __webpack_require__(47);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__);
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
- /**
- * Created by Alexandru Ionut Budisteanu - SkyHub on 6/11/2017.
- * (C) BIT TECHNOLOGIES
- */
- let SocketWorkerClass = class SocketWorkerClass {
- constructor() {
- this.socket = null;
- this.sServerSocketAddress = "myskyhub.ddns.net:4000/";
- this.sServerSocketApi = "api/";
- this.sServerSocketVersion = "";
- console.log(' @@@@@@ Socket Worker Client constructor');
- }
- startService() {
- this.createClientWorkerSocket();
- }
- createClientWorkerSocket() {
- console.log("Trying to create Worker Socket ...");
- this.socket = __WEBPACK_IMPORTED_MODULE_0_socket_io_client__["connect"](this.sServerSocketAddress, {
- //transports: [ 'xhr-polling' ],
- //transports: ['xhr-multipart'],
- //transports: ['polling'],
- //transports: ['websocket'],
- //transports: ['websocket', 'polling'],
- port: 4000,
- query: "token=" + "xxxx" //JWT Token
- });
- this.setSocketReadObservable("connect").subscribe(response => {
- console.log('SocketWorker has connected to the server!');
- });
- this.socket.on("connect_failed", function () {
- console.log('SocketWorker Connecting failed 222');
- });
- this.setSocketReadObservable("connect_error").subscribe(response => {
- console.log('SocketWorker Connecting Error ', response);
- });
- this.socket.on("error", function () {
- console.log('SocketWorker error 222');
- });
- // THE SAME CODE written but using OBSERVABLE
- this.setSocketReadObservable("connectionReady").subscribe(response => {
- console.log("SocketWorker Connection Ready: " + response);
- this.sendRequestObservable("version", '').subscribe(response => {
- this.sServerSocketVersion = response.version;
- console.log("API VERSION: " + response.version);
- });
- });
- // Add a connect listener
- this.socket.on('api/message', function (data) {
- console.log('Received a message from the server!', data);
- });
- // Add a disconnect listener
- this.setSocketReadObservable("disconnect").subscribe(response => {
- console.log('SocketWorker has disconnected!');
- });
- }
- /*
- FUNCTIONS
- */
- checkAuthCookie(cookie) {
- var _this = this;
- return _asyncToGenerator(function* () {
- let sessionId = '';
- //based on this https://stackoverflow.com/questions/3393854/get-and-set-a-single-cookie-with-node-js-http-server
- cookie && cookie.split(';').forEach(function (cookie) {
- let parts = cookie.split('=');
- let cookieName = parts.shift().trim();
- if (cookieName === 'sessionId') sessionId = decodeURI(parts.join('='));
- });
- if (sessionId !== '' && sessionId.length > 5) {
- return _this.sendRequestGetDataPromise("auth/login-session", sessionId);
- } else {
- return {
- result: false,
- message: "cookie invalid"
- };
- }
- })();
- }
- sendRequest(sRequestName, requestData) {
- //console.log('sending'+sRequestName); console.log(sRequestData);
- if (sRequestName !== '' || requestData !== '') return this.socket.emit(this.sServerSocketApi + sRequestName, requestData);
- }
- /*
- Sending the Request and Obtain the Promise to Wait Async
- */
- sendRequestGetDataPromise(sRequestName, sRequestData) {
- return new Promise(resolve => {
- this.sendRequest(sRequestName, sRequestData);
- this.socket.once(this.sServerSocketApi + sRequestName, function (resData) {
- /*console.log('SOCKET RECEIVED: ');
- console.log(resData);*/
- resolve(resData);
- });
- });
- }
- /*
- Sending Request and Obtain the Observable Object
- */
- sendRequestObservable(sRequestName, sRequestData) {
- var result = this.sendRequest(sRequestName, sRequestData);
- return this.setSocketReadObservable(sRequestName);
- }
- setSocketReadObservable(sRequestName) {
- if (sRequestName !== "connect" && sRequestName !== "disconnect" && sRequestName !== 'connect_failed' && sRequestName !== 'connect_error') sRequestName = this.sServerSocketApi + sRequestName;
- //let observable = new Observable < Object > (observer => {
- let observable = __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__["Observable"].create(observer => {
- this.socket.on(sRequestName, data => {
- observer.next(data);
- });
- });
- //console.log("SocketWorker OBSERVABLE for "+sRequestName,observable,);
- return observable;
- }
- };
- var SocketWorker = new SocketWorkerClass();
- /* unused harmony default export */ var _unused_webpack_default_export = (SocketWorker);
- // export default {
- // SocketWorker: SocketWorker,
- // createNewInstance: function (){
- // SocketWorker = new SocketWorkerClass();
- // }
- // };
- /***/ }),
- /* 124 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(8)(false);
- // imports
- // module
- exports.push([module.i, "._1zAhc{background:#f5f5f5;color:#333}._2_1A7{margin:0 auto;padding:20px 8px;max-width:1000px;text-align:center;font-size:1.5em}.pTzko,.pTzko:active,.pTzko:hover,.pTzko:visited{color:#333;text-decoration:none}.pTzko:hover{text-decoration:underline}._12FIM{padding-right:15px;padding-left:15px}", ""]);
- // exports
- exports.locals = {
- "root": "_1zAhc",
- "container": "_2_1A7",
- "link": "pTzko",
- "spacer": "_12FIM"
- };
- /***/ }),
- /* 125 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(8)(false);
- // imports
- // module
- exports.push([module.i, ".bm87A{padding-left:20px;padding-right:20px}._5Opdb{margin:0 auto;padding:0 0 40px;max-width:1000px}", ""]);
- // exports
- exports.locals = {
- "root": "bm87A",
- "container": "_5Opdb"
- };
- /***/ }),
- /* 126 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(8)(false);
- // imports
- // module
- exports.push([module.i, "._2FmpK{padding-left:20px;padding-right:20px}._1Q6TR{margin:0 auto;padding:0 0 40px;max-width:1000px}", ""]);
- // exports
- exports.locals = {
- "root": "_2FmpK",
- "container": "_1Q6TR"
- };
- /***/ }),
- /* 127 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(8)(false);
- // imports
- // module
- exports.push([module.i, "._2d2gO{padding-left:20px;padding-right:20px}._3u9Jq{margin:0 auto;padding:0 0 40px;max-width:1000px}", ""]);
- // exports
- exports.locals = {
- "root": "_2d2gO",
- "container": "_3u9Jq"
- };
- /***/ }),
- /* 128 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(8)(false);
- // imports
- // module
- exports.push([module.i, "*{line-height:1.2;margin:0}html{color:#888;display:table;font-family:sans-serif;height:100%;text-align:center;width:100%}body{display:table-cell;vertical-align:middle;padding:2em}h1{color:#555;font-size:2em;font-weight:400}p{margin:0 auto;width:280px}pre{text-align:left;margin-top:32px;margin-top:2rem}@media only screen and (max-width:280px){body,p{width:95%}h1{font-size:1.5em;margin:0 0 .3em}}", ""]);
- // exports
- /***/ }),
- /* 129 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(8)(false);
- // imports
- // module
- exports.push([module.i, "._29QB0{padding-left:20px;padding-right:20px}._1xgnj{margin:0 auto;padding:0 0 40px;max-width:1000px}", ""]);
- // exports
- exports.locals = {
- "root": "_29QB0",
- "container": "_1xgnj"
- };
- /***/ }),
- /* 130 */
- /***/ (function(module, exports, __webpack_require__) {
- var content = __webpack_require__(124);
- var insertCss = __webpack_require__(9);
- if (typeof content === 'string') {
- content = [[module.i, content, '']];
- }
- module.exports = content.locals || {};
- module.exports._getContent = function() { return content; };
- module.exports._getCss = function() { return content.toString(); };
- module.exports._insertCss = function(options) { return insertCss(content, options) };
- // Hot Module Replacement
- // https://webpack.github.io/docs/hot-module-replacement
- // Only activated in browser context
- if (false) {
- var removeCss = function() {};
- module.hot.accept("!!../../../../node_modules/css-loader/index.js??ref--1-1!../../../../node_modules/postcss-loader/lib/index.js??ref--1-2!./Feedback.css", function() {
- content = require("!!../../../../node_modules/css-loader/index.js??ref--1-1!../../../../node_modules/postcss-loader/lib/index.js??ref--1-2!./Feedback.css");
- if (typeof content === 'string') {
- content = [[module.id, content, '']];
- }
- removeCss = insertCss(content, { replace: true });
- });
- module.hot.dispose(function() { removeCss(); });
- }
- /***/ }),
- /* 131 */
- /***/ (function(module, exports, __webpack_require__) {
- var content = __webpack_require__(125);
- var insertCss = __webpack_require__(9);
- if (typeof content === 'string') {
- content = [[module.i, content, '']];
- }
- module.exports = content.locals || {};
- module.exports._getContent = function() { return content; };
- module.exports._getCss = function() { return content.toString(); };
- module.exports._insertCss = function(options) { return insertCss(content, options) };
- // Hot Module Replacement
- // https://webpack.github.io/docs/hot-module-replacement
- // Only activated in browser context
- if (false) {
- var removeCss = function() {};
- module.hot.accept("!!../../../../node_modules/css-loader/index.js??ref--1-1!../../../../node_modules/postcss-loader/lib/index.js??ref--1-2!./Page.css", function() {
- content = require("!!../../../../node_modules/css-loader/index.js??ref--1-1!../../../../node_modules/postcss-loader/lib/index.js??ref--1-2!./Page.css");
- if (typeof content === 'string') {
- content = [[module.id, content, '']];
- }
- removeCss = insertCss(content, { replace: true });
- });
- module.hot.dispose(function() { removeCss(); });
- }
- /***/ }),
- /* 132 */
- /***/ (function(module, exports, __webpack_require__) {
- var content = __webpack_require__(126);
- var insertCss = __webpack_require__(9);
- if (typeof content === 'string') {
- content = [[module.i, content, '']];
- }
- module.exports = content.locals || {};
- module.exports._getContent = function() { return content; };
- module.exports._getCss = function() { return content.toString(); };
- module.exports._insertCss = function(options) { return insertCss(content, options) };
- // Hot Module Replacement
- // https://webpack.github.io/docs/hot-module-replacement
- // Only activated in browser context
- if (false) {
- var removeCss = function() {};
- module.hot.accept("!!../../../node_modules/css-loader/index.js??ref--1-1!../../../node_modules/postcss-loader/lib/index.js??ref--1-2!./Admin.css", function() {
- content = require("!!../../../node_modules/css-loader/index.js??ref--1-1!../../../node_modules/postcss-loader/lib/index.js??ref--1-2!./Admin.css");
- if (typeof content === 'string') {
- content = [[module.id, content, '']];
- }
- removeCss = insertCss(content, { replace: true });
- });
- module.hot.dispose(function() { removeCss(); });
- }
- /***/ }),
- /* 133 */
- /***/ (function(module, exports, __webpack_require__) {
- var content = __webpack_require__(127);
- var insertCss = __webpack_require__(9);
- if (typeof content === 'string') {
- content = [[module.i, content, '']];
- }
- module.exports = content.locals || {};
- module.exports._getContent = function() { return content; };
- module.exports._getCss = function() { return content.toString(); };
- module.exports._insertCss = function(options) { return insertCss(content, options) };
- // Hot Module Replacement
- // https://webpack.github.io/docs/hot-module-replacement
- // Only activated in browser context
- if (false) {
- var removeCss = function() {};
- module.hot.accept("!!../../../node_modules/css-loader/index.js??ref--1-1!../../../node_modules/postcss-loader/lib/index.js??ref--1-2!./Contact.css", function() {
- content = require("!!../../../node_modules/css-loader/index.js??ref--1-1!../../../node_modules/postcss-loader/lib/index.js??ref--1-2!./Contact.css");
- if (typeof content === 'string') {
- content = [[module.id, content, '']];
- }
- removeCss = insertCss(content, { replace: true });
- });
- module.hot.dispose(function() { removeCss(); });
- }
- /***/ }),
- /* 134 */
- /***/ (function(module, exports, __webpack_require__) {
- var content = __webpack_require__(129);
- var insertCss = __webpack_require__(9);
- if (typeof content === 'string') {
- content = [[module.i, content, '']];
- }
- module.exports = content.locals || {};
- module.exports._getContent = function() { return content; };
- module.exports._getCss = function() { return content.toString(); };
- module.exports._insertCss = function(options) { return insertCss(content, options) };
- // Hot Module Replacement
- // https://webpack.github.io/docs/hot-module-replacement
- // Only activated in browser context
- if (false) {
- var removeCss = function() {};
- module.hot.accept("!!../../../node_modules/css-loader/index.js??ref--1-1!../../../node_modules/postcss-loader/lib/index.js??ref--1-2!./NotFound.css", function() {
- content = require("!!../../../node_modules/css-loader/index.js??ref--1-1!../../../node_modules/postcss-loader/lib/index.js??ref--1-2!./NotFound.css");
- if (typeof content === 'string') {
- content = [[module.id, content, '']];
- }
- removeCss = insertCss(content, { replace: true });
- });
- module.hot.dispose(function() { removeCss(); });
- }
- /***/ }),
- /* 135 */
- /***/ (function(module, exports) {
- module.exports = {"title":"About Us","component":"ContentPage","html":"<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat\ntortor fermentum mi fermentum dignissim. Nullam vel ipsum ut ligula elementum\nlobortis. Maecenas aliquam, massa laoreet lacinia pretium, nisi urna venenatis\ntortor, nec imperdiet tellus libero efficitur metus. Fusce semper posuere\nligula, et facilisis metus bibendum interdum. Mauris at mauris sit amet sem\npharetra commodo a eu leo. Nam at est non risus cursus maximus. Nam feugiat\naugue libero, id consectetur tortor bibendum non. Quisque nec fringilla lorem.\nNullam efficitur vulputate mauris, nec maximus leo dignissim id.</p>\n<p>In hac habitasse platea dictumst. Duis sagittis dui ac ex suscipit maximus.\nMorbi pellentesque venenatis felis sed convallis. Nulla varius, nibh vitae\nplacerat tempus, mauris sem elementum ipsum, eget sollicitudin nisl est vel\npurus. Fusce malesuada odio velit, non cursus leo fermentum id. Cras pharetra\nsodales fringilla. Etiam quis est a dolor egestas pellentesque. Maecenas non\nscelerisque purus, congue cursus arcu. Donec vel dapibus mi. Mauris maximus\nposuere placerat. Sed et libero eu nibh tristique mollis a eget lectus. Donec\ninterdum augue sollicitudin vehicula hendrerit. Vivamus justo orci, molestie\nac sollicitudin ac, lobortis at tellus. Etiam rhoncus ullamcorper risus eu\ntempor. Sed porttitor, neque ac efficitur gravida, arcu lacus pharetra dui, in\nconsequat elit tellus auctor nulla. Donec placerat elementum diam, vitae\nimperdiet lectus luctus at.</p>\n<p>Nullam eu feugiat mi. Quisque nec tristique nisl, dignissim dictum leo. Nam\nnon quam nisi. Donec rutrum turpis ac diam blandit, id pulvinar mauris\nsuscipit. Pellentesque tincidunt libero ultricies risus iaculis, sit amet\nconsequat velit blandit. Fusce quis varius nulla. Nullam nisi nisi, suscipit\nut magna quis, feugiat porta nibh. Sed id enim lectus. Suspendisse elementum\njusto sapien, sit amet consequat orci accumsan et. Aliquam ornare ullamcorper\nsem sed finibus. Nullam ac lacus pulvinar, egestas felis ut, accumsan est.</p>\n<p>Pellentesque sagittis vehicula sem quis luctus. Proin sodales magna in lorem\nhendrerit aliquam. Integer eu varius orci. Vestibulum ante ipsum primis in\nfaucibus orci luctus et ultrices posuere cubilia Curae; Vestibulum ante ipsum\nprimis in faucibus orci luctus et ultrices posuere cubilia Curae; Ut at mauris\nnibh. Suspendisse maximus ac eros at vestibulum.</p>\n<p>Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque egestas\ntortor et dui consequat faucibus. Nunc vitae odio ornare, venenatis ligula a,\nvulputate nisl. Aenean congue varius ex, sit amet bibendum odio posuere at.\nNulla facilisi. In finibus, nulla vitae tincidunt ornare, sapien nulla\nfermentum mauris, sed consectetur tortor arcu eget arcu. Vestibulum vel quam\nenim.</p>\n"};
- /***/ }),
- /* 136 */
- /***/ (function(module, exports) {
- module.exports = {"title":"Privacy Policy","html":"<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat\ntortor fermentum mi fermentum dignissim. Nullam vel ipsum ut ligula elementum\nlobortis. Maecenas aliquam, massa laoreet lacinia pretium, nisi urna venenatis\ntortor, nec imperdiet tellus libero efficitur metus. Fusce semper posuere\nligula, et facilisis metus bibendum interdum. Mauris at mauris sit amet sem\npharetra commodo a eu leo. Nam at est non risus cursus maximus. Nam feugiat\naugue libero, id consectetur tortor bibendum non. Quisque nec fringilla lorem.\nNullam efficitur vulputate mauris, nec maximus leo dignissim id.</p>\n<p>In hac habitasse platea dictumst. Duis sagittis dui ac ex suscipit maximus.\nMorbi pellentesque venenatis felis sed convallis. Nulla varius, nibh vitae\nplacerat tempus, mauris sem elementum ipsum, eget sollicitudin nisl est vel\npurus. Fusce malesuada odio velit, non cursus leo fermentum id. Cras pharetra\nsodales fringilla. Etiam quis est a dolor egestas pellentesque. Maecenas non\nscelerisque purus, congue cursus arcu. Donec vel dapibus mi. Mauris maximus\nposuere placerat. Sed et libero eu nibh tristique mollis a eget lectus. Donec\ninterdum augue sollicitudin vehicula hendrerit. Vivamus justo orci, molestie\nac sollicitudin ac, lobortis at tellus. Etiam rhoncus ullamcorper risus eu\ntempor. Sed porttitor, neque ac efficitur gravida, arcu lacus pharetra dui, in\nconsequat elit tellus auctor nulla. Donec placerat elementum diam, vitae\nimperdiet lectus luctus at.</p>\n<p>Nullam eu feugiat mi. Quisque nec tristique nisl, dignissim dictum leo. Nam\nnon quam nisi. Donec rutrum turpis ac diam blandit, id pulvinar mauris\nsuscipit. Pellentesque tincidunt libero ultricies risus iaculis, sit amet\nconsequat velit blandit. Fusce quis varius nulla. Nullam nisi nisi, suscipit\nut magna quis, feugiat porta nibh. Sed id enim lectus. Suspendisse elementum\njusto sapien, sit amet consequat orci accumsan et. Aliquam ornare ullamcorper\nsem sed finibus. Nullam ac lacus pulvinar, egestas felis ut, accumsan est.</p>\n<p>Pellentesque sagittis vehicula sem quis luctus. Proin sodales magna in lorem\nhendrerit aliquam. Integer eu varius orci. Vestibulum ante ipsum primis in\nfaucibus orci luctus et ultrices posuere cubilia Curae; Vestibulum ante ipsum\nprimis in faucibus orci luctus et ultrices posuere cubilia Curae; Ut at mauris\nnibh. Suspendisse maximus ac eros at vestibulum.</p>\n<p>Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque egestas\ntortor et dui consequat faucibus. Nunc vitae odio ornare, venenatis ligula a,\nvulputate nisl. Aenean congue varius ex, sit amet bibendum odio posuere at.\nNulla facilisi. In finibus, nulla vitae tincidunt ornare, sapien nulla\nfermentum mauris, sed consectetur tortor arcu eget arcu. Vestibulum vel quam\nenim.</p>\n"};
- /***/ }),
- /* 137 */
- /***/ (function(module, exports) {
- module.exports = require("./assets.json");
- /***/ }),
- /* 138 */
- /***/ (function(module, exports) {
- module.exports = require("babel-runtime/core-js/json/stringify");
- /***/ }),
- /* 139 */
- /***/ (function(module, exports) {
- module.exports = require("babel-runtime/helpers/slicedToArray");
- /***/ }),
- /* 140 */
- /***/ (function(module, exports) {
- module.exports = require("body-parser");
- /***/ }),
- /* 141 */
- /***/ (function(module, exports) {
- module.exports = require("cookie-parser");
- /***/ }),
- /* 142 */
- /***/ (function(module, exports) {
- module.exports = require("create-react-class");
- /***/ }),
- /* 143 */
- /***/ (function(module, exports) {
- module.exports = require("ejs");
- /***/ }),
- /* 144 */
- /***/ (function(module, exports) {
- module.exports = require("express");
- /***/ }),
- /* 145 */
- /***/ (function(module, exports) {
- module.exports = require("express-graphql");
- /***/ }),
- /* 146 */
- /***/ (function(module, exports) {
- module.exports = require("express-jwt");
- /***/ }),
- /* 147 */
- /***/ (function(module, exports) {
- module.exports = require("history/createBrowserHistory");
- /***/ }),
- /* 148 */
- /***/ (function(module, exports) {
- module.exports = require("jsonp");
- /***/ }),
- /* 149 */
- /***/ (function(module, exports) {
- module.exports = require("jsonwebtoken");
- /***/ }),
- /* 150 */
- /***/ (function(module, exports) {
- module.exports = require("passport");
- /***/ }),
- /* 151 */
- /***/ (function(module, exports) {
- module.exports = require("path");
- /***/ }),
- /* 152 */
- /***/ (function(module, exports) {
- module.exports = require("pretty-error");
- /***/ }),
- /* 153 */
- /***/ (function(module, exports) {
- module.exports = require("react-dom");
- /***/ }),
- /* 154 */
- /***/ (function(module, exports) {
- module.exports = require("react-dom/server");
- /***/ }),
- /* 155 */
- /***/ (function(module, exports) {
- module.exports = require("react-facebook-login");
- /***/ }),
- /* 156 */
- /***/ (function(module, exports) {
- module.exports = require("react-google-login");
- /***/ }),
- /* 157 */
- /***/ (function(module, exports) {
- module.exports = require("redux-thunk");
- /***/ }),
- /* 158 */
- /***/ (function(module, exports) {
- module.exports = require("serialize-javascript");
- /***/ }),
- /* 159 */
- /***/ (function(module, exports) {
- module.exports = require("universal-router");
- /***/ }),
- /* 160 */
- /***/ (function(module, exports) {
- module.exports = require("util");
- /***/ }),
- /* 161 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(50);
- module.exports = __webpack_require__(49);
- /***/ })
- /******/ ]);
- //# sourceMappingURL=server.js.map
Add Comment
Please, Sign In to add comment