@akylas/nativescript 8.2.2 → 8.2.4-alpha.4

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.
Files changed (155) hide show
  1. package/accessibility/index.ios.js +1 -1
  2. package/accessibility/index.ios.js.map +1 -1
  3. package/application/application-common.d.ts +4 -0
  4. package/application/application-common.js +8 -0
  5. package/application/application-common.js.map +1 -1
  6. package/application/index.android.d.ts +2 -2
  7. package/application/index.android.js +10 -3
  8. package/application/index.android.js.map +1 -1
  9. package/application/index.ios.d.ts +2 -0
  10. package/application/index.ios.js +11 -0
  11. package/application/index.ios.js.map +1 -1
  12. package/core-types/index.d.ts +1 -0
  13. package/core-types/index.js.map +1 -1
  14. package/css/LICENSE +9 -0
  15. package/css/Readme.md +278 -0
  16. package/css-value/LICENSE +9 -0
  17. package/css-value/Readme.md +45 -0
  18. package/css-value/UPGRADING.md +26 -0
  19. package/fetch/LICENSE +20 -0
  20. package/fetch/README.md +1 -0
  21. package/file-system/file-system-access.android.d.ts +1 -0
  22. package/file-system/file-system-access.android.js +1 -0
  23. package/file-system/file-system-access.android.js.map +1 -1
  24. package/file-system/file-system-access.ios.d.ts +2 -0
  25. package/file-system/file-system-access.ios.js +3 -0
  26. package/file-system/file-system-access.ios.js.map +1 -1
  27. package/file-system/index.js +17 -7
  28. package/file-system/index.js.map +1 -1
  29. package/index.d.ts +9 -2
  30. package/index.js +14 -2
  31. package/index.js.map +1 -1
  32. package/js-libs/easysax/LICENSE +20 -0
  33. package/js-libs/easysax/README.md +46 -0
  34. package/js-libs/esprima/LICENSE.BSD +19 -0
  35. package/js-libs/esprima/README.md +24 -0
  36. package/js-libs/polymer-expressions/LICENSE +27 -0
  37. package/js-libs/polymer-expressions/README.md +0 -0
  38. package/package.json +5 -13
  39. package/platforms/README.md +1 -0
  40. package/platforms/android/widgets-release.aar +0 -0
  41. package/ui/animation/animation-common.d.ts +7 -4
  42. package/ui/animation/animation-common.js +55 -117
  43. package/ui/animation/animation-common.js.map +1 -1
  44. package/ui/animation/animation-interfaces.d.ts +3 -2
  45. package/ui/animation/index.android.d.ts +15 -14
  46. package/ui/animation/index.android.js +99 -22
  47. package/ui/animation/index.android.js.map +1 -1
  48. package/ui/animation/index.ios.d.ts +33 -16
  49. package/ui/animation/index.ios.js +256 -202
  50. package/ui/animation/index.ios.js.map +1 -1
  51. package/ui/animation/keyframe-animation.d.ts +0 -1
  52. package/ui/animation/keyframe-animation.js +51 -51
  53. package/ui/animation/keyframe-animation.js.map +1 -1
  54. package/ui/button/index.ios.js +1 -1
  55. package/ui/button/index.ios.js.map +1 -1
  56. package/ui/core/properties/index.d.ts +37 -6
  57. package/ui/core/properties/index.js +434 -643
  58. package/ui/core/properties/index.js.map +1 -1
  59. package/ui/core/view/index.android.d.ts +1 -0
  60. package/ui/core/view/index.android.js +5 -2
  61. package/ui/core/view/index.android.js.map +1 -1
  62. package/ui/core/view/index.d.ts +5 -0
  63. package/ui/core/view/index.ios.d.ts +4 -2
  64. package/ui/core/view/index.ios.js +31 -10
  65. package/ui/core/view/index.ios.js.map +1 -1
  66. package/ui/core/view/view-common.d.ts +1 -0
  67. package/ui/core/view/view-common.js +6 -3
  68. package/ui/core/view/view-common.js.map +1 -1
  69. package/ui/core/view/view-helper/index.ios.js +2 -2
  70. package/ui/core/view-base/index.js +4 -5
  71. package/ui/core/view-base/index.js.map +1 -1
  72. package/ui/editable-text-base/editable-text-base-common.js +2 -1
  73. package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
  74. package/ui/frame/frame-common.d.ts +1 -1
  75. package/ui/frame/frame-common.js +15 -15
  76. package/ui/frame/frame-common.js.map +1 -1
  77. package/ui/frame/index.android.js +8 -3
  78. package/ui/frame/index.android.js.map +1 -1
  79. package/ui/html-view/html-view-common.js +2 -1
  80. package/ui/html-view/html-view-common.js.map +1 -1
  81. package/ui/image/image-common.js +2 -2
  82. package/ui/image/image-common.js.map +1 -1
  83. package/ui/label/index.ios.js +1 -1
  84. package/ui/label/index.ios.js.map +1 -1
  85. package/ui/layouts/root-layout/root-layout-common.js +2 -0
  86. package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
  87. package/ui/list-view/list-view-common.js +2 -2
  88. package/ui/list-view/list-view-common.js.map +1 -1
  89. package/ui/page/page-common.js +2 -1
  90. package/ui/page/page-common.js.map +1 -1
  91. package/ui/proxy-view-container/index.d.ts +2 -0
  92. package/ui/proxy-view-container/index.js +28 -0
  93. package/ui/proxy-view-container/index.js.map +1 -1
  94. package/ui/search-bar/search-bar-common.js +3 -2
  95. package/ui/search-bar/search-bar-common.js.map +1 -1
  96. package/ui/segmented-bar/segmented-bar-common.js +2 -1
  97. package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
  98. package/ui/styling/background.android.js +2 -0
  99. package/ui/styling/background.android.js.map +1 -1
  100. package/ui/styling/background.ios.js +21 -5
  101. package/ui/styling/background.ios.js.map +1 -1
  102. package/ui/styling/css-animation-parser.js +3 -2
  103. package/ui/styling/css-animation-parser.js.map +1 -1
  104. package/ui/styling/style/index.d.ts +1 -0
  105. package/ui/styling/style/index.js.map +1 -1
  106. package/ui/styling/style-properties.d.ts +1 -0
  107. package/ui/styling/style-properties.js +57 -69
  108. package/ui/styling/style-properties.js.map +1 -1
  109. package/ui/styling/style-scope.js +4 -10
  110. package/ui/styling/style-scope.js.map +1 -1
  111. package/ui/switch/switch-common.js +2 -1
  112. package/ui/switch/switch-common.js.map +1 -1
  113. package/ui/tab-view/index.ios.d.ts +1 -0
  114. package/ui/tab-view/index.ios.js +54 -24
  115. package/ui/tab-view/index.ios.js.map +1 -1
  116. package/ui/tab-view/tab-view-common.js +5 -4
  117. package/ui/tab-view/tab-view-common.js.map +1 -1
  118. package/ui/text-base/index.android.js +10 -1
  119. package/ui/text-base/index.android.js.map +1 -1
  120. package/ui/text-base/index.d.ts +5 -0
  121. package/ui/text-base/index.ios.js +20 -0
  122. package/ui/text-base/index.ios.js.map +1 -1
  123. package/ui/text-base/text-base-common.d.ts +3 -0
  124. package/ui/text-base/text-base-common.js +12 -0
  125. package/ui/text-base/text-base-common.js.map +1 -1
  126. package/ui/text-view/index.android.js +1 -11
  127. package/ui/text-view/index.android.js.map +1 -1
  128. package/ui/text-view/index.ios.js +1 -13
  129. package/ui/text-view/index.ios.js.map +1 -1
  130. package/ui/text-view/text-view-common.d.ts +0 -2
  131. package/ui/text-view/text-view-common.js +0 -6
  132. package/ui/text-view/text-view-common.js.map +1 -1
  133. package/utils/index.d.ts +6 -0
  134. package/utils/mainthread-helper.android.d.ts +1 -0
  135. package/utils/mainthread-helper.android.js +7 -0
  136. package/utils/mainthread-helper.android.js.map +1 -1
  137. package/utils/mainthread-helper.d.ts +6 -0
  138. package/utils/mainthread-helper.ios.d.ts +1 -0
  139. package/utils/mainthread-helper.ios.js +10 -0
  140. package/utils/mainthread-helper.ios.js.map +1 -1
  141. package/utils/native-helper.android.d.ts +2 -0
  142. package/utils/native-helper.android.js +127 -0
  143. package/utils/native-helper.android.js.map +1 -1
  144. package/utils/native-helper.d.ts +17 -0
  145. package/utils/native-helper.ios.d.ts +2 -0
  146. package/utils/native-helper.ios.js +80 -0
  147. package/utils/native-helper.ios.js.map +1 -1
  148. package/utils/types.d.ts +2 -0
  149. package/utils/types.js +6 -0
  150. package/utils/types.js.map +1 -1
  151. package/utils/utils-common.d.ts +1 -0
  152. package/utils/utils-common.js +4 -1
  153. package/utils/utils-common.js.map +1 -1
  154. package/platforms/android/core.aar +0 -0
  155. package/platforms/android/nativescript.aar +0 -0
@@ -1,8 +1,11 @@
1
1
  // Requires.
2
- import { Color } from '../../color';
3
2
  import { Trace } from '../../trace';
4
- import { PercentLength } from '../styling/style-properties';
3
+ import { Style } from '../styling/style';
4
+ import { CssAnimationProperty, CssProperty, InheritedCssProperty, ShorthandProperty } from '../core/properties';
5
5
  export * from './animation-interfaces';
6
+ export function getPropertyFromKey(key, view) {
7
+ return CssAnimationProperty.properties[key] || ShorthandProperty.properties[key] || InheritedCssProperty.properties[key] || CssProperty.properties[key] || Style.prototype[key] || Object.getPrototypeOf(view)[key];
8
+ }
6
9
  export var Properties;
7
10
  (function (Properties) {
8
11
  Properties.opacity = 'opacity';
@@ -13,6 +16,7 @@ export var Properties;
13
16
  Properties.height = 'height';
14
17
  Properties.width = 'width';
15
18
  })(Properties || (Properties = {}));
19
+ export const AnimationNonAnimatableProperties = ['duration', 'valueSource', 'delay', 'iterations', 'curve', 'target'];
16
20
  export class CubicBezierAnimationCurve {
17
21
  constructor(x1, y1, x2, y2) {
18
22
  this.x1 = x1;
@@ -30,12 +34,12 @@ export class AnimationBase {
30
34
  Trace.write('Analyzing ' + animationDefinitions.length + ' animation definitions...', Trace.categories.Animation);
31
35
  }
32
36
  this._propertyAnimations = new Array();
33
- for (let i = 0, length = animationDefinitions.length; i < length; i++) {
34
- if (animationDefinitions[i].curve) {
35
- animationDefinitions[i].curve = this._resolveAnimationCurve(animationDefinitions[i].curve);
37
+ animationDefinitions.forEach((animationDefinition) => {
38
+ if (animationDefinition.curve) {
39
+ animationDefinition.curve = this._resolveAnimationCurve(animationDefinition.curve);
36
40
  }
37
- this._propertyAnimations = this._propertyAnimations.concat(AnimationBase._createPropertyAnimations(animationDefinitions[i]));
38
- }
41
+ this._propertyAnimations.push(...this._createPropertyAnimations(animationDefinition));
42
+ });
39
43
  if (this._propertyAnimations.length === 0) {
40
44
  throw new Error('Nothing to animate.');
41
45
  }
@@ -97,127 +101,61 @@ export class AnimationBase {
97
101
  this._isPlaying = false;
98
102
  this._reject(new Error('Animation cancelled.'));
99
103
  }
100
- static _createPropertyAnimations(animationDefinition) {
104
+ _createPropertyAnimations(animationDefinition) {
101
105
  if (!animationDefinition.target) {
102
106
  throw new Error('No animation target specified.');
103
107
  }
108
+ const propertyAnimations = new Array();
104
109
  for (const item in animationDefinition) {
105
110
  const value = animationDefinition[item];
106
111
  if (value === undefined) {
107
112
  continue;
108
113
  }
109
- if ((item === Properties.opacity || item === 'duration' || item === 'delay' || item === 'iterations') && typeof value !== 'number') {
110
- throw new Error(`Property ${item} must be valid number. Value: ${value}`);
111
- }
112
- else if ((item === Properties.scale || item === Properties.translate) && (typeof value.x !== 'number' || typeof value.y !== 'number')) {
113
- throw new Error(`Property ${item} must be valid Pair. Value: ${value}`);
114
- }
115
- else if (item === Properties.backgroundColor && !Color.isValid(animationDefinition.backgroundColor)) {
116
- throw new Error(`Property ${item} must be valid color. Value: ${value}`);
117
- }
118
- else if (item === Properties.width || item === Properties.height) {
119
- // Coerce input into a PercentLength object in case it's a string.
120
- animationDefinition[item] = PercentLength.parse(value);
121
- }
122
- else if (item === Properties.rotate) {
123
- const rotate = value;
124
- if (typeof rotate !== 'number' && !(typeof rotate.x === 'number' && typeof rotate.y === 'number' && typeof rotate.z === 'number')) {
125
- throw new Error(`Property ${rotate} must be valid number or Point3D. Value: ${value}`);
114
+ if (AnimationNonAnimatableProperties.indexOf(item) !== -1) {
115
+ if (item === 'duration' || item === 'delay' || item === 'iterations') {
116
+ if (typeof value !== 'number') {
117
+ throw new Error(`Property ${item} must be valid number. Value: ${value}`);
118
+ }
126
119
  }
120
+ continue;
127
121
  }
128
- }
129
- const propertyAnimations = new Array();
130
- // opacity
131
- if (animationDefinition.opacity !== undefined) {
132
- propertyAnimations.push({
133
- target: animationDefinition.target,
134
- property: Properties.opacity,
135
- value: animationDefinition.opacity,
136
- duration: animationDefinition.duration,
137
- delay: animationDefinition.delay,
138
- iterations: animationDefinition.iterations,
139
- curve: animationDefinition.curve,
140
- });
141
- }
142
- // backgroundColor
143
- if (animationDefinition.backgroundColor !== undefined) {
144
- propertyAnimations.push({
145
- target: animationDefinition.target,
146
- property: Properties.backgroundColor,
147
- value: typeof animationDefinition.backgroundColor === 'string' ? new Color(animationDefinition.backgroundColor) : animationDefinition.backgroundColor,
148
- duration: animationDefinition.duration,
149
- delay: animationDefinition.delay,
150
- iterations: animationDefinition.iterations,
151
- curve: animationDefinition.curve,
152
- });
153
- }
154
- // translate
155
- if (animationDefinition.translate !== undefined) {
156
- propertyAnimations.push({
157
- target: animationDefinition.target,
158
- property: Properties.translate,
159
- value: animationDefinition.translate,
160
- duration: animationDefinition.duration,
161
- delay: animationDefinition.delay,
162
- iterations: animationDefinition.iterations,
163
- curve: animationDefinition.curve,
164
- });
165
- }
166
- // scale
167
- if (animationDefinition.scale !== undefined) {
168
- propertyAnimations.push({
169
- target: animationDefinition.target,
170
- property: Properties.scale,
171
- value: animationDefinition.scale,
172
- duration: animationDefinition.duration,
173
- delay: animationDefinition.delay,
174
- iterations: animationDefinition.iterations,
175
- curve: animationDefinition.curve,
176
- });
177
- }
178
- // rotate
179
- if (animationDefinition.rotate !== undefined) {
180
- // Make sure the value of the rotation property is always Point3D
181
- let rotationValue;
182
- if (typeof animationDefinition.rotate === 'number') {
183
- rotationValue = { x: 0, y: 0, z: animationDefinition.rotate };
122
+ let property = getPropertyFromKey(item, animationDefinition.target);
123
+ if (item === Properties.scale || item === Properties.translate) {
124
+ property = CssAnimationProperty.properties[item + 'X'];
184
125
  }
185
- else {
186
- rotationValue = animationDefinition.rotate;
126
+ if (property) {
127
+ let newValue = value;
128
+ const valueConverter = property.valueConverter;
129
+ if ((item === Properties.scale || item === Properties.translate) && typeof value !== 'object') {
130
+ throw new Error(`Property ${item} must be valid Pair. Value: ${value}`);
131
+ }
132
+ if (valueConverter) {
133
+ if (item === Properties.translate || item === Properties.rotate || item === Properties.scale) {
134
+ newValue = {};
135
+ if (Properties.rotate && typeof value !== 'object') {
136
+ newValue = { x: 0, y: 0, z: typeof value === 'string' ? valueConverter(value) : value };
137
+ }
138
+ else {
139
+ Object.keys(value).forEach((k2) => {
140
+ newValue[k2] = typeof value[k2] === 'string' ? valueConverter(value[k2]) : value[k2];
141
+ });
142
+ }
143
+ }
144
+ else {
145
+ newValue = typeof value === 'string' ? valueConverter(value) : value;
146
+ }
147
+ }
148
+ propertyAnimations.push({
149
+ target: animationDefinition.target,
150
+ propertyName: item,
151
+ property,
152
+ value: newValue,
153
+ duration: animationDefinition.duration,
154
+ delay: animationDefinition.delay,
155
+ iterations: animationDefinition.iterations,
156
+ curve: animationDefinition.curve,
157
+ });
187
158
  }
188
- propertyAnimations.push({
189
- target: animationDefinition.target,
190
- property: Properties.rotate,
191
- value: rotationValue,
192
- duration: animationDefinition.duration,
193
- delay: animationDefinition.delay,
194
- iterations: animationDefinition.iterations,
195
- curve: animationDefinition.curve,
196
- });
197
- }
198
- // height
199
- if (animationDefinition.height !== undefined) {
200
- propertyAnimations.push({
201
- target: animationDefinition.target,
202
- property: Properties.height,
203
- value: animationDefinition.height,
204
- duration: animationDefinition.duration,
205
- delay: animationDefinition.delay,
206
- iterations: animationDefinition.iterations,
207
- curve: animationDefinition.curve,
208
- });
209
- }
210
- // width
211
- if (animationDefinition.width !== undefined) {
212
- propertyAnimations.push({
213
- target: animationDefinition.target,
214
- property: Properties.width,
215
- value: animationDefinition.width,
216
- duration: animationDefinition.duration,
217
- delay: animationDefinition.delay,
218
- iterations: animationDefinition.iterations,
219
- curve: animationDefinition.curve,
220
- });
221
159
  }
222
160
  if (propertyAnimations.length === 0) {
223
161
  throw new Error('No known animation properties specified');
@@ -227,7 +165,7 @@ export class AnimationBase {
227
165
  static _getAnimationInfo(animation) {
228
166
  return JSON.stringify({
229
167
  target: animation.target.id,
230
- property: animation.property,
168
+ propertyName: animation.propertyName,
231
169
  value: animation.value,
232
170
  duration: animation.duration,
233
171
  delay: animation.delay,
@@ -1 +1 @@
1
- {"version":3,"file":"animation-common.js","sourceRoot":"","sources":["../../../../../packages/core/ui/animation/animation-common.ts"],"names":[],"mappings":"AAIA,YAAY;AACZ,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,cAAc,wBAAwB,CAAC;AAEvC,MAAM,KAAW,UAAU,CAQ1B;AARD,WAAiB,UAAU;IACb,kBAAO,GAAG,SAA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YAC5B,KAAK,EAAE,SAAS,CAAC,KAAK;YACtB,QAAQ,EAAE,SAAS,CAAC,QAAQ;YAC5B,KAAK,EAAE,SAAS,CAAC,KAAK;YACtB,UAAU,EAAE,SAAS,CAAC,UAAU;YAChC,KAAK,EAAE,SAAS,CAAC,KAAK;SACtB,CAAC,CAAC;IACJ,CAAC;CACD"}
1
+ {"version":3,"file":"animation-common.js","sourceRoot":"","sources":["../../../../../packages/core/ui/animation/animation-common.ts"],"names":[],"mappings":"AAIA,YAAY;AACZ,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGhH,cAAc,wBAAwB,CAAC;AAEvC,MAAM,UAAU,kBAAkB,CAAC,GAAW,EAAE,IAAU;IACzD,OAAO,oBAAoB,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,iBAAiB,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,oBAAoB,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;AACrN,CAAC;AAED,MAAM,KAAW,UAAU,CAQ1B;AARD,WAAiB,UAAU;IACb,kBAAO,GAAG,SAAS,CAAC;IACpB,0BAAe,GAAG,iBAAiB,CAAC;IACpC,oBAAS,GAAG,WAAW,CAAC;IACxB,iBAAM,GAAG,QAAQ,CAAC;IAClB,gBAAK,GAAG,OAAO,CAAC;IAChB,iBAAM,GAAG,QAAQ,CAAC;IAClB,gBAAK,GAAG,OAAO,CAAC;AAC9B,CAAC,EARgB,UAAU,KAAV,UAAU,QAQ1B;AAED,MAAM,CAAC,MAAM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AAK;SACtB,CAAC,CAAC;IACJ,CAAC;CACD"}
@@ -25,7 +25,8 @@ export interface Cancelable {
25
25
  }
26
26
  export interface PropertyAnimation {
27
27
  target: View;
28
- property: string;
28
+ property: any;
29
+ propertyName: string;
29
30
  value: any;
30
31
  duration?: number;
31
32
  delay?: number;
@@ -56,5 +57,5 @@ export interface AnimationDefinitionInternal extends AnimationDefinition {
56
57
  export interface IOSView extends View {
57
58
  _suspendPresentationLayerUpdates(): any;
58
59
  _resumePresentationLayerUpdates(): any;
59
- _isPresentationLayerUpdateSuspeneded(): any;
60
+ _isPresentationLayerUpdateSuspended(): any;
60
61
  }
@@ -1,24 +1,25 @@
1
- import { AnimationDefinitionInternal, AnimationPromise } from './animation-common';
1
+ import { AnimationDefinitionInternal, AnimationPromise, PropertyAnimation } from './animation-common';
2
+ import { View } from '../core/view';
2
3
  import { AnimationBase, CubicBezierAnimationCurve } from './animation-common';
3
4
  export * from './animation-common';
4
5
  export { KeyframeAnimation, KeyframeAnimationInfo, KeyframeDeclaration, KeyframeInfo } from './keyframe-animation';
5
6
  export declare function _resolveAnimationCurve(curve: string | CubicBezierAnimationCurve | android.view.animation.Interpolator | android.view.animation.LinearInterpolator): android.view.animation.Interpolator;
6
7
  export declare class Animation extends AnimationBase {
7
- private _animatorListener;
8
- private _nativeAnimatorsArray;
9
- private _animatorSet;
10
- private _animators;
11
- private _propertyUpdateCallbacks;
12
- private _propertyResetCallbacks;
13
- private _valueSource;
14
- private _target;
15
- private _resetOnFinish;
8
+ protected _animatorListener: android.animation.Animator.AnimatorListener;
9
+ protected _nativeAnimatorsArray: any;
10
+ protected _animatorSet: android.animation.AnimatorSet;
11
+ protected _animators: Array<android.animation.Animator>;
12
+ protected _propertyUpdateCallbacks: Array<Function>;
13
+ protected _propertyResetCallbacks: Array<Function>;
14
+ protected _valueSource: 'animation' | 'keyframe';
15
+ protected _target: View;
16
+ protected _resetOnFinish: boolean;
16
17
  constructor(animationDefinitions: Array<AnimationDefinitionInternal>, playSequentially?: boolean);
17
18
  play(resetOnFinish?: boolean): AnimationPromise;
18
19
  cancel(): void;
19
20
  _resolveAnimationCurve(curve: string | CubicBezierAnimationCurve | android.view.animation.Interpolator): android.view.animation.Interpolator;
20
- private _play;
21
- private _onAndroidAnimationEnd;
22
- private _onAndroidAnimationCancel;
23
- private _createAnimators;
21
+ protected _play(): void;
22
+ protected _onAndroidAnimationEnd(): void;
23
+ protected _onAndroidAnimationCancel(): void;
24
+ protected _createAnimators(propertyAnimation: PropertyAnimation): void;
24
25
  }
@@ -1,5 +1,5 @@
1
1
  // Requires
2
- import { AnimationBase, Properties, CubicBezierAnimationCurve } from './animation-common';
2
+ import { AnimationBase, CubicBezierAnimationCurve } from './animation-common';
3
3
  import { Color } from '../../color';
4
4
  import { Trace } from '../../trace';
5
5
  import { opacityProperty, backgroundColorProperty, rotateProperty, rotateXProperty, rotateYProperty, translateXProperty, translateYProperty, scaleXProperty, scaleYProperty, heightProperty, widthProperty, PercentLength } from '../styling/style-properties';
@@ -169,6 +169,8 @@ export class Animation extends AnimationBase {
169
169
  this._animatorSet.addListener(this._animatorListener);
170
170
  }
171
171
  if (this._animators.length > 0) {
172
+ // TODO: fix sequentially which wont work because all animators values are computed before
173
+ // the first one starts...
172
174
  if (this._playSequentially) {
173
175
  this._animatorSet.playSequentially(this._nativeAnimatorsArray);
174
176
  }
@@ -183,7 +185,6 @@ export class Animation extends AnimationBase {
183
185
  this._animatorSet.start();
184
186
  }
185
187
  _onAndroidAnimationEnd() {
186
- // tslint:disable-line
187
188
  if (!this.isPlaying) {
188
189
  // It has been cancelled
189
190
  return;
@@ -195,7 +196,6 @@ export class Animation extends AnimationBase {
195
196
  }
196
197
  }
197
198
  _onAndroidAnimationCancel() {
198
- // tslint:disable-line
199
199
  this._propertyResetCallbacks.forEach((v) => v());
200
200
  this._rejectAnimationFinishedPromise();
201
201
  if (this._target) {
@@ -210,13 +210,13 @@ export class Animation extends AnimationBase {
210
210
  Trace.write('Creating ObjectAnimator(s) for animation: ' + Animation._getAnimationInfo(propertyAnimation) + '...', Trace.categories.Animation);
211
211
  }
212
212
  if (propertyAnimation.target === null || propertyAnimation.target === undefined) {
213
- throw new Error(`Animation target cannot be null or undefined; property: ${propertyAnimation.property}; value: ${propertyAnimation.value};`);
213
+ throw new Error(`Animation target cannot be null or undefined; property: ${propertyAnimation.propertyName}; value: ${propertyAnimation.value};`);
214
214
  }
215
- if (propertyAnimation.property === null || propertyAnimation.property === undefined) {
215
+ if (propertyAnimation.propertyName === null || propertyAnimation.propertyName === undefined) {
216
216
  throw new Error(`Animation property cannot be null or undefined; target: ${propertyAnimation.target}; value: ${propertyAnimation.value};`);
217
217
  }
218
218
  if (propertyAnimation.value === null || propertyAnimation.value === undefined) {
219
- throw new Error(`Animation value cannot be null or undefined; target: ${propertyAnimation.target}; property: ${propertyAnimation.property};`);
219
+ throw new Error(`Animation value cannot be null or undefined; target: ${propertyAnimation.target}; property: ${propertyAnimation.propertyName};`);
220
220
  }
221
221
  this._target = propertyAnimation.target;
222
222
  const nativeView = propertyAnimation.target.nativeViewProtected;
@@ -229,8 +229,9 @@ export class Animation extends AnimationBase {
229
229
  const density = layout.getDisplayDensity();
230
230
  const setLocal = this._valueSource === 'animation';
231
231
  const style = propertyAnimation.target.style;
232
- switch (propertyAnimation.property) {
233
- case Properties.opacity:
232
+ const propName = propertyAnimation.propertyName;
233
+ switch (propName) {
234
+ case 'opacity':
234
235
  opacityProperty._initDefaultNativeValue(style);
235
236
  originalValue1 = nativeView.getAlpha();
236
237
  propertyUpdateCallbacks.push(() => {
@@ -249,7 +250,7 @@ export class Animation extends AnimationBase {
249
250
  });
250
251
  animators.push(createObjectAnimator(nativeView, 'alpha', propertyAnimation.value));
251
252
  break;
252
- case Properties.backgroundColor: {
253
+ case 'backgroundColor': {
253
254
  backgroundColorProperty._initDefaultNativeValue(style);
254
255
  ensureArgbEvaluator();
255
256
  originalValue1 = propertyAnimation.target.backgroundColor;
@@ -280,7 +281,7 @@ export class Animation extends AnimationBase {
280
281
  animators.push(animator);
281
282
  break;
282
283
  }
283
- case Properties.translate:
284
+ case 'translate':
284
285
  translateXProperty._initDefaultNativeValue(style);
285
286
  translateYProperty._initDefaultNativeValue(style);
286
287
  originalValue1 = nativeView.getTranslationX() / density;
@@ -305,7 +306,7 @@ export class Animation extends AnimationBase {
305
306
  });
306
307
  animators.push(createAnimationSet([createObjectAnimator(nativeView, 'translationX', propertyAnimation.value.x * density), createObjectAnimator(nativeView, 'translationY', propertyAnimation.value.y * density)], propertyAnimation.iterations));
307
308
  break;
308
- case Properties.scale:
309
+ case 'scale':
309
310
  scaleXProperty._initDefaultNativeValue(style);
310
311
  scaleYProperty._initDefaultNativeValue(style);
311
312
  originalValue1 = nativeView.getScaleX();
@@ -330,7 +331,7 @@ export class Animation extends AnimationBase {
330
331
  });
331
332
  animators.push(createAnimationSet([createObjectAnimator(nativeView, 'scaleX', propertyAnimation.value.x), createObjectAnimator(nativeView, 'scaleY', propertyAnimation.value.y)], propertyAnimation.iterations));
332
333
  break;
333
- case Properties.rotate:
334
+ case 'rotate':
334
335
  rotateProperty._initDefaultNativeValue(style);
335
336
  rotateXProperty._initDefaultNativeValue(style);
336
337
  rotateYProperty._initDefaultNativeValue(style);
@@ -361,29 +362,51 @@ export class Animation extends AnimationBase {
361
362
  });
362
363
  animators.push(createAnimationSet([createObjectAnimator(nativeView, 'rotationX', propertyAnimation.value.x), createObjectAnimator(nativeView, 'rotationY', propertyAnimation.value.y), createObjectAnimator(nativeView, 'rotation', propertyAnimation.value.z)], propertyAnimation.iterations));
363
364
  break;
364
- case Properties.width:
365
- case Properties.height: {
366
- const isVertical = propertyAnimation.property === 'height';
365
+ case 'width':
366
+ case 'height': {
367
+ const isVertical = propertyAnimation.propertyName === 'height';
367
368
  const extentProperty = isVertical ? heightProperty : widthProperty;
368
369
  extentProperty._initDefaultNativeValue(style);
369
370
  const nativeArray = Array.create('float', 2);
370
371
  let toValue = propertyAnimation.value;
371
372
  const parent = propertyAnimation.target.parent;
372
373
  if (!parent) {
373
- throw new Error(`cannot animate ${propertyAnimation.property} on root view`);
374
+ throw new Error(`cannot animate ${propertyAnimation.propertyName} on root view`);
374
375
  }
375
376
  const parentExtent = isVertical ? parent.getMeasuredHeight() : parent.getMeasuredWidth();
376
- toValue = PercentLength.toDevicePixels(toValue, parentExtent, parentExtent) / Screen.mainScreen.scale;
377
+ const scale = Screen.mainScreen.scale;
378
+ if (toValue === 'auto') {
379
+ const target = propertyAnimation.target;
380
+ let widthSpec = target._currentWidthMeasureSpec;
381
+ let heightSpec = target._currentHeightMeasureSpec;
382
+ //we need to measure ourselves
383
+ if (propName === 'width') {
384
+ widthSpec = layout.makeMeasureSpec(0, layout.UNSPECIFIED);
385
+ target.measure(widthSpec, heightSpec);
386
+ toValue = target.getMeasuredWidth() / scale;
387
+ }
388
+ else {
389
+ heightSpec = layout.makeMeasureSpec(0, layout.UNSPECIFIED);
390
+ target.measure(widthSpec, heightSpec);
391
+ toValue = target.getMeasuredHeight() / scale;
392
+ }
393
+ }
394
+ else {
395
+ toValue = PercentLength.toDevicePixels(toValue, parentExtent, parentExtent) / scale;
396
+ }
377
397
  const nativeHeight = isVertical ? nativeView.getHeight() : nativeView.getWidth();
378
398
  const targetStyle = setLocal ? extentProperty.name : extentProperty.keyframe;
379
- originalValue1 = nativeHeight / Screen.mainScreen.scale;
399
+ originalValue1 = nativeHeight / scale;
380
400
  nativeArray[0] = originalValue1;
381
401
  nativeArray[1] = toValue;
382
402
  const extentAnimator = android.animation.ValueAnimator.ofFloat(nativeArray);
383
403
  extentAnimator.addUpdateListener(new android.animation.ValueAnimator.AnimatorUpdateListener({
384
404
  onAnimationUpdate(animator) {
385
- const argb = animator.getAnimatedValue().floatValue();
386
- propertyAnimation.target.style[setLocal ? extentProperty.name : extentProperty.keyframe] = argb;
405
+ let result = animator.getAnimatedValue();
406
+ if (result instanceof java.lang.Number) {
407
+ result = result.floatValue();
408
+ }
409
+ propertyAnimation.target.style[setLocal ? extentProperty.name : extentProperty.keyframe] = result;
387
410
  },
388
411
  }));
389
412
  propertyUpdateCallbacks.push(() => {
@@ -393,14 +416,68 @@ export class Animation extends AnimationBase {
393
416
  propertyAnimation.target.style[targetStyle] = originalValue1;
394
417
  if (propertyAnimation.target.nativeViewProtected) {
395
418
  const setter = propertyAnimation.target[extentProperty.setNative];
396
- setter(propertyAnimation.target.style[propertyAnimation.property]);
419
+ setter.call(propertyAnimation.target, propertyAnimation.target.style[propertyAnimation.propertyName]);
397
420
  }
398
421
  });
399
422
  animators.push(extentAnimator);
400
423
  break;
401
424
  }
402
425
  default:
403
- throw new Error(`Animating property '${propertyAnimation.property}' is unsupported`);
426
+ if (propertyAnimation.property) {
427
+ const property = propertyAnimation.property;
428
+ if (property._initDefaultNativeValue) {
429
+ property._initDefaultNativeValue(style);
430
+ }
431
+ originalValue1 = propertyAnimation.target[propertyAnimation.propertyName];
432
+ let nativeArray;
433
+ if (propertyAnimation.value instanceof Color) {
434
+ ensureArgbEvaluator();
435
+ nativeArray = Array.create(java.lang.Object, 2);
436
+ nativeArray[0] = java.lang.Integer.valueOf(originalValue1.android);
437
+ nativeArray[1] = java.lang.Integer.valueOf(propertyAnimation.value.android);
438
+ const animator = android.animation.ValueAnimator.ofObject(argbEvaluator, nativeArray);
439
+ animator.addUpdateListener(new android.animation.ValueAnimator.AnimatorUpdateListener({
440
+ onAnimationUpdate(animator) {
441
+ const argb = animator.getAnimatedValue().intValue();
442
+ propertyAnimation.target.style[setLocal ? property.name : property.keyframe] = new Color(argb);
443
+ },
444
+ }));
445
+ animators.push(animator);
446
+ }
447
+ else {
448
+ nativeArray = Array.create('float', 2);
449
+ nativeArray[0] = originalValue1;
450
+ nativeArray[1] = propertyAnimation.value;
451
+ const animator = android.animation.ValueAnimator.ofFloat(nativeArray);
452
+ animator.addUpdateListener(new android.animation.ValueAnimator.AnimatorUpdateListener({
453
+ onAnimationUpdate(animator) {
454
+ let result = animator.getAnimatedValue();
455
+ if (result instanceof java.lang.Number) {
456
+ result = result.floatValue();
457
+ }
458
+ propertyAnimation.target.style[setLocal ? property.name : property.keyframe] = result;
459
+ },
460
+ }));
461
+ animators.push(animator);
462
+ }
463
+ propertyUpdateCallbacks.push(() => {
464
+ propertyAnimation.target.style[setLocal ? property.name : property.keyframe] = propertyAnimation.value;
465
+ });
466
+ propertyResetCallbacks.push(() => {
467
+ if (setLocal) {
468
+ propertyAnimation.target.style[property.name] = originalValue1;
469
+ }
470
+ else {
471
+ propertyAnimation.target.style[property.keyframe] = originalValue1;
472
+ }
473
+ if (propertyAnimation.target.nativeViewProtected && propertyAnimation.target[property.setNative]) {
474
+ propertyAnimation.target[property.setNative](propertyAnimation.target.style[propertyAnimation.propertyName]);
475
+ }
476
+ });
477
+ }
478
+ else {
479
+ throw new Error(`Animating property '${propertyAnimation.propertyName}' is unsupported`);
480
+ }
404
481
  }
405
482
  for (let i = 0, length = animators.length; i < length; i++) {
406
483
  // Duration