@akylas/nativescript 8.9.17 → 9.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -5
- package/accessibility/accessibility-common.d.ts +3 -0
- package/accessibility/accessibility-common.js +19 -0
- package/accessibility/accessibility-common.js.map +1 -1
- package/accessibility/accessibility-css-helper.js +2 -45
- package/accessibility/accessibility-css-helper.js.map +1 -1
- package/accessibility/accessibility-service.android.js +5 -2
- package/accessibility/accessibility-service.android.js.map +1 -1
- package/accessibility/index.android.d.ts +3 -1
- package/accessibility/index.android.js +282 -138
- package/accessibility/index.android.js.map +1 -1
- package/accessibility/index.d.ts +4 -0
- package/accessibility/index.ios.d.ts +1 -0
- package/accessibility/index.ios.js +6 -1
- package/accessibility/index.ios.js.map +1 -1
- package/application/application-common.d.ts +45 -18
- package/application/application-common.js +92 -19
- package/application/application-common.js.map +1 -1
- package/application/application-interfaces.d.ts +32 -1
- package/application/application-shims.d.ts +27 -0
- package/application/application-shims.js +27 -0
- package/application/application-shims.js.map +1 -1
- package/application/application.android.d.ts +10 -6
- package/application/application.android.js +336 -275
- package/application/application.android.js.map +1 -1
- package/application/application.d.ts +82 -3
- package/application/application.ios.d.ts +72 -16
- package/application/application.ios.js +677 -46
- package/application/application.ios.js.map +1 -1
- package/application/helpers-common.d.ts +50 -0
- package/application/helpers-common.js +153 -0
- package/application/helpers-common.js.map +1 -0
- package/application/helpers.android.d.ts +6 -0
- package/application/helpers.android.js +26 -0
- package/application/helpers.android.js.map +1 -0
- package/application/helpers.d.ts +11 -0
- package/application/helpers.ios.d.ts +8 -0
- package/application/helpers.ios.js +24 -0
- package/application/helpers.ios.js.map +1 -0
- package/application-settings/index.android.js +2 -2
- package/application-settings/index.android.js.map +1 -1
- package/cli-hooks/{before-checkForChanges.js → before-checkForChanges.mjs} +20 -14
- package/cli-hooks/postinstall.mjs +7 -0
- package/cli-hooks/preuninstall.mjs +7 -0
- package/color/color-common.d.ts +18 -19
- package/color/color-common.js +13 -14
- package/color/color-common.js.map +1 -1
- package/color/color-types.d.ts +49 -0
- package/color/color-types.js +3 -0
- package/color/color-types.js.map +1 -0
- package/color/index.ios.d.ts +2 -1
- package/color/index.ios.js.map +1 -1
- package/config/config.interface.d.ts +43 -0
- package/connectivity/index.android.js +25 -24
- package/connectivity/index.android.js.map +1 -1
- package/core-types/animation-types.d.ts +11 -0
- package/core-types/animation-types.js +13 -0
- package/core-types/animation-types.js.map +1 -0
- package/core-types/index.d.ts +12 -3
- package/core-types/index.js +13 -4
- package/core-types/index.js.map +1 -1
- package/core-types/validators.d.ts +2 -0
- package/core-types/validators.js +20 -0
- package/core-types/validators.js.map +1 -0
- package/css/css-tree-parser.js +2 -2
- package/css/css-tree-parser.js.map +1 -1
- package/css/lib/parse/index.d.ts +1 -0
- package/css/lib/parse/index.js +475 -577
- package/css/lib/parse/index.js.map +1 -0
- package/css/reworkcss.d.ts +25 -28
- package/css/reworkcss.js +5 -1
- package/css/reworkcss.js.map +1 -0
- package/css-mediaquery/index.js +1 -1
- package/css-mediaquery/index.js.map +1 -1
- package/css-value/reworkcss-value.d.ts +31 -8
- package/css-value/reworkcss-value.js +89 -111
- package/css-value/reworkcss-value.js.map +1 -0
- package/data/observable/index.d.ts +2 -1
- package/data/observable/index.js +31 -19
- package/data/observable/index.js.map +1 -1
- package/debugger/devtools-elements-interfaces.d.ts +1 -1
- package/debugger/devtools-elements.common.js +17 -8
- package/debugger/devtools-elements.common.js.map +1 -1
- package/debugger/devtools-elements.js +1 -1
- package/debugger/devtools-elements.js.map +1 -1
- package/debugger/dom-types.d.ts +24 -0
- package/debugger/{dom-node.js → dom-types.js} +11 -9
- package/debugger/dom-types.js.map +1 -0
- package/debugger/webinspector-css.d.ts +18 -18
- package/debugger/webinspector-css.js +1 -1
- package/debugger/webinspector-css.js.map +1 -1
- package/debugger/webinspector-dom.d.ts +15 -15
- package/debugger/webinspector-dom.js +1 -1
- package/debugger/webinspector-dom.js.map +1 -1
- package/debugger/webinspector-network.android.d.ts +9 -9
- package/debugger/webinspector-network.android.js +2 -2
- package/debugger/webinspector-network.android.js.map +1 -1
- package/debugger/webinspector-network.ios.d.ts +9 -9
- package/debugger/webinspector-network.ios.js +1 -1
- package/debugger/webinspector-network.ios.js.map +1 -1
- package/fetch/{index.js → index.mjs} +20 -24
- package/file-system/file-system-access.android.js +27 -33
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.ios.js +2 -15
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.js +5 -10
- package/file-system/index.js.map +1 -1
- package/fps-meter/fps-native.android.d.ts +1 -2
- package/fps-meter/fps-native.android.js.map +1 -1
- package/fps-meter/fps-native.ios.d.ts +1 -2
- package/fps-meter/fps-native.ios.js +1 -1
- package/fps-meter/fps-native.ios.js.map +1 -1
- package/global-types.d.ts +7 -8
- package/globals/global-utils.d.ts +27 -0
- package/globals/global-utils.js +67 -0
- package/globals/global-utils.js.map +1 -0
- package/globals/index.d.ts +3 -7
- package/globals/index.js +254 -292
- package/globals/index.js.map +1 -1
- package/globals/polyfills/polyfill-xhr.d.ts +1 -0
- package/globals/polyfills/polyfill-xhr.js +5 -0
- package/globals/polyfills/polyfill-xhr.js.map +1 -0
- package/globals/polyfills/utils.d.ts +1 -0
- package/globals/polyfills/utils.js +8 -0
- package/globals/polyfills/utils.js.map +1 -0
- package/http/http-interfaces.d.ts +83 -0
- package/http/http-interfaces.js +6 -0
- package/http/http-interfaces.js.map +1 -0
- package/http/http-request/http-request-common.d.ts +1 -0
- package/http/http-request/http-request-common.js +10 -2
- package/http/http-request/http-request-common.js.map +1 -1
- package/http/http-request/index.android.d.ts +2 -7
- package/http/http-request/index.android.js +57 -279
- package/http/http-request/index.android.js.map +1 -1
- package/http/http-request/index.d.ts +6 -2
- package/http/http-request/index.ios.d.ts +2 -7
- package/http/http-request/index.ios.js +37 -235
- package/http/http-request/index.ios.js.map +1 -1
- package/http/http-request-internal/http-request-internal-common.d.ts +2 -0
- package/http/http-request-internal/http-request-internal-common.js +12 -0
- package/http/http-request-internal/http-request-internal-common.js.map +1 -0
- package/http/http-request-internal/index.android.d.ts +4 -0
- package/http/http-request-internal/index.android.js +204 -0
- package/http/http-request-internal/index.android.js.map +1 -0
- package/http/http-request-internal/index.d.ts +28 -0
- package/http/http-request-internal/index.ios.d.ts +4 -0
- package/http/http-request-internal/index.ios.js +181 -0
- package/http/http-request-internal/index.ios.js.map +1 -0
- package/http/index.d.ts +6 -105
- package/http/index.js +8 -12
- package/http/index.js.map +1 -1
- package/image-asset/image-asset-common.js +28 -1
- package/image-asset/image-asset-common.js.map +1 -1
- package/image-asset/index.android.js +4 -3
- package/image-asset/index.android.js.map +1 -1
- package/image-source/index.android.d.ts +1 -1
- package/image-source/index.android.js +9 -26
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.d.ts +2 -2
- package/image-source/index.ios.js +2 -9
- package/image-source/index.ios.js.map +1 -1
- package/index.d.ts +13 -8
- package/index.js +5 -3
- package/index.js.map +1 -1
- package/inspector_modules.d.ts +6 -0
- package/inspector_modules.js +231 -3
- package/inspector_modules.js.map +1 -1
- package/js-libs/easysax/easysax.js +5 -3
- package/media-query-list/index.js +7 -17
- package/media-query-list/index.js.map +1 -1
- package/module-name-resolver/helpers.d.ts +14 -0
- package/module-name-resolver/helpers.js +27 -0
- package/module-name-resolver/helpers.js.map +1 -0
- package/module-name-resolver/index.d.ts +12 -22
- package/module-name-resolver/index.js +6 -18
- package/module-name-resolver/index.js.map +1 -1
- package/module-name-resolver/non-bundle-workflow-compat.js +32 -23
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
- package/module-name-resolver/qualifier-matcher/index.d.ts +6 -12
- package/module-name-resolver/qualifier-matcher/index.js +5 -5
- package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
- package/package.json +88 -83
- package/platform/device/index.android.js +2 -2
- package/platform/device/index.android.js.map +1 -1
- package/platform/screen/index.android.js +2 -2
- package/platform/screen/index.android.js.map +1 -1
- package/platform/screen/index.d.ts +5 -0
- package/platform/screen/index.ios.js +2 -2
- package/platform/screen/index.ios.js.map +1 -1
- package/platforms/android/java/org/nativescript/widgets/BoxShadowDrawable.java +112 -113
- package/platforms/android/java/org/nativescript/widgets/LayoutBase.java +0 -4
- package/platforms/android/java/org/nativescript/widgets/Utils.java +87 -23
- package/platforms/android/java/org/nativescript/widgets/ViewHelper.java +13 -1
- package/platforms/android/native-api-usage.json +2 -0
- package/profiling/index.js +2 -1
- package/profiling/index.js.map +1 -1
- package/timer/index.android.js +15 -7
- package/timer/index.android.js.map +1 -1
- package/timer/index.ios.js +1 -1
- package/timer/index.ios.js.map +1 -1
- package/ui/action-bar/action-bar-common.js +4 -3
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.android.js +22 -22
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/action-bar/index.ios.js +2 -5
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/activity-indicator/index.ios.js +1 -1
- package/ui/activity-indicator/index.ios.js.map +1 -1
- package/ui/animation/animation-common.d.ts +5 -5
- package/ui/animation/animation-common.js +2 -3
- package/ui/animation/animation-common.js.map +1 -1
- package/ui/animation/animation-interfaces.d.ts +1 -79
- package/ui/animation/animation-interfaces.js +1 -12
- package/ui/animation/animation-interfaces.js.map +1 -1
- package/ui/animation/animation-shared.d.ts +140 -0
- package/ui/animation/animation-shared.js +4 -0
- package/ui/animation/animation-shared.js.map +1 -0
- package/ui/animation/animation-types.d.ts +1 -0
- package/ui/animation/animation-types.js +3 -0
- package/ui/animation/animation-types.js.map +1 -0
- package/ui/animation/index.android.d.ts +1 -2
- package/ui/animation/index.android.js +5 -5
- package/ui/animation/index.android.js.map +1 -1
- package/ui/animation/index.d.ts +7 -132
- package/ui/animation/index.ios.d.ts +2 -2
- package/ui/animation/index.ios.js +9 -9
- package/ui/animation/index.ios.js.map +1 -1
- package/ui/animation/keyframe-animation.d.ts +66 -118
- package/ui/animation/keyframe-animation.js +2 -2
- package/ui/animation/keyframe-animation.js.map +1 -1
- package/ui/builder/binding-builder.d.ts +12 -15
- package/ui/builder/component-builder/index.js +5 -5
- package/ui/builder/component-builder/index.js.map +1 -1
- package/ui/builder/index.d.ts +179 -59
- package/ui/builder/index.js +447 -10
- package/ui/builder/index.js.map +1 -1
- package/ui/button/index.android.d.ts +3 -9
- package/ui/button/index.android.js +34 -43
- package/ui/button/index.android.js.map +1 -1
- package/ui/button/index.d.ts +1 -1
- package/ui/button/index.ios.d.ts +3 -9
- package/ui/button/index.ios.js +43 -79
- package/ui/button/index.ios.js.map +1 -1
- package/ui/core/bindable/bindable-types.d.ts +37 -0
- package/ui/core/bindable/bindable-types.js +3 -0
- package/ui/core/bindable/bindable-types.js.map +1 -0
- package/ui/core/bindable/index.d.ts +2 -38
- package/ui/core/bindable/index.js +1 -2
- package/ui/core/bindable/index.js.map +1 -1
- package/ui/core/control-state-change/index.ios.js +1 -1
- package/ui/core/control-state-change/index.ios.js.map +1 -1
- package/ui/core/properties/index.d.ts +2 -37
- package/ui/core/properties/index.js +27 -42
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/properties/property-shared.d.ts +39 -0
- package/ui/core/properties/property-shared.js +14 -0
- package/ui/core/properties/property-shared.js.map +1 -0
- package/ui/core/view/index.android.d.ts +18 -4
- package/ui/core/view/index.android.js +353 -246
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.d.ts +48 -64
- package/ui/core/view/index.ios.d.ts +25 -5
- package/ui/core/view/index.ios.js +172 -25
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +91 -28
- package/ui/core/view/view-common.js +83 -27
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.d.ts +6 -0
- package/ui/core/view/view-helper/index.ios.d.ts +10 -5
- package/ui/core/view/view-helper/index.ios.js +88 -23
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-common.js +8 -3
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-shared.d.ts +5 -0
- package/ui/core/view/view-helper/view-helper-shared.js +6 -0
- package/ui/core/view/view-helper/view-helper-shared.js.map +1 -0
- package/ui/core/view/view-interfaces.d.ts +54 -0
- package/ui/core/view/view-interfaces.js +2 -0
- package/ui/core/view/view-interfaces.js.map +1 -0
- package/ui/core/view-base/index.js +74 -58
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/core/view-base/utils.d.ts +1 -0
- package/ui/core/view-base/utils.js +9 -0
- package/ui/core/view-base/utils.js.map +1 -0
- package/ui/date-picker/index.android.js +36 -36
- package/ui/date-picker/index.android.js.map +1 -1
- package/ui/date-picker/index.ios.js +1 -1
- package/ui/date-picker/index.ios.js.map +1 -1
- package/ui/dialogs/dialogs-common.js +3 -3
- package/ui/dialogs/dialogs-common.js.map +1 -1
- package/ui/dialogs/index.android.js +8 -7
- package/ui/dialogs/index.android.js.map +1 -1
- package/ui/dialogs/index.ios.js +56 -51
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/editable-text-base/index.android.d.ts +1 -0
- package/ui/editable-text-base/index.android.js +36 -32
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/embedding/index.android.d.ts +1 -1
- package/ui/embedding/index.d.ts +1 -1
- package/ui/frame/activity.android.js.map +1 -1
- package/ui/frame/fragment.android.js +3 -2
- package/ui/frame/fragment.android.js.map +1 -1
- package/ui/frame/fragment.transitions.android.d.ts +15 -13
- package/ui/frame/fragment.transitions.android.js +101 -98
- package/ui/frame/fragment.transitions.android.js.map +1 -1
- package/ui/frame/fragment.transitions.d.ts +3 -2
- package/ui/frame/frame-common.d.ts +5 -4
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/{callbacks/fragment-callbacks.d.ts → frame-helper-for-android.d.ts} +20 -1
- package/ui/frame/{callbacks/fragment-callbacks.js → frame-helper-for-android.js} +87 -48
- package/ui/frame/frame-helper-for-android.js.map +1 -0
- package/ui/frame/frame-interfaces.d.ts +40 -4
- package/ui/frame/frame-interfaces.js.map +1 -1
- package/ui/frame/frame-stack.js.map +1 -1
- package/ui/frame/index.android.d.ts +27 -15
- package/ui/frame/index.android.js +347 -83
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.d.ts +18 -69
- package/ui/frame/index.ios.d.ts +7 -4
- package/ui/frame/index.ios.js +114 -48
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.d.ts +4 -273
- package/ui/gestures/gestures-common.js +3 -146
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/gestures-types.d.ts +301 -0
- package/ui/gestures/gestures-types.js +146 -0
- package/ui/gestures/gestures-types.js.map +1 -0
- package/ui/gestures/index.android.d.ts +29 -1
- package/ui/gestures/index.android.js +133 -132
- package/ui/gestures/index.android.js.map +1 -1
- package/ui/gestures/index.d.ts +35 -0
- package/ui/gestures/index.ios.d.ts +35 -1
- package/ui/gestures/index.ios.js +6 -8
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.d.ts +1 -1
- package/ui/gestures/touch-manager.js +32 -32
- package/ui/gestures/touch-manager.js.map +1 -1
- package/ui/html-view/index.ios.js +2 -1
- package/ui/html-view/index.ios.js.map +1 -1
- package/ui/image/image-common.js +2 -1
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.android.js +18 -18
- package/ui/image/index.android.js.map +1 -1
- package/ui/image-cache/index.android.js +12 -14
- package/ui/image-cache/index.android.js.map +1 -1
- package/ui/image-cache/index.ios.js +11 -17
- package/ui/image-cache/index.ios.js.map +1 -1
- package/ui/index.d.ts +20 -8
- package/ui/index.js +22 -4
- package/ui/index.js.map +1 -1
- package/ui/label/index.android.js +4 -1
- package/ui/label/index.android.js.map +1 -1
- package/ui/label/index.ios.d.ts +3 -5
- package/ui/label/index.ios.js +23 -45
- package/ui/label/index.ios.js.map +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
- package/ui/layouts/absolute-layout/index.android.js +1 -1
- package/ui/layouts/absolute-layout/index.android.js.map +1 -1
- package/ui/layouts/absolute-layout/index.d.ts +1 -1
- package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +2 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.android.js +1 -1
- package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.ios.js +3 -6
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
- package/ui/layouts/grid-layout/index.android.d.ts +1 -0
- package/ui/layouts/grid-layout/index.android.js +5 -5
- package/ui/layouts/grid-layout/index.android.js.map +1 -1
- package/ui/layouts/index.d.ts +5 -1
- package/ui/layouts/index.js +2 -0
- package/ui/layouts/index.js.map +1 -1
- package/ui/layouts/layout-base.android.d.ts +3 -10
- package/ui/layouts/layout-base.android.js +8 -24
- package/ui/layouts/layout-base.android.js.map +1 -1
- package/ui/layouts/layout-base.ios.js.map +1 -1
- package/ui/layouts/liquid-glass/index.android.d.ts +5 -0
- package/ui/layouts/liquid-glass/index.android.js +8 -0
- package/ui/layouts/liquid-glass/index.android.js.map +1 -0
- package/ui/layouts/liquid-glass/index.d.ts +10 -0
- package/ui/layouts/liquid-glass/index.ios.d.ts +12 -0
- package/ui/layouts/liquid-glass/index.ios.js +106 -0
- package/ui/layouts/liquid-glass/index.ios.js.map +1 -0
- package/ui/layouts/liquid-glass/liquid-glass-common.d.ts +3 -0
- package/ui/layouts/liquid-glass/liquid-glass-common.js +4 -0
- package/ui/layouts/liquid-glass/liquid-glass-common.js.map +1 -0
- package/ui/layouts/liquid-glass-container/index.android.d.ts +3 -0
- package/ui/layouts/liquid-glass-container/index.android.js +4 -0
- package/ui/layouts/liquid-glass-container/index.android.js.map +1 -0
- package/ui/layouts/liquid-glass-container/index.d.ts +3 -0
- package/ui/layouts/liquid-glass-container/index.ios.d.ts +15 -0
- package/ui/layouts/liquid-glass-container/index.ios.js +167 -0
- package/ui/layouts/liquid-glass-container/index.ios.js.map +1 -0
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.d.ts +4 -0
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js +5 -0
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js.map +1 -0
- package/ui/layouts/stack-layout/index.ios.js +6 -0
- package/ui/layouts/stack-layout/index.ios.js.map +1 -1
- package/ui/layouts/wrap-layout/index.android.js +1 -1
- package/ui/layouts/wrap-layout/index.android.js.map +1 -1
- package/ui/layouts/wrap-layout/index.d.ts +1 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.js +1 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
- package/ui/list-picker/index.android.js +31 -31
- package/ui/list-picker/index.android.js.map +1 -1
- package/ui/list-picker/index.ios.js +2 -2
- package/ui/list-picker/index.ios.js.map +1 -1
- package/ui/list-view/index.android.d.ts +26 -1
- package/ui/list-view/index.android.js +767 -124
- package/ui/list-view/index.android.js.map +1 -1
- package/ui/list-view/index.d.ts +128 -1
- package/ui/list-view/index.ios.d.ts +34 -2
- package/ui/list-view/index.ios.js +558 -22
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.d.ts +22 -1
- package/ui/list-view/list-view-common.js +87 -1
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/page/events.d.ts +6 -0
- package/ui/page/events.js +7 -0
- package/ui/page/events.js.map +1 -0
- package/ui/page/index.android.d.ts +1 -10
- package/ui/page/index.android.js +4 -46
- package/ui/page/index.android.js.map +1 -1
- package/ui/page/index.d.ts +1 -9
- package/ui/page/index.ios.d.ts +1 -3
- package/ui/page/index.ios.js +84 -142
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.d.ts +3 -8
- package/ui/page/page-common.js +6 -18
- package/ui/page/page-common.js.map +1 -1
- package/ui/scroll-view/index.d.ts +1 -1
- package/ui/scroll-view/index.ios.d.ts +2 -0
- package/ui/scroll-view/index.ios.js +33 -13
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/scroll-view/scroll-view-common.d.ts +3 -8
- package/ui/scroll-view/scroll-view-common.js +4 -4
- package/ui/scroll-view/scroll-view-common.js.map +1 -1
- package/ui/search-bar/index.android.js +44 -48
- package/ui/search-bar/index.android.js.map +1 -1
- package/ui/search-bar/index.ios.js +3 -6
- package/ui/search-bar/index.ios.js.map +1 -1
- package/ui/segmented-bar/index.android.js +52 -54
- package/ui/segmented-bar/index.android.js.map +1 -1
- package/ui/segmented-bar/index.ios.d.ts +1 -0
- package/ui/segmented-bar/index.ios.js +10 -1
- package/ui/segmented-bar/index.ios.js.map +1 -1
- package/ui/segmented-bar/segmented-bar-common.js +2 -2
- package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
- package/ui/slider/index.android.d.ts +1 -0
- package/ui/slider/index.android.js +92 -25
- package/ui/slider/index.android.js.map +1 -1
- package/ui/slider/index.d.ts +1 -1
- package/ui/slider/index.ios.d.ts +1 -0
- package/ui/slider/index.ios.js +85 -3
- package/ui/slider/index.ios.js.map +1 -1
- package/ui/split-view/index.android.d.ts +3 -0
- package/ui/split-view/index.android.js +4 -0
- package/ui/split-view/index.android.js.map +1 -0
- package/ui/split-view/index.d.ts +16 -0
- package/ui/split-view/index.ios.d.ts +51 -0
- package/ui/split-view/index.ios.js +567 -0
- package/ui/split-view/index.ios.js.map +1 -0
- package/ui/split-view/split-view-common.d.ts +59 -0
- package/ui/split-view/split-view-common.js +127 -0
- package/ui/split-view/split-view-common.js.map +1 -0
- package/ui/styling/background-common.d.ts +4 -4
- package/ui/styling/background-common.js +7 -8
- package/ui/styling/background-common.js.map +1 -1
- package/ui/styling/background.android.d.ts +0 -6
- package/ui/styling/background.android.js +1 -53
- package/ui/styling/background.android.js.map +1 -1
- package/ui/styling/background.d.ts +0 -3
- package/ui/styling/background.ios.d.ts +2 -1
- package/ui/styling/background.ios.js +53 -39
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/converters.d.ts +2 -2
- package/ui/styling/css-selector.js.map +1 -1
- package/ui/styling/css-shadow.js.map +1 -1
- package/ui/styling/css-transform.d.ts +1 -1
- package/ui/styling/css-utils.d.ts +1 -0
- package/ui/styling/css-utils.js +16 -5
- package/ui/styling/css-utils.js.map +1 -1
- package/ui/styling/font.android.js +2 -2
- package/ui/styling/font.android.js.map +1 -1
- package/ui/styling/font.ios.js +10 -10
- package/ui/styling/font.ios.js.map +1 -1
- package/ui/styling/length-shared.d.ts +52 -0
- package/ui/styling/length-shared.js +172 -0
- package/ui/styling/length-shared.js.map +1 -0
- package/ui/styling/style/index.d.ts +4 -1
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.d.ts +62 -112
- package/ui/styling/style-properties.js +50 -98
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.d.ts +85 -48
- package/ui/styling/style-scope.js +29 -39
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/styling/styling-profile.d.ts +1 -0
- package/ui/styling/styling-profile.js +4 -0
- package/ui/styling/styling-profile.js.map +1 -0
- package/ui/styling/styling-shared.d.ts +3 -0
- package/ui/styling/styling-shared.js +6 -0
- package/ui/styling/styling-shared.js.map +1 -0
- package/ui/switch/index.android.js +16 -16
- package/ui/switch/index.android.js.map +1 -1
- package/ui/switch/index.ios.d.ts +1 -0
- package/ui/switch/index.ios.js +62 -12
- package/ui/switch/index.ios.js.map +1 -1
- package/ui/tab-view/index.android.js +167 -158
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/tab-view/index.d.ts +22 -1
- package/ui/tab-view/index.ios.d.ts +19 -3
- package/ui/tab-view/index.ios.js +337 -61
- package/ui/tab-view/index.ios.js.map +1 -1
- package/ui/tab-view/tab-view-common.d.ts +15 -0
- package/ui/tab-view/tab-view-common.js +15 -0
- package/ui/tab-view/tab-view-common.js.map +1 -1
- package/ui/text-base/index.android.d.ts +8 -18
- package/ui/text-base/index.android.js +126 -165
- package/ui/text-base/index.android.js.map +1 -1
- package/ui/text-base/index.d.ts +6 -6
- package/ui/text-base/index.ios.js +16 -20
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-base/text-base-common.d.ts +2 -1
- package/ui/text-base/text-base-common.js +1 -1
- package/ui/text-base/text-base-common.js.map +1 -1
- package/ui/text-field/index.ios.d.ts +4 -9
- package/ui/text-field/index.ios.js +55 -35
- package/ui/text-field/index.ios.js.map +1 -1
- package/ui/text-view/index.ios.d.ts +3 -9
- package/ui/text-view/index.ios.js +31 -78
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/time-picker/index.android.js +19 -19
- package/ui/time-picker/index.android.js.map +1 -1
- package/ui/time-picker/index.ios.js +1 -1
- package/ui/time-picker/index.ios.js.map +1 -1
- package/ui/transition/fade-transition.ios.js +6 -7
- package/ui/transition/fade-transition.ios.js.map +1 -1
- package/ui/transition/index.ios.js +1 -1
- package/ui/transition/index.ios.js.map +1 -1
- package/ui/transition/modal-transition.ios.js +20 -27
- package/ui/transition/modal-transition.ios.js.map +1 -1
- package/ui/transition/page-transition.android.d.ts +1 -1
- package/ui/transition/page-transition.android.js +7 -16
- package/ui/transition/page-transition.android.js.map +1 -1
- package/ui/transition/page-transition.ios.js +20 -26
- package/ui/transition/page-transition.ios.js.map +1 -1
- package/ui/transition/shared-transition-helper.ios.js +1 -1
- package/ui/transition/shared-transition-helper.ios.js.map +1 -1
- package/ui/transition/shared-transition.js +2 -1
- package/ui/transition/shared-transition.js.map +1 -1
- package/ui/transition/slide-transition.ios.js +7 -8
- package/ui/transition/slide-transition.ios.js.map +1 -1
- package/ui/web-view/index.android.js +58 -62
- package/ui/web-view/index.android.js.map +1 -1
- package/ui/web-view/index.ios.js +17 -17
- package/ui/web-view/index.ios.js.map +1 -1
- package/utils/animation-helpers.d.ts +27 -0
- package/utils/animation-helpers.js +48 -0
- package/utils/animation-helpers.js.map +1 -0
- package/utils/common.d.ts +4 -41
- package/utils/common.js +26 -121
- package/utils/common.js.map +1 -1
- package/utils/constants.android.d.ts +1 -0
- package/utils/constants.android.js +3 -0
- package/utils/constants.android.js.map +1 -1
- package/utils/constants.d.ts +1 -0
- package/utils/constants.ios.d.ts +1 -0
- package/utils/constants.ios.js +3 -0
- package/utils/constants.ios.js.map +1 -1
- package/utils/debug-source.d.ts +19 -0
- package/utils/debug-source.js +78 -0
- package/utils/debug-source.js.map +1 -0
- package/utils/debug.js +1 -59
- package/utils/debug.js.map +1 -1
- package/utils/index.android.d.ts +3 -1
- package/utils/index.android.js +37 -11
- package/utils/index.android.js.map +1 -1
- package/utils/index.d.ts +8 -14
- package/utils/index.ios.d.ts +4 -1
- package/utils/index.ios.js +32 -5
- package/utils/index.ios.js.map +1 -1
- package/utils/layout-helper/index.android.d.ts +1 -0
- package/utils/layout-helper/index.android.js +13 -4
- package/utils/layout-helper/index.android.js.map +1 -1
- package/utils/layout-helper/index.d.ts +11 -4
- package/utils/layout-helper/index.ios.d.ts +1 -0
- package/utils/layout-helper/index.ios.js +9 -5
- package/utils/layout-helper/index.ios.js.map +1 -1
- package/utils/layout-helper/layout-helper-common.d.ts +0 -9
- package/utils/layout-helper/layout-helper-common.js +1 -9
- package/utils/layout-helper/layout-helper-common.js.map +1 -1
- package/utils/layout-helper/layout-helper-shared.d.ts +9 -0
- package/utils/layout-helper/layout-helper-shared.js +13 -0
- package/utils/layout-helper/layout-helper-shared.js.map +1 -0
- package/utils/{android/index.d.ts → native-helper-for-android.d.ts} +5 -3
- package/utils/{android/index.js → native-helper-for-android.js} +140 -28
- package/utils/native-helper-for-android.js.map +1 -0
- package/utils/native-helper.android.d.ts +29 -5
- package/utils/native-helper.android.js +18 -131
- package/utils/native-helper.android.js.map +1 -1
- package/utils/native-helper.d.ts +206 -258
- package/utils/native-helper.ios.d.ts +72 -3
- package/utils/native-helper.ios.js +250 -3
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/shared.d.ts +19 -0
- package/utils/shared.js +44 -0
- package/utils/shared.js.map +1 -0
- package/utils/utils-shared.d.ts +1 -0
- package/utils/utils-shared.js +8 -0
- package/utils/utils-shared.js.map +1 -0
- package/xhr/index.d.ts +6 -0
- package/xhr/index.js +27 -13
- package/xhr/index.js.map +1 -1
- package/xml/index.d.ts +94 -98
- package/xml/index.js +58 -2
- package/xml/index.js.map +1 -1
- package/cli-hooks/postinstall.js +0 -2
- package/cli-hooks/preuninstall.js +0 -2
- package/debugger/dom-node.d.ts +0 -27
- package/debugger/dom-node.js.map +0 -1
- package/polyfills/formdata.d.ts +0 -6
- package/polyfills/formdata.js +0 -16
- package/polyfills/formdata.js.map +0 -1
- package/ui/builder/xml2ui.d.ts +0 -134
- package/ui/builder/xml2ui.js +0 -394
- package/ui/builder/xml2ui.js.map +0 -1
- package/ui/frame/callbacks/activity-callbacks.d.ts +0 -20
- package/ui/frame/callbacks/activity-callbacks.js +0 -301
- package/ui/frame/callbacks/activity-callbacks.js.map +0 -1
- package/ui/frame/callbacks/fragment-callbacks.js.map +0 -1
- package/utils/android/index.js.map +0 -1
- package/utils/ios/index.d.ts +0 -39
- package/utils/ios/index.js +0 -257
- package/utils/ios/index.js.map +0 -1
|
@@ -1,222 +1,188 @@
|
|
|
1
1
|
import * as ApplicationSettings from '../application-settings';
|
|
2
|
+
import { CoreTypes } from '../core-types';
|
|
2
3
|
import { profile } from '../profiling';
|
|
3
|
-
import { isEmbedded } from '../ui/embedding';
|
|
4
4
|
import { SDK_VERSION } from '../utils/constants';
|
|
5
5
|
import { ApplicationCommon } from './application-common';
|
|
6
6
|
import { fontScaleChanged } from '../accessibility/font-scale.android';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
var BroadcastReceiverImpl = /** @class */ (function (_super) {
|
|
13
|
-
__extends(BroadcastReceiverImpl, _super);
|
|
14
|
-
function BroadcastReceiverImpl(onReceiveCallback) {
|
|
15
|
-
var _this = _super.call(this) || this;
|
|
16
|
-
_this._onReceiveCallback = onReceiveCallback;
|
|
17
|
-
return global.__native(_this);
|
|
18
|
-
}
|
|
19
|
-
BroadcastReceiverImpl.prototype.onReceive = function (context, intent) {
|
|
20
|
-
if (this._onReceiveCallback) {
|
|
21
|
-
this._onReceiveCallback(context, intent);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
return BroadcastReceiverImpl;
|
|
25
|
-
}(android.content.BroadcastReceiver));
|
|
26
|
-
BroadcastReceiver_ = BroadcastReceiverImpl;
|
|
27
|
-
return BroadcastReceiver_;
|
|
28
|
-
}
|
|
7
|
+
import { androidGetForegroundActivity, androidGetStartActivity, androidSetForegroundActivity, androidSetStartActivity } from './helpers';
|
|
8
|
+
import { getImageFetcher, getNativeApp, getRootView, initImageCache, setApplicationPropertiesCallback, setAppMainEntry, setNativeApp, setRootView, setToggleApplicationEventListenersCallback } from './helpers-common';
|
|
9
|
+
import { getNativeScriptGlobals } from '../globals/global-utils';
|
|
10
|
+
import lazy from '../utils/lazy';
|
|
29
11
|
let NativeScriptLifecycleCallbacks_;
|
|
30
12
|
function initNativeScriptLifecycleCallbacks() {
|
|
31
13
|
if (NativeScriptLifecycleCallbacks_) {
|
|
32
14
|
return NativeScriptLifecycleCallbacks_;
|
|
33
15
|
}
|
|
34
|
-
var NativeScriptLifecycleCallbacksImpl =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Application.android.setStartActivity(activity);
|
|
44
|
-
}
|
|
45
|
-
if (!Application.android.foregroundActivity) {
|
|
46
|
-
Application.android.setForegroundActivity(activity);
|
|
47
|
-
}
|
|
48
|
-
if (!this.nativescriptActivity && 'isNativeScriptActivity' in activity) {
|
|
49
|
-
this.nativescriptActivity = activity;
|
|
50
|
-
}
|
|
51
|
-
this.notifyActivityCreated(activity, savedInstanceState);
|
|
52
|
-
if (Application.hasListeners(Application.displayedEvent)) {
|
|
53
|
-
this.subscribeForGlobalLayout(activity);
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
NativeScriptLifecycleCallbacksImpl.prototype.onActivityDestroyed = function (activity) {
|
|
57
|
-
// console.log('NativeScriptLifecycleCallbacks onActivityDestroyed');
|
|
58
|
-
if (activity === Application.android.foregroundActivity) {
|
|
59
|
-
Application.android.setForegroundActivity(undefined);
|
|
60
|
-
}
|
|
61
|
-
if (activity === this.nativescriptActivity) {
|
|
62
|
-
this.nativescriptActivity = undefined;
|
|
63
|
-
}
|
|
64
|
-
if (activity === Application.android.startActivity) {
|
|
65
|
-
Application.android.setStartActivity(undefined);
|
|
66
|
-
// Fallback for start activity when it is destroyed but we have a known nativescript activity
|
|
67
|
-
if (this.nativescriptActivity) {
|
|
68
|
-
Application.android.setStartActivity(this.nativescriptActivity);
|
|
16
|
+
var NativeScriptLifecycleCallbacksImpl = (function (_super) {
|
|
17
|
+
__extends(NativeScriptLifecycleCallbacksImpl, _super);
|
|
18
|
+
function NativeScriptLifecycleCallbacksImpl() {
|
|
19
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
20
|
+
}
|
|
21
|
+
NativeScriptLifecycleCallbacksImpl.prototype.onActivityCreated = function (activity, savedInstanceState) {
|
|
22
|
+
this.setThemeOnLaunch(activity);
|
|
23
|
+
if (!Application.android.startActivity) {
|
|
24
|
+
Application.android.setStartActivity(activity);
|
|
69
25
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
Application.
|
|
83
|
-
|
|
84
|
-
|
|
26
|
+
if (!Application.android.foregroundActivity) {
|
|
27
|
+
Application.android.setForegroundActivity(activity);
|
|
28
|
+
}
|
|
29
|
+
if (!this.nativescriptActivity && "isNativeScriptActivity" in activity) {
|
|
30
|
+
this.nativescriptActivity = activity;
|
|
31
|
+
}
|
|
32
|
+
this.notifyActivityCreated(activity, savedInstanceState);
|
|
33
|
+
if (Application.hasListeners(Application.displayedEvent)) {
|
|
34
|
+
this.subscribeForGlobalLayout(activity);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
NativeScriptLifecycleCallbacksImpl.prototype.onActivityDestroyed = function (activity) {
|
|
38
|
+
if (activity === Application.android.foregroundActivity) {
|
|
39
|
+
Application.android.setForegroundActivity(undefined);
|
|
40
|
+
}
|
|
41
|
+
if (activity === this.nativescriptActivity) {
|
|
42
|
+
this.nativescriptActivity = undefined;
|
|
43
|
+
}
|
|
44
|
+
if (activity === Application.android.startActivity) {
|
|
45
|
+
Application.android.setStartActivity(undefined);
|
|
46
|
+
if (this.nativescriptActivity) {
|
|
47
|
+
Application.android.setStartActivity(this.nativescriptActivity);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
Application.android.notify({
|
|
51
|
+
eventName: Application.android.activityDestroyedEvent,
|
|
52
|
+
object: Application.android,
|
|
85
53
|
activity: activity,
|
|
86
54
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
Application.android.notify({
|
|
100
|
-
eventName: Application.android.activityResumedEvent,
|
|
101
|
-
object: Application.android,
|
|
102
|
-
activity: activity,
|
|
103
|
-
});
|
|
104
|
-
};
|
|
105
|
-
NativeScriptLifecycleCallbacksImpl.prototype.onActivitySaveInstanceState = function (activity, bundle) {
|
|
106
|
-
// console.log('NativeScriptLifecycleCallbacks onActivitySaveInstanceState');
|
|
107
|
-
Application.android.notify({
|
|
108
|
-
eventName: Application.android.saveActivityStateEvent,
|
|
109
|
-
object: Application.android,
|
|
110
|
-
activity: activity,
|
|
111
|
-
bundle: bundle,
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
NativeScriptLifecycleCallbacksImpl.prototype.onActivityStarted = function (activity) {
|
|
115
|
-
// console.log('NativeScriptLifecycleCallbacks onActivityStarted');
|
|
116
|
-
var _a;
|
|
117
|
-
this.activitiesCount = ((_a = this.activitiesCount) !== null && _a !== void 0 ? _a : 0) + 1;
|
|
118
|
-
if (this.activitiesCount === 1) {
|
|
119
|
-
Application.android.setInBackground(false, {
|
|
120
|
-
// todo: deprecate event.android in favor of event.activity
|
|
121
|
-
android: activity,
|
|
55
|
+
gc();
|
|
56
|
+
};
|
|
57
|
+
NativeScriptLifecycleCallbacksImpl.prototype.onActivityPaused = function (activity) {
|
|
58
|
+
if ("isNativeScriptActivity" in activity) {
|
|
59
|
+
Application.setSuspended(true, {
|
|
60
|
+
android: activity,
|
|
61
|
+
activity: activity,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
Application.android.notify({
|
|
65
|
+
eventName: Application.android.activityPausedEvent,
|
|
66
|
+
object: Application.android,
|
|
122
67
|
activity: activity,
|
|
123
68
|
});
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
};
|
|
131
|
-
NativeScriptLifecycleCallbacksImpl.prototype.onActivityStopped = function (activity) {
|
|
132
|
-
// console.log('NativeScriptLifecycleCallbacks onActivityStopped');
|
|
133
|
-
this.activitiesCount--;
|
|
134
|
-
if (this.activitiesCount === 0) {
|
|
135
|
-
Application.android.setInBackground(true, {
|
|
136
|
-
// todo: deprecate event.android in favor of event.activity
|
|
137
|
-
android: activity,
|
|
69
|
+
};
|
|
70
|
+
NativeScriptLifecycleCallbacksImpl.prototype.onActivityResumed = function (activity) {
|
|
71
|
+
Application.android.setForegroundActivity(activity);
|
|
72
|
+
Application.android.notify({
|
|
73
|
+
eventName: Application.android.activityResumedEvent,
|
|
74
|
+
object: Application.android,
|
|
138
75
|
activity: activity,
|
|
139
76
|
});
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
if (
|
|
153
|
-
|
|
77
|
+
};
|
|
78
|
+
NativeScriptLifecycleCallbacksImpl.prototype.onActivitySaveInstanceState = function (activity, bundle) {
|
|
79
|
+
Application.android.notify({
|
|
80
|
+
eventName: Application.android.saveActivityStateEvent,
|
|
81
|
+
object: Application.android,
|
|
82
|
+
activity: activity,
|
|
83
|
+
bundle: bundle,
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
NativeScriptLifecycleCallbacksImpl.prototype.onActivityStarted = function (activity) {
|
|
87
|
+
var _a;
|
|
88
|
+
this.activitiesCount = ((_a = this.activitiesCount) !== null && _a !== void 0 ? _a : 0) + 1;
|
|
89
|
+
if (this.activitiesCount === 1) {
|
|
90
|
+
Application.android.setInBackground(false, {
|
|
91
|
+
android: activity,
|
|
92
|
+
activity: activity,
|
|
93
|
+
});
|
|
154
94
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
});
|
|
167
|
-
};
|
|
168
|
-
NativeScriptLifecycleCallbacksImpl.prototype.subscribeForGlobalLayout = function (activity) {
|
|
169
|
-
var rootView = activity.getWindow().getDecorView().getRootView();
|
|
170
|
-
// store the listener not to trigger GC collection before collecting the method
|
|
171
|
-
global.onGlobalLayoutListener = new android.view.ViewTreeObserver.OnGlobalLayoutListener({
|
|
172
|
-
onGlobalLayout: function () {
|
|
173
|
-
Application.android.notify({
|
|
174
|
-
eventName: Application.displayedEvent,
|
|
175
|
-
object: Application,
|
|
176
|
-
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,
|
|
177
106
|
activity: activity,
|
|
178
107
|
});
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
108
|
+
}
|
|
109
|
+
Application.android.notify({
|
|
110
|
+
eventName: Application.android.activityStoppedEvent,
|
|
111
|
+
object: Application.android,
|
|
112
|
+
activity: activity,
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
NativeScriptLifecycleCallbacksImpl.prototype.setThemeOnLaunch = function (activity) {
|
|
116
|
+
var setThemeOnLaunch = ApplicationSettings.getNumber("SET_THEME_ON_LAUNCH", -1);
|
|
117
|
+
if (setThemeOnLaunch === -1) {
|
|
118
|
+
var activityInfo = activity.getPackageManager().getActivityInfo(activity.getComponentName(), android.content.pm.PackageManager.GET_META_DATA);
|
|
119
|
+
if (activityInfo.metaData) {
|
|
120
|
+
setThemeOnLaunch = activityInfo.metaData.getInt("SET_THEME_ON_LAUNCH", -1);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (setThemeOnLaunch !== -1) {
|
|
124
|
+
activity.setTheme(setThemeOnLaunch);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
NativeScriptLifecycleCallbacksImpl.prototype.notifyActivityCreated = function (activity, bundle) {
|
|
128
|
+
Application.android.notify({
|
|
129
|
+
eventName: Application.android.activityCreatedEvent,
|
|
130
|
+
object: Application.android,
|
|
131
|
+
activity: activity,
|
|
132
|
+
bundle: bundle,
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
NativeScriptLifecycleCallbacksImpl.prototype.subscribeForGlobalLayout = function (activity) {
|
|
136
|
+
var rootView = activity.getWindow().getDecorView().getRootView();
|
|
137
|
+
global.onGlobalLayoutListener = new android.view.ViewTreeObserver.OnGlobalLayoutListener({
|
|
138
|
+
onGlobalLayout: function () {
|
|
139
|
+
Application.android.notify({
|
|
140
|
+
eventName: Application.displayedEvent,
|
|
141
|
+
object: Application,
|
|
142
|
+
android: Application.android,
|
|
143
|
+
activity: activity,
|
|
144
|
+
});
|
|
145
|
+
var viewTreeObserver = rootView.getViewTreeObserver();
|
|
146
|
+
viewTreeObserver.removeOnGlobalLayoutListener(global.onGlobalLayoutListener);
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
rootView.getViewTreeObserver().addOnGlobalLayoutListener(global.onGlobalLayoutListener);
|
|
150
|
+
};
|
|
151
|
+
__decorate([
|
|
152
|
+
profile
|
|
153
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityCreated", null);
|
|
154
|
+
__decorate([
|
|
155
|
+
profile
|
|
156
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityDestroyed", null);
|
|
157
|
+
__decorate([
|
|
158
|
+
profile
|
|
159
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityPaused", null);
|
|
160
|
+
__decorate([
|
|
161
|
+
profile
|
|
162
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityResumed", null);
|
|
163
|
+
__decorate([
|
|
164
|
+
profile
|
|
165
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "onActivitySaveInstanceState", null);
|
|
166
|
+
__decorate([
|
|
167
|
+
profile
|
|
168
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityStarted", null);
|
|
169
|
+
__decorate([
|
|
170
|
+
profile
|
|
171
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityStopped", null);
|
|
172
|
+
__decorate([
|
|
173
|
+
profile
|
|
174
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "setThemeOnLaunch", null);
|
|
175
|
+
__decorate([
|
|
176
|
+
profile
|
|
177
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "notifyActivityCreated", null);
|
|
178
|
+
__decorate([
|
|
179
|
+
profile
|
|
180
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "subscribeForGlobalLayout", null);
|
|
181
|
+
NativeScriptLifecycleCallbacksImpl = __decorate([
|
|
182
|
+
JavaProxy("org.nativescript.NativeScriptLifecycleCallbacks")
|
|
183
|
+
], NativeScriptLifecycleCallbacksImpl);
|
|
184
|
+
return NativeScriptLifecycleCallbacksImpl;
|
|
185
|
+
}(android.app.Application.ActivityLifecycleCallbacks));
|
|
220
186
|
NativeScriptLifecycleCallbacks_ = NativeScriptLifecycleCallbacksImpl;
|
|
221
187
|
return NativeScriptLifecycleCallbacks_;
|
|
222
188
|
}
|
|
@@ -225,43 +191,59 @@ function initNativeScriptComponentCallbacks() {
|
|
|
225
191
|
if (NativeScriptComponentCallbacks_) {
|
|
226
192
|
return NativeScriptComponentCallbacks_;
|
|
227
193
|
}
|
|
228
|
-
var NativeScriptComponentCallbacksImpl =
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}(android.content.ComponentCallbacks2));
|
|
194
|
+
var NativeScriptComponentCallbacksImpl = (function (_super) {
|
|
195
|
+
__extends(NativeScriptComponentCallbacksImpl, _super);
|
|
196
|
+
function NativeScriptComponentCallbacksImpl() {
|
|
197
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
198
|
+
}
|
|
199
|
+
NativeScriptComponentCallbacksImpl.prototype.onLowMemory = function () {
|
|
200
|
+
gc();
|
|
201
|
+
java.lang.System.gc();
|
|
202
|
+
Application.notify({
|
|
203
|
+
eventName: Application.lowMemoryEvent,
|
|
204
|
+
object: Application,
|
|
205
|
+
android: this,
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
NativeScriptComponentCallbacksImpl.prototype.onTrimMemory = function (level) {
|
|
209
|
+
};
|
|
210
|
+
NativeScriptComponentCallbacksImpl.prototype.onConfigurationChanged = function (newConfiguration) {
|
|
211
|
+
Application.android.onConfigurationChanged(newConfiguration);
|
|
212
|
+
};
|
|
213
|
+
__decorate([
|
|
214
|
+
profile
|
|
215
|
+
], NativeScriptComponentCallbacksImpl.prototype, "onLowMemory", null);
|
|
216
|
+
__decorate([
|
|
217
|
+
profile
|
|
218
|
+
], NativeScriptComponentCallbacksImpl.prototype, "onTrimMemory", null);
|
|
219
|
+
__decorate([
|
|
220
|
+
profile
|
|
221
|
+
], NativeScriptComponentCallbacksImpl.prototype, "onConfigurationChanged", null);
|
|
222
|
+
NativeScriptComponentCallbacksImpl = __decorate([
|
|
223
|
+
JavaProxy("org.nativescript.NativeScriptComponentCallbacks")
|
|
224
|
+
], NativeScriptComponentCallbacksImpl);
|
|
225
|
+
return NativeScriptComponentCallbacksImpl;
|
|
226
|
+
}(android.content.ComponentCallbacks2));
|
|
262
227
|
NativeScriptComponentCallbacks_ = NativeScriptComponentCallbacksImpl;
|
|
263
228
|
return NativeScriptComponentCallbacks_;
|
|
264
229
|
}
|
|
230
|
+
const BroadcastReceiver = lazy(() => {
|
|
231
|
+
var BroadcastReceiverImpl = (function (_super) {
|
|
232
|
+
__extends(BroadcastReceiverImpl, _super);
|
|
233
|
+
function BroadcastReceiverImpl(onReceiveCallback) {
|
|
234
|
+
var _this = _super.call(this) || this;
|
|
235
|
+
_this._onReceiveCallback = onReceiveCallback;
|
|
236
|
+
return global.__native(_this);
|
|
237
|
+
}
|
|
238
|
+
BroadcastReceiverImpl.prototype.onReceive = function (context, intent) {
|
|
239
|
+
if (this._onReceiveCallback) {
|
|
240
|
+
this._onReceiveCallback(context, intent);
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
return BroadcastReceiverImpl;
|
|
244
|
+
}(android.content.BroadcastReceiver));
|
|
245
|
+
return BroadcastReceiverImpl;
|
|
246
|
+
});
|
|
265
247
|
export class AndroidApplication extends ApplicationCommon {
|
|
266
248
|
constructor() {
|
|
267
249
|
super(...arguments);
|
|
@@ -281,7 +263,9 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
281
263
|
this.dialogOnCreateViewEvent = AndroidApplication.activityRequestPermissionsEvent;
|
|
282
264
|
this.configurationChangeEvent = AndroidApplication.activityRequestPermissionsEvent;
|
|
283
265
|
this._registeredReceivers = {};
|
|
284
|
-
this.
|
|
266
|
+
this._registeredReceiversById = {};
|
|
267
|
+
this._nextReceiverId = 1;
|
|
268
|
+
this._pendingReceiverRegistrations = [];
|
|
285
269
|
}
|
|
286
270
|
init(nativeApp) {
|
|
287
271
|
if (!nativeApp || this.nativeApp === nativeApp) {
|
|
@@ -292,6 +276,7 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
292
276
|
}
|
|
293
277
|
try {
|
|
294
278
|
this._nativeApp = nativeApp;
|
|
279
|
+
setNativeApp(nativeApp);
|
|
295
280
|
this._context = nativeApp.getApplicationContext();
|
|
296
281
|
this._prevConfiguration = new android.content.res.Configuration(this._context.getResources().getConfiguration());
|
|
297
282
|
this._packageName = nativeApp.getPackageName();
|
|
@@ -307,7 +292,7 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
307
292
|
}
|
|
308
293
|
}
|
|
309
294
|
_registerPendingReceivers() {
|
|
310
|
-
this._pendingReceiverRegistrations.forEach((
|
|
295
|
+
this._pendingReceiverRegistrations.forEach((info) => this._registerReceiver(this.context, info.intent, info.callback, info.flags, info.id));
|
|
311
296
|
this._pendingReceiverRegistrations.length = 0;
|
|
312
297
|
}
|
|
313
298
|
onConfigurationChanged(configuration) {
|
|
@@ -337,6 +322,9 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
337
322
|
if ((diff & 1073741824) /* ActivityInfo.CONFIG_FONT_SCALE */ !== 0) {
|
|
338
323
|
fontScaleChanged(Number(configuration.fontScale));
|
|
339
324
|
}
|
|
325
|
+
if ((diff & 8192) /* ActivityInfo.CONFIG_LAYOUT_DIRECTION */ !== 0) {
|
|
326
|
+
this.setLayoutDirection(this.getLayoutDirectionValue(configuration));
|
|
327
|
+
}
|
|
340
328
|
this.notify({ eventName: this.configurationChangeEvent, configuration, diff });
|
|
341
329
|
this._prevConfiguration = new android.content.res.Configuration(configuration);
|
|
342
330
|
}
|
|
@@ -345,25 +333,7 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
345
333
|
if (nativeApp) {
|
|
346
334
|
return nativeApp;
|
|
347
335
|
}
|
|
348
|
-
|
|
349
|
-
// check whether the com.tns.NativeScriptApplication type exists
|
|
350
|
-
if (com.tns.NativeScriptApplication) {
|
|
351
|
-
nativeApp = com.tns.NativeScriptApplication.getInstance();
|
|
352
|
-
}
|
|
353
|
-
if (!nativeApp && isEmbedded()) {
|
|
354
|
-
nativeApp = com.tns.embedding.ApplicationHolder.getInstance();
|
|
355
|
-
}
|
|
356
|
-
// the getInstance might return null if com.tns.NativeScriptApplication exists but is not the starting app type
|
|
357
|
-
if (!nativeApp) {
|
|
358
|
-
// TODO: Should we handle the case when a custom application type is provided and the user has not explicitly initialized the application module?
|
|
359
|
-
const clazz = java.lang.Class.forName('android.app.ActivityThread');
|
|
360
|
-
if (clazz) {
|
|
361
|
-
const method = clazz.getMethod('currentApplication', null);
|
|
362
|
-
if (method) {
|
|
363
|
-
nativeApp = method.invoke(null, null);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
336
|
+
nativeApp = getNativeApp();
|
|
367
337
|
// we cannot work without having the app instance
|
|
368
338
|
if (!nativeApp) {
|
|
369
339
|
throw new Error("Failed to retrieve native Android Application object. If you have a custom android.app.Application type implemented make sure that you've called the 'Application.android.init' method.");
|
|
@@ -378,23 +348,23 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
378
348
|
throw new Error('Application is already started.');
|
|
379
349
|
}
|
|
380
350
|
this.started = true;
|
|
381
|
-
|
|
351
|
+
setAppMainEntry(typeof entry === 'string' ? { moduleName: entry } : entry);
|
|
382
352
|
if (!this.nativeApp) {
|
|
383
353
|
const nativeApp = this.getNativeApplication();
|
|
384
354
|
this.init(nativeApp);
|
|
385
355
|
}
|
|
386
356
|
}
|
|
387
357
|
get startActivity() {
|
|
388
|
-
return
|
|
358
|
+
return androidGetStartActivity();
|
|
389
359
|
}
|
|
390
360
|
get foregroundActivity() {
|
|
391
|
-
return
|
|
361
|
+
return androidGetForegroundActivity();
|
|
392
362
|
}
|
|
393
363
|
setStartActivity(value) {
|
|
394
|
-
|
|
364
|
+
androidSetStartActivity(value);
|
|
395
365
|
}
|
|
396
366
|
setForegroundActivity(value) {
|
|
397
|
-
|
|
367
|
+
androidSetForegroundActivity(value);
|
|
398
368
|
}
|
|
399
369
|
get paused() {
|
|
400
370
|
return this.suspended;
|
|
@@ -413,33 +383,68 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
413
383
|
// RECEIVER_NOT_EXPORTED (4)
|
|
414
384
|
// RECEIVER_VISIBLE_TO_INSTANT_APPS (1)
|
|
415
385
|
registerBroadcastReceiver(intentFilter, onReceiveCallback, flags = 2) {
|
|
416
|
-
const
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
386
|
+
const receiverId = this._nextReceiverId++;
|
|
387
|
+
if (this.context) {
|
|
388
|
+
this._registerReceiver(this.context, intentFilter, onReceiveCallback, flags, receiverId);
|
|
389
|
+
}
|
|
390
|
+
else {
|
|
391
|
+
this._pendingReceiverRegistrations.push({
|
|
392
|
+
intent: intentFilter,
|
|
393
|
+
callback: onReceiveCallback,
|
|
394
|
+
id: receiverId,
|
|
395
|
+
flags,
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
let removed = false;
|
|
399
|
+
return () => {
|
|
400
|
+
if (removed) {
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
removed = true;
|
|
404
|
+
if (this._registeredReceiversById[receiverId]) {
|
|
405
|
+
const receiverInfo = this._registeredReceiversById[receiverId];
|
|
406
|
+
this.context.unregisterReceiver(receiverInfo.receiver);
|
|
407
|
+
this._registeredReceivers[receiverInfo.intent] = this._registeredReceivers[receiverInfo.intent]?.filter((ri) => ri.id !== receiverId);
|
|
408
|
+
delete this._registeredReceiversById[receiverId];
|
|
420
409
|
}
|
|
421
410
|
else {
|
|
422
|
-
|
|
411
|
+
this._pendingReceiverRegistrations = this._pendingReceiverRegistrations.filter((ri) => ri.id !== receiverId);
|
|
423
412
|
}
|
|
424
|
-
this._registeredReceivers[intentFilter] = receiver;
|
|
425
413
|
};
|
|
426
|
-
|
|
427
|
-
|
|
414
|
+
}
|
|
415
|
+
_registerReceiver(context, intentFilter, onReceiveCallback, flags, id) {
|
|
416
|
+
var _a;
|
|
417
|
+
const receiver = new (BroadcastReceiver())(onReceiveCallback);
|
|
418
|
+
if (SDK_VERSION >= 26) {
|
|
419
|
+
context.registerReceiver(receiver, new android.content.IntentFilter(intentFilter), flags);
|
|
428
420
|
}
|
|
429
421
|
else {
|
|
430
|
-
|
|
422
|
+
context.registerReceiver(receiver, new android.content.IntentFilter(intentFilter));
|
|
431
423
|
}
|
|
424
|
+
const receiverInfo = { receiver, intent: intentFilter, callback: onReceiveCallback, id: typeof id === 'number' ? id : this._nextReceiverId++, flags };
|
|
425
|
+
(_a = this._registeredReceivers)[intentFilter] ?? (_a[intentFilter] = []);
|
|
426
|
+
this._registeredReceivers[intentFilter].push(receiverInfo);
|
|
427
|
+
this._registeredReceiversById[receiverInfo.id] = receiverInfo;
|
|
428
|
+
return receiver;
|
|
432
429
|
}
|
|
433
430
|
unregisterBroadcastReceiver(intentFilter) {
|
|
434
|
-
const
|
|
435
|
-
if (
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
431
|
+
const receivers = this._registeredReceivers[intentFilter];
|
|
432
|
+
if (receivers) {
|
|
433
|
+
receivers.forEach((receiver) => {
|
|
434
|
+
this.context.unregisterReceiver(receiver.receiver);
|
|
435
|
+
});
|
|
436
|
+
this._registeredReceivers[intentFilter] = [];
|
|
439
437
|
}
|
|
440
438
|
}
|
|
441
439
|
getRegisteredBroadcastReceiver(intentFilter) {
|
|
442
|
-
return this._registeredReceivers[intentFilter];
|
|
440
|
+
return this._registeredReceivers[intentFilter]?.[0].receiver;
|
|
441
|
+
}
|
|
442
|
+
getRegisteredBroadcastReceivers(intentFilter) {
|
|
443
|
+
const receiversInfo = this._registeredReceivers[intentFilter];
|
|
444
|
+
if (receiversInfo) {
|
|
445
|
+
return receiversInfo.map((info) => info.receiver);
|
|
446
|
+
}
|
|
447
|
+
return [];
|
|
443
448
|
}
|
|
444
449
|
getRootView() {
|
|
445
450
|
const activity = this.startActivity;
|
|
@@ -447,7 +452,8 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
447
452
|
return undefined;
|
|
448
453
|
}
|
|
449
454
|
const callbacks = activity['_callbacks'];
|
|
450
|
-
|
|
455
|
+
setRootView(callbacks ? callbacks.getRootView() : undefined);
|
|
456
|
+
return getRootView();
|
|
451
457
|
}
|
|
452
458
|
resetRootView(entry) {
|
|
453
459
|
super.resetRootView(entry);
|
|
@@ -478,6 +484,20 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
478
484
|
return 'light';
|
|
479
485
|
}
|
|
480
486
|
}
|
|
487
|
+
getLayoutDirection() {
|
|
488
|
+
const resources = this.context.getResources();
|
|
489
|
+
const configuration = resources.getConfiguration();
|
|
490
|
+
return this.getLayoutDirectionValue(configuration);
|
|
491
|
+
}
|
|
492
|
+
getLayoutDirectionValue(configuration) {
|
|
493
|
+
const layoutDirection = configuration.getLayoutDirection();
|
|
494
|
+
switch (layoutDirection) {
|
|
495
|
+
case android.view.View.LAYOUT_DIRECTION_LTR:
|
|
496
|
+
return CoreTypes.LayoutDirection.ltr;
|
|
497
|
+
case android.view.View.LAYOUT_DIRECTION_RTL:
|
|
498
|
+
return CoreTypes.LayoutDirection.rtl;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
481
501
|
getOrientation() {
|
|
482
502
|
const resources = this.context.getResources();
|
|
483
503
|
const configuration = resources.getConfiguration();
|
|
@@ -517,4 +537,45 @@ AndroidApplication.configurationChangeEvent = 'configurationChange';
|
|
|
517
537
|
export * from './application-common';
|
|
518
538
|
export const Application = new AndroidApplication();
|
|
519
539
|
export const iOSApplication = undefined;
|
|
540
|
+
const applicationEvents = [Application.orientationChangedEvent, Application.systemAppearanceChangedEvent];
|
|
541
|
+
function toggleApplicationEventListeners(toAdd, callback) {
|
|
542
|
+
for (const eventName of applicationEvents) {
|
|
543
|
+
if (toAdd) {
|
|
544
|
+
Application.on(eventName, callback);
|
|
545
|
+
}
|
|
546
|
+
else {
|
|
547
|
+
Application.off(eventName, callback);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
setToggleApplicationEventListenersCallback(toggleApplicationEventListeners);
|
|
552
|
+
setApplicationPropertiesCallback(() => {
|
|
553
|
+
return {
|
|
554
|
+
orientation: Application.orientation(),
|
|
555
|
+
systemAppearance: Application.systemAppearance(),
|
|
556
|
+
};
|
|
557
|
+
});
|
|
558
|
+
function onLiveSync(args) {
|
|
559
|
+
if (getImageFetcher()) {
|
|
560
|
+
getImageFetcher().clearCache();
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
getNativeScriptGlobals().events.on('livesync', onLiveSync);
|
|
564
|
+
getNativeScriptGlobals().addEventWiring(() => {
|
|
565
|
+
Application.android.on('activityStarted', (args) => {
|
|
566
|
+
if (!getImageFetcher()) {
|
|
567
|
+
initImageCache(args.activity);
|
|
568
|
+
}
|
|
569
|
+
else {
|
|
570
|
+
getImageFetcher().initCache();
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
});
|
|
574
|
+
getNativeScriptGlobals().addEventWiring(() => {
|
|
575
|
+
Application.android.on('activityStopped', (args) => {
|
|
576
|
+
if (getImageFetcher()) {
|
|
577
|
+
getImageFetcher().closeCache();
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
});
|
|
520
581
|
//# sourceMappingURL=application.android.js.map
|