@nativescript/core 8.9.0-napi-es5.0 → 8.9.0-napi.1

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 (571) hide show
  1. package/abortcontroller/abortsignal.js +16 -23
  2. package/abortcontroller/abortsignal.js.map +1 -1
  3. package/abortcontroller/index.js +14 -20
  4. package/abortcontroller/index.js.map +1 -1
  5. package/accessibility/accessibility-common.js +8 -8
  6. package/accessibility/accessibility-common.js.map +1 -1
  7. package/accessibility/accessibility-css-helper.js +27 -27
  8. package/accessibility/accessibility-css-helper.js.map +1 -1
  9. package/accessibility/accessibility-properties.js +22 -23
  10. package/accessibility/accessibility-properties.js.map +1 -1
  11. package/accessibility/accessibility-service-common.js +12 -22
  12. package/accessibility/accessibility-service-common.js.map +1 -1
  13. package/accessibility/accessibility-service.android.js +27 -39
  14. package/accessibility/accessibility-service.android.js.map +1 -1
  15. package/accessibility/accessibility-service.ios.js +14 -17
  16. package/accessibility/accessibility-service.ios.js.map +1 -1
  17. package/accessibility/font-scale-common.js +2 -2
  18. package/accessibility/font-scale-common.js.map +1 -1
  19. package/accessibility/font-scale.android.js +7 -8
  20. package/accessibility/font-scale.android.js.map +1 -1
  21. package/accessibility/font-scale.ios.js +9 -10
  22. package/accessibility/font-scale.ios.js.map +1 -1
  23. package/accessibility/index.android.js +77 -83
  24. package/accessibility/index.android.js.map +1 -1
  25. package/accessibility/index.ios.js +34 -36
  26. package/accessibility/index.ios.js.map +1 -1
  27. package/animation-frame/animation-native.ios.js +1 -1
  28. package/animation-frame/animation-native.ios.js.map +1 -1
  29. package/animation-frame/index.js +16 -16
  30. package/animation-frame/index.js.map +1 -1
  31. package/application/application-common.js +196 -214
  32. package/application/application-common.js.map +1 -1
  33. package/application/application-shims.js +39 -39
  34. package/application/application-shims.js.map +1 -1
  35. package/application/application.android.js +110 -149
  36. package/application/application.android.js.map +1 -1
  37. package/application/application.ios.js +162 -197
  38. package/application/application.ios.js.map +1 -1
  39. package/application-settings/index.android.js +11 -11
  40. package/application-settings/index.android.js.map +1 -1
  41. package/application-settings/index.ios.js +1 -1
  42. package/application-settings/index.ios.js.map +1 -1
  43. package/bundle-entry-points.js +1 -1
  44. package/bundle-entry-points.js.map +1 -1
  45. package/color/color-common.js +157 -200
  46. package/color/color-common.js.map +1 -1
  47. package/color/index.android.js +4 -14
  48. package/color/index.android.js.map +1 -1
  49. package/color/index.ios.js +14 -24
  50. package/color/index.ios.js.map +1 -1
  51. package/color/known-colors.js +144 -144
  52. package/color/known-colors.js.map +1 -1
  53. package/connectivity/index.android.js +23 -23
  54. package/connectivity/index.android.js.map +1 -1
  55. package/connectivity/index.ios.js +25 -25
  56. package/connectivity/index.ios.js.map +1 -1
  57. package/console/index.js +20 -24
  58. package/console/index.js.map +1 -1
  59. package/core-types/index.js +38 -38
  60. package/core-types/index.js.map +1 -1
  61. package/css/CSS3Parser.js +104 -106
  62. package/css/CSS3Parser.js.map +1 -1
  63. package/css/CSSNativeScript.js +29 -34
  64. package/css/CSSNativeScript.js.map +1 -1
  65. package/css/css-tree-parser.js.map +1 -1
  66. package/css/parser.js +158 -178
  67. package/css/parser.js.map +1 -1
  68. package/css/system-classes.js +9 -9
  69. package/css/system-classes.js.map +1 -1
  70. package/css-mediaquery/index.js +27 -29
  71. package/css-mediaquery/index.js.map +1 -1
  72. package/data/observable/index.js +115 -124
  73. package/data/observable/index.js.map +1 -1
  74. package/data/observable-array/index.js +119 -176
  75. package/data/observable-array/index.js.map +1 -1
  76. package/data/virtual-array/index.js +61 -74
  77. package/data/virtual-array/index.js.map +1 -1
  78. package/debugger/InspectorBackendCommands.js +137 -161
  79. package/debugger/InspectorBackendCommands.js.map +1 -1
  80. package/debugger/devtools-elements.common.js +20 -20
  81. package/debugger/devtools-elements.common.js.map +1 -1
  82. package/debugger/devtools-elements.js +2 -2
  83. package/debugger/devtools-elements.js.map +1 -1
  84. package/debugger/dom-node.js +61 -73
  85. package/debugger/dom-node.js.map +1 -1
  86. package/debugger/index.js +19 -19
  87. package/debugger/index.js.map +1 -1
  88. package/debugger/webinspector-css.js +25 -30
  89. package/debugger/webinspector-css.js.map +1 -1
  90. package/debugger/webinspector-dom.js +38 -43
  91. package/debugger/webinspector-dom.js.map +1 -1
  92. package/debugger/webinspector-network.android.js +103 -132
  93. package/debugger/webinspector-network.android.js.map +1 -1
  94. package/debugger/webinspector-network.ios.js +100 -128
  95. package/debugger/webinspector-network.ios.js.map +1 -1
  96. package/file-system/file-system-access.android.js +414 -421
  97. package/file-system/file-system-access.android.js.map +1 -1
  98. package/file-system/file-system-access.ios.js +203 -213
  99. package/file-system/file-system-access.ios.js.map +1 -1
  100. package/file-system/index.js +294 -372
  101. package/file-system/index.js.map +1 -1
  102. package/fps-meter/fps-native.android.js +15 -18
  103. package/fps-meter/fps-native.android.js.map +1 -1
  104. package/fps-meter/fps-native.ios.js +9 -11
  105. package/fps-meter/fps-native.ios.js.map +1 -1
  106. package/fps-meter/index.js +11 -11
  107. package/fps-meter/index.js.map +1 -1
  108. package/globals/index.js +88 -112
  109. package/globals/index.js.map +1 -1
  110. package/http/http-request/http-request-common.js +5 -5
  111. package/http/http-request/http-request-common.js.map +1 -1
  112. package/http/http-request/index.android.js +53 -54
  113. package/http/http-request/index.android.js.map +1 -1
  114. package/http/http-request/index.ios.js +56 -58
  115. package/http/http-request/index.ios.js.map +1 -1
  116. package/http/index.js +19 -19
  117. package/http/index.js.map +1 -1
  118. package/image-asset/image-asset-common.js +25 -37
  119. package/image-asset/image-asset-common.js.map +1 -1
  120. package/image-asset/index.android.js +17 -25
  121. package/image-asset/index.android.js.map +1 -1
  122. package/image-asset/index.ios.js +25 -35
  123. package/image-asset/index.ios.js.map +1 -1
  124. package/image-source/image-source-common.js +2 -2
  125. package/image-source/image-source-common.js.map +1 -1
  126. package/image-source/index.android.js +152 -178
  127. package/image-source/index.android.js.map +1 -1
  128. package/image-source/index.ios.js +177 -203
  129. package/image-source/index.ios.js.map +1 -1
  130. package/index.js +4 -8
  131. package/index.js.map +1 -1
  132. package/matrix/index.js +17 -27
  133. package/matrix/index.js.map +1 -1
  134. package/media-query-list/index.js +61 -87
  135. package/media-query-list/index.js.map +1 -1
  136. package/module-name-resolver/index.js +21 -24
  137. package/module-name-resolver/index.js.map +1 -1
  138. package/module-name-resolver/non-bundle-workflow-compat.js +24 -24
  139. package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
  140. package/module-name-resolver/qualifier-matcher/index.js +46 -46
  141. package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
  142. package/package.json +1 -1
  143. package/platform/common.js +5 -5
  144. package/platform/common.js.map +1 -1
  145. package/platform/device/index.android.js +68 -107
  146. package/platform/device/index.android.js.map +1 -1
  147. package/platform/device/index.ios.js +62 -101
  148. package/platform/device/index.ios.js.map +1 -1
  149. package/platform/screen/index.android.js +32 -63
  150. package/platform/screen/index.android.js.map +1 -1
  151. package/platform/screen/index.ios.js +29 -60
  152. package/platform/screen/index.ios.js.map +1 -1
  153. package/profiling/index.js +40 -47
  154. package/profiling/index.js.map +1 -1
  155. package/text/text-common.js +36 -49
  156. package/text/text-common.js.map +1 -1
  157. package/timer/index.android.js +20 -30
  158. package/timer/index.android.js.map +1 -1
  159. package/timer/index.ios.js +12 -22
  160. package/timer/index.ios.js.map +1 -1
  161. package/trace/index.js +26 -36
  162. package/trace/index.js.map +1 -1
  163. package/ui/action-bar/action-bar-common.js +193 -252
  164. package/ui/action-bar/action-bar-common.js.map +1 -1
  165. package/ui/action-bar/index.android.js +170 -212
  166. package/ui/action-bar/index.android.js.map +1 -1
  167. package/ui/action-bar/index.ios.js +208 -251
  168. package/ui/action-bar/index.ios.js.map +1 -1
  169. package/ui/activity-indicator/activity-indicator-common.js +6 -11
  170. package/ui/activity-indicator/activity-indicator-common.js.map +1 -1
  171. package/ui/activity-indicator/index.android.js +20 -26
  172. package/ui/activity-indicator/index.android.js.map +1 -1
  173. package/ui/activity-indicator/index.ios.js +23 -31
  174. package/ui/activity-indicator/index.ios.js.map +1 -1
  175. package/ui/animation/animation-common.js +43 -50
  176. package/ui/animation/animation-common.js.map +1 -1
  177. package/ui/animation/animation-interfaces.js +3 -5
  178. package/ui/animation/animation-interfaces.js.map +1 -1
  179. package/ui/animation/index.android.js +90 -94
  180. package/ui/animation/index.android.js.map +1 -1
  181. package/ui/animation/index.ios.js +225 -191
  182. package/ui/animation/index.ios.js.map +1 -1
  183. package/ui/animation/keyframe-animation.js +67 -89
  184. package/ui/animation/keyframe-animation.js.map +1 -1
  185. package/ui/builder/binding-builder.js +31 -31
  186. package/ui/builder/binding-builder.js.map +1 -1
  187. package/ui/builder/component-builder/index.js +37 -37
  188. package/ui/builder/component-builder/index.js.map +1 -1
  189. package/ui/builder/index.js +54 -59
  190. package/ui/builder/index.js.map +1 -1
  191. package/ui/builder/xml2ui.js +128 -158
  192. package/ui/builder/xml2ui.js.map +1 -1
  193. package/ui/button/button-common.js +18 -25
  194. package/ui/button/button-common.js.map +1 -1
  195. package/ui/button/index.android.js +69 -80
  196. package/ui/button/index.android.js.map +1 -1
  197. package/ui/button/index.ios.js +103 -114
  198. package/ui/button/index.ios.js.map +1 -1
  199. package/ui/content-view/index.js +60 -78
  200. package/ui/content-view/index.js.map +1 -1
  201. package/ui/core/bindable/bindable-expressions.js +93 -101
  202. package/ui/core/bindable/bindable-expressions.js.map +1 -1
  203. package/ui/core/bindable/bindable-resources.js +1 -1
  204. package/ui/core/bindable/index.js +136 -141
  205. package/ui/core/bindable/index.js.map +1 -1
  206. package/ui/core/control-state-change/index.android.js +5 -7
  207. package/ui/core/control-state-change/index.android.js.map +1 -1
  208. package/ui/core/control-state-change/index.ios.js +9 -13
  209. package/ui/core/control-state-change/index.ios.js.map +1 -1
  210. package/ui/core/properties/index.js +440 -489
  211. package/ui/core/properties/index.js.map +1 -1
  212. package/ui/core/view/index.android.js +348 -384
  213. package/ui/core/view/index.android.js.map +1 -1
  214. package/ui/core/view/index.ios.js +364 -400
  215. package/ui/core/view/index.ios.js.map +1 -1
  216. package/ui/core/view/view-common.js +655 -944
  217. package/ui/core/view/view-common.js.map +1 -1
  218. package/ui/core/view/view-helper/index.android.js +15 -19
  219. package/ui/core/view/view-helper/index.android.js.map +1 -1
  220. package/ui/core/view/view-helper/index.ios.js +81 -85
  221. package/ui/core/view/view-helper/index.ios.js.map +1 -1
  222. package/ui/core/view/view-helper/view-helper-common.js +44 -49
  223. package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
  224. package/ui/core/view-base/index.js +371 -426
  225. package/ui/core/view-base/index.js.map +1 -1
  226. package/ui/core/weak-event-listener/index.js +25 -26
  227. package/ui/core/weak-event-listener/index.js.map +1 -1
  228. package/ui/date-picker/date-picker-common.js +30 -35
  229. package/ui/date-picker/date-picker-common.js.map +1 -1
  230. package/ui/date-picker/index.android.js +43 -51
  231. package/ui/date-picker/index.android.js.map +1 -1
  232. package/ui/date-picker/index.ios.js +51 -61
  233. package/ui/date-picker/index.ios.js.map +1 -1
  234. package/ui/dialogs/dialogs-common.js +18 -18
  235. package/ui/dialogs/dialogs-common.js.map +1 -1
  236. package/ui/dialogs/index.android.js +86 -98
  237. package/ui/dialogs/index.android.js.map +1 -1
  238. package/ui/dialogs/index.ios.js +67 -80
  239. package/ui/dialogs/index.ios.js.map +1 -1
  240. package/ui/editable-text-base/editable-text-base-common.js +29 -35
  241. package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
  242. package/ui/editable-text-base/index.android.js +106 -112
  243. package/ui/editable-text-base/index.android.js.map +1 -1
  244. package/ui/editable-text-base/index.ios.js +47 -53
  245. package/ui/editable-text-base/index.ios.js.map +1 -1
  246. package/ui/embedding/index.android.js +2 -3
  247. package/ui/embedding/index.android.js.map +1 -1
  248. package/ui/frame/activity.android.js +44 -44
  249. package/ui/frame/activity.android.js.map +1 -1
  250. package/ui/frame/callbacks/activity-callbacks.js +118 -123
  251. package/ui/frame/callbacks/activity-callbacks.js.map +1 -1
  252. package/ui/frame/callbacks/fragment-callbacks.js +139 -141
  253. package/ui/frame/callbacks/fragment-callbacks.js.map +1 -1
  254. package/ui/frame/fragment.android.js +21 -21
  255. package/ui/frame/fragment.android.js.map +1 -1
  256. package/ui/frame/fragment.ios.js +1 -1
  257. package/ui/frame/fragment.transitions.android.js +105 -114
  258. package/ui/frame/fragment.transitions.android.js.map +1 -1
  259. package/ui/frame/frame-common.d.ts +1 -1
  260. package/ui/frame/frame-common.js +249 -285
  261. package/ui/frame/frame-common.js.map +1 -1
  262. package/ui/frame/frame-helpers.js +1 -1
  263. package/ui/frame/frame-helpers.js.map +1 -1
  264. package/ui/frame/frame-stack.js +4 -4
  265. package/ui/frame/frame-stack.js.map +1 -1
  266. package/ui/frame/index.android.js +239 -291
  267. package/ui/frame/index.android.js.map +1 -1
  268. package/ui/frame/index.ios.js +133 -167
  269. package/ui/frame/index.ios.js.map +1 -1
  270. package/ui/gestures/gestures-common.js +15 -29
  271. package/ui/gestures/gestures-common.js.map +1 -1
  272. package/ui/gestures/index.android.js +108 -124
  273. package/ui/gestures/index.android.js.map +1 -1
  274. package/ui/gestures/index.ios.js +108 -121
  275. package/ui/gestures/index.ios.js.map +1 -1
  276. package/ui/gestures/touch-manager.js +42 -48
  277. package/ui/gestures/touch-manager.js.map +1 -1
  278. package/ui/html-view/html-view-common.js +9 -14
  279. package/ui/html-view/html-view-common.js.map +1 -1
  280. package/ui/html-view/index.android.js +37 -43
  281. package/ui/html-view/index.android.js.map +1 -1
  282. package/ui/html-view/index.ios.js +62 -73
  283. package/ui/html-view/index.ios.js.map +1 -1
  284. package/ui/image/image-common.js +47 -57
  285. package/ui/image/image-common.js.map +1 -1
  286. package/ui/image/index.android.js +54 -59
  287. package/ui/image/index.android.js.map +1 -1
  288. package/ui/image/index.ios.js +65 -72
  289. package/ui/image/index.ios.js.map +1 -1
  290. package/ui/image/symbol-effects-common.js +2 -6
  291. package/ui/image/symbol-effects-common.js.map +1 -1
  292. package/ui/image/symbol-effects.android.js +4 -10
  293. package/ui/image/symbol-effects.android.js.map +1 -1
  294. package/ui/image/symbol-effects.ios.js +7 -11
  295. package/ui/image/symbol-effects.ios.js.map +1 -1
  296. package/ui/image-cache/image-cache-common.js +57 -61
  297. package/ui/image-cache/image-cache-common.js.map +1 -1
  298. package/ui/image-cache/index.android.js +23 -27
  299. package/ui/image-cache/index.android.js.map +1 -1
  300. package/ui/image-cache/index.ios.js +24 -29
  301. package/ui/image-cache/index.ios.js.map +1 -1
  302. package/ui/label/index.android.js +29 -38
  303. package/ui/label/index.android.js.map +1 -1
  304. package/ui/label/index.ios.js +89 -102
  305. package/ui/label/index.ios.js.map +1 -1
  306. package/ui/layouts/absolute-layout/absolute-layout-common.js +25 -30
  307. package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
  308. package/ui/layouts/absolute-layout/index.android.js +6 -12
  309. package/ui/layouts/absolute-layout/index.android.js.map +1 -1
  310. package/ui/layouts/absolute-layout/index.ios.js +32 -40
  311. package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
  312. package/ui/layouts/dock-layout/dock-layout-common.js +16 -21
  313. package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -1
  314. package/ui/layouts/dock-layout/index.android.js +11 -17
  315. package/ui/layouts/dock-layout/index.android.js.map +1 -1
  316. package/ui/layouts/dock-layout/index.ios.js +45 -53
  317. package/ui/layouts/dock-layout/index.ios.js.map +1 -1
  318. package/ui/layouts/flexbox-layout/flexbox-layout-common.js +90 -115
  319. package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
  320. package/ui/layouts/flexbox-layout/index.android.js +92 -97
  321. package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
  322. package/ui/layouts/flexbox-layout/index.ios.js +366 -427
  323. package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
  324. package/ui/layouts/grid-layout/grid-layout-common.js +159 -211
  325. package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -1
  326. package/ui/layouts/grid-layout/index.android.js +49 -55
  327. package/ui/layouts/grid-layout/index.android.js.map +1 -1
  328. package/ui/layouts/grid-layout/index.ios.js +340 -348
  329. package/ui/layouts/grid-layout/index.ios.js.map +1 -1
  330. package/ui/layouts/layout-base-common.js +78 -106
  331. package/ui/layouts/layout-base-common.js.map +1 -1
  332. package/ui/layouts/layout-base.android.js +25 -31
  333. package/ui/layouts/layout-base.android.js.map +1 -1
  334. package/ui/layouts/layout-base.ios.js +21 -27
  335. package/ui/layouts/layout-base.ios.js.map +1 -1
  336. package/ui/layouts/root-layout/index.android.js +47 -46
  337. package/ui/layouts/root-layout/index.android.js.map +1 -1
  338. package/ui/layouts/root-layout/index.ios.js +54 -53
  339. package/ui/layouts/root-layout/index.ios.js.map +1 -1
  340. package/ui/layouts/root-layout/root-layout-common.js +186 -190
  341. package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
  342. package/ui/layouts/stack-layout/index.android.js +6 -12
  343. package/ui/layouts/stack-layout/index.android.js.map +1 -1
  344. package/ui/layouts/stack-layout/index.ios.js +62 -69
  345. package/ui/layouts/stack-layout/index.ios.js.map +1 -1
  346. package/ui/layouts/stack-layout/stack-layout-common.js +7 -12
  347. package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -1
  348. package/ui/layouts/wrap-layout/index.android.js +10 -16
  349. package/ui/layouts/wrap-layout/index.android.js.map +1 -1
  350. package/ui/layouts/wrap-layout/index.ios.js +70 -76
  351. package/ui/layouts/wrap-layout/index.ios.js.map +1 -1
  352. package/ui/layouts/wrap-layout/wrap-layout-common.js +13 -18
  353. package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
  354. package/ui/list-picker/index.android.js +42 -48
  355. package/ui/list-picker/index.android.js.map +1 -1
  356. package/ui/list-picker/index.ios.js +26 -36
  357. package/ui/list-picker/index.ios.js.map +1 -1
  358. package/ui/list-picker/list-picker-common.js +27 -32
  359. package/ui/list-picker/list-picker-common.js.map +1 -1
  360. package/ui/list-view/index.android.js +98 -110
  361. package/ui/list-view/index.android.js.map +1 -1
  362. package/ui/list-view/index.ios.js +121 -137
  363. package/ui/list-view/index.ios.js.map +1 -1
  364. package/ui/list-view/list-view-common.js +100 -116
  365. package/ui/list-view/list-view-common.js.map +1 -1
  366. package/ui/page/index.android.js +57 -65
  367. package/ui/page/index.android.js.map +1 -1
  368. package/ui/page/index.ios.js +98 -107
  369. package/ui/page/index.ios.js.map +1 -1
  370. package/ui/page/page-common.js +113 -145
  371. package/ui/page/page-common.js.map +1 -1
  372. package/ui/placeholder/index.android.js +10 -16
  373. package/ui/placeholder/index.android.js.map +1 -1
  374. package/ui/placeholder/index.js +6 -12
  375. package/ui/placeholder/index.js.map +1 -1
  376. package/ui/progress/index.android.js +28 -34
  377. package/ui/progress/index.android.js.map +1 -1
  378. package/ui/progress/index.ios.js +29 -39
  379. package/ui/progress/index.ios.js.map +1 -1
  380. package/ui/progress/progress-common.js +11 -16
  381. package/ui/progress/progress-common.js.map +1 -1
  382. package/ui/proxy-view-container/index.js +90 -111
  383. package/ui/proxy-view-container/index.js.map +1 -1
  384. package/ui/repeater/index.js +100 -112
  385. package/ui/repeater/index.js.map +1 -1
  386. package/ui/scroll-view/index.android.d.ts +1 -1
  387. package/ui/scroll-view/index.android.js +75 -95
  388. package/ui/scroll-view/index.android.js.map +1 -1
  389. package/ui/scroll-view/index.ios.js +72 -92
  390. package/ui/scroll-view/index.ios.js.map +1 -1
  391. package/ui/scroll-view/scroll-view-common.js +45 -65
  392. package/ui/scroll-view/scroll-view-common.js.map +1 -1
  393. package/ui/search-bar/index.android.js +88 -94
  394. package/ui/search-bar/index.android.js.map +1 -1
  395. package/ui/search-bar/index.ios.js +74 -88
  396. package/ui/search-bar/index.ios.js.map +1 -1
  397. package/ui/search-bar/search-bar-common.js +13 -18
  398. package/ui/search-bar/search-bar-common.js.map +1 -1
  399. package/ui/segmented-bar/index.android.js +98 -112
  400. package/ui/segmented-bar/index.android.js.map +1 -1
  401. package/ui/segmented-bar/index.ios.js +63 -80
  402. package/ui/segmented-bar/index.ios.js.map +1 -1
  403. package/ui/segmented-bar/segmented-bar-common.js +61 -81
  404. package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
  405. package/ui/slider/index.android.js +43 -49
  406. package/ui/slider/index.android.js.map +1 -1
  407. package/ui/slider/index.ios.js +49 -59
  408. package/ui/slider/index.ios.js.map +1 -1
  409. package/ui/slider/slider-common.js +28 -35
  410. package/ui/slider/slider-common.js.map +1 -1
  411. package/ui/styling/background-common.js +98 -100
  412. package/ui/styling/background-common.js.map +1 -1
  413. package/ui/styling/background.android.js +35 -38
  414. package/ui/styling/background.android.js.map +1 -1
  415. package/ui/styling/background.ios.js +252 -258
  416. package/ui/styling/background.ios.js.map +1 -1
  417. package/ui/styling/box-shadow.js +2 -6
  418. package/ui/styling/box-shadow.js.map +1 -1
  419. package/ui/styling/converters.js +7 -7
  420. package/ui/styling/converters.js.map +1 -1
  421. package/ui/styling/css-animation-parser.js +56 -69
  422. package/ui/styling/css-animation-parser.js.map +1 -1
  423. package/ui/styling/css-selector.js +425 -522
  424. package/ui/styling/css-selector.js.map +1 -1
  425. package/ui/styling/css-shadow.js +2 -2
  426. package/ui/styling/css-shadow.js.map +1 -1
  427. package/ui/styling/css-stroke.js +3 -3
  428. package/ui/styling/css-stroke.js.map +1 -1
  429. package/ui/styling/css-utils.js +22 -22
  430. package/ui/styling/css-utils.js.map +1 -1
  431. package/ui/styling/font-common.js +44 -59
  432. package/ui/styling/font-common.js.map +1 -1
  433. package/ui/styling/font.android.js +34 -42
  434. package/ui/styling/font.android.js.map +1 -1
  435. package/ui/styling/font.ios.js +49 -54
  436. package/ui/styling/font.ios.js.map +1 -1
  437. package/ui/styling/linear-gradient.js +13 -17
  438. package/ui/styling/linear-gradient.js.map +1 -1
  439. package/ui/styling/style/index.js +36 -47
  440. package/ui/styling/style/index.js.map +1 -1
  441. package/ui/styling/style-properties.js +291 -306
  442. package/ui/styling/style-properties.js.map +1 -1
  443. package/ui/styling/style-scope.js +377 -416
  444. package/ui/styling/style-scope.js.map +1 -1
  445. package/ui/switch/index.android.js +41 -47
  446. package/ui/switch/index.android.js.map +1 -1
  447. package/ui/switch/index.ios.js +57 -66
  448. package/ui/switch/index.ios.js.map +1 -1
  449. package/ui/switch/switch-common.js +11 -16
  450. package/ui/switch/switch-common.js.map +1 -1
  451. package/ui/tab-view/index.android.js +187 -206
  452. package/ui/tab-view/index.android.js.map +1 -1
  453. package/ui/tab-view/index.ios.js +161 -177
  454. package/ui/tab-view/index.ios.js.map +1 -1
  455. package/ui/tab-view/tab-view-common.js +143 -197
  456. package/ui/tab-view/tab-view-common.js.map +1 -1
  457. package/ui/text-base/formatted-string.js +105 -158
  458. package/ui/text-base/formatted-string.js.map +1 -1
  459. package/ui/text-base/index.android.js +130 -136
  460. package/ui/text-base/index.android.js.map +1 -1
  461. package/ui/text-base/index.ios.js +112 -120
  462. package/ui/text-base/index.ios.js.map +1 -1
  463. package/ui/text-base/span.js +102 -158
  464. package/ui/text-base/span.js.map +1 -1
  465. package/ui/text-base/text-base-common.js +181 -268
  466. package/ui/text-base/text-base-common.js.map +1 -1
  467. package/ui/text-field/index.android.js +18 -24
  468. package/ui/text-field/index.android.js.map +1 -1
  469. package/ui/text-field/index.ios.js +70 -80
  470. package/ui/text-field/index.ios.js.map +1 -1
  471. package/ui/text-field/text-field-common.js +8 -13
  472. package/ui/text-field/text-field-common.js.map +1 -1
  473. package/ui/text-view/index.android.js +13 -19
  474. package/ui/text-view/index.android.js.map +1 -1
  475. package/ui/text-view/index.ios.js +116 -124
  476. package/ui/text-view/index.ios.js.map +1 -1
  477. package/ui/text-view/text-view-common.js +3 -9
  478. package/ui/text-view/text-view-common.js.map +1 -1
  479. package/ui/time-picker/index.android.js +18 -24
  480. package/ui/time-picker/index.android.js.map +1 -1
  481. package/ui/time-picker/index.ios.js +61 -69
  482. package/ui/time-picker/index.ios.js.map +1 -1
  483. package/ui/time-picker/time-picker-common.js +37 -42
  484. package/ui/time-picker/time-picker-common.js.map +1 -1
  485. package/ui/transition/fade-transition.android.js +8 -14
  486. package/ui/transition/fade-transition.android.js.map +1 -1
  487. package/ui/transition/fade-transition.ios.js +4 -10
  488. package/ui/transition/fade-transition.ios.js.map +1 -1
  489. package/ui/transition/flip-transition.android.js +14 -18
  490. package/ui/transition/flip-transition.android.js.map +1 -1
  491. package/ui/transition/index.android.js +24 -27
  492. package/ui/transition/index.android.js.map +1 -1
  493. package/ui/transition/index.ios.js +18 -22
  494. package/ui/transition/index.ios.js.map +1 -1
  495. package/ui/transition/modal-transition.android.js +4 -10
  496. package/ui/transition/modal-transition.android.js.map +1 -1
  497. package/ui/transition/modal-transition.ios.js +18 -25
  498. package/ui/transition/modal-transition.ios.js.map +1 -1
  499. package/ui/transition/page-transition.android.js +57 -71
  500. package/ui/transition/page-transition.android.js.map +1 -1
  501. package/ui/transition/page-transition.ios.js +19 -27
  502. package/ui/transition/page-transition.ios.js.map +1 -1
  503. package/ui/transition/shared-transition-helper.android.js +8 -12
  504. package/ui/transition/shared-transition-helper.android.js.map +1 -1
  505. package/ui/transition/shared-transition-helper.ios.js +442 -539
  506. package/ui/transition/shared-transition-helper.ios.js.map +1 -1
  507. package/ui/transition/shared-transition.js +77 -76
  508. package/ui/transition/shared-transition.js.map +1 -1
  509. package/ui/transition/slide-transition.android.js +17 -22
  510. package/ui/transition/slide-transition.android.js.map +1 -1
  511. package/ui/transition/slide-transition.ios.js +7 -11
  512. package/ui/transition/slide-transition.ios.js.map +1 -1
  513. package/ui/utils.ios.js +13 -13
  514. package/ui/utils.ios.js.map +1 -1
  515. package/ui/web-view/index.android.js +50 -64
  516. package/ui/web-view/index.android.js.map +1 -1
  517. package/ui/web-view/index.ios.js +50 -73
  518. package/ui/web-view/index.ios.js.map +1 -1
  519. package/ui/web-view/web-view-common.js +29 -43
  520. package/ui/web-view/web-view-common.js.map +1 -1
  521. package/utils/android/index.js +26 -27
  522. package/utils/android/index.js.map +1 -1
  523. package/utils/common.js +49 -65
  524. package/utils/common.js.map +1 -1
  525. package/utils/constants.android.js +1 -1
  526. package/utils/constants.android.js.map +1 -1
  527. package/utils/constants.ios.js +1 -1
  528. package/utils/constants.ios.js.map +1 -1
  529. package/utils/debug.js +32 -54
  530. package/utils/debug.js.map +1 -1
  531. package/utils/index.android.js +40 -36
  532. package/utils/index.android.js.map +1 -1
  533. package/utils/index.ios.js +9 -9
  534. package/utils/index.ios.js.map +1 -1
  535. package/utils/ios/index.js +45 -42
  536. package/utils/ios/index.js.map +1 -1
  537. package/utils/layout-helper/index.android.js +4 -4
  538. package/utils/layout-helper/index.android.js.map +1 -1
  539. package/utils/layout-helper/index.ios.js +2 -2
  540. package/utils/layout-helper/index.ios.js.map +1 -1
  541. package/utils/layout-helper/layout-helper-common.js +13 -13
  542. package/utils/layout-helper/layout-helper-common.js.map +1 -1
  543. package/utils/lazy.js +2 -2
  544. package/utils/lazy.js.map +1 -1
  545. package/utils/macrotask-scheduler.js +6 -6
  546. package/utils/macrotask-scheduler.js.map +1 -1
  547. package/utils/mainthread-helper.android.js +4 -4
  548. package/utils/mainthread-helper.android.js.map +1 -1
  549. package/utils/mainthread-helper.ios.js +1 -1
  550. package/utils/mainthread-helper.ios.js.map +1 -1
  551. package/utils/module-merge.js +1 -1
  552. package/utils/module-merge.js.map +1 -1
  553. package/utils/native-helper.android.js +19 -19
  554. package/utils/native-helper.android.js.map +1 -1
  555. package/utils/native-helper.ios.js +16 -23
  556. package/utils/native-helper.ios.js.map +1 -1
  557. package/utils/number-utils.js +3 -3
  558. package/utils/number-utils.js.map +1 -1
  559. package/utils/platform-check.js +6 -6
  560. package/utils/platform-check.js.map +1 -1
  561. package/utils/types.js +33 -43
  562. package/utils/types.js.map +1 -1
  563. package/wgc/crypto/SubtleCrypto.js +132 -167
  564. package/wgc/crypto/SubtleCrypto.js.map +1 -1
  565. package/wgc/crypto/index.d.ts +1 -1
  566. package/wgc/crypto/index.js +10 -18
  567. package/wgc/crypto/index.js.map +1 -1
  568. package/xhr/index.js +226 -308
  569. package/xhr/index.js.map +1 -1
  570. package/xml/index.js +78 -118
  571. package/xml/index.js.map +1 -1
@@ -2,7 +2,7 @@ import * as textModule from '../text';
2
2
  import { Application } from '../application';
3
3
  import { getFileExtension } from '../utils';
4
4
  import { SDK_VERSION } from '../utils/constants';
5
- var applicationContext;
5
+ let applicationContext;
6
6
  function getApplicationContext() {
7
7
  if (!applicationContext) {
8
8
  applicationContext = Application.android.getNativeApplication().getApplicationContext();
@@ -18,8 +18,8 @@ function isContentUri(path) {
18
18
  }
19
19
  return false;
20
20
  }
21
- var FileSystemAccess = /** @class */ (function () {
22
- function FileSystemAccess() {
21
+ export class FileSystemAccess {
22
+ constructor() {
23
23
  this._pathSeparator = '/';
24
24
  this.copy = this.copySync.bind(this);
25
25
  this.readBuffer = this.readBufferSync.bind(this);
@@ -32,19 +32,19 @@ var FileSystemAccess = /** @class */ (function () {
32
32
  this.appendText = this.appendTextSync.bind(this);
33
33
  this.writeText = this.writeTextSync.bind(this);
34
34
  }
35
- FileSystemAccess.prototype.getLastModified = function (path) {
36
- var javaFile = new java.io.File(path);
35
+ getLastModified(path) {
36
+ const javaFile = new java.io.File(path);
37
37
  return new Date(javaFile.lastModified());
38
- };
39
- FileSystemAccess.prototype.getFileSize = function (path) {
40
- var javaFile = new java.io.File(path);
38
+ }
39
+ getFileSize(path) {
40
+ const javaFile = new java.io.File(path);
41
41
  return javaFile.length();
42
- };
43
- FileSystemAccess.prototype.getParent = function (path, onError) {
42
+ }
43
+ getParent(path, onError) {
44
44
  try {
45
- var javaFile = new java.io.File(path);
46
- var parent_1 = javaFile.getParentFile();
47
- return { path: parent_1.getAbsolutePath(), name: parent_1.getName() };
45
+ const javaFile = new java.io.File(path);
46
+ const parent = javaFile.getParentFile();
47
+ return { path: parent.getAbsolutePath(), name: parent.getName() };
48
48
  }
49
49
  catch (exception) {
50
50
  // TODO: unified approach for error messages
@@ -53,32 +53,32 @@ var FileSystemAccess = /** @class */ (function () {
53
53
  }
54
54
  return undefined;
55
55
  }
56
- };
57
- FileSystemAccess.prototype.getFile = function (path, onError) {
56
+ }
57
+ getFile(path, onError) {
58
58
  return this.ensureFile(new java.io.File(path), false, onError);
59
- };
60
- FileSystemAccess.prototype.getFolder = function (path, onError) {
61
- var javaFile = new java.io.File(path);
62
- var dirInfo = this.ensureFile(javaFile, true, onError);
59
+ }
60
+ getFolder(path, onError) {
61
+ const javaFile = new java.io.File(path);
62
+ const dirInfo = this.ensureFile(javaFile, true, onError);
63
63
  if (!dirInfo) {
64
64
  return undefined;
65
65
  }
66
66
  return { path: dirInfo.path, name: dirInfo.name };
67
- };
68
- FileSystemAccess.prototype.eachEntity = function (path, onEntity, onError) {
67
+ }
68
+ eachEntity(path, onEntity, onError) {
69
69
  if (!onEntity) {
70
70
  return;
71
71
  }
72
72
  this.enumEntities(path, onEntity, onError);
73
- };
74
- FileSystemAccess.prototype.getEntities = function (path, onError) {
75
- var fileInfos = new Array();
76
- var onEntity = function (entity) {
73
+ }
74
+ getEntities(path, onError) {
75
+ const fileInfos = new Array();
76
+ const onEntity = function (entity) {
77
77
  fileInfos.push(entity);
78
78
  return true;
79
79
  };
80
- var errorOccurred;
81
- var localError = function (error) {
80
+ let errorOccurred;
81
+ const localError = function (error) {
82
82
  if (onError) {
83
83
  onError(error);
84
84
  }
@@ -89,18 +89,18 @@ var FileSystemAccess = /** @class */ (function () {
89
89
  return fileInfos;
90
90
  }
91
91
  return null;
92
- };
93
- FileSystemAccess.prototype.fileExists = function (path) {
94
- var file = new java.io.File(path);
92
+ }
93
+ fileExists(path) {
94
+ const file = new java.io.File(path);
95
95
  return file.exists();
96
- };
97
- FileSystemAccess.prototype.folderExists = function (path) {
98
- var file = new java.io.File(path);
96
+ }
97
+ folderExists(path) {
98
+ const file = new java.io.File(path);
99
99
  return file.exists() && file.isDirectory();
100
- };
101
- FileSystemAccess.prototype.deleteFile = function (path, onError) {
100
+ }
101
+ deleteFile(path, onError) {
102
102
  try {
103
- var javaFile = new java.io.File(path);
103
+ const javaFile = new java.io.File(path);
104
104
  if (!javaFile.isFile()) {
105
105
  if (onError) {
106
106
  onError({
@@ -120,10 +120,10 @@ var FileSystemAccess = /** @class */ (function () {
120
120
  onError(exception);
121
121
  }
122
122
  }
123
- };
124
- FileSystemAccess.prototype.deleteFolder = function (path, onError) {
123
+ }
124
+ deleteFolder(path, onError) {
125
125
  try {
126
- var javaFile = new java.io.File(path);
126
+ const javaFile = new java.io.File(path);
127
127
  if (!javaFile.getCanonicalFile().isDirectory()) {
128
128
  if (onError) {
129
129
  onError({
@@ -145,10 +145,10 @@ var FileSystemAccess = /** @class */ (function () {
145
145
  onError(exception);
146
146
  }
147
147
  }
148
- };
149
- FileSystemAccess.prototype.emptyFolder = function (path, onError) {
148
+ }
149
+ emptyFolder(path, onError) {
150
150
  try {
151
- var javaFile = new java.io.File(path);
151
+ const javaFile = new java.io.File(path);
152
152
  if (!javaFile.getCanonicalFile().isDirectory()) {
153
153
  if (onError) {
154
154
  onError({
@@ -165,16 +165,16 @@ var FileSystemAccess = /** @class */ (function () {
165
165
  onError(exception);
166
166
  }
167
167
  }
168
- };
169
- FileSystemAccess.prototype.rename = function (path, newPath, onError) {
170
- var javaFile = new java.io.File(path);
168
+ }
169
+ rename(path, newPath, onError) {
170
+ const javaFile = new java.io.File(path);
171
171
  if (!javaFile.exists()) {
172
172
  if (onError) {
173
173
  onError(new Error('The file to rename does not exist'));
174
174
  }
175
175
  return;
176
176
  }
177
- var newFile = new java.io.File(newPath);
177
+ const newFile = new java.io.File(newPath);
178
178
  if (newFile.exists()) {
179
179
  if (onError) {
180
180
  onError(new Error('A file with the same name already exists.'));
@@ -186,14 +186,14 @@ var FileSystemAccess = /** @class */ (function () {
186
186
  onError(new Error("Failed to rename file '" + path + "' to '" + newPath + "'"));
187
187
  }
188
188
  }
189
- };
190
- FileSystemAccess.prototype.getDocumentsFolderPath = function () {
191
- var dir = getApplicationContext().getFilesDir();
189
+ }
190
+ getDocumentsFolderPath() {
191
+ const dir = getApplicationContext().getFilesDir();
192
192
  return dir.getAbsolutePath();
193
- };
194
- FileSystemAccess.prototype.getExternalDocumentsFolderPath = function () {
195
- var dirs = getApplicationContext().getExternalFilesDirs(null);
196
- var dir;
193
+ }
194
+ getExternalDocumentsFolderPath() {
195
+ const dirs = getApplicationContext().getExternalFilesDirs(null);
196
+ let dir;
197
197
  if (dirs && dirs.length > 1) {
198
198
  dir = dirs[dirs.length - 1];
199
199
  }
@@ -201,19 +201,19 @@ var FileSystemAccess = /** @class */ (function () {
201
201
  dir = getApplicationContext().getExternalFilesDir(null);
202
202
  }
203
203
  return dir.getAbsolutePath();
204
- };
205
- FileSystemAccess.prototype.getLogicalRootPath = function () {
206
- var dir = getApplicationContext().getFilesDir();
204
+ }
205
+ getLogicalRootPath() {
206
+ const dir = getApplicationContext().getFilesDir();
207
207
  return dir.getCanonicalPath();
208
- };
209
- FileSystemAccess.prototype.getTempFolderPath = function () {
210
- var dir = getApplicationContext().getCacheDir();
208
+ }
209
+ getTempFolderPath() {
210
+ const dir = getApplicationContext().getCacheDir();
211
211
  return dir.getAbsolutePath();
212
- };
213
- FileSystemAccess.prototype.getCurrentAppPath = function () {
212
+ }
213
+ getCurrentAppPath() {
214
214
  return this.getLogicalRootPath() + '/app';
215
- };
216
- FileSystemAccess.prototype.copySync = function (src, dest, onError) {
215
+ }
216
+ copySync(src, dest, onError) {
217
217
  try {
218
218
  return org.nativescript.widgets.Async.File.copySync(src, dest, getApplicationContext());
219
219
  }
@@ -223,15 +223,15 @@ var FileSystemAccess = /** @class */ (function () {
223
223
  }
224
224
  }
225
225
  return false;
226
- };
227
- FileSystemAccess.prototype.copyAsync = function (src, dest) {
228
- return new Promise(function (resolve, reject) {
226
+ }
227
+ copyAsync(src, dest) {
228
+ return new Promise((resolve, reject) => {
229
229
  try {
230
230
  org.nativescript.widgets.Async.File.copy(src, dest, new org.nativescript.widgets.Async.CompleteCallback({
231
- onComplete: function (result) {
231
+ onComplete: (result) => {
232
232
  resolve(result);
233
233
  },
234
- onError: function (err) {
234
+ onError: (err) => {
235
235
  reject(err);
236
236
  },
237
237
  }), getApplicationContext());
@@ -240,15 +240,15 @@ var FileSystemAccess = /** @class */ (function () {
240
240
  reject(ex);
241
241
  }
242
242
  });
243
- };
244
- FileSystemAccess.prototype.readBufferAsync = function (path) {
245
- return new Promise(function (resolve, reject) {
243
+ }
244
+ readBufferAsync(path) {
245
+ return new Promise((resolve, reject) => {
246
246
  try {
247
247
  org.nativescript.widgets.Async.File.readBuffer(path, new org.nativescript.widgets.Async.CompleteCallback({
248
- onComplete: function (result) {
248
+ onComplete: (result) => {
249
249
  resolve(ArrayBuffer.from(result));
250
250
  },
251
- onError: function (err) {
251
+ onError: (err) => {
252
252
  reject(err);
253
253
  },
254
254
  }), null);
@@ -257,13 +257,13 @@ var FileSystemAccess = /** @class */ (function () {
257
257
  reject(ex);
258
258
  }
259
259
  });
260
- };
261
- FileSystemAccess.prototype.readBufferSync = function (path, onError) {
260
+ }
261
+ readBufferSync(path, onError) {
262
262
  try {
263
- var javaFile = new java.io.File(path);
264
- var stream = new java.io.FileInputStream(javaFile);
265
- var channel = stream.getChannel();
266
- var buffer = new ArrayBuffer(javaFile.length());
263
+ const javaFile = new java.io.File(path);
264
+ const stream = new java.io.FileInputStream(javaFile);
265
+ const channel = stream.getChannel();
266
+ const buffer = new ArrayBuffer(javaFile.length());
267
267
  channel.read(buffer);
268
268
  return buffer;
269
269
  }
@@ -272,15 +272,15 @@ var FileSystemAccess = /** @class */ (function () {
272
272
  onError(exception);
273
273
  }
274
274
  }
275
- };
276
- FileSystemAccess.prototype.readAsync = function (path) {
277
- return new Promise(function (resolve, reject) {
275
+ }
276
+ readAsync(path) {
277
+ return new Promise((resolve, reject) => {
278
278
  try {
279
279
  org.nativescript.widgets.Async.File.read(path, new org.nativescript.widgets.Async.CompleteCallback({
280
- onComplete: function (result) {
280
+ onComplete: (result) => {
281
281
  resolve(result);
282
282
  },
283
- onError: function (err) {
283
+ onError: (err) => {
284
284
  reject(err);
285
285
  },
286
286
  }), null);
@@ -289,13 +289,13 @@ var FileSystemAccess = /** @class */ (function () {
289
289
  reject(ex);
290
290
  }
291
291
  });
292
- };
293
- FileSystemAccess.prototype.readSync = function (path, onError) {
292
+ }
293
+ readSync(path, onError) {
294
294
  try {
295
- var javaFile = new java.io.File(path);
296
- var stream = new java.io.FileInputStream(javaFile);
297
- var bytes = Array.create('byte', javaFile.length());
298
- var dataInputStream = new java.io.DataInputStream(stream);
295
+ const javaFile = new java.io.File(path);
296
+ const stream = new java.io.FileInputStream(javaFile);
297
+ const bytes = Array.create('byte', javaFile.length());
298
+ const dataInputStream = new java.io.DataInputStream(stream);
299
299
  dataInputStream.readFully(bytes);
300
300
  return bytes;
301
301
  }
@@ -304,24 +304,23 @@ var FileSystemAccess = /** @class */ (function () {
304
304
  onError(exception);
305
305
  }
306
306
  }
307
- };
308
- FileSystemAccess.getBuffer = function (buffer) {
309
- var _a;
307
+ }
308
+ static getBuffer(buffer) {
310
309
  if (buffer instanceof ArrayBuffer) {
311
310
  return buffer.nativeObject || buffer;
312
311
  }
313
312
  else {
314
- return ((_a = buffer === null || buffer === void 0 ? void 0 : buffer.buffer) === null || _a === void 0 ? void 0 : _a.nativeObject) || buffer;
313
+ return buffer?.buffer?.nativeObject || buffer;
315
314
  }
316
- };
317
- FileSystemAccess.prototype.appendBufferAsync = function (path, buffer) {
318
- return new Promise(function (resolve, reject) {
315
+ }
316
+ appendBufferAsync(path, buffer) {
317
+ return new Promise((resolve, reject) => {
319
318
  try {
320
319
  org.nativescript.widgets.Async.File.appendBuffer(path, FileSystemAccess.getBuffer(buffer), new org.nativescript.widgets.Async.CompleteCallback({
321
- onComplete: function () {
320
+ onComplete: () => {
322
321
  resolve();
323
322
  },
324
- onError: function (err) {
323
+ onError: (err) => {
325
324
  reject(err);
326
325
  },
327
326
  }), null);
@@ -330,12 +329,12 @@ var FileSystemAccess = /** @class */ (function () {
330
329
  reject(ex);
331
330
  }
332
331
  });
333
- };
334
- FileSystemAccess.prototype.appendBufferSync = function (path, buffer, onError) {
332
+ }
333
+ appendBufferSync(path, buffer, onError) {
335
334
  try {
336
- var javaFile = new java.io.File(path);
337
- var stream = new java.io.FileOutputStream(javaFile);
338
- var channel = stream.getChannel();
335
+ const javaFile = new java.io.File(path);
336
+ const stream = new java.io.FileOutputStream(javaFile);
337
+ const channel = stream.getChannel();
339
338
  channel.write(FileSystemAccess.getBuffer(buffer));
340
339
  stream.close();
341
340
  }
@@ -344,15 +343,15 @@ var FileSystemAccess = /** @class */ (function () {
344
343
  onError(exception);
345
344
  }
346
345
  }
347
- };
348
- FileSystemAccess.prototype.appendAsync = function (path, bytes) {
349
- return new Promise(function (resolve, reject) {
346
+ }
347
+ appendAsync(path, bytes) {
348
+ return new Promise((resolve, reject) => {
350
349
  try {
351
350
  org.nativescript.widgets.Async.File.append(path, bytes, new org.nativescript.widgets.Async.CompleteCallback({
352
- onComplete: function () {
351
+ onComplete: () => {
353
352
  resolve();
354
353
  },
355
- onError: function (err) {
354
+ onError: (err) => {
356
355
  reject(err);
357
356
  },
358
357
  }), null);
@@ -361,11 +360,11 @@ var FileSystemAccess = /** @class */ (function () {
361
360
  reject(ex);
362
361
  }
363
362
  });
364
- };
365
- FileSystemAccess.prototype.appendSync = function (path, bytes, onError) {
363
+ }
364
+ appendSync(path, bytes, onError) {
366
365
  try {
367
- var javaFile = new java.io.File(path);
368
- var stream = new java.io.FileOutputStream(javaFile, true);
366
+ const javaFile = new java.io.File(path);
367
+ const stream = new java.io.FileOutputStream(javaFile, true);
369
368
  stream.write(bytes, 0, bytes.length);
370
369
  stream.close();
371
370
  }
@@ -374,15 +373,15 @@ var FileSystemAccess = /** @class */ (function () {
374
373
  onError(exception);
375
374
  }
376
375
  }
377
- };
378
- FileSystemAccess.prototype.writeBufferAsync = function (path, buffer) {
379
- return new Promise(function (resolve, reject) {
376
+ }
377
+ writeBufferAsync(path, buffer) {
378
+ return new Promise((resolve, reject) => {
380
379
  try {
381
380
  org.nativescript.widgets.Async.File.writeBuffer(path, FileSystemAccess.getBuffer(buffer), new org.nativescript.widgets.Async.CompleteCallback({
382
- onComplete: function () {
381
+ onComplete: () => {
383
382
  resolve();
384
383
  },
385
- onError: function (err) {
384
+ onError: (err) => {
386
385
  reject(err);
387
386
  },
388
387
  }), null);
@@ -391,12 +390,12 @@ var FileSystemAccess = /** @class */ (function () {
391
390
  reject(ex);
392
391
  }
393
392
  });
394
- };
395
- FileSystemAccess.prototype.writeBufferSync = function (path, buffer, onError) {
393
+ }
394
+ writeBufferSync(path, buffer, onError) {
396
395
  try {
397
- var javaFile = new java.io.File(path);
398
- var stream = new java.io.FileOutputStream(javaFile);
399
- var channel = stream.getChannel();
396
+ const javaFile = new java.io.File(path);
397
+ const stream = new java.io.FileOutputStream(javaFile);
398
+ const channel = stream.getChannel();
400
399
  channel.write(FileSystemAccess.getBuffer(buffer));
401
400
  stream.close();
402
401
  }
@@ -405,15 +404,15 @@ var FileSystemAccess = /** @class */ (function () {
405
404
  onError(exception);
406
405
  }
407
406
  }
408
- };
409
- FileSystemAccess.prototype.writeAsync = function (path, bytes) {
410
- return new Promise(function (resolve, reject) {
407
+ }
408
+ writeAsync(path, bytes) {
409
+ return new Promise((resolve, reject) => {
411
410
  try {
412
411
  org.nativescript.widgets.Async.File.write(path, bytes, new org.nativescript.widgets.Async.CompleteCallback({
413
- onComplete: function () {
412
+ onComplete: () => {
414
413
  resolve();
415
414
  },
416
- onError: function (err) {
415
+ onError: (err) => {
417
416
  reject(err);
418
417
  },
419
418
  }), null);
@@ -422,11 +421,11 @@ var FileSystemAccess = /** @class */ (function () {
422
421
  reject(ex);
423
422
  }
424
423
  });
425
- };
426
- FileSystemAccess.prototype.writeSync = function (path, bytes, onError) {
424
+ }
425
+ writeSync(path, bytes, onError) {
427
426
  try {
428
- var javaFile = new java.io.File(path);
429
- var stream = new java.io.FileOutputStream(javaFile);
427
+ const javaFile = new java.io.File(path);
428
+ const stream = new java.io.FileOutputStream(javaFile);
430
429
  stream.write(bytes, 0, bytes.length);
431
430
  stream.close();
432
431
  }
@@ -435,23 +434,23 @@ var FileSystemAccess = /** @class */ (function () {
435
434
  onError(exception);
436
435
  }
437
436
  }
438
- };
439
- FileSystemAccess.prototype.readTextAsync = function (path, encoding) {
440
- var actualEncoding = encoding;
437
+ }
438
+ readTextAsync(path, encoding) {
439
+ let actualEncoding = encoding;
441
440
  if (!actualEncoding) {
442
441
  actualEncoding = textModule.encoding.UTF_8;
443
442
  }
444
- return new Promise(function (resolve, reject) {
443
+ return new Promise((resolve, reject) => {
445
444
  try {
446
445
  org.nativescript.widgets.Async.File.readText(path, actualEncoding, new org.nativescript.widgets.Async.CompleteCallback({
447
- onComplete: function (result) {
446
+ onComplete: (result) => {
448
447
  if (actualEncoding === textModule.encoding.UTF_8) {
449
448
  // Remove UTF8 BOM if present. http://www.rgagnon.com/javadetails/java-handle-utf8-file-with-bom.html
450
449
  result = FileSystemAccess._removeUtf8Bom(result);
451
450
  }
452
451
  resolve(result);
453
452
  },
454
- onError: function (err) {
453
+ onError: (err) => {
455
454
  reject(err);
456
455
  },
457
456
  }), null);
@@ -460,21 +459,21 @@ var FileSystemAccess = /** @class */ (function () {
460
459
  reject(ex);
461
460
  }
462
461
  });
463
- };
464
- FileSystemAccess.prototype.readTextSync = function (path, onError, encoding) {
462
+ }
463
+ readTextSync(path, onError, encoding) {
465
464
  try {
466
- var javaFile = new java.io.File(path);
467
- var stream = new java.io.FileInputStream(javaFile);
468
- var actualEncoding = encoding;
465
+ const javaFile = new java.io.File(path);
466
+ const stream = new java.io.FileInputStream(javaFile);
467
+ let actualEncoding = encoding;
469
468
  if (!actualEncoding) {
470
469
  actualEncoding = textModule.encoding.UTF_8;
471
470
  }
472
- var reader = new java.io.InputStreamReader(stream, actualEncoding);
473
- var bufferedReader = new java.io.BufferedReader(reader);
471
+ const reader = new java.io.InputStreamReader(stream, actualEncoding);
472
+ const bufferedReader = new java.io.BufferedReader(reader);
474
473
  // TODO: We will need to read the entire file to a CharBuffer instead of reading it line by line
475
474
  // TODO: bufferedReader.read(CharBuffer) does not currently work
476
- var line = undefined;
477
- var result = '';
475
+ let line = undefined;
476
+ let result = '';
478
477
  while (line !== null) {
479
478
  line = bufferedReader.readLine();
480
479
  if (line === null) {
@@ -499,26 +498,26 @@ var FileSystemAccess = /** @class */ (function () {
499
498
  onError(exception);
500
499
  }
501
500
  }
502
- };
503
- FileSystemAccess._removeUtf8Bom = function (s) {
501
+ }
502
+ static _removeUtf8Bom(s) {
504
503
  if (s.charCodeAt(0) === 0xfeff) {
505
504
  s = s.slice(1);
506
505
  //console.log("Removed UTF8 BOM.");
507
506
  }
508
507
  return s;
509
- };
510
- FileSystemAccess.prototype.appendTextAsync = function (path, content, encoding) {
511
- var actualEncoding = encoding;
508
+ }
509
+ appendTextAsync(path, content, encoding) {
510
+ let actualEncoding = encoding;
512
511
  if (!actualEncoding) {
513
512
  actualEncoding = textModule.encoding.UTF_8;
514
513
  }
515
- return new Promise(function (resolve, reject) {
514
+ return new Promise((resolve, reject) => {
516
515
  try {
517
516
  org.nativescript.widgets.Async.File.appendText(path, content, actualEncoding, new org.nativescript.widgets.Async.CompleteCallback({
518
- onComplete: function () {
517
+ onComplete: () => {
519
518
  resolve();
520
519
  },
521
- onError: function (err) {
520
+ onError: (err) => {
522
521
  reject(err);
523
522
  },
524
523
  }), null);
@@ -527,16 +526,16 @@ var FileSystemAccess = /** @class */ (function () {
527
526
  reject(ex);
528
527
  }
529
528
  });
530
- };
531
- FileSystemAccess.prototype.appendTextSync = function (path, content, onError, encoding) {
529
+ }
530
+ appendTextSync(path, content, onError, encoding) {
532
531
  try {
533
- var javaFile = new java.io.File(path);
534
- var stream = new java.io.FileOutputStream(javaFile, true);
535
- var actualEncoding = encoding;
532
+ const javaFile = new java.io.File(path);
533
+ const stream = new java.io.FileOutputStream(javaFile, true);
534
+ let actualEncoding = encoding;
536
535
  if (!actualEncoding) {
537
536
  actualEncoding = textModule.encoding.UTF_8;
538
537
  }
539
- var writer = new java.io.OutputStreamWriter(stream, actualEncoding);
538
+ const writer = new java.io.OutputStreamWriter(stream, actualEncoding);
540
539
  writer.write(content);
541
540
  writer.close();
542
541
  }
@@ -545,19 +544,19 @@ var FileSystemAccess = /** @class */ (function () {
545
544
  onError(exception);
546
545
  }
547
546
  }
548
- };
549
- FileSystemAccess.prototype.writeTextAsync = function (path, content, encoding) {
550
- var actualEncoding = encoding;
547
+ }
548
+ writeTextAsync(path, content, encoding) {
549
+ let actualEncoding = encoding;
551
550
  if (!actualEncoding) {
552
551
  actualEncoding = textModule.encoding.UTF_8;
553
552
  }
554
- return new Promise(function (resolve, reject) {
553
+ return new Promise((resolve, reject) => {
555
554
  try {
556
555
  org.nativescript.widgets.Async.File.writeText(path, content, actualEncoding, new org.nativescript.widgets.Async.CompleteCallback({
557
- onComplete: function () {
556
+ onComplete: () => {
558
557
  resolve();
559
558
  },
560
- onError: function (err) {
559
+ onError: (err) => {
561
560
  reject(err);
562
561
  },
563
562
  }), null);
@@ -566,16 +565,16 @@ var FileSystemAccess = /** @class */ (function () {
566
565
  reject(ex);
567
566
  }
568
567
  });
569
- };
570
- FileSystemAccess.prototype.writeTextSync = function (path, content, onError, encoding) {
568
+ }
569
+ writeTextSync(path, content, onError, encoding) {
571
570
  try {
572
- var javaFile = new java.io.File(path);
573
- var stream = new java.io.FileOutputStream(javaFile);
574
- var actualEncoding = encoding;
571
+ const javaFile = new java.io.File(path);
572
+ const stream = new java.io.FileOutputStream(javaFile);
573
+ let actualEncoding = encoding;
575
574
  if (!actualEncoding) {
576
575
  actualEncoding = textModule.encoding.UTF_8;
577
576
  }
578
- var writer = new java.io.OutputStreamWriter(stream, actualEncoding);
577
+ const writer = new java.io.OutputStreamWriter(stream, actualEncoding);
579
578
  writer.write(content);
580
579
  writer.close();
581
580
  }
@@ -584,15 +583,15 @@ var FileSystemAccess = /** @class */ (function () {
584
583
  onError(exception);
585
584
  }
586
585
  }
587
- };
588
- FileSystemAccess.prototype.deleteFolderContent = function (file) {
589
- var filesList = file.listFiles();
586
+ }
587
+ deleteFolderContent(file) {
588
+ const filesList = file.listFiles();
590
589
  if (filesList.length === 0) {
591
590
  return true; // Nothing to delete, so success!
592
591
  }
593
- var childFile;
594
- var success = false;
595
- for (var i = 0; i < filesList.length; i++) {
592
+ let childFile;
593
+ let success = false;
594
+ for (let i = 0; i < filesList.length; i++) {
596
595
  childFile = filesList[i];
597
596
  if (childFile.getCanonicalFile().isDirectory()) {
598
597
  success = this.deleteFolderContent(childFile);
@@ -603,11 +602,11 @@ var FileSystemAccess = /** @class */ (function () {
603
602
  success = childFile.delete();
604
603
  }
605
604
  return success;
606
- };
607
- FileSystemAccess.prototype.ensureFile = function (javaFile, isFolder, onError) {
605
+ }
606
+ ensureFile(javaFile, isFolder, onError) {
608
607
  try {
609
608
  if (!javaFile.exists()) {
610
- var created = void 0;
609
+ let created;
611
610
  if (isFolder) {
612
611
  created = javaFile.mkdirs();
613
612
  }
@@ -627,7 +626,7 @@ var FileSystemAccess = /** @class */ (function () {
627
626
  javaFile.setWritable(true);
628
627
  }
629
628
  }
630
- var path = javaFile.getAbsolutePath();
629
+ const path = javaFile.getAbsolutePath();
631
630
  return {
632
631
  path: path,
633
632
  name: javaFile.getName(),
@@ -641,26 +640,26 @@ var FileSystemAccess = /** @class */ (function () {
641
640
  }
642
641
  return undefined;
643
642
  }
644
- };
643
+ }
645
644
  // TODO: This method is the same as in the iOS implementation.
646
645
  // Make it in a separate file / module so it can be reused from both implementations.
647
- FileSystemAccess.prototype.getFileExtension = function (path) {
646
+ getFileExtension(path) {
648
647
  return getFileExtension(path);
649
- };
650
- FileSystemAccess.prototype.enumEntities = function (path, callback, onError) {
648
+ }
649
+ enumEntities(path, callback, onError) {
651
650
  try {
652
- var javaFile = new java.io.File(path);
651
+ let javaFile = new java.io.File(path);
653
652
  if (!javaFile.getCanonicalFile().isDirectory()) {
654
653
  if (onError) {
655
654
  onError('There is no folder existing at path ' + path);
656
655
  }
657
656
  return;
658
657
  }
659
- var filesList = javaFile.listFiles();
660
- var length_1 = filesList.length;
661
- var info = void 0;
662
- var retVal = void 0;
663
- for (var i = 0; i < length_1; i++) {
658
+ const filesList = javaFile.listFiles();
659
+ const length = filesList.length;
660
+ let info;
661
+ let retVal;
662
+ for (let i = 0; i < length; i++) {
664
663
  javaFile = filesList[i];
665
664
  info = {
666
665
  path: javaFile.getAbsolutePath(),
@@ -680,11 +679,11 @@ var FileSystemAccess = /** @class */ (function () {
680
679
  onError(exception);
681
680
  }
682
681
  }
683
- };
684
- FileSystemAccess.prototype.getPathSeparator = function () {
682
+ }
683
+ getPathSeparator() {
685
684
  return this._pathSeparator;
686
- };
687
- FileSystemAccess.prototype.normalizePath = function (path) {
685
+ }
686
+ normalizePath(path) {
688
687
  if (SDK_VERSION >= 26) {
689
688
  // the [''] is a trick to not have to create a android.net.URI
690
689
  // and use the method with string signature
@@ -692,71 +691,67 @@ var FileSystemAccess = /** @class */ (function () {
692
691
  }
693
692
  else {
694
693
  // for now it wont work on pre 26 as File does not normalize
695
- var file = new java.io.File(path);
694
+ const file = new java.io.File(path);
696
695
  return file.getAbsolutePath();
697
696
  }
698
- };
699
- FileSystemAccess.prototype.joinPath = function (left, right) {
700
- var file1 = new java.io.File(left);
701
- var file2 = new java.io.File(file1, right);
697
+ }
698
+ joinPath(left, right) {
699
+ const file1 = new java.io.File(left);
700
+ const file2 = new java.io.File(file1, right);
702
701
  return file2.getPath();
703
- };
704
- FileSystemAccess.prototype.joinPaths = function (paths) {
702
+ }
703
+ joinPaths(paths) {
705
704
  if (!paths || paths.length === 0) {
706
705
  return '';
707
706
  }
708
707
  if (paths.length === 1) {
709
708
  return paths[0];
710
709
  }
711
- var result = paths[0];
712
- for (var i = 1; i < paths.length; i++) {
710
+ let result = paths[0];
711
+ for (let i = 1; i < paths.length; i++) {
713
712
  result = this.joinPath(result, paths[i]);
714
713
  }
715
714
  return result;
716
- };
717
- return FileSystemAccess;
718
- }());
719
- export { FileSystemAccess };
720
- var FileSystemAccess29 = /** @class */ (function (_super) {
721
- __extends(FileSystemAccess29, _super);
722
- function FileSystemAccess29() {
723
- var _this = _super !== null && _super.apply(this, arguments) || this;
724
- _this.__skip = true;
725
- _this.appendBuffer = _this.appendBufferSync.bind(_this);
726
- _this.append = _this.appendSync.bind(_this);
727
- _this.appendText = _this.appendTextSync.bind(_this);
728
- _this.readText = _this.readTextSync.bind(_this);
729
- _this.readBuffer = _this.readBufferSync.bind(_this);
730
- _this.read = _this.readSync.bind(_this);
731
- _this.writeText = _this.writeTextSync.bind(_this);
732
- _this.writeBuffer = _this.writeBufferSync.bind(_this);
733
- _this.write = _this.writeSync.bind(_this);
734
- return _this;
735
- }
736
- FileSystemAccess29.prototype.getLastModified = function (path) {
715
+ }
716
+ }
717
+ export class FileSystemAccess29 extends FileSystemAccess {
718
+ constructor() {
719
+ super(...arguments);
720
+ this.__skip = true;
721
+ this.appendBuffer = this.appendBufferSync.bind(this);
722
+ this.append = this.appendSync.bind(this);
723
+ this.appendText = this.appendTextSync.bind(this);
724
+ this.readText = this.readTextSync.bind(this);
725
+ this.readBuffer = this.readBufferSync.bind(this);
726
+ this.read = this.readSync.bind(this);
727
+ this.writeText = this.writeTextSync.bind(this);
728
+ this.writeBuffer = this.writeBufferSync.bind(this);
729
+ this.write = this.writeSync.bind(this);
730
+ }
731
+ getLastModified(path) {
737
732
  if (isContentUri(path)) {
738
733
  return new Date(getOrSetHelper(path).getLastModified() * 1000);
739
734
  }
740
- return _super.prototype.getLastModified.call(this, path);
741
- };
742
- FileSystemAccess29.prototype.getFileSize = function (path) {
735
+ return super.getLastModified(path);
736
+ }
737
+ getFileSize(path) {
743
738
  if (isContentUri(path)) {
744
739
  return getOrSetHelper(path).getSize();
745
740
  }
746
- return _super.prototype.getFileSize.call(this, path);
747
- };
748
- FileSystemAccess29.prototype.getParent = function (path, onError) {
741
+ return super.getFileSize(path);
742
+ }
743
+ getParent(path, onError) {
749
744
  if (isContentUri(path)) {
750
745
  return null;
751
746
  }
752
- return _super.prototype.getParent.call(this, path, onError);
753
- };
754
- FileSystemAccess29.prototype.getFile = function (path, onError) {
747
+ return super.getParent(path, onError);
748
+ }
749
+ getFile(path, onError) {
755
750
  if (isContentUri(path)) {
756
751
  try {
757
- var file = getOrSetHelper(path);
752
+ const file = getOrSetHelper(path);
758
753
  return {
759
- path: path,
754
+ path,
760
755
  name: file.getName(),
761
756
  extension: file.getExtension(),
762
757
  };
@@ -768,68 +763,68 @@ var FileSystemAccess29 = /** @class */ (function (_super) {
768
763
  return;
769
764
  }
770
765
  }
771
- return _super.prototype.getFile.call(this, path, onError);
772
- };
773
- FileSystemAccess29.prototype.getFolder = function (path, onError) {
766
+ return super.getFile(path, onError);
767
+ }
768
+ getFolder(path, onError) {
774
769
  if (isContentUri(path)) {
775
770
  return null;
776
771
  }
777
- return _super.prototype.getFolder.call(this, path, onError);
778
- };
779
- FileSystemAccess29.prototype.getEntities = function (path, onError) {
772
+ return super.getFolder(path, onError);
773
+ }
774
+ getEntities(path, onError) {
780
775
  if (isContentUri(path)) {
781
776
  return null;
782
777
  }
783
- return _super.prototype.getEntities.call(this, path, onError);
784
- };
785
- FileSystemAccess29.prototype.eachEntity = function (path, onEntity, onError) {
778
+ return super.getEntities(path, onError);
779
+ }
780
+ eachEntity(path, onEntity, onError) {
786
781
  if (isContentUri(path)) {
787
782
  return null;
788
783
  }
789
- _super.prototype.eachEntity.call(this, path, onEntity);
790
- };
791
- FileSystemAccess29.prototype.fileExists = function (path) {
784
+ super.eachEntity(path, onEntity);
785
+ }
786
+ fileExists(path) {
792
787
  if (isContentUri(path)) {
793
788
  return org.nativescript.widgets.FileHelper.exists(applicationContext, path);
794
789
  }
795
- return _super.prototype.fileExists.call(this, path);
796
- };
797
- FileSystemAccess29.prototype.folderExists = function (path) {
790
+ return super.fileExists(path);
791
+ }
792
+ folderExists(path) {
798
793
  if (isContentUri(path)) {
799
794
  return null;
800
795
  }
801
- return _super.prototype.folderExists.call(this, path);
802
- };
803
- FileSystemAccess29.prototype.deleteFile = function (path, onError) {
796
+ return super.folderExists(path);
797
+ }
798
+ deleteFile(path, onError) {
804
799
  if (isContentUri(path)) {
805
800
  try {
806
801
  getOrSetHelper(path).delete(applicationContext);
807
802
  }
808
803
  catch (e) {
809
- onError === null || onError === void 0 ? void 0 : onError(e);
804
+ onError?.(e);
810
805
  }
811
806
  }
812
807
  else {
813
- _super.prototype.deleteFile.call(this, path, onError);
808
+ super.deleteFile(path, onError);
814
809
  }
815
- };
816
- FileSystemAccess29.prototype.deleteFolder = function (path, onError) {
810
+ }
811
+ deleteFolder(path, onError) {
817
812
  if (!isContentUri(path)) {
818
- _super.prototype.deleteFolder.call(this, path, onError);
813
+ super.deleteFolder(path, onError);
819
814
  }
820
- };
821
- FileSystemAccess29.prototype.emptyFolder = function (path, onError) {
815
+ }
816
+ emptyFolder(path, onError) {
822
817
  if (!isContentUri(path)) {
823
- _super.prototype.emptyFolder.call(this, path, onError);
818
+ super.emptyFolder(path, onError);
824
819
  }
825
- };
826
- FileSystemAccess29.prototype.rename = function (path, newPath, onError) {
820
+ }
821
+ rename(path, newPath, onError) {
827
822
  if (isContentUri(path)) {
828
- var callback = null;
823
+ let callback = null;
829
824
  if (typeof onError === 'function') {
830
825
  callback = new org.nativescript.widgets.FileHelper.Callback({
831
- onSuccess: function (result) { },
832
- onError: function (error) {
826
+ onSuccess(result) { },
827
+ onError(error) {
833
828
  onError(error);
834
829
  },
835
830
  });
@@ -837,55 +832,55 @@ var FileSystemAccess29 = /** @class */ (function (_super) {
837
832
  getOrSetHelper(path).renameSync(applicationContext, newPath, callback);
838
833
  }
839
834
  else {
840
- _super.prototype.rename.call(this, path, newPath, onError);
835
+ super.rename(path, newPath, onError);
841
836
  }
842
- };
843
- FileSystemAccess29.prototype.renameAsync = function (path, newPath) {
844
- return new Promise(function (resolve, reject) {
837
+ }
838
+ renameAsync(path, newPath) {
839
+ return new Promise((resolve, reject) => {
845
840
  getOrSetHelper(path).renameSync(applicationContext, newPath, new org.nativescript.widgets.FileHelper.Callback({
846
- onSuccess: function (result) {
841
+ onSuccess(result) {
847
842
  resolve();
848
843
  },
849
- onError: function (error) {
844
+ onError(error) {
850
845
  reject(error);
851
846
  },
852
847
  }));
853
848
  });
854
- };
855
- FileSystemAccess29.prototype.getDocumentsFolderPath = function () {
856
- return _super.prototype.getDocumentsFolderPath.call(this);
857
- };
858
- FileSystemAccess29.prototype.getTempFolderPath = function () {
859
- return _super.prototype.getTempFolderPath.call(this);
860
- };
861
- FileSystemAccess29.prototype.getLogicalRootPath = function () {
862
- return _super.prototype.getLogicalRootPath.call(this);
863
- };
864
- FileSystemAccess29.prototype.getCurrentAppPath = function () {
865
- return _super.prototype.getCurrentAppPath.call(this);
866
- };
867
- FileSystemAccess29.prototype.appendBufferAsync = function (path, content) {
849
+ }
850
+ getDocumentsFolderPath() {
851
+ return super.getDocumentsFolderPath();
852
+ }
853
+ getTempFolderPath() {
854
+ return super.getTempFolderPath();
855
+ }
856
+ getLogicalRootPath() {
857
+ return super.getLogicalRootPath();
858
+ }
859
+ getCurrentAppPath() {
860
+ return super.getCurrentAppPath();
861
+ }
862
+ appendBufferAsync(path, content) {
868
863
  if (isContentUri(path)) {
869
- return new Promise(function (resolve, reject) {
864
+ return new Promise((resolve, reject) => {
870
865
  getOrSetHelper(path).appendBuffer(applicationContext, FileSystemAccess.getBuffer(content), new org.nativescript.widgets.FileHelper.Callback({
871
- onSuccess: function (result) {
866
+ onSuccess(result) {
872
867
  resolve();
873
868
  },
874
- onError: function (error) {
869
+ onError(error) {
875
870
  reject(error);
876
871
  },
877
872
  }));
878
873
  });
879
874
  }
880
- return _super.prototype.appendAsync.call(this, path, content);
881
- };
882
- FileSystemAccess29.prototype.appendBufferSync = function (path, content, onError) {
875
+ return super.appendAsync(path, content);
876
+ }
877
+ appendBufferSync(path, content, onError) {
883
878
  if (isContentUri(path)) {
884
- var callback = null;
879
+ let callback = null;
885
880
  if (typeof onError === 'function') {
886
881
  callback = new org.nativescript.widgets.FileHelper.Callback({
887
- onSuccess: function (result) { },
888
- onError: function (error) {
882
+ onSuccess(result) { },
883
+ onError(error) {
889
884
  onError(error);
890
885
  },
891
886
  });
@@ -893,31 +888,31 @@ var FileSystemAccess29 = /** @class */ (function (_super) {
893
888
  getOrSetHelper(path).appendSync(applicationContext, FileSystemAccess.getBuffer(content), callback);
894
889
  }
895
890
  else {
896
- _super.prototype.appendSync.call(this, path, content, onError);
891
+ super.appendSync(path, content, onError);
897
892
  }
898
- };
899
- FileSystemAccess29.prototype.appendAsync = function (path, content) {
893
+ }
894
+ appendAsync(path, content) {
900
895
  if (isContentUri(path)) {
901
- return new Promise(function (resolve, reject) {
896
+ return new Promise((resolve, reject) => {
902
897
  getOrSetHelper(path).append(applicationContext, content, new org.nativescript.widgets.FileHelper.Callback({
903
- onSuccess: function (result) {
898
+ onSuccess(result) {
904
899
  resolve();
905
900
  },
906
- onError: function (error) {
901
+ onError(error) {
907
902
  reject(error);
908
903
  },
909
904
  }));
910
905
  });
911
906
  }
912
- return _super.prototype.appendAsync.call(this, path, content);
913
- };
914
- FileSystemAccess29.prototype.appendSync = function (path, content, onError) {
907
+ return super.appendAsync(path, content);
908
+ }
909
+ appendSync(path, content, onError) {
915
910
  if (isContentUri(path)) {
916
- var callback = null;
911
+ let callback = null;
917
912
  if (typeof onError === 'function') {
918
913
  callback = new org.nativescript.widgets.FileHelper.Callback({
919
- onSuccess: function (result) { },
920
- onError: function (error) {
914
+ onSuccess(result) { },
915
+ onError(error) {
921
916
  onError(error);
922
917
  },
923
918
  });
@@ -925,191 +920,191 @@ var FileSystemAccess29 = /** @class */ (function (_super) {
925
920
  getOrSetHelper(path).appendSync(applicationContext, content, callback);
926
921
  }
927
922
  else {
928
- _super.prototype.appendSync.call(this, path, content, onError);
923
+ super.appendSync(path, content, onError);
929
924
  }
930
- };
931
- FileSystemAccess29.prototype.appendTextAsync = function (path, content, encoding) {
925
+ }
926
+ appendTextAsync(path, content, encoding) {
932
927
  if (isContentUri(path)) {
933
- return new Promise(function (resolve, reject) {
934
- getOrSetHelper(path).appendText(applicationContext, content, encoding !== null && encoding !== void 0 ? encoding : null, new org.nativescript.widgets.FileHelper.Callback({
935
- onSuccess: function (result) {
928
+ return new Promise((resolve, reject) => {
929
+ getOrSetHelper(path).appendText(applicationContext, content, encoding ?? null, new org.nativescript.widgets.FileHelper.Callback({
930
+ onSuccess(result) {
936
931
  resolve();
937
932
  },
938
- onError: function (error) {
933
+ onError(error) {
939
934
  reject(error);
940
935
  },
941
936
  }));
942
937
  });
943
938
  }
944
- return _super.prototype.appendTextAsync.call(this, path, content, encoding);
945
- };
946
- FileSystemAccess29.prototype.appendTextSync = function (path, content, onError, encoding) {
939
+ return super.appendTextAsync(path, content, encoding);
940
+ }
941
+ appendTextSync(path, content, onError, encoding) {
947
942
  if (isContentUri(path)) {
948
- var callback = null;
943
+ let callback = null;
949
944
  if (typeof onError === 'function') {
950
945
  callback = new org.nativescript.widgets.FileHelper.Callback({
951
- onSuccess: function (result) { },
952
- onError: function (error) {
946
+ onSuccess(result) { },
947
+ onError(error) {
953
948
  onError(error);
954
949
  },
955
950
  });
956
951
  }
957
- getOrSetHelper(path).appendTextSync(applicationContext, content, encoding !== null && encoding !== void 0 ? encoding : null, callback);
952
+ getOrSetHelper(path).appendTextSync(applicationContext, content, encoding ?? null, callback);
958
953
  }
959
954
  else {
960
- _super.prototype.appendTextSync.call(this, path, content, onError);
955
+ super.appendTextSync(path, content, onError);
961
956
  }
962
- };
963
- FileSystemAccess29.prototype.readTextAsync = function (path, encoding) {
957
+ }
958
+ readTextAsync(path, encoding) {
964
959
  if (isContentUri(path)) {
965
- return new Promise(function (resolve, reject) {
966
- getOrSetHelper(path).readText(applicationContext, encoding !== null && encoding !== void 0 ? encoding : null, new org.nativescript.widgets.FileHelper.Callback({
967
- onSuccess: function (result) {
960
+ return new Promise((resolve, reject) => {
961
+ getOrSetHelper(path).readText(applicationContext, encoding ?? null, new org.nativescript.widgets.FileHelper.Callback({
962
+ onSuccess(result) {
968
963
  resolve(result);
969
964
  },
970
- onError: function (error) {
965
+ onError(error) {
971
966
  reject(error);
972
967
  },
973
968
  }));
974
969
  });
975
970
  }
976
- return _super.prototype.readTextAsync.call(this, path, encoding);
977
- };
978
- FileSystemAccess29.prototype.readTextSync = function (path, onError, encoding) {
971
+ return super.readTextAsync(path, encoding);
972
+ }
973
+ readTextSync(path, onError, encoding) {
979
974
  if (isContentUri(path)) {
980
- var callback = null;
975
+ let callback = null;
981
976
  if (typeof onError === 'function') {
982
977
  callback = new org.nativescript.widgets.FileHelper.Callback({
983
- onSuccess: function (result) { },
984
- onError: function (error) {
978
+ onSuccess(result) { },
979
+ onError(error) {
985
980
  onError(error);
986
981
  },
987
982
  });
988
983
  }
989
- return getOrSetHelper(path).readTextSync(applicationContext, encoding !== null && encoding !== void 0 ? encoding : null, callback);
984
+ return getOrSetHelper(path).readTextSync(applicationContext, encoding ?? null, callback);
990
985
  }
991
986
  else {
992
- return _super.prototype.readTextSync.call(this, path, onError, encoding);
987
+ return super.readTextSync(path, onError, encoding);
993
988
  }
994
- };
995
- FileSystemAccess29.prototype.readBufferAsync = function (path) {
989
+ }
990
+ readBufferAsync(path) {
996
991
  if (isContentUri(path)) {
997
- return new Promise(function (resolve, reject) {
992
+ return new Promise((resolve, reject) => {
998
993
  getOrSetHelper(path).readBuffer(applicationContext, new org.nativescript.widgets.FileHelper.Callback({
999
- onSuccess: function (result) {
994
+ onSuccess(result) {
1000
995
  resolve(result);
1001
996
  },
1002
- onError: function (error) {
997
+ onError(error) {
1003
998
  reject(error);
1004
999
  },
1005
1000
  }));
1006
1001
  });
1007
1002
  }
1008
- return _super.prototype.readBufferAsync.call(this, path);
1009
- };
1010
- FileSystemAccess29.prototype.readBufferSync = function (path, onError) {
1003
+ return super.readBufferAsync(path);
1004
+ }
1005
+ readBufferSync(path, onError) {
1011
1006
  if (isContentUri(path)) {
1012
- var callback = null;
1007
+ let callback = null;
1013
1008
  if (typeof onError === 'function') {
1014
1009
  callback = new org.nativescript.widgets.FileHelper.Callback({
1015
- onSuccess: function (result) { },
1016
- onError: function (error) {
1010
+ onSuccess(result) { },
1011
+ onError(error) {
1017
1012
  onError(error);
1018
1013
  },
1019
1014
  });
1020
1015
  }
1021
- var ret = getOrSetHelper(path).readBufferSync(applicationContext, callback);
1016
+ const ret = getOrSetHelper(path).readBufferSync(applicationContext, callback);
1022
1017
  if (ret) {
1023
1018
  return null;
1024
1019
  }
1025
1020
  return ArrayBuffer.from(ret);
1026
1021
  }
1027
- return _super.prototype.readBufferSync.call(this, path, onError);
1028
- };
1029
- FileSystemAccess29.prototype.readAsync = function (path) {
1022
+ return super.readBufferSync(path, onError);
1023
+ }
1024
+ readAsync(path) {
1030
1025
  if (isContentUri(path)) {
1031
- return new Promise(function (resolve, reject) {
1026
+ return new Promise((resolve, reject) => {
1032
1027
  getOrSetHelper(path).read(applicationContext, new org.nativescript.widgets.FileHelper.Callback({
1033
- onSuccess: function (result) {
1028
+ onSuccess(result) {
1034
1029
  resolve(result);
1035
1030
  },
1036
- onError: function (error) {
1031
+ onError(error) {
1037
1032
  reject(error);
1038
1033
  },
1039
1034
  }));
1040
1035
  });
1041
1036
  }
1042
- return _super.prototype.readAsync.call(this, path);
1043
- };
1044
- FileSystemAccess29.prototype.readSync = function (path, onError) {
1037
+ return super.readAsync(path);
1038
+ }
1039
+ readSync(path, onError) {
1045
1040
  if (isContentUri(path)) {
1046
- var callback = null;
1041
+ let callback = null;
1047
1042
  if (typeof onError === 'function') {
1048
1043
  callback = new org.nativescript.widgets.FileHelper.Callback({
1049
- onSuccess: function (result) { },
1050
- onError: function (error) {
1044
+ onSuccess(result) { },
1045
+ onError(error) {
1051
1046
  onError(error);
1052
1047
  },
1053
1048
  });
1054
1049
  }
1055
1050
  return getOrSetHelper(path).readSync(applicationContext, callback);
1056
1051
  }
1057
- return _super.prototype.readSync.call(this, path, onError);
1058
- };
1059
- FileSystemAccess29.prototype.writeTextAsync = function (path, content, encoding) {
1052
+ return super.readSync(path, onError);
1053
+ }
1054
+ writeTextAsync(path, content, encoding) {
1060
1055
  if (isContentUri(path)) {
1061
- return new Promise(function (resolve, reject) {
1062
- getOrSetHelper(path).writeText(applicationContext, content, encoding !== null && encoding !== void 0 ? encoding : null, new org.nativescript.widgets.FileHelper.Callback({
1063
- onSuccess: function (result) {
1056
+ return new Promise((resolve, reject) => {
1057
+ getOrSetHelper(path).writeText(applicationContext, content, encoding ?? null, new org.nativescript.widgets.FileHelper.Callback({
1058
+ onSuccess(result) {
1064
1059
  resolve();
1065
1060
  },
1066
- onError: function (error) {
1061
+ onError(error) {
1067
1062
  reject(error);
1068
1063
  },
1069
1064
  }));
1070
1065
  });
1071
1066
  }
1072
- return _super.prototype.writeTextAsync.call(this, path, content, encoding);
1073
- };
1074
- FileSystemAccess29.prototype.writeTextSync = function (path, content, onError, encoding) {
1067
+ return super.writeTextAsync(path, content, encoding);
1068
+ }
1069
+ writeTextSync(path, content, onError, encoding) {
1075
1070
  if (isContentUri(path)) {
1076
- var callback = null;
1071
+ let callback = null;
1077
1072
  if (typeof onError === 'function') {
1078
1073
  callback = new org.nativescript.widgets.FileHelper.Callback({
1079
- onSuccess: function (result) { },
1080
- onError: function (error) {
1074
+ onSuccess(result) { },
1075
+ onError(error) {
1081
1076
  onError(error);
1082
1077
  },
1083
1078
  });
1084
1079
  }
1085
- getOrSetHelper(path).writeTextSync(applicationContext, content, encoding !== null && encoding !== void 0 ? encoding : null, callback);
1080
+ getOrSetHelper(path).writeTextSync(applicationContext, content, encoding ?? null, callback);
1086
1081
  }
1087
1082
  else {
1088
- _super.prototype.writeTextSync.call(this, path, content, onError);
1083
+ super.writeTextSync(path, content, onError);
1089
1084
  }
1090
- };
1091
- FileSystemAccess29.prototype.writeBufferAsync = function (path, content) {
1085
+ }
1086
+ writeBufferAsync(path, content) {
1092
1087
  if (isContentUri(path)) {
1093
- return new Promise(function (resolve, reject) {
1088
+ return new Promise((resolve, reject) => {
1094
1089
  getOrSetHelper(path).writeBuffer(applicationContext, FileSystemAccess.getBuffer(content), new org.nativescript.widgets.FileHelper.Callback({
1095
- onSuccess: function (result) {
1090
+ onSuccess(result) {
1096
1091
  resolve();
1097
1092
  },
1098
- onError: function (error) {
1093
+ onError(error) {
1099
1094
  reject(error);
1100
1095
  },
1101
1096
  }));
1102
1097
  });
1103
1098
  }
1104
- return _super.prototype.writeAsync.call(this, path, content);
1105
- };
1106
- FileSystemAccess29.prototype.writeBufferSync = function (path, content, onError) {
1099
+ return super.writeAsync(path, content);
1100
+ }
1101
+ writeBufferSync(path, content, onError) {
1107
1102
  if (isContentUri(path)) {
1108
- var callback = null;
1103
+ let callback = null;
1109
1104
  if (typeof onError === 'function') {
1110
1105
  callback = new org.nativescript.widgets.FileHelper.Callback({
1111
- onSuccess: function (result) { },
1112
- onError: function (error) {
1106
+ onSuccess(result) { },
1107
+ onError(error) {
1113
1108
  onError(error);
1114
1109
  },
1115
1110
  });
@@ -1117,31 +1112,31 @@ var FileSystemAccess29 = /** @class */ (function (_super) {
1117
1112
  getOrSetHelper(path).writeSync(applicationContext, FileSystemAccess.getBuffer(content), callback);
1118
1113
  }
1119
1114
  else {
1120
- _super.prototype.writeSync.call(this, path, content, onError);
1115
+ super.writeSync(path, content, onError);
1121
1116
  }
1122
- };
1123
- FileSystemAccess29.prototype.writeAsync = function (path, content) {
1117
+ }
1118
+ writeAsync(path, content) {
1124
1119
  if (isContentUri(path)) {
1125
- return new Promise(function (resolve, reject) {
1120
+ return new Promise((resolve, reject) => {
1126
1121
  getOrSetHelper(path).write(applicationContext, content, new org.nativescript.widgets.FileHelper.Callback({
1127
- onSuccess: function (result) {
1122
+ onSuccess(result) {
1128
1123
  resolve();
1129
1124
  },
1130
- onError: function (error) {
1125
+ onError(error) {
1131
1126
  reject(error);
1132
1127
  },
1133
1128
  }));
1134
1129
  });
1135
1130
  }
1136
- return _super.prototype.writeAsync.call(this, path, content);
1137
- };
1138
- FileSystemAccess29.prototype.writeSync = function (path, content, onError) {
1131
+ return super.writeAsync(path, content);
1132
+ }
1133
+ writeSync(path, content, onError) {
1139
1134
  if (isContentUri(path)) {
1140
- var callback = null;
1135
+ let callback = null;
1141
1136
  if (typeof onError === 'function') {
1142
1137
  callback = new org.nativescript.widgets.FileHelper.Callback({
1143
- onSuccess: function (result) { },
1144
- onError: function (error) {
1138
+ onSuccess(result) { },
1139
+ onError(error) {
1145
1140
  onError(error);
1146
1141
  },
1147
1142
  });
@@ -1149,28 +1144,26 @@ var FileSystemAccess29 = /** @class */ (function (_super) {
1149
1144
  getOrSetHelper(path).writeSync(applicationContext, content, callback);
1150
1145
  }
1151
1146
  else {
1152
- _super.prototype.writeSync.call(this, path, content, onError);
1147
+ super.writeSync(path, content, onError);
1153
1148
  }
1154
- };
1155
- FileSystemAccess29.prototype.getFileExtension = function (path) {
1149
+ }
1150
+ getFileExtension(path) {
1156
1151
  if (isContentUri(path)) {
1157
1152
  return getOrSetHelper(path).getExtension();
1158
1153
  }
1159
- return _super.prototype.getFileExtension.call(this, path);
1160
- };
1161
- FileSystemAccess29.prototype.getPathSeparator = function () {
1162
- return _super.prototype.getPathSeparator.call(this);
1163
- };
1164
- FileSystemAccess29.prototype.normalizePath = function (path) {
1165
- return _super.prototype.normalizePath.call(this, path);
1166
- };
1167
- FileSystemAccess29.prototype.joinPath = function (left, right) {
1168
- return _super.prototype.joinPath.call(this, left, right);
1169
- };
1170
- FileSystemAccess29.prototype.joinPaths = function (paths) {
1171
- return _super.prototype.joinPaths.call(this, paths);
1172
- };
1173
- return FileSystemAccess29;
1174
- }(FileSystemAccess));
1175
- export { FileSystemAccess29 };
1154
+ return super.getFileExtension(path);
1155
+ }
1156
+ getPathSeparator() {
1157
+ return super.getPathSeparator();
1158
+ }
1159
+ normalizePath(path) {
1160
+ return super.normalizePath(path);
1161
+ }
1162
+ joinPath(left, right) {
1163
+ return super.joinPath(left, right);
1164
+ }
1165
+ joinPaths(paths) {
1166
+ return super.joinPaths(paths);
1167
+ }
1168
+ }
1176
1169
  //# sourceMappingURL=file-system-access.android.js.map