aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnode_modules/montage/core/converter/converter.js10
-rwxr-xr-xnode_modules/montage/core/converter/date-converter.js10
-rwxr-xr-xnode_modules/montage/core/core.js42
-rwxr-xr-xnode_modules/montage/core/deserializer.js4
-rwxr-xr-xnode_modules/montage/core/event/binding.js8
-rwxr-xr-xnode_modules/montage/core/event/event-manager.js5
-rwxr-xr-xnode_modules/montage/core/event/mutable-event.js1
-rwxr-xr-xnode_modules/montage/core/promise.js36
-rwxr-xr-xnode_modules/montage/core/shim/string.js15
-rw-r--r--[-rwxr-xr-x]node_modules/montage/core/undo-manager.js0
-rw-r--r--[-rwxr-xr-x]node_modules/montage/core/url.js0
-rwxr-xr-xnode_modules/montage/data/context.js5
-rwxr-xr-xnode_modules/montage/montage.js2
-rw-r--r--node_modules/montage/node.js5
-rwxr-xr-xnode_modules/montage/package.json2
-rwxr-xr-xnode_modules/montage/require/browser.js28
-rw-r--r--node_modules/montage/require/node.js5
-rw-r--r--[-rwxr-xr-x]node_modules/montage/ui/bluemoon/progress.reel/progress.html0
-rw-r--r--node_modules/montage/ui/button.reel/button.js206
-rw-r--r--node_modules/montage/ui/check-input.js93
-rwxr-xr-xnode_modules/montage/ui/component.js6
-rw-r--r--node_modules/montage/ui/composer/composer.js1
-rw-r--r--node_modules/montage/ui/composer/press-composer.js434
-rwxr-xr-xnode_modules/montage/ui/condition.reel/condition.js68
-rw-r--r--node_modules/montage/ui/date-input.reel/date-input.js20
-rw-r--r--[-rwxr-xr-x]node_modules/montage/ui/flow-path-cubic.js6
-rw-r--r--[-rwxr-xr-x]node_modules/montage/ui/flow-path-lerp.js6
-rw-r--r--[-rwxr-xr-x]node_modules/montage/ui/flow-path-linear.js6
-rw-r--r--[-rwxr-xr-x]node_modules/montage/ui/flow-path-sigmoid.js6
-rw-r--r--[-rwxr-xr-x]node_modules/montage/ui/flow-path.js6
-rw-r--r--[-rwxr-xr-x]node_modules/montage/ui/flow.reel/flow.html0
-rw-r--r--[-rwxr-xr-x]node_modules/montage/ui/flow.reel/flow.js6
-rw-r--r--node_modules/montage/ui/native-control.js175
-rw-r--r--[-rwxr-xr-x]node_modules/montage/ui/nearest-neighbor-component-search.js6
-rw-r--r--node_modules/montage/ui/number-input.reel/number-input.js9
-rwxr-xr-xnode_modules/montage/ui/radio-button.reel/radio-button.js19
-rw-r--r--node_modules/montage/ui/range-input.reel/range-input.js48
-rw-r--r--[-rwxr-xr-x]node_modules/montage/ui/scroll-bars.reel/scroll-bars.html0
-rw-r--r--[-rwxr-xr-x]node_modules/montage/ui/scroll-bars.reel/scroll-bars.js6
-rwxr-xr-xnode_modules/montage/ui/scroll.js6
-rw-r--r--[-rwxr-xr-x]node_modules/montage/ui/scroller.reel/scroller.html0
-rw-r--r--[-rwxr-xr-x]node_modules/montage/ui/scroller.reel/scroller.js6
-rwxr-xr-xnode_modules/montage/ui/scrollview.reel/scrollview.js43
-rw-r--r--node_modules/montage/ui/select-input.reel/select-input.js53
-rw-r--r--node_modules/montage/ui/text-input.js109
-rw-r--r--node_modules/montage/ui/textfield.reel/textfield.js5
-rw-r--r--node_modules/montage/ui/toggle-button.reel/toggle-button.js4
-rwxr-xr-xnode_modules/montage/ui/toggle-switch.reel/toggle-switch.css162
-rwxr-xr-xnode_modules/montage/ui/toggle-switch.reel/toggle-switch.html16
-rw-r--r--node_modules/montage/ui/toggle-switch.reel/toggle-switch.js424
50 files changed, 1045 insertions, 1088 deletions
diff --git a/node_modules/montage/core/converter/converter.js b/node_modules/montage/core/converter/converter.js
index abce44e2..a23d2702 100755
--- a/node_modules/montage/core/converter/converter.js
+++ b/node_modules/montage/core/converter/converter.js
@@ -20,16 +20,6 @@ var FUNCTION_CLASS = '[object Function]',
20 20
21var _toString = Object.prototype.toString; 21var _toString = Object.prototype.toString;
22 22
23// TODO should maybe move these into String.isString and Number.isNumber to parallel Array.isArray
24
25/**
26 @exports module:montage/core/converter#isString
27 @function
28*/
29var isString = function(object) {
30 return _toString.call(object) === STRING_CLASS;
31};
32exports.isString = isString;
33 23
34/** 24/**
35 @exports module:montage/core/converter#isNumber 25 @exports module:montage/core/converter#isNumber
diff --git a/node_modules/montage/core/converter/date-converter.js b/node_modules/montage/core/converter/date-converter.js
index f0d3e540..f484f7aa 100755
--- a/node_modules/montage/core/converter/date-converter.js
+++ b/node_modules/montage/core/converter/date-converter.js
@@ -2502,16 +2502,13 @@ var _toString = Object.prototype.toString;
2502var isDate = function(object) { 2502var isDate = function(object) {
2503 return _toString.call(object) === DATE_CLASS; 2503 return _toString.call(object) === DATE_CLASS;
2504}; 2504};
2505var isString = function(object) {
2506 return _toString.call(object) === STRING_CLASS;
2507};
2508var isNumber = function(object) { 2505var isNumber = function(object) {
2509 return _toString.call(object) === NUMBER_CLASS; 2506 return _toString.call(object) === NUMBER_CLASS;
2510}; 2507};
2511 2508
2512var formatDate = function(v, format) { 2509var formatDate = function(v, format) {
2513 var date; 2510 var date;
2514 if (isString(v)) { 2511 if (String.isString(v)) {
2515 // try to create a Date instance from the string 2512 // try to create a Date instance from the string
2516 // date must be a string that can be parsed by Date 2513 // date must be a string that can be parsed by Date
2517 // see - http://www.w3schools.com/jsref/jsref_parse.asp 2514 // see - http://www.w3schools.com/jsref/jsref_parse.asp
@@ -2605,7 +2602,7 @@ var DateConverter = exports.DateConverter = Montage.create(Converter,/** @lends
2605 */ 2602 */
2606 convert: { 2603 convert: {
2607 value: function(v) { 2604 value: function(v) {
2608 if (isDate(v) || isString(v) || isNumber(v)) { 2605 if (isDate(v) || String.isString(v) || isNumber(v)) {
2609 return formatDate(v, this.pattern); 2606 return formatDate(v, this.pattern);
2610 } 2607 }
2611 return v; 2608 return v;
@@ -2617,6 +2614,9 @@ var DateConverter = exports.DateConverter = Montage.create(Converter,/** @lends
2617 */ 2614 */
2618 revert: { 2615 revert: {
2619 value: function(v) { 2616 value: function(v) {
2617 if(isDate(v)) {
2618 return v;
2619 }
2620 this.validator.pattern = this.pattern; 2620 this.validator.pattern = this.pattern;
2621 2621
2622 var result = this.validator.validate(v); 2622 var result = this.validator.validate(v);
diff --git a/node_modules/montage/core/core.js b/node_modules/montage/core/core.js
index 8c1f4249..ff94f303 100755
--- a/node_modules/montage/core/core.js
+++ b/node_modules/montage/core/core.js
@@ -12,6 +12,16 @@
12 */ 12 */
13require("core/shim"); 13require("core/shim");
14 14
15var ATTRIBUTE_PROPERTIES = "AttributeProperties",
16 UNDERSCORE = "_",
17 PROTO = "__proto__",
18 VALUE = "value",
19 ENUMERABLE = "enumerable",
20 SERIALIZABLE = "serializable",
21 MODIFY = "modify";
22
23
24
15/** 25/**
16 @external Object 26 @external Object
17 */ 27 */
@@ -78,14 +88,14 @@ Object.defineProperty(M, "create", {
78 } 88 }
79}); 89});
80 90
81var extendedPropertyAttributes = ["serializable", "modify"]; 91var extendedPropertyAttributes = [SERIALIZABLE, MODIFY];
82 92
83// Extended property attributes, the property name format is "_" + attributeName + "AttributeProperties" 93// Extended property attributes, the property name format is "_" + attributeName + "AttributeProperties"
84/** 94/**
85@member external:Object#extendedPropertyAttributes 95@member external:Object#extendedPropertyAttributes
86*/ 96*/
87extendedPropertyAttributes.forEach(function(name) { 97extendedPropertyAttributes.forEach(function(name) {
88 Object.defineProperty(Object.prototype, "_" + name + "AttributeProperties", { 98 Object.defineProperty(Object.prototype, UNDERSCORE + name + ATTRIBUTE_PROPERTIES, {
89 enumerable: false, 99 enumerable: false,
90 configurable: false, 100 configurable: false,
91 writable: false, 101 writable: false,
@@ -112,11 +122,11 @@ Object.defineProperty(M, "defineProperty", {
112 value: function(obj, prop, descriptor) { 122 value: function(obj, prop, descriptor) {
113 var dependencies = descriptor.dependencies; 123 var dependencies = descriptor.dependencies;
114 //reset defaults appropriately for framework. 124 //reset defaults appropriately for framework.
115 if ("__proto__" in descriptor) { 125 if (PROTO in descriptor) {
116 descriptor.__proto__ = ("value" in descriptor ? (typeof descriptor.value === "function" ? _defaultFunctionValueProperty : _defaultObjectValueProperty) : _defaultAccessorProperty); 126 descriptor.__proto__ = (VALUE in descriptor ? (typeof descriptor.value === "function" ? _defaultFunctionValueProperty : _defaultObjectValueProperty) : _defaultAccessorProperty);
117 } else { 127 } else {
118 var defaults; 128 var defaults;
119 if ("value" in descriptor) { 129 if (VALUE in descriptor) {
120 if (typeof descriptor.value === "function") { 130 if (typeof descriptor.value === "function") {
121 defaults = _defaultFunctionValueProperty; 131 defaults = _defaultFunctionValueProperty;
122 } else { 132 } else {
@@ -133,7 +143,7 @@ Object.defineProperty(M, "defineProperty", {