113 Commits

Author SHA1 Message Date
034e84ebaf chore: bump version to 6.3.0 (#7973) 2019-10-17 16:18:11 +03:00
cc97a16800 feat: Scoped Packages (#7911)
* chore: move tns-core-modules to nativescript-core

* chore: preparing compat generate script

* chore: add missing definitions

* chore: no need for http-request to be private

* chore: packages chore

* test: generate tests for tns-core-modules

* chore: add anroid module for consistency

* chore: add .npmignore

* chore: added privateModulesWhitelist

* chore(webpack): added bundle-entry-points

* chore: scripts

* chore: tests changed to use @ns/core

* test: add scoped-packages test project

* test: fix types

* test: update test project

* chore: build scripts

* chore: update build script

* chore: npm scripts cleanup

* chore: make the compat pgk work with old wp config

* test: generate diff friendly tests

* chore: create barrel exports

* chore: move files after rebase

* chore: typedoc config

* chore: compat mode

* chore: review of barrels

* chore: remove tns-core-modules import after rebase

* chore: dev workflow setup

* chore: update developer-workflow

* docs: experiment with API extractor

* chore: api-extractor and barrel exports

* chore: api-extractor configs

* chore: generate d.ts rollup with api-extractor

* refactor: move methods inside Frame

* chore: fic tests to use Frame static methods

* refactor: create Builder class

* refactor: use Builder class in tests

* refactor: include Style in ui barrel

* chore: separate compat build script

* chore: fix tslint errors

* chore: update NATIVESCRIPT_CORE_ARGS

* chore: fix compat pack

* chore: fix ui-test-app build with linked modules

* chore: Application, ApplicationSettings, Connectivity and Http

* chore: export Trace, Profiling and Utils

* refactor: Static create methods for ImageSource

* chore: fix deprecated usages of ImageSource

* chore: move Span and FormattedString to ui

* chore: add events-args and ImageSource to index files

* chore: check for CLI >= 6.2 when building for IOS

* chore: update travis build

* chore: copy Pod file to compat package

* chore: update error msg ui-tests-app

* refactor: Apply suggestions from code review

Co-Authored-By: Martin Yankov <m.i.yankov@gmail.com>

* chore: typings and refs

* chore: add missing d.ts files for public API

* chore: adress code review FB

* chore: update api-report

* chore: dev-workflow for other apps

* chore: api update

* chore: update api-report
2019-10-17 00:45:33 +03:00
08e23bcc3b feat: overhaul and streamline Android page navigation transitions (#7925)
* feat: remove Animators and replace with Transitions

* fix: handle disappearing nested fragments for tabs.

Extract TabFragmentImplementation in tab-navigation base for both tabs and bottom navigation

* chore: bump webpack cycles counter

* feat(android-widgets): add androidx.transition:transition as dependency

* chore: fix typescript errors

* fix(frame-android): child already has a parent. Replace removeView with removeAllViews

* fix(tests): wait for fragment before isAdded() check

* fix(bottom-navigation): prevent changeTab logic when fragment manager is destroyed

* chore: apply PR comments changes
2019-10-15 18:19:47 +03:00
dc6540269f feat(platform-declarations): add android29 typings (#7923) 2019-10-14 18:26:02 +03:00
07f13a6771 chore: update readme (#7929) 2019-10-10 11:47:45 +03:00
2146ac902f feat(file-system): async read/write (#7671) 2019-10-02 11:21:18 +03:00
3e8d6350b9 feat(platform-declarations): generate typings from iOS 13.0 SDK (#7817)
* feat(platform-declarations): generate typings from iOS 13.0 SDK

* fix(platform-declarations): typings generation script

Delete Material Components typings from `tns-platform-declarations`,
they are part of `tns-core-modules` package.

* refactor(platform-declarations): workaround a TypeScript error

Error:
```
tns-platform-declarations/ios/objc-x86_64/objc!OSLog.d.ts(178,15): error TS2417: Class static side 'typeof OSLogEnumerator' incorrectly extends base class static side 'typeof NSEnumerator'.
  Types of property 'alloc' are incompatible.
    Type '() => OSLogEnumerator' is not assignable to type '<ObjectType>() => NSEnumerator<ObjectType>'.
      Type 'OSLogEnumerator' is not assignable to type 'NSEnumerator<ObjectType>'.
        Types of property 'allObjects' are incompatible.
          Type 'NSArray<NSObject>' is not assignable to type 'NSArray<ObjectType>'.
            Type 'NSObject' is not assignable to type 'ObjectType'.
              'NSObject' is assignable to the constraint of type 'ObjectType', but 'ObjectType' could be instantiated with a different subtype of constraint '{}'.
```

References:
https://github.com/Microsoft/TypeScript/issues/17575
https://stackoverflow.com/questions/52518125/workaround-for-accessing-class-type-arguments-in-static-method-in-typescript

* docs(platform-declarations): note a manual step on generating typings

* chore(platform-declarations): exclude ios-typings-prj from transpilation

* refactor(platform-declarations): delete references to MDC types

```
ios/objc-x86_64/objc!QuartzCore.d.ts:676:36 - error TS2304: Cannot find name 'MDCAnimationTimingFunction'.

676  static mdc_functionWithType(type: MDCAnimationTimingFunction): CAMediaTimingFunction;

ios/objc-x86_64/objc!UIKit.d.ts:7717:54 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7717  static mdc_preferredFontForMaterialTextStyle(style: MDCFontTextStyle): UIFont;

ios/objc-x86_64/objc!UIKit.d.ts:7719:53 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7719  static mdc_standardFontForMaterialTextStyle(style: MDCFontTextStyle): UIFont;

ios/objc-x86_64/objc!UIKit.d.ts:7771:63 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7771  mdc_fontSizedForMaterialTextStyleScaledForDynamicType(style: MDCFontTextStyle, scaled: boolean): UIFont;

ios/objc-x86_64/objc!UIKit.d.ts:7794:64 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7794  static mdc_preferredFontDescriptorForMaterialTextStyle(style: MDCFontTextStyle): UIFontDescriptor;

ios/objc-x86_64/objc!UIKit.d.ts:7796:63 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7796  static mdc_standardFontDescriptorForMaterialTextStyle(style: MDCFontTextStyle): UIFontDescriptor;
```
2019-09-19 22:18:08 +03:00
e6c7e0c1ac Merge remote-tracking branch 'origin' into merge-release-in-master 2019-09-18 01:08:56 +03:00
25046c7f94 chore: remove grunt and update build scripts (#7838)
* chore: prepare and pack scripts

* chore: update @types/node dep

* chore: remove prepare-dist command from pack-dist
2019-09-18 01:05:39 +03:00
a8680f0761 release: cut the 6.1.1 release (#7808)
* release: cut the 6.1.1 release
2019-09-11 15:58:59 +03:00
d772d21de0 chore: bump versino to 6.2.0 2019-08-23 18:06:47 +03:00
c0b8db4098 feat: flexbile font icon usage in tab navigation (#7672) 2019-08-15 17:32:48 +03:00
443d6b5dcb Merge remote-tracking branch 'origin/master' into tsenov/merge-release-in-master 2019-08-07 16:22:05 +03:00
6ffe23212b release: cut the 6.0.5 release (#7628) 2019-08-02 03:04:35 -07:00
2518655ab3 fix(tabs-android): tabStripItem color not applied (#7617) 2019-08-01 10:02:05 +03:00
7228f9e008 release: cut the 6.0.4 release (#7613)
* release: cut the 6.0.4 release
2019-07-30 14:54:34 +03:00
f94e4f3cbb release: cut the 6.0.3 release (#7603) 2019-07-29 15:52:07 +03:00
8e057c75b3 Merge branch 'master' into myankov/merge-release 2019-07-22 08:58:04 +03:00
46c17ca3a4 fix(bottom-navigation): crash when tab selected with no item (#7527) 2019-07-19 17:09:40 +03:00
abc143eeac Merge remote-tracking branch 'origin/master' into svetoslavtsenov/merge-release-in-master 2019-07-16 13:26:15 +03:00
12fdb82ffe chore: bump package veresions (#7525) 2019-07-16 11:38:34 +03:00
10801557d0 fix(bottom-navigation-android): tabStripItem backgroundColor (#7504) 2019-07-11 13:29:00 +03:00
20c6d71c70 refactor: move material typings to core modules (#7480) 2019-07-09 13:35:28 +03:00
fab9c90007 feat(bottom-navigation-android): add tabstripitem css support (#7458)
* wip: add background color placeholders for tabstripitem

* feat: add css for tabstripitem for bottom navigation android

* chore: update example

* fix: revert native default index

* clean up tabcontentitem

* update setTabBarItemTextTransform

* textTransform inherited css property now

* fix(android-bottom-navigation): fragment detach logic

* chore: fix tests

* fix(android-bottom-navigation): fragment lifecycle logic

* fix: revert text-transform inherited css property
2019-07-09 13:33:32 +03:00
250eb31c6e chore: bump to 6.1.0 (#7422) 2019-06-28 19:01:59 +03:00
ecd9fc3e9d feat: bundle workflow support (#7337) 2019-06-20 15:58:36 +03:00
5f9eabdf17 feat: update android typings to include @deprecated attributes (#7364)
* feat: added tslint rule for deprecation turned off
* feat: updated android dts files to include @deprecated
2019-06-17 18:56:34 +03:00
94629ce86c chore: move typing for material design in tns-platform-declarations (#7352) 2019-06-17 13:49:52 +03:00
0c2c1ccfde feat: re-design tab views (#7340) 2019-06-13 11:01:55 +03:00
c5db112b8d feat(android): androidX support (#7039)
* feat: migrate support library namespaces to androidX

* feat(tns-platform-declarations): update to androidX typings

* chore(tests): migrate test apps to AndroidX

* chore(tns-platform-declarations): update tsconfig to include androidx dts files

* update package.json to androidx

* chore(androidx): migrate forgotten support library namspaces

* feat(tns-core-modules-widgets): migrate to AndroidX namespaces

* chore(utils): update androidx namspace for getPaletteColor method

* chore(apps): update tns-platform-declarations package

* Update package.json
2019-06-10 09:21:41 +03:00
b88d4948fc Merge branch 'master' into mdonev/release-to-master20190606 2019-06-06 12:47:57 +03:00
6720139ec0 fix(platform-declarations-ios): Change 2^64-1 enum values to -1
`18446744073709551615` (`0xFFFFFFFFFFFFFFFF`) is an overflow to the JS
numerical system and therefore incorrect. Integer values from `-(2^53-1)` to `(2^53-1)`
only can be safely represented in JS (`Number​.MIN_SAFE_INTEGER` to
`Number​.MAX_SAFE_INTEGER`)

There's a fix in iOS Runtime's metadata generator which now automatically
converts such values to signed. (https://github.com/NativeScript/ios-runtime/pull/1151)

refs https://github.com/NativeScript/ios-runtime/issues/1150
2019-06-05 18:03:08 +03:00
4d6733d86e release: cut the 5.4.1 release (#7278)
* release: cut the 5.4.1 release

* chore: bump widgets version

* chore: refer widget 5.4.1
2019-05-23 04:48:07 -07:00
5b67d7bd38 chore: bump versions to 6.0.0 2019-05-12 02:13:08 +03:00
20a45a8025 chore: bump versions to 5.4.0 (#7053) 2019-03-21 19:15:04 +02:00
37d5569a3e chore: bump package versions to 5.3.0 (#6877) 2019-02-08 11:08:12 +02:00
8b4a9b3c6b feat: Provide API to release the native object wrapped by a JS one (#6873)
* Add `releaseNativeObject` function in `utils`
* Add tests
* Add typings for the global `__releaseNativeCounterpart` functions
provided by Android and iOS runtimes

refs https://github.com/NativeScript/ios-runtime/issues/1062 and https://github.com/NativeScript/android-runtime/issues/1254
2019-02-08 10:42:51 +02:00
3481e6f33f feat(image-cache): expose onError callback (#6458)
* feat(Cache): better error handling

* refactor(image-cache): add `error` parameter to `_onDownloadError`

Add DownloadError interface.

* refactor(image-cache): updates for iOS

Use arrow functions.
Remove an unnecessary `trace.write().

* refactor(image-cache): updates for Android

Update Android `constructor()`.
Move `key` and `image` check to `set()`.
Update `trace.write`.

* fix(image-cache): onError handling
2018-12-17 11:33:12 +02:00
ea44416734 Merge remote-tracking branch 'origin/master' into release 2018-12-14 14:53:53 +02:00
1c0218ea15 feat(tns-platform-declarations): Generate iOS typings from iOS 12.1 SDK (#6693)
* feat(tns-platform-declarations): Generate iOS typings from iOS 12.1 SDK

* Instructions for generating iOS typescript definitions
* Refactor `typings-gen.sh` to use {N} CLI and generate fuller
metadata for the system libraries
* Automatically generate `ios.d.ts` wrapper
* Add interop pointers and references as alternatives
to `string` for `char*` args
(implemented in https://github.com/NativeScript/ios-runtime/pull/1022)

BREAKING CHANGE: Several enum values have changed because
    they have been wrongly generated.

    To migrate your app or plugin code use the new names of the
    following:
    *  enum NSUnderlineStyle:
        - `StyleNone` -> `None`
        - `StyleSingle` -> `Single`
        - `StyleThick` -> `Thick`
        - `StyleDouble` -> `Double`
     * enum AVAudioSessionErrorCode:
        - `CodeNone` -> `None`
        - `CodeMediaServicesFailed` -> `MediaServicesFailed`
        - `CodeIsBusy` -> `IsBusy`
        - `CodeIncompatibleCategory` -> `IncompatibleCategory`
        - `CodeCannotInterruptOthers` -> `CannotInterruptOthers`
        - `CodeMissingEntitlement` -> `MissingEntitlement`
        - `CodeSiriIsRecording` -> `SiriIsRecording`
        - `CodeCannotStartPlaying` -> `CannotStartPlaying`
        - `CodeCannotStartRecording` -> `CannotStartRecording`
        - `CodeBadParam` -> `BadParam`
        - `CodeResourceNotAvailable` -> `ResourceNotAvailable`
        - `CodeUnspecified` -> `Unspecified`

* fix(ui/text-base): Update NSUnderlineStyle.StyleSingle constant

After the typings regeneration its and several others' names have
changed to the expected `NSUnderlineStyle.Single`.

* fix(tns-platform-declarations): Restore deprecated enum values

In order to not introduce a breaking change in a patch version, we
are keeping `Style...` and `Code...` values that have been wrongly
generated till now. In the next major/minor release of the package
when the typings are regenerated we can safely remove them.

Revert to using the deprecated one's in `text-base.ios.ts` so that
the introduction of this breaking change doesn't slip in undetected.

* fix(application.ios): Directly call presetnNativeScriptApp

We've been using `performSelectorWithObject` but it's
declaration has been manually added. Moreover it's more
convenient to directly call the method.
2018-12-13 17:04:13 +02:00
c084660d0b fix(android): nested fragment disappears on parent fragment removal (#6677) 2018-12-12 14:16:10 +02:00
7c92416858 chore: bump versions 2018-12-07 11:03:14 +02:00
ae0fa90290 feat(scrollbar): add isScrollEnabled property (#6640) 2018-11-30 17:18:40 +02:00
5c03abefba chore: update to TypeScript 3 (#6556) 2018-11-14 17:00:42 +00:00
96b439e3df chore: bump versions to 5.1.0 (#6422) 2018-10-17 14:30:38 +03:00
d24012b851 chore: bump versions to 5.0.0 (#6413) 2018-10-15 16:36:29 +03:00
7456a83f3c fix: CLAuthorizationStatus order and values (#6338)
Based on https://developer.apple.com/documentation/corelocation/clauthorizationstatus
2018-10-08 11:19:46 +03:00
1232d1edfd feat(tslib): add tslib helpers to global (#6351)
* feat(tslib): add tslib helpers to global

* Adds tslib as a dependency to tns-core-modules
* Replaces globals/decorators with globals/tslib
* Adds support for async/await, rest and spread operators.

* refactor: rename tslib to ts-helpers to avoid confusion with npm package
2018-10-05 17:12:45 +03:00
b9fc373eb8 feat: add platform declarations for Android API 28 (Android 9) (#6243)
* feat: add platform declarations for Android API 28 (Android 9)

* updates support file for Android 28 declarations
2018-09-07 15:36:31 +03:00
f54f71bc60 feat(iOS): update platform declarations
- add `objc-x86_64` architecture typings
- remove `objc-i386` architecture typings
- add `vector` typings
- change
```
(method) NSArray<ObjectType>.arrayWithArray<{}>(array: NSArray<{}>): NSArray<{}>
```
to
```
(method) NSArray<ObjectType>.arrayWithArray<string>(array: string[] | NSArray<string>): NSArray<string>
```

* Export typings on for iOS 11 x86_64

* fix: Export typings with fixed NSArray parameters

* Export typescript declarations for iOS 11.4

* Update reference path with the new typings folder

* feat: Create a script for auto typings generation

* Export typings on for iOS 11 x86_64

* fix: Export typings with fixed NSArray parameters

* Export typescript declarations for iOS 11.4

* Update reference path with the new typings folder

* feat: Create a script for auto typings generation

* chore: update .gitignore and .npmignore

* fix: Update constructor methods accepting NSArray parameters

* chore: Update manual changes flag for typings generation
2018-09-05 11:50:02 +03:00