Browse Source

sessao 6 por completar

master
pedro.luis@sitana.pt 5 years ago
parent
commit
e2e62c5e3c
6 changed files with 216 additions and 1 deletions
  1. BIN
      dbs/social.mv.db
  2. +157
    -0
      public/scripts/main.js
  3. +1
    -1
      public/scripts/main.js.map
  4. +34
    -0
      ui/src/containers/Dashboard2Container/index.jsx
  5. +0
    -0
      ui/src/containers/Dashboard2Container/index.less
  6. +24
    -0
      ui/src/index.jsx

BIN
dbs/social.mv.db View File


+ 157
- 0
public/scripts/main.js View File

@ -175087,6 +175087,24 @@ function copy(text, options) {
module.exports = copy;
/***/ }),
/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/less-loader/dist/cjs.js?!./src/containers/Dashboard2Container/index.less":
/*!********************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader/dist/cjs.js??ref--6-1!./node_modules/less-loader/dist/cjs.js??ref--6-2!./src/containers/Dashboard2Container/index.less ***!
\********************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// Imports
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
exports = ___CSS_LOADER_API_IMPORT___(true);
// Module
exports.push([module.i, "", "",{"version":3,"sources":[],"names":[],"mappings":"","file":"index.less"}]);
// Exports
module.exports = exports;
/***/ }),
/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/less-loader/dist/cjs.js?!./src/containers/DashboardContainer/index.less":
@ -242737,6 +242755,133 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
/***/ }),
/***/ "./src/containers/Dashboard2Container/index.jsx":
/*!******************************************************!*\
!*** ./src/containers/Dashboard2Container/index.jsx ***!
\******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Dashboard2Container; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var antd_lib_spin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/lib/spin */ "./node_modules/antd/lib/spin/index.js");
/* harmony import */ var antd_lib_spin__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(antd_lib_spin__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.less */ "./src/containers/Dashboard2Container/index.less");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_2__);
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
var Dashboard2Container = /*#__PURE__*/function (_Component) {
_inherits(Dashboard2Container, _Component);
var _super = _createSuper(Dashboard2Container);
function Dashboard2Container(props) {
var _this;
_classCallCheck(this, Dashboard2Container);
_this = _super.call(this, props);
_this.state = {
menuClick: false
};
return _this;
}
_createClass(Dashboard2Container, [{
key: "componentWillMount",
value: function componentWillMount() {}
}, {
key: "navigationClick",
value: function navigationClick() {
var _this2 = this;
this.setState({
menuClick: false
});
setTimeout(function () {
return _this2.setState({
menuClick: true
});
}, 3000);
}
}, {
key: "render",
value: function render() {
var menuClick = this.state.menuClick;
if (menuClick) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
className: "my-dashboard2"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h1", null, "Dashboard 2 REACT!!!"));
}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(antd_lib_spin__WEBPACK_IMPORTED_MODULE_1___default.a, null));
}
}]);
return Dashboard2Container;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
/***/ }),
/***/ "./src/containers/Dashboard2Container/index.less":
/*!*******************************************************!*\
!*** ./src/containers/Dashboard2Container/index.less ***!
\*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var api = __webpack_require__(/*! ../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
var content = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js??ref--6-1!../../../node_modules/less-loader/dist/cjs.js??ref--6-2!./index.less */ "./node_modules/css-loader/dist/cjs.js?!./node_modules/less-loader/dist/cjs.js?!./src/containers/Dashboard2Container/index.less");
content = content.__esModule ? content.default : content;
if (typeof content === 'string') {
content = [[module.i, content, '']];
}
var options = {};
options.insert = "head";
options.singleton = false;
var update = api(content, options);
module.exports = content.locals || {};
/***/ }),
/***/ "./src/containers/DashboardContainer/index.jsx":
/*!*****************************************************!*\
!*** ./src/containers/DashboardContainer/index.jsx ***!
@ -243142,17 +243287,29 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _containers_DashboardContainer_index_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./containers/DashboardContainer/index.jsx */ "./src/containers/DashboardContainer/index.jsx");
/* harmony import */ var _containers_Dashboard2Container_index_jsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./containers/Dashboard2Container/index.jsx */ "./src/containers/Dashboard2Container/index.jsx");
var dashboardDiv = document.getElementById("app-dashboard");
var dashboardContainer = dashboardDiv ? react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_containers_DashboardContainer_index_jsx__WEBPACK_IMPORTED_MODULE_2__["default"], null), dashboardDiv) : false;
netuno.addNavigationLoad(function () {
var navigation = $('[netuno-navigation]');
navigation.children().first().after("\n <li>\n <a netuno-navigation-dashboard2 href=\"#netuno_dashboard2\">\n <i class=\"fa fa-fw fa-dashboard\"></i> Dashboard2\n </a>\n </li>");
var containers = $('[netuno-containers]');
containers.children().first().after("\n <div netuno-container-dashboard2 id=\"netuno_dashboard2\" style=\"display:none;\">Novo Dashboard\n </div>");
var dashboard2Div = document.getElementById("netuno_dashboard2");
var dashboard2Container = dashboard2Div ? react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_containers_Dashboard2Container_index_jsx__WEBPACK_IMPORTED_MODULE_3__["default"], null), dashboard2Div) : false;
$('[netuno-navigation]').find('a').on('netuno:click', function (e) {
var link = $(e.target);
if (dashboardContainer && link.is('[netuno-navigation-dashboard]')) {// Menu > Dashboard > Clicked!
}
if (dashboard2Container && link.is('[netuno-navigation-dashboard2]')) {
dashboard2Container.navigationClick();
}
});
});
netuno.addContentLoad(function (container) {


+ 1
- 1
public/scripts/main.js.map
File diff suppressed because it is too large
View File


+ 34
- 0
ui/src/containers/Dashboard2Container/index.jsx View File

@ -0,0 +1,34 @@
import React, { Component } from "react";
import Spin from 'antd/lib/spin';
import "./index.less";
export default class Dashboard2Container extends Component {
constructor(props) {
super(props);
this.state = {
menuClick: false
};
}
componentWillMount() {
}
navigationClick() {
this.setState({ menuClick: false });
setTimeout(() =>this.setState({ menuClick: true }), 3000);
}
render() {
const { menuClick } = this.state;
if (menuClick) {
return (
<div className="my-dashboard2">
<h1>Dashboard 2 REACT!!!</h1>
</div>
);
}
return <div><Spin /></div>
}
}

+ 0
- 0
ui/src/containers/Dashboard2Container/index.less View File


+ 24
- 0
ui/src/index.jsx View File

@ -1,17 +1,41 @@
import React from "react";
import ReactDOM from "react-dom";
import DashboardContainer from "./containers/DashboardContainer/index.jsx";
import Dashboard2Container from "./containers/Dashboard2Container/index.jsx";
const dashboardDiv = document.getElementById("app-dashboard");
const dashboardContainer = dashboardDiv ? ReactDOM.render(<DashboardContainer />, dashboardDiv) : false;
netuno.addNavigationLoad(() => {
const navigation = $('[netuno-navigation]');
navigation.children().first().after(`
<li>
<a netuno-navigation-dashboard2 href="#netuno_dashboard2">
<i class="fa fa-fw fa-dashboard"></i> Dashboard2
</a>
</li>`);
const containers = $('[netuno-containers]');
containers.children().first().after(`
<div netuno-container-dashboard2 id="netuno_dashboard2" style="display:none;">Novo Dashboard
</div>`);
const dashboard2Div = document.getElementById("netuno_dashboard2");
const dashboard2Container = dashboard2Div ? ReactDOM.render(<Dashboard2Container />, dashboard2Div) : false;
$('[netuno-navigation]').find('a').on('netuno:click', (e)=> {
const link = $(e.target);
if (dashboardContainer && link.is('[netuno-navigation-dashboard]')) {
// Menu > Dashboard > Clicked!
}
if (dashboard2Container && link.is('[netuno-navigation-dashboard2]')) {
dashboard2Container.navigationClick();
}
});
});


Loading…
Cancel
Save