aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-16 15:23:48 -0700
committerValerio Virgillito2012-05-16 15:23:48 -0700
commit13ae16997d4bbca14e255d5989d1c44a76eac72c (patch)
treed9ebb1dcc6bebee4cb910b950ecb67c1a2d593cd /node_modules/montage
parent99f16ae08fbb0a6dfe6008c9833f2253b18c19e5 (diff)
downloadninja-13ae16997d4bbca14e255d5989d1c44a76eac72c.tar.gz
montage v.0.10 integration
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'node_modules/montage')
-rw-r--r--node_modules/montage/core/change-notification.js1418
-rwxr-xr-xnode_modules/montage/core/converter/date-converter.js4
-rwxr-xr-xnode_modules/montage/core/core.js600
-rwxr-xr-xnode_modules/montage/core/deserializer.js4
-rwxr-xr-xnode_modules/montage/core/event/binding.js953
-rwxr-xr-xnode_modules/montage/core/event/event-manager.js56
-rw-r--r--node_modules/montage/core/event/key-manager.js978
-rwxr-xr-xnode_modules/montage/core/exception.js2
-rwxr-xr-xnode_modules/montage/core/extras/array.js292
-rw-r--r--node_modules/montage/core/extras/object.js256
-rwxr-xr-xnode_modules/montage/core/extras/string.js (renamed from node_modules/montage/core/shim/string.js)2
-rw-r--r--node_modules/montage/core/promise-queue.js2
-rwxr-xr-xnode_modules/montage/core/selector.js (renamed from node_modules/montage/core/shim.js)11
-rw-r--r--node_modules/montage/core/selector/abstract-language.js303
-rw-r--r--node_modules/montage/core/selector/abstract-selector.js189
-rw-r--r--node_modules/montage/core/selector/abstract-semantics.js100
-rw-r--r--node_modules/montage/core/selector/language.js381
-rw-r--r--node_modules/montage/core/selector/parser.js62
-rw-r--r--node_modules/montage/core/selector/property-language.js346
-rw-r--r--node_modules/montage/core/selector/semantics.js392
-rwxr-xr-xnode_modules/montage/core/serializer.js18
-rw-r--r--[-rwxr-xr-x]node_modules/montage/core/shim/array.js51
-rw-r--r--node_modules/montage/core/shim/immediate.js57
-rw-r--r--node_modules/montage/core/shim/object.js36
-rwxr-xr-xnode_modules/montage/package.json1
-rwxr-xr-xnode_modules/montage/require/browser.js2
-rwxr-xr-xnode_modules/montage/require/require.js20
-rw-r--r--node_modules/montage/ui/autocomplete/autocomplete.reel/autocomplete.js126
-rw-r--r--node_modules/montage/ui/autocomplete/result-item.reel/result-item.js33
-rw-r--r--node_modules/montage/ui/autocomplete/results-list.reel/results-list.html5
-rw-r--r--node_modules/montage/ui/autocomplete/results-list.reel/results-list.js7
-rw-r--r--node_modules/montage/ui/button.reel/button.js6
-rwxr-xr-xnode_modules/montage/ui/component-placeholder.reel/component-placeholder.js146
-rwxr-xr-xnode_modules/montage/ui/component.js163
-rw-r--r--node_modules/montage/ui/composer/key-composer.js385
-rw-r--r--node_modules/montage/ui/composer/translate-composer.js230
-rwxr-xr-xnode_modules/montage/ui/condition.reel/condition.js79
-rw-r--r--node_modules/montage/ui/controller/array-controller.js53
-rwxr-xr-xnode_modules/montage/ui/flow-bezier-spline.js163
-rw-r--r--node_modules/montage/ui/flow-path-cubic.js115
-rw-r--r--node_modules/montage/ui/flow-path-lerp.js112
-rw-r--r--node_modules/montage/ui/flow-path-linear.js83
-rw-r--r--node_modules/montage/ui/flow-path-sigmoid.js148
-rw-r--r--node_modules/montage/ui/flow-path.js215
-rw-r--r--node_modules/montage/ui/flow.reel/flow.html10
-rw-r--r--node_modules/montage/ui/flow.reel/flow.js758
-rwxr-xr-xnode_modules/montage/ui/list.reel/list.html2
-rwxr-xr-xnode_modules/montage/ui/loader.reel/loader.js15
-rw-r--r--node_modules/montage/ui/nearest-neighbor-component-search.js122
-rwxr-xr-xnode_modules/montage/ui/repetition.reel/repetition.js711
-rw-r--r--node_modules/montage/ui/rich-text-editor/rich-text-editor.reel/rich-text-editor-base.js4
-rw-r--r--node_modules/montage/ui/rich-text-editor/rich-text-editor.reel/rich-text-editor.js4
-rw-r--r--node_modules/montage/ui/scroller.reel/scroller.html9
-rw-r--r--node_modules/montage/ui/scroller.reel/scroller.js20
-rw-r--r--node_modules/montage/ui/skeleton/range-input.reel/range-input.html18
-rw-r--r--node_modules/montage/ui/skeleton/range-input.reel/range-input.js159
-rwxr-xr-xnode_modules/montage/ui/slot.reel/slot.js262
-rwxr-xr-xnode_modules/montage/ui/substitution.reel/substitution.js14
-rwxr-xr-xnode_modules/montage/ui/tabs.reel/tabs.html3
-rwxr-xr-xnode_modules/montage/ui/template.js9
-rw-r--r--node_modules/montage/ui/token-field/token-field.reel/token-field.css40
-rw-r--r--node_modules/montage/ui/token-field/token-field.reel/token-field.html87
-rw-r--r--node_modules/montage/ui/token-field/token-field.reel/token-field.js221
-rw-r--r--node_modules/montage/ui/token-field/token.reel/token.css54
-rw-r--r--node_modules/montage/ui/token-field/token.reel/token.html45
-rw-r--r--node_modules/montage/ui/token-field/token.reel/token.js91
66 files changed, 7578 insertions, 3685 deletions
diff --git a/node_modules/montage/core/change-notification.js b/node_modules/montage/core/change-notification.js
new file mode 100644
index 00000000..bfe5ff2d
--- /dev/null
+++ b/node_modules/montage/core/change-notification.js
@@ -0,0 +1,1418 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6
7/**
8 @module montage/core/event/change-notification
9*/
10
11var Montage = require("montage").Montage,
12 logger = require("core/logger").logger("change-notification"),
13 UNDERSCORE = "_";
14
15// key: <path>, <target uuid>, <listener uuid>
16var _descriptorsDirectory = Object.create(null);
17
18// key: <target uuid>, <path>
19var _willChangeDescriptorsDirectory = Object.create(null);
20var _willChangeDescriptorsIndexesDirectory = Object.create(null);
21var _changeDescriptorsDirectory = Object.create(null);
22var _changeDescriptorsIndexesDirectory = Object.create(null);
23
24exports.__reset__ = function() {
25 _descriptorsDirectory = Object.create(null);
26 _willChangeDescriptorsDirectory = Object.create(null);
27 _willChangeDescriptorsIndexesDirectory = Object.create(null);
28 _changeDescriptorsDirectory = Object.create(null);
29 _changeDescriptorsIndexesDirectory = Object.create(null);
30 // also need to remove all installed setters
31};
32
33exports.__debug__ = function() {
34 console.log("_descriptorsDirectory", _descriptorsDirectory);
35 console.log("_willChangeDescriptorsDirectory", _willChangeDescriptorsDirectory, _willChangeDescriptorsIndexesDirectory);
36 console.log("_changeDescriptorsDirectory", _changeDescriptorsDirectory, _changeDescriptorsIndexesDirectory);
37};
38
39var ChangeNotification = exports.ChangeNotification = Object.create(Montage, {
40 // (object) => <object>.uuid
41 //
42 // (target_n): {
43 // <propertyPath_n>: {
44 // target,
45 // propertyPath,
46 // willChangeListeners: {
47 // (listener_n): {
48 // listenerTarget,
49 // listenerFunction,
50 // listensToMutation
51 // }
52 // },
53 // changeListeners: same as willChangeListeners,
54 // willChangeListenersCount: Object.keys(willChangeListeners).length,
55 // changeListenersCount: Object.keys(changeListeners).length,
56 // handleWillChange: function()
57 // handleChange: function()
58 // }
59 // }
60 _descriptorsRegistry: {
61 writable: true,
62 value: Object.create(null)
63 },
64
65 _createFunctionDescriptor: {
66 value: function(target, listener, beforeChange, mutation) {
67 var identifier,
68 functionName,
69 functionDescriptor = Object.create(ChangeNotificationFunctionDescriptor);
70
71 if (typeof listener === "function") {
72 functionDescriptor.listenerFunction = listener;
73 functionDescriptor.listenerTarget = target;
74 } else {
75 identifier = target.identifier;
76
77 if (identifier) {
78 identifier = identifier.toCapitalized();
79
80 functionName = "handle" + identifier + (beforeChange ? "WillChange" : "Change");
81 if (typeof listener[functionName] === "function") {
82 functionDescriptor.listenerFunctionName = functionName;
83 functionDescriptor.listenerFunction = listener[functionName];
84 functionDescriptor.listenerTarget = listener;
85 }
86 }
87
88 if (!functionDescriptor.listenerFunction) {
89 functionName = "handle" + (beforeChange ? "WillChange" : "Change");
90 if (typeof listener[functionName] === "function") {
91 functionDescriptor.listenerFunctionName = functionName;
92 functionDescriptor.listenerFunction = listener[functionName];
93 functionDescriptor.listenerTarget = listener;
94 }
95 }
96 }
97
98 if (!functionDescriptor.listenerFunction) {
99 console.log("Could not find valid listener when installing", target, listener);
100 throw "Could not find valid listener when installing";
101 }
102
103 functionDescriptor.listensToMutation = mutation;
104 return functionDescriptor;