@base-framework/base 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/base.js +1 -0
- package/package.json +9 -4
- package/.jshintrc +0 -3
- package/base.js +0 -41
- package/base.min.js +0 -1
- package/core.js +0 -1
- package/data-tracker.js +0 -351
- package/es5/base.js +0 -2968
- package/es5/modules/ajax.js +0 -663
- package/es5/modules/animation.js +0 -188
- package/es5/modules/animations.js +0 -1080
- package/es5/modules/atom.js +0 -65
- package/es5/modules/component.js +0 -1310
- package/es5/modules/data-binder.js +0 -1131
- package/es5/modules/data.js +0 -1808
- package/es5/modules/date.js +0 -525
- package/es5/modules/form-validator.js +0 -324
- package/es5/modules/history.js +0 -126
- package/es5/modules/html-builder.js +0 -461
- package/es5/modules/layout.js +0 -1679
- package/es5/modules/mouse.js +0 -124
- package/es5/modules/nav-link.js +0 -123
- package/es5/modules/olderversions/animations-ease.js +0 -1095
- package/es5/modules/olderversions/animations-update.js +0 -1048
- package/es5/modules/olderversions/base-animations.js +0 -636
- package/es5/modules/olderversions/base-component-class.js +0 -100
- package/es5/modules/olderversions/base-data-binder-1.js +0 -407
- package/es5/modules/olderversions/base-data-binder-class.js +0 -358
- package/es5/modules/olderversions/base-layout-parser-class.js +0 -172
- package/es5/modules/olderversions/base-mode-1.js +0 -777
- package/es5/modules/olderversions/base-model-class.js +0 -585
- package/es5/modules/olderversions/data-binder/element-binding/base-data-binder-class.js +0 -358
- package/es5/modules/olderversions/data-binder/element-binding/base-model-class.js +0 -585
- package/es5/modules/olderversions/data-binder/model-binding/base-data-binder-class.js +0 -353
- package/es5/modules/olderversions/data-binder/model-binding/base-model-class.js +0 -604
- package/es5/modules/olderversions/data-binder-update-watcher.js +0 -640
- package/es5/modules/olderversions/data-tracker.js +0 -187
- package/es5/modules/olderversions/event-update.js +0 -666
- package/es5/modules/olderversions/nav-link.js +0 -119
- package/es5/modules/olderversions/router-with-templates-1.js +0 -785
- package/es5/modules/olderversions/router-with-templates.js +0 -701
- package/es5/modules/prototypes/ajax.js +0 -657
- package/es5/modules/prototypes/atom.js +0 -65
- package/es5/modules/prototypes/component.js +0 -972
- package/es5/modules/prototypes/data-binder.js +0 -1089
- package/es5/modules/prototypes/data.js +0 -1290
- package/es5/modules/prototypes/html-builder.js +0 -414
- package/es5/modules/prototypes/layout.js +0 -879
- package/es5/modules/router.js +0 -1680
- package/es5/modules/state.js +0 -274
- package/es6/.jshintrc +0 -3
- package/es6/base.js +0 -41
- package/es6/core.js +0 -1
- package/es6/data-tracker.js +0 -351
- package/es6/events.js +0 -602
- package/es6/legacy/es5/base.js +0 -2968
- package/es6/legacy/es5/modules/ajax.js +0 -663
- package/es6/legacy/es5/modules/animation.js +0 -188
- package/es6/legacy/es5/modules/animations.js +0 -1080
- package/es6/legacy/es5/modules/atom.js +0 -65
- package/es6/legacy/es5/modules/component.js +0 -1310
- package/es6/legacy/es5/modules/data-binder.js +0 -1131
- package/es6/legacy/es5/modules/data.js +0 -1808
- package/es6/legacy/es5/modules/date.js +0 -525
- package/es6/legacy/es5/modules/form-validator.js +0 -324
- package/es6/legacy/es5/modules/history.js +0 -126
- package/es6/legacy/es5/modules/html-builder.js +0 -461
- package/es6/legacy/es5/modules/layout.js +0 -1679
- package/es6/legacy/es5/modules/mouse.js +0 -124
- package/es6/legacy/es5/modules/nav-link.js +0 -123
- package/es6/legacy/es5/modules/olderversions/animations-ease.js +0 -1095
- package/es6/legacy/es5/modules/olderversions/animations-update.js +0 -1048
- package/es6/legacy/es5/modules/olderversions/base-animations.js +0 -636
- package/es6/legacy/es5/modules/olderversions/base-component-class.js +0 -100
- package/es6/legacy/es5/modules/olderversions/base-data-binder-1.js +0 -407
- package/es6/legacy/es5/modules/olderversions/base-data-binder-class.js +0 -358
- package/es6/legacy/es5/modules/olderversions/base-layout-parser-class.js +0 -172
- package/es6/legacy/es5/modules/olderversions/base-mode-1.js +0 -777
- package/es6/legacy/es5/modules/olderversions/base-model-class.js +0 -585
- package/es6/legacy/es5/modules/olderversions/data-binder/element-binding/base-data-binder-class.js +0 -358
- package/es6/legacy/es5/modules/olderversions/data-binder/element-binding/base-model-class.js +0 -585
- package/es6/legacy/es5/modules/olderversions/data-binder/model-binding/base-data-binder-class.js +0 -353
- package/es6/legacy/es5/modules/olderversions/data-binder/model-binding/base-model-class.js +0 -604
- package/es6/legacy/es5/modules/olderversions/data-binder-update-watcher.js +0 -640
- package/es6/legacy/es5/modules/olderversions/data-tracker.js +0 -187
- package/es6/legacy/es5/modules/olderversions/event-update.js +0 -666
- package/es6/legacy/es5/modules/olderversions/nav-link.js +0 -119
- package/es6/legacy/es5/modules/olderversions/router-with-templates-1.js +0 -785
- package/es6/legacy/es5/modules/olderversions/router-with-templates.js +0 -701
- package/es6/legacy/es5/modules/prototypes/ajax.js +0 -657
- package/es6/legacy/es5/modules/prototypes/atom.js +0 -65
- package/es6/legacy/es5/modules/prototypes/component.js +0 -972
- package/es6/legacy/es5/modules/prototypes/data-binder.js +0 -1089
- package/es6/legacy/es5/modules/prototypes/data.js +0 -1290
- package/es6/legacy/es5/modules/prototypes/html-builder.js +0 -414
- package/es6/legacy/es5/modules/prototypes/layout.js +0 -879
- package/es6/legacy/es5/modules/router.js +0 -1680
- package/es6/legacy/es5/modules/state.js +0 -274
- package/es6/main.js +0 -1331
- package/es6/modules/ajax/ajax.js +0 -514
- package/es6/modules/animation/animation.js +0 -236
- package/es6/modules/animations/animation-controller.js +0 -231
- package/es6/modules/animations/animation.js +0 -64
- package/es6/modules/animations/attr-movement.js +0 -66
- package/es6/modules/animations/css-movement.js +0 -170
- package/es6/modules/animations/movement.js +0 -131
- package/es6/modules/animations/value.js +0 -187
- package/es6/modules/atom/atom.js +0 -54
- package/es6/modules/component/component.js +0 -230
- package/es6/modules/component/event-helper.js +0 -119
- package/es6/modules/component/jot.js +0 -144
- package/es6/modules/component/state-helper.js +0 -262
- package/es6/modules/component/unit.js +0 -551
- package/es6/modules/data/attrs.js +0 -40
- package/es6/modules/data/basic-data.js +0 -500
- package/es6/modules/data/data-utils.js +0 -29
- package/es6/modules/data/data.js +0 -3
- package/es6/modules/data/deep-data.js +0 -541
- package/es6/modules/data/model-service.js +0 -528
- package/es6/modules/data/model.js +0 -133
- package/es6/modules/data/simple-data.js +0 -33
- package/es6/modules/data-binder/connection-tracker.js +0 -113
- package/es6/modules/data-binder/connection.js +0 -16
- package/es6/modules/data-binder/data-binder.js +0 -352
- package/es6/modules/data-binder/data-pub-sub.js +0 -141
- package/es6/modules/data-binder/data-source.js +0 -56
- package/es6/modules/data-binder/element-source.js +0 -219
- package/es6/modules/data-binder/one-way-connection.js +0 -46
- package/es6/modules/data-binder/one-way-source.js +0 -43
- package/es6/modules/data-binder/source.js +0 -36
- package/es6/modules/data-binder/two-way-connection.js +0 -75
- package/es6/modules/data-binder/two-way-source.js +0 -41
- package/es6/modules/date/date.js +0 -544
- package/es6/modules/history/history.js +0 -89
- package/es6/modules/html-builder/html-builder.js +0 -434
- package/es6/modules/import/import.js +0 -390
- package/es6/modules/layout/layout-builder.js +0 -1269
- package/es6/modules/layout/layout-parser.js +0 -134
- package/es6/modules/layout/watcher-helper.js +0 -282
- package/es6/modules/mouse/mouse.js +0 -114
- package/es6/modules/router/component-helper.js +0 -163
- package/es6/modules/router/history-controller.js +0 -216
- package/es6/modules/router/nav-link.js +0 -124
- package/es6/modules/router/route.js +0 -401
- package/es6/modules/router/router.js +0 -789
- package/es6/modules/router/utils.js +0 -31
- package/es6/modules/state/state-target.js +0 -91
- package/es6/modules/state/state.js +0 -171
- package/es6/package-lock.json +0 -13
- package/es6/package.json +0 -28
- package/es6/shared/objects.js +0 -99
- package/events.js +0 -602
- package/legacy/es5/base.js +0 -2968
- package/legacy/es5/modules/ajax.js +0 -663
- package/legacy/es5/modules/animation.js +0 -188
- package/legacy/es5/modules/animations.js +0 -1080
- package/legacy/es5/modules/atom.js +0 -65
- package/legacy/es5/modules/component.js +0 -1310
- package/legacy/es5/modules/data-binder.js +0 -1131
- package/legacy/es5/modules/data.js +0 -1808
- package/legacy/es5/modules/date.js +0 -525
- package/legacy/es5/modules/form-validator.js +0 -324
- package/legacy/es5/modules/history.js +0 -126
- package/legacy/es5/modules/html-builder.js +0 -461
- package/legacy/es5/modules/layout.js +0 -1679
- package/legacy/es5/modules/mouse.js +0 -124
- package/legacy/es5/modules/nav-link.js +0 -123
- package/legacy/es5/modules/olderversions/animations-ease.js +0 -1095
- package/legacy/es5/modules/olderversions/animations-update.js +0 -1048
- package/legacy/es5/modules/olderversions/base-animations.js +0 -636
- package/legacy/es5/modules/olderversions/base-component-class.js +0 -100
- package/legacy/es5/modules/olderversions/base-data-binder-1.js +0 -407
- package/legacy/es5/modules/olderversions/base-data-binder-class.js +0 -358
- package/legacy/es5/modules/olderversions/base-layout-parser-class.js +0 -172
- package/legacy/es5/modules/olderversions/base-mode-1.js +0 -777
- package/legacy/es5/modules/olderversions/base-model-class.js +0 -585
- package/legacy/es5/modules/olderversions/data-binder/element-binding/base-data-binder-class.js +0 -358
- package/legacy/es5/modules/olderversions/data-binder/element-binding/base-model-class.js +0 -585
- package/legacy/es5/modules/olderversions/data-binder/model-binding/base-data-binder-class.js +0 -353
- package/legacy/es5/modules/olderversions/data-binder/model-binding/base-model-class.js +0 -604
- package/legacy/es5/modules/olderversions/data-binder-update-watcher.js +0 -640
- package/legacy/es5/modules/olderversions/data-tracker.js +0 -187
- package/legacy/es5/modules/olderversions/event-update.js +0 -666
- package/legacy/es5/modules/olderversions/nav-link.js +0 -119
- package/legacy/es5/modules/olderversions/router-with-templates-1.js +0 -785
- package/legacy/es5/modules/olderversions/router-with-templates.js +0 -701
- package/legacy/es5/modules/prototypes/ajax.js +0 -657
- package/legacy/es5/modules/prototypes/atom.js +0 -65
- package/legacy/es5/modules/prototypes/component.js +0 -972
- package/legacy/es5/modules/prototypes/data-binder.js +0 -1089
- package/legacy/es5/modules/prototypes/data.js +0 -1290
- package/legacy/es5/modules/prototypes/html-builder.js +0 -414
- package/legacy/es5/modules/prototypes/layout.js +0 -879
- package/legacy/es5/modules/router.js +0 -1680
- package/legacy/es5/modules/state.js +0 -274
- package/main.js +0 -1331
- package/modules/ajax/ajax.js +0 -514
- package/modules/animation/animation.js +0 -236
- package/modules/animations/animation-controller.js +0 -231
- package/modules/animations/animation.js +0 -64
- package/modules/animations/attr-movement.js +0 -66
- package/modules/animations/css-movement.js +0 -170
- package/modules/animations/movement.js +0 -131
- package/modules/animations/value.js +0 -187
- package/modules/atom/atom.js +0 -54
- package/modules/component/component.js +0 -230
- package/modules/component/event-helper.js +0 -119
- package/modules/component/jot.js +0 -144
- package/modules/component/state-helper.js +0 -262
- package/modules/component/unit.js +0 -551
- package/modules/data/attrs.js +0 -40
- package/modules/data/basic-data.js +0 -500
- package/modules/data/data-utils.js +0 -29
- package/modules/data/data.js +0 -3
- package/modules/data/deep-data.js +0 -541
- package/modules/data/model-service.js +0 -528
- package/modules/data/model.js +0 -133
- package/modules/data/simple-data.js +0 -33
- package/modules/data-binder/connection-tracker.js +0 -113
- package/modules/data-binder/connection.js +0 -16
- package/modules/data-binder/data-binder.js +0 -352
- package/modules/data-binder/data-pub-sub.js +0 -141
- package/modules/data-binder/data-source.js +0 -56
- package/modules/data-binder/element-source.js +0 -219
- package/modules/data-binder/one-way-connection.js +0 -46
- package/modules/data-binder/one-way-source.js +0 -43
- package/modules/data-binder/source.js +0 -36
- package/modules/data-binder/two-way-connection.js +0 -75
- package/modules/data-binder/two-way-source.js +0 -41
- package/modules/date/date.js +0 -544
- package/modules/history/history.js +0 -89
- package/modules/html-builder/html-builder.js +0 -434
- package/modules/import/import.js +0 -390
- package/modules/layout/layout-builder.js +0 -1269
- package/modules/layout/layout-parser.js +0 -134
- package/modules/layout/watcher-helper.js +0 -282
- package/modules/mouse/mouse.js +0 -114
- package/modules/router/component-helper.js +0 -163
- package/modules/router/history-controller.js +0 -216
- package/modules/router/nav-link.js +0 -124
- package/modules/router/route.js +0 -401
- package/modules/router/router.js +0 -789
- package/modules/router/utils.js +0 -31
- package/modules/state/state-target.js +0 -91
- package/modules/state/state.js +0 -171
- package/shared/objects.js +0 -99
- package/update +0 -16
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
/* base framework module */
|
|
2
|
-
/*
|
|
3
|
-
css animation add and remove with full object
|
|
4
|
-
animation tracking
|
|
5
|
-
*/
|
|
6
|
-
(function()
|
|
7
|
-
{
|
|
8
|
-
"use strict";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* This will remove a class and hide an element.
|
|
12
|
-
*
|
|
13
|
-
* @param {object} obj
|
|
14
|
-
* @param {string} animationClass
|
|
15
|
-
* @param {function} callBack
|
|
16
|
-
*/
|
|
17
|
-
var removeClassAndHide = function(obj, animationClass, callBack)
|
|
18
|
-
{
|
|
19
|
-
obj.style.display = 'none';
|
|
20
|
-
removeAnimationClass(obj, animationClass, callBack);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* This will remove a class when the animation is finished.
|
|
25
|
-
*
|
|
26
|
-
* @param {object} obj
|
|
27
|
-
* @param {string} animationClass
|
|
28
|
-
* @param {function} callBack
|
|
29
|
-
*/
|
|
30
|
-
var removeAnimationClass = function(obj, animationClass, callBack)
|
|
31
|
-
{
|
|
32
|
-
if(typeof callBack === 'function')
|
|
33
|
-
{
|
|
34
|
-
callBack.call();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
base.removeClass(obj, animationClass);
|
|
38
|
-
base.animate.animating.remove(obj);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var getElement = function(element)
|
|
42
|
-
{
|
|
43
|
-
return (typeof element === 'string')? document.getElementById(element) : element;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/* this will add and remove css animations */
|
|
47
|
-
base.extend.animate =
|
|
48
|
-
{
|
|
49
|
-
/* this class tracks all objects being animated and can
|
|
50
|
-
add and remove them when completed */
|
|
51
|
-
animating:
|
|
52
|
-
{
|
|
53
|
-
objects: [],
|
|
54
|
-
|
|
55
|
-
add: function(object, className, timer)
|
|
56
|
-
{
|
|
57
|
-
if(!object)
|
|
58
|
-
{
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
this.stopPreviousAnimations(object);
|
|
63
|
-
this.objects.push({
|
|
64
|
-
object: object,
|
|
65
|
-
className: className,
|
|
66
|
-
timer: timer
|
|
67
|
-
});
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
remove: function(object, removeClass)
|
|
71
|
-
{
|
|
72
|
-
if(!object)
|
|
73
|
-
{
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
var animations = this.checkAnimating(object);
|
|
78
|
-
if(animations === false)
|
|
79
|
-
{
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
var animation, indexNumber;
|
|
84
|
-
var objects = this.objects;
|
|
85
|
-
for(var i = 0, maxLength = animations.length; i < maxLength; i++)
|
|
86
|
-
{
|
|
87
|
-
animation = animations[i];
|
|
88
|
-
/* we want to stop the timer */
|
|
89
|
-
this.stopTimer(animation);
|
|
90
|
-
|
|
91
|
-
if(removeClass)
|
|
92
|
-
{
|
|
93
|
-
/* we want to remove the className */
|
|
94
|
-
base.removeClass(animation.object, animation.className);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/* we want to remove the animation fron the object array */
|
|
98
|
-
//var indexNumber = this.objects.indexOf(animation);
|
|
99
|
-
indexNumber = base.inArray(objects, animation);
|
|
100
|
-
if(indexNumber > -1)
|
|
101
|
-
{
|
|
102
|
-
objects.splice(indexNumber, 1);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
stopTimer: function(animation)
|
|
108
|
-
{
|
|
109
|
-
if(animation)
|
|
110
|
-
{
|
|
111
|
-
var timer = animation.timer;
|
|
112
|
-
window.clearTimeout(timer);
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
checkAnimating: function(obj)
|
|
117
|
-
{
|
|
118
|
-
var animation,
|
|
119
|
-
animationArray = [];
|
|
120
|
-
|
|
121
|
-
/* we want to get any timers set for our object */
|
|
122
|
-
var objects = this.objects;
|
|
123
|
-
for(var i = 0, maxLength = objects.length; i < maxLength; i++)
|
|
124
|
-
{
|
|
125
|
-
animation = objects[i];
|
|
126
|
-
if(animation.object === obj)
|
|
127
|
-
{
|
|
128
|
-
animationArray.push(animation);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return (animationArray.length > 0)? animationArray : false;
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
stopPreviousAnimations: function(obj)
|
|
136
|
-
{
|
|
137
|
-
/* we want to remove the timers and class names
|
|
138
|
-
from the object */
|
|
139
|
-
this.remove(obj, 1);
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
reset: function()
|
|
143
|
-
{
|
|
144
|
-
this.objects = [];
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
create: function(obj, animationClass, duration, callBack, endCallBack)
|
|
149
|
-
{
|
|
150
|
-
var animationCallBack = base.createCallBack(null, callBack, [obj, animationClass, endCallBack]);
|
|
151
|
-
|
|
152
|
-
var timer = window.setTimeout(animationCallBack, duration);
|
|
153
|
-
this.animating.add(obj, animationClass, timer);
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
/* this will perform an animation on the object and
|
|
157
|
-
then turn the object to display none after the
|
|
158
|
-
duration */
|
|
159
|
-
hide: function(object, animationClass, duration, endCallBack)
|
|
160
|
-
{
|
|
161
|
-
var obj = getElement(object);
|
|
162
|
-
base.addClass(obj, animationClass);
|
|
163
|
-
|
|
164
|
-
this.create(obj, animationClass, duration, removeClassAndHide, endCallBack);
|
|
165
|
-
},
|
|
166
|
-
|
|
167
|
-
/* this will dsiplay the object then perform an animation
|
|
168
|
-
on the object and remove the class after the duration */
|
|
169
|
-
show: function(object, animationClass, duration, endCallBack)
|
|
170
|
-
{
|
|
171
|
-
var obj = getElement(object);
|
|
172
|
-
base.addClass(obj, animationClass);
|
|
173
|
-
obj.style.display = 'block';
|
|
174
|
-
|
|
175
|
-
this.create(obj, animationClass, duration, removeAnimationClass, endCallBack);
|
|
176
|
-
},
|
|
177
|
-
|
|
178
|
-
/* this will add an animation class on the object then
|
|
179
|
-
it will remove the class when the duration is done */
|
|
180
|
-
set: function(object, animationClass, duration, endCallBack)
|
|
181
|
-
{
|
|
182
|
-
var obj = getElement(object);
|
|
183
|
-
base.addClass(obj, animationClass);
|
|
184
|
-
|
|
185
|
-
this.create(obj, animationClass, duration, removeAnimationClass, endCallBack);
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
})();
|