@nativescript/core 9.0.0-alpha.13-next-11-12-2025-19281881648 → 9.0.0-alpha.13-next-11-12-2025-19284346663

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 (120) hide show
  1. package/application/application.android.js +335 -352
  2. package/application/application.android.js.map +1 -1
  3. package/application/application.ios.js +4 -19
  4. package/application/application.ios.js.map +1 -1
  5. package/config/config.interface.d.ts +21 -0
  6. package/connectivity/index.android.js +22 -22
  7. package/connectivity/index.android.js.map +1 -1
  8. package/data/observable/index.d.ts +2 -1
  9. package/data/observable/index.js +31 -19
  10. package/data/observable/index.js.map +1 -1
  11. package/fps-meter/fps-native.ios.js +1 -1
  12. package/fps-meter/fps-native.ios.js.map +1 -1
  13. package/http/http-request/index.ios.js +1 -1
  14. package/http/http-request/index.ios.js.map +1 -1
  15. package/package.json +1 -1
  16. package/timer/index.ios.js +1 -1
  17. package/timer/index.ios.js.map +1 -1
  18. package/ui/action-bar/index.android.js +18 -18
  19. package/ui/action-bar/index.android.js.map +1 -1
  20. package/ui/action-bar/index.ios.js +1 -1
  21. package/ui/action-bar/index.ios.js.map +1 -1
  22. package/ui/animation/index.ios.js +2 -3
  23. package/ui/animation/index.ios.js.map +1 -1
  24. package/ui/button/index.android.js +19 -19
  25. package/ui/button/index.android.js.map +1 -1
  26. package/ui/button/index.ios.js +1 -2
  27. package/ui/button/index.ios.js.map +1 -1
  28. package/ui/core/control-state-change/index.ios.js +1 -1
  29. package/ui/core/control-state-change/index.ios.js.map +1 -1
  30. package/ui/core/view/index.android.js +190 -190
  31. package/ui/core/view/index.android.js.map +1 -1
  32. package/ui/core/view/index.ios.js +1 -1
  33. package/ui/core/view/index.ios.js.map +1 -1
  34. package/ui/core/view/view-helper/index.ios.d.ts +4 -4
  35. package/ui/core/view/view-helper/index.ios.js +7 -19
  36. package/ui/core/view/view-helper/index.ios.js.map +1 -1
  37. package/ui/date-picker/index.android.js +38 -38
  38. package/ui/date-picker/index.android.js.map +1 -1
  39. package/ui/date-picker/index.ios.js +1 -1
  40. package/ui/date-picker/index.ios.js.map +1 -1
  41. package/ui/editable-text-base/index.android.js +34 -34
  42. package/ui/editable-text-base/index.android.js.map +1 -1
  43. package/ui/frame/fragment.transitions.android.js +95 -95
  44. package/ui/frame/fragment.transitions.android.js.map +1 -1
  45. package/ui/frame/index.ios.js +13 -18
  46. package/ui/frame/index.ios.js.map +1 -1
  47. package/ui/gestures/index.android.js +129 -130
  48. package/ui/gestures/index.android.js.map +1 -1
  49. package/ui/gestures/index.ios.js +3 -5
  50. package/ui/gestures/index.ios.js.map +1 -1
  51. package/ui/gestures/touch-manager.js +32 -32
  52. package/ui/gestures/touch-manager.js.map +1 -1
  53. package/ui/image/index.android.js +19 -19
  54. package/ui/image/index.android.js.map +1 -1
  55. package/ui/image-cache/index.android.js +12 -14
  56. package/ui/image-cache/index.android.js.map +1 -1
  57. package/ui/image-cache/index.ios.js +6 -6
  58. package/ui/image-cache/index.ios.js.map +1 -1
  59. package/ui/list-picker/index.android.js +35 -35
  60. package/ui/list-picker/index.android.js.map +1 -1
  61. package/ui/list-picker/index.ios.js +2 -2
  62. package/ui/list-picker/index.ios.js.map +1 -1
  63. package/ui/list-view/index.android.js +278 -320
  64. package/ui/list-view/index.android.js.map +1 -1
  65. package/ui/list-view/index.ios.js +11 -27
  66. package/ui/list-view/index.ios.js.map +1 -1
  67. package/ui/page/index.ios.js +4 -57
  68. package/ui/page/index.ios.js.map +1 -1
  69. package/ui/scroll-view/index.ios.js +2 -2
  70. package/ui/scroll-view/index.ios.js.map +1 -1
  71. package/ui/search-bar/index.android.js +48 -52
  72. package/ui/search-bar/index.android.js.map +1 -1
  73. package/ui/search-bar/index.ios.js +3 -6
  74. package/ui/search-bar/index.ios.js.map +1 -1
  75. package/ui/segmented-bar/index.android.js +55 -59
  76. package/ui/segmented-bar/index.android.js.map +1 -1
  77. package/ui/segmented-bar/index.ios.js +1 -1
  78. package/ui/segmented-bar/index.ios.js.map +1 -1
  79. package/ui/slider/index.android.js +23 -25
  80. package/ui/slider/index.android.js.map +1 -1
  81. package/ui/slider/index.ios.js +2 -2
  82. package/ui/slider/index.ios.js.map +1 -1
  83. package/ui/split-view/index.ios.js +1 -6
  84. package/ui/split-view/index.ios.js.map +1 -1
  85. package/ui/switch/index.android.js +18 -18
  86. package/ui/switch/index.android.js.map +1 -1
  87. package/ui/switch/index.ios.js +1 -1
  88. package/ui/switch/index.ios.js.map +1 -1
  89. package/ui/tab-view/index.android.js +163 -179
  90. package/ui/tab-view/index.android.js.map +1 -1
  91. package/ui/tab-view/index.ios.js +8 -18
  92. package/ui/tab-view/index.ios.js.map +1 -1
  93. package/ui/text-base/index.android.js +91 -94
  94. package/ui/text-base/index.android.js.map +1 -1
  95. package/ui/text-base/index.ios.js +6 -15
  96. package/ui/text-base/index.ios.js.map +1 -1
  97. package/ui/text-field/index.ios.js +2 -3
  98. package/ui/text-field/index.ios.js.map +1 -1
  99. package/ui/text-view/index.ios.js +2 -6
  100. package/ui/text-view/index.ios.js.map +1 -1
  101. package/ui/time-picker/index.android.js +21 -21
  102. package/ui/time-picker/index.android.js.map +1 -1
  103. package/ui/time-picker/index.ios.js +1 -1
  104. package/ui/time-picker/index.ios.js.map +1 -1
  105. package/ui/transition/fade-transition.ios.js +5 -6
  106. package/ui/transition/fade-transition.ios.js.map +1 -1
  107. package/ui/transition/modal-transition.ios.js +19 -26
  108. package/ui/transition/modal-transition.ios.js.map +1 -1
  109. package/ui/transition/page-transition.android.js +3 -12
  110. package/ui/transition/page-transition.android.js.map +1 -1
  111. package/ui/transition/page-transition.ios.js +19 -25
  112. package/ui/transition/page-transition.ios.js.map +1 -1
  113. package/ui/transition/slide-transition.ios.js +5 -6
  114. package/ui/transition/slide-transition.ios.js.map +1 -1
  115. package/ui/web-view/index.android.js +58 -62
  116. package/ui/web-view/index.android.js.map +1 -1
  117. package/ui/web-view/index.ios.js +18 -18
  118. package/ui/web-view/index.ios.js.map +1 -1
  119. package/utils/native-helper.ios.js +20 -20
  120. package/utils/native-helper.ios.js.map +1 -1
@@ -15,218 +15,203 @@ function initNativeScriptLifecycleCallbacks() {
15
15
  if (NativeScriptLifecycleCallbacks_) {
16
16
  return NativeScriptLifecycleCallbacks_;
17
17
  }
18
- var NativeScriptLifecycleCallbacksImpl = /** @class */ (function (_super) {
19
- __extends(NativeScriptLifecycleCallbacksImpl, _super);
20
- function NativeScriptLifecycleCallbacksImpl() {
21
- var _this = _super !== null && _super.apply(this, arguments) || this;
22
- _this.activitiesCount = 0;
23
- return _this;
24
- }
25
- NativeScriptLifecycleCallbacksImpl.prototype.onActivityCreated = function (activity, savedInstanceState) {
26
- // console.log('NativeScriptLifecycleCallbacks onActivityCreated');
27
- this.setThemeOnLaunch(activity);
28
- if (!Application.android.startActivity) {
29
- Application.android.setStartActivity(activity);
30
- }
31
- if (!this.nativescriptActivity && 'isNativeScriptActivity' in activity) {
32
- this.nativescriptActivity = activity;
33
- }
34
- this.notifyActivityCreated(activity, savedInstanceState);
35
- if (Application.hasListeners(Application.displayedEvent)) {
36
- this.subscribeForGlobalLayout(activity);
37
- }
38
- };
39
- NativeScriptLifecycleCallbacksImpl.prototype.onActivityDestroyed = function (activity) {
40
- // console.log('NativeScriptLifecycleCallbacks onActivityDestroyed');
41
- if (activity === Application.android.foregroundActivity) {
42
- Application.android.setForegroundActivity(undefined);
43
- }
44
- if (activity === this.nativescriptActivity) {
45
- this.nativescriptActivity = undefined;
46
- }
47
- if (activity === Application.android.startActivity) {
48
- Application.android.setStartActivity(undefined);
49
- // Fallback for start activity when it is destroyed but we have a known nativescript activity
50
- if (this.nativescriptActivity) {
51
- Application.android.setStartActivity(this.nativescriptActivity);
18
+ var NativeScriptLifecycleCallbacksImpl = (function (_super) {
19
+ __extends(NativeScriptLifecycleCallbacksImpl, _super);
20
+ function NativeScriptLifecycleCallbacksImpl() {
21
+ var _this = _super !== null && _super.apply(this, arguments) || this;
22
+ _this.activitiesCount = 0;
23
+ return _this;
24
+ }
25
+ NativeScriptLifecycleCallbacksImpl.prototype.onActivityCreated = function (activity, savedInstanceState) {
26
+ this.setThemeOnLaunch(activity);
27
+ if (!Application.android.startActivity) {
28
+ Application.android.setStartActivity(activity);
52
29
  }
53
- }
54
- Application.android.notify({
55
- eventName: Application.android.activityDestroyedEvent,
56
- object: Application.android,
57
- activity: activity,
58
- });
59
- // TODO: This is a temporary workaround to force the V8's Garbage Collector, which will force the related Java Object to be collected.
60
- gc();
61
- };
62
- NativeScriptLifecycleCallbacksImpl.prototype.onActivityPaused = function (activity) {
63
- // console.log('NativeScriptLifecycleCallbacks onActivityPaused');
64
- if ('isNativeScriptActivity' in activity) {
65
- Application.setSuspended(true, {
66
- // todo: deprecate event.android in favor of event.activity
67
- android: activity,
30
+ if (!this.nativescriptActivity && "isNativeScriptActivity" in activity) {
31
+ this.nativescriptActivity = activity;
32
+ }
33
+ this.notifyActivityCreated(activity, savedInstanceState);
34
+ if (Application.hasListeners(Application.displayedEvent)) {
35
+ this.subscribeForGlobalLayout(activity);
36
+ }
37
+ };
38
+ NativeScriptLifecycleCallbacksImpl.prototype.onActivityDestroyed = function (activity) {
39
+ if (activity === Application.android.foregroundActivity) {
40
+ Application.android.setForegroundActivity(undefined);
41
+ }
42
+ if (activity === this.nativescriptActivity) {
43
+ this.nativescriptActivity = undefined;
44
+ }
45
+ if (activity === Application.android.startActivity) {
46
+ Application.android.setStartActivity(undefined);
47
+ if (this.nativescriptActivity) {
48
+ Application.android.setStartActivity(this.nativescriptActivity);
49
+ }
50
+ }
51
+ Application.android.notify({
52
+ eventName: Application.android.activityDestroyedEvent,
53
+ object: Application.android,
68
54
  activity: activity,
69
55
  });
70
- }
71
- Application.android.notify({
72
- eventName: Application.android.activityPausedEvent,
73
- object: Application.android,
74
- activity: activity,
75
- });
76
- };
77
- NativeScriptLifecycleCallbacksImpl.prototype.onActivityResumed = function (activity) {
78
- // console.log('NativeScriptLifecycleCallbacks onActivityResumed');
79
- Application.android.setForegroundActivity(activity);
80
- // NOTE: setSuspended(false) is called in frame/index.android.ts inside onPostResume
81
- // This is done to ensure proper timing for the event to be raised
82
- Application.android.notify({
83
- eventName: Application.android.activityResumedEvent,
84
- object: Application.android,
85
- activity: activity,
86
- });
87
- };
88
- NativeScriptLifecycleCallbacksImpl.prototype.onActivitySaveInstanceState = function (activity, bundle) {
89
- // console.log('NativeScriptLifecycleCallbacks onActivitySaveInstanceState');
90
- Application.android.notify({
91
- eventName: Application.android.saveActivityStateEvent,
92
- object: Application.android,
93
- activity: activity,
94
- bundle: bundle,
95
- });
96
- };
97
- NativeScriptLifecycleCallbacksImpl.prototype.onActivityStarted = function (activity) {
98
- // console.log('NativeScriptLifecycleCallbacks onActivityStarted');
99
- this.activitiesCount++;
100
- if (this.activitiesCount === 1) {
101
- Application.android.setInBackground(false, {
102
- // todo: deprecate event.android in favor of event.activity
103
- android: activity,
56
+ gc();
57
+ };
58
+ NativeScriptLifecycleCallbacksImpl.prototype.onActivityPaused = function (activity) {
59
+ if ("isNativeScriptActivity" in activity) {
60
+ Application.setSuspended(true, {
61
+ android: activity,
62
+ activity: activity,
63
+ });
64
+ }
65
+ Application.android.notify({
66
+ eventName: Application.android.activityPausedEvent,
67
+ object: Application.android,
104
68
  activity: activity,
105
69
  });
106
- }
107
- Application.android.notify({
108
- eventName: Application.android.activityStartedEvent,
109
- object: Application.android,
110
- activity: activity,
111
- });
112
- };
113
- NativeScriptLifecycleCallbacksImpl.prototype.onActivityStopped = function (activity) {
114
- // console.log('NativeScriptLifecycleCallbacks onActivityStopped');
115
- this.activitiesCount--;
116
- if (this.activitiesCount === 0) {
117
- Application.android.setInBackground(true, {
118
- // todo: deprecate event.android in favor of event.activity
119
- android: activity,
70
+ };
71
+ NativeScriptLifecycleCallbacksImpl.prototype.onActivityResumed = function (activity) {
72
+ Application.android.setForegroundActivity(activity);
73
+ Application.android.notify({
74
+ eventName: Application.android.activityResumedEvent,
75
+ object: Application.android,
120
76
  activity: activity,
121
77
  });
122
- }
123
- Application.android.notify({
124
- eventName: Application.android.activityStoppedEvent,
125
- object: Application.android,
126
- activity: activity,
127
- });
128
- };
129
- NativeScriptLifecycleCallbacksImpl.prototype.setThemeOnLaunch = function (activity) {
130
- // Set app theme after launch screen was used during startup
131
- var activityInfo = activity.getPackageManager().getActivityInfo(activity.getComponentName(), android.content.pm.PackageManager.GET_META_DATA);
132
- if (activityInfo.metaData) {
133
- var setThemeOnLaunch = activityInfo.metaData.getInt('SET_THEME_ON_LAUNCH', -1);
134
- if (setThemeOnLaunch !== -1) {
135
- activity.setTheme(setThemeOnLaunch);
78
+ };
79
+ NativeScriptLifecycleCallbacksImpl.prototype.onActivitySaveInstanceState = function (activity, bundle) {
80
+ Application.android.notify({
81
+ eventName: Application.android.saveActivityStateEvent,
82
+ object: Application.android,
83
+ activity: activity,
84
+ bundle: bundle,
85
+ });
86
+ };
87
+ NativeScriptLifecycleCallbacksImpl.prototype.onActivityStarted = function (activity) {
88
+ this.activitiesCount++;
89
+ if (this.activitiesCount === 1) {
90
+ Application.android.setInBackground(false, {
91
+ android: activity,
92
+ activity: activity,
93
+ });
136
94
  }
137
- }
138
- };
139
- NativeScriptLifecycleCallbacksImpl.prototype.notifyActivityCreated = function (activity, bundle) {
140
- Application.android.notify({
141
- eventName: Application.android.activityCreatedEvent,
142
- object: Application.android,
143
- activity: activity,
144
- bundle: bundle,
145
- });
146
- };
147
- NativeScriptLifecycleCallbacksImpl.prototype.subscribeForGlobalLayout = function (activity) {
148
- var rootView = activity.getWindow().getDecorView().getRootView();
149
- // store the listener not to trigger GC collection before collecting the method
150
- global.onGlobalLayoutListener = new android.view.ViewTreeObserver.OnGlobalLayoutListener({
151
- onGlobalLayout: function () {
152
- Application.android.notify({
153
- eventName: Application.displayedEvent,
154
- object: Application,
155
- android: Application.android,
95
+ Application.android.notify({
96
+ eventName: Application.android.activityStartedEvent,
97
+ object: Application.android,
98
+ activity: activity,
99
+ });
100
+ };
101
+ NativeScriptLifecycleCallbacksImpl.prototype.onActivityStopped = function (activity) {
102
+ this.activitiesCount--;
103
+ if (this.activitiesCount === 0) {
104
+ Application.android.setInBackground(true, {
105
+ android: activity,
156
106
  activity: activity,
157
107
  });
158
- var viewTreeObserver = rootView.getViewTreeObserver();
159
- viewTreeObserver.removeOnGlobalLayoutListener(global.onGlobalLayoutListener);
160
- },
161
- });
162
- rootView.getViewTreeObserver().addOnGlobalLayoutListener(global.onGlobalLayoutListener);
163
- };
164
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
165
- __decorate([
166
- profile,
167
- __metadata("design:type", Function),
168
- __metadata("design:paramtypes", [typeof (_c = typeof androidx !== "undefined" && (_a = androidx.appcompat) !== void 0 && (_b = _a.app) !== void 0 && _b.AppCompatActivity) === "function" ? _c : Object, typeof (_e = typeof android !== "undefined" && (_d = android.os) !== void 0 && _d.Bundle) === "function" ? _e : Object]),
169
- __metadata("design:returntype", void 0)
170
- ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityCreated", null);
171
- __decorate([
172
- profile,
173
- __metadata("design:type", Function),
174
- __metadata("design:paramtypes", [typeof (_h = typeof androidx !== "undefined" && (_f = androidx.appcompat) !== void 0 && (_g = _f.app) !== void 0 && _g.AppCompatActivity) === "function" ? _h : Object]),
175
- __metadata("design:returntype", void 0)
176
- ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityDestroyed", null);
177
- __decorate([
178
- profile,
179
- __metadata("design:type", Function),
180
- __metadata("design:paramtypes", [typeof (_l = typeof androidx !== "undefined" && (_j = androidx.appcompat) !== void 0 && (_k = _j.app) !== void 0 && _k.AppCompatActivity) === "function" ? _l : Object]),
181
- __metadata("design:returntype", void 0)
182
- ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityPaused", null);
183
- __decorate([
184
- profile,
185
- __metadata("design:type", Function),
186
- __metadata("design:paramtypes", [typeof (_p = typeof androidx !== "undefined" && (_m = androidx.appcompat) !== void 0 && (_o = _m.app) !== void 0 && _o.AppCompatActivity) === "function" ? _p : Object]),
187
- __metadata("design:returntype", void 0)
188
- ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityResumed", null);
189
- __decorate([
190
- profile,
191
- __metadata("design:type", Function),
192
- __metadata("design:paramtypes", [typeof (_s = typeof androidx !== "undefined" && (_q = androidx.appcompat) !== void 0 && (_r = _q.app) !== void 0 && _r.AppCompatActivity) === "function" ? _s : Object, typeof (_u = typeof android !== "undefined" && (_t = android.os) !== void 0 && _t.Bundle) === "function" ? _u : Object]),
193
- __metadata("design:returntype", void 0)
194
- ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivitySaveInstanceState", null);
195
- __decorate([
196
- profile,
197
- __metadata("design:type", Function),
198
- __metadata("design:paramtypes", [typeof (_x = typeof androidx !== "undefined" && (_v = androidx.appcompat) !== void 0 && (_w = _v.app) !== void 0 && _w.AppCompatActivity) === "function" ? _x : Object]),
199
- __metadata("design:returntype", void 0)
200
- ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityStarted", null);
201
- __decorate([
202
- profile,
203
- __metadata("design:type", Function),
204
- __metadata("design:paramtypes", [typeof (_0 = typeof androidx !== "undefined" && (_y = androidx.appcompat) !== void 0 && (_z = _y.app) !== void 0 && _z.AppCompatActivity) === "function" ? _0 : Object]),
205
- __metadata("design:returntype", void 0)
206
- ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityStopped", null);
207
- __decorate([
208
- profile,
209
- __metadata("design:type", Function),
210
- __metadata("design:paramtypes", [typeof (_3 = typeof androidx !== "undefined" && (_1 = androidx.appcompat) !== void 0 && (_2 = _1.app) !== void 0 && _2.AppCompatActivity) === "function" ? _3 : Object]),
211
- __metadata("design:returntype", void 0)
212
- ], NativeScriptLifecycleCallbacksImpl.prototype, "setThemeOnLaunch", null);
213
- __decorate([
214
- profile,
215
- __metadata("design:type", Function),
216
- __metadata("design:paramtypes", [typeof (_6 = typeof androidx !== "undefined" && (_4 = androidx.appcompat) !== void 0 && (_5 = _4.app) !== void 0 && _5.AppCompatActivity) === "function" ? _6 : Object, typeof (_8 = typeof android !== "undefined" && (_7 = android.os) !== void 0 && _7.Bundle) === "function" ? _8 : Object]),
217
- __metadata("design:returntype", void 0)
218
- ], NativeScriptLifecycleCallbacksImpl.prototype, "notifyActivityCreated", null);
219
- __decorate([
220
- profile,
221
- __metadata("design:type", Function),
222
- __metadata("design:paramtypes", [typeof (_11 = typeof androidx !== "undefined" && (_9 = androidx.appcompat) !== void 0 && (_10 = _9.app) !== void 0 && _10.AppCompatActivity) === "function" ? _11 : Object]),
223
- __metadata("design:returntype", void 0)
224
- ], NativeScriptLifecycleCallbacksImpl.prototype, "subscribeForGlobalLayout", null);
225
- NativeScriptLifecycleCallbacksImpl = __decorate([
226
- JavaProxy('org.nativescript.NativeScriptLifecycleCallbacks')
227
- ], NativeScriptLifecycleCallbacksImpl);
228
- return NativeScriptLifecycleCallbacksImpl;
229
- }(android.app.Application.ActivityLifecycleCallbacks));
108
+ }
109
+ Application.android.notify({
110
+ eventName: Application.android.activityStoppedEvent,
111
+ object: Application.android,
112
+ activity: activity,
113
+ });
114
+ // This is done to ensure proper timing for the event to be raised
115
+ };
116
+ NativeScriptLifecycleCallbacksImpl.prototype.setThemeOnLaunch = function (activity) {
117
+ var activityInfo = activity.getPackageManager().getActivityInfo(activity.getComponentName(), android.content.pm.PackageManager.GET_META_DATA);
118
+ if (activityInfo.metaData) {
119
+ var setThemeOnLaunch = activityInfo.metaData.getInt("SET_THEME_ON_LAUNCH", -1);
120
+ if (setThemeOnLaunch !== -1) {
121
+ activity.setTheme(setThemeOnLaunch);
122
+ }
123
+ }
124
+ };
125
+ NativeScriptLifecycleCallbacksImpl.prototype.notifyActivityCreated = function (activity, bundle) {
126
+ Application.android.notify({
127
+ eventName: Application.android.activityCreatedEvent,
128
+ object: Application.android,
129
+ activity: activity,
130
+ bundle: bundle,
131
+ });
132
+ };
133
+ NativeScriptLifecycleCallbacksImpl.prototype.subscribeForGlobalLayout = function (activity) {
134
+ var rootView = activity.getWindow().getDecorView().getRootView();
135
+ global.onGlobalLayoutListener = new android.view.ViewTreeObserver.OnGlobalLayoutListener({
136
+ onGlobalLayout: function () {
137
+ Application.android.notify({
138
+ eventName: Application.displayedEvent,
139
+ object: Application,
140
+ android: Application.android,
141
+ activity: activity,
142
+ });
143
+ var viewTreeObserver = rootView.getViewTreeObserver();
144
+ viewTreeObserver.removeOnGlobalLayoutListener(global.onGlobalLayoutListener);
145
+ },
146
+ });
147
+ rootView.getViewTreeObserver().addOnGlobalLayoutListener(global.onGlobalLayoutListener);
148
+ };
149
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
150
+ __decorate([
151
+ profile,
152
+ __metadata("design:type", Function),
153
+ __metadata("design:paramtypes", [typeof (_c = typeof androidx !== "undefined" && (_a = androidx.appcompat) !== void 0 && (_b = _a.app) !== void 0 && _b.AppCompatActivity) === "function" ? _c : Object, typeof (_e = typeof android !== "undefined" && (_d = android.os) !== void 0 && _d.Bundle) === "function" ? _e : Object]),
154
+ __metadata("design:returntype", void 0)
155
+ ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityCreated", null);
156
+ __decorate([
157
+ profile,
158
+ __metadata("design:type", Function),
159
+ __metadata("design:paramtypes", [typeof (_h = typeof androidx !== "undefined" && (_f = androidx.appcompat) !== void 0 && (_g = _f.app) !== void 0 && _g.AppCompatActivity) === "function" ? _h : Object]),
160
+ __metadata("design:returntype", void 0)
161
+ ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityDestroyed", null);
162
+ __decorate([
163
+ profile,
164
+ __metadata("design:type", Function),
165
+ __metadata("design:paramtypes", [typeof (_l = typeof androidx !== "undefined" && (_j = androidx.appcompat) !== void 0 && (_k = _j.app) !== void 0 && _k.AppCompatActivity) === "function" ? _l : Object]),
166
+ __metadata("design:returntype", void 0)
167
+ ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityPaused", null);
168
+ __decorate([
169
+ profile,
170
+ __metadata("design:type", Function),
171
+ __metadata("design:paramtypes", [typeof (_p = typeof androidx !== "undefined" && (_m = androidx.appcompat) !== void 0 && (_o = _m.app) !== void 0 && _o.AppCompatActivity) === "function" ? _p : Object]),
172
+ __metadata("design:returntype", void 0)
173
+ ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityResumed", null);
174
+ __decorate([
175
+ profile,
176
+ __metadata("design:type", Function),
177
+ __metadata("design:paramtypes", [typeof (_s = typeof androidx !== "undefined" && (_q = androidx.appcompat) !== void 0 && (_r = _q.app) !== void 0 && _r.AppCompatActivity) === "function" ? _s : Object, typeof (_u = typeof android !== "undefined" && (_t = android.os) !== void 0 && _t.Bundle) === "function" ? _u : Object]),
178
+ __metadata("design:returntype", void 0)
179
+ ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivitySaveInstanceState", null);
180
+ __decorate([
181
+ profile,
182
+ __metadata("design:type", Function),
183
+ __metadata("design:paramtypes", [typeof (_x = typeof androidx !== "undefined" && (_v = androidx.appcompat) !== void 0 && (_w = _v.app) !== void 0 && _w.AppCompatActivity) === "function" ? _x : Object]),
184
+ __metadata("design:returntype", void 0)
185
+ ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityStarted", null);
186
+ __decorate([
187
+ profile,
188
+ __metadata("design:type", Function),
189
+ __metadata("design:paramtypes", [typeof (_0 = typeof androidx !== "undefined" && (_y = androidx.appcompat) !== void 0 && (_z = _y.app) !== void 0 && _z.AppCompatActivity) === "function" ? _0 : Object]),
190
+ __metadata("design:returntype", void 0)
191
+ ], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityStopped", null);
192
+ __decorate([
193
+ profile,
194
+ __metadata("design:type", Function),
195
+ __metadata("design:paramtypes", [typeof (_3 = typeof androidx !== "undefined" && (_1 = androidx.appcompat) !== void 0 && (_2 = _1.app) !== void 0 && _2.AppCompatActivity) === "function" ? _3 : Object]),
196
+ __metadata("design:returntype", void 0)
197
+ ], NativeScriptLifecycleCallbacksImpl.prototype, "setThemeOnLaunch", null);
198
+ __decorate([
199
+ profile,
200
+ __metadata("design:type", Function),
201
+ __metadata("design:paramtypes", [typeof (_6 = typeof androidx !== "undefined" && (_4 = androidx.appcompat) !== void 0 && (_5 = _4.app) !== void 0 && _5.AppCompatActivity) === "function" ? _6 : Object, typeof (_8 = typeof android !== "undefined" && (_7 = android.os) !== void 0 && _7.Bundle) === "function" ? _8 : Object]),
202
+ __metadata("design:returntype", void 0)
203
+ ], NativeScriptLifecycleCallbacksImpl.prototype, "notifyActivityCreated", null);
204
+ __decorate([
205
+ profile,
206
+ __metadata("design:type", Function),
207
+ __metadata("design:paramtypes", [typeof (_11 = typeof androidx !== "undefined" && (_9 = androidx.appcompat) !== void 0 && (_10 = _9.app) !== void 0 && _10.AppCompatActivity) === "function" ? _11 : Object]),
208
+ __metadata("design:returntype", void 0)
209
+ ], NativeScriptLifecycleCallbacksImpl.prototype, "subscribeForGlobalLayout", null);
210
+ NativeScriptLifecycleCallbacksImpl = __decorate([
211
+ JavaProxy("org.nativescript.NativeScriptLifecycleCallbacks")
212
+ ], NativeScriptLifecycleCallbacksImpl);
213
+ return NativeScriptLifecycleCallbacksImpl;
214
+ }(android.app.Application.ActivityLifecycleCallbacks));
230
215
  NativeScriptLifecycleCallbacks_ = NativeScriptLifecycleCallbacksImpl;
231
216
  return NativeScriptLifecycleCallbacks_;
232
217
  }
@@ -235,68 +220,67 @@ function initNativeScriptComponentCallbacks() {
235
220
  if (NativeScriptComponentCallbacks_) {
236
221
  return NativeScriptComponentCallbacks_;
237
222
  }
238
- var NativeScriptComponentCallbacksImpl = /** @class */ (function (_super) {
239
- __extends(NativeScriptComponentCallbacksImpl, _super);
240
- function NativeScriptComponentCallbacksImpl() {
241
- return _super !== null && _super.apply(this, arguments) || this;
242
- }
243
- NativeScriptComponentCallbacksImpl.prototype.onLowMemory = function () {
244
- gc();
245
- java.lang.System.gc();
246
- Application.notify({
247
- eventName: Application.lowMemoryEvent,
248
- object: Application,
249
- android: this,
250
- });
251
- };
252
- NativeScriptComponentCallbacksImpl.prototype.onTrimMemory = function (level) {
253
- // TODO: This is skipped for now, test carefully for OutOfMemory exceptions
254
- };
255
- NativeScriptComponentCallbacksImpl.prototype.onConfigurationChanged = function (newConfiguration) {
256
- Application.android.onConfigurationChanged(newConfiguration);
257
- };
258
- var _a, _b, _c;
259
- __decorate([
260
- profile,
261
- __metadata("design:type", Function),
262
- __metadata("design:paramtypes", []),
263
- __metadata("design:returntype", void 0)
264
- ], NativeScriptComponentCallbacksImpl.prototype, "onLowMemory", null);
265
- __decorate([
266
- profile,
267
- __metadata("design:type", Function),
268
- __metadata("design:paramtypes", [Number]),
269
- __metadata("design:returntype", void 0)
270
- ], NativeScriptComponentCallbacksImpl.prototype, "onTrimMemory", null);
271
- __decorate([
272
- profile,
273
- __metadata("design:type", Function),
274
- __metadata("design:paramtypes", [typeof (_c = typeof android !== "undefined" && (_a = android.content) !== void 0 && (_b = _a.res) !== void 0 && _b.Configuration) === "function" ? _c : Object]),
275
- __metadata("design:returntype", void 0)
276
- ], NativeScriptComponentCallbacksImpl.prototype, "onConfigurationChanged", null);
277
- NativeScriptComponentCallbacksImpl = __decorate([
278
- JavaProxy('org.nativescript.NativeScriptComponentCallbacks')
279
- ], NativeScriptComponentCallbacksImpl);
280
- return NativeScriptComponentCallbacksImpl;
281
- }(android.content.ComponentCallbacks2));
223
+ var NativeScriptComponentCallbacksImpl = (function (_super) {
224
+ __extends(NativeScriptComponentCallbacksImpl, _super);
225
+ function NativeScriptComponentCallbacksImpl() {
226
+ return _super !== null && _super.apply(this, arguments) || this;
227
+ }
228
+ NativeScriptComponentCallbacksImpl.prototype.onLowMemory = function () {
229
+ gc();
230
+ java.lang.System.gc();
231
+ Application.notify({
232
+ eventName: Application.lowMemoryEvent,
233
+ object: Application,
234
+ android: this,
235
+ });
236
+ };
237
+ NativeScriptComponentCallbacksImpl.prototype.onTrimMemory = function (level) {
238
+ };
239
+ NativeScriptComponentCallbacksImpl.prototype.onConfigurationChanged = function (newConfiguration) {
240
+ Application.android.onConfigurationChanged(newConfiguration);
241
+ };
242
+ var _a, _b, _c;
243
+ __decorate([
244
+ profile,
245
+ __metadata("design:type", Function),
246
+ __metadata("design:paramtypes", []),
247
+ __metadata("design:returntype", void 0)
248
+ ], NativeScriptComponentCallbacksImpl.prototype, "onLowMemory", null);
249
+ __decorate([
250
+ profile,
251
+ __metadata("design:type", Function),
252
+ __metadata("design:paramtypes", [Number]),
253
+ __metadata("design:returntype", void 0)
254
+ ], NativeScriptComponentCallbacksImpl.prototype, "onTrimMemory", null);
255
+ __decorate([
256
+ profile,
257
+ __metadata("design:type", Function),
258
+ __metadata("design:paramtypes", [typeof (_c = typeof android !== "undefined" && (_a = android.content) !== void 0 && (_b = _a.res) !== void 0 && _b.Configuration) === "function" ? _c : Object]),
259
+ __metadata("design:returntype", void 0)
260
+ ], NativeScriptComponentCallbacksImpl.prototype, "onConfigurationChanged", null);
261
+ NativeScriptComponentCallbacksImpl = __decorate([
262
+ JavaProxy("org.nativescript.NativeScriptComponentCallbacks")
263
+ ], NativeScriptComponentCallbacksImpl);
264
+ return NativeScriptComponentCallbacksImpl;
265
+ }(android.content.ComponentCallbacks2));
282
266
  NativeScriptComponentCallbacks_ = NativeScriptComponentCallbacksImpl;
283
267
  return NativeScriptComponentCallbacks_;
284
268
  }
285
269
  const BroadcastReceiver = lazy(() => {
286
- var BroadcastReceiverImpl = /** @class */ (function (_super) {
287
- __extends(BroadcastReceiverImpl, _super);
288
- function BroadcastReceiverImpl(onReceiveCallback) {
289
- var _this = _super.call(this) || this;
290
- _this._onReceiveCallback = onReceiveCallback;
291
- return global.__native(_this);
292
- }
293
- BroadcastReceiverImpl.prototype.onReceive = function (context, intent) {
294
- if (this._onReceiveCallback) {
295
- this._onReceiveCallback(context, intent);
296
- }
297
- };
298
- return BroadcastReceiverImpl;
299
- }(android.content.BroadcastReceiver));
270
+ var BroadcastReceiverImpl = (function (_super) {
271
+ __extends(BroadcastReceiverImpl, _super);
272
+ function BroadcastReceiverImpl(onReceiveCallback) {
273
+ var _this = _super.call(this) || this;
274
+ _this._onReceiveCallback = onReceiveCallback;
275
+ return global.__native(_this);
276
+ }
277
+ BroadcastReceiverImpl.prototype.onReceive = function (context, intent) {
278
+ if (this._onReceiveCallback) {
279
+ this._onReceiveCallback(context, intent);
280
+ }
281
+ };
282
+ return BroadcastReceiverImpl;
283
+ }(android.content.BroadcastReceiver));
300
284
  return BroadcastReceiverImpl;
301
285
  });
302
286
  export class AndroidApplication extends ApplicationCommon {
@@ -873,117 +857,116 @@ function ensureNativeClasses() {
873
857
  ]);
874
858
  clickableRolesMap = new Set([AccessibilityRole.Button, AccessibilityRole.ImageButton]);
875
859
  const ignoreRoleTypesForTrace = new Set([AccessibilityRole.Header, AccessibilityRole.Link, AccessibilityRole.None, AccessibilityRole.Summary]);
876
- var TNSAccessibilityDelegateImpl = /** @class */ (function (_super) {
877
- __extends(TNSAccessibilityDelegateImpl, _super);
878
- function TNSAccessibilityDelegateImpl() {
879
- var _this = _super.call(this) || this;
880
- return global.__native(_this);
881
- }
882
- TNSAccessibilityDelegateImpl.prototype.getTnsView = function (androidView) {
883
- var _a;
884
- var view = (_a = androidViewToTNSView.get(androidView)) === null || _a === void 0 ? void 0 : _a.get();
885
- if (!view) {
886
- androidViewToTNSView.delete(androidView);
887
- return null;
888
- }
889
- return view;
890
- };
891
- TNSAccessibilityDelegateImpl.prototype.onInitializeAccessibilityNodeInfo = function (host, info) {
892
- _super.prototype.onInitializeAccessibilityNodeInfo.call(this, host, info);
893
- var view = this.getTnsView(host);
894
- if (!view) {
895
- if (Trace.isEnabled()) {
896
- Trace.write("onInitializeAccessibilityNodeInfo ".concat(host, " ").concat(info, " no tns-view"), Trace.categories.Accessibility);
860
+ var TNSAccessibilityDelegateImpl = (function (_super) {
861
+ __extends(TNSAccessibilityDelegateImpl, _super);
862
+ function TNSAccessibilityDelegateImpl() {
863
+ var _this = _super.call(this) || this;
864
+ return global.__native(_this);
865
+ }
866
+ TNSAccessibilityDelegateImpl.prototype.getTnsView = function (androidView) {
867
+ var _a;
868
+ var view = (_a = androidViewToTNSView.get(androidView)) === null || _a === void 0 ? void 0 : _a.get();
869
+ if (!view) {
870
+ androidViewToTNSView.delete(androidView);
871
+ return null;
897
872
  }
898
- return;
899
- }
900
- // Set resource id that can be used with test frameworks without polluting the content description.
901
- var id = host.getTag(androidUtils.resources.getId(":id/nativescript_accessibility_id"));
902
- if (id != null) {
903
- info.setViewIdResourceName(id);
904
- }
905
- var accessibilityRole = view.accessibilityRole;
906
- if (accessibilityRole) {
907
- var androidClassName = RoleTypeMap.get(accessibilityRole);
908
- if (androidClassName) {
909
- var oldClassName = info.getClassName() || (SDK_VERSION >= 28 && host.getAccessibilityClassName()) || null;
910
- info.setClassName(androidClassName);
911
- if (Trace.isEnabled()) {
912
- Trace.write("".concat(view, ".accessibilityRole = \"").concat(accessibilityRole, "\" is mapped to \"").concat(androidClassName, "\" (was ").concat(oldClassName, "). ").concat(info.getClassName()), Trace.categories.Accessibility);
913
- }
914
- }
915
- else if (!ignoreRoleTypesForTrace.has(accessibilityRole)) {
873
+ return view;
874
+ };
875
+ TNSAccessibilityDelegateImpl.prototype.onInitializeAccessibilityNodeInfo = function (host, info) {
876
+ _super.prototype.onInitializeAccessibilityNodeInfo.call(this, host, info);
877
+ var view = this.getTnsView(host);
878
+ if (!view) {
916
879
  if (Trace.isEnabled()) {
917
- Trace.write("".concat(view, ".accessibilityRole = \"").concat(accessibilityRole, "\" is unknown"), Trace.categories.Accessibility);
880
+ Trace.write("onInitializeAccessibilityNodeInfo ".concat(host, " ").concat(info, " no tns-view"), Trace.categories.Accessibility);
918
881
  }
882
+ return;
919
883
  }
920
- if (clickableRolesMap.has(accessibilityRole)) {
921
- if (Trace.isEnabled()) {
922
- Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set clickable role=").concat(accessibilityRole), Trace.categories.Accessibility);
923
- }
924
- info.setClickable(true);
884
+ var id = host.getTag(androidUtils.resources.getId(":id/nativescript_accessibility_id"));
885
+ if (id != null) {
886
+ info.setViewIdResourceName(id);
925
887
  }
926
- if (SDK_VERSION >= 28) {
927
- if (accessibilityRole === AccessibilityRole.Header) {
888
+ var accessibilityRole = view.accessibilityRole;
889
+ if (accessibilityRole) {
890
+ var androidClassName = RoleTypeMap.get(accessibilityRole);
891
+ if (androidClassName) {
892
+ var oldClassName = info.getClassName() || (SDK_VERSION >= 28 && host.getAccessibilityClassName()) || null;
893
+ info.setClassName(androidClassName);
928
894
  if (Trace.isEnabled()) {
929
- Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set heading role=").concat(accessibilityRole), Trace.categories.Accessibility);
895
+ Trace.write("".concat(view, ".accessibilityRole = \"").concat(accessibilityRole, "\" is mapped to \"").concat(androidClassName, "\" (was ").concat(oldClassName, "). ").concat(info.getClassName()), Trace.categories.Accessibility);
930
896
  }
931
- info.setHeading(true);
932
897
  }
933
- else if (host.isAccessibilityHeading()) {
898
+ else if (!ignoreRoleTypesForTrace.has(accessibilityRole)) {
934
899
  if (Trace.isEnabled()) {
935
- Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set heading from host"), Trace.categories.Accessibility);
900
+ Trace.write("".concat(view, ".accessibilityRole = \"").concat(accessibilityRole, "\" is unknown"), Trace.categories.Accessibility);
936
901
  }
937
- info.setHeading(true);
938
902
  }
939
- else {
903
+ if (clickableRolesMap.has(accessibilityRole)) {
940
904
  if (Trace.isEnabled()) {
941
- Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set not heading"), Trace.categories.Accessibility);
905
+ Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set clickable role=").concat(accessibilityRole), Trace.categories.Accessibility);
942
906
  }
943
- info.setHeading(false);
907
+ info.setClickable(true);
944
908
  }
945
- }
946
- switch (accessibilityRole) {
947
- case AccessibilityRole.Switch:
948
- case AccessibilityRole.RadioButton:
949
- case AccessibilityRole.Checkbox: {
950
- if (Trace.isEnabled()) {
951
- Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set checkable and check=").concat(view.accessibilityState === AccessibilityState.Checked), Trace.categories.Accessibility);
909
+ if (SDK_VERSION >= 28) {
910
+ if (accessibilityRole === AccessibilityRole.Header) {
911
+ if (Trace.isEnabled()) {
912
+ Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set heading role=").concat(accessibilityRole), Trace.categories.Accessibility);
913
+ }
914
+ info.setHeading(true);
915
+ }
916
+ else if (host.isAccessibilityHeading()) {
917
+ if (Trace.isEnabled()) {
918
+ Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set heading from host"), Trace.categories.Accessibility);
919
+ }
920
+ info.setHeading(true);
921
+ }
922
+ else {
923
+ if (Trace.isEnabled()) {
924
+ Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set not heading"), Trace.categories.Accessibility);
925
+ }
926
+ info.setHeading(false);
952
927
  }
953
- info.setCheckable(true);
954
- info.setChecked(view.accessibilityState === AccessibilityState.Checked);
955
- break;
956
928
  }
957
- default: {
958
- if (Trace.isEnabled()) {
959
- Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set enabled=").concat(view.accessibilityState !== AccessibilityState.Disabled, " and selected=").concat(view.accessibilityState === AccessibilityState.Selected), Trace.categories.Accessibility);
929
+ switch (accessibilityRole) {
930
+ case AccessibilityRole.Switch:
931
+ case AccessibilityRole.RadioButton:
932
+ case AccessibilityRole.Checkbox: {
933
+ if (Trace.isEnabled()) {
934
+ Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set checkable and check=").concat(view.accessibilityState === AccessibilityState.Checked), Trace.categories.Accessibility);
935
+ }
936
+ info.setCheckable(true);
937
+ info.setChecked(view.accessibilityState === AccessibilityState.Checked);
938
+ break;
939
+ }
940
+ default: {
941
+ if (Trace.isEnabled()) {
942
+ Trace.write("onInitializeAccessibilityNodeInfo ".concat(view, " - set enabled=").concat(view.accessibilityState !== AccessibilityState.Disabled, " and selected=").concat(view.accessibilityState === AccessibilityState.Selected), Trace.categories.Accessibility);
943
+ }
944
+ info.setEnabled(view.accessibilityState !== AccessibilityState.Disabled);
945
+ info.setSelected(view.accessibilityState === AccessibilityState.Selected);
946
+ break;
960
947
  }
961
- info.setEnabled(view.accessibilityState !== AccessibilityState.Disabled);
962
- info.setSelected(view.accessibilityState === AccessibilityState.Selected);
963
- break;
964
948
  }
965
949
  }
966
- }
967
- if (view.accessible) {
968
- info.setFocusable(true);
969
- }
970
- };
971
- TNSAccessibilityDelegateImpl.prototype.sendAccessibilityEvent = function (host, eventType) {
972
- _super.prototype.sendAccessibilityEvent.call(this, host, eventType);
973
- var view = this.getTnsView(host);
974
- if (!view) {
975
- console.log("skip - ".concat(host, " - ").concat(accessibilityEventTypeMap.get(eventType)));
976
- return;
977
- }
978
- try {
979
- accessibilityEventHelper(view, eventType);
980
- }
981
- catch (err) {
982
- console.error(err);
983
- }
984
- };
985
- return TNSAccessibilityDelegateImpl;
986
- }(AccessibilityDelegate));
950
+ if (view.accessible) {
951
+ info.setFocusable(true);
952
+ }
953
+ };
954
+ TNSAccessibilityDelegateImpl.prototype.sendAccessibilityEvent = function (host, eventType) {
955
+ _super.prototype.sendAccessibilityEvent.call(this, host, eventType);
956
+ var view = this.getTnsView(host);
957
+ if (!view) {
958
+ console.log("skip - ".concat(host, " - ").concat(accessibilityEventTypeMap.get(eventType)));
959
+ return;
960
+ }
961
+ try {
962
+ accessibilityEventHelper(view, eventType);
963
+ }
964
+ catch (err) {
965
+ console.error(err);
966
+ }
967
+ };
968
+ return TNSAccessibilityDelegateImpl;
969
+ }(AccessibilityDelegate));
987
970
  TNSAccessibilityDelegate = new TNSAccessibilityDelegateImpl();
988
971
  accessibilityEventMap = new Map([
989
972
  /**