From ed6b938150c785f9eb69b1dc5e44f58fd6c062fd Mon Sep 17 00:00:00 2001 From: Wilburn Wilkins Date: Fri, 6 Dec 2019 17:58:40 -0600 Subject: [PATCH 01/23] HUB-2766 model code can now pass bid adjustment in tree fields, still need to update react code in other repo to trigger on bid field changes --- src/modelField.coffee | 21 ++++++++++++++------- src/modelFieldTree.coffee | 2 +- src/modelOption.coffee | 4 +++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/modelField.coffee b/src/modelField.coffee index 059853b..f50c3d5 100644 --- a/src/modelField.coffee +++ b/src/modelField.coffee @@ -222,26 +222,33 @@ module.exports = class ModelField extends ModelBase for opt in @options opt.recalculateRelativeProperties() - addOptionValue: (val) -> + addOptionValue: (val, bidAdj) -> if @type in ['multiselect','tree'] unless Array.isArray @value @value = [@value] - if not (val in @value) - @value.push val + findMatch = @value.findIndex (e) -> val.search(e) != -1 + if findMatch !== -1 + @value[findMatch] = (val + "/" + bidAdj) + else + @value.push (val + "/" + bidAdj) else #single-select @value = val removeOptionValue: (val) -> if @type in ['multiselect','tree'] - if val in @value - @value = @value.filter (v) -> v isnt val + @value = @value.filter (v) -> val.search(v) == -1 else if @value is val #single-select @value = '' #determine if the value is or contains the provided value. - hasValue: (val) -> + hasValue: (val, bidAdj) -> if @type in ['multiselect','tree'] - val in @value + findMatch = @value.findIndex (e) -> e.search(val) != -1 + if findMatch !== -1 + @value[findMatch] = (val + "/" + bidAdj) + return true + else + return false else val is @value diff --git a/src/modelFieldTree.coffee b/src/modelFieldTree.coffee index 2e33f15..10ac26e 100644 --- a/src/modelFieldTree.coffee +++ b/src/modelFieldTree.coffee @@ -6,7 +6,7 @@ module.exports = class ModelFieldTree extends ModelField super option: (optionParams...) -> - optionObject = @buildParamObject optionParams, ['path', 'value', 'selected'] + optionObject = @buildParamObject optionParams, ['path', 'value', 'selected', 'bidAdj'] optionObject.value ?= optionObject.id optionObject.value ?= optionObject.path.join ' > ' optionObject.title = optionObject.path.join '>' #use path as the key since that is what is rendered. diff --git a/src/modelOption.coffee b/src/modelOption.coffee index c713655..6952f42 100644 --- a/src/modelOption.coffee +++ b/src/modelOption.coffee @@ -8,6 +8,8 @@ module.exports = class ModelOption extends ModelBase @setDefault 'title', @get 'value' # selected is used to set default value and also to store current value. @setDefault 'selected', false + # set default bid adjustment + @setDefault 'bidAdj', 0 @setDefault 'path', [] #for tree. Might should move to subclass super @@ -15,6 +17,6 @@ module.exports = class ModelOption extends ModelBase # this change likely comes from parent value changing, so be careful not to infinitely recurse. @on 'change:selected', -> if @selected - @parent.addOptionValue @value + @parent.addOptionValue @value, @bidAdj else # not selected @parent.removeOptionValue @value \ No newline at end of file From cc3a6cdc133ca531c96c629cb57d78c1df79db6e Mon Sep 17 00:00:00 2001 From: Wilburn Wilkins Date: Tue, 10 Dec 2019 18:07:20 -0600 Subject: [PATCH 02/23] HUB-2766- added field bid adjustments to formbuilder --- src/modelField.coffee | 34 ++++++++++++++++++++++++---------- src/modelOption.coffee | 1 - 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/modelField.coffee b/src/modelField.coffee index f50c3d5..c6dd6dc 100644 --- a/src/modelField.coffee +++ b/src/modelField.coffee @@ -116,7 +116,7 @@ module.exports = class ModelField extends ModelBase @parent.group obj... option: (optionParams...) -> - optionObject = @buildParamObject optionParams, ['title', 'value', 'selected'] + optionObject = @buildParamObject optionParams, ['title', 'value', 'selected', 'bidAdj'] # when adding an option to a field, make sure it is a *select type @ensureSelectType() @@ -129,6 +129,9 @@ module.exports = class ModelField extends ModelBase #if new option has selected:true, set this field's value to that #don't remove from parent value if not selected. Might be supplied by field value during creation. + # Pass in bid Adjustment from string + + if newOption.selected @addOptionValue newOption.value @ #return the field so we can chain .option calls @@ -141,7 +144,15 @@ module.exports = class ModelField extends ModelBase updateOptionsSelected: -> for opt in @options - opt.selected = @hasValue opt.value + + console.log(bidAdj) + if @type in ['multiselect','tree'] + bidValue = this.hasValue(opt.value) + bidAdj = bidValue.bidAdjValue.lastIndexOf('/') !== -1 ? bidValue.bidAdjValue.split('/')[1] : "+0%"; + opt.selected = bidValue.selectStatus + opt.bidAdj = bidAdj != -1 ? bidAdj : "0%" + else + opt.selected = this.hasValue(opt.value) # returns true if this type is one where a value is selected. Otherwise false isSelectType: -> @@ -227,10 +238,13 @@ module.exports = class ModelField extends ModelBase unless Array.isArray @value @value = [@value] findMatch = @value.findIndex (e) -> val.search(e) != -1 - if findMatch !== -1 - @value[findMatch] = (val + "/" + bidAdj) + if findMatch !== -1 and bidAdj? + @value[findMatch] = (val + "/" + bidAdj) else - @value.push (val + "/" + bidAdj) + if bidAdj? + @value.push (val + "/" + bidAdj) + else + @value.push val else #single-select @value = val @@ -241,14 +255,14 @@ module.exports = class ModelField extends ModelBase @value = '' #determine if the value is or contains the provided value. - hasValue: (val, bidAdj) -> + hasValue: (val) -> if @type in ['multiselect','tree'] findMatch = @value.findIndex (e) -> e.search(val) != -1 - if findMatch !== -1 - @value[findMatch] = (val + "/" + bidAdj) - return true + if findMatch != -1 + return {"bidAdjValue": this.value[findMatch], + "selectStatus": true } else - return false + return {"selectStatus": false } else val is @value diff --git a/src/modelOption.coffee b/src/modelOption.coffee index 6952f42..4aeba65 100644 --- a/src/modelOption.coffee +++ b/src/modelOption.coffee @@ -9,7 +9,6 @@ module.exports = class ModelOption extends ModelBase # selected is used to set default value and also to store current value. @setDefault 'selected', false # set default bid adjustment - @setDefault 'bidAdj', 0 @setDefault 'path', [] #for tree. Might should move to subclass super From 31be6499824c483e4014e8c75ad98845f4fdaf51 Mon Sep 17 00:00:00 2001 From: Wilburn Wilkins Date: Fri, 13 Dec 2019 10:58:28 -0600 Subject: [PATCH 03/23] HUB-2766 Fixed for coffee script some common mistakes preventing compilation --- src/modelField.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modelField.coffee b/src/modelField.coffee index c6dd6dc..d4f1aa9 100644 --- a/src/modelField.coffee +++ b/src/modelField.coffee @@ -148,9 +148,9 @@ module.exports = class ModelField extends ModelBase console.log(bidAdj) if @type in ['multiselect','tree'] bidValue = this.hasValue(opt.value) - bidAdj = bidValue.bidAdjValue.lastIndexOf('/') !== -1 ? bidValue.bidAdjValue.split('/')[1] : "+0%"; + bidAdj = if idValue.bidAdjValue.lastIndexOf('/') !== -1 then bidValue.bidAdjValue.split('/')[1] else "+0%"; opt.selected = bidValue.selectStatus - opt.bidAdj = bidAdj != -1 ? bidAdj : "0%" + opt.bidAdj = if bidAdj != -1 then bidAdj else "0%" else opt.selected = this.hasValue(opt.value) @@ -259,7 +259,7 @@ module.exports = class ModelField extends ModelBase if @type in ['multiselect','tree'] findMatch = @value.findIndex (e) -> e.search(val) != -1 if findMatch != -1 - return {"bidAdjValue": this.value[findMatch], + return {"bidAdjValue": this.value[findMatch] "selectStatus": true } else return {"selectStatus": false } From 6a2771f8a1ef01e2974a2916635a079f84605714 Mon Sep 17 00:00:00 2001 From: Wilburn Wilkins Date: Fri, 13 Dec 2019 11:20:13 -0600 Subject: [PATCH 04/23] HUB-2766 typo fix --- src/modelField.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modelField.coffee b/src/modelField.coffee index d4f1aa9..beab455 100644 --- a/src/modelField.coffee +++ b/src/modelField.coffee @@ -91,7 +91,7 @@ module.exports = class ModelField extends ModelBase @optionsFrom.url() else @optionsFrom.url - if @prevUrl is url + if @prevUrl is urlçç return @prevUrl = url @@ -148,7 +148,7 @@ module.exports = class ModelField extends ModelBase console.log(bidAdj) if @type in ['multiselect','tree'] bidValue = this.hasValue(opt.value) - bidAdj = if idValue.bidAdjValue.lastIndexOf('/') !== -1 then bidValue.bidAdjValue.split('/')[1] else "+0%"; + bidAdj = if idValue.bidAdjValue.lastIndexOf('/') != -1 then bidValue.bidAdjValue.split('/')[1] else "+0%"; opt.selected = bidValue.selectStatus opt.bidAdj = if bidAdj != -1 then bidAdj else "0%" else @@ -238,7 +238,7 @@ module.exports = class ModelField extends ModelBase unless Array.isArray @value @value = [@value] findMatch = @value.findIndex (e) -> val.search(e) != -1 - if findMatch !== -1 and bidAdj? + if findMatch != -1 and bidAdj? @value[findMatch] = (val + "/" + bidAdj) else if bidAdj? From 67ee0bc527d053ece4b2b90a3a580902d31dae17 Mon Sep 17 00:00:00 2001 From: Wilburn Wilkins Date: Fri, 13 Dec 2019 12:30:05 -0600 Subject: [PATCH 05/23] HUB-2766 minor typo --- src/modelField.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modelField.coffee b/src/modelField.coffee index beab455..b21a5a7 100644 --- a/src/modelField.coffee +++ b/src/modelField.coffee @@ -91,7 +91,7 @@ module.exports = class ModelField extends ModelBase @optionsFrom.url() else @optionsFrom.url - if @prevUrl is urlçç + if @prevUrl is url return @prevUrl = url From 21267638394fbfb9d28bdd8596b6ee06f7dfcf15 Mon Sep 17 00:00:00 2001 From: Wilburn Wilkins Date: Fri, 13 Dec 2019 17:13:00 -0600 Subject: [PATCH 06/23] HUB-2766 index search --- src/modelField.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modelField.coffee b/src/modelField.coffee index b21a5a7..a997cb4 100644 --- a/src/modelField.coffee +++ b/src/modelField.coffee @@ -237,7 +237,7 @@ module.exports = class ModelField extends ModelBase if @type in ['multiselect','tree'] unless Array.isArray @value @value = [@value] - findMatch = @value.findIndex (e) -> val.search(e) != -1 + findMatch = @value.findIndex (e) -> ( e == val ||e.search(val) != -1 || e.match(val) ) if findMatch != -1 and bidAdj? @value[findMatch] = (val + "/" + bidAdj) else @@ -250,14 +250,14 @@ module.exports = class ModelField extends ModelBase removeOptionValue: (val) -> if @type in ['multiselect','tree'] - @value = @value.filter (v) -> val.search(v) == -1 + @value = @value.filter (e) -> ( e == val ||e.search(val) != -1 || e.match(val) ) else if @value is val #single-select @value = '' #determine if the value is or contains the provided value. hasValue: (val) -> if @type in ['multiselect','tree'] - findMatch = @value.findIndex (e) -> e.search(val) != -1 + findMatch = @value.findIndex (e) -> ( e == val ||e.search(val) != -1 || e.match(val) ) if findMatch != -1 return {"bidAdjValue": this.value[findMatch] "selectStatus": true } From 97fc8065f31d1980d50f9fb8138122a6ba4f4987 Mon Sep 17 00:00:00 2001 From: Wilburn Wilkins Date: Fri, 13 Dec 2019 17:21:33 -0600 Subject: [PATCH 07/23] HUB-2766 added modified javascript version --- src/modelField.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modelField.coffee b/src/modelField.coffee index a997cb4..226b9db 100644 --- a/src/modelField.coffee +++ b/src/modelField.coffee @@ -245,16 +245,16 @@ module.exports = class ModelField extends ModelBase @value.push (val + "/" + bidAdj) else @value.push val - else #single-select + else @value = val removeOptionValue: (val) -> if @type in ['multiselect','tree'] @value = @value.filter (e) -> ( e == val ||e.search(val) != -1 || e.match(val) ) - else if @value is val #single-select + else if @value is val @value = '' - #determine if the value is or contains the provided value. + hasValue: (val) -> if @type in ['multiselect','tree'] findMatch = @value.findIndex (e) -> ( e == val ||e.search(val) != -1 || e.match(val) ) @@ -294,7 +294,7 @@ module.exports = class ModelField extends ModelBase @option @value, selected:true else if Array.isArray @value for v in @value - existingOption = null #required to clear out previously found values + existingOption = null existingOption = o for o in @options when o.value is v unless existingOption @option v, selected:true @@ -312,5 +312,5 @@ module.exports = class ModelField extends ModelBase template = @parent.child(@template).value try @value = Mustache.render template, @root.data - catch #just don't crash. Validator will display error later. + catch From 591f78a53309393001c1caf7debbd51b7fde0083 Mon Sep 17 00:00:00 2001 From: Wilburn Wilkins Date: Fri, 13 Dec 2019 17:37:30 -0600 Subject: [PATCH 08/23] HUB-2766 --- src/modeField.js | 524 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 524 insertions(+) create mode 100644 src/modeField.js diff --git a/src/modeField.js b/src/modeField.js new file mode 100644 index 0000000..721c9d4 --- /dev/null +++ b/src/modeField.js @@ -0,0 +1,524 @@ +var ModelBase, ModelField, ModelOption, Mustache, globals, jiff, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty, + slice = [].slice, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + +ModelBase = require('./modelBase'); + +ModelOption = require('./modelOption'); + +globals = require('./globals'); + +Mustache = require('mustache'); + +jiff = require('jiff'); + + +/* + A ModelField represents a model object that render as a DOM field + NOTE: The following field types are subclasses: image, tree, date + */ + +module.exports = ModelField = (function(superClass) { + extend(ModelField, superClass); + + function ModelField() { + return ModelField.__super__.constructor.apply(this, arguments); + } + + ModelField.prototype.modelClassName = 'ModelField'; + + ModelField.prototype.initialize = function() { + var ref, ref1; + this.setDefault('type', 'text'); + this.setDefault('options', []); + this.setDefault('value', (function() { + switch (this.get('type')) { + case 'multiselect': + return []; + case 'bool': + return false; + case 'info': + case 'button': + return void 0; + default: + return (this.get('defaultValue')) || ''; + } + }).call(this)); + this.setDefault('defaultValue', this.get('value')); + this.set('isValid', true); + this.setDefault('validators', []); + this.setDefault('onChangeHandlers', []); + this.setDefault('dynamicValue', null); + this.setDefault('template', null); + this.setDefault('autocomplete', null); + this.setDefault('beforeInput', function(val) { + return val; + }); + this.setDefault('beforeOutput', function(val) { + return val; + }); + ModelField.__super__.initialize.apply(this, arguments); + if ((ref = this.type) !== 'info' && ref !== 'text' && ref !== 'url' && ref !== 'email' && ref !== 'tel' && ref !== 'time' && ref !== 'date' && ref !== 'textarea' && ref !== 'bool' && ref !== 'tree' && ref !== 'color' && ref !== 'select' && ref !== 'multiselect' && ref !== 'image' && ref !== 'button' && ref !== 'number') { + return globals.handleError("Bad field type: " + this.type); + } + this.bindPropFunctions('dynamicValue'); + while ((Array.isArray(this.value)) && (this.type !== 'multiselect') && (this.type !== 'tree') && (this.type !== 'button')) { + this.value = this.value[0]; + } + if (typeof this.value === 'string' && (this.type === 'multiselect')) { + this.value = [this.value]; + } + if (this.type === 'bool' && typeof this.value !== 'bool') { + this.value = !!this.value; + } + this.makePropArray('validators'); + this.bindPropFunctions('validators'); + this.makePropArray('onChangeHandlers'); + this.bindPropFunctions('onChangeHandlers'); + if (this.optionsFrom != null) { + this.ensureSelectType(); + if ((this.optionsFrom.url == null) || (this.optionsFrom.parseResults == null)) { + return globals.handleError('When fetching options remotely, both url and parseResults properties are required'); + } + if (typeof ((ref1 = this.optionsFrom) != null ? ref1.url : void 0) === 'function') { + this.optionsFrom.url = this.bindPropFunction('optionsFrom.url', this.optionsFrom.url); + } + if (typeof this.optionsFrom.parseResults !== 'function') { + return globals.handleError('optionsFrom.parseResults must be a function'); + } + this.optionsFrom.parseResults = this.bindPropFunction('optionsFrom.parseResults', this.optionsFrom.parseResults); + } + this.updateOptionsSelected(); + this.on('change:value', function() { + var changeFunc, i, len, ref2; + ref2 = this.onChangeHandlers; + for (i = 0, len = ref2.length; i < len; i++) { + changeFunc = ref2[i]; + changeFunc(); + } + return this.updateOptionsSelected(); + }); + return this.on('change:type', function() { + if (this.type === 'multiselect') { + this.value = this.value.length > 0 ? [this.value] : []; + } else if (this.previousAttributes().type === 'multiselect') { + this.value = this.value.length > 0 ? this.value[0] : ''; + } + if (this.options.length > 0 && !this.isSelectType()) { + return this.type = 'select'; + } + }); + }; + + ModelField.prototype.getOptionsFrom = function() { + var ref, url; + if (this.optionsFrom == null) { + return; + } + url = typeof this.optionsFrom.url === 'function' ? this.optionsFrom.url() : this.optionsFrom.url; + if (this.prevUrl === url) { + return; + } + this.prevUrl = url; + return typeof window !== "undefined" && window !== null ? (ref = window.formbuilderproxy) != null ? ref.getFromProxy({ + url: url, + method: this.optionsFrom.method || 'get', + headerKey: this.optionsFrom.headerKey + }, (function(_this) { + return function(error, data) { + var i, len, mappedResults, opt, results; + if (error) { + return globals.handleError(globals.makeErrorMessage(_this, 'optionsFrom', error)); + } + mappedResults = _this.optionsFrom.parseResults(data); + if (!Array.isArray(mappedResults)) { + return globals.handleError('results of parseResults must be an array of option parameters'); + } + _this.options = []; + results = []; + for (i = 0, len = mappedResults.length; i < len; i++) { + opt = mappedResults[i]; + results.push(_this.option(opt)); + } + return results; + }; + })(this)) : void 0 : void 0; + }; + + ModelField.prototype.validityMessage = void 0; + + ModelField.prototype.field = function() { + var obj, ref; + obj = 1 <= arguments.length ? slice.call(arguments, 0) : []; + return (ref = this.parent).field.apply(ref, obj); + }; + + ModelField.prototype.group = function() { + var obj, ref; + obj = 1 <= arguments.length ? slice.call(arguments, 0) : []; + return (ref = this.parent).group.apply(ref, obj); + }; + + ModelField.prototype.option = function() { + var newOption, nextOpts, opt, optionObject, optionParams; + optionParams = 1 <= arguments.length ? slice.call(arguments, 0) : []; + optionObject = this.buildParamObject(optionParams, ['title', 'value', 'selected']); + this.ensureSelectType(); + nextOpts = (function() { + var i, len, ref, results; + ref = this.options; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + opt = ref[i]; + if (opt.title !== optionObject.title) { + results.push(opt); + } + } + return results; + }).call(this); + newOption = new ModelOption(optionObject); + nextOpts.push(newOption); + this.options = nextOpts; + + //if new option has selected:true, set this field's value to that + //don't remove from parent value if not selected. Might be supplied by field value during creation. + // Pass in bid Adjustment from string + + + if (newOption.selected) { + console.log("option value:",newOption.value) + this.addOptionValue(newOption.value); + } + return this; + }; + + ModelField.prototype.postBuild = function() { + this.defaultValue = this.value; + return this.updateOptionsSelected(); + }; + + ModelField.prototype.updateOptionsSelected = function() { + var bidAdj, bidValue, i, len, opt, ref, ref1, result; + ref = this.options; + result = []; + for (i = 0, len = ref.length; i < len; i++) { + opt = ref[i]; + if ((ref1 = this.type) === 'multiselect' || ref1 === 'tree') { + const bidValue = this.hasValue(opt.value); + console.log("updateOptionsSelect bid Value", bidValue) + if (bidValue.bidAdjValue) { + bidAdj = bidValue.bidAdjValue.lastIndexOf('/') !== -1 ? bidValue.bidAdjValue.split('/')[1] : "+0%"; + opt.bidAdj = bidAdj + console.log("updateOptionsSelect bid Adj",bidAdj) + + } + result.push(opt.selected = bidValue.selectStatus); + } else { + result.push(opt.selected = this.hasValue(opt.value)); + } + } + return result; + }; + + + ModelField.prototype.isSelectType = function() { + var ref; + return (ref = this.type) === 'select' || ref === 'multiselect' || ref === 'image' || ref === 'tree'; + }; + + ModelField.prototype.ensureSelectType = function() { + if (!this.isSelectType()) { + return this.type = 'select'; + } + }; + + ModelField.prototype.child = function(value) { + var i, len, o, ref; + if (Array.isArray(value)) { + value = value.shift(); + } + ref = this.options; + for (i = 0, len = ref.length; i < len; i++) { + o = ref[i]; + if (o.value === value) { + return o; + } + } + }; + + ModelField.prototype.validator = function(func) { + this.validators.push(this.bindPropFunction('validator', func)); + this.trigger('change'); + return this; + }; + + ModelField.prototype.onChange = function(f) { + this.onChangeHandlers.push(this.bindPropFunction('onChange', f)); + this.trigger('change'); + return this; + }; + + ModelField.prototype.setDirty = function(id, whatChanged) { + var i, len, opt, ref; + ref = this.options; + for (i = 0, len = ref.length; i < len; i++) { + opt = ref[i]; + opt.setDirty(id, whatChanged); + } + return ModelField.__super__.setDirty.call(this, id, whatChanged); + }; + + ModelField.prototype.setClean = function(all) { + var i, len, opt, ref, results; + ModelField.__super__.setClean.apply(this, arguments); + if (all) { + ref = this.options; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + opt = ref[i]; + results.push(opt.setClean(all)); + } + return results; + } + }; + + ModelField.prototype.recalculateRelativeProperties = function() { + var dirty, i, j, len, len1, opt, ref, ref1, results, validator, validityMessage, value; + dirty = this.dirty; + ModelField.__super__.recalculateRelativeProperties.apply(this, arguments); + if (this.shouldCallTriggerFunctionFor(dirty, 'isValid')) { + validityMessage = void 0; + if (this.template) { + validityMessage || (validityMessage = this.validate.template.call(this)); + } + if (this.type === 'number') { + validityMessage || (validityMessage = this.validate.number.call(this)); + } + if (!validityMessage) { + ref = this.validators; + for (i = 0, len = ref.length; i < len; i++) { + validator = ref[i]; + if (typeof validator === 'function') { + validityMessage = validator.call(this); + } + if (typeof validityMessage === 'function') { + return globals.handleError("A validator on field '" + this.name + "' returned a function"); + } + if (validityMessage) { + break; + } + } + } + this.validityMessage = validityMessage; + this.set({ + isValid: validityMessage == null + }); + } + if (this.template && this.shouldCallTriggerFunctionFor(dirty, 'value')) { + this.renderTemplate(); + } else { + if (typeof this.dynamicValue === 'function' && this.shouldCallTriggerFunctionFor(dirty, 'value')) { + value = this.dynamicValue(); + if (typeof value === 'function') { + return globals.handleError("dynamicValue on field '" + this.name + "' returned a function"); + } + this.set('value', value); + } + } + if (this.shouldCallTriggerFunctionFor(dirty, 'options')) { + this.getOptionsFrom(); + } + ref1 = this.options; + results = []; + for (j = 0, len1 = ref1.length; j < len1; j++) { + opt = ref1[j]; + results.push(opt.recalculateRelativeProperties()); + } + return results; + }; + + ModelField.prototype.addOptionValue = function(val, bidAdj) { + if (['multiselect','tree'].includes(this.type)) { + console.log("addOption val:",val, "bidAdj:", bidAdj) + if (!Array.isArray(this.value)) { + this.value = [this.value]; + } + const findMatch = this.value.findIndex(e => { + console.log ("comparing findMatch:", e, val) + return ( e == val || e.search(val) !== -1 || e.match(val) ) + }); + console.log("addOption value findMatch",findMatch) + if ((findMatch !== -1) && (bidAdj != null)) { + return this.value[findMatch] = (val + "/" + bidAdj); + } else { + if (bidAdj != null) { + console.log("no match found and PUSHING a bid") + return this.value.push((val + "/" + bidAdj)); + } else { + console.log("no match found and not pushing a bid") + return this.value.push(val); + } + } + } else { //single-select + return this.value = val; + } + }; + + ModelField.prototype.removeOptionValue = function(val) { + var ref; + if ((ref = this.type) === 'multiselect' || ref === 'tree') { + + return this.value = this.value.filter(function(v) { + return (v.search(val) == -1 || !v.match(val) ) + }); + + } else if (this.value === val) { + return this.value = ''; + } + }; + + ModelField.prototype.hasValue = function(val) { + if (['multiselect','tree'].includes(this.type)) { + const findMatch = this.value.findIndex(e => { + console.log ("comparing findMatch:", e, val) + + return ( e == val ||e.search(val) !== -1 || e.match(val) ) + }); + console.log("has value match:",findMatch) + if (findMatch !== -1) { + return {"bidAdjValue": this.value[findMatch], + "selectStatus": true} ; + } else { + return {"selectStatus": false }; + } + } else { + return val === this.value; + } + }; + + ModelField.prototype.buildOutputData = function(_, skipBeforeOutput) { + var out, value; + value = (function() { + switch (this.type) { + case 'number': + out = +this.value; + if (isNaN(out)) { + return null; + } else { + return out; + } + break; + case 'info': + case 'button': + return void 0; + case 'bool': + return !!this.value; + default: + return this.value; + } + }).call(this); + if (skipBeforeOutput) { + return value; + } else { + return this.beforeOutput(value); + } + }; + + ModelField.prototype.clear = function(purgeDefaults) { + if (purgeDefaults == null) { + purgeDefaults = false; + } + if (purgeDefaults) { + return this.value = (function() { + switch (this.type) { + case 'multiselect': + return []; + case 'bool': + return false; + default: + return ''; + } + }).call(this); + } else { + return this.value = this.defaultValue; + } + }; + + ModelField.prototype.ensureValueInOptions = function() { + var existingOption, i, j, k, len, len1, len2, o, ref, ref1, ref2, results, v; + if (!this.isSelectType()) { + return; + } + if (typeof this.value === 'string') { + ref = this.options; + for (i = 0, len = ref.length; i < len; i++) { + o = ref[i]; + if (o.value === this.value) { + existingOption = o; + } + } + if (!existingOption) { + return this.option(this.value, { + selected: true + }); + } + } else if (Array.isArray(this.value)) { + ref1 = this.value; + results = []; + for (j = 0, len1 = ref1.length; j < len1; j++) { + v = ref1[j]; + existingOption = null; + ref2 = this.options; + for (k = 0, len2 = ref2.length; k < len2; k++) { + o = ref2[k]; + if (o.value === v) { + existingOption = o; + } + } + if (!existingOption) { + results.push(this.option(v, { + selected: true + })); + } else { + results.push(void 0); + } + } + return results; + } + }; + + ModelField.prototype.applyData = function(inData, clear, purgeDefaults) { + if (clear == null) { + clear = false; + } + if (purgeDefaults == null) { + purgeDefaults = false; + } + if (clear) { + this.clear(purgeDefaults); + } + if (inData != null) { + this.value = this.beforeInput(jiff.clone(inData)); + return this.ensureValueInOptions(); + } + }; + + ModelField.prototype.renderTemplate = function() { + var error1, template; + if (typeof this.template === 'object') { + template = this.template.value; + } else { + template = this.parent.child(this.template).value; + } + try { + return this.value = Mustache.render(template, this.root.data); + } catch (error1) { + + } + }; + + return ModelField; + +})(ModelBase); From 814d605c765456ff8a29f673960c70bce97ecc80 Mon Sep 17 00:00:00 2001 From: Chad Norwood Date: Tue, 17 Dec 2019 17:39:45 -0600 Subject: [PATCH 09/23] bump version to 2.3.0 --- doc/VersionHistory.md | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/VersionHistory.md b/doc/VersionHistory.md index 1c77519..cf9cd65 100644 --- a/doc/VersionHistory.md +++ b/doc/VersionHistory.md @@ -1,5 +1,8 @@ # Version History +# 2.3.0 +- Add support for bid adjustments + # 2.2.1 - Fix a bug where applying a value to a multiselect field where some of those values aren't options would sometimes not add all new values as options. diff --git a/package.json b/package.json index df294ba..cb3692a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "balihoo-form-builder-model", - "version": "2.2.1", + "version": "2.3.0", "description": "Standalone code for building form builder models", "author": "Balihoo", "main": "./formbuilder.js", From 1aa202468748b98dd1dc45787418dea749cd96e5 Mon Sep 17 00:00:00 2001 From: Will Wilkins Date: Wed, 18 Dec 2019 15:22:17 -0600 Subject: [PATCH 10/23] HUB-2766 updated coffee script file with latest from formRender.jsx --- src/modelField.coffee | 102 +++++---- src/modelField.js | 479 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 543 insertions(+), 38 deletions(-) create mode 100644 src/modelField.js diff --git a/src/modelField.coffee b/src/modelField.coffee index 226b9db..513fe40 100644 --- a/src/modelField.coffee +++ b/src/modelField.coffee @@ -116,7 +116,7 @@ module.exports = class ModelField extends ModelBase @parent.group obj... option: (optionParams...) -> - optionObject = @buildParamObject optionParams, ['title', 'value', 'selected', 'bidAdj'] + optionObject = @buildParamObject optionParams, ['title', 'value', 'selected', 'bidAdj', 'bidAdjFlag'] # when adding an option to a field, make sure it is a *select type @ensureSelectType() @@ -129,9 +129,6 @@ module.exports = class ModelField extends ModelBase #if new option has selected:true, set this field's value to that #don't remove from parent value if not selected. Might be supplied by field value during creation. - # Pass in bid Adjustment from string - - if newOption.selected @addOptionValue newOption.value @ #return the field so we can chain .option calls @@ -143,16 +140,21 @@ module.exports = class ModelField extends ModelBase @updateOptionsSelected() updateOptionsSelected: -> - for opt in @options - - console.log(bidAdj) - if @type in ['multiselect','tree'] - bidValue = this.hasValue(opt.value) - bidAdj = if idValue.bidAdjValue.lastIndexOf('/') != -1 then bidValue.bidAdjValue.split('/')[1] else "+0%"; - opt.selected = bidValue.selectStatus - opt.bidAdj = if bidAdj != -1 then bidAdj else "0%" + ref = @options + results = [] + i = 0 + len = ref.length + while i < len + opt = ref[i] + if (ref1 = @type) == 'multiselect' or ref1 == 'tree' + bid = @hasValue(opt.value) + if bid.bidValue + opt.bidAdj = if bid.bidValue.lastIndexOf('/') != -1 then bid.bidValue.split('/')[1] else @bidAdj + results.push opt.selected = bid.selectStatus else - opt.selected = this.hasValue(opt.value) + results.push opt.selected = @hasValue(opt.value) + i++ + results # returns true if this type is one where a value is selected. Otherwise false isSelectType: -> @@ -234,37 +236,60 @@ module.exports = class ModelField extends ModelBase opt.recalculateRelativeProperties() addOptionValue: (val, bidAdj) -> - if @type in ['multiselect','tree'] - unless Array.isArray @value - @value = [@value] - findMatch = @value.findIndex (e) -> ( e == val ||e.search(val) != -1 || e.match(val) ) - if findMatch != -1 and bidAdj? - @value[findMatch] = (val + "/" + bidAdj) + findMatch = undefined + ref = undefined + if (ref = @type) == 'multiselect' or ref == 'tree' + if !Array.isArray(@value) + @value = [ @value ] + findMatch = @value.findIndex((e) -> + if typeof e == 'string' + e.search(val) != -1 + else + e == val + ) + if findMatch != -1 + if bidAdj + return @value[findMatch] = val + '/' + bidAdj else - if bidAdj? - @value.push (val + "/" + bidAdj) - else - @value.push val - else - @value = val + if bidAdj + return @value.push(val + '/' + bidAdj) + else + return @value.push(val) + else + return @value = val + return removeOptionValue: (val) -> - if @type in ['multiselect','tree'] - @value = @value.filter (e) -> ( e == val ||e.search(val) != -1 || e.match(val) ) - else if @value is val - @value = '' - - + ref = undefined + if (ref = @type) == 'multiselect' or ref == 'tree' + return @value = @value.filter((e) -> + if typeof e == 'string' + e.search(val) == -1 + else + e != val + ) + else if @value == val + return @value = '' + return hasValue: (val) -> - if @type in ['multiselect','tree'] - findMatch = @value.findIndex (e) -> ( e == val ||e.search(val) != -1 || e.match(val) ) + findMatch = undefined + ref = undefined + if (ref = @type) == 'multiselect' or ref == 'tree' + findMatch = @value.findIndex((e) -> + if typeof e == 'string' + e.search(val) != -1 + else + e == val + ) if findMatch != -1 - return {"bidAdjValue": this.value[findMatch] - "selectStatus": true } + { + 'bidValue': @value[findMatch] + 'selectStatus': true + } else - return {"selectStatus": false } + { 'selectStatus': false } else - val is @value + val == @value buildOutputData: (_, skipBeforeOutput) -> value = switch @type @@ -303,7 +328,8 @@ module.exports = class ModelField extends ModelBase @clear purgeDefaults if clear if inData? @value = @beforeInput jiff.clone inData - @ensureValueInOptions() + #HUB-2766 this is no longer necessary as we now have biding changing option + #@ensureValueInOptions() renderTemplate: () -> if typeof @template is 'object' diff --git a/src/modelField.js b/src/modelField.js new file mode 100644 index 0000000..86a2f72 --- /dev/null +++ b/src/modelField.js @@ -0,0 +1,479 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var ModelBase, ModelField, ModelOption, Mustache, globals, jiff; + + ModelBase = require('./modelBase'); + + ModelOption = require('./modelOption'); + + globals = require('./globals'); + + Mustache = require('mustache'); + + jiff = require('jiff'); + + module.exports = ModelField = (function() { + class ModelField extends ModelBase { + initialize() { + var ref, ref1; + this.setDefault('type', 'text'); + this.setDefault('options', []); + this.setDefault('value', (function() { + switch (this.get('type')) { + case 'multiselect': + return []; + case 'bool': + return false; + case 'info': + case 'button': + return void 0; + default: + return (this.get('defaultValue')) || ''; + } + }).call(this)); + this.setDefault('defaultValue', this.get('value')); + this.set('isValid', true); + this.setDefault('validators', []); + this.setDefault('onChangeHandlers', []); + this.setDefault('dynamicValue', null); + this.setDefault('template', null); + this.setDefault('autocomplete', null); + this.setDefault('beforeInput', function(val) { + return val; + }); + this.setDefault('beforeOutput', function(val) { + return val; + }); + if ((ref = this.type) !== 'info' && ref !== 'text' && ref !== 'url' && ref !== 'email' && ref !== 'tel' && ref !== 'time' && ref !== 'date' && ref !== 'textarea' && ref !== 'bool' && ref !== 'tree' && ref !== 'color' && ref !== 'select' && ref !== 'multiselect' && ref !== 'image' && ref !== 'button' && ref !== 'number') { + return globals.handleError(`Bad field type: ${this.type}`); + } + this.bindPropFunctions('dynamicValue'); + while ((Array.isArray(this.value)) && (this.type !== 'multiselect') && (this.type !== 'tree') && (this.type !== 'button')) { + this.value = this.value[0]; + } + if (typeof this.value === 'string' && (this.type === 'multiselect')) { + this.value = [this.value]; + } + if (this.type === 'bool' && typeof this.value !== 'bool') { + this.value = !!this.value; + } + this.makePropArray('validators'); + this.bindPropFunctions('validators'); + this.makePropArray('onChangeHandlers'); + this.bindPropFunctions('onChangeHandlers'); + if (this.optionsFrom != null) { + this.ensureSelectType(); + if ((this.optionsFrom.url == null) || (this.optionsFrom.parseResults == null)) { + return globals.handleError('When fetching options remotely, both url and parseResults properties are required'); + } + if (typeof ((ref1 = this.optionsFrom) != null ? ref1.url : void 0) === 'function') { + this.optionsFrom.url = this.bindPropFunction('optionsFrom.url', this.optionsFrom.url); + } + if (typeof this.optionsFrom.parseResults !== 'function') { + return globals.handleError('optionsFrom.parseResults must be a function'); + } + this.optionsFrom.parseResults = this.bindPropFunction('optionsFrom.parseResults', this.optionsFrom.parseResults); + } + this.updateOptionsSelected(); + this.on('change:value', function() { + var changeFunc, i, len, ref2; + ref2 = this.onChangeHandlers; + for (i = 0, len = ref2.length; i < len; i++) { + changeFunc = ref2[i]; + changeFunc(); + } + return this.updateOptionsSelected(); + }); + return this.on('change:type', function() { + if (this.type === 'multiselect') { + this.value = this.value.length > 0 ? [this.value] : []; + } else if (this.previousAttributes().type === 'multiselect') { + this.value = this.value.length > 0 ? this.value[0] : ''; + } + if (this.options.length > 0 && !this.isSelectType()) { + return this.type = 'select'; + } + }); + } + + getOptionsFrom() { + var ref, url; + if (this.optionsFrom == null) { + return; + } + url = typeof this.optionsFrom.url === 'function' ? this.optionsFrom.url() : this.optionsFrom.url; + if (this.prevUrl === url) { + return; + } + this.prevUrl = url; + return typeof window !== "undefined" && window !== null ? (ref = window.formbuilderproxy) != null ? ref.getFromProxy({ + url: url, + method: this.optionsFrom.method || 'get', + headerKey: this.optionsFrom.headerKey + }, (error, data) => { + var i, len, mappedResults, opt, results; + if (error) { + return globals.handleError(globals.makeErrorMessage(this, 'optionsFrom', error)); + } + mappedResults = this.optionsFrom.parseResults(data); + if (!Array.isArray(mappedResults)) { + return globals.handleError('results of parseResults must be an array of option parameters'); + } + this.options = []; + results = []; + for (i = 0, len = mappedResults.length; i < len; i++) { + opt = mappedResults[i]; + results.push(this.option(opt)); + } + return results; + }) : void 0 : void 0; + } + + field(...obj) { + return this.parent.field(...obj); + } + + group(...obj) { + return this.parent.group(...obj); + } + + option(...optionParams) { + var newOption, nextOpts, opt, optionObject; + optionObject = this.buildParamObject(optionParams, ['title', 'value', 'selected', 'bidAdj', 'bidAdjFlag']); + this.ensureSelectType(); + nextOpts = (function() { + var i, len, ref, results; + ref = this.options; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + opt = ref[i]; + if (opt.title !== optionObject.title) { + results.push(opt); + } + } + return results; + }).call(this); + newOption = new ModelOption(optionObject); + nextOpts.push(newOption); + this.options = nextOpts; + if (newOption.selected) { + this.addOptionValue(newOption.value); + } + return this; + } + + postBuild() { + this.defaultValue = this.value; + return this.updateOptionsSelected(); + } + + updateOptionsSelected() { + var bidAdj, bidValue, i, len, opt, ref, ref1, results; + ref = this.options; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + opt = ref[i]; + if ((ref1 = this.type) === 'multiselect' || ref1 === 'tree') { + bidValue = this.hasValue(opt.value); + bidAdj = bidValue.bidAdjValue.lastIndexOf('/') !== -1 ? bidValue.bidAdjValue.split('/')[1] : "+0%"; + opt.selected = bidValue.selectStatus; + results.push(opt.bidAdj = bidAdj !== -1 ? bidAdj : "0%"); + } else { + results.push(opt.selected = this.hasValue(opt.value)); + } + } + return results; + } + + isSelectType() { + var ref; + return (ref = this.type) === 'select' || ref === 'multiselect' || ref === 'image' || ref === 'tree'; + } + + ensureSelectType() { + if (!this.isSelectType()) { + return this.type = 'select'; + } + } + + child(value) { + var i, len, o, ref; + if (Array.isArray(value)) { + value = value.shift(); + } + ref = this.options; + for (i = 0, len = ref.length; i < len; i++) { + o = ref[i]; + if (o.value === value) { + return o; + } + } + } + + validator(func) { + this.validators.push(this.bindPropFunction('validator', func)); + this.trigger('change'); + return this; + } + + onChange(f) { + this.onChangeHandlers.push(this.bindPropFunction('onChange', f)); + this.trigger('change'); + return this; + } + + setDirty(id, whatChanged) { + var i, len, opt, ref; + ref = this.options; + for (i = 0, len = ref.length; i < len; i++) { + opt = ref[i]; + opt.setDirty(id, whatChanged); + } + return super.setDirty(id, whatChanged); + } + + setClean(all) { + var i, len, opt, ref, results; + if (all) { + ref = this.options; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + opt = ref[i]; + results.push(opt.setClean(all)); + } + return results; + } + } + + recalculateRelativeProperties() { + var dirty, i, j, len, len1, opt, ref, ref1, results, validator, validityMessage, value; + dirty = this.dirty; + if (this.shouldCallTriggerFunctionFor(dirty, 'isValid')) { + validityMessage = void 0; + if (this.template) { + validityMessage || (validityMessage = this.validate.template.call(this)); + } + if (this.type === 'number') { + validityMessage || (validityMessage = this.validate.number.call(this)); + } + if (!validityMessage) { + ref = this.validators; + for (i = 0, len = ref.length; i < len; i++) { + validator = ref[i]; + if (typeof validator === 'function') { + validityMessage = validator.call(this); + } + if (typeof validityMessage === 'function') { + return globals.handleError(`A validator on field '${this.name}' returned a function`); + } + if (validityMessage) { + break; + } + } + } + this.validityMessage = validityMessage; + this.set({ + isValid: validityMessage == null + }); + } + if (this.template && this.shouldCallTriggerFunctionFor(dirty, 'value')) { + this.renderTemplate(); + } else { + if (typeof this.dynamicValue === 'function' && this.shouldCallTriggerFunctionFor(dirty, 'value')) { + value = this.dynamicValue(); + if (typeof value === 'function') { + return globals.handleError(`dynamicValue on field '${this.name}' returned a function`); + } + this.set('value', value); + } + } + if (this.shouldCallTriggerFunctionFor(dirty, 'options')) { + this.getOptionsFrom(); + } + ref1 = this.options; + results = []; + for (j = 0, len1 = ref1.length; j < len1; j++) { + opt = ref1[j]; + results.push(opt.recalculateRelativeProperties()); + } + return results; + } + + addOptionValue(val, bidAdj) { + var findMatch, ref; + if ((ref = this.type) === 'multiselect' || ref === 'tree') { + if (!Array.isArray(this.value)) { + this.value = [this.value]; + } + findMatch = this.value.findIndex(function(e) { + return val.search(e) !== -1; + }); + if (findMatch !== -1 && (bidAdj != null)) { + return this.value[findMatch] = val + "/" + bidAdj; + } else { + if (bidAdj != null) { + return this.value.push(val + "/" + bidAdj); + } else { + return this.value.push(val); + } + } + } else { + return this.value = val; + } + } + + removeOptionValue(val) { + var ref; + if ((ref = this.type) === 'multiselect' || ref === 'tree') { + return this.value = this.value.filter(function(v) { + return v.search(val) === -1; + }); + } else if (this.value === val) { + return this.value = ''; + } + } + + hasValue(val) { + var findMatch, ref; + if ((ref = this.type) === 'multiselect' || ref === 'tree') { + findMatch = this.value.findIndex(function(e) { + return e.search(val) !== -1; + }); + if (findMatch !== -1) { + return { + "bidAdjValue": this.value[findMatch], + "selectStatus": true + }; + } else { + return { + "selectStatus": false + }; + } + } else { + return val === this.value; + } + } + + buildOutputData(_, skipBeforeOutput) { + var out, value; + value = (function() { + switch (this.type) { + case 'number': + out = +this.value; + if (isNaN(out)) { + return null; + } else { + return out; + } + break; + case 'info': + case 'button': + return void 0; + case 'bool': + return !!this.value; + default: + return this.value; + } + }).call(this); + if (skipBeforeOutput) { + return value; + } else { + return this.beforeOutput(value); + } + } + + clear(purgeDefaults = false) { + if (purgeDefaults) { + return this.value = (function() { + switch (this.type) { + case 'multiselect': + return []; + case 'bool': + return false; + default: + return ''; + } + }).call(this); + } else { + return this.value = this.defaultValue; + } + } + + ensureValueInOptions() { + var existingOption, i, j, k, len, len1, len2, o, ref, ref1, ref2, results, v; + if (!this.isSelectType()) { + return; + } + if (typeof this.value === 'string') { + ref = this.options; + for (i = 0, len = ref.length; i < len; i++) { + o = ref[i]; + if (o.value === this.value) { + existingOption = o; + } + } + if (!existingOption) { + return this.option(this.value, { + selected: true + }); + } + } else if (Array.isArray(this.value)) { + ref1 = this.value; + results = []; + for (j = 0, len1 = ref1.length; j < len1; j++) { + v = ref1[j]; + existingOption = null; + ref2 = this.options; + for (k = 0, len2 = ref2.length; k < len2; k++) { + o = ref2[k]; + if (o.value === v) { + existingOption = o; + } + } + if (!existingOption) { + results.push(this.option(v, { + selected: true + })); + } else { + results.push(void 0); + } + } + return results; + } + } + + applyData(inData, clear = false, purgeDefaults = false) { + if (clear) { + this.clear(purgeDefaults); + } + if (inData != null) { + this.value = this.beforeInput(jiff.clone(inData)); + return this.ensureValueInOptions(); + } + } + + renderTemplate() { + var template; + if (typeof this.template === 'object') { + template = this.template.value; + } else { + template = this.parent.child(this.template).value; + } + try { + return this.value = Mustache.render(template, this.root.data); + } catch (error1) { + + } + } + + }; + + ModelField.prototype.modelClassName = 'ModelField'; + + ModelField.prototype.validityMessage = void 0; + + return ModelField; + + }).call(this); + +}).call(this); From b06fcf3ed1212b38768a776359785a20d19528e0 Mon Sep 17 00:00:00 2001 From: Will Wilkins Date: Wed, 18 Dec 2019 17:16:32 -0600 Subject: [PATCH 11/23] HUB-2766 bid adjustment flag in tree --- src/modelFieldTree.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modelFieldTree.coffee b/src/modelFieldTree.coffee index 10ac26e..d363f7f 100644 --- a/src/modelFieldTree.coffee +++ b/src/modelFieldTree.coffee @@ -6,7 +6,7 @@ module.exports = class ModelFieldTree extends ModelField super option: (optionParams...) -> - optionObject = @buildParamObject optionParams, ['path', 'value', 'selected', 'bidAdj'] + optionObject = @buildParamObject optionParams, ['path', 'value', 'selected', 'bidAdj', 'bidAdjFlag'] optionObject.value ?= optionObject.id optionObject.value ?= optionObject.path.join ' > ' optionObject.title = optionObject.path.join '>' #use path as the key since that is what is rendered. From 1a36b54699dd15f90d9adb87ff839badcc5d30cf Mon Sep 17 00:00:00 2001 From: Will Wilkins Date: Wed, 18 Dec 2019 18:25:56 -0600 Subject: [PATCH 12/23] HUB-2766 compiled local output and tested coffee script locally: linter caught these and then ran fine --- package-lock.json | 1 + src/modelField.coffee | 25 ++++++++++++------------- 2 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..9625221 --- /dev/null +++ b/package-lock.json @@ -0,0 +1 @@ + "repeat-element": "^1.1.2", diff --git a/src/modelField.coffee b/src/modelField.coffee index 513fe40..ee2cda5 100644 --- a/src/modelField.coffee +++ b/src/modelField.coffee @@ -261,16 +261,16 @@ module.exports = class ModelField extends ModelBase removeOptionValue: (val) -> ref = undefined - if (ref = @type) == 'multiselect' or ref == 'tree' - return @value = @value.filter((e) -> - if typeof e == 'string' - e.search(val) == -1 - else - e != val - ) - else if @value == val - return @value = '' - return + if (ref = @type) == 'multiselect' or ref == 'tree' + return @value = @value.filter((e) -> + if typeof e == 'string' + e.search(val) == -1 + else + e != val + ) + else if @value == val + return @value = '' + return hasValue: (val) -> findMatch = undefined ref = undefined @@ -319,7 +319,7 @@ module.exports = class ModelField extends ModelBase @option @value, selected:true else if Array.isArray @value for v in @value - existingOption = null + existingOption = null existingOption = o for o in @options when o.value is v unless existingOption @option v, selected:true @@ -338,5 +338,4 @@ module.exports = class ModelField extends ModelBase template = @parent.child(@template).value try @value = Mustache.render template, @root.data - catch - + catch \ No newline at end of file From 75a7d8125b0df8c8cda7a441c6b5bfbde8b662fd Mon Sep 17 00:00:00 2001 From: balihoo-wwilkins <33360233+balihoo-wwilkins@users.noreply.github.com> Date: Mon, 6 Jan 2020 14:02:31 -0600 Subject: [PATCH 13/23] HUB-2766 removed console.log --- src/modelField.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modelField.coffee b/src/modelField.coffee index ee2cda5..7be5ea1 100644 --- a/src/modelField.coffee +++ b/src/modelField.coffee @@ -144,6 +144,7 @@ module.exports = class ModelField extends ModelBase results = [] i = 0 len = ref.length + while i < len opt = ref[i] if (ref1 = @type) == 'multiselect' or ref1 == 'tree' From f4af1a1ebd4867f9164141257b8eb42512c0205a Mon Sep 17 00:00:00 2001 From: Will Wilkins Date: Thu, 9 Jan 2020 13:36:32 -0600 Subject: [PATCH 14/23] HUB-2766 updated code to check optionObject.path if array and pop array in modelField.coffee --- package-lock.json | 3307 +++++++++++++++++++++++++++++++++++++ src/modelField.coffee | 2 +- src/modelField.js | 2 +- src/modelFieldTree.coffee | 6 +- 4 files changed, 3313 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9625221..e1a3477 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1 +1,3308 @@ +{ + "name": "balihoo-form-builder-model", + "version": "2.2.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "dev": true + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true, + "optional": true + }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "args-js": { + "version": "0.10.12", + "resolved": "https://registry.npmjs.org/args-js/-/args-js-0.10.12.tgz", + "integrity": "sha1-oyeuqA5BByo9hfnCdNtlEeuV5Jw=", + "dev": true + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "backbone": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.2.1.tgz", + "integrity": "sha1-1yGcXtSeXhMdv/ryXJbW0sw8oD4=", + "requires": { + "underscore": ">=1.7.0" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "coffee-script": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.9.3.tgz", + "integrity": "sha1-WW5ug/z8tnxZZKtw1ES+/wrASsc=" + }, + "coffeelint": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/coffeelint/-/coffeelint-1.11.1.tgz", + "integrity": "sha1-hwCqHbpPAWsNuPkuYcyeFNSzgmQ=", + "dev": true, + "requires": { + "coffee-script": "^1.9.1", + "glob": "^4.0.0", + "ignore": "^2.2.15", + "optimist": "^0.6.1", + "resolve": "^0.6.3", + "strip-json-comments": "^1.0.2" + } + }, + "coffeelint-stylish": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/coffeelint-stylish/-/coffeelint-stylish-0.1.2.tgz", + "integrity": "sha1-q1AaZENeIxcG2hOidSeraVcAq8k=", + "dev": true, + "requires": { + "chalk": "^1.0.0", + "text-table": "^0.2.0" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "optional": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "dateformat": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "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=", + "dev": true + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "deprecated": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", + "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=", + "dev": true + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, + "diff": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", + "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=", + "dev": true + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "dev": true, + "requires": { + "readable-stream": "~1.1.9" + } + }, + "end-of-stream": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "dev": true, + "requires": { + "once": "~1.3.0" + }, + "dependencies": { + "once": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "dev": true, + "requires": { + "wrappy": "1" + } + } + } + }, + "es-abstract": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.3.tgz", + "integrity": "sha512-WtY7Fx5LiOnSYgF5eg/1T+GONaGmpvpPdCpSnYij+U2gDTL0UPfWrhDw7b2IYb+9NQJsYpCA0wOQvZfsd6YwRw==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "string.prototype.trimleft": "^2.1.0", + "string.prototype.trimright": "^2.1.0" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.7.1.tgz", + "integrity": "sha1-MOz89mypjcZ80v0WKr626vqM5vw=", + "dev": true, + "requires": { + "esprima": "^1.2.2", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.5.0", + "source-map": "~0.2.0" + }, + "dependencies": { + "esprima": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.5.tgz", + "integrity": "sha1-CZNQL+r2aBODJXVvMPmlH+7sEek=", + "dev": true + }, + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "esprima": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.5.0.tgz", + "integrity": "sha1-84ekb9NEwbGjm6+MIL+0O20AWMw=", + "dev": true + }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "fancy-log": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", + "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", + "dev": true, + "requires": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "parse-node-version": "^1.0.0", + "time-stamp": "^1.0.0" + } + }, + "fast-levenshtein": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz", + "integrity": "sha1-AXjc3uAjuSkFGTrwlZ6KdjnP3Lk=", + "dev": true + }, + "fileset": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fileset/-/fileset-0.2.1.tgz", + "integrity": "sha1-WI74lzxmI7KnbfRlEFaWuWqsgGc=", + "dev": true, + "requires": { + "glob": "5.x", + "minimatch": "2.x" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-index": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", + "dev": true + }, + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "first-chunk-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", + "dev": true + }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "formatio": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", + "integrity": "sha1-XtPM1jZVEJc4NGXZlhmRAOhhYek=", + "dev": true, + "requires": { + "samsam": "~1.1" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gaze": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", + "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", + "dev": true, + "requires": { + "globule": "~0.1.0" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^2.0.1", + "once": "^1.3.0" + } + }, + "glob-stream": { + "version": "3.1.18", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", + "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", + "dev": true, + "requires": { + "glob": "^4.3.1", + "glob2base": "^0.0.12", + "minimatch": "^2.0.1", + "ordered-read-streams": "^0.1.0", + "through2": "^0.6.1", + "unique-stream": "^1.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + } + } + }, + "glob-watcher": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", + "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", + "dev": true, + "requires": { + "gaze": "^0.5.1" + } + }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "dev": true, + "requires": { + "find-index": "^0.1.1" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globule": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", + "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", + "dev": true, + "requires": { + "glob": "~3.1.21", + "lodash": "~1.0.1", + "minimatch": "~0.2.11" + }, + "dependencies": { + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dev": true, + "requires": { + "graceful-fs": "~1.2.0", + "inherits": "1", + "minimatch": "~0.2.11" + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", + "dev": true + }, + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, + "requires": { + "lru-cache": "2", + "sigmund": "~1.0.0" + } + } + } + }, + "glogg": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", + "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "graceful-fs": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.12.tgz", + "integrity": "sha512-J55gaCS4iTTJfTXIxSVw3EMQckcqkpdRv3IR7gu6sq0+tbC363Zx6KH/SEwXASK9JRbhyZmVjJEVJIOxYsB3Qg==", + "dev": true, + "requires": { + "natives": "^1.1.3" + } + }, + "growl": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", + "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", + "dev": true + }, + "gulp": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", + "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", + "dev": true, + "requires": { + "archy": "^1.0.0", + "chalk": "^1.0.0", + "deprecated": "^0.0.1", + "gulp-util": "^3.0.0", + "interpret": "^1.0.0", + "liftoff": "^2.1.0", + "minimist": "^1.1.0", + "orchestrator": "^0.3.0", + "pretty-hrtime": "^1.0.0", + "semver": "^4.1.0", + "tildify": "^1.0.0", + "v8flags": "^2.0.2", + "vinyl-fs": "^0.3.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "gulp-coffee": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/gulp-coffee/-/gulp-coffee-2.3.5.tgz", + "integrity": "sha512-PbgPGZVyYFnBTYtfYkVN6jcK8Qsuh3BxycPzvu8y5lZroCw3/x1m25KeyEDX110KsVLDmJxoULjscR21VEN4wA==", + "dev": true, + "requires": { + "coffeescript": "^1.10.0", + "gulp-util": "^3.0.2", + "merge": "^1.2.0", + "through2": "^2.0.1", + "vinyl-sourcemaps-apply": "^0.2.1" + }, + "dependencies": { + "coffeescript": { + "version": "1.12.7", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.12.7.tgz", + "integrity": "sha512-pLXHFxQMPklVoEekowk8b3erNynC+DVJzChxS/LCBBgR6/8AJkHivkm//zbowcfc7BTCAjryuhx6gPqPRfsFoA==", + "dev": true + } + } + }, + "gulp-coffeelint": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/gulp-coffeelint/-/gulp-coffeelint-0.5.0.tgz", + "integrity": "sha1-O92qxFcahytrVsK49mSGdGu4o8I=", + "dev": true, + "requires": { + "args-js": "^0.10.5", + "coffeelint": "^1.4.0", + "coffeelint-stylish": "^0.1.1", + "gulp-util": "^3.0.0", + "through2": "^0.6.1" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + } + } + }, + "gulp-istanbul": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/gulp-istanbul/-/gulp-istanbul-0.5.0.tgz", + "integrity": "sha1-/Ce8jpLPQ+eQfF0EsiLZrYJLYV4=", + "dev": true, + "requires": { + "gulp-util": "^3.0.1", + "istanbul": "^0.3.2", + "lodash": "^2.4.1", + "through2": "^0.6.3" + }, + "dependencies": { + "lodash": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + } + } + }, + "gulp-mocha": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/gulp-mocha/-/gulp-mocha-2.2.0.tgz", + "integrity": "sha1-HOXrpLlLQMdDav7DxJgsjuqJQZI=", + "dev": true, + "requires": { + "gulp-util": "^3.0.0", + "mocha": "^2.0.1", + "plur": "^2.1.0", + "resolve-from": "^1.0.0", + "temp": "^0.8.3", + "through": "^2.3.4" + } + }, + "gulp-util": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", + "dev": true, + "requires": { + "array-differ": "^1.0.0", + "array-uniq": "^1.0.2", + "beeper": "^1.0.0", + "chalk": "^1.0.0", + "dateformat": "^2.0.0", + "fancy-log": "^1.1.0", + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "lodash._reescape": "^3.0.0", + "lodash._reevaluate": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.template": "^3.0.0", + "minimist": "^1.1.0", + "multipipe": "^0.1.2", + "object-assign": "^3.0.0", + "replace-ext": "0.0.1", + "through2": "^2.0.0", + "vinyl": "^0.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "^1.0.0" + } + }, + "handlebars": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", + "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", + "dev": true, + "requires": { + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "ignore": { + "version": "2.2.19", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-2.2.19.tgz", + "integrity": "sha1-TIRaYfflC0pBD2FWqqOLatleDI8=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "irregular-plurals": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.4.0.tgz", + "integrity": "sha1-LKmwM2UREYVUEvFr5dd8YqRYp2Y=", + "dev": true + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "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=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-generator-function": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.7.tgz", + "integrity": "sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw==", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "istanbul": { + "version": "0.3.22", + "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.3.22.tgz", + "integrity": "sha1-PhZNhQIf4ZyYXR8OfvDD4i0BLrY=", + "dev": true, + "requires": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.7.x", + "esprima": "2.5.x", + "fileset": "0.2.x", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + } + } + }, + "jade": { + "version": "0.26.3", + "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz", + "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=", + "dev": true, + "requires": { + "commander": "0.6.1", + "mkdirp": "0.3.0" + }, + "dependencies": { + "commander": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", + "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY=", + "dev": true + }, + "mkdirp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", + "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=", + "dev": true + } + } + }, + "jiff": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/jiff/-/jiff-0.7.2.tgz", + "integrity": "sha1-rdteeJkxtr2RGhFteXZHJKLUreI=" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "dependencies": { + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + } + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "levn": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz", + "integrity": "sha1-uo0znQykphDjo/FFucr0iAcVUFQ=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.0", + "type-check": "~0.3.1" + } + }, + "liftoff": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz", + "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "findup-sync": "^2.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.13.1.tgz", + "integrity": "sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } + } + }, + "lodash": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", + "dev": true + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", + "dev": true + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", + "dev": true + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", + "dev": true + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "dev": true, + "requires": { + "lodash._root": "^3.0.0" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "dev": true, + "requires": { + "lodash._basecopy": "^3.0.0", + "lodash._basetostring": "^3.0.0", + "lodash._basevalues": "^3.0.0", + "lodash._isiterateecall": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0", + "lodash.keys": "^3.0.0", + "lodash.restparam": "^3.0.0", + "lodash.templatesettings": "^3.0.0" + } + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0" + } + }, + "lolex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.3.2.tgz", + "integrity": "sha1-fD2mL/yzDw9agKJWbKJORdigHzE=", + "dev": true + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", + "dev": true + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "merge": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", + "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "dev": true, + "requires": { + "brace-expansion": "^1.0.0" + } + }, + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "mocha": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.5.3.tgz", + "integrity": "sha1-FhvlvetJZ3HrmzV0UFC2IrWu/Fg=", + "dev": true, + "requires": { + "commander": "2.3.0", + "debug": "2.2.0", + "diff": "1.4.0", + "escape-string-regexp": "1.0.2", + "glob": "3.2.11", + "growl": "1.9.2", + "jade": "0.26.3", + "mkdirp": "0.5.1", + "supports-color": "1.2.0", + "to-iso-string": "0.0.2" + }, + "dependencies": { + "commander": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz", + "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=", + "dev": true + }, + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "0.7.1" + } + }, + "escape-string-regexp": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz", + "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE=", + "dev": true + }, + "glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", + "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", + "dev": true, + "requires": { + "inherits": "2", + "minimatch": "0.3" + } + }, + "minimatch": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", + "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", + "dev": true, + "requires": { + "lru-cache": "2", + "sigmund": "~1.0.0" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + }, + "supports-color": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.0.tgz", + "integrity": "sha1-/x7R5hFp0Gs88tWI4YixjYhH4X4=", + "dev": true + } + } + }, + "moment": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "dev": true, + "requires": { + "duplexer2": "0.0.2" + } + }, + "mustache": { + "version": "github:balihoo-anewman/mustache.js#54415e0f0843971735c94531eda2f2bbab4d7cd2", + "from": "github:balihoo-anewman/mustache.js" + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "natives": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.6.tgz", + "integrity": "sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==", + "dev": true + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.entries": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.0.tgz", + "integrity": "sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "optionator": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.5.0.tgz", + "integrity": "sha1-t1qJlaLUF98ltuTjhi9QqohlE2g=", + "dev": true, + "requires": { + "deep-is": "~0.1.2", + "fast-levenshtein": "~1.0.0", + "levn": "~0.2.5", + "prelude-ls": "~1.1.1", + "type-check": "~0.3.1", + "wordwrap": "~0.0.2" + } + }, + "orchestrator": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", + "dev": true, + "requires": { + "end-of-stream": "~0.1.5", + "sequencify": "~0.0.7", + "stream-consume": "~0.1.0" + } + }, + "ordered-read-streams": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", + "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "plur": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", + "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", + "dev": true, + "requires": { + "irregular-plurals": "^1.0.0" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + }, + "dependencies": { + "resolve": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.13.1.tgz", + "integrity": "sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "resolve": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-0.6.3.tgz", + "integrity": "sha1-3ZV5gufnNt699TtYpN2RdUV13UY=", + "dev": true + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "samsam": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz", + "integrity": "sha1-vsEf3IOp/aBjQBIQ5AF2wwJNFWc=", + "dev": true + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + }, + "sequencify": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", + "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", + "dev": true + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true + }, + "sinon": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-1.17.7.tgz", + "integrity": "sha1-RUKk9JugxFwF6y6d2dID4rjv4L8=", + "dev": true, + "requires": { + "formatio": "1.1.1", + "lolex": "1.3.2", + "samsam": "1.1.2", + "util": ">=0.10.3 <1" + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stream-consume": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz", + "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string.prototype.trimleft": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", + "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "string.prototype.trimright": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", + "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", + "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", + "dev": true, + "requires": { + "first-chunk-stream": "^1.0.0", + "is-utf8": "^0.2.0" + } + }, + "strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "temp": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.4.tgz", + "integrity": "sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg==", + "dev": true, + "requires": { + "rimraf": "~2.6.2" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "tildify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "to-iso-string": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/to-iso-string/-/to-iso-string-0.0.2.tgz", + "integrity": "sha1-TcGeZk38y+Jb2NtQiwDG2hWCVdE=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "uglify-js": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.2.tgz", + "integrity": "sha512-uhRwZcANNWVLrxLfNFEdltoPNhECUR3lc+UdJoG9CBpMcSnKyWA94tc3eAujB1GcMY5Uwq8ZMp4qWpxWYDQmaA==", + "dev": true, + "optional": true, + "requires": { + "commander": "~2.20.3", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } + } + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unique-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", + "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, + "util": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.1.tgz", + "integrity": "sha512-MREAtYOp+GTt9/+kwf00IYoHZyjM8VU4aVrkzUlejyqaIjd2GztVl5V9hGXKlvBKE3gENn/FMfHE5v6hElXGcQ==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "object.entries": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true, + "requires": { + "user-home": "^1.1.1" + } + }, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "dev": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", + "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", + "dev": true, + "requires": { + "defaults": "^1.0.0", + "glob-stream": "^3.1.5", + "glob-watcher": "^0.0.6", + "graceful-fs": "^3.0.0", + "mkdirp": "^0.5.0", + "strip-bom": "^1.0.0", + "through2": "^0.6.1", + "vinyl": "^0.4.0" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "requires": { + "clone": "^0.2.0", + "clone-stats": "^0.0.1" + } + } + } + }, + "vinyl-sourcemaps-apply": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", + "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", + "dev": true, + "requires": { + "source-map": "^0.5.1" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", + "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "dev": true, + "requires": { + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" + } + } + } +} diff --git a/src/modelField.coffee b/src/modelField.coffee index 7be5ea1..6fc6fef 100644 --- a/src/modelField.coffee +++ b/src/modelField.coffee @@ -150,7 +150,7 @@ module.exports = class ModelField extends ModelBase if (ref1 = @type) == 'multiselect' or ref1 == 'tree' bid = @hasValue(opt.value) if bid.bidValue - opt.bidAdj = if bid.bidValue.lastIndexOf('/') != -1 then bid.bidValue.split('/')[1] else @bidAdj + opt.bidAdj = if bid.bidValue.lastIndexOf('/') != -1 then bid.bidValue.split("/").pop() else @bidAdj results.push opt.selected = bid.selectStatus else results.push opt.selected = @hasValue(opt.value) diff --git a/src/modelField.js b/src/modelField.js index 86a2f72..bd42ee6 100644 --- a/src/modelField.js +++ b/src/modelField.js @@ -175,7 +175,7 @@ opt = ref[i]; if ((ref1 = this.type) === 'multiselect' || ref1 === 'tree') { bidValue = this.hasValue(opt.value); - bidAdj = bidValue.bidAdjValue.lastIndexOf('/') !== -1 ? bidValue.bidAdjValue.split('/')[1] : "+0%"; + bidAdj = bidValue.bidAdjValue.lastIndexOf('/') !== -1 ? bidValue.bidAdjValue.split('/').pop(): "+0%"; opt.selected = bidValue.selectStatus; results.push(opt.bidAdj = bidAdj !== -1 ? bidAdj : "0%"); } else { diff --git a/src/modelFieldTree.coffee b/src/modelFieldTree.coffee index d363f7f..8898410 100644 --- a/src/modelFieldTree.coffee +++ b/src/modelFieldTree.coffee @@ -8,8 +8,10 @@ module.exports = class ModelFieldTree extends ModelField option: (optionParams...) -> optionObject = @buildParamObject optionParams, ['path', 'value', 'selected', 'bidAdj', 'bidAdjFlag'] optionObject.value ?= optionObject.id - optionObject.value ?= optionObject.path.join ' > ' - optionObject.title = optionObject.path.join '>' #use path as the key since that is what is rendered. + if optionObject.value == null && Array.isArray(optionObject.path) + optionObject.value ?= optionObject.path.join ' > ' + optionObject.title = optionObject.path.join '>' #use path as the key since that is what is rendered. + super optionObject clear: (purgeDefaults=false) -> From f74bfe833734d8da2dee0e352d4cf291482f5aca Mon Sep 17 00:00:00 2001 From: Will Wilkins Date: Thu, 9 Jan 2020 13:41:13 -0600 Subject: [PATCH 15/23] HUB-2766 removed modelField.js,do gulp compile and go to lib folder to get latest compiled js copies --- src/modeField.js | 524 ---------------------------------------------- src/modelField.js | 479 ------------------------------------------ 2 files changed, 1003 deletions(-) delete mode 100644 src/modeField.js delete mode 100644 src/modelField.js diff --git a/src/modeField.js b/src/modeField.js deleted file mode 100644 index 721c9d4..0000000 --- a/src/modeField.js +++ /dev/null @@ -1,524 +0,0 @@ -var ModelBase, ModelField, ModelOption, Mustache, globals, jiff, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty, - slice = [].slice, - indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - -ModelBase = require('./modelBase'); - -ModelOption = require('./modelOption'); - -globals = require('./globals'); - -Mustache = require('mustache'); - -jiff = require('jiff'); - - -/* - A ModelField represents a model object that render as a DOM field - NOTE: The following field types are subclasses: image, tree, date - */ - -module.exports = ModelField = (function(superClass) { - extend(ModelField, superClass); - - function ModelField() { - return ModelField.__super__.constructor.apply(this, arguments); - } - - ModelField.prototype.modelClassName = 'ModelField'; - - ModelField.prototype.initialize = function() { - var ref, ref1; - this.setDefault('type', 'text'); - this.setDefault('options', []); - this.setDefault('value', (function() { - switch (this.get('type')) { - case 'multiselect': - return []; - case 'bool': - return false; - case 'info': - case 'button': - return void 0; - default: - return (this.get('defaultValue')) || ''; - } - }).call(this)); - this.setDefault('defaultValue', this.get('value')); - this.set('isValid', true); - this.setDefault('validators', []); - this.setDefault('onChangeHandlers', []); - this.setDefault('dynamicValue', null); - this.setDefault('template', null); - this.setDefault('autocomplete', null); - this.setDefault('beforeInput', function(val) { - return val; - }); - this.setDefault('beforeOutput', function(val) { - return val; - }); - ModelField.__super__.initialize.apply(this, arguments); - if ((ref = this.type) !== 'info' && ref !== 'text' && ref !== 'url' && ref !== 'email' && ref !== 'tel' && ref !== 'time' && ref !== 'date' && ref !== 'textarea' && ref !== 'bool' && ref !== 'tree' && ref !== 'color' && ref !== 'select' && ref !== 'multiselect' && ref !== 'image' && ref !== 'button' && ref !== 'number') { - return globals.handleError("Bad field type: " + this.type); - } - this.bindPropFunctions('dynamicValue'); - while ((Array.isArray(this.value)) && (this.type !== 'multiselect') && (this.type !== 'tree') && (this.type !== 'button')) { - this.value = this.value[0]; - } - if (typeof this.value === 'string' && (this.type === 'multiselect')) { - this.value = [this.value]; - } - if (this.type === 'bool' && typeof this.value !== 'bool') { - this.value = !!this.value; - } - this.makePropArray('validators'); - this.bindPropFunctions('validators'); - this.makePropArray('onChangeHandlers'); - this.bindPropFunctions('onChangeHandlers'); - if (this.optionsFrom != null) { - this.ensureSelectType(); - if ((this.optionsFrom.url == null) || (this.optionsFrom.parseResults == null)) { - return globals.handleError('When fetching options remotely, both url and parseResults properties are required'); - } - if (typeof ((ref1 = this.optionsFrom) != null ? ref1.url : void 0) === 'function') { - this.optionsFrom.url = this.bindPropFunction('optionsFrom.url', this.optionsFrom.url); - } - if (typeof this.optionsFrom.parseResults !== 'function') { - return globals.handleError('optionsFrom.parseResults must be a function'); - } - this.optionsFrom.parseResults = this.bindPropFunction('optionsFrom.parseResults', this.optionsFrom.parseResults); - } - this.updateOptionsSelected(); - this.on('change:value', function() { - var changeFunc, i, len, ref2; - ref2 = this.onChangeHandlers; - for (i = 0, len = ref2.length; i < len; i++) { - changeFunc = ref2[i]; - changeFunc(); - } - return this.updateOptionsSelected(); - }); - return this.on('change:type', function() { - if (this.type === 'multiselect') { - this.value = this.value.length > 0 ? [this.value] : []; - } else if (this.previousAttributes().type === 'multiselect') { - this.value = this.value.length > 0 ? this.value[0] : ''; - } - if (this.options.length > 0 && !this.isSelectType()) { - return this.type = 'select'; - } - }); - }; - - ModelField.prototype.getOptionsFrom = function() { - var ref, url; - if (this.optionsFrom == null) { - return; - } - url = typeof this.optionsFrom.url === 'function' ? this.optionsFrom.url() : this.optionsFrom.url; - if (this.prevUrl === url) { - return; - } - this.prevUrl = url; - return typeof window !== "undefined" && window !== null ? (ref = window.formbuilderproxy) != null ? ref.getFromProxy({ - url: url, - method: this.optionsFrom.method || 'get', - headerKey: this.optionsFrom.headerKey - }, (function(_this) { - return function(error, data) { - var i, len, mappedResults, opt, results; - if (error) { - return globals.handleError(globals.makeErrorMessage(_this, 'optionsFrom', error)); - } - mappedResults = _this.optionsFrom.parseResults(data); - if (!Array.isArray(mappedResults)) { - return globals.handleError('results of parseResults must be an array of option parameters'); - } - _this.options = []; - results = []; - for (i = 0, len = mappedResults.length; i < len; i++) { - opt = mappedResults[i]; - results.push(_this.option(opt)); - } - return results; - }; - })(this)) : void 0 : void 0; - }; - - ModelField.prototype.validityMessage = void 0; - - ModelField.prototype.field = function() { - var obj, ref; - obj = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return (ref = this.parent).field.apply(ref, obj); - }; - - ModelField.prototype.group = function() { - var obj, ref; - obj = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return (ref = this.parent).group.apply(ref, obj); - }; - - ModelField.prototype.option = function() { - var newOption, nextOpts, opt, optionObject, optionParams; - optionParams = 1 <= arguments.length ? slice.call(arguments, 0) : []; - optionObject = this.buildParamObject(optionParams, ['title', 'value', 'selected']); - this.ensureSelectType(); - nextOpts = (function() { - var i, len, ref, results; - ref = this.options; - results = []; - for (i = 0, len = ref.length; i < len; i++) { - opt = ref[i]; - if (opt.title !== optionObject.title) { - results.push(opt); - } - } - return results; - }).call(this); - newOption = new ModelOption(optionObject); - nextOpts.push(newOption); - this.options = nextOpts; - - //if new option has selected:true, set this field's value to that - //don't remove from parent value if not selected. Might be supplied by field value during creation. - // Pass in bid Adjustment from string - - - if (newOption.selected) { - console.log("option value:",newOption.value) - this.addOptionValue(newOption.value); - } - return this; - }; - - ModelField.prototype.postBuild = function() { - this.defaultValue = this.value; - return this.updateOptionsSelected(); - }; - - ModelField.prototype.updateOptionsSelected = function() { - var bidAdj, bidValue, i, len, opt, ref, ref1, result; - ref = this.options; - result = []; - for (i = 0, len = ref.length; i < len; i++) { - opt = ref[i]; - if ((ref1 = this.type) === 'multiselect' || ref1 === 'tree') { - const bidValue = this.hasValue(opt.value); - console.log("updateOptionsSelect bid Value", bidValue) - if (bidValue.bidAdjValue) { - bidAdj = bidValue.bidAdjValue.lastIndexOf('/') !== -1 ? bidValue.bidAdjValue.split('/')[1] : "+0%"; - opt.bidAdj = bidAdj - console.log("updateOptionsSelect bid Adj",bidAdj) - - } - result.push(opt.selected = bidValue.selectStatus); - } else { - result.push(opt.selected = this.hasValue(opt.value)); - } - } - return result; - }; - - - ModelField.prototype.isSelectType = function() { - var ref; - return (ref = this.type) === 'select' || ref === 'multiselect' || ref === 'image' || ref === 'tree'; - }; - - ModelField.prototype.ensureSelectType = function() { - if (!this.isSelectType()) { - return this.type = 'select'; - } - }; - - ModelField.prototype.child = function(value) { - var i, len, o, ref; - if (Array.isArray(value)) { - value = value.shift(); - } - ref = this.options; - for (i = 0, len = ref.length; i < len; i++) { - o = ref[i]; - if (o.value === value) { - return o; - } - } - }; - - ModelField.prototype.validator = function(func) { - this.validators.push(this.bindPropFunction('validator', func)); - this.trigger('change'); - return this; - }; - - ModelField.prototype.onChange = function(f) { - this.onChangeHandlers.push(this.bindPropFunction('onChange', f)); - this.trigger('change'); - return this; - }; - - ModelField.prototype.setDirty = function(id, whatChanged) { - var i, len, opt, ref; - ref = this.options; - for (i = 0, len = ref.length; i < len; i++) { - opt = ref[i]; - opt.setDirty(id, whatChanged); - } - return ModelField.__super__.setDirty.call(this, id, whatChanged); - }; - - ModelField.prototype.setClean = function(all) { - var i, len, opt, ref, results; - ModelField.__super__.setClean.apply(this, arguments); - if (all) { - ref = this.options; - results = []; - for (i = 0, len = ref.length; i < len; i++) { - opt = ref[i]; - results.push(opt.setClean(all)); - } - return results; - } - }; - - ModelField.prototype.recalculateRelativeProperties = function() { - var dirty, i, j, len, len1, opt, ref, ref1, results, validator, validityMessage, value; - dirty = this.dirty; - ModelField.__super__.recalculateRelativeProperties.apply(this, arguments); - if (this.shouldCallTriggerFunctionFor(dirty, 'isValid')) { - validityMessage = void 0; - if (this.template) { - validityMessage || (validityMessage = this.validate.template.call(this)); - } - if (this.type === 'number') { - validityMessage || (validityMessage = this.validate.number.call(this)); - } - if (!validityMessage) { - ref = this.validators; - for (i = 0, len = ref.length; i < len; i++) { - validator = ref[i]; - if (typeof validator === 'function') { - validityMessage = validator.call(this); - } - if (typeof validityMessage === 'function') { - return globals.handleError("A validator on field '" + this.name + "' returned a function"); - } - if (validityMessage) { - break; - } - } - } - this.validityMessage = validityMessage; - this.set({ - isValid: validityMessage == null - }); - } - if (this.template && this.shouldCallTriggerFunctionFor(dirty, 'value')) { - this.renderTemplate(); - } else { - if (typeof this.dynamicValue === 'function' && this.shouldCallTriggerFunctionFor(dirty, 'value')) { - value = this.dynamicValue(); - if (typeof value === 'function') { - return globals.handleError("dynamicValue on field '" + this.name + "' returned a function"); - } - this.set('value', value); - } - } - if (this.shouldCallTriggerFunctionFor(dirty, 'options')) { - this.getOptionsFrom(); - } - ref1 = this.options; - results = []; - for (j = 0, len1 = ref1.length; j < len1; j++) { - opt = ref1[j]; - results.push(opt.recalculateRelativeProperties()); - } - return results; - }; - - ModelField.prototype.addOptionValue = function(val, bidAdj) { - if (['multiselect','tree'].includes(this.type)) { - console.log("addOption val:",val, "bidAdj:", bidAdj) - if (!Array.isArray(this.value)) { - this.value = [this.value]; - } - const findMatch = this.value.findIndex(e => { - console.log ("comparing findMatch:", e, val) - return ( e == val || e.search(val) !== -1 || e.match(val) ) - }); - console.log("addOption value findMatch",findMatch) - if ((findMatch !== -1) && (bidAdj != null)) { - return this.value[findMatch] = (val + "/" + bidAdj); - } else { - if (bidAdj != null) { - console.log("no match found and PUSHING a bid") - return this.value.push((val + "/" + bidAdj)); - } else { - console.log("no match found and not pushing a bid") - return this.value.push(val); - } - } - } else { //single-select - return this.value = val; - } - }; - - ModelField.prototype.removeOptionValue = function(val) { - var ref; - if ((ref = this.type) === 'multiselect' || ref === 'tree') { - - return this.value = this.value.filter(function(v) { - return (v.search(val) == -1 || !v.match(val) ) - }); - - } else if (this.value === val) { - return this.value = ''; - } - }; - - ModelField.prototype.hasValue = function(val) { - if (['multiselect','tree'].includes(this.type)) { - const findMatch = this.value.findIndex(e => { - console.log ("comparing findMatch:", e, val) - - return ( e == val ||e.search(val) !== -1 || e.match(val) ) - }); - console.log("has value match:",findMatch) - if (findMatch !== -1) { - return {"bidAdjValue": this.value[findMatch], - "selectStatus": true} ; - } else { - return {"selectStatus": false }; - } - } else { - return val === this.value; - } - }; - - ModelField.prototype.buildOutputData = function(_, skipBeforeOutput) { - var out, value; - value = (function() { - switch (this.type) { - case 'number': - out = +this.value; - if (isNaN(out)) { - return null; - } else { - return out; - } - break; - case 'info': - case 'button': - return void 0; - case 'bool': - return !!this.value; - default: - return this.value; - } - }).call(this); - if (skipBeforeOutput) { - return value; - } else { - return this.beforeOutput(value); - } - }; - - ModelField.prototype.clear = function(purgeDefaults) { - if (purgeDefaults == null) { - purgeDefaults = false; - } - if (purgeDefaults) { - return this.value = (function() { - switch (this.type) { - case 'multiselect': - return []; - case 'bool': - return false; - default: - return ''; - } - }).call(this); - } else { - return this.value = this.defaultValue; - } - }; - - ModelField.prototype.ensureValueInOptions = function() { - var existingOption, i, j, k, len, len1, len2, o, ref, ref1, ref2, results, v; - if (!this.isSelectType()) { - return; - } - if (typeof this.value === 'string') { - ref = this.options; - for (i = 0, len = ref.length; i < len; i++) { - o = ref[i]; - if (o.value === this.value) { - existingOption = o; - } - } - if (!existingOption) { - return this.option(this.value, { - selected: true - }); - } - } else if (Array.isArray(this.value)) { - ref1 = this.value; - results = []; - for (j = 0, len1 = ref1.length; j < len1; j++) { - v = ref1[j]; - existingOption = null; - ref2 = this.options; - for (k = 0, len2 = ref2.length; k < len2; k++) { - o = ref2[k]; - if (o.value === v) { - existingOption = o; - } - } - if (!existingOption) { - results.push(this.option(v, { - selected: true - })); - } else { - results.push(void 0); - } - } - return results; - } - }; - - ModelField.prototype.applyData = function(inData, clear, purgeDefaults) { - if (clear == null) { - clear = false; - } - if (purgeDefaults == null) { - purgeDefaults = false; - } - if (clear) { - this.clear(purgeDefaults); - } - if (inData != null) { - this.value = this.beforeInput(jiff.clone(inData)); - return this.ensureValueInOptions(); - } - }; - - ModelField.prototype.renderTemplate = function() { - var error1, template; - if (typeof this.template === 'object') { - template = this.template.value; - } else { - template = this.parent.child(this.template).value; - } - try { - return this.value = Mustache.render(template, this.root.data); - } catch (error1) { - - } - }; - - return ModelField; - -})(ModelBase); diff --git a/src/modelField.js b/src/modelField.js deleted file mode 100644 index bd42ee6..0000000 --- a/src/modelField.js +++ /dev/null @@ -1,479 +0,0 @@ -// Generated by CoffeeScript 2.4.1 -(function() { - var ModelBase, ModelField, ModelOption, Mustache, globals, jiff; - - ModelBase = require('./modelBase'); - - ModelOption = require('./modelOption'); - - globals = require('./globals'); - - Mustache = require('mustache'); - - jiff = require('jiff'); - - module.exports = ModelField = (function() { - class ModelField extends ModelBase { - initialize() { - var ref, ref1; - this.setDefault('type', 'text'); - this.setDefault('options', []); - this.setDefault('value', (function() { - switch (this.get('type')) { - case 'multiselect': - return []; - case 'bool': - return false; - case 'info': - case 'button': - return void 0; - default: - return (this.get('defaultValue')) || ''; - } - }).call(this)); - this.setDefault('defaultValue', this.get('value')); - this.set('isValid', true); - this.setDefault('validators', []); - this.setDefault('onChangeHandlers', []); - this.setDefault('dynamicValue', null); - this.setDefault('template', null); - this.setDefault('autocomplete', null); - this.setDefault('beforeInput', function(val) { - return val; - }); - this.setDefault('beforeOutput', function(val) { - return val; - }); - if ((ref = this.type) !== 'info' && ref !== 'text' && ref !== 'url' && ref !== 'email' && ref !== 'tel' && ref !== 'time' && ref !== 'date' && ref !== 'textarea' && ref !== 'bool' && ref !== 'tree' && ref !== 'color' && ref !== 'select' && ref !== 'multiselect' && ref !== 'image' && ref !== 'button' && ref !== 'number') { - return globals.handleError(`Bad field type: ${this.type}`); - } - this.bindPropFunctions('dynamicValue'); - while ((Array.isArray(this.value)) && (this.type !== 'multiselect') && (this.type !== 'tree') && (this.type !== 'button')) { - this.value = this.value[0]; - } - if (typeof this.value === 'string' && (this.type === 'multiselect')) { - this.value = [this.value]; - } - if (this.type === 'bool' && typeof this.value !== 'bool') { - this.value = !!this.value; - } - this.makePropArray('validators'); - this.bindPropFunctions('validators'); - this.makePropArray('onChangeHandlers'); - this.bindPropFunctions('onChangeHandlers'); - if (this.optionsFrom != null) { - this.ensureSelectType(); - if ((this.optionsFrom.url == null) || (this.optionsFrom.parseResults == null)) { - return globals.handleError('When fetching options remotely, both url and parseResults properties are required'); - } - if (typeof ((ref1 = this.optionsFrom) != null ? ref1.url : void 0) === 'function') { - this.optionsFrom.url = this.bindPropFunction('optionsFrom.url', this.optionsFrom.url); - } - if (typeof this.optionsFrom.parseResults !== 'function') { - return globals.handleError('optionsFrom.parseResults must be a function'); - } - this.optionsFrom.parseResults = this.bindPropFunction('optionsFrom.parseResults', this.optionsFrom.parseResults); - } - this.updateOptionsSelected(); - this.on('change:value', function() { - var changeFunc, i, len, ref2; - ref2 = this.onChangeHandlers; - for (i = 0, len = ref2.length; i < len; i++) { - changeFunc = ref2[i]; - changeFunc(); - } - return this.updateOptionsSelected(); - }); - return this.on('change:type', function() { - if (this.type === 'multiselect') { - this.value = this.value.length > 0 ? [this.value] : []; - } else if (this.previousAttributes().type === 'multiselect') { - this.value = this.value.length > 0 ? this.value[0] : ''; - } - if (this.options.length > 0 && !this.isSelectType()) { - return this.type = 'select'; - } - }); - } - - getOptionsFrom() { - var ref, url; - if (this.optionsFrom == null) { - return; - } - url = typeof this.optionsFrom.url === 'function' ? this.optionsFrom.url() : this.optionsFrom.url; - if (this.prevUrl === url) { - return; - } - this.prevUrl = url; - return typeof window !== "undefined" && window !== null ? (ref = window.formbuilderproxy) != null ? ref.getFromProxy({ - url: url, - method: this.optionsFrom.method || 'get', - headerKey: this.optionsFrom.headerKey - }, (error, data) => { - var i, len, mappedResults, opt, results; - if (error) { - return globals.handleError(globals.makeErrorMessage(this, 'optionsFrom', error)); - } - mappedResults = this.optionsFrom.parseResults(data); - if (!Array.isArray(mappedResults)) { - return globals.handleError('results of parseResults must be an array of option parameters'); - } - this.options = []; - results = []; - for (i = 0, len = mappedResults.length; i < len; i++) { - opt = mappedResults[i]; - results.push(this.option(opt)); - } - return results; - }) : void 0 : void 0; - } - - field(...obj) { - return this.parent.field(...obj); - } - - group(...obj) { - return this.parent.group(...obj); - } - - option(...optionParams) { - var newOption, nextOpts, opt, optionObject; - optionObject = this.buildParamObject(optionParams, ['title', 'value', 'selected', 'bidAdj', 'bidAdjFlag']); - this.ensureSelectType(); - nextOpts = (function() { - var i, len, ref, results; - ref = this.options; - results = []; - for (i = 0, len = ref.length; i < len; i++) { - opt = ref[i]; - if (opt.title !== optionObject.title) { - results.push(opt); - } - } - return results; - }).call(this); - newOption = new ModelOption(optionObject); - nextOpts.push(newOption); - this.options = nextOpts; - if (newOption.selected) { - this.addOptionValue(newOption.value); - } - return this; - } - - postBuild() { - this.defaultValue = this.value; - return this.updateOptionsSelected(); - } - - updateOptionsSelected() { - var bidAdj, bidValue, i, len, opt, ref, ref1, results; - ref = this.options; - results = []; - for (i = 0, len = ref.length; i < len; i++) { - opt = ref[i]; - if ((ref1 = this.type) === 'multiselect' || ref1 === 'tree') { - bidValue = this.hasValue(opt.value); - bidAdj = bidValue.bidAdjValue.lastIndexOf('/') !== -1 ? bidValue.bidAdjValue.split('/').pop(): "+0%"; - opt.selected = bidValue.selectStatus; - results.push(opt.bidAdj = bidAdj !== -1 ? bidAdj : "0%"); - } else { - results.push(opt.selected = this.hasValue(opt.value)); - } - } - return results; - } - - isSelectType() { - var ref; - return (ref = this.type) === 'select' || ref === 'multiselect' || ref === 'image' || ref === 'tree'; - } - - ensureSelectType() { - if (!this.isSelectType()) { - return this.type = 'select'; - } - } - - child(value) { - var i, len, o, ref; - if (Array.isArray(value)) { - value = value.shift(); - } - ref = this.options; - for (i = 0, len = ref.length; i < len; i++) { - o = ref[i]; - if (o.value === value) { - return o; - } - } - } - - validator(func) { - this.validators.push(this.bindPropFunction('validator', func)); - this.trigger('change'); - return this; - } - - onChange(f) { - this.onChangeHandlers.push(this.bindPropFunction('onChange', f)); - this.trigger('change'); - return this; - } - - setDirty(id, whatChanged) { - var i, len, opt, ref; - ref = this.options; - for (i = 0, len = ref.length; i < len; i++) { - opt = ref[i]; - opt.setDirty(id, whatChanged); - } - return super.setDirty(id, whatChanged); - } - - setClean(all) { - var i, len, opt, ref, results; - if (all) { - ref = this.options; - results = []; - for (i = 0, len = ref.length; i < len; i++) { - opt = ref[i]; - results.push(opt.setClean(all)); - } - return results; - } - } - - recalculateRelativeProperties() { - var dirty, i, j, len, len1, opt, ref, ref1, results, validator, validityMessage, value; - dirty = this.dirty; - if (this.shouldCallTriggerFunctionFor(dirty, 'isValid')) { - validityMessage = void 0; - if (this.template) { - validityMessage || (validityMessage = this.validate.template.call(this)); - } - if (this.type === 'number') { - validityMessage || (validityMessage = this.validate.number.call(this)); - } - if (!validityMessage) { - ref = this.validators; - for (i = 0, len = ref.length; i < len; i++) { - validator = ref[i]; - if (typeof validator === 'function') { - validityMessage = validator.call(this); - } - if (typeof validityMessage === 'function') { - return globals.handleError(`A validator on field '${this.name}' returned a function`); - } - if (validityMessage) { - break; - } - } - } - this.validityMessage = validityMessage; - this.set({ - isValid: validityMessage == null - }); - } - if (this.template && this.shouldCallTriggerFunctionFor(dirty, 'value')) { - this.renderTemplate(); - } else { - if (typeof this.dynamicValue === 'function' && this.shouldCallTriggerFunctionFor(dirty, 'value')) { - value = this.dynamicValue(); - if (typeof value === 'function') { - return globals.handleError(`dynamicValue on field '${this.name}' returned a function`); - } - this.set('value', value); - } - } - if (this.shouldCallTriggerFunctionFor(dirty, 'options')) { - this.getOptionsFrom(); - } - ref1 = this.options; - results = []; - for (j = 0, len1 = ref1.length; j < len1; j++) { - opt = ref1[j]; - results.push(opt.recalculateRelativeProperties()); - } - return results; - } - - addOptionValue(val, bidAdj) { - var findMatch, ref; - if ((ref = this.type) === 'multiselect' || ref === 'tree') { - if (!Array.isArray(this.value)) { - this.value = [this.value]; - } - findMatch = this.value.findIndex(function(e) { - return val.search(e) !== -1; - }); - if (findMatch !== -1 && (bidAdj != null)) { - return this.value[findMatch] = val + "/" + bidAdj; - } else { - if (bidAdj != null) { - return this.value.push(val + "/" + bidAdj); - } else { - return this.value.push(val); - } - } - } else { - return this.value = val; - } - } - - removeOptionValue(val) { - var ref; - if ((ref = this.type) === 'multiselect' || ref === 'tree') { - return this.value = this.value.filter(function(v) { - return v.search(val) === -1; - }); - } else if (this.value === val) { - return this.value = ''; - } - } - - hasValue(val) { - var findMatch, ref; - if ((ref = this.type) === 'multiselect' || ref === 'tree') { - findMatch = this.value.findIndex(function(e) { - return e.search(val) !== -1; - }); - if (findMatch !== -1) { - return { - "bidAdjValue": this.value[findMatch], - "selectStatus": true - }; - } else { - return { - "selectStatus": false - }; - } - } else { - return val === this.value; - } - } - - buildOutputData(_, skipBeforeOutput) { - var out, value; - value = (function() { - switch (this.type) { - case 'number': - out = +this.value; - if (isNaN(out)) { - return null; - } else { - return out; - } - break; - case 'info': - case 'button': - return void 0; - case 'bool': - return !!this.value; - default: - return this.value; - } - }).call(this); - if (skipBeforeOutput) { - return value; - } else { - return this.beforeOutput(value); - } - } - - clear(purgeDefaults = false) { - if (purgeDefaults) { - return this.value = (function() { - switch (this.type) { - case 'multiselect': - return []; - case 'bool': - return false; - default: - return ''; - } - }).call(this); - } else { - return this.value = this.defaultValue; - } - } - - ensureValueInOptions() { - var existingOption, i, j, k, len, len1, len2, o, ref, ref1, ref2, results, v; - if (!this.isSelectType()) { - return; - } - if (typeof this.value === 'string') { - ref = this.options; - for (i = 0, len = ref.length; i < len; i++) { - o = ref[i]; - if (o.value === this.value) { - existingOption = o; - } - } - if (!existingOption) { - return this.option(this.value, { - selected: true - }); - } - } else if (Array.isArray(this.value)) { - ref1 = this.value; - results = []; - for (j = 0, len1 = ref1.length; j < len1; j++) { - v = ref1[j]; - existingOption = null; - ref2 = this.options; - for (k = 0, len2 = ref2.length; k < len2; k++) { - o = ref2[k]; - if (o.value === v) { - existingOption = o; - } - } - if (!existingOption) { - results.push(this.option(v, { - selected: true - })); - } else { - results.push(void 0); - } - } - return results; - } - } - - applyData(inData, clear = false, purgeDefaults = false) { - if (clear) { - this.clear(purgeDefaults); - } - if (inData != null) { - this.value = this.beforeInput(jiff.clone(inData)); - return this.ensureValueInOptions(); - } - } - - renderTemplate() { - var template; - if (typeof this.template === 'object') { - template = this.template.value; - } else { - template = this.parent.child(this.template).value; - } - try { - return this.value = Mustache.render(template, this.root.data); - } catch (error1) { - - } - } - - }; - - ModelField.prototype.modelClassName = 'ModelField'; - - ModelField.prototype.validityMessage = void 0; - - return ModelField; - - }).call(this); - -}).call(this); From 24279cc1deb7b15adb986625b6c77f00c62c42e8 Mon Sep 17 00:00:00 2001 From: Chad Norwood <34084628+balihoo-cnorwood@users.noreply.github.com> Date: Thu, 9 Jan 2020 15:25:31 -0600 Subject: [PATCH 16/23] changing to version 2.2.10 - save 2.3.0 when ready to merge and publish --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cb3692a..00aa667 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "balihoo-form-builder-model", - "version": "2.3.0", + "version": "2.2.10", "description": "Standalone code for building form builder models", "author": "Balihoo", "main": "./formbuilder.js", From 21c0ca92156b4c08c14ba0dc058c4e40c5d66d8d Mon Sep 17 00:00:00 2001 From: Chad Norwood Date: Thu, 9 Jan 2020 17:16:05 -0600 Subject: [PATCH 17/23] tweak version, update docs --- doc/Development.md | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/Development.md b/doc/Development.md index 258f3ff..1a140b2 100644 --- a/doc/Development.md +++ b/doc/Development.md @@ -4,15 +4,15 @@ ## Requirements -* npm - I use v1.4.3. Different versions can store packages in very different ways, so be aware of that if you use something different. -* node - 0.10.26. Note that the package in the apt repos is much older, and there are much newer ones available. Newer 10.x versions are probably ok. +* npm - tested with npm v6.8. Different versions can store packages in very different ways, so be aware of that if you use something different. +* node - 0.10.26, tested up to v12.14. Note that the package in the apt repos is much older, and there are much newer ones available. Newer 10.x versions are probably ok. * gulp - Part of the required packages, but is useful to have a global version too. `npm install -g gulp` ## Git and npm Use the standard git-branch-merge workflow to update master, then `npm publish` -This package is published to the public npm repositories, then referenced from other places by version there. So follow (semver)[http://semver.org/] policies with the package name, then npm publish when you have something working. +This package is published to the public npm repositories, then referenced from other places by version there. So follow [semver](http://semver.org/) policies with the package name, then npm publish when you have something working. Depending on the features added, you may need to then update the reference in these places: diff --git a/package.json b/package.json index 00aa667..ca67915 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "balihoo-form-builder-model", - "version": "2.2.10", + "version": "2.2.3", "description": "Standalone code for building form builder models", "author": "Balihoo", "main": "./formbuilder.js", From 3dbc6a14183d93c1f9abde67f2e8a2b054942923 Mon Sep 17 00:00:00 2001 From: Chad Norwood Date: Thu, 9 Jan 2020 17:18:30 -0600 Subject: [PATCH 18/23] versionhistory fix --- doc/VersionHistory.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/VersionHistory.md b/doc/VersionHistory.md index cf9cd65..7d9f169 100644 --- a/doc/VersionHistory.md +++ b/doc/VersionHistory.md @@ -1,7 +1,7 @@ # Version History -# 2.3.0 -- Add support for bid adjustments +# 2.2.x +- Testing support for bid adjustments # 2.2.1 - Fix a bug where applying a value to a multiselect field where some of those values aren't options would sometimes not add all new values as options. From aba8dd46f7d01155be63d530b4acafc5312dc3a5 Mon Sep 17 00:00:00 2001 From: Chad Norwood Date: Thu, 9 Jan 2020 17:26:20 -0600 Subject: [PATCH 19/23] remove package-lock.json - should not store this in repo - https://github.com/npm/npm/issues/20603 --- package-lock.json | 3308 --------------------------------------------- 1 file changed, 3308 deletions(-) delete mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index e1a3477..0000000 --- a/package-lock.json +++ /dev/null @@ -1,3308 +0,0 @@ -{ - "name": "balihoo-form-builder-model", - "version": "2.2.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", - "dev": true - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true, - "optional": true - }, - "ansi-gray": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", - "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "ansi-wrap": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", - "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", - "dev": true - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "args-js": { - "version": "0.10.12", - "resolved": "https://registry.npmjs.org/args-js/-/args-js-0.10.12.tgz", - "integrity": "sha1-oyeuqA5BByo9hfnCdNtlEeuV5Jw=", - "dev": true - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true - }, - "array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", - "dev": true - }, - "array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", - "dev": true - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "backbone": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.2.1.tgz", - "integrity": "sha1-1yGcXtSeXhMdv/ryXJbW0sw8oD4=", - "requires": { - "underscore": ">=1.7.0" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "beeper": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", - "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", - "dev": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "coffee-script": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.9.3.tgz", - "integrity": "sha1-WW5ug/z8tnxZZKtw1ES+/wrASsc=" - }, - "coffeelint": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/coffeelint/-/coffeelint-1.11.1.tgz", - "integrity": "sha1-hwCqHbpPAWsNuPkuYcyeFNSzgmQ=", - "dev": true, - "requires": { - "coffee-script": "^1.9.1", - "glob": "^4.0.0", - "ignore": "^2.2.15", - "optimist": "^0.6.1", - "resolve": "^0.6.3", - "strip-json-comments": "^1.0.2" - } - }, - "coffeelint-stylish": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/coffeelint-stylish/-/coffeelint-stylish-0.1.2.tgz", - "integrity": "sha1-q1AaZENeIxcG2hOidSeraVcAq8k=", - "dev": true, - "requires": { - "chalk": "^1.0.0", - "text-table": "^0.2.0" - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "optional": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "dateformat": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", - "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "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=", - "dev": true - }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "dev": true, - "requires": { - "clone": "^1.0.2" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "deprecated": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", - "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=", - "dev": true - }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", - "dev": true - }, - "diff": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", - "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=", - "dev": true - }, - "duplexer2": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", - "dev": true, - "requires": { - "readable-stream": "~1.1.9" - } - }, - "end-of-stream": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", - "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", - "dev": true, - "requires": { - "once": "~1.3.0" - }, - "dependencies": { - "once": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", - "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", - "dev": true, - "requires": { - "wrappy": "1" - } - } - } - }, - "es-abstract": { - "version": "1.16.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.3.tgz", - "integrity": "sha512-WtY7Fx5LiOnSYgF5eg/1T+GONaGmpvpPdCpSnYij+U2gDTL0UPfWrhDw7b2IYb+9NQJsYpCA0wOQvZfsd6YwRw==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "string.prototype.trimleft": "^2.1.0", - "string.prototype.trimright": "^2.1.0" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "escodegen": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.7.1.tgz", - "integrity": "sha1-MOz89mypjcZ80v0WKr626vqM5vw=", - "dev": true, - "requires": { - "esprima": "^1.2.2", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.5.0", - "source-map": "~0.2.0" - }, - "dependencies": { - "esprima": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.5.tgz", - "integrity": "sha1-CZNQL+r2aBODJXVvMPmlH+7sEek=", - "dev": true - }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "esprima": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.5.0.tgz", - "integrity": "sha1-84ekb9NEwbGjm6+MIL+0O20AWMw=", - "dev": true - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "fancy-log": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", - "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", - "dev": true, - "requires": { - "ansi-gray": "^0.1.1", - "color-support": "^1.1.3", - "parse-node-version": "^1.0.0", - "time-stamp": "^1.0.0" - } - }, - "fast-levenshtein": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz", - "integrity": "sha1-AXjc3uAjuSkFGTrwlZ6KdjnP3Lk=", - "dev": true - }, - "fileset": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fileset/-/fileset-0.2.1.tgz", - "integrity": "sha1-WI74lzxmI7KnbfRlEFaWuWqsgGc=", - "dev": true, - "requires": { - "glob": "5.x", - "minimatch": "2.x" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "find-index": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", - "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", - "dev": true - }, - "findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^3.1.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - } - }, - "fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - } - }, - "first-chunk-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", - "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", - "dev": true - }, - "flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", - "dev": true - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "formatio": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", - "integrity": "sha1-XtPM1jZVEJc4NGXZlhmRAOhhYek=", - "dev": true, - "requires": { - "samsam": "~1.1" - } - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "gaze": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", - "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", - "dev": true, - "requires": { - "globule": "~0.1.0" - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "glob": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", - "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^2.0.1", - "once": "^1.3.0" - } - }, - "glob-stream": { - "version": "3.1.18", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", - "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", - "dev": true, - "requires": { - "glob": "^4.3.1", - "glob2base": "^0.0.12", - "minimatch": "^2.0.1", - "ordered-read-streams": "^0.1.0", - "through2": "^0.6.1", - "unique-stream": "^1.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true, - "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - } - } - }, - "glob-watcher": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", - "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", - "dev": true, - "requires": { - "gaze": "^0.5.1" - } - }, - "glob2base": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", - "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", - "dev": true, - "requires": { - "find-index": "^0.1.1" - } - }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - } - }, - "globule": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", - "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", - "dev": true, - "requires": { - "glob": "~3.1.21", - "lodash": "~1.0.1", - "minimatch": "~0.2.11" - }, - "dependencies": { - "glob": { - "version": "3.1.21", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", - "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", - "dev": true, - "requires": { - "graceful-fs": "~1.2.0", - "inherits": "1", - "minimatch": "~0.2.11" - } - }, - "graceful-fs": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", - "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", - "dev": true - }, - "inherits": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", - "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", - "dev": true - }, - "minimatch": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", - "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", - "dev": true, - "requires": { - "lru-cache": "2", - "sigmund": "~1.0.0" - } - } - } - }, - "glogg": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", - "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, - "graceful-fs": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.12.tgz", - "integrity": "sha512-J55gaCS4iTTJfTXIxSVw3EMQckcqkpdRv3IR7gu6sq0+tbC363Zx6KH/SEwXASK9JRbhyZmVjJEVJIOxYsB3Qg==", - "dev": true, - "requires": { - "natives": "^1.1.3" - } - }, - "growl": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", - "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", - "dev": true - }, - "gulp": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", - "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", - "dev": true, - "requires": { - "archy": "^1.0.0", - "chalk": "^1.0.0", - "deprecated": "^0.0.1", - "gulp-util": "^3.0.0", - "interpret": "^1.0.0", - "liftoff": "^2.1.0", - "minimist": "^1.1.0", - "orchestrator": "^0.3.0", - "pretty-hrtime": "^1.0.0", - "semver": "^4.1.0", - "tildify": "^1.0.0", - "v8flags": "^2.0.2", - "vinyl-fs": "^0.3.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "gulp-coffee": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/gulp-coffee/-/gulp-coffee-2.3.5.tgz", - "integrity": "sha512-PbgPGZVyYFnBTYtfYkVN6jcK8Qsuh3BxycPzvu8y5lZroCw3/x1m25KeyEDX110KsVLDmJxoULjscR21VEN4wA==", - "dev": true, - "requires": { - "coffeescript": "^1.10.0", - "gulp-util": "^3.0.2", - "merge": "^1.2.0", - "through2": "^2.0.1", - "vinyl-sourcemaps-apply": "^0.2.1" - }, - "dependencies": { - "coffeescript": { - "version": "1.12.7", - "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.12.7.tgz", - "integrity": "sha512-pLXHFxQMPklVoEekowk8b3erNynC+DVJzChxS/LCBBgR6/8AJkHivkm//zbowcfc7BTCAjryuhx6gPqPRfsFoA==", - "dev": true - } - } - }, - "gulp-coffeelint": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/gulp-coffeelint/-/gulp-coffeelint-0.5.0.tgz", - "integrity": "sha1-O92qxFcahytrVsK49mSGdGu4o8I=", - "dev": true, - "requires": { - "args-js": "^0.10.5", - "coffeelint": "^1.4.0", - "coffeelint-stylish": "^0.1.1", - "gulp-util": "^3.0.0", - "through2": "^0.6.1" - }, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true, - "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - } - } - }, - "gulp-istanbul": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/gulp-istanbul/-/gulp-istanbul-0.5.0.tgz", - "integrity": "sha1-/Ce8jpLPQ+eQfF0EsiLZrYJLYV4=", - "dev": true, - "requires": { - "gulp-util": "^3.0.1", - "istanbul": "^0.3.2", - "lodash": "^2.4.1", - "through2": "^0.6.3" - }, - "dependencies": { - "lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true, - "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - } - } - }, - "gulp-mocha": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/gulp-mocha/-/gulp-mocha-2.2.0.tgz", - "integrity": "sha1-HOXrpLlLQMdDav7DxJgsjuqJQZI=", - "dev": true, - "requires": { - "gulp-util": "^3.0.0", - "mocha": "^2.0.1", - "plur": "^2.1.0", - "resolve-from": "^1.0.0", - "temp": "^0.8.3", - "through": "^2.3.4" - } - }, - "gulp-util": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", - "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", - "dev": true, - "requires": { - "array-differ": "^1.0.0", - "array-uniq": "^1.0.2", - "beeper": "^1.0.0", - "chalk": "^1.0.0", - "dateformat": "^2.0.0", - "fancy-log": "^1.1.0", - "gulplog": "^1.0.0", - "has-gulplog": "^0.1.0", - "lodash._reescape": "^3.0.0", - "lodash._reevaluate": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.template": "^3.0.0", - "minimist": "^1.1.0", - "multipipe": "^0.1.2", - "object-assign": "^3.0.0", - "replace-ext": "0.0.1", - "through2": "^2.0.0", - "vinyl": "^0.5.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", - "dev": true, - "requires": { - "glogg": "^1.0.0" - } - }, - "handlebars": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", - "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", - "dev": true, - "requires": { - "neo-async": "^2.6.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "has-gulplog": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", - "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "ignore": { - "version": "2.2.19", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-2.2.19.tgz", - "integrity": "sha1-TIRaYfflC0pBD2FWqqOLatleDI8=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "irregular-plurals": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.4.0.tgz", - "integrity": "sha1-LKmwM2UREYVUEvFr5dd8YqRYp2Y=", - "dev": true - }, - "is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, - "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", - "dev": true - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "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=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-generator-function": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.7.tgz", - "integrity": "sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw==", - "dev": true - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "^1.0.1" - } - }, - "is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dev": true, - "requires": { - "is-unc-path": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dev": true, - "requires": { - "unc-path-regex": "^0.1.2" - } - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "istanbul": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.3.22.tgz", - "integrity": "sha1-PhZNhQIf4ZyYXR8OfvDD4i0BLrY=", - "dev": true, - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.7.x", - "esprima": "2.5.x", - "fileset": "0.2.x", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - } - } - }, - "jade": { - "version": "0.26.3", - "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz", - "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=", - "dev": true, - "requires": { - "commander": "0.6.1", - "mkdirp": "0.3.0" - }, - "dependencies": { - "commander": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", - "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY=", - "dev": true - }, - "mkdirp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", - "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=", - "dev": true - } - } - }, - "jiff": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/jiff/-/jiff-0.7.2.tgz", - "integrity": "sha1-rdteeJkxtr2RGhFteXZHJKLUreI=" - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "dependencies": { - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - } - } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "levn": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz", - "integrity": "sha1-uo0znQykphDjo/FFucr0iAcVUFQ=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.0", - "type-check": "~0.3.1" - } - }, - "liftoff": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz", - "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", - "dev": true, - "requires": { - "extend": "^3.0.0", - "findup-sync": "^2.0.0", - "fined": "^1.0.1", - "flagged-respawn": "^1.0.0", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.0", - "rechoir": "^0.6.2", - "resolve": "^1.1.7" - }, - "dependencies": { - "resolve": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.13.1.tgz", - "integrity": "sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - } - } - }, - "lodash": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", - "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", - "dev": true - }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", - "dev": true - }, - "lodash._basetostring": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", - "dev": true - }, - "lodash._basevalues": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", - "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", - "dev": true - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", - "dev": true - }, - "lodash._reescape": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", - "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", - "dev": true - }, - "lodash._reevaluate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", - "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", - "dev": true - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash._root": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", - "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", - "dev": true - }, - "lodash.escape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", - "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", - "dev": true, - "requires": { - "lodash._root": "^3.0.0" - } - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", - "dev": true - }, - "lodash.template": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", - "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", - "dev": true, - "requires": { - "lodash._basecopy": "^3.0.0", - "lodash._basetostring": "^3.0.0", - "lodash._basevalues": "^3.0.0", - "lodash._isiterateecall": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0", - "lodash.keys": "^3.0.0", - "lodash.restparam": "^3.0.0", - "lodash.templatesettings": "^3.0.0" - } - }, - "lodash.templatesettings": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", - "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", - "dev": true, - "requires": { - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0" - } - }, - "lolex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.3.2.tgz", - "integrity": "sha1-fD2mL/yzDw9agKJWbKJORdigHzE=", - "dev": true - }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", - "dev": true - }, - "make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "merge": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", - "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "minimatch": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", - "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", - "dev": true, - "requires": { - "brace-expansion": "^1.0.0" - } - }, - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true - }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "mocha": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.5.3.tgz", - "integrity": "sha1-FhvlvetJZ3HrmzV0UFC2IrWu/Fg=", - "dev": true, - "requires": { - "commander": "2.3.0", - "debug": "2.2.0", - "diff": "1.4.0", - "escape-string-regexp": "1.0.2", - "glob": "3.2.11", - "growl": "1.9.2", - "jade": "0.26.3", - "mkdirp": "0.5.1", - "supports-color": "1.2.0", - "to-iso-string": "0.0.2" - }, - "dependencies": { - "commander": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz", - "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=", - "dev": true - }, - "debug": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", - "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", - "dev": true, - "requires": { - "ms": "0.7.1" - } - }, - "escape-string-regexp": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz", - "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE=", - "dev": true - }, - "glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", - "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", - "dev": true, - "requires": { - "inherits": "2", - "minimatch": "0.3" - } - }, - "minimatch": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", - "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", - "dev": true, - "requires": { - "lru-cache": "2", - "sigmund": "~1.0.0" - } - }, - "ms": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", - "dev": true - }, - "supports-color": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.0.tgz", - "integrity": "sha1-/x7R5hFp0Gs88tWI4YixjYhH4X4=", - "dev": true - } - } - }, - "moment": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", - "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "multipipe": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", - "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", - "dev": true, - "requires": { - "duplexer2": "0.0.2" - } - }, - "mustache": { - "version": "github:balihoo-anewman/mustache.js#54415e0f0843971735c94531eda2f2bbab4d7cd2", - "from": "github:balihoo-anewman/mustache.js" - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "natives": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.6.tgz", - "integrity": "sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==", - "dev": true - }, - "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", - "dev": true - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", - "dev": true, - "requires": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "object.entries": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.0.tgz", - "integrity": "sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.12.0", - "function-bind": "^1.1.1", - "has": "^1.0.3" - } - }, - "object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", - "dev": true, - "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "optionator": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.5.0.tgz", - "integrity": "sha1-t1qJlaLUF98ltuTjhi9QqohlE2g=", - "dev": true, - "requires": { - "deep-is": "~0.1.2", - "fast-levenshtein": "~1.0.0", - "levn": "~0.2.5", - "prelude-ls": "~1.1.1", - "type-check": "~0.3.1", - "wordwrap": "~0.0.2" - } - }, - "orchestrator": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", - "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", - "dev": true, - "requires": { - "end-of-stream": "~0.1.5", - "sequencify": "~0.0.7", - "stream-consume": "~0.1.0" - } - }, - "ordered-read-streams": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", - "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", - "dev": true, - "requires": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - } - }, - "parse-node-version": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", - "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", - "dev": true - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", - "dev": true, - "requires": { - "path-root-regex": "^0.1.0" - } - }, - "path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", - "dev": true - }, - "plur": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", - "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", - "dev": true, - "requires": { - "irregular-plurals": "^1.0.0" - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "pretty-hrtime": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", - "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - }, - "dependencies": { - "resolve": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.13.1.tgz", - "integrity": "sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - } - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", - "dev": true - }, - "resolve": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-0.6.3.tgz", - "integrity": "sha1-3ZV5gufnNt699TtYpN2RdUV13UY=", - "dev": true - }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - }, - "dependencies": { - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "samsam": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz", - "integrity": "sha1-vsEf3IOp/aBjQBIQ5AF2wwJNFWc=", - "dev": true - }, - "semver": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", - "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", - "dev": true - }, - "sequencify": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", - "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", - "dev": true - }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "sigmund": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", - "dev": true - }, - "sinon": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-1.17.7.tgz", - "integrity": "sha1-RUKk9JugxFwF6y6d2dID4rjv4L8=", - "dev": true, - "requires": { - "formatio": "1.1.1", - "lolex": "1.3.2", - "samsam": "1.1.2", - "util": ">=0.10.3 <1" - } - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "sparkles": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", - "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", - "dev": true - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "stream-consume": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz", - "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string.prototype.trimleft": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", - "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" - } - }, - "string.prototype.trimright": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", - "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", - "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", - "dev": true, - "requires": { - "first-chunk-stream": "^1.0.0", - "is-utf8": "^0.2.0" - } - }, - "strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", - "dev": true - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "temp": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.4.tgz", - "integrity": "sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg==", - "dev": true, - "requires": { - "rimraf": "~2.6.2" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "tildify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", - "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", - "dev": true, - "requires": { - "os-homedir": "^1.0.0" - } - }, - "time-stamp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", - "dev": true - }, - "to-iso-string": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/to-iso-string/-/to-iso-string-0.0.2.tgz", - "integrity": "sha1-TcGeZk38y+Jb2NtQiwDG2hWCVdE=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "uglify-js": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.2.tgz", - "integrity": "sha512-uhRwZcANNWVLrxLfNFEdltoPNhECUR3lc+UdJoG9CBpMcSnKyWA94tc3eAujB1GcMY5Uwq8ZMp4qWpxWYDQmaA==", - "dev": true, - "optional": true, - "requires": { - "commander": "~2.20.3", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } - }, - "unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", - "dev": true - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - } - }, - "unique-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", - "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - } - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "user-home": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", - "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", - "dev": true - }, - "util": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.1.tgz", - "integrity": "sha512-MREAtYOp+GTt9/+kwf00IYoHZyjM8VU4aVrkzUlejyqaIjd2GztVl5V9hGXKlvBKE3gENn/FMfHE5v6hElXGcQ==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "object.entries": "^1.1.0", - "safe-buffer": "^5.1.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "v8flags": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", - "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", - "dev": true, - "requires": { - "user-home": "^1.1.1" - } - }, - "vinyl": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", - "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", - "dev": true, - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - }, - "vinyl-fs": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", - "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", - "dev": true, - "requires": { - "defaults": "^1.0.0", - "glob-stream": "^3.1.5", - "glob-watcher": "^0.0.6", - "graceful-fs": "^3.0.0", - "mkdirp": "^0.5.0", - "strip-bom": "^1.0.0", - "through2": "^0.6.1", - "vinyl": "^0.4.0" - }, - "dependencies": { - "clone": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", - "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true, - "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - }, - "vinyl": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", - "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", - "dev": true, - "requires": { - "clone": "^0.2.0", - "clone-stats": "^0.0.1" - } - } - } - }, - "vinyl-sourcemaps-apply": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", - "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", - "dev": true, - "requires": { - "source-map": "^0.5.1" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "window-size": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", - "dev": true - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yargs": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", - "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", - "dev": true, - "requires": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" - } - } - } -} From 6caa42ad62cde1a3486d4c0b0950363f399d6bd5 Mon Sep 17 00:00:00 2001 From: Chad Norwood Date: Thu, 9 Jan 2020 18:23:06 -0600 Subject: [PATCH 20/23] fix build --- doc/Development.md | 4 ++-- package.json | 2 +- src/building.coffee | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/Development.md b/doc/Development.md index 1a140b2..db890a1 100644 --- a/doc/Development.md +++ b/doc/Development.md @@ -4,8 +4,8 @@ ## Requirements -* npm - tested with npm v6.8. Different versions can store packages in very different ways, so be aware of that if you use something different. -* node - 0.10.26, tested up to v12.14. Note that the package in the apt repos is much older, and there are much newer ones available. Newer 10.x versions are probably ok. +* npm - tested with npm v6.4.1 - Different versions can store packages in very different ways, so be aware of that if you use something different. +* node - 0.10.26, tested up to v10.14.1 - Note that the package in the apt repos is much older, and there are much newer ones available. Newer 10.x versions are probably ok. * gulp - Part of the required packages, but is useful to have a global version too. `npm install -g gulp` ## Git and npm diff --git a/package.json b/package.json index ca67915..6623087 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "main": "./formbuilder.js", "dependencies": { "backbone": "1.2.1", - "coffee-script": "1.9.3", + "coffeescript": "2.4.1", "jiff": "0.7.2", "moment": "^2.14.1", "mustache": "balihoo-anewman/mustache.js", diff --git a/src/building.coffee b/src/building.coffee index a438953..1c7dd5d 100644 --- a/src/building.coffee +++ b/src/building.coffee @@ -1,6 +1,6 @@ -CoffeeScript = require 'coffee-script' +CoffeeScript = require 'coffeescript' Mustache = require 'mustache' _ = require 'underscore' vm = require 'vm' From 26f7f98abee7ec021e3c89ebf1447a99c36d4ecf Mon Sep 17 00:00:00 2001 From: Chad Norwood Date: Thu, 9 Jan 2020 18:28:38 -0600 Subject: [PATCH 21/23] Temporarily adding lib/*.js to see if we can test without npm publish --- .gitignore | 1 - lib/building.js | 224 +++++++++++++++++ lib/formbuilder.js | 47 ++++ lib/globals.js | 35 +++ lib/modelBase.js | 417 ++++++++++++++++++++++++++++++++ lib/modelField.js | 528 +++++++++++++++++++++++++++++++++++++++++ lib/modelFieldDate.js | 44 ++++ lib/modelFieldImage.js | 101 ++++++++ lib/modelFieldTree.js | 45 ++++ lib/modelGroup.js | 409 +++++++++++++++++++++++++++++++ lib/modelOption.js | 31 +++ 11 files changed, 1881 insertions(+), 1 deletion(-) create mode 100644 lib/building.js create mode 100644 lib/formbuilder.js create mode 100644 lib/globals.js create mode 100644 lib/modelBase.js create mode 100644 lib/modelField.js create mode 100644 lib/modelFieldDate.js create mode 100644 lib/modelFieldImage.js create mode 100644 lib/modelFieldTree.js create mode 100644 lib/modelGroup.js create mode 100644 lib/modelOption.js diff --git a/.gitignore b/.gitignore index a6ed6fb..0436547 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,3 @@ .vscode/ node_modules/ *.tgz -lib \ No newline at end of file diff --git a/lib/building.js b/lib/building.js new file mode 100644 index 0000000..eed6631 --- /dev/null +++ b/lib/building.js @@ -0,0 +1,224 @@ +var CoffeeScript, ModelGroup, Mustache, _, globals, jiff, throttledAlert, vm; + +CoffeeScript = require('coffeescript'); + +Mustache = require('mustache'); + +_ = require('underscore'); + +vm = require('vm'); + +jiff = require('jiff'); + +globals = require('./globals'); + +ModelGroup = require('./modelGroup'); + +globals = require('./globals'); + +if (typeof alert !== "undefined" && alert !== null) { + throttledAlert = _.throttle(alert, 500); +} + + +/* + An array of functions that can test a built model. + Model code may add tests to this array during build. The tests themselves will not be run at the time, but are + made avaiable via this export so processes can run the tests when appropriate. + Tests may modify the model state, so the model should be rebuilt prior to running each test. + */ + +exports.modelTests = []; + +exports.fromCode = function(code, data, element, imports, isImport) { + var assert, emit, newRoot, test; + data = (function() { + switch (typeof data) { + case 'object': + return jiff.clone(data); + case 'string': + return JSON.parse(data); + default: + return {}; + } + })(); + globals.runtime = false; + exports.modelTests = []; + test = function(func) { + return exports.modelTests.push(func); + }; + assert = function(bool, message) { + if (message == null) { + message = "A model test has failed"; + } + if (!bool) { + return globals.handleError(message); + } + }; + emit = function(name, context) { + if (element && $) { + return element.trigger($.Event(name, context)); + } + }; + newRoot = new ModelGroup(); + newRoot.recalculating = false; + newRoot.recalculateCycle = function() {}; + (function(root) { + var field, group, sandbox, validate; + field = newRoot.field.bind(newRoot); + group = newRoot.group.bind(newRoot); + root = newRoot.root; + validate = newRoot.validate; + if (typeof window === "undefined" || window === null) { + sandbox = { + field: field, + group: group, + root: root, + validate: validate, + data: data, + imports: imports, + test: test, + assert: assert, + Mustache: Mustache, + emit: emit, + _: _, + console: { + log: function() {}, + error: function() {} + }, + print: function() {} + }; + return vm.runInNewContext('"use strict";' + code, sandbox); + } else { + return eval('"use strict";' + code); + } + })(null); + newRoot.postBuild(); + globals.runtime = true; + newRoot.applyData(data); + newRoot.getChanges = exports.getChanges.bind(null, newRoot); + newRoot.setDirty(newRoot.id, 'multiple'); + newRoot.recalculateCycle = function() { + var results; + results = []; + while (!this.recalculating && this.dirty) { + this.recalculating = true; + this.recalculateRelativeProperties(); + results.push(this.recalculating = false); + } + return results; + }; + newRoot.recalculateCycle(); + newRoot.on('change:isValid', function() { + if (!isImport) { + return emit('validate', { + isValid: newRoot.isValid + }); + } + }); + newRoot.on('recalculate', function() { + if (!isImport) { + return emit('change'); + } + }); + newRoot.trigger('change:isValid'); + newRoot.trigger('recalculate'); + newRoot.styles = false; + return newRoot; +}; + +exports.fromCoffee = function(code, data, element, imports, isImport) { + return exports.fromCode(CoffeeScript.compile(code), data, element, imports, isImport); +}; + +exports.fromPackage = function(pkg, data, element) { + var buildModelWithRecursiveImports; + buildModelWithRecursiveImports = function(p, el, isImport) { + var buildImport, builtImports, f, form; + form = ((function() { + var i, len, ref, results; + ref = p.forms; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + f = ref[i]; + if (f.formid === p.formid) { + results.push(f); + } + } + return results; + })())[0]; + if (form == null) { + return; + } + builtImports = {}; + buildImport = function(impObj) { + return builtImports[impObj.namespace] = buildModelWithRecursiveImports({ + formid: impObj.importformid, + data: data, + forms: p.forms + }, element, true); + }; + if (form.imports) { + form.imports.forEach(buildImport); + } + return exports.fromCoffee(form.model, data, el, builtImports, isImport); + }; + if (typeof pkg.formid === 'string') { + pkg.formid = parseInt(pkg.formid); + } + data = _.extend(pkg.data || {}, data || {}); + return buildModelWithRecursiveImports(pkg, element, false); +}; + +exports.getChanges = function(modelAfter, beforeData) { + var after, before, changedPath, changedPaths, changedPathsUniqObject, changedPathsUnique, changes, i, internalPatch, j, key, len, len1, modelBefore, outputPatch, p, path, val; + modelBefore = modelAfter.cloneModel(); + modelBefore.applyData(beforeData, true); + internalPatch = jiff.diff(modelBefore.buildOutputData(void 0, true), modelAfter.buildOutputData(void 0, true), { + invertible: false + }); + outputPatch = jiff.diff(modelBefore.buildOutputData(), modelAfter.buildOutputData(), { + invertible: false + }); + changedPaths = (function() { + var i, len, results; + results = []; + for (i = 0, len = internalPatch.length; i < len; i++) { + p = internalPatch[i]; + results.push(p.path.replace(/\/[0-9]+$/, '')); + } + return results; + })(); + changedPathsUniqObject = {}; + for (i = 0, len = changedPaths.length; i < len; i++) { + val = changedPaths[i]; + changedPathsUniqObject[val] = val; + } + changedPathsUnique = (function() { + var results; + results = []; + for (key in changedPathsUniqObject) { + results.push(key); + } + return results; + })(); + changes = []; + for (j = 0, len1 = changedPathsUnique.length; j < len1; j++) { + changedPath = changedPathsUnique[j]; + path = changedPath.slice(1); + before = modelBefore.child(path); + after = modelAfter.child(path); + if (!_.isEqual(before != null ? before.value : void 0, after != null ? after.value : void 0)) { + changes.push({ + name: changedPath, + title: after.title, + before: before.buildOutputData(void 0, true), + after: after.buildOutputData(void 0, true) + }); + } + } + return { + changes: changes, + patch: outputPatch + }; +}; diff --git a/lib/formbuilder.js b/lib/formbuilder.js new file mode 100644 index 0000000..664035c --- /dev/null +++ b/lib/formbuilder.js @@ -0,0 +1,47 @@ +var Backbone, ModelBase, building, globals; + +if (typeof window !== "undefined" && window !== null) { + window.formbuilder = exports; +} + +Backbone = require('backbone'); + +ModelBase = require('./modelBase'); + +building = require('./building'); + +globals = require('./globals'); + +exports.fromCode = building.fromCode; + +exports.fromCoffee = building.fromCoffee; + +exports.fromPackage = building.fromPackage; + +exports.getChanges = building.getChanges; + +exports.mergeData = globals.mergeData; + +exports.applyData = function(modelObject, inData, clear, purgeDefaults) { + return modelObject.applyData(inData, clear, purgeDefaults); +}; + +exports.buildOutputData = function(model) { + return model.buildOutputData(); +}; + +Object.defineProperty(exports, 'modelTests', { + get: function() { + return building.modelTests; + } +}); + +Object.defineProperty(exports, 'handleError', { + get: function() { + return globals.handleError; + }, + set: function(f) { + return globals.handleError = f; + }, + enumerable: true +}); diff --git a/lib/globals.js b/lib/globals.js new file mode 100644 index 0000000..d301218 --- /dev/null +++ b/lib/globals.js @@ -0,0 +1,35 @@ +module.exports = { + runtime: false, + handleError: function(err) { + if (!(err instanceof Error)) { + err = new Error(err); + } + throw err; + }, + makeErrorMessage: function(model, propName, err) { + var nameStack, node, stack; + stack = []; + node = model; + while (node.name != null) { + stack.push(node.name); + node = node.parent; + } + stack.reverse(); + nameStack = stack.join('.'); + return "The '" + propName + "' function belonging to the field named '" + nameStack + "' threw an error with the message '" + err.message + "'"; + }, + mergeData: function(a, b) { + var key, value; + if ((b != null ? b.constructor : void 0) === Object) { + for (key in b) { + value = b[key]; + if ((a[key] != null) && a[key].constructor === Object && (value != null ? value.constructor : void 0) === Object) { + module.exports.mergeData(a[key], value); + } else { + a[key] = value; + } + } + } + return a; + } +}; diff --git a/lib/modelBase.js b/lib/modelBase.js new file mode 100644 index 0000000..1a0ab51 --- /dev/null +++ b/lib/modelBase.js @@ -0,0 +1,417 @@ + +/* + * Attributes common to groups and fields. + */ +var Backbone, ModelBase, Mustache, _, getBoolOrFunctionResult, globals, moment, newid, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + +Backbone = require('backbone'); + +_ = require('underscore'); + +globals = require('./globals'); + +moment = require('moment'); + +Mustache = require('mustache'); + +newid = (function() { + var incId; + incId = 0; + return function() { + incId++; + return "fbid_" + incId; + }; +})(); + + +/* Some properties may be booleans or functions that return booleans + Use this function to determine final boolean value. + prop - the property to evaluate, which may be something primitive or a function + deflt - the value to return if the property is undefined + */ + +getBoolOrFunctionResult = function(prop, deflt) { + if (deflt == null) { + deflt = true; + } + if (typeof prop === 'function') { + return !!prop(); + } + if (prop === void 0) { + return deflt; + } + return !!prop; +}; + +module.exports = ModelBase = (function(superClass) { + extend(ModelBase, superClass); + + function ModelBase() { + return ModelBase.__super__.constructor.apply(this, arguments); + } + + ModelBase.prototype.modelClassName = 'ModelBase'; + + ModelBase.prototype.initialize = function() { + var fn, key, ref, val; + this.setDefault('visible', true); + this.set('isVisible', true); + this.setDefault('disabled', false); + this.set('isDisabled', false); + this.setDefault('onChangePropertiesHandlers', []); + this.set('id', newid()); + this.setDefault('parent', void 0); + this.setDefault('root', void 0); + this.setDefault('name', this.get('title')); + this.setDefault('title', this.get('name')); + ref = this.attributes; + fn = (function(_this) { + return function(key) { + return Object.defineProperty(_this, key, { + get: function() { + return this.get(key); + }, + set: function(newValue) { + if ((this.get(key)) !== newValue) { + return this.set(key, newValue); + } + } + }); + }; + })(this); + for (key in ref) { + val = ref[key]; + fn(key); + } + this.bindPropFunctions('visible'); + this.bindPropFunctions('disabled'); + this.makePropArray('onChangePropertiesHandlers'); + this.bindPropFunctions('onChangePropertiesHandlers'); + return this.on('change', function() { + var ch, changeFunc, i, len, ref1; + if (!globals.runtime) { + return; + } + ref1 = this.onChangePropertiesHandlers; + for (i = 0, len = ref1.length; i < len; i++) { + changeFunc = ref1[i]; + changeFunc(); + } + ch = this.changedAttributes(); + if (ch === false) { + ch = 'multiple'; + } + this.root.setDirty(this.id, ch); + return this.root.recalculateCycle(); + }); + }; + + ModelBase.prototype.postBuild = function() {}; + + ModelBase.prototype.setDefault = function(field, val) { + if (this.get(field) == null) { + return this.set(field, val); + } + }; + + ModelBase.prototype.text = function(message) { + return this.field(message, { + type: 'info' + }); + }; + + ModelBase.prototype.bindPropFunction = function(propName, func) { + var model; + model = this; + return function() { + var err, message; + try { + if (this instanceof ModelBase) { + model = this; + } + return func.apply(model, arguments); + } catch (error) { + err = error; + message = globals.makeErrorMessage(model, propName, err); + return globals.handleError(message); + } + }; + }; + + ModelBase.prototype.bindPropFunctions = function(propName) { + var i, index, ref, results; + if (Array.isArray(this[propName])) { + results = []; + for (index = i = 0, ref = this[propName].length; 0 <= ref ? i < ref : i > ref; index = 0 <= ref ? ++i : --i) { + results.push(this[propName][index] = this.bindPropFunction(propName, this[propName][index])); + } + return results; + } else if (typeof this[propName] === 'function') { + return this.set(propName, this.bindPropFunction(propName, this[propName]), { + silent: true + }); + } + }; + + ModelBase.prototype.makePropArray = function(propName) { + if (!Array.isArray(this.get(propName))) { + return this.set(propName, [this.get(propName)]); + } + }; + + ModelBase.prototype.buildParamObject = function(params, paramPositions) { + var i, key, len, param, paramIndex, paramObject, ref, val; + paramObject = {}; + paramIndex = 0; + for (i = 0, len = params.length; i < len; i++) { + param = params[i]; + if (((ref = typeof param) === 'string' || ref === 'number' || ref === 'boolean') || Array.isArray(param)) { + paramObject[paramPositions[paramIndex++]] = param; + } else if (Object.prototype.toString.call(param) === '[object Object]') { + for (key in param) { + val = param[key]; + paramObject[key] = val; + } + } + } + paramObject.parent = this; + paramObject.root = this.root; + return paramObject; + }; + + ModelBase.prototype.dirty = ''; + + ModelBase.prototype.setDirty = function(id, whatChanged) { + var ch, drt, keys; + ch = typeof whatChanged === 'string' ? whatChanged : (keys = Object.keys(whatChanged), keys.length === 1 ? id + ":" + keys[0] : 'multiple'); + drt = this.dirty === ch || this.dirty === '' ? ch : "multiple"; + return this.dirty = drt; + }; + + ModelBase.prototype.setClean = function() { + return this.dirty = ''; + }; + + ModelBase.prototype.shouldCallTriggerFunctionFor = function(dirty, attrName) { + return dirty && dirty !== (this.id + ":" + attrName); + }; + + ModelBase.prototype.recalculateRelativeProperties = function() { + var dirty; + dirty = this.dirty; + this.setClean(); + if (this.shouldCallTriggerFunctionFor(dirty, 'isVisible')) { + this.isVisible = getBoolOrFunctionResult(this.visible); + } + if (this.shouldCallTriggerFunctionFor(dirty, 'isDisabled')) { + this.isDisabled = getBoolOrFunctionResult(this.disabled, false); + } + return this.trigger('recalculate'); + }; + + ModelBase.prototype.onChangeProperties = function(f, trigger) { + if (trigger == null) { + trigger = true; + } + this.onChangePropertiesHandlers.push(this.bindPropFunction('onChangeProperties', f)); + if (trigger) { + this.trigger('change'); + } + return this; + }; + + ModelBase.prototype.validate = { + required: function(value) { + if (value == null) { + value = this.value || ''; + } + if (((function() { + switch (typeof value) { + case 'number': + case 'boolean': + return false; + case 'string': + return value.length === 0; + case 'object': + return Object.keys(value).length === 0; + default: + return true; + } + })())) { + return "This field is required"; + } + }, + minLength: function(n) { + return function(value) { + if (value == null) { + value = this.value || ''; + } + if (value.length < n) { + return "Must be at least " + n + " characters long"; + } + }; + }, + maxLength: function(n) { + return function(value) { + if (value == null) { + value = this.value || ''; + } + if (value.length > n) { + return "Can be at most " + n + " characters long"; + } + }; + }, + number: function(value) { + if (value == null) { + value = this.value || ''; + } + if (isNaN(+value)) { + return "Must be an integer or decimal number. (ex. 42 or 1.618)"; + } + }, + date: function(value, format) { + if (value == null) { + value = this.value || ''; + } + if (format == null) { + format = this.format; + } + if (value === '') { + return; + } + if (!moment(value, format, true).isValid()) { + return "Not a valid date or does not match the format " + format; + } + }, + email: function(value) { + if (value == null) { + value = this.value || ''; + } + if (!value.match(/^[a-z0-9!\#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!\#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/)) { + return "Must be a valid email"; + } + }, + url: function(value) { + if (value == null) { + value = this.value || ''; + } + if (!value.match(/^(([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)\#?(?:[\w]*))?$/)) { + return "Must be a URL"; + } + }, + dollars: function(value) { + if (value == null) { + value = this.value || ''; + } + if (!value.match(/^\$(\d+\.\d\d|\d+)$/)) { + return "Must be a dollar amount (ex. $3.99)"; + } + }, + minSelections: function(n) { + return function(value) { + if (value == null) { + value = this.value || ''; + } + if (value.length < n) { + return "Please select at least " + n + " options"; + } + }; + }, + maxSelections: function(n) { + return function(value) { + if (value == null) { + value = this.value || ''; + } + if (value.length > n) { + return "Please select at most " + n + " options"; + } + }; + }, + selectedIsVisible: function(field) { + var i, len, opt, ref; + if (field == null) { + field = this; + } + ref = field.options; + for (i = 0, len = ref.length; i < len; i++) { + opt = ref[i]; + if (opt.selected && !opt.isVisible) { + return "A selected option is not currently available. Please make a new choice from available options."; + } + } + }, + template: function() { + var e, template; + if (!this.template) { + return; + } + if (typeof this.template === 'object') { + template = this.template.value; + } else { + template = this.parent.child(this.template).value; + } + try { + Mustache.render(template, this.root.data); + } catch (error) { + e = error; + return "Template field does not contain valid Mustache"; + } + } + }; + + ModelBase.prototype.cloneModel = function(newRoot, constructor, excludeAttributes) { + var childClone, filteredAttributes, i, key, len, modelObj, myClone, newVal, ref, ref1, val; + if (newRoot == null) { + newRoot = this.root; + } + if (constructor == null) { + constructor = this.constructor; + } + if (excludeAttributes == null) { + excludeAttributes = []; + } + filteredAttributes = {}; + ref = this.attributes; + for (key in ref) { + val = ref[key]; + if (indexOf.call(excludeAttributes, key) < 0) { + filteredAttributes[key] = val; + } + } + myClone = new constructor(filteredAttributes); + ref1 = myClone.attributes; + for (key in ref1) { + val = ref1[key]; + if (key === 'root') { + myClone.set(key, newRoot); + } else if (val instanceof ModelBase && (key !== 'root' && key !== 'parent')) { + myClone.set(key, val.cloneModel(newRoot)); + } else if (Array.isArray(val)) { + newVal = []; + if (val[0] instanceof ModelBase && key !== 'value') { + for (i = 0, len = val.length; i < len; i++) { + modelObj = val[i]; + childClone = modelObj.cloneModel(newRoot); + if (childClone.parent === this) { + childClone.parent = myClone; + if (key === 'options' && childClone.selected) { + myClone.addOptionValue(childClone.value); + } + } + newVal.push(childClone); + } + } else { + newVal = _.clone(val); + } + myClone.set(key, newVal); + } + } + return myClone; + }; + + return ModelBase; + +})(Backbone.Model); diff --git a/lib/modelField.js b/lib/modelField.js new file mode 100644 index 0000000..c482d77 --- /dev/null +++ b/lib/modelField.js @@ -0,0 +1,528 @@ +var ModelBase, ModelField, ModelOption, Mustache, globals, jiff, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty, + slice = [].slice; + +ModelBase = require('./modelBase'); + +ModelOption = require('./modelOption'); + +globals = require('./globals'); + +Mustache = require('mustache'); + +jiff = require('jiff'); + + +/* + A ModelField represents a model object that render as a DOM field + NOTE: The following field types are subclasses: image, tree, date + */ + +module.exports = ModelField = (function(superClass) { + extend(ModelField, superClass); + + function ModelField() { + return ModelField.__super__.constructor.apply(this, arguments); + } + + ModelField.prototype.modelClassName = 'ModelField'; + + ModelField.prototype.initialize = function() { + var ref2, ref3; + this.setDefault('type', 'text'); + this.setDefault('options', []); + this.setDefault('value', (function() { + switch (this.get('type')) { + case 'multiselect': + return []; + case 'bool': + return false; + case 'info': + case 'button': + return void 0; + default: + return (this.get('defaultValue')) || ''; + } + }).call(this)); + this.setDefault('defaultValue', this.get('value')); + this.set('isValid', true); + this.setDefault('validators', []); + this.setDefault('onChangeHandlers', []); + this.setDefault('dynamicValue', null); + this.setDefault('template', null); + this.setDefault('autocomplete', null); + this.setDefault('beforeInput', function(val) { + return val; + }); + this.setDefault('beforeOutput', function(val) { + return val; + }); + ModelField.__super__.initialize.apply(this, arguments); + if ((ref2 = this.type) !== 'info' && ref2 !== 'text' && ref2 !== 'url' && ref2 !== 'email' && ref2 !== 'tel' && ref2 !== 'time' && ref2 !== 'date' && ref2 !== 'textarea' && ref2 !== 'bool' && ref2 !== 'tree' && ref2 !== 'color' && ref2 !== 'select' && ref2 !== 'multiselect' && ref2 !== 'image' && ref2 !== 'button' && ref2 !== 'number') { + return globals.handleError("Bad field type: " + this.type); + } + this.bindPropFunctions('dynamicValue'); + while ((Array.isArray(this.value)) && (this.type !== 'multiselect') && (this.type !== 'tree') && (this.type !== 'button')) { + this.value = this.value[0]; + } + if (typeof this.value === 'string' && (this.type === 'multiselect')) { + this.value = [this.value]; + } + if (this.type === 'bool' && typeof this.value !== 'bool') { + this.value = !!this.value; + } + this.makePropArray('validators'); + this.bindPropFunctions('validators'); + this.makePropArray('onChangeHandlers'); + this.bindPropFunctions('onChangeHandlers'); + if (this.optionsFrom != null) { + this.ensureSelectType(); + if ((this.optionsFrom.url == null) || (this.optionsFrom.parseResults == null)) { + return globals.handleError('When fetching options remotely, both url and parseResults properties are required'); + } + if (typeof ((ref3 = this.optionsFrom) != null ? ref3.url : void 0) === 'function') { + this.optionsFrom.url = this.bindPropFunction('optionsFrom.url', this.optionsFrom.url); + } + if (typeof this.optionsFrom.parseResults !== 'function') { + return globals.handleError('optionsFrom.parseResults must be a function'); + } + this.optionsFrom.parseResults = this.bindPropFunction('optionsFrom.parseResults', this.optionsFrom.parseResults); + } + this.updateOptionsSelected(); + this.on('change:value', function() { + var changeFunc, j, len1, ref4; + ref4 = this.onChangeHandlers; + for (j = 0, len1 = ref4.length; j < len1; j++) { + changeFunc = ref4[j]; + changeFunc(); + } + return this.updateOptionsSelected(); + }); + return this.on('change:type', function() { + if (this.type === 'multiselect') { + this.value = this.value.length > 0 ? [this.value] : []; + } else if (this.previousAttributes().type === 'multiselect') { + this.value = this.value.length > 0 ? this.value[0] : ''; + } + if (this.options.length > 0 && !this.isSelectType()) { + return this.type = 'select'; + } + }); + }; + + ModelField.prototype.getOptionsFrom = function() { + var ref2, url; + if (this.optionsFrom == null) { + return; + } + url = typeof this.optionsFrom.url === 'function' ? this.optionsFrom.url() : this.optionsFrom.url; + if (this.prevUrl === url) { + return; + } + this.prevUrl = url; + return typeof window !== "undefined" && window !== null ? (ref2 = window.formbuilderproxy) != null ? ref2.getFromProxy({ + url: url, + method: this.optionsFrom.method || 'get', + headerKey: this.optionsFrom.headerKey + }, (function(_this) { + return function(error, data) { + var j, len1, mappedResults, opt, results1; + if (error) { + return globals.handleError(globals.makeErrorMessage(_this, 'optionsFrom', error)); + } + mappedResults = _this.optionsFrom.parseResults(data); + if (!Array.isArray(mappedResults)) { + return globals.handleError('results of parseResults must be an array of option parameters'); + } + _this.options = []; + results1 = []; + for (j = 0, len1 = mappedResults.length; j < len1; j++) { + opt = mappedResults[j]; + results1.push(_this.option(opt)); + } + return results1; + }; + })(this)) : void 0 : void 0; + }; + + ModelField.prototype.validityMessage = void 0; + + ModelField.prototype.field = function() { + var obj, ref2; + obj = 1 <= arguments.length ? slice.call(arguments, 0) : []; + return (ref2 = this.parent).field.apply(ref2, obj); + }; + + ModelField.prototype.group = function() { + var obj, ref2; + obj = 1 <= arguments.length ? slice.call(arguments, 0) : []; + return (ref2 = this.parent).group.apply(ref2, obj); + }; + + ModelField.prototype.option = function() { + var newOption, nextOpts, opt, optionObject, optionParams; + optionParams = 1 <= arguments.length ? slice.call(arguments, 0) : []; + optionObject = this.buildParamObject(optionParams, ['title', 'value', 'selected', 'bidAdj', 'bidAdjFlag']); + this.ensureSelectType(); + nextOpts = (function() { + var j, len1, ref2, results1; + ref2 = this.options; + results1 = []; + for (j = 0, len1 = ref2.length; j < len1; j++) { + opt = ref2[j]; + if (opt.title !== optionObject.title) { + results1.push(opt); + } + } + return results1; + }).call(this); + newOption = new ModelOption(optionObject); + nextOpts.push(newOption); + this.options = nextOpts; + if (newOption.selected) { + this.addOptionValue(newOption.value); + } + return this; + }; + + ModelField.prototype.postBuild = function() { + this.defaultValue = this.value; + return this.updateOptionsSelected(); + }; + + ModelField.prototype.updateOptionsSelected = function() { + var bid, i, len, opt, ref, ref1, results; + ref = this.options; + results = []; + i = 0; + len = ref.length; + while (i < len) { + opt = ref[i]; + if ((ref1 = this.type) === 'multiselect' || ref1 === 'tree') { + bid = this.hasValue(opt.value); + if (bid.bidValue) { + opt.bidAdj = bid.bidValue.lastIndexOf('/') !== -1 ? bid.bidValue.split("/").pop() : this.bidAdj; + } + results.push(opt.selected = bid.selectStatus); + } else { + results.push(opt.selected = this.hasValue(opt.value)); + } + i++; + } + return results; + }; + + ModelField.prototype.isSelectType = function() { + var ref2; + return (ref2 = this.type) === 'select' || ref2 === 'multiselect' || ref2 === 'image' || ref2 === 'tree'; + }; + + ModelField.prototype.ensureSelectType = function() { + if (!this.isSelectType()) { + return this.type = 'select'; + } + }; + + ModelField.prototype.child = function(value) { + var j, len1, o, ref2; + if (Array.isArray(value)) { + value = value.shift(); + } + ref2 = this.options; + for (j = 0, len1 = ref2.length; j < len1; j++) { + o = ref2[j]; + if (o.value === value) { + return o; + } + } + }; + + ModelField.prototype.validator = function(func) { + this.validators.push(this.bindPropFunction('validator', func)); + this.trigger('change'); + return this; + }; + + ModelField.prototype.onChange = function(f) { + this.onChangeHandlers.push(this.bindPropFunction('onChange', f)); + this.trigger('change'); + return this; + }; + + ModelField.prototype.setDirty = function(id, whatChanged) { + var j, len1, opt, ref2; + ref2 = this.options; + for (j = 0, len1 = ref2.length; j < len1; j++) { + opt = ref2[j]; + opt.setDirty(id, whatChanged); + } + return ModelField.__super__.setDirty.call(this, id, whatChanged); + }; + + ModelField.prototype.setClean = function(all) { + var j, len1, opt, ref2, results1; + ModelField.__super__.setClean.apply(this, arguments); + if (all) { + ref2 = this.options; + results1 = []; + for (j = 0, len1 = ref2.length; j < len1; j++) { + opt = ref2[j]; + results1.push(opt.setClean(all)); + } + return results1; + } + }; + + ModelField.prototype.recalculateRelativeProperties = function() { + var dirty, j, k, len1, len2, opt, ref2, ref3, results1, validator, validityMessage, value; + dirty = this.dirty; + ModelField.__super__.recalculateRelativeProperties.apply(this, arguments); + if (this.shouldCallTriggerFunctionFor(dirty, 'isValid')) { + validityMessage = void 0; + if (this.template) { + validityMessage || (validityMessage = this.validate.template.call(this)); + } + if (this.type === 'number') { + validityMessage || (validityMessage = this.validate.number.call(this)); + } + if (!validityMessage) { + ref2 = this.validators; + for (j = 0, len1 = ref2.length; j < len1; j++) { + validator = ref2[j]; + if (typeof validator === 'function') { + validityMessage = validator.call(this); + } + if (typeof validityMessage === 'function') { + return globals.handleError("A validator on field '" + this.name + "' returned a function"); + } + if (validityMessage) { + break; + } + } + } + this.validityMessage = validityMessage; + this.set({ + isValid: validityMessage == null + }); + } + if (this.template && this.shouldCallTriggerFunctionFor(dirty, 'value')) { + this.renderTemplate(); + } else { + if (typeof this.dynamicValue === 'function' && this.shouldCallTriggerFunctionFor(dirty, 'value')) { + value = this.dynamicValue(); + if (typeof value === 'function') { + return globals.handleError("dynamicValue on field '" + this.name + "' returned a function"); + } + this.set('value', value); + } + } + if (this.shouldCallTriggerFunctionFor(dirty, 'options')) { + this.getOptionsFrom(); + } + ref3 = this.options; + results1 = []; + for (k = 0, len2 = ref3.length; k < len2; k++) { + opt = ref3[k]; + results1.push(opt.recalculateRelativeProperties()); + } + return results1; + }; + + ModelField.prototype.addOptionValue = function(val, bidAdj) { + var findMatch, ref; + findMatch = void 0; + ref = void 0; + if ((ref = this.type) === 'multiselect' || ref === 'tree') { + if (!Array.isArray(this.value)) { + this.value = [this.value]; + } + findMatch = this.value.findIndex(function(e) { + if (typeof e === 'string') { + return e.search(val) !== -1; + } else { + return e === val; + } + }); + if (findMatch !== -1) { + if (bidAdj) { + return this.value[findMatch] = val + '/' + bidAdj; + } + } else { + if (bidAdj) { + return this.value.push(val + '/' + bidAdj); + } else { + return this.value.push(val); + } + } + } else { + return this.value = val; + } + }; + + ModelField.prototype.removeOptionValue = function(val) { + var ref; + ref = void 0; + if ((ref = this.type) === 'multiselect' || ref === 'tree') { + return this.value = this.value.filter(function(e) { + if (typeof e === 'string') { + return e.search(val) === -1; + } else { + return e !== val; + } + }); + } else if (this.value === val) { + return this.value = ''; + } + }; + + ModelField.prototype.hasValue = function(val) { + var findMatch, ref; + findMatch = void 0; + ref = void 0; + if ((ref = this.type) === 'multiselect' || ref === 'tree') { + findMatch = this.value.findIndex(function(e) { + if (typeof e === 'string') { + return e.search(val) !== -1; + } else { + return e === val; + } + }); + if (findMatch !== -1) { + return { + 'bidValue': this.value[findMatch], + 'selectStatus': true + }; + } else { + return { + 'selectStatus': false + }; + } + } else { + return val === this.value; + } + }; + + ModelField.prototype.buildOutputData = function(_, skipBeforeOutput) { + var out, value; + value = (function() { + switch (this.type) { + case 'number': + out = +this.value; + if (isNaN(out)) { + return null; + } else { + return out; + } + break; + case 'info': + case 'button': + return void 0; + case 'bool': + return !!this.value; + default: + return this.value; + } + }).call(this); + if (skipBeforeOutput) { + return value; + } else { + return this.beforeOutput(value); + } + }; + + ModelField.prototype.clear = function(purgeDefaults) { + if (purgeDefaults == null) { + purgeDefaults = false; + } + if (purgeDefaults) { + return this.value = (function() { + switch (this.type) { + case 'multiselect': + return []; + case 'bool': + return false; + default: + return ''; + } + }).call(this); + } else { + return this.value = this.defaultValue; + } + }; + + ModelField.prototype.ensureValueInOptions = function() { + var existingOption, j, k, l, len1, len2, len3, o, ref2, ref3, ref4, results1, v; + if (!this.isSelectType()) { + return; + } + if (typeof this.value === 'string') { + ref2 = this.options; + for (j = 0, len1 = ref2.length; j < len1; j++) { + o = ref2[j]; + if (o.value === this.value) { + existingOption = o; + } + } + if (!existingOption) { + return this.option(this.value, { + selected: true + }); + } + } else if (Array.isArray(this.value)) { + ref3 = this.value; + results1 = []; + for (k = 0, len2 = ref3.length; k < len2; k++) { + v = ref3[k]; + existingOption = null; + ref4 = this.options; + for (l = 0, len3 = ref4.length; l < len3; l++) { + o = ref4[l]; + if (o.value === v) { + existingOption = o; + } + } + if (!existingOption) { + results1.push(this.option(v, { + selected: true + })); + } else { + results1.push(void 0); + } + } + return results1; + } + }; + + ModelField.prototype.applyData = function(inData, clear, purgeDefaults) { + if (clear == null) { + clear = false; + } + if (purgeDefaults == null) { + purgeDefaults = false; + } + if (clear) { + this.clear(purgeDefaults); + } + if (inData != null) { + return this.value = this.beforeInput(jiff.clone(inData)); + } + }; + + ModelField.prototype.renderTemplate = function() { + var template; + if (typeof this.template === 'object') { + template = this.template.value; + } else { + template = this.parent.child(this.template).value; + } + try { + return this.value = Mustache.render(template, this.root.data); + } catch (error1) { + + } + }; + + return ModelField; + +})(ModelBase); diff --git a/lib/modelFieldDate.js b/lib/modelFieldDate.js new file mode 100644 index 0000000..c8f3aa7 --- /dev/null +++ b/lib/modelFieldDate.js @@ -0,0 +1,44 @@ +var ModelField, ModelFieldDate, moment, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + +ModelField = require('./modelField'); + +moment = require('moment'); + +module.exports = ModelFieldDate = (function(superClass) { + extend(ModelFieldDate, superClass); + + function ModelFieldDate() { + return ModelFieldDate.__super__.constructor.apply(this, arguments); + } + + ModelFieldDate.prototype.initialize = function() { + this.setDefault('format', 'M/D/YYYY'); + ModelFieldDate.__super__.initialize.apply(this, arguments); + return this.validator(this.validate.date); + }; + + ModelFieldDate.prototype.dateToString = function(date, format) { + if (date == null) { + date = this.value; + } + if (format == null) { + format = this.format; + } + return moment(date).format(format); + }; + + ModelFieldDate.prototype.stringToDate = function(str, format) { + if (str == null) { + str = this.value; + } + if (format == null) { + format = this.format; + } + return moment(str, format, true).toDate(); + }; + + return ModelFieldDate; + +})(ModelField); diff --git a/lib/modelFieldImage.js b/lib/modelFieldImage.js new file mode 100644 index 0000000..89f9a7f --- /dev/null +++ b/lib/modelFieldImage.js @@ -0,0 +1,101 @@ +var ModelField, ModelFieldImage, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty, + slice = [].slice; + +ModelField = require('./modelField'); + +module.exports = ModelFieldImage = (function(superClass) { + extend(ModelFieldImage, superClass); + + function ModelFieldImage() { + return ModelFieldImage.__super__.constructor.apply(this, arguments); + } + + ModelFieldImage.prototype.initialize = function() { + this.setDefault('value', {}); + this.setDefault('allowUpload', false); + this.setDefault('imagesPerPage', 4); + this.setDefault('minWidth', 0); + this.setDefault('maxWidth', 0); + this.setDefault('minHeight', 0); + this.setDefault('maxHeight', 0); + this.setDefault('minSize', 0); + this.setDefault('maxSize', 0); + this.set('optionsChanged', false); + return ModelFieldImage.__super__.initialize.apply(this, arguments); + }; + + ModelFieldImage.prototype.option = function() { + var optionObject, optionParams; + optionParams = 1 <= arguments.length ? slice.call(arguments, 0) : []; + optionObject = this.buildParamObject(optionParams, ['fileID', 'fileUrl', 'thumbnailUrl']); + if (optionObject.fileID == null) { + optionObject.fileID = optionObject.fileUrl; + } + if (optionObject.thumbnailUrl == null) { + optionObject.thumbnailUrl = optionObject.fileUrl; + } + optionObject.value = { + fileID: optionObject.fileID, + fileUrl: optionObject.fileUrl, + thumbnailUrl: optionObject.thumbnailUrl + }; + if (optionObject.title == null) { + optionObject.title = optionObject.fileID; + } + this.optionsChanged = true; + return ModelFieldImage.__super__.option.call(this, optionObject); + }; + + ModelFieldImage.prototype.child = function(fileID) { + var i, len, o, ref; + if (Array.isArray(fileID)) { + fileID = fileID.shift(); + } + if (typeof fileID === 'object') { + fileID = fileID.fileID; + } + ref = this.options; + for (i = 0, len = ref.length; i < len; i++) { + o = ref[i]; + if (o.fileID === fileID) { + return o; + } + } + }; + + ModelFieldImage.prototype.removeOptionValue = function(val) { + if (this.value.fileID === val.fileID) { + return this.value = {}; + } + }; + + ModelFieldImage.prototype.hasValue = function(val) { + return val.fileID === this.value.fileID && val.thumbnailUrl === this.value.thumbnailUrl && val.fileUrl === this.value.fileUrl; + }; + + ModelFieldImage.prototype.clear = function(purgeDefaults) { + if (purgeDefaults == null) { + purgeDefaults = false; + } + return this.value = purgeDefaults ? {} : this.defaultValue; + }; + + ModelFieldImage.prototype.ensureValueInOptions = function() { + var existingOption, i, len, o, ref; + ref = this.options; + for (i = 0, len = ref.length; i < len; i++) { + o = ref[i]; + if (o.attributes.fileID === this.value.fileID) { + existingOption = o; + } + } + if (!existingOption) { + return this.option(this.value); + } + }; + + return ModelFieldImage; + +})(ModelField); diff --git a/lib/modelFieldTree.js b/lib/modelFieldTree.js new file mode 100644 index 0000000..68b1bee --- /dev/null +++ b/lib/modelFieldTree.js @@ -0,0 +1,45 @@ +var ModelField, ModelFieldTree, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty, + slice = [].slice; + +ModelField = require('./modelField'); + +module.exports = ModelFieldTree = (function(superClass) { + extend(ModelFieldTree, superClass); + + function ModelFieldTree() { + return ModelFieldTree.__super__.constructor.apply(this, arguments); + } + + ModelFieldTree.prototype.initialize = function() { + this.setDefault('value', []); + return ModelFieldTree.__super__.initialize.apply(this, arguments); + }; + + ModelFieldTree.prototype.option = function() { + var optionObject, optionParams; + optionParams = 1 <= arguments.length ? slice.call(arguments, 0) : []; + optionObject = this.buildParamObject(optionParams, ['path', 'value', 'selected', 'bidAdj', 'bidAdjFlag']); + if (optionObject.value == null) { + optionObject.value = optionObject.id; + } + if (optionObject.value === null && Array.isArray(optionObject.path)) { + if (optionObject.value == null) { + optionObject.value = optionObject.path.join(' > '); + } + optionObject.title = optionObject.path.join('>'); + } + return ModelFieldTree.__super__.option.call(this, optionObject); + }; + + ModelFieldTree.prototype.clear = function(purgeDefaults) { + if (purgeDefaults == null) { + purgeDefaults = false; + } + return this.value = purgeDefaults ? [] : this.defaultValue; + }; + + return ModelFieldTree; + +})(ModelField); diff --git a/lib/modelGroup.js b/lib/modelGroup.js new file mode 100644 index 0000000..ea30836 --- /dev/null +++ b/lib/modelGroup.js @@ -0,0 +1,409 @@ +var ModelBase, ModelField, ModelFieldDate, ModelFieldImage, ModelFieldTree, ModelGroup, RepeatingModelGroup, globals, jiff, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty, + slice = [].slice; + +ModelBase = require('./modelBase'); + +ModelFieldImage = require('./modelFieldImage'); + +ModelFieldTree = require('./modelFieldTree'); + +ModelFieldDate = require('./modelFieldDate'); + +ModelField = require('./modelField'); + +globals = require('./globals'); + +jiff = require('jiff'); + + +/* + A ModelGroup is a model object that can contain any number of other groups and fields + */ + +module.exports = ModelGroup = (function(superClass) { + extend(ModelGroup, superClass); + + function ModelGroup() { + return ModelGroup.__super__.constructor.apply(this, arguments); + } + + ModelGroup.prototype.modelClassName = 'ModelGroup'; + + ModelGroup.prototype.initialize = function() { + this.setDefault('children', []); + this.setDefault('root', this); + this.set('isValid', true); + this.set('data', null); + this.setDefault('beforeInput', function(val) { + return val; + }); + this.setDefault('beforeOutput', function(val) { + return val; + }); + return ModelGroup.__super__.initialize.apply(this, arguments); + }; + + ModelGroup.prototype.postBuild = function() { + var child, i, len, ref, results; + ref = this.children; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + results.push(child.postBuild()); + } + return results; + }; + + ModelGroup.prototype.field = function() { + var fieldObject, fieldParams, fld; + fieldParams = 1 <= arguments.length ? slice.call(arguments, 0) : []; + fieldObject = this.buildParamObject(fieldParams, ['title', 'name', 'type', 'value']); + if (fieldObject.disabled == null) { + fieldObject.disabled = this.disabled; + } + fld = (function() { + switch (fieldObject.type) { + case 'image': + return new ModelFieldImage(fieldObject); + case 'tree': + return new ModelFieldTree(fieldObject); + case 'date': + return new ModelFieldDate(fieldObject); + default: + return new ModelField(fieldObject); + } + })(); + this.children.push(fld); + this.trigger('change'); + return fld; + }; + + ModelGroup.prototype.group = function() { + var groupObject, groupParams, grp, key, ref, val; + groupParams = 1 <= arguments.length ? slice.call(arguments, 0) : []; + grp = {}; + if (((ref = groupParams[0].constructor) != null ? ref.name : void 0) === 'ModelGroup') { + grp = groupParams[0].cloneModel(this.root); + groupParams.shift(); + groupObject = this.buildParamObject(groupParams, ['title', 'name', 'description']); + if (groupObject.name == null) { + groupObject.name = groupObject.title; + } + if (groupObject.title == null) { + groupObject.title = groupObject.name; + } + for (key in groupObject) { + val = groupObject[key]; + grp.set(key, val); + } + } else { + groupObject = this.buildParamObject(groupParams, ['title', 'name', 'description']); + if (groupObject.disabled == null) { + groupObject.disabled = this.disabled; + } + if (groupObject.repeating) { + grp = new RepeatingModelGroup(groupObject); + } else { + grp = new ModelGroup(groupObject); + } + } + this.children.push(grp); + this.trigger('change'); + return grp; + }; + + ModelGroup.prototype.child = function(path) { + var c, child, i, len, name, ref; + if (!(Array.isArray(path))) { + path = path.split(/[.\/]/); + } + name = path.shift(); + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + c = ref[i]; + if (c.name === name) { + child = c; + } + } + if (path.length === 0) { + return child; + } else { + return child.child(path); + } + }; + + ModelGroup.prototype.setDirty = function(id, whatChanged) { + var child, i, len, ref; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + child.setDirty(id, whatChanged); + } + return ModelGroup.__super__.setDirty.call(this, id, whatChanged); + }; + + ModelGroup.prototype.setClean = function(all) { + var child, i, len, ref, results; + ModelGroup.__super__.setClean.apply(this, arguments); + if (all) { + ref = this.children; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + results.push(child.setClean(all)); + } + return results; + } + }; + + ModelGroup.prototype.recalculateRelativeProperties = function(collection) { + var child, dirty, i, len, newValid; + if (collection == null) { + collection = this.children; + } + dirty = this.dirty; + ModelGroup.__super__.recalculateRelativeProperties.apply(this, arguments); + newValid = true; + for (i = 0, len = collection.length; i < len; i++) { + child = collection[i]; + child.recalculateRelativeProperties(); + newValid && (newValid = child.isValid); + } + return this.isValid = newValid; + }; + + ModelGroup.prototype.buildOutputData = function(group, skipBeforeOutput) { + var obj; + if (group == null) { + group = this; + } + obj = {}; + group.children.forEach(function(child) { + var childData; + childData = child.buildOutputData(void 0, skipBeforeOutput); + if (childData !== void 0) { + return obj[child.name] = childData; + } + }); + if (skipBeforeOutput) { + return obj; + } else { + return group.beforeOutput(obj); + } + }; + + ModelGroup.prototype.buildOutputDataString = function() { + return JSON.stringify(this.buildOutputData()); + }; + + ModelGroup.prototype.clear = function(purgeDefaults) { + var child, i, j, key, len, len1, ref, ref1, results; + if (purgeDefaults == null) { + purgeDefaults = false; + } + if (this.data) { + ref = Object.keys(this.data); + for (i = 0, len = ref.length; i < len; i++) { + key = ref[i]; + delete this.data[key]; + } + } + ref1 = this.children; + results = []; + for (j = 0, len1 = ref1.length; j < len1; j++) { + child = ref1[j]; + results.push(child.clear(purgeDefaults)); + } + return results; + }; + + ModelGroup.prototype.applyData = function(inData, clear, purgeDefaults) { + var finalInData, key, ref, results, value; + if (clear == null) { + clear = false; + } + if (purgeDefaults == null) { + purgeDefaults = false; + } + if (clear) { + this.clear(purgeDefaults); + } + finalInData = this.beforeInput(jiff.clone(inData)); + + /* + This section preserves a link to the initially applied data object and merges subsequent applies on top + of it in-place. This is necessary for two reasons. + First, the scope of the running model code also references the applied data through the 'data' variable. + Every applied data must be available even though the runtime is not re-evaluated each time. + Second, templated fields use this data as the input to their Mustache evaluation. See @renderTemplate() + */ + if (this.data) { + globals.mergeData(this.data, inData); + this.trigger('change'); + } else { + this.data = inData; + } + results = []; + for (key in finalInData) { + value = finalInData[key]; + results.push((ref = this.child(key)) != null ? ref.applyData(value) : void 0); + } + return results; + }; + + return ModelGroup; + +})(ModelBase); + + +/* + Encapsulates a group of form objects that can be added or removed to the form together multiple times + */ + +RepeatingModelGroup = (function(superClass) { + extend(RepeatingModelGroup, superClass); + + function RepeatingModelGroup() { + return RepeatingModelGroup.__super__.constructor.apply(this, arguments); + } + + RepeatingModelGroup.prototype.modelClassName = 'RepeatingModelGroup'; + + RepeatingModelGroup.prototype.initialize = function() { + this.setDefault('defaultValue', this.get('value') || []); + this.set('value', []); + return RepeatingModelGroup.__super__.initialize.apply(this, arguments); + }; + + RepeatingModelGroup.prototype.postBuild = function() { + var c, i, len, ref; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + c = ref[i]; + c.postBuild(); + } + return this.clear(); + }; + + RepeatingModelGroup.prototype.setDirty = function(id, whatChanged) { + var i, len, ref, val; + ref = this.value; + for (i = 0, len = ref.length; i < len; i++) { + val = ref[i]; + val.setDirty(id, whatChanged); + } + return RepeatingModelGroup.__super__.setDirty.call(this, id, whatChanged); + }; + + RepeatingModelGroup.prototype.setClean = function(all) { + var i, len, ref, results, val; + RepeatingModelGroup.__super__.setClean.apply(this, arguments); + if (all) { + ref = this.value; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + val = ref[i]; + results.push(val.setClean(all)); + } + return results; + } + }; + + RepeatingModelGroup.prototype.recalculateRelativeProperties = function() { + return RepeatingModelGroup.__super__.recalculateRelativeProperties.call(this, this.value); + }; + + RepeatingModelGroup.prototype.buildOutputData = function(_, skipBeforeOutput) { + var tempOut; + tempOut = this.value.map(function(instance) { + return RepeatingModelGroup.__super__.buildOutputData.call(this, instance); + }); + if (skipBeforeOutput) { + return tempOut; + } else { + return this.beforeOutput(tempOut); + } + }; + + RepeatingModelGroup.prototype.clear = function(purgeDefaults) { + if (purgeDefaults == null) { + purgeDefaults = false; + } + this.value = []; + if (!purgeDefaults) { + if (this.defaultValue) { + return this.addEachSimpleObject(this.defaultValue); + } + } + }; + + RepeatingModelGroup.prototype.applyData = function(inData, clear, purgeDefaults) { + var finalInData; + if (clear == null) { + clear = false; + } + if (purgeDefaults == null) { + purgeDefaults = false; + } + finalInData = this.beforeInput(jiff.clone(inData)); + if (finalInData) { + this.value = []; + } else { + if (clear) { + this.clear(purgeDefaults); + } + } + return this.addEachSimpleObject(finalInData, clear, purgeDefaults); + }; + + RepeatingModelGroup.prototype.addEachSimpleObject = function(o, clear, purgeDefaults) { + var added, i, key, len, obj, results, value; + if (clear == null) { + clear = false; + } + if (purgeDefaults == null) { + purgeDefaults = false; + } + results = []; + for (i = 0, len = o.length; i < len; i++) { + obj = o[i]; + added = this.add(); + results.push((function() { + var ref, results1; + results1 = []; + for (key in obj) { + value = obj[key]; + results1.push((ref = added.child(key)) != null ? ref.applyData(value, clear, purgeDefaults) : void 0); + } + return results1; + })()); + } + return results; + }; + + RepeatingModelGroup.prototype.cloneModel = function(root, constructor) { + var clone, excludeAttributes; + excludeAttributes = (constructor != null ? constructor.name : void 0) === 'ModelGroup' ? ['value', 'beforeInput', 'beforeOutput', 'description'] : []; + clone = RepeatingModelGroup.__super__.cloneModel.call(this, root, constructor, excludeAttributes); + clone.title = ''; + return clone; + }; + + RepeatingModelGroup.prototype.add = function() { + var clone; + clone = this.cloneModel(this.root, ModelGroup); + this.value.push(clone); + this.trigger('change'); + return clone; + }; + + RepeatingModelGroup.prototype["delete"] = function(index) { + this.value.splice(index, 1); + return this.trigger('change'); + }; + + return RepeatingModelGroup; + +})(ModelGroup); diff --git a/lib/modelOption.js b/lib/modelOption.js new file mode 100644 index 0000000..17b689b --- /dev/null +++ b/lib/modelOption.js @@ -0,0 +1,31 @@ +var ModelBase, ModelOption, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + +ModelBase = require('./modelBase'); + +module.exports = ModelOption = (function(superClass) { + extend(ModelOption, superClass); + + function ModelOption() { + return ModelOption.__super__.constructor.apply(this, arguments); + } + + ModelOption.prototype.initialize = function() { + this.setDefault('value', this.get('title')); + this.setDefault('title', this.get('value')); + this.setDefault('selected', false); + this.setDefault('path', []); + ModelOption.__super__.initialize.apply(this, arguments); + return this.on('change:selected', function() { + if (this.selected) { + return this.parent.addOptionValue(this.value, this.bidAdj); + } else { + return this.parent.removeOptionValue(this.value); + } + }); + }; + + return ModelOption; + +})(ModelBase); From 1639ef3867be6c22efa3c815df3d656cd676f8cc Mon Sep 17 00:00:00 2001 From: Mitali Patel Date: Fri, 10 Sep 2021 17:42:31 +0530 Subject: [PATCH 22/23] Downgraded coffee script version due to conflict in form-builder --- package.json | 2 +- src/building.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6623087..ca67915 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "main": "./formbuilder.js", "dependencies": { "backbone": "1.2.1", - "coffeescript": "2.4.1", + "coffee-script": "1.9.3", "jiff": "0.7.2", "moment": "^2.14.1", "mustache": "balihoo-anewman/mustache.js", diff --git a/src/building.coffee b/src/building.coffee index 1c7dd5d..a438953 100644 --- a/src/building.coffee +++ b/src/building.coffee @@ -1,6 +1,6 @@ -CoffeeScript = require 'coffeescript' +CoffeeScript = require 'coffee-script' Mustache = require 'mustache' _ = require 'underscore' vm = require 'vm' From 997e44f632012d74615a7fd0e3a397ea3d6a7366 Mon Sep 17 00:00:00 2001 From: Mitali Patel Date: Fri, 10 Sep 2021 17:55:33 +0530 Subject: [PATCH 23/23] added libs temporary --- lib/building.js | 2 +- lib_old/building.js | 224 ++++++++++++++++ lib_old/formbuilder.js | 47 ++++ lib_old/globals.js | 35 +++ lib_old/modelBase.js | 417 +++++++++++++++++++++++++++++ lib_old/modelField.js | 528 +++++++++++++++++++++++++++++++++++++ lib_old/modelFieldDate.js | 44 ++++ lib_old/modelFieldImage.js | 101 +++++++ lib_old/modelFieldTree.js | 45 ++++ lib_old/modelGroup.js | 409 ++++++++++++++++++++++++++++ lib_old/modelOption.js | 31 +++ 11 files changed, 1882 insertions(+), 1 deletion(-) create mode 100644 lib_old/building.js create mode 100644 lib_old/formbuilder.js create mode 100644 lib_old/globals.js create mode 100644 lib_old/modelBase.js create mode 100644 lib_old/modelField.js create mode 100644 lib_old/modelFieldDate.js create mode 100644 lib_old/modelFieldImage.js create mode 100644 lib_old/modelFieldTree.js create mode 100644 lib_old/modelGroup.js create mode 100644 lib_old/modelOption.js diff --git a/lib/building.js b/lib/building.js index eed6631..807a3e5 100644 --- a/lib/building.js +++ b/lib/building.js @@ -1,6 +1,6 @@ var CoffeeScript, ModelGroup, Mustache, _, globals, jiff, throttledAlert, vm; -CoffeeScript = require('coffeescript'); +CoffeeScript = require('coffee-script'); Mustache = require('mustache'); diff --git a/lib_old/building.js b/lib_old/building.js new file mode 100644 index 0000000..807a3e5 --- /dev/null +++ b/lib_old/building.js @@ -0,0 +1,224 @@ +var CoffeeScript, ModelGroup, Mustache, _, globals, jiff, throttledAlert, vm; + +CoffeeScript = require('coffee-script'); + +Mustache = require('mustache'); + +_ = require('underscore'); + +vm = require('vm'); + +jiff = require('jiff'); + +globals = require('./globals'); + +ModelGroup = require('./modelGroup'); + +globals = require('./globals'); + +if (typeof alert !== "undefined" && alert !== null) { + throttledAlert = _.throttle(alert, 500); +} + + +/* + An array of functions that can test a built model. + Model code may add tests to this array during build. The tests themselves will not be run at the time, but are + made avaiable via this export so processes can run the tests when appropriate. + Tests may modify the model state, so the model should be rebuilt prior to running each test. + */ + +exports.modelTests = []; + +exports.fromCode = function(code, data, element, imports, isImport) { + var assert, emit, newRoot, test; + data = (function() { + switch (typeof data) { + case 'object': + return jiff.clone(data); + case 'string': + return JSON.parse(data); + default: + return {}; + } + })(); + globals.runtime = false; + exports.modelTests = []; + test = function(func) { + return exports.modelTests.push(func); + }; + assert = function(bool, message) { + if (message == null) { + message = "A model test has failed"; + } + if (!bool) { + return globals.handleError(message); + } + }; + emit = function(name, context) { + if (element && $) { + return element.trigger($.Event(name, context)); + } + }; + newRoot = new ModelGroup(); + newRoot.recalculating = false; + newRoot.recalculateCycle = function() {}; + (function(root) { + var field, group, sandbox, validate; + field = newRoot.field.bind(newRoot); + group = newRoot.group.bind(newRoot); + root = newRoot.root; + validate = newRoot.validate; + if (typeof window === "undefined" || window === null) { + sandbox = { + field: field, + group: group, + root: root, + validate: validate, + data: data, + imports: imports, + test: test, + assert: assert, + Mustache: Mustache, + emit: emit, + _: _, + console: { + log: function() {}, + error: function() {} + }, + print: function() {} + }; + return vm.runInNewContext('"use strict";' + code, sandbox); + } else { + return eval('"use strict";' + code); + } + })(null); + newRoot.postBuild(); + globals.runtime = true; + newRoot.applyData(data); + newRoot.getChanges = exports.getChanges.bind(null, newRoot); + newRoot.setDirty(newRoot.id, 'multiple'); + newRoot.recalculateCycle = function() { + var results; + results = []; + while (!this.recalculating && this.dirty) { + this.recalculating = true; + this.recalculateRelativeProperties(); + results.push(this.recalculating = false); + } + return results; + }; + newRoot.recalculateCycle(); + newRoot.on('change:isValid', function() { + if (!isImport) { + return emit('validate', { + isValid: newRoot.isValid + }); + } + }); + newRoot.on('recalculate', function() { + if (!isImport) { + return emit('change'); + } + }); + newRoot.trigger('change:isValid'); + newRoot.trigger('recalculate'); + newRoot.styles = false; + return newRoot; +}; + +exports.fromCoffee = function(code, data, element, imports, isImport) { + return exports.fromCode(CoffeeScript.compile(code), data, element, imports, isImport); +}; + +exports.fromPackage = function(pkg, data, element) { + var buildModelWithRecursiveImports; + buildModelWithRecursiveImports = function(p, el, isImport) { + var buildImport, builtImports, f, form; + form = ((function() { + var i, len, ref, results; + ref = p.forms; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + f = ref[i]; + if (f.formid === p.formid) { + results.push(f); + } + } + return results; + })())[0]; + if (form == null) { + return; + } + builtImports = {}; + buildImport = function(impObj) { + return builtImports[impObj.namespace] = buildModelWithRecursiveImports({ + formid: impObj.importformid, + data: data, + forms: p.forms + }, element, true); + }; + if (form.imports) { + form.imports.forEach(buildImport); + } + return exports.fromCoffee(form.model, data, el, builtImports, isImport); + }; + if (typeof pkg.formid === 'string') { + pkg.formid = parseInt(pkg.formid); + } + data = _.extend(pkg.data || {}, data || {}); + return buildModelWithRecursiveImports(pkg, element, false); +}; + +exports.getChanges = function(modelAfter, beforeData) { + var after, before, changedPath, changedPaths, changedPathsUniqObject, changedPathsUnique, changes, i, internalPatch, j, key, len, len1, modelBefore, outputPatch, p, path, val; + modelBefore = modelAfter.cloneModel(); + modelBefore.applyData(beforeData, true); + internalPatch = jiff.diff(modelBefore.buildOutputData(void 0, true), modelAfter.buildOutputData(void 0, true), { + invertible: false + }); + outputPatch = jiff.diff(modelBefore.buildOutputData(), modelAfter.buildOutputData(), { + invertible: false + }); + changedPaths = (function() { + var i, len, results; + results = []; + for (i = 0, len = internalPatch.length; i < len; i++) { + p = internalPatch[i]; + results.push(p.path.replace(/\/[0-9]+$/, '')); + } + return results; + })(); + changedPathsUniqObject = {}; + for (i = 0, len = changedPaths.length; i < len; i++) { + val = changedPaths[i]; + changedPathsUniqObject[val] = val; + } + changedPathsUnique = (function() { + var results; + results = []; + for (key in changedPathsUniqObject) { + results.push(key); + } + return results; + })(); + changes = []; + for (j = 0, len1 = changedPathsUnique.length; j < len1; j++) { + changedPath = changedPathsUnique[j]; + path = changedPath.slice(1); + before = modelBefore.child(path); + after = modelAfter.child(path); + if (!_.isEqual(before != null ? before.value : void 0, after != null ? after.value : void 0)) { + changes.push({ + name: changedPath, + title: after.title, + before: before.buildOutputData(void 0, true), + after: after.buildOutputData(void 0, true) + }); + } + } + return { + changes: changes, + patch: outputPatch + }; +}; diff --git a/lib_old/formbuilder.js b/lib_old/formbuilder.js new file mode 100644 index 0000000..664035c --- /dev/null +++ b/lib_old/formbuilder.js @@ -0,0 +1,47 @@ +var Backbone, ModelBase, building, globals; + +if (typeof window !== "undefined" && window !== null) { + window.formbuilder = exports; +} + +Backbone = require('backbone'); + +ModelBase = require('./modelBase'); + +building = require('./building'); + +globals = require('./globals'); + +exports.fromCode = building.fromCode; + +exports.fromCoffee = building.fromCoffee; + +exports.fromPackage = building.fromPackage; + +exports.getChanges = building.getChanges; + +exports.mergeData = globals.mergeData; + +exports.applyData = function(modelObject, inData, clear, purgeDefaults) { + return modelObject.applyData(inData, clear, purgeDefaults); +}; + +exports.buildOutputData = function(model) { + return model.buildOutputData(); +}; + +Object.defineProperty(exports, 'modelTests', { + get: function() { + return building.modelTests; + } +}); + +Object.defineProperty(exports, 'handleError', { + get: function() { + return globals.handleError; + }, + set: function(f) { + return globals.handleError = f; + }, + enumerable: true +}); diff --git a/lib_old/globals.js b/lib_old/globals.js new file mode 100644 index 0000000..d301218 --- /dev/null +++ b/lib_old/globals.js @@ -0,0 +1,35 @@ +module.exports = { + runtime: false, + handleError: function(err) { + if (!(err instanceof Error)) { + err = new Error(err); + } + throw err; + }, + makeErrorMessage: function(model, propName, err) { + var nameStack, node, stack; + stack = []; + node = model; + while (node.name != null) { + stack.push(node.name); + node = node.parent; + } + stack.reverse(); + nameStack = stack.join('.'); + return "The '" + propName + "' function belonging to the field named '" + nameStack + "' threw an error with the message '" + err.message + "'"; + }, + mergeData: function(a, b) { + var key, value; + if ((b != null ? b.constructor : void 0) === Object) { + for (key in b) { + value = b[key]; + if ((a[key] != null) && a[key].constructor === Object && (value != null ? value.constructor : void 0) === Object) { + module.exports.mergeData(a[key], value); + } else { + a[key] = value; + } + } + } + return a; + } +}; diff --git a/lib_old/modelBase.js b/lib_old/modelBase.js new file mode 100644 index 0000000..1a0ab51 --- /dev/null +++ b/lib_old/modelBase.js @@ -0,0 +1,417 @@ + +/* + * Attributes common to groups and fields. + */ +var Backbone, ModelBase, Mustache, _, getBoolOrFunctionResult, globals, moment, newid, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + +Backbone = require('backbone'); + +_ = require('underscore'); + +globals = require('./globals'); + +moment = require('moment'); + +Mustache = require('mustache'); + +newid = (function() { + var incId; + incId = 0; + return function() { + incId++; + return "fbid_" + incId; + }; +})(); + + +/* Some properties may be booleans or functions that return booleans + Use this function to determine final boolean value. + prop - the property to evaluate, which may be something primitive or a function + deflt - the value to return if the property is undefined + */ + +getBoolOrFunctionResult = function(prop, deflt) { + if (deflt == null) { + deflt = true; + } + if (typeof prop === 'function') { + return !!prop(); + } + if (prop === void 0) { + return deflt; + } + return !!prop; +}; + +module.exports = ModelBase = (function(superClass) { + extend(ModelBase, superClass); + + function ModelBase() { + return ModelBase.__super__.constructor.apply(this, arguments); + } + + ModelBase.prototype.modelClassName = 'ModelBase'; + + ModelBase.prototype.initialize = function() { + var fn, key, ref, val; + this.setDefault('visible', true); + this.set('isVisible', true); + this.setDefault('disabled', false); + this.set('isDisabled', false); + this.setDefault('onChangePropertiesHandlers', []); + this.set('id', newid()); + this.setDefault('parent', void 0); + this.setDefault('root', void 0); + this.setDefault('name', this.get('title')); + this.setDefault('title', this.get('name')); + ref = this.attributes; + fn = (function(_this) { + return function(key) { + return Object.defineProperty(_this, key, { + get: function() { + return this.get(key); + }, + set: function(newValue) { + if ((this.get(key)) !== newValue) { + return this.set(key, newValue); + } + } + }); + }; + })(this); + for (key in ref) { + val = ref[key]; + fn(key); + } + this.bindPropFunctions('visible'); + this.bindPropFunctions('disabled'); + this.makePropArray('onChangePropertiesHandlers'); + this.bindPropFunctions('onChangePropertiesHandlers'); + return this.on('change', function() { + var ch, changeFunc, i, len, ref1; + if (!globals.runtime) { + return; + } + ref1 = this.onChangePropertiesHandlers; + for (i = 0, len = ref1.length; i < len; i++) { + changeFunc = ref1[i]; + changeFunc(); + } + ch = this.changedAttributes(); + if (ch === false) { + ch = 'multiple'; + } + this.root.setDirty(this.id, ch); + return this.root.recalculateCycle(); + }); + }; + + ModelBase.prototype.postBuild = function() {}; + + ModelBase.prototype.setDefault = function(field, val) { + if (this.get(field) == null) { + return this.set(field, val); + } + }; + + ModelBase.prototype.text = function(message) { + return this.field(message, { + type: 'info' + }); + }; + + ModelBase.prototype.bindPropFunction = function(propName, func) { + var model; + model = this; + return function() { + var err, message; + try { + if (this instanceof ModelBase) { + model = this; + } + return func.apply(model, arguments); + } catch (error) { + err = error; + message = globals.makeErrorMessage(model, propName, err); + return globals.handleError(message); + } + }; + }; + + ModelBase.prototype.bindPropFunctions = function(propName) { + var i, index, ref, results; + if (Array.isArray(this[propName])) { + results = []; + for (index = i = 0, ref = this[propName].length; 0 <= ref ? i < ref : i > ref; index = 0 <= ref ? ++i : --i) { + results.push(this[propName][index] = this.bindPropFunction(propName, this[propName][index])); + } + return results; + } else if (typeof this[propName] === 'function') { + return this.set(propName, this.bindPropFunction(propName, this[propName]), { + silent: true + }); + } + }; + + ModelBase.prototype.makePropArray = function(propName) { + if (!Array.isArray(this.get(propName))) { + return this.set(propName, [this.get(propName)]); + } + }; + + ModelBase.prototype.buildParamObject = function(params, paramPositions) { + var i, key, len, param, paramIndex, paramObject, ref, val; + paramObject = {}; + paramIndex = 0; + for (i = 0, len = params.length; i < len; i++) { + param = params[i]; + if (((ref = typeof param) === 'string' || ref === 'number' || ref === 'boolean') || Array.isArray(param)) { + paramObject[paramPositions[paramIndex++]] = param; + } else if (Object.prototype.toString.call(param) === '[object Object]') { + for (key in param) { + val = param[key]; + paramObject[key] = val; + } + } + } + paramObject.parent = this; + paramObject.root = this.root; + return paramObject; + }; + + ModelBase.prototype.dirty = ''; + + ModelBase.prototype.setDirty = function(id, whatChanged) { + var ch, drt, keys; + ch = typeof whatChanged === 'string' ? whatChanged : (keys = Object.keys(whatChanged), keys.length === 1 ? id + ":" + keys[0] : 'multiple'); + drt = this.dirty === ch || this.dirty === '' ? ch : "multiple"; + return this.dirty = drt; + }; + + ModelBase.prototype.setClean = function() { + return this.dirty = ''; + }; + + ModelBase.prototype.shouldCallTriggerFunctionFor = function(dirty, attrName) { + return dirty && dirty !== (this.id + ":" + attrName); + }; + + ModelBase.prototype.recalculateRelativeProperties = function() { + var dirty; + dirty = this.dirty; + this.setClean(); + if (this.shouldCallTriggerFunctionFor(dirty, 'isVisible')) { + this.isVisible = getBoolOrFunctionResult(this.visible); + } + if (this.shouldCallTriggerFunctionFor(dirty, 'isDisabled')) { + this.isDisabled = getBoolOrFunctionResult(this.disabled, false); + } + return this.trigger('recalculate'); + }; + + ModelBase.prototype.onChangeProperties = function(f, trigger) { + if (trigger == null) { + trigger = true; + } + this.onChangePropertiesHandlers.push(this.bindPropFunction('onChangeProperties', f)); + if (trigger) { + this.trigger('change'); + } + return this; + }; + + ModelBase.prototype.validate = { + required: function(value) { + if (value == null) { + value = this.value || ''; + } + if (((function() { + switch (typeof value) { + case 'number': + case 'boolean': + return false; + case 'string': + return value.length === 0; + case 'object': + return Object.keys(value).length === 0; + default: + return true; + } + })())) { + return "This field is required"; + } + }, + minLength: function(n) { + return function(value) { + if (value == null) { + value = this.value || ''; + } + if (value.length < n) { + return "Must be at least " + n + " characters long"; + } + }; + }, + maxLength: function(n) { + return function(value) { + if (value == null) { + value = this.value || ''; + } + if (value.length > n) { + return "Can be at most " + n + " characters long"; + } + }; + }, + number: function(value) { + if (value == null) { + value = this.value || ''; + } + if (isNaN(+value)) { + return "Must be an integer or decimal number. (ex. 42 or 1.618)"; + } + }, + date: function(value, format) { + if (value == null) { + value = this.value || ''; + } + if (format == null) { + format = this.format; + } + if (value === '') { + return; + } + if (!moment(value, format, true).isValid()) { + return "Not a valid date or does not match the format " + format; + } + }, + email: function(value) { + if (value == null) { + value = this.value || ''; + } + if (!value.match(/^[a-z0-9!\#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!\#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/)) { + return "Must be a valid email"; + } + }, + url: function(value) { + if (value == null) { + value = this.value || ''; + } + if (!value.match(/^(([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)\#?(?:[\w]*))?$/)) { + return "Must be a URL"; + } + }, + dollars: function(value) { + if (value == null) { + value = this.value || ''; + } + if (!value.match(/^\$(\d+\.\d\d|\d+)$/)) { + return "Must be a dollar amount (ex. $3.99)"; + } + }, + minSelections: function(n) { + return function(value) { + if (value == null) { + value = this.value || ''; + } + if (value.length < n) { + return "Please select at least " + n + " options"; + } + }; + }, + maxSelections: function(n) { + return function(value) { + if (value == null) { + value = this.value || ''; + } + if (value.length > n) { + return "Please select at most " + n + " options"; + } + }; + }, + selectedIsVisible: function(field) { + var i, len, opt, ref; + if (field == null) { + field = this; + } + ref = field.options; + for (i = 0, len = ref.length; i < len; i++) { + opt = ref[i]; + if (opt.selected && !opt.isVisible) { + return "A selected option is not currently available. Please make a new choice from available options."; + } + } + }, + template: function() { + var e, template; + if (!this.template) { + return; + } + if (typeof this.template === 'object') { + template = this.template.value; + } else { + template = this.parent.child(this.template).value; + } + try { + Mustache.render(template, this.root.data); + } catch (error) { + e = error; + return "Template field does not contain valid Mustache"; + } + } + }; + + ModelBase.prototype.cloneModel = function(newRoot, constructor, excludeAttributes) { + var childClone, filteredAttributes, i, key, len, modelObj, myClone, newVal, ref, ref1, val; + if (newRoot == null) { + newRoot = this.root; + } + if (constructor == null) { + constructor = this.constructor; + } + if (excludeAttributes == null) { + excludeAttributes = []; + } + filteredAttributes = {}; + ref = this.attributes; + for (key in ref) { + val = ref[key]; + if (indexOf.call(excludeAttributes, key) < 0) { + filteredAttributes[key] = val; + } + } + myClone = new constructor(filteredAttributes); + ref1 = myClone.attributes; + for (key in ref1) { + val = ref1[key]; + if (key === 'root') { + myClone.set(key, newRoot); + } else if (val instanceof ModelBase && (key !== 'root' && key !== 'parent')) { + myClone.set(key, val.cloneModel(newRoot)); + } else if (Array.isArray(val)) { + newVal = []; + if (val[0] instanceof ModelBase && key !== 'value') { + for (i = 0, len = val.length; i < len; i++) { + modelObj = val[i]; + childClone = modelObj.cloneModel(newRoot); + if (childClone.parent === this) { + childClone.parent = myClone; + if (key === 'options' && childClone.selected) { + myClone.addOptionValue(childClone.value); + } + } + newVal.push(childClone); + } + } else { + newVal = _.clone(val); + } + myClone.set(key, newVal); + } + } + return myClone; + }; + + return ModelBase; + +})(Backbone.Model); diff --git a/lib_old/modelField.js b/lib_old/modelField.js new file mode 100644 index 0000000..c482d77 --- /dev/null +++ b/lib_old/modelField.js @@ -0,0 +1,528 @@ +var ModelBase, ModelField, ModelOption, Mustache, globals, jiff, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty, + slice = [].slice; + +ModelBase = require('./modelBase'); + +ModelOption = require('./modelOption'); + +globals = require('./globals'); + +Mustache = require('mustache'); + +jiff = require('jiff'); + + +/* + A ModelField represents a model object that render as a DOM field + NOTE: The following field types are subclasses: image, tree, date + */ + +module.exports = ModelField = (function(superClass) { + extend(ModelField, superClass); + + function ModelField() { + return ModelField.__super__.constructor.apply(this, arguments); + } + + ModelField.prototype.modelClassName = 'ModelField'; + + ModelField.prototype.initialize = function() { + var ref2, ref3; + this.setDefault('type', 'text'); + this.setDefault('options', []); + this.setDefault('value', (function() { + switch (this.get('type')) { + case 'multiselect': + return []; + case 'bool': + return false; + case 'info': + case 'button': + return void 0; + default: + return (this.get('defaultValue')) || ''; + } + }).call(this)); + this.setDefault('defaultValue', this.get('value')); + this.set('isValid', true); + this.setDefault('validators', []); + this.setDefault('onChangeHandlers', []); + this.setDefault('dynamicValue', null); + this.setDefault('template', null); + this.setDefault('autocomplete', null); + this.setDefault('beforeInput', function(val) { + return val; + }); + this.setDefault('beforeOutput', function(val) { + return val; + }); + ModelField.__super__.initialize.apply(this, arguments); + if ((ref2 = this.type) !== 'info' && ref2 !== 'text' && ref2 !== 'url' && ref2 !== 'email' && ref2 !== 'tel' && ref2 !== 'time' && ref2 !== 'date' && ref2 !== 'textarea' && ref2 !== 'bool' && ref2 !== 'tree' && ref2 !== 'color' && ref2 !== 'select' && ref2 !== 'multiselect' && ref2 !== 'image' && ref2 !== 'button' && ref2 !== 'number') { + return globals.handleError("Bad field type: " + this.type); + } + this.bindPropFunctions('dynamicValue'); + while ((Array.isArray(this.value)) && (this.type !== 'multiselect') && (this.type !== 'tree') && (this.type !== 'button')) { + this.value = this.value[0]; + } + if (typeof this.value === 'string' && (this.type === 'multiselect')) { + this.value = [this.value]; + } + if (this.type === 'bool' && typeof this.value !== 'bool') { + this.value = !!this.value; + } + this.makePropArray('validators'); + this.bindPropFunctions('validators'); + this.makePropArray('onChangeHandlers'); + this.bindPropFunctions('onChangeHandlers'); + if (this.optionsFrom != null) { + this.ensureSelectType(); + if ((this.optionsFrom.url == null) || (this.optionsFrom.parseResults == null)) { + return globals.handleError('When fetching options remotely, both url and parseResults properties are required'); + } + if (typeof ((ref3 = this.optionsFrom) != null ? ref3.url : void 0) === 'function') { + this.optionsFrom.url = this.bindPropFunction('optionsFrom.url', this.optionsFrom.url); + } + if (typeof this.optionsFrom.parseResults !== 'function') { + return globals.handleError('optionsFrom.parseResults must be a function'); + } + this.optionsFrom.parseResults = this.bindPropFunction('optionsFrom.parseResults', this.optionsFrom.parseResults); + } + this.updateOptionsSelected(); + this.on('change:value', function() { + var changeFunc, j, len1, ref4; + ref4 = this.onChangeHandlers; + for (j = 0, len1 = ref4.length; j < len1; j++) { + changeFunc = ref4[j]; + changeFunc(); + } + return this.updateOptionsSelected(); + }); + return this.on('change:type', function() { + if (this.type === 'multiselect') { + this.value = this.value.length > 0 ? [this.value] : []; + } else if (this.previousAttributes().type === 'multiselect') { + this.value = this.value.length > 0 ? this.value[0] : ''; + } + if (this.options.length > 0 && !this.isSelectType()) { + return this.type = 'select'; + } + }); + }; + + ModelField.prototype.getOptionsFrom = function() { + var ref2, url; + if (this.optionsFrom == null) { + return; + } + url = typeof this.optionsFrom.url === 'function' ? this.optionsFrom.url() : this.optionsFrom.url; + if (this.prevUrl === url) { + return; + } + this.prevUrl = url; + return typeof window !== "undefined" && window !== null ? (ref2 = window.formbuilderproxy) != null ? ref2.getFromProxy({ + url: url, + method: this.optionsFrom.method || 'get', + headerKey: this.optionsFrom.headerKey + }, (function(_this) { + return function(error, data) { + var j, len1, mappedResults, opt, results1; + if (error) { + return globals.handleError(globals.makeErrorMessage(_this, 'optionsFrom', error)); + } + mappedResults = _this.optionsFrom.parseResults(data); + if (!Array.isArray(mappedResults)) { + return globals.handleError('results of parseResults must be an array of option parameters'); + } + _this.options = []; + results1 = []; + for (j = 0, len1 = mappedResults.length; j < len1; j++) { + opt = mappedResults[j]; + results1.push(_this.option(opt)); + } + return results1; + }; + })(this)) : void 0 : void 0; + }; + + ModelField.prototype.validityMessage = void 0; + + ModelField.prototype.field = function() { + var obj, ref2; + obj = 1 <= arguments.length ? slice.call(arguments, 0) : []; + return (ref2 = this.parent).field.apply(ref2, obj); + }; + + ModelField.prototype.group = function() { + var obj, ref2; + obj = 1 <= arguments.length ? slice.call(arguments, 0) : []; + return (ref2 = this.parent).group.apply(ref2, obj); + }; + + ModelField.prototype.option = function() { + var newOption, nextOpts, opt, optionObject, optionParams; + optionParams = 1 <= arguments.length ? slice.call(arguments, 0) : []; + optionObject = this.buildParamObject(optionParams, ['title', 'value', 'selected', 'bidAdj', 'bidAdjFlag']); + this.ensureSelectType(); + nextOpts = (function() { + var j, len1, ref2, results1; + ref2 = this.options; + results1 = []; + for (j = 0, len1 = ref2.length; j < len1; j++) { + opt = ref2[j]; + if (opt.title !== optionObject.title) { + results1.push(opt); + } + } + return results1; + }).call(this); + newOption = new ModelOption(optionObject); + nextOpts.push(newOption); + this.options = nextOpts; + if (newOption.selected) { + this.addOptionValue(newOption.value); + } + return this; + }; + + ModelField.prototype.postBuild = function() { + this.defaultValue = this.value; + return this.updateOptionsSelected(); + }; + + ModelField.prototype.updateOptionsSelected = function() { + var bid, i, len, opt, ref, ref1, results; + ref = this.options; + results = []; + i = 0; + len = ref.length; + while (i < len) { + opt = ref[i]; + if ((ref1 = this.type) === 'multiselect' || ref1 === 'tree') { + bid = this.hasValue(opt.value); + if (bid.bidValue) { + opt.bidAdj = bid.bidValue.lastIndexOf('/') !== -1 ? bid.bidValue.split("/").pop() : this.bidAdj; + } + results.push(opt.selected = bid.selectStatus); + } else { + results.push(opt.selected = this.hasValue(opt.value)); + } + i++; + } + return results; + }; + + ModelField.prototype.isSelectType = function() { + var ref2; + return (ref2 = this.type) === 'select' || ref2 === 'multiselect' || ref2 === 'image' || ref2 === 'tree'; + }; + + ModelField.prototype.ensureSelectType = function() { + if (!this.isSelectType()) { + return this.type = 'select'; + } + }; + + ModelField.prototype.child = function(value) { + var j, len1, o, ref2; + if (Array.isArray(value)) { + value = value.shift(); + } + ref2 = this.options; + for (j = 0, len1 = ref2.length; j < len1; j++) { + o = ref2[j]; + if (o.value === value) { + return o; + } + } + }; + + ModelField.prototype.validator = function(func) { + this.validators.push(this.bindPropFunction('validator', func)); + this.trigger('change'); + return this; + }; + + ModelField.prototype.onChange = function(f) { + this.onChangeHandlers.push(this.bindPropFunction('onChange', f)); + this.trigger('change'); + return this; + }; + + ModelField.prototype.setDirty = function(id, whatChanged) { + var j, len1, opt, ref2; + ref2 = this.options; + for (j = 0, len1 = ref2.length; j < len1; j++) { + opt = ref2[j]; + opt.setDirty(id, whatChanged); + } + return ModelField.__super__.setDirty.call(this, id, whatChanged); + }; + + ModelField.prototype.setClean = function(all) { + var j, len1, opt, ref2, results1; + ModelField.__super__.setClean.apply(this, arguments); + if (all) { + ref2 = this.options; + results1 = []; + for (j = 0, len1 = ref2.length; j < len1; j++) { + opt = ref2[j]; + results1.push(opt.setClean(all)); + } + return results1; + } + }; + + ModelField.prototype.recalculateRelativeProperties = function() { + var dirty, j, k, len1, len2, opt, ref2, ref3, results1, validator, validityMessage, value; + dirty = this.dirty; + ModelField.__super__.recalculateRelativeProperties.apply(this, arguments); + if (this.shouldCallTriggerFunctionFor(dirty, 'isValid')) { + validityMessage = void 0; + if (this.template) { + validityMessage || (validityMessage = this.validate.template.call(this)); + } + if (this.type === 'number') { + validityMessage || (validityMessage = this.validate.number.call(this)); + } + if (!validityMessage) { + ref2 = this.validators; + for (j = 0, len1 = ref2.length; j < len1; j++) { + validator = ref2[j]; + if (typeof validator === 'function') { + validityMessage = validator.call(this); + } + if (typeof validityMessage === 'function') { + return globals.handleError("A validator on field '" + this.name + "' returned a function"); + } + if (validityMessage) { + break; + } + } + } + this.validityMessage = validityMessage; + this.set({ + isValid: validityMessage == null + }); + } + if (this.template && this.shouldCallTriggerFunctionFor(dirty, 'value')) { + this.renderTemplate(); + } else { + if (typeof this.dynamicValue === 'function' && this.shouldCallTriggerFunctionFor(dirty, 'value')) { + value = this.dynamicValue(); + if (typeof value === 'function') { + return globals.handleError("dynamicValue on field '" + this.name + "' returned a function"); + } + this.set('value', value); + } + } + if (this.shouldCallTriggerFunctionFor(dirty, 'options')) { + this.getOptionsFrom(); + } + ref3 = this.options; + results1 = []; + for (k = 0, len2 = ref3.length; k < len2; k++) { + opt = ref3[k]; + results1.push(opt.recalculateRelativeProperties()); + } + return results1; + }; + + ModelField.prototype.addOptionValue = function(val, bidAdj) { + var findMatch, ref; + findMatch = void 0; + ref = void 0; + if ((ref = this.type) === 'multiselect' || ref === 'tree') { + if (!Array.isArray(this.value)) { + this.value = [this.value]; + } + findMatch = this.value.findIndex(function(e) { + if (typeof e === 'string') { + return e.search(val) !== -1; + } else { + return e === val; + } + }); + if (findMatch !== -1) { + if (bidAdj) { + return this.value[findMatch] = val + '/' + bidAdj; + } + } else { + if (bidAdj) { + return this.value.push(val + '/' + bidAdj); + } else { + return this.value.push(val); + } + } + } else { + return this.value = val; + } + }; + + ModelField.prototype.removeOptionValue = function(val) { + var ref; + ref = void 0; + if ((ref = this.type) === 'multiselect' || ref === 'tree') { + return this.value = this.value.filter(function(e) { + if (typeof e === 'string') { + return e.search(val) === -1; + } else { + return e !== val; + } + }); + } else if (this.value === val) { + return this.value = ''; + } + }; + + ModelField.prototype.hasValue = function(val) { + var findMatch, ref; + findMatch = void 0; + ref = void 0; + if ((ref = this.type) === 'multiselect' || ref === 'tree') { + findMatch = this.value.findIndex(function(e) { + if (typeof e === 'string') { + return e.search(val) !== -1; + } else { + return e === val; + } + }); + if (findMatch !== -1) { + return { + 'bidValue': this.value[findMatch], + 'selectStatus': true + }; + } else { + return { + 'selectStatus': false + }; + } + } else { + return val === this.value; + } + }; + + ModelField.prototype.buildOutputData = function(_, skipBeforeOutput) { + var out, value; + value = (function() { + switch (this.type) { + case 'number': + out = +this.value; + if (isNaN(out)) { + return null; + } else { + return out; + } + break; + case 'info': + case 'button': + return void 0; + case 'bool': + return !!this.value; + default: + return this.value; + } + }).call(this); + if (skipBeforeOutput) { + return value; + } else { + return this.beforeOutput(value); + } + }; + + ModelField.prototype.clear = function(purgeDefaults) { + if (purgeDefaults == null) { + purgeDefaults = false; + } + if (purgeDefaults) { + return this.value = (function() { + switch (this.type) { + case 'multiselect': + return []; + case 'bool': + return false; + default: + return ''; + } + }).call(this); + } else { + return this.value = this.defaultValue; + } + }; + + ModelField.prototype.ensureValueInOptions = function() { + var existingOption, j, k, l, len1, len2, len3, o, ref2, ref3, ref4, results1, v; + if (!this.isSelectType()) { + return; + } + if (typeof this.value === 'string') { + ref2 = this.options; + for (j = 0, len1 = ref2.length; j < len1; j++) { + o = ref2[j]; + if (o.value === this.value) { + existingOption = o; + } + } + if (!existingOption) { + return this.option(this.value, { + selected: true + }); + } + } else if (Array.isArray(this.value)) { + ref3 = this.value; + results1 = []; + for (k = 0, len2 = ref3.length; k < len2; k++) { + v = ref3[k]; + existingOption = null; + ref4 = this.options; + for (l = 0, len3 = ref4.length; l < len3; l++) { + o = ref4[l]; + if (o.value === v) { + existingOption = o; + } + } + if (!existingOption) { + results1.push(this.option(v, { + selected: true + })); + } else { + results1.push(void 0); + } + } + return results1; + } + }; + + ModelField.prototype.applyData = function(inData, clear, purgeDefaults) { + if (clear == null) { + clear = false; + } + if (purgeDefaults == null) { + purgeDefaults = false; + } + if (clear) { + this.clear(purgeDefaults); + } + if (inData != null) { + return this.value = this.beforeInput(jiff.clone(inData)); + } + }; + + ModelField.prototype.renderTemplate = function() { + var template; + if (typeof this.template === 'object') { + template = this.template.value; + } else { + template = this.parent.child(this.template).value; + } + try { + return this.value = Mustache.render(template, this.root.data); + } catch (error1) { + + } + }; + + return ModelField; + +})(ModelBase); diff --git a/lib_old/modelFieldDate.js b/lib_old/modelFieldDate.js new file mode 100644 index 0000000..c8f3aa7 --- /dev/null +++ b/lib_old/modelFieldDate.js @@ -0,0 +1,44 @@ +var ModelField, ModelFieldDate, moment, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + +ModelField = require('./modelField'); + +moment = require('moment'); + +module.exports = ModelFieldDate = (function(superClass) { + extend(ModelFieldDate, superClass); + + function ModelFieldDate() { + return ModelFieldDate.__super__.constructor.apply(this, arguments); + } + + ModelFieldDate.prototype.initialize = function() { + this.setDefault('format', 'M/D/YYYY'); + ModelFieldDate.__super__.initialize.apply(this, arguments); + return this.validator(this.validate.date); + }; + + ModelFieldDate.prototype.dateToString = function(date, format) { + if (date == null) { + date = this.value; + } + if (format == null) { + format = this.format; + } + return moment(date).format(format); + }; + + ModelFieldDate.prototype.stringToDate = function(str, format) { + if (str == null) { + str = this.value; + } + if (format == null) { + format = this.format; + } + return moment(str, format, true).toDate(); + }; + + return ModelFieldDate; + +})(ModelField); diff --git a/lib_old/modelFieldImage.js b/lib_old/modelFieldImage.js new file mode 100644 index 0000000..89f9a7f --- /dev/null +++ b/lib_old/modelFieldImage.js @@ -0,0 +1,101 @@ +var ModelField, ModelFieldImage, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty, + slice = [].slice; + +ModelField = require('./modelField'); + +module.exports = ModelFieldImage = (function(superClass) { + extend(ModelFieldImage, superClass); + + function ModelFieldImage() { + return ModelFieldImage.__super__.constructor.apply(this, arguments); + } + + ModelFieldImage.prototype.initialize = function() { + this.setDefault('value', {}); + this.setDefault('allowUpload', false); + this.setDefault('imagesPerPage', 4); + this.setDefault('minWidth', 0); + this.setDefault('maxWidth', 0); + this.setDefault('minHeight', 0); + this.setDefault('maxHeight', 0); + this.setDefault('minSize', 0); + this.setDefault('maxSize', 0); + this.set('optionsChanged', false); + return ModelFieldImage.__super__.initialize.apply(this, arguments); + }; + + ModelFieldImage.prototype.option = function() { + var optionObject, optionParams; + optionParams = 1 <= arguments.length ? slice.call(arguments, 0) : []; + optionObject = this.buildParamObject(optionParams, ['fileID', 'fileUrl', 'thumbnailUrl']); + if (optionObject.fileID == null) { + optionObject.fileID = optionObject.fileUrl; + } + if (optionObject.thumbnailUrl == null) { + optionObject.thumbnailUrl = optionObject.fileUrl; + } + optionObject.value = { + fileID: optionObject.fileID, + fileUrl: optionObject.fileUrl, + thumbnailUrl: optionObject.thumbnailUrl + }; + if (optionObject.title == null) { + optionObject.title = optionObject.fileID; + } + this.optionsChanged = true; + return ModelFieldImage.__super__.option.call(this, optionObject); + }; + + ModelFieldImage.prototype.child = function(fileID) { + var i, len, o, ref; + if (Array.isArray(fileID)) { + fileID = fileID.shift(); + } + if (typeof fileID === 'object') { + fileID = fileID.fileID; + } + ref = this.options; + for (i = 0, len = ref.length; i < len; i++) { + o = ref[i]; + if (o.fileID === fileID) { + return o; + } + } + }; + + ModelFieldImage.prototype.removeOptionValue = function(val) { + if (this.value.fileID === val.fileID) { + return this.value = {}; + } + }; + + ModelFieldImage.prototype.hasValue = function(val) { + return val.fileID === this.value.fileID && val.thumbnailUrl === this.value.thumbnailUrl && val.fileUrl === this.value.fileUrl; + }; + + ModelFieldImage.prototype.clear = function(purgeDefaults) { + if (purgeDefaults == null) { + purgeDefaults = false; + } + return this.value = purgeDefaults ? {} : this.defaultValue; + }; + + ModelFieldImage.prototype.ensureValueInOptions = function() { + var existingOption, i, len, o, ref; + ref = this.options; + for (i = 0, len = ref.length; i < len; i++) { + o = ref[i]; + if (o.attributes.fileID === this.value.fileID) { + existingOption = o; + } + } + if (!existingOption) { + return this.option(this.value); + } + }; + + return ModelFieldImage; + +})(ModelField); diff --git a/lib_old/modelFieldTree.js b/lib_old/modelFieldTree.js new file mode 100644 index 0000000..68b1bee --- /dev/null +++ b/lib_old/modelFieldTree.js @@ -0,0 +1,45 @@ +var ModelField, ModelFieldTree, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty, + slice = [].slice; + +ModelField = require('./modelField'); + +module.exports = ModelFieldTree = (function(superClass) { + extend(ModelFieldTree, superClass); + + function ModelFieldTree() { + return ModelFieldTree.__super__.constructor.apply(this, arguments); + } + + ModelFieldTree.prototype.initialize = function() { + this.setDefault('value', []); + return ModelFieldTree.__super__.initialize.apply(this, arguments); + }; + + ModelFieldTree.prototype.option = function() { + var optionObject, optionParams; + optionParams = 1 <= arguments.length ? slice.call(arguments, 0) : []; + optionObject = this.buildParamObject(optionParams, ['path', 'value', 'selected', 'bidAdj', 'bidAdjFlag']); + if (optionObject.value == null) { + optionObject.value = optionObject.id; + } + if (optionObject.value === null && Array.isArray(optionObject.path)) { + if (optionObject.value == null) { + optionObject.value = optionObject.path.join(' > '); + } + optionObject.title = optionObject.path.join('>'); + } + return ModelFieldTree.__super__.option.call(this, optionObject); + }; + + ModelFieldTree.prototype.clear = function(purgeDefaults) { + if (purgeDefaults == null) { + purgeDefaults = false; + } + return this.value = purgeDefaults ? [] : this.defaultValue; + }; + + return ModelFieldTree; + +})(ModelField); diff --git a/lib_old/modelGroup.js b/lib_old/modelGroup.js new file mode 100644 index 0000000..ea30836 --- /dev/null +++ b/lib_old/modelGroup.js @@ -0,0 +1,409 @@ +var ModelBase, ModelField, ModelFieldDate, ModelFieldImage, ModelFieldTree, ModelGroup, RepeatingModelGroup, globals, jiff, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty, + slice = [].slice; + +ModelBase = require('./modelBase'); + +ModelFieldImage = require('./modelFieldImage'); + +ModelFieldTree = require('./modelFieldTree'); + +ModelFieldDate = require('./modelFieldDate'); + +ModelField = require('./modelField'); + +globals = require('./globals'); + +jiff = require('jiff'); + + +/* + A ModelGroup is a model object that can contain any number of other groups and fields + */ + +module.exports = ModelGroup = (function(superClass) { + extend(ModelGroup, superClass); + + function ModelGroup() { + return ModelGroup.__super__.constructor.apply(this, arguments); + } + + ModelGroup.prototype.modelClassName = 'ModelGroup'; + + ModelGroup.prototype.initialize = function() { + this.setDefault('children', []); + this.setDefault('root', this); + this.set('isValid', true); + this.set('data', null); + this.setDefault('beforeInput', function(val) { + return val; + }); + this.setDefault('beforeOutput', function(val) { + return val; + }); + return ModelGroup.__super__.initialize.apply(this, arguments); + }; + + ModelGroup.prototype.postBuild = function() { + var child, i, len, ref, results; + ref = this.children; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + results.push(child.postBuild()); + } + return results; + }; + + ModelGroup.prototype.field = function() { + var fieldObject, fieldParams, fld; + fieldParams = 1 <= arguments.length ? slice.call(arguments, 0) : []; + fieldObject = this.buildParamObject(fieldParams, ['title', 'name', 'type', 'value']); + if (fieldObject.disabled == null) { + fieldObject.disabled = this.disabled; + } + fld = (function() { + switch (fieldObject.type) { + case 'image': + return new ModelFieldImage(fieldObject); + case 'tree': + return new ModelFieldTree(fieldObject); + case 'date': + return new ModelFieldDate(fieldObject); + default: + return new ModelField(fieldObject); + } + })(); + this.children.push(fld); + this.trigger('change'); + return fld; + }; + + ModelGroup.prototype.group = function() { + var groupObject, groupParams, grp, key, ref, val; + groupParams = 1 <= arguments.length ? slice.call(arguments, 0) : []; + grp = {}; + if (((ref = groupParams[0].constructor) != null ? ref.name : void 0) === 'ModelGroup') { + grp = groupParams[0].cloneModel(this.root); + groupParams.shift(); + groupObject = this.buildParamObject(groupParams, ['title', 'name', 'description']); + if (groupObject.name == null) { + groupObject.name = groupObject.title; + } + if (groupObject.title == null) { + groupObject.title = groupObject.name; + } + for (key in groupObject) { + val = groupObject[key]; + grp.set(key, val); + } + } else { + groupObject = this.buildParamObject(groupParams, ['title', 'name', 'description']); + if (groupObject.disabled == null) { + groupObject.disabled = this.disabled; + } + if (groupObject.repeating) { + grp = new RepeatingModelGroup(groupObject); + } else { + grp = new ModelGroup(groupObject); + } + } + this.children.push(grp); + this.trigger('change'); + return grp; + }; + + ModelGroup.prototype.child = function(path) { + var c, child, i, len, name, ref; + if (!(Array.isArray(path))) { + path = path.split(/[.\/]/); + } + name = path.shift(); + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + c = ref[i]; + if (c.name === name) { + child = c; + } + } + if (path.length === 0) { + return child; + } else { + return child.child(path); + } + }; + + ModelGroup.prototype.setDirty = function(id, whatChanged) { + var child, i, len, ref; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + child.setDirty(id, whatChanged); + } + return ModelGroup.__super__.setDirty.call(this, id, whatChanged); + }; + + ModelGroup.prototype.setClean = function(all) { + var child, i, len, ref, results; + ModelGroup.__super__.setClean.apply(this, arguments); + if (all) { + ref = this.children; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + results.push(child.setClean(all)); + } + return results; + } + }; + + ModelGroup.prototype.recalculateRelativeProperties = function(collection) { + var child, dirty, i, len, newValid; + if (collection == null) { + collection = this.children; + } + dirty = this.dirty; + ModelGroup.__super__.recalculateRelativeProperties.apply(this, arguments); + newValid = true; + for (i = 0, len = collection.length; i < len; i++) { + child = collection[i]; + child.recalculateRelativeProperties(); + newValid && (newValid = child.isValid); + } + return this.isValid = newValid; + }; + + ModelGroup.prototype.buildOutputData = function(group, skipBeforeOutput) { + var obj; + if (group == null) { + group = this; + } + obj = {}; + group.children.forEach(function(child) { + var childData; + childData = child.buildOutputData(void 0, skipBeforeOutput); + if (childData !== void 0) { + return obj[child.name] = childData; + } + }); + if (skipBeforeOutput) { + return obj; + } else { + return group.beforeOutput(obj); + } + }; + + ModelGroup.prototype.buildOutputDataString = function() { + return JSON.stringify(this.buildOutputData()); + }; + + ModelGroup.prototype.clear = function(purgeDefaults) { + var child, i, j, key, len, len1, ref, ref1, results; + if (purgeDefaults == null) { + purgeDefaults = false; + } + if (this.data) { + ref = Object.keys(this.data); + for (i = 0, len = ref.length; i < len; i++) { + key = ref[i]; + delete this.data[key]; + } + } + ref1 = this.children; + results = []; + for (j = 0, len1 = ref1.length; j < len1; j++) { + child = ref1[j]; + results.push(child.clear(purgeDefaults)); + } + return results; + }; + + ModelGroup.prototype.applyData = function(inData, clear, purgeDefaults) { + var finalInData, key, ref, results, value; + if (clear == null) { + clear = false; + } + if (purgeDefaults == null) { + purgeDefaults = false; + } + if (clear) { + this.clear(purgeDefaults); + } + finalInData = this.beforeInput(jiff.clone(inData)); + + /* + This section preserves a link to the initially applied data object and merges subsequent applies on top + of it in-place. This is necessary for two reasons. + First, the scope of the running model code also references the applied data through the 'data' variable. + Every applied data must be available even though the runtime is not re-evaluated each time. + Second, templated fields use this data as the input to their Mustache evaluation. See @renderTemplate() + */ + if (this.data) { + globals.mergeData(this.data, inData); + this.trigger('change'); + } else { + this.data = inData; + } + results = []; + for (key in finalInData) { + value = finalInData[key]; + results.push((ref = this.child(key)) != null ? ref.applyData(value) : void 0); + } + return results; + }; + + return ModelGroup; + +})(ModelBase); + + +/* + Encapsulates a group of form objects that can be added or removed to the form together multiple times + */ + +RepeatingModelGroup = (function(superClass) { + extend(RepeatingModelGroup, superClass); + + function RepeatingModelGroup() { + return RepeatingModelGroup.__super__.constructor.apply(this, arguments); + } + + RepeatingModelGroup.prototype.modelClassName = 'RepeatingModelGroup'; + + RepeatingModelGroup.prototype.initialize = function() { + this.setDefault('defaultValue', this.get('value') || []); + this.set('value', []); + return RepeatingModelGroup.__super__.initialize.apply(this, arguments); + }; + + RepeatingModelGroup.prototype.postBuild = function() { + var c, i, len, ref; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + c = ref[i]; + c.postBuild(); + } + return this.clear(); + }; + + RepeatingModelGroup.prototype.setDirty = function(id, whatChanged) { + var i, len, ref, val; + ref = this.value; + for (i = 0, len = ref.length; i < len; i++) { + val = ref[i]; + val.setDirty(id, whatChanged); + } + return RepeatingModelGroup.__super__.setDirty.call(this, id, whatChanged); + }; + + RepeatingModelGroup.prototype.setClean = function(all) { + var i, len, ref, results, val; + RepeatingModelGroup.__super__.setClean.apply(this, arguments); + if (all) { + ref = this.value; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + val = ref[i]; + results.push(val.setClean(all)); + } + return results; + } + }; + + RepeatingModelGroup.prototype.recalculateRelativeProperties = function() { + return RepeatingModelGroup.__super__.recalculateRelativeProperties.call(this, this.value); + }; + + RepeatingModelGroup.prototype.buildOutputData = function(_, skipBeforeOutput) { + var tempOut; + tempOut = this.value.map(function(instance) { + return RepeatingModelGroup.__super__.buildOutputData.call(this, instance); + }); + if (skipBeforeOutput) { + return tempOut; + } else { + return this.beforeOutput(tempOut); + } + }; + + RepeatingModelGroup.prototype.clear = function(purgeDefaults) { + if (purgeDefaults == null) { + purgeDefaults = false; + } + this.value = []; + if (!purgeDefaults) { + if (this.defaultValue) { + return this.addEachSimpleObject(this.defaultValue); + } + } + }; + + RepeatingModelGroup.prototype.applyData = function(inData, clear, purgeDefaults) { + var finalInData; + if (clear == null) { + clear = false; + } + if (purgeDefaults == null) { + purgeDefaults = false; + } + finalInData = this.beforeInput(jiff.clone(inData)); + if (finalInData) { + this.value = []; + } else { + if (clear) { + this.clear(purgeDefaults); + } + } + return this.addEachSimpleObject(finalInData, clear, purgeDefaults); + }; + + RepeatingModelGroup.prototype.addEachSimpleObject = function(o, clear, purgeDefaults) { + var added, i, key, len, obj, results, value; + if (clear == null) { + clear = false; + } + if (purgeDefaults == null) { + purgeDefaults = false; + } + results = []; + for (i = 0, len = o.length; i < len; i++) { + obj = o[i]; + added = this.add(); + results.push((function() { + var ref, results1; + results1 = []; + for (key in obj) { + value = obj[key]; + results1.push((ref = added.child(key)) != null ? ref.applyData(value, clear, purgeDefaults) : void 0); + } + return results1; + })()); + } + return results; + }; + + RepeatingModelGroup.prototype.cloneModel = function(root, constructor) { + var clone, excludeAttributes; + excludeAttributes = (constructor != null ? constructor.name : void 0) === 'ModelGroup' ? ['value', 'beforeInput', 'beforeOutput', 'description'] : []; + clone = RepeatingModelGroup.__super__.cloneModel.call(this, root, constructor, excludeAttributes); + clone.title = ''; + return clone; + }; + + RepeatingModelGroup.prototype.add = function() { + var clone; + clone = this.cloneModel(this.root, ModelGroup); + this.value.push(clone); + this.trigger('change'); + return clone; + }; + + RepeatingModelGroup.prototype["delete"] = function(index) { + this.value.splice(index, 1); + return this.trigger('change'); + }; + + return RepeatingModelGroup; + +})(ModelGroup); diff --git a/lib_old/modelOption.js b/lib_old/modelOption.js new file mode 100644 index 0000000..17b689b --- /dev/null +++ b/lib_old/modelOption.js @@ -0,0 +1,31 @@ +var ModelBase, ModelOption, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + +ModelBase = require('./modelBase'); + +module.exports = ModelOption = (function(superClass) { + extend(ModelOption, superClass); + + function ModelOption() { + return ModelOption.__super__.constructor.apply(this, arguments); + } + + ModelOption.prototype.initialize = function() { + this.setDefault('value', this.get('title')); + this.setDefault('title', this.get('value')); + this.setDefault('selected', false); + this.setDefault('path', []); + ModelOption.__super__.initialize.apply(this, arguments); + return this.on('change:selected', function() { + if (this.selected) { + return this.parent.addOptionValue(this.value, this.bidAdj); + } else { + return this.parent.removeOptionValue(this.value); + } + }); + }; + + return ModelOption; + +})(ModelBase);