forked from projects/fipamo
quick commit for review
This commit is contained in:
parent
e2b3a6e838
commit
1f52df297a
14 changed files with 13558 additions and 273 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -16,3 +16,4 @@ brain/models/_backup/
|
|||
/_maintenance/
|
||||
/migrations
|
||||
*.DS_Store
|
||||
/forfipamo
|
||||
|
|
|
@ -26,6 +26,7 @@ const dateUtils = new DateUtils();
|
|||
const stringUtils = new StringUtils();
|
||||
const rightsManager = new RightsManager();
|
||||
var uploadPath = "./content/blog-images/" + dateUtils.getDate('year', new Date()) + "/" + dateUtils.getDate('month', new Date());
|
||||
var PouchDB = require('pouchdb');
|
||||
fs.ensureDir(uploadPath, function(err)
|
||||
{
|
||||
//console.log(err) // => null
|
||||
|
@ -51,6 +52,38 @@ var post_upload = multer(
|
|||
{
|
||||
storage: storage
|
||||
}).array('post_image');
|
||||
router.post('/couch', function(req, res, next)
|
||||
{
|
||||
console.log(req.body)
|
||||
var db = new PouchDB(req.body.name)
|
||||
var remote = new PouchDB('http://hnic:myShit!@localhost:5984/forfipamo');
|
||||
|
||||
db.sync(remote).then(result =>
|
||||
{
|
||||
console.log(result);
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
})
|
||||
res.json(
|
||||
{
|
||||
message: "yes khaleesi"
|
||||
});
|
||||
})
|
||||
router.get('/', function(req, res, next)
|
||||
{
|
||||
Models.Post.findAll(
|
||||
{
|
||||
order: [
|
||||
['id', 'DESC']
|
||||
]
|
||||
}).then(function(posts)
|
||||
{
|
||||
res.json(posts)
|
||||
}).catch(function(err)
|
||||
{
|
||||
//next(err);
|
||||
})
|
||||
})
|
||||
/***
|
||||
ADD POST
|
||||
*/
|
||||
|
|
19
brain/app.js
19
brain/app.js
|
@ -14,6 +14,25 @@ app.set('views', path.join(__dirname, '../themes'));
|
|||
app.set('view engine', 'pug');
|
||||
app.use(express.static(__dirname + '../content/folio-images'));
|
||||
app.use(logger('dev'));
|
||||
|
||||
// wherever your db lives
|
||||
var DATABASE_URL = 'http://localhost:5984/forfipamo';
|
||||
|
||||
// middleware itself, preceding any parsers
|
||||
app.use(function(req, res, next){
|
||||
var proxy_path = req.path.match(/^\/forfipamo(.*)$/);
|
||||
if(proxy_path){
|
||||
var db_url = DATABASE_URL + proxy_path[1];
|
||||
console.log("YUP "+proxy_path[1]);
|
||||
req.pipe(request({
|
||||
uri: db_url,
|
||||
method: req.method
|
||||
})).pipe(res);
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
});
|
||||
|
||||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.urlencoded(
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import EventEmitter from '../events/EventEmitter.jsx';;
|
||||
import EventEmitter from '../events/EventEmitter';
|
||||
|
||||
class Animate extends EventEmitter {
|
||||
//--------------------------
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
import * as DataEvent from '../events/DataEvent';
|
||||
import DateUtils from '../utilities/DateUtils';
|
||||
import {
|
||||
import
|
||||
{
|
||||
position,
|
||||
offset
|
||||
} from 'caret-pos';
|
||||
|
||||
}
|
||||
from 'caret-pos';
|
||||
import EventEmitter from '../events/EventEmitter';
|
||||
import * as EditorEvent from '../events/EditorEvent';
|
||||
|
||||
class TextEditor extends EventEmitter {
|
||||
|
||||
class TextEditor extends EventEmitter
|
||||
{
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor(textEditor, scrollLimit) {
|
||||
constructor(textEditor, scrollLimit)
|
||||
{
|
||||
super();
|
||||
hljs.initHighlightingOnLoad();
|
||||
//this.dataUtils = new DataUtils();
|
||||
this.dateUtils = new DateUtils();
|
||||
this.textEditor = textEditor;
|
||||
this.fixLimit = scrollLimit;
|
||||
|
@ -24,12 +24,15 @@ class TextEditor extends EventEmitter {
|
|||
this.url = '';
|
||||
let self = this;
|
||||
this.setInputs();
|
||||
|
||||
window.addEventListener("scroll", f => {
|
||||
window.addEventListener("scroll", f =>
|
||||
{
|
||||
var fixLimit = this.fixLimit;
|
||||
if (window.pageYOffset >= fixLimit) {
|
||||
if (window.pageYOffset >= fixLimit)
|
||||
{
|
||||
document.getElementById('edit-control').style.position = "fixed"
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById('edit-control').style.position = "relative"
|
||||
}
|
||||
});
|
||||
|
@ -38,27 +41,33 @@ class TextEditor extends EventEmitter {
|
|||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
setInputs() {
|
||||
setInputs()
|
||||
{
|
||||
let self = this;
|
||||
var editorButtons = document.querySelectorAll('.editor-button');
|
||||
for (var i = 0, length = editorButtons.length; i < length; i++) {
|
||||
for (var i = 0, length = editorButtons.length; i < length; i++)
|
||||
{
|
||||
editorButtons[i].addEventListener('click', e => this.handleEditorOption(e), false);
|
||||
}
|
||||
this.textEditor.addEventListener('input', f => {
|
||||
if(f.inputType == "insertParagraph")
|
||||
this.textEditor.addEventListener('input', f =>
|
||||
{
|
||||
var caret = position(self.textEditor).pos+1;
|
||||
if (f.inputType == "insertParagraph")
|
||||
{
|
||||
var caret = position(self.textEditor).pos + 1;
|
||||
var spiffed = hljs.highlight('markdown', self.textEditor.innerText).value;
|
||||
var temp = document.createElement("div");
|
||||
temp.innerText = spiffed;
|
||||
self.textEditor.innerHTML = temp.innerText;
|
||||
position(self.textEditor, caret)
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
self.refresh()
|
||||
}
|
||||
})
|
||||
}
|
||||
refresh() {
|
||||
refresh()
|
||||
{
|
||||
var caret = position(this.textEditor).pos;
|
||||
var spiffed = hljs.highlight('markdown', this.textEditor.innerText).value;
|
||||
var temp = document.createElement("div");
|
||||
|
@ -66,21 +75,22 @@ class TextEditor extends EventEmitter {
|
|||
this.textEditor.innerHTML = temp.innerText;
|
||||
position(this.textEditor, caret)
|
||||
}
|
||||
|
||||
notify(type, data) {
|
||||
switch (type) {
|
||||
notify(type, data)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DataEvent.POST_UPDATED:
|
||||
document.getElementById('submit-update').classList.add('icon-hide');
|
||||
document.getElementById('submit-good').classList.remove('icon-hide');
|
||||
document.getElementById('edit-update').classList.remove('submit-start');
|
||||
document.getElementById('edit-update').classList.add('submit-cool');
|
||||
setTimeout(f => {
|
||||
setTimeout(f =>
|
||||
{
|
||||
document.getElementById('submit-update').classList.remove('icon-hide');
|
||||
document.getElementById('submit-good').classList.add('icon-hide');
|
||||
document.getElementById('edit-update').classList.add('submit-start');
|
||||
document.getElementById('edit-update').classList.remove('submit-cool');
|
||||
}, 2000);
|
||||
|
||||
break;
|
||||
case DataEvent.POST_ADDED:
|
||||
// do nothing
|
||||
|
@ -90,7 +100,8 @@ class TextEditor extends EventEmitter {
|
|||
var sel, range, pulled;
|
||||
sel = window.getSelection(); //console.log(sel)
|
||||
//console.log(note.message)
|
||||
if (sel.rangeCount) {
|
||||
if (sel.rangeCount)
|
||||
{
|
||||
range = sel.getRangeAt(0);
|
||||
pulled = sel.getRangeAt(0).toString();
|
||||
range.deleteContents();
|
||||
|
@ -100,20 +111,22 @@ class TextEditor extends EventEmitter {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
handleEditorOption(e) {
|
||||
handleEditorOption(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var self = this;
|
||||
var sel, range, pulled;
|
||||
sel = window.getSelection(); //console.log(sel)
|
||||
if (sel.rangeCount) {
|
||||
if (sel.rangeCount)
|
||||
{
|
||||
range = sel.getRangeAt(0);
|
||||
pulled = sel.getRangeAt(0).toString();
|
||||
range.deleteContents();
|
||||
switch (e.target.id) {
|
||||
switch (e.target.id)
|
||||
{
|
||||
case "edit-bold":
|
||||
range.insertNode(document.createTextNode("**" + pulled + "**"));
|
||||
break;
|
||||
|
|
|
@ -4,8 +4,8 @@ export const REQUEST_TYPE_PUT = "PUT";
|
|||
export const REQUEST_TYPE_DELETE = "DELETE";
|
||||
export const CONTENT_TYPE_JSON = 'json';
|
||||
export const CONTENT_TYPE_FORM = 'x-www-form-urlencoded';
|
||||
import EventEmitter from '../events/EventEmitter.jsx';
|
||||
import * as DataEvent from '../events/DataEvent.jsx';
|
||||
import EventEmitter from '../events/EventEmitter';
|
||||
import * as DataEvent from '../events/DataEvent';
|
||||
class DataUtils extends EventEmitter {
|
||||
//--------------------------
|
||||
// constructor
|
||||
|
|
612
package-lock.json
generated
612
package-lock.json
generated
|
@ -847,6 +847,14 @@
|
|||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
|
||||
},
|
||||
"abstract-leveldown": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "http://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-4.0.3.tgz",
|
||||
"integrity": "sha512-qsIHFQy0u17JqSY+3ZUT+ykqxYY17yOfvAsLkFkw8kSQqi05d1jyj0bCuSX6sjYlXuY9cKpgUt5EudQdP4aXyA==",
|
||||
"requires": {
|
||||
"xtend": "~4.0.0"
|
||||
}
|
||||
},
|
||||
"accepts": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
|
||||
|
@ -946,6 +954,20 @@
|
|||
"resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
|
||||
"integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY="
|
||||
},
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
|
||||
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
|
||||
},
|
||||
"are-we-there-yet": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
|
||||
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
|
||||
"requires": {
|
||||
"delegates": "^1.0.0",
|
||||
"readable-stream": "^2.0.6"
|
||||
}
|
||||
},
|
||||
"argparse": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||
|
@ -954,6 +976,11 @@
|
|||
"sprintf-js": "~1.0.2"
|
||||
}
|
||||
},
|
||||
"argsarray": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/argsarray/-/argsarray-0.0.1.tgz",
|
||||
"integrity": "sha1-bnIHtOzbObCviDA/pa4ivajfYcs="
|
||||
},
|
||||
"arr-diff": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
|
||||
|
@ -1815,6 +1842,20 @@
|
|||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"bindings": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz",
|
||||
"integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw=="
|
||||
},
|
||||
"bl": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "http://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
|
||||
"integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==",
|
||||
"requires": {
|
||||
"readable-stream": "^2.3.5",
|
||||
"safe-buffer": "^5.1.1"
|
||||
}
|
||||
},
|
||||
"bluebird": {
|
||||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.2.tgz",
|
||||
|
@ -1921,11 +1962,30 @@
|
|||
"node-releases": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"buffer-alloc": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
|
||||
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
|
||||
"requires": {
|
||||
"buffer-alloc-unsafe": "^1.1.0",
|
||||
"buffer-fill": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"buffer-alloc-unsafe": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
|
||||
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
|
||||
},
|
||||
"buffer-equal": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz",
|
||||
"integrity": "sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs="
|
||||
},
|
||||
"buffer-fill": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
|
||||
"integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw="
|
||||
},
|
||||
"buffer-from": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
|
||||
|
@ -2066,6 +2126,11 @@
|
|||
"upath": "^1.0.5"
|
||||
}
|
||||
},
|
||||
"chownr": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
|
||||
"integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g=="
|
||||
},
|
||||
"class-utils": {
|
||||
"version": "0.3.6",
|
||||
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
|
||||
|
@ -2138,6 +2203,11 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"clone-buffer": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz",
|
||||
"integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg="
|
||||
},
|
||||
"cls-bluebird": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/cls-bluebird/-/cls-bluebird-2.1.0.tgz",
|
||||
|
@ -2230,6 +2300,11 @@
|
|||
"resolved": "https://registry.npmjs.org/connect-flash/-/connect-flash-0.1.1.tgz",
|
||||
"integrity": "sha1-2GMPJtlaf4UfmVax6MxnMvO2qjA="
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
||||
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
|
||||
},
|
||||
"constantinople": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/constantinople/-/constantinople-3.1.2.tgz",
|
||||
|
@ -2396,11 +2471,32 @@
|
|||
"integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
|
||||
"dev": true
|
||||
},
|
||||
"decompress-response": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",
|
||||
"integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=",
|
||||
"requires": {
|
||||
"mimic-response": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"deep-extend": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
||||
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
|
||||
},
|
||||
"deep-is": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
|
||||
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
|
||||
},
|
||||
"deferred-leveldown": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-3.0.0.tgz",
|
||||
"integrity": "sha512-ajbXqRPMXRlcdyt0TuWqknOJkp1JgQjGB7xOl2V+ebol7/U11E9h3/nCZAtN1M7djmAJEIhypCUc1tIWxdQAuQ==",
|
||||
"requires": {
|
||||
"abstract-leveldown": "~4.0.0"
|
||||
}
|
||||
},
|
||||
"define-property": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
|
||||
|
@ -2469,6 +2565,11 @@
|
|||
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==",
|
||||
"optional": true
|
||||
},
|
||||
"delegates": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
||||
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
|
||||
},
|
||||
"depd": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
|
||||
|
@ -2479,6 +2580,11 @@
|
|||
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
|
||||
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
|
||||
},
|
||||
"detect-libc": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
||||
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="
|
||||
},
|
||||
"dicer": {
|
||||
"version": "0.2.5",
|
||||
"resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz",
|
||||
|
@ -2567,6 +2673,11 @@
|
|||
"resolved": "https://registry.npmjs.org/dottie/-/dottie-2.0.1.tgz",
|
||||
"integrity": "sha512-ch5OQgvGDK2u8pSZeSYAQaV/lczImd7pMJ7BcEPXmnFVjy4yJIzP6CsODJUTH8mg1tyH1Z2abOiuJO3DjZ/GBw=="
|
||||
},
|
||||
"double-ended-queue": {
|
||||
"version": "2.1.0-0",
|
||||
"resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz",
|
||||
"integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw="
|
||||
},
|
||||
"duplexer2": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
|
||||
|
@ -2620,6 +2731,40 @@
|
|||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
||||
"integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
|
||||
},
|
||||
"encoding-down": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-4.0.1.tgz",
|
||||
"integrity": "sha512-AlSE+ugBIpLL0i9if2SlnOZ4oWj/XvBb8tw2Ie/pFB73vdYs5O/6plRyqIgjbZbz8onaL20AAuMP87LWbP56IQ==",
|
||||
"requires": {
|
||||
"abstract-leveldown": "^4.0.0",
|
||||
"level-codec": "^8.0.0",
|
||||
"level-errors": "^1.0.4",
|
||||
"xtend": "^4.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"level-codec": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/level-codec/-/level-codec-8.0.0.tgz",
|
||||
"integrity": "sha512-gNZlo1HRHz0BWxzGCyNf7xntAs2HKOPvvRBWtXsoDvEX4vMYnSTBS6ZnxoaiX7nhxSBPpegRa8CQ/hnfGBKk3Q=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"end-of-stream": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
|
||||
"integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
|
||||
"requires": {
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"end-stream": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/end-stream/-/end-stream-0.1.0.tgz",
|
||||
"integrity": "sha1-MgA/P0OKKwFDFoE3+PpumGbIHtU=",
|
||||
"requires": {
|
||||
"write-stream": "~0.4.3"
|
||||
}
|
||||
},
|
||||
"entities": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
|
||||
|
@ -2633,6 +2778,14 @@
|
|||
"brfs": "^1.4.3"
|
||||
}
|
||||
},
|
||||
"errno": {
|
||||
"version": "0.1.7",
|
||||
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
|
||||
"integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
|
||||
"requires": {
|
||||
"prr": "~1.0.1"
|
||||
}
|
||||
},
|
||||
"es5-ext": {
|
||||
"version": "0.10.46",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.46.tgz",
|
||||
|
@ -2643,6 +2796,11 @@
|
|||
"next-tick": "1"
|
||||
}
|
||||
},
|
||||
"es6-denodeify": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/es6-denodeify/-/es6-denodeify-0.1.5.tgz",
|
||||
"integrity": "sha1-MdTV/pxVA+ElRgQ5MQ4WoqPznB8="
|
||||
},
|
||||
"es6-iterator": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
|
||||
|
@ -2800,6 +2958,11 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"expand-template": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.1.1.tgz",
|
||||
"integrity": "sha512-cebqLtV8KOZfw0UI8TEFWxtczxxC1jvyUvx6H4fyp1K1FN7A4Q+uggVUlOsI1K8AGU0rwOGqP8nCapdrw8CYQg=="
|
||||
},
|
||||
"express": {
|
||||
"version": "4.16.4",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz",
|
||||
|
@ -3013,6 +3176,11 @@
|
|||
"resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
|
||||
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
|
||||
},
|
||||
"fast-future": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/fast-future/-/fast-future-1.0.2.tgz",
|
||||
"integrity": "sha1-hDWpqqAteSSNF9cE52JZMB2ZKAo="
|
||||
},
|
||||
"fast-json-stable-stringify": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
|
||||
|
@ -3023,6 +3191,15 @@
|
|||
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
|
||||
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
|
||||
},
|
||||
"fetch-cookie": {
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-0.7.0.tgz",
|
||||
"integrity": "sha512-Mm5pGlT3agW6t71xVM7vMZPIvI7T4FaTuFW4jari6dVzYHFDb3WZZsGpN22r/o3XMdkM0E7sPd1EGeyVbH2Tgg==",
|
||||
"requires": {
|
||||
"es6-denodeify": "^0.1.1",
|
||||
"tough-cookie": "^2.3.1"
|
||||
}
|
||||
},
|
||||
"file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
|
@ -3133,6 +3310,11 @@
|
|||
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
||||
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
|
||||
},
|
||||
"fs-constants": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
|
||||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.0.tgz",
|
||||
|
@ -3721,6 +3903,41 @@
|
|||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
||||
},
|
||||
"gauge": {
|
||||
"version": "2.7.4",
|
||||
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
|
||||
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
|
||||
"requires": {
|
||||
"aproba": "^1.0.3",
|
||||
"console-control-strings": "^1.0.0",
|
||||
"has-unicode": "^2.0.0",
|
||||
"object-assign": "^4.1.0",
|
||||
"signal-exit": "^3.0.0",
|
||||
"string-width": "^1.0.1",
|
||||
"strip-ansi": "^3.0.1",
|
||||
"wide-align": "^1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"string-width": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
"strip-ansi": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"generic-pool": {
|
||||
"version": "3.4.2",
|
||||
"resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-3.4.2.tgz",
|
||||
|
@ -3773,6 +3990,11 @@
|
|||
"assert-plus": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"github-from-package": {
|
||||
"version": "0.0.0",
|
||||
"resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
|
||||
"integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4="
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
|
||||
|
@ -3866,6 +4088,11 @@
|
|||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
|
||||
},
|
||||
"has-unicode": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
||||
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
|
||||
},
|
||||
"has-value": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
|
||||
|
@ -4024,6 +4251,11 @@
|
|||
"safer-buffer": ">= 2.1.2 < 3"
|
||||
}
|
||||
},
|
||||
"immediate": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
|
||||
"integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps="
|
||||
},
|
||||
"inflection": {
|
||||
"version": "1.12.0",
|
||||
"resolved": "https://registry.npmjs.org/inflection/-/inflection-1.12.0.tgz",
|
||||
|
@ -4420,6 +4652,126 @@
|
|||
"invert-kv": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"level": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/level/-/level-3.0.2.tgz",
|
||||
"integrity": "sha512-2qYbbiptPsPWGUI+AgB1gTNXqIjPpALRqrQyNx1zWYNZxhhuzEj/IE4Unu9weEBnsUEocfYe56xOGlAceb8/Fg==",
|
||||
"requires": {
|
||||
"level-packager": "^2.0.2",
|
||||
"leveldown": "^3.0.0",
|
||||
"opencollective-postinstall": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"level-codec": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz",
|
||||
"integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ=="
|
||||
},
|
||||
"level-errors": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.1.2.tgz",
|
||||
"integrity": "sha512-Sw/IJwWbPKF5Ai4Wz60B52yj0zYeqzObLh8k1Tk88jVmD51cJSKWSYpRyhVIvFzZdvsPqlH5wfhp/yxdsaQH4w==",
|
||||
"requires": {
|
||||
"errno": "~0.1.1"
|
||||
}
|
||||
},
|
||||
"level-iterator-stream": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-2.0.3.tgz",
|
||||
"integrity": "sha512-I6Heg70nfF+e5Y3/qfthJFexhRw/Gi3bIymCoXAlijZdAcLaPuWSJs3KXyTYf23ID6g0o2QF62Yh+grOXY3Rig==",
|
||||
"requires": {
|
||||
"inherits": "^2.0.1",
|
||||
"readable-stream": "^2.0.5",
|
||||
"xtend": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"level-packager": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/level-packager/-/level-packager-2.1.1.tgz",
|
||||
"integrity": "sha512-6l3G6dVkmdvHwOJrEA9d9hL6SSFrzwjQoLP8HsvohOgfY/8Z9LyTKNCM5Gc84wtsUWCuIHu6r+S6WrCtTWUJCw==",
|
||||
"requires": {
|
||||
"encoding-down": "~4.0.0",
|
||||
"levelup": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"levelup": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/levelup/-/levelup-2.0.2.tgz",
|
||||
"integrity": "sha512-us+nTLUyd/eLnclYYddOCdAVw1hnymGx/9p4Jr5ThohStsjLqMVmbYiz6/SYFZEPXNF+AKQSvh6fA2e2KZpC8w==",
|
||||
"requires": {
|
||||
"deferred-leveldown": "~3.0.0",
|
||||
"level-errors": "~1.1.0",
|
||||
"level-iterator-stream": "~2.0.0",
|
||||
"xtend": "~4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"level-write-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/level-write-stream/-/level-write-stream-1.0.0.tgz",
|
||||
"integrity": "sha1-P3+7Z5pVE3wP6zA97nZuEu4Twdw=",
|
||||
"requires": {
|
||||
"end-stream": "~0.1.0"
|
||||
}
|
||||
},
|
||||
"leveldown": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/leveldown/-/leveldown-3.0.0.tgz",
|
||||
"integrity": "sha512-CA2mRUDTgVscTDOCvHSgYvksqj1VW7g3ss2idWfITSB7l201ahQJ81cwLTupW76idbjpx7zmmmpdttYnnHWWtA==",
|
||||
"requires": {
|
||||
"abstract-leveldown": "~4.0.0",
|
||||
"bindings": "~1.3.0",
|
||||
"fast-future": "~1.0.2",
|
||||
"nan": "~2.8.0",
|
||||
"prebuild-install": "^2.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"nan": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz",
|
||||
"integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo="
|
||||
}
|
||||
}
|
||||
},
|
||||
"levelup": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/levelup/-/levelup-3.0.1.tgz",
|
||||
"integrity": "sha512-TrrLDPC/BfP35ei2uK+L6Cc7kpI1NxIChwp+BUB6jrHG3A8gtrr9jx1UZ9bi2w1O6VN7jYO4LUoq1iKRP5AREg==",
|
||||
"requires": {
|
||||
"deferred-leveldown": "~4.0.0",
|
||||
"level-errors": "~2.0.0",
|
||||
"level-iterator-stream": "~2.0.0",
|
||||
"xtend": "~4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"abstract-leveldown": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz",
|
||||
"integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==",
|
||||
"requires": {
|
||||
"xtend": "~4.0.0"
|
||||
}
|
||||
},
|
||||
"deferred-leveldown": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-4.0.2.tgz",
|
||||
"integrity": "sha512-5fMC8ek8alH16QiV0lTCis610D1Zt1+LA4MS4d63JgS32lrCjTFDUFz2ao09/j2I4Bqb5jL4FZYwu7Jz0XO1ww==",
|
||||
"requires": {
|
||||
"abstract-leveldown": "~5.0.0",
|
||||
"inherits": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"level-errors": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.0.tgz",
|
||||
"integrity": "sha512-AmY4HCp9h3OiU19uG+3YWkdELgy05OTP/r23aNHaQKWv8DO787yZgsEuGVkoph40uwN+YdUKnANlrxSsoOaaxg==",
|
||||
"requires": {
|
||||
"errno": "~0.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"levn": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
|
||||
|
@ -4519,6 +4871,11 @@
|
|||
"es5-ext": "~0.10.2"
|
||||
}
|
||||
},
|
||||
"ltgt": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz",
|
||||
"integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU="
|
||||
},
|
||||
"magic-string": {
|
||||
"version": "0.22.5",
|
||||
"resolved": "http://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz",
|
||||
|
@ -4719,6 +5076,11 @@
|
|||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
|
||||
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="
|
||||
},
|
||||
"mimic-response": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
|
||||
"integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ=="
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
|
@ -4878,6 +5240,26 @@
|
|||
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
|
||||
},
|
||||
"node-abi": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.5.0.tgz",
|
||||
"integrity": "sha512-9g2twBGSP6wIR5PW7tXvAWnEWKJDH/VskdXp168xsw9VVxpEGov8K4jsP4/VeoC7b2ZAyzckvMCuQuQlw44lXg==",
|
||||
"requires": {
|
||||
"semver": "^5.4.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.6.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
|
||||
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz",
|
||||
"integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA=="
|
||||
},
|
||||
"node-releases": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.0.2.tgz",
|
||||
|
@ -4900,6 +5282,11 @@
|
|||
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-4.6.8.tgz",
|
||||
"integrity": "sha512-A3s7EM/426OBIZbLHXq2KkgvmKbn2Xga4m4G+ZUA4IaZvG8PcZXrFh+2E4VaS2o+emhuUVRnzKN2YmpkXQ9qwA=="
|
||||
},
|
||||
"noop-logger": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz",
|
||||
"integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI="
|
||||
},
|
||||
"nopt": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
|
||||
|
@ -4926,6 +5313,17 @@
|
|||
"path-key": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"npmlog": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
|
||||
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
||||
"requires": {
|
||||
"are-we-there-yet": "~1.1.2",
|
||||
"console-control-strings": "~1.1.0",
|
||||
"gauge": "~2.7.3",
|
||||
"set-blocking": "~2.0.0"
|
||||
}
|
||||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
||||
|
@ -5013,11 +5411,15 @@
|
|||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"opencollective-postinstall": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.1.tgz",
|
||||
"integrity": "sha512-saQQ9hjLwu/oS0492eyYotoh+bra1819cfAT5rjY/e4REWwuc8IgZ844Oo44SiftWcJuBiqp0SA0BFVbmLX0IQ=="
|
||||
},
|
||||
"optionator": {
|
||||
"version": "0.8.2",
|
||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
|
||||
|
@ -5318,6 +5720,87 @@
|
|||
"xtend": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"pouchdb": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pouchdb/-/pouchdb-7.0.0.tgz",
|
||||
"integrity": "sha512-vVZyn6SmVxYLbUmzQwU5nW1APIq/sAJ13DlYZqIJRJUUUtGy3X0F79G9/3d9StvJwfWBA/aMGPnRV2eQAp+MKA==",
|
||||
"requires": {
|
||||
"argsarray": "0.0.1",
|
||||
"buffer-from": "1.1.0",
|
||||
"clone-buffer": "1.0.0",
|
||||
"double-ended-queue": "2.1.0-0",
|
||||
"fetch-cookie": "0.7.0",
|
||||
"immediate": "3.0.6",
|
||||
"inherits": "2.0.3",
|
||||
"level": "3.0.2",
|
||||
"level-codec": "7.0.1",
|
||||
"level-write-stream": "1.0.0",
|
||||
"leveldown": "3.0.0",
|
||||
"levelup": "3.0.1",
|
||||
"ltgt": "2.2.1",
|
||||
"node-fetch": "^2.0.0",
|
||||
"readable-stream": "1.0.33",
|
||||
"spark-md5": "3.0.0",
|
||||
"through2": "2.0.3",
|
||||
"uuid": "3.2.1",
|
||||
"vuvuzela": "1.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"buffer-from": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz",
|
||||
"integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ=="
|
||||
},
|
||||
"isarray": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
|
||||
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "1.0.33",
|
||||
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.33.tgz",
|
||||
"integrity": "sha1-OjYN1mwbHX/UcFOJhg7aHQ9hEmw=",
|
||||
"requires": {
|
||||
"core-util-is": "~1.0.0",
|
||||
"inherits": "~2.0.1",
|
||||
"isarray": "0.0.1",
|
||||
"string_decoder": "~0.10.x"
|
||||
}
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "0.10.31",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz",
|
||||
"integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"prebuild-install": {
|
||||
"version": "2.5.3",
|
||||
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.5.3.tgz",
|
||||
"integrity": "sha512-/rI36cN2g7vDQnKWN8Uzupi++KjyqS9iS+/fpwG4Ea8d0Pip0PQ5bshUNzVwt+/D2MRfhVAplYMMvWLqWrCF/g==",
|
||||
"requires": {
|
||||
"detect-libc": "^1.0.3",
|
||||
"expand-template": "^1.0.2",
|
||||
"github-from-package": "0.0.0",
|
||||
"minimist": "^1.2.0",
|
||||
"mkdirp": "^0.5.1",
|
||||
"node-abi": "^2.2.0",
|
||||
"noop-logger": "^0.1.1",
|
||||
"npmlog": "^4.0.1",
|
||||
"os-homedir": "^1.0.1",
|
||||
"pump": "^2.0.1",
|
||||
"rc": "^1.1.6",
|
||||
"simple-get": "^2.7.0",
|
||||
"tar-fs": "^1.13.0",
|
||||
"tunnel-agent": "^0.6.0",
|
||||
"which-pm-runs": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"prelude-ls": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
|
||||
|
@ -5407,6 +5890,11 @@
|
|||
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz",
|
||||
"integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4="
|
||||
},
|
||||
"prr": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
|
||||
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY="
|
||||
},
|
||||
"pseudomap": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
|
||||
|
@ -5531,6 +6019,15 @@
|
|||
"resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.7.tgz",
|
||||
"integrity": "sha1-wA1cUSi6xYBr7BXSt+fNq+QlMfM="
|
||||
},
|
||||
"pump": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
|
||||
"integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
|
||||
"requires": {
|
||||
"end-of-stream": "^1.1.0",
|
||||
"once": "^1.3.1"
|
||||
}
|
||||
},
|
||||
"punycode": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
|
||||
|
@ -5572,6 +6069,17 @@
|
|||
"unpipe": "1.0.0"
|
||||
}
|
||||
},
|
||||
"rc": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
|
||||
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
||||
"requires": {
|
||||
"deep-extend": "^0.6.0",
|
||||
"ini": "~1.3.0",
|
||||
"minimist": "^1.2.0",
|
||||
"strip-json-comments": "~2.0.1"
|
||||
}
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "2.3.6",
|
||||
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||
|
@ -6245,6 +6753,21 @@
|
|||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
|
||||
},
|
||||
"simple-concat": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz",
|
||||
"integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY="
|
||||
},
|
||||
"simple-get": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz",
|
||||
"integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==",
|
||||
"requires": {
|
||||
"decompress-response": "^3.3.0",
|
||||
"once": "^1.3.1",
|
||||
"simple-concat": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"slash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
|
||||
|
@ -6423,6 +6946,11 @@
|
|||
"integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
|
||||
"dev": true
|
||||
},
|
||||
"spark-md5": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.0.tgz",
|
||||
"integrity": "sha1-NyIifFTi+vJLHcbZM8wUTm9xv+8="
|
||||
},
|
||||
"split": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz",
|
||||
|
@ -6585,6 +7113,11 @@
|
|||
"resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
|
||||
},
|
||||
"strip-json-comments": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
||||
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
|
@ -6598,6 +7131,42 @@
|
|||
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz",
|
||||
"integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY="
|
||||
},
|
||||
"tar-fs": {
|
||||
"version": "1.16.3",
|
||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz",
|
||||
"integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==",
|
||||
"requires": {
|
||||
"chownr": "^1.0.1",
|
||||
"mkdirp": "^0.5.1",
|
||||
"pump": "^1.0.0",
|
||||
"tar-stream": "^1.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"pump": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz",
|
||||
"integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==",
|
||||
"requires": {
|
||||
"end-of-stream": "^1.1.0",
|
||||
"once": "^1.3.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tar-stream": {
|
||||
"version": "1.6.2",
|
||||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz",
|
||||
"integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==",
|
||||
"requires": {
|
||||
"bl": "^1.0.0",
|
||||
"buffer-alloc": "^1.2.0",
|
||||
"end-of-stream": "^1.0.0",
|
||||
"fs-constants": "^1.0.0",
|
||||
"readable-stream": "^2.3.0",
|
||||
"to-buffer": "^1.1.1",
|
||||
"xtend": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"terraformer": {
|
||||
"version": "1.0.9",
|
||||
"resolved": "https://registry.npmjs.org/terraformer/-/terraformer-1.0.9.tgz",
|
||||
|
@ -6654,6 +7223,11 @@
|
|||
"integrity": "sha512-2NM0auVBGft5tee/OxP4PI3d8WItkDM+fPnaRAVo6xTDI2knbz9eC5ArWGqtGlYqiH3RU5yMpdyTTO7MguC4ow==",
|
||||
"optional": true
|
||||
},
|
||||
"to-buffer": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz",
|
||||
"integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg=="
|
||||
},
|
||||
"to-fast-properties": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
|
||||
|
@ -6999,6 +7573,11 @@
|
|||
"resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz",
|
||||
"integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w="
|
||||
},
|
||||
"vuvuzela": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/vuvuzela/-/vuvuzela-1.0.3.tgz",
|
||||
"integrity": "sha1-O+FF5YJxxzylUnndhR8SpoIRSws="
|
||||
},
|
||||
"w3c-hr-time": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz",
|
||||
|
@ -7058,6 +7637,19 @@
|
|||
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
|
||||
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
|
||||
},
|
||||
"which-pm-runs": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz",
|
||||
"integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs="
|
||||
},
|
||||
"wide-align": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
|
||||
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
|
||||
"requires": {
|
||||
"string-width": "^1.0.2 || 2"
|
||||
}
|
||||
},
|
||||
"window-size": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
|
||||
|
@ -7144,8 +7736,22 @@
|
|||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
},
|
||||
"write-stream": {
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmjs.org/write-stream/-/write-stream-0.4.3.tgz",
|
||||
"integrity": "sha1-g8yMA0fQr2BXqThitOOuAd5cgcE=",
|
||||
"requires": {
|
||||
"readable-stream": "~0.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-0.0.4.tgz",
|
||||
"integrity": "sha1-8y124/uGM0SlSNeZIwBxc2ZbO40="
|
||||
}
|
||||
}
|
||||
},
|
||||
"ws": {
|
||||
"version": "6.1.0",
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"watch-front-scripts": "parcel watch themes/$npm_package_theme/src/com/Start.jsx --out-dir themes/$npm_package_theme/assets/js --out-file start.min.js --public-url /$npm_package_theme/assets/js",
|
||||
"watch-front-styles": "stylus -w -m -o themes/$npm_package_theme/assets/css themes/$npm_package_theme/src/styles/base.styl",
|
||||
"build-front-kit": "uglifyjs node_modules/scramble-text/dist/ScrambleText.min.js node_modules/animejs/anime.min.js node_modules/reframe.js/dist/reframe.min.js -c -o themes/$npm_package_theme/assets/js/toolkit.min.js",
|
||||
"watch-back-scripts": "parcel watch themes/dash/src/com/Start.jsx --out-dir themes/dash/assets/js --out-file dash.min.js --public-url /dash/assets/js",
|
||||
"watch-back-scripts": "parcel watch themes/dash/src/com/Start.js --out-dir themes/dash/assets/js --out-file dash.min.js --public-url /dash/assets/js",
|
||||
"watch-back-styles": "stylus -w -m -o themes/dash/assets/css themes/dash/src/styles/dash.styl",
|
||||
"build-back-kit": "uglifyjs themes/dash/src/libraries/highlight.pack.js node_modules/scramble-text/dist/ScrambleText.min.js node_modules/animejs/anime.min.js node_modules/reframe.js/dist/reframe.min.js -c -o themes/dash/assets/js/dashkit.min.js"
|
||||
},
|
||||
|
@ -42,6 +42,7 @@
|
|||
"nodemailer": "latest",
|
||||
"pg": "^7.5.0",
|
||||
"pg-hstore": "^2.3.2",
|
||||
"pouchdb": "^7.0.0",
|
||||
"prismjs": "^1.15.0",
|
||||
"pug": "latest",
|
||||
"reframe.js": "^2.2.1",
|
||||
|
|
12823
themes/dash/assets/js/dash.min.js
vendored
12823
themes/dash/assets/js/dash.min.js
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
@ -1,51 +1,74 @@
|
|||
import DataUtils, {
|
||||
import DataUtils,
|
||||
{
|
||||
REQUEST_TYPE_GET,
|
||||
REQUEST_TYPE_PUT,
|
||||
REQUEST_TYPE_POST,
|
||||
REQUEST_TYPE_DELETE,
|
||||
CONTENT_TYPE_JSON,
|
||||
CONTENT_TYPE_FORM
|
||||
} from '../../../../brain/tools/utilities/DataUtils';
|
||||
import * as DataEvent from '../../../../brain/tools/events/DataEvent.jsx';
|
||||
import DisplayManager from './controllers/DisplayManager.jsx';
|
||||
|
||||
export default class Base {
|
||||
}
|
||||
from '../../../../brain/tools/utilities/DataUtils';
|
||||
import * as DataEvent from '../../../../brain/tools/events/DataEvent';
|
||||
import DisplayManager from './controllers/DisplayManager';
|
||||
import PouchDB from 'pouchdb';
|
||||
export default class Base
|
||||
{
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
|
||||
//TODO: Flip to unified structure defined in BMG, brah
|
||||
constructor() {
|
||||
constructor()
|
||||
{
|
||||
var self = this;
|
||||
var admin = [];
|
||||
var folio = [];
|
||||
var displayManager = [];
|
||||
this.dataUtils = new DataUtils();
|
||||
this.settings = [];
|
||||
this.start();
|
||||
//this.start();
|
||||
this.loadSettings();
|
||||
}
|
||||
start() {
|
||||
start()
|
||||
{
|
||||
this.displayManager = new DisplayManager();
|
||||
}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
loadSettings() {
|
||||
loadSettings()
|
||||
{
|
||||
var self = this;
|
||||
this.dataUtils.request('/base-assets/data/settings.json', DataEvent.SETTINGS_LOADED)
|
||||
.then((response) => {
|
||||
this.settings = JSON.parse(response['request'].response);
|
||||
this.dataUtils.request('/api/post', DataEvent.SETTINGS_LOADED).then((response) =>
|
||||
{
|
||||
//let posts = JSON.parse(response['request'].response);
|
||||
var db = new PouchDB('forfipamo');
|
||||
|
||||
/**
|
||||
self.dataUtils.request("/api/post/couch", DataEvent.POST_IMAGE_ADDED, REQUEST_TYPE_POST, CONTENT_TYPE_JSON, db).then((response) =>
|
||||
{
|
||||
console.log(JSON.parse(response.request['response']).url);
|
||||
}).catch((err) =>
|
||||
{
|
||||
console.log(err)
|
||||
})
|
||||
*/
|
||||
|
||||
var remote = new PouchDB('http://are0h:pa$$@localhost:5984/forfipamo');
|
||||
db.sync(remote).then(result=>{
|
||||
console.log(result);
|
||||
}).catch(err=>{
|
||||
console.log(err);
|
||||
})
|
||||
|
||||
//console.log(posts.length);
|
||||
this.start();
|
||||
//transfer
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
}).catch((err) =>
|
||||
{
|
||||
//console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
import Base from './Base.jsx'
|
||||
import Base from './Base'
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import DataUtils, {
|
|||
CONTENT_TYPE_FORM
|
||||
} from '../../../../../brain/tools/utilities/DataUtils';
|
||||
import PostEditor from './PostEditor';
|
||||
import Animate from '../../../../../brain/tools/effects/Animate.jsx';
|
||||
import Animate from '../../../../../brain/tools/effects/Animate';
|
||||
|
||||
class DisplayManager {
|
||||
//--------------------------
|
||||
|
|
|
@ -27,25 +27,25 @@ class PostEditor
|
|||
let self = this;
|
||||
this.uploadFiles;
|
||||
this.anim = new Animate();
|
||||
this.dataUtils = new DataUtils();
|
||||
this.dataUtils = new DataUtils
|
||||
this.dateUtils = new DateUtils();
|
||||
if ( document.getElementById( 'edit-post-text' ) )
|
||||
if (document.getElementById('edit-post-text'))
|
||||
{
|
||||
this.editor = new TextEditor( document.getElementById( 'edit-post-text' ), document.getElementById( 'header' ).offsetHeight + document.getElementById( 'post-header' ).offsetHeight + document.getElementById( 'post-feature' ).offsetHeight );
|
||||
this.editor.addListener( EditorEvent.EDITOR_DELETE, f => this.handleEditorOptions( EditorEvent.EDITOR_DELETE ), false )
|
||||
this.editor.addListener( EditorEvent.EDITOR_UPLOAD_POST_IMAGE, f => this.handleEditorOptions( EditorEvent.EDITOR_UPLOAD_POST_IMAGE ), false )
|
||||
this.editor.addListener( EditorEvent.EDITOR_UPDATE, f => this.handleEditorOptions( EditorEvent.EDITOR_UPDATE ), false )
|
||||
this.editor.addListener( EditorEvent.EDITOR_SAVE, f => this.handleEditorOptions( EditorEvent.EDITOR_SAVE ), false )
|
||||
document.getElementById( 'post-image' ).addEventListener( 'change', e => this.handlePostImageAdd( e ), false );
|
||||
TinyDatePicker( document.getElementById( 'post-date' ),
|
||||
this.editor = new TextEditor(document.getElementById('edit-post-text'), document.getElementById('header').offsetHeight + document.getElementById('post-header').offsetHeight + document.getElementById('post-feature').offsetHeight);
|
||||
this.editor.addListener(EditorEvent.EDITOR_DELETE, f => this.handleEditorOptions(EditorEvent.EDITOR_DELETE), false)
|
||||
this.editor.addListener(EditorEvent.EDITOR_UPLOAD_POST_IMAGE, f => this.handleEditorOptions(EditorEvent.EDITOR_UPLOAD_POST_IMAGE), false)
|
||||
this.editor.addListener(EditorEvent.EDITOR_UPDATE, f => this.handleEditorOptions(EditorEvent.EDITOR_UPDATE), false)
|
||||
this.editor.addListener(EditorEvent.EDITOR_SAVE, f => this.handleEditorOptions(EditorEvent.EDITOR_SAVE), false)
|
||||
document.getElementById('post-image').addEventListener('change', e => this.handlePostImageAdd(e), false);
|
||||
TinyDatePicker(document.getElementById('post-date'),
|
||||
{
|
||||
mode: 'dp-below',
|
||||
format( date )
|
||||
format(date)
|
||||
{
|
||||
//return date;
|
||||
return self.dateUtils.getDate( 'origin', date );
|
||||
return self.dateUtils.getDate('origin', date);
|
||||
}
|
||||
} );
|
||||
});
|
||||
}
|
||||
this.start();
|
||||
}
|
||||
|
@ -57,101 +57,101 @@ class PostEditor
|
|||
let self = this;
|
||||
new Animate().object(
|
||||
{
|
||||
targets: document.getElementById( 'loader' ),
|
||||
targets: document.getElementById('loader'),
|
||||
duration: 300,
|
||||
opacity: 0,
|
||||
easing: 'easeInOutQuad',
|
||||
complete: function()
|
||||
{
|
||||
document.getElementById( 'loader' ).style.display = 'none';
|
||||
document.getElementById( 'loader' ).style.visibility = 'hidden';
|
||||
document.getElementById('loader').style.display = 'none';
|
||||
document.getElementById('loader').style.visibility = 'hidden';
|
||||
new Animate().object(
|
||||
{
|
||||
targets: document.getElementById( 'header' ),
|
||||
targets: document.getElementById('header'),
|
||||
duration: 10,
|
||||
opacity: 1,
|
||||
easing: 'easeInOutQuad',
|
||||
complete: function()
|
||||
{
|
||||
if ( document.getElementById( 'the-intro' ) ) document.getElementById( 'the-intro' ).style.opacity = 1;
|
||||
if ( document.getElementById( 'blog-entry' ) ) document.getElementById( 'blog-entry' ).style.opacity = 1;
|
||||
if (document.getElementById('the-intro')) document.getElementById('the-intro').style.opacity = 1;
|
||||
if (document.getElementById('blog-entry')) document.getElementById('blog-entry').style.opacity = 1;
|
||||
}
|
||||
} );
|
||||
});
|
||||
}
|
||||
} );
|
||||
if ( document.getElementById( 'featured-image-drop' ) )
|
||||
});
|
||||
if (document.getElementById('featured-image-drop'))
|
||||
{
|
||||
document.getElementById( 'featured-image-drop' ).addEventListener( 'dragover', this.handleDragOver, false );
|
||||
document.getElementById( 'featured-image-drop' ).addEventListener( 'drop', this.handleDrop, false );
|
||||
document.getElementById( 'featured-click' ).addEventListener( 'change', this.handleClicked, false );
|
||||
if ( document.getElementById( 'new-upload-link' ) )
|
||||
document.getElementById('featured-image-drop').addEventListener('dragover', this.handleDragOver, false);
|
||||
document.getElementById('featured-image-drop').addEventListener('drop', this.handleDrop, false);
|
||||
document.getElementById('featured-click').addEventListener('change', this.handleClicked, false);
|
||||
if (document.getElementById('new-upload-link'))
|
||||
{
|
||||
document.getElementById( 'new-upload-link' ).addEventListener( 'click', e =>
|
||||
document.getElementById('new-upload-link').addEventListener('click', e =>
|
||||
{
|
||||
document.getElementById( 'featured-click' ).click();
|
||||
} )
|
||||
document.getElementById('featured-click').click();
|
||||
})
|
||||
}
|
||||
var optionButtons = document.querySelectorAll( '.post-option-btn' );
|
||||
for ( var i = 0, length = optionButtons.length; i < length; i++ )
|
||||
var optionButtons = document.querySelectorAll('.post-option-btn');
|
||||
for (var i = 0, length = optionButtons.length; i < length; i++)
|
||||
{
|
||||
optionButtons[ i ].addEventListener( 'click', e => this.handlePostOptions( e ), false );
|
||||
optionButtons[i].addEventListener('click', e => this.handlePostOptions(e), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
handlePostOptions( e )
|
||||
handlePostOptions(e)
|
||||
{
|
||||
let currentOption;
|
||||
switch ( e.target.id )
|
||||
switch (e.target.id)
|
||||
{
|
||||
case "option-page-icon":
|
||||
case "option-page":
|
||||
currentOption = document.getElementById( 'option-page' );
|
||||
currentOption = document.getElementById('option-page');
|
||||
break;
|
||||
case "option-feature-icon":
|
||||
case "option-feature":
|
||||
currentOption = document.getElementById( 'option-feature' );
|
||||
currentOption = document.getElementById('option-feature');
|
||||
break;
|
||||
case "option-published-icon":
|
||||
case "option-published":
|
||||
currentOption = document.getElementById( 'option-published' );
|
||||
currentOption = document.getElementById('option-published');
|
||||
break;
|
||||
}
|
||||
let active = currentOption.getAttribute( 'data-active' );
|
||||
( active == 'false' ) ? currentOption.setAttribute( 'data-active', 'true' ): currentOption.setAttribute( 'data-active', 'false' )
|
||||
let active = currentOption.getAttribute('data-active');
|
||||
(active == 'false') ? currentOption.setAttribute('data-active', 'true'): currentOption.setAttribute('data-active', 'false')
|
||||
}
|
||||
handleEditorOptions( e )
|
||||
handleEditorOptions(e)
|
||||
{
|
||||
switch ( e )
|
||||
switch (e)
|
||||
{
|
||||
case EditorEvent.EDITOR_SAVE:
|
||||
case EditorEvent.EDITOR_UPDATE:
|
||||
let edit = false;
|
||||
if ( e == EditorEvent.EDITOR_UPDATE ) edit = true;
|
||||
new PostActions().submitPost( edit, PostEditor.uploadFiles ).then( ( response ) =>
|
||||
if (e == EditorEvent.EDITOR_UPDATE) edit = true;
|
||||
new PostActions().submitPost(edit, PostEditor.uploadFiles).then((response) =>
|
||||
{
|
||||
let note = JSON.parse( response[ 'response' ][ 'request' ].response );
|
||||
this.editor.notify( note.message, note.postID );
|
||||
if ( note.message == DataEvent.POST_ADDED ) window.location = "/@/dashboard/posts/edit/" + note.postID;
|
||||
} ).catch( ( err ) =>
|
||||
let note = JSON.parse(response['response']['request'].response);
|
||||
this.editor.notify(note.message, note.postID);
|
||||
if (note.message == DataEvent.POST_ADDED) window.location = "/@/dashboard/posts/edit/" + note.postID;
|
||||
}).catch((err) =>
|
||||
{
|
||||
console.log( err )
|
||||
} );
|
||||
console.log(err)
|
||||
});
|
||||
break;
|
||||
case EditorEvent.EDITOR_DELETE:
|
||||
if ( confirm( 'Aye! You know you\'re deleting this post, right?' ) )
|
||||
if (confirm('Aye! You know you\'re deleting this post, right?'))
|
||||
{
|
||||
new PostActions().deletePost().then( ( response ) =>
|
||||
new PostActions().deletePost().then((response) =>
|
||||
{
|
||||
let note = JSON.parse( response[ 'response' ][ 'request' ].response );
|
||||
let note = JSON.parse(response['response']['request'].response);
|
||||
window.location = "/@/dashboard/posts/";
|
||||
//console.log(note);
|
||||
} ).catch( ( err ) =>
|
||||
}).catch((err) =>
|
||||
{
|
||||
console.log( err )
|
||||
} );
|
||||
console.log(err)
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -159,111 +159,111 @@ class PostEditor
|
|||
}
|
||||
break;
|
||||
case EditorEvent.EDITOR_UPLOAD_POST_IMAGE:
|
||||
document.getElementById( 'post-image' ).click();
|
||||
document.getElementById('post-image').click();
|
||||
break;
|
||||
}
|
||||
}
|
||||
handleDragOver( e )
|
||||
handleDragOver(e)
|
||||
{
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
e.dataTransfer.dropEffect = 'copy'; // Explicitly show this is a copy.
|
||||
}
|
||||
handleClicked( e )
|
||||
handleClicked(e)
|
||||
{
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
//console.log("IMAGES " + e.target.files);
|
||||
PostEditor.uploadFiles = e.target.files;
|
||||
for ( var i = 0, f; f = PostEditor.uploadFiles[ i ]; i++ )
|
||||
for (var i = 0, f; f = PostEditor.uploadFiles[i]; i++)
|
||||
{
|
||||
// Only process image files.
|
||||
if ( !f.type.match( 'image.*' ) )
|
||||
if (!f.type.match('image.*'))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var reader = new FileReader();
|
||||
// Closure to capture the file information.
|
||||
reader.onload = ( function( theFile )
|
||||
reader.onload = (function(theFile)
|
||||
{
|
||||
return function( f )
|
||||
return function(f)
|
||||
{
|
||||
// Render thumbnail.
|
||||
var image = document.createElement( 'img' );
|
||||
var image = document.createElement('img');
|
||||
image.src = f.target.result;
|
||||
image.title = escape( theFile.name );
|
||||
var span = document.createElement( 'div' );
|
||||
span.innerHTML = [ '<img src="',
|
||||
image.title = escape(theFile.name);
|
||||
var span = document.createElement('div');
|
||||
span.innerHTML = ['<img src="',
|
||||
f.target.result, '" title="',
|
||||
escape( theFile.name ), '"/>'
|
||||
].join( '' );
|
||||
escape(theFile.name), '"/>'
|
||||
].join('');
|
||||
//document.getElementById('featured-image-drop').insertBefore(span, null);
|
||||
document.getElementById( 'featured-image-drop' ).innerHTML = '';
|
||||
document.getElementById( 'featured-image-drop' ).appendChild( image );
|
||||
document.getElementById('featured-image-drop').innerHTML = '';
|
||||
document.getElementById('featured-image-drop').appendChild(image);
|
||||
};
|
||||
} )( f );
|
||||
})(f);
|
||||
// Read in the image file as a data URL.
|
||||
reader.readAsDataURL( f );
|
||||
reader.readAsDataURL(f);
|
||||
}
|
||||
}
|
||||
handleDrop( e )
|
||||
handleDrop(e)
|
||||
{
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
PostEditor.uploadFiles = e.dataTransfer.files;
|
||||
//console.log(MemberArea.uploadFiles.length);
|
||||
for ( var i = 0, f; f = PostEditor.uploadFiles[ i ]; i++ )
|
||||
for (var i = 0, f; f = PostEditor.uploadFiles[i]; i++)
|
||||
{
|
||||
// Only process image files.
|
||||
if ( !f.type.match( 'image.*' ) )
|
||||
if (!f.type.match('image.*'))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var reader = new FileReader();
|
||||
// Closure to capture the file information.
|
||||
reader.onload = ( function( theFile )
|
||||
reader.onload = (function(theFile)
|
||||
{
|
||||
return function( f )
|
||||
return function(f)
|
||||
{
|
||||
// Render thumbnail.
|
||||
var span = document.createElement( 'span' );
|
||||
span.innerHTML = [ '<img src="',
|
||||
var span = document.createElement('span');
|
||||
span.innerHTML = ['<img src="',
|
||||
f.target.result, '" title="',
|
||||
escape( theFile.name ), '"/>'
|
||||
].join( '' );
|
||||
escape(theFile.name), '"/>'
|
||||
].join('');
|
||||
//document.getElementById('featured-image-drop').insertBefore(span, null);
|
||||
document.getElementById( 'featured-image-drop' ).innerHTML = '';
|
||||
document.getElementById( 'featured-image-drop' ).appendChild( span );
|
||||
document.getElementById('featured-image-drop').innerHTML = '';
|
||||
document.getElementById('featured-image-drop').appendChild(span);
|
||||
};
|
||||
} )( f );
|
||||
})(f);
|
||||
// Read in the image file as a data URL.
|
||||
reader.readAsDataURL( f );
|
||||
reader.readAsDataURL(f);
|
||||
}
|
||||
}
|
||||
handlePostImageAdd( e )
|
||||
handlePostImageAdd(e)
|
||||
{
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
let self = this;
|
||||
var postData = new FormData();
|
||||
var files = e.target.files;
|
||||
for ( var i = 0; i < files.length; i++ )
|
||||
for (var i = 0; i < files.length; i++)
|
||||
{
|
||||
var file = files[ i ];
|
||||
var file = files[i];
|
||||
// Check the file type.
|
||||
if ( !file.type.match( 'image.*' ) )
|
||||
if (!file.type.match('image.*'))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
postData.append( 'post_image', file, file.name );
|
||||
postData.append('post_image', file, file.name);
|
||||
}
|
||||
this.dataUtils.request( "/api/blog/add-post-image", DataEvent.POST_IMAGE_ADDED, REQUEST_TYPE_POST, CONTENT_TYPE_FORM, postData ).then( ( response ) =>
|
||||
this.dataUtils.request("/api/blog/add-post-image", DataEvent.POST_IMAGE_ADDED, REQUEST_TYPE_POST, CONTENT_TYPE_FORM, postData).then((response) =>
|
||||
{
|
||||
self.editor.notify( EditorEvent.EDITOR_UPLOAD_POST_IMAGE, JSON.parse( response.request[ 'response' ] ).url );
|
||||
} ).catch( ( err ) =>
|
||||
self.editor.notify(EditorEvent.EDITOR_UPLOAD_POST_IMAGE, JSON.parse(response.request['response']).url);
|
||||
}).catch((err) =>
|
||||
{
|
||||
console.log( err )
|
||||
} )
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
}
|
||||
PostEditor.uploadFiles = [];
|
||||
|
|
Loading…
Reference in a new issue