1326 Commits

Author SHA1 Message Date
eca938d9de chore(apps): add tslib dep and update tsconfig.json file (#6464)
* fix: don't crash on startup due to tslib not being found

* fix: prevent error 'sourceMap' cannot be specified with option 'inlineSourceMap'

* Revert "fix: prevent error 'sourceMap' cannot be specified with option 'inlineSourceMap'"

This reverts commit c9d96de10ad9256aa7c42b1db55b5117443e2027.

* chore: updates tsconfig.json file
2018-11-01 15:44:10 +02:00
e48782511d fix-next: handle action bar safe area nesting (#6455) 2018-10-26 14:05:14 +03:00
e5f6065fd2 test(safe-area): add ui tests (#6418) 2018-10-17 13:29:38 +03:00
7867e7ce5b tests: set usesCleartextTraffic in apps to enable http calls in CI (#6417) 2018-10-16 09:22:16 +03:00
e3d5f0d409 fix(tab-view): Title and icon positioning (#6362)
* fix(tab-view): Title and icon positioning

* refactor: review FB addressed
2018-10-08 11:23:34 +03:00
ae6a661ecd feat: implement capitalization type option for prompt dialogs (#6325)
* feat: implement capitalization type option for prompt dialogs

Allow setting auto capitalization to "none", "all", "sentences" and "words".
This feature works on both Android and iOS.

* feat: add capitalization type examples to test page for dialogs
2018-10-05 17:15:54 +03:00
982acdc168 feat(iOS): Safe Area Support (#6230) 2018-09-28 18:21:50 +03:00
262568314b feat: add ability to pass touch event thru parent view (#6204)
* feat: enhance hit-testing support
* refactor(android): update passthroughParent logic as per reqs
* refactor: move isPassthroughParentEnabled to LayoutBase
* Update view-common.ts
* refactor: touchListener logic
* refactor: renames
* added ui test page
2018-09-18 18:59:40 +03:00
86be5b6472 chore: extend swipe-event test (#6278)
* chore: extend swipe-event test

* chore: remove automationText="output"
2018-09-18 15:12:07 +03:00
8a5f73055e fix(gestures)propagate touch to parent so that gestures can work (#6171)
* propagate gesture touch to parent so that gestures can work

* test: swipe passtrough test
2018-09-17 10:11:50 +03:00
a1c570c702 fix(ios): nowrap label measure in horizontal stack layout (#6186) 2018-08-17 18:24:06 +03:00
ec24c5a96f fix(list-view): Layout list-view items on request (#6159)
* test: list items relayout example

* fix(list-view): Layout list-view items on request

* refactor(tests): refactor list-view tests imports
2018-08-09 18:19:56 +03:00
9e2e8ec3a1 feat(list-picker): add textField, valueField and selectedValue properties (#6033)
* Added textField, valueField and selectedValue properties

textField and valueField - should be used with arrays of JSON objects
textField - tells the listview which property should be used to display each item
valueField - tells the listview, which property should be used to update the selectedValue
selectedValue - is the property that will contain the selectedValue, if valueField is specified, then it will contain the value from that field, otherwise it will contain the whole selected item

* Example showing textField, valueField and selectedValue in action

* Update import paths
2018-07-23 17:06:01 +03:00
bdf55d9552 test(): add scenarios for listview scrolling (#6092) 2018-07-20 11:25:32 +03:00
09431572e5 chore(listview-tests): add tests for width property with percentages (#6047) 2018-07-11 10:54:09 +03:00
b77675b312 chore: add example for issue 5274 (#5885) 2018-05-30 10:00:52 +03:00
d8721c7bd8 tests(ui-test-app): add LayoutChanged event test 2018-05-23 00:54:29 +03:00
9d21a743c4 Revert 5772 revert 5534 css gradients (#5779)
* Revert "Revert "Css gradients" (#5772)"

This reverts commit 7edf56197a179b13e1afe4c706aea4a99ac62aca.

* chore(): fix LinearGradient circular dependency
2018-05-10 10:44:35 +03:00
11f0d6e98d feat(tabview): add tab text font size property (#5752)
* feat(tabview): add tab text font size property

* chore(tabview): set tab font size default value

* chore(tabview): move font implementation to widget

* chore(tabview): fix font size get return type
2018-05-09 17:13:34 +03:00
481043fa2b fix: label text wrapping inside flexbox layout (#5781) 2018-05-08 15:09:52 +03:00
7edf56197a Revert "Css gradients" (#5772)
This reverts commit 5a83a1c858e8095353aa50fe4ea080b07bf85813.
2018-05-03 18:17:07 +03:00
5a83a1c858 Css gradients (#5534)
* feat(ios): Added support for css gradients.

* feat(android): Added support for css gradients.

* fix: Fixed gradient borders on ios

* fix(gradient): added backgroundGradient to View and Style.

* fix(ios-gradients): fixed ios gradients covering view content.

* test(gradient): Added ui app tests for background gradients.

* test(gradient): Added a test ensuring background gradient property is applied to style.

* style(gradient): Fixed tslint errors.

* fix(gradient): Removed the background-gradient property and added the gradient to background-image.

* style: fixed a consecutive blank line tslint error.

* fix(tests): fixed the bug that was causing tests to fail.

* chore(linear-gradient): fix equality comparer

* test(gradient): add linear gradients test app

* chore(tslint): update with latest tslint rules
2018-05-03 13:24:41 +03:00
03cfc0cee3 chore(tslint): update tslint rules and fix errors (#5747)
* chore(tslint): fix tslint config & errors
* chore(tslint): enable double quotes, whitespace, and arrow-return-shorthand rules and fix errors
2018-04-26 18:36:32 +03:00
b9806bad1c fix(list-view-ios): fix rowHeight property to apply proper item size for iOS (#5693)
* fix(list-view-ios): fix rowHeight property to apply proper item size for iOS

* chore(apps-tests): add rowHeight tests
2018-04-18 10:47:19 +03:00
3fcbbf4c12 test: include new test page for issue 5470 (#5666) 2018-04-12 14:59:37 +03:00
555e5920c3 fix(ios-searchbar): fix searchbar auto sizing in iOS11 (#5658) 2018-04-12 14:13:21 +03:00
c5fa922579 Tsenov/issue 3714 (#5610)
* test: added test case for issue 3714

* refactor: update remove grid layout element
2018-04-09 20:09:21 +03:00
52c044891e feat(ios-list-view): introduce iosEstimatedRowHeight property. (#5568)
* feat(ios-list-view): introduce iosEstimatedRowHeight property.

* chore(ui-tests-app): add test for auto measured ListView.
2018-03-22 14:03:54 +02:00
8141737f74 fix-next(tabview): visually pre-load tab items on android (#5495) 2018-03-08 14:39:59 +02:00
0138873ee3 feat(modal): introduce stretched param to showModal method (#5496)
* fix-next(ios-modal-view): force stretch alignment

* feat(modal): introduce stretched param to showModal method

* test(modal-view): add modal view stretched test
2018-03-07 18:17:52 +02:00
92148833d3 fix-next(tabview): fix tab title layout in modal root tabview Fixes #5392 (#5435)
BREAKING CHANGE: [Android] NativeScript no longer overwrites the horizontal/vertical alignment on the user-defined root visual element when opening it in modal dialog window (i.e. not fullscreen).

If your application logic relied on the previous behavior you need to manually set `horizontalAlignment="center"` and `verticalAlignment="middle"` on the root visual element you are showing modally.
2018-03-02 13:27:21 +02:00
a94ec9946f Improve ImageAsset scaling (#5110)
* Do not depend on current device screen while calculating Image Asset size.

* Scale the image asset to the exact requested size.

* Process image assets natively, pass keepAspectRatio based on the stretch property and Asset options.

* Fixed the splashscreen resource name as it cannot be read when containing a dot.

* Updated the Image Asset scale and rotate logic based on the Native one.

* Make the ImageAsset size more important than the Image decode size as its more specific.

* Fixed tslint errors.

* Added filePath support in the ImageAsset constructor for iOS in order to unify it with the Android implementation, support for relative files and file not found support errors.

* Added unit tests for ImageAssets.

* Added a sample app for UI testing of image-view with ImageAsset src.

* chore: apply PR comments
2018-02-28 14:04:01 +02:00
949a99ec35 Extend console tests for iOS (#5459) 2018-02-26 16:41:44 +02:00
b8e0beccdd fix(ios-layouts): switch contentInsetAdjustmentBehavior on ScrollView (#5411)
* fix(layouts): switch contentInsetAdjustmentBehavior on ScrollView

* chore(ui-tests-app): add test for ScrollView as a root Page element
2018-02-15 09:27:16 +02:00
e1eea8efe7 test(e2e): add modal-navigation app (#5393)
* chore(apps): add modal-navigation-app for ui testing

* test(e2e): add modal-navigation app

* test(apps): remove modal-navigation-app

The app has been moved to `e2e/modal-navigation`.

* chore: include e2e folder to npm scripts

* docs: include e2e folder to DevelopmentWorkflow.md

* chore(e2e): update .gitignore

* fix(e2e): relative paths

* chore(e2e): update package.json

* test(e2e): add change root view to modal-navigation

* test(e2e): set androidTabsPosition to botton

* chore(e2e): add VSCode launch.json config

* docs(e2e): delete LICENSE and README.md files

* refactor(e2e): rename modal-tab-page to modal-tab-root

* test(e2e): update iOS launch screen
2018-02-14 16:51:51 +02:00
b113b0021a feat: Add methods to get the root view and set a different root view at run time (#5386)
* feat: add option to set a different root view at run time

* feat: expose application getRootView method

* refactor: Introduce ViewEntry interface

* fix: Respect root view rturned from launch event in Android

* refactor: getRootView() code + caching root view per activity.

* refactor: add app-root.xml in apps

* refactor: http test made async
2018-02-09 16:04:20 +02:00
f8dce08f0e feat(tab-view-android): enable tabs repositioning (#5385)
* feat(tab-view-android): enable tabs repositioning

* feat(tab-view-android): enable tabs repositioning

* chore(apps): add bottom tab view example
2018-02-08 11:06:07 +02:00
0b1c36192d refactor(console): remove the console module (#5338)
* refactor(console): remove the console module

Removing the console module implementation eliminates some error-prone
formatting logic, and certain platform-specific checks. The
implementation was also android-specific. Left a stub Console class
implementation as one is necessary to avoid errors with `console` being
undefined during the snapshot stage for android.

The console module is replaced by a 'console' implementation in the Android Runtime. See
android-runtime/PR #884

* fix(tests): update console module tests
2018-02-04 23:29:58 +02:00
e69af8dda9 update(launch screen): Add iPhone X launch screens (#5163) 2018-01-29 13:58:14 +02:00
a0378e8b74 Update package.json 2018-01-19 17:26:01 +02:00
8d59cc4de6 fix: cleanup modaltest paths (#5300) 2018-01-19 16:21:09 +02:00
3114a9d7b1 migrated JS files toTS 2018-01-18 14:02:36 +02:00
016c64fe04 showModal & closeModal can be called on any View
fix livesync implementation to be compatible with 3.4 and to replace mainEntry for 4.0 when root is not Frame
some refactoring of page.ios in order to allow showing multiple modal dialogs
2018-01-18 13:34:25 +02:00
a35e603d85 Fix to always get the same bounds no matter if we are shown modally or not (for iOS).
Remove code that moves actionBar when there is incoming call. We now depend on the autolayout to position us correctly.
_addView, _removeView won't request layout for iOS.
LayoutBase: addChild & remvoeChild will request layout.
ContentView: content change will request layout.
2017-12-15 13:06:34 +02:00
af034089ca iOS Frame, Page and TabView measure/layout methods removed. We now rely on the framework positioning. This will result in a change that width, height, minWidth, minHeight, margins not respected on these controls
iOS layout positioning now respects native properties like automaticallyAdjustsScrollViewInsets, edgesForExtendedLayout, extendedLayoutIncludesOpaqueBars, navigationBar.translucent, tabBar.translucent
Removed frame-tests.ios.ts - those tests are now invalid
Added new layout tests inside page-tests.ios.ts
Commented few asserts in scroll-view-tests
View now expose ios namespace with layoutView method and UILayoutViewController used by page, tab-view and application module
ViewBase now expose viewController property that should be set from all widgets that are using viewcontrollers internally (like Page, Frame, TabView)
ViewBase now sets ios property to either the view returned from createNativeView or to nativeViewProptected
fragment.transitions now use animation/transition start to add fragments to waitingQueue. Before we did it manually in navigate/goBack. This way we can reuse the fragment.transition when calling showDialog. Also when animation/transition ends we check the animation/transition to see if this fragment should be set as current.
Frame expose new loadViewFromEntry method (to load a view from URI)
Frame navigation happens once frame is loaded
Frame now supports Page as a child in XML
Fixed GridLayout row, rowSpan, column, columnSpan properties type
Fixed bug in GridLayout where add/remove of columns/rows won't update the internal state of the grid (backport from android when GridLayout is recycled)
ListView will no longer invalidate layout when cell is removed
Fixed bug in ScrollView ios where effectiveMinWidth/Height was multiplied to density (it is already on device pixels so no need to multiply)
TabView android now calls loaded only on the selected child (not all)
Core refactoring
2017-12-15 13:06:34 +02:00
7bc0daf222 Revert package.json start up entry
Fixed bug where goBack took the last element in backstack while navigationQueue is not empty.
Fixed bug where goBack to specific entry in the backstack was removing that entry...
Removed duplicated method
Refactored method name
Fixed TS
2017-12-15 13:06:34 +02:00
8026e46a72 Removed native popToBackstack call.
Implemented custom fragment save/restore state.
When navigating back we reverse manually transitions/animations because we no longer add them to navite backstack.
Fragment instance stored on entry.
Animation and Transition listeners now holds reference to entry instead of fragment for easier update of fragment.
Animation and Transition listeners removed when entry removed from backstack.
Animation and Transition removed from fragment when fragment activity is destroyed.
2017-12-15 13:06:34 +02:00
4d23e3777d fix: Navigation test app added 2017-12-15 13:06:34 +02:00
8973a6febd Revert "feat(animation): support animating width/height properties (WIP) (#4917)" (#5136)
This reverts commit 57ed0cf405be44e31358ff17f372b5d926e63639.
2017-12-07 12:11:24 +02:00
57ed0cf405 feat(animation): support animating width/height properties (WIP) (#4917)
* feat(animation): support animating width/height properties

 - width/height can be specified in any valid PercentLength form that can be parsed.
 - make width/height properties be based on animatable CSS property. TODO: affectsLayout????
 - add a few basic tests. Could probably use a few more?
 - fix a few null pointer exceptions in PercentLength helpers

* test(ui): add animation examples to ui-tests-app

 - basic height animation
 - height animation in StackLayout
 - fix an issue where strings were not automatically converted to PercentLength when calling directly into `View.animate`

* test(ui): cleanup and add summary/details layout example

 - use height transition to cover textview content.
 - when clicking on the summary view, animate the summary height up to a small header and show the text view.
 - fake animating the height on the textview by very subtly animating its translateY value while shrinking the header height. This tricks your mind into think that the text view is also vertically growing, even thought it's just slightly moving up along the Y axis.

* test(ui): add animation curves test page

 - verify all built-in animation curve types work as expected.

* test(ui): update animation curve example for multiple properties

 - add a segmented bar that allows choosing which properties to animate using the various curves.
 - interestingly, a whole bunch of properties fail with spring on iOS.
 - refactor width/height animations handlers to remove duplication on iOS.
 - implement proper spring animation for width/height on iOS.

* test(ui): add stress example with 100 labels animating and fps meter

 - same curve/property selector as the curves example, but with 10x10 grid of items that stagger animate, and an FPS meter.
 - sadly it looks like width/height animations are considerably slower than the others when you have a bunch of them. I'm not sure that's entirely surprising since they interact with the layout system.
 - the better news is that even with the army example, my really old android 4 tablet manages ~30fps. On height/width animations from the curves example, the old tablet does fine with no noticeable FPS hit.

* refactor: deduplicate existing droid width/height animations

 - stash to prep for replacing with LayoutTransition.

* test(animation): unit tests for extent animation and PercentLength parse

 - update animation scaffold to allow specifying the parent stack layout height/width
 - test basic supported units, px, %
 - test basic percent length parser behaviors

* chore: cleanup cruft and remove noise from diff

 - undo the import mangling that WebStorm helpfully applied
 - remove .editorconfig file
 - clean up in tests, remove cruft

* chore: cleanup from review

 - more import changes

* chore: remove .editorconfig
2017-12-05 13:55:54 +02:00