This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable id-denylist */ | |
'use strict' | |
const isString = require('lodash/isString') | |
const omit = require('lodash/omit') | |
function flattenObj(obj, prefix = '') { | |
if (!obj) return {} | |
const res = {} | |
Object.keys(obj).map(key => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict'; | |
var hasOwn = {}.hasOwnProperty; | |
/* eslint-disable no-bitwise */ | |
/* | |
Caution: be sure to check the minified output. I've noticed an issue with Terser trying to inline | |
single-use functions as IIFEs, and this predictably causes perf issues since engines don't seem to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function() { | |
"use strict" | |
function Vnode(tag, key, attrs0, children, text, dom) { | |
return {tag: tag, key: key, attrs: attrs0, children: children, text: text, dom: dom, domSize: undefined, state: undefined, events: undefined, instance: undefined} | |
} | |
Vnode.normalize = function(node) { | |
if (Array.isArray(node)) return Vnode("[", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined) | |
if (node != null && typeof node !== "object") return Vnode("#", undefined, undefined, node === false ? "" : node, undefined, undefined) | |
return node | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var fsp = require('fs-promise'); | |
var differenceBy = require('lodash/differenceBy'); | |
var keys = require('lodash/keys'); | |
var values = require('lodash/values'); | |
var parseCsv = require('csv-parse'); | |
function parse(fileContent) { | |
return new Promise(function(resolve, reject) { | |
parseCsv(fileContent, {delimiter: ',', quote: '"', columns: true}, function (err, data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var model = require('prosemirror/model'); | |
var ProseMirror = require('prosemirror/edit').ProseMirror; | |
var toDOM = require('prosemirror/convert/to_dom'); | |
var fromDOM = require('prosemirror/convert/from_dom'); | |
var elt = require('prosemirror/dom').elt; | |
function inline(dom, context, added) { | |
var old = context.styles; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function updateTile(tile) { | |
if (tile.get('width')) { | |
tile.set('columnCount', (tile.get('width') + gutter) / columnToColumn); | |
} | |
tile.set('width', tile.get('columnCount') * columnToColumn - gutter); | |
return tile.save(); | |
} | |
function updateTiles() { | |
// this is called |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var m = require('mithril'); | |
var isFunction = require('lodash/lang/isFunction'); | |
var assign = require('lodash/object/assign'); | |
var minMax = require('client/utils').minMax; | |
var content, targetDimensions, options, showTimer, isVisible; | |
function px(value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var m = require('mithril'); | |
var icons = require('client/utils/icons'); | |
function controller() { | |
var scope = { | |
isPasswordVisible: false, | |
showPassword: function() { | |
scope.isPasswordVisible = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var omit = require('lodash/object/omit'); | |
var extend = require('lodash/object/extend'); | |
var m = require('mithril'); | |
function apiUrl(type) { | |
return '/api/v1/' + type; | |
} |
NewerOlder