50 Commits

Author SHA1 Message Date
b069ff38f3 fix(iOS): check for iOS 13 APIs (#8093) 2019-11-18 13:39:00 +02: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
f82cf08f95 feat(ios-dark-mode): adapt dynamic system colors (#7826) 2019-10-04 10:58:54 +03:00
dfcbe6c319 style: formatting and whitespaces (#7840) 2019-09-19 15:40:31 +03:00
3adba6826b feat: add CSS classes to app/modal root views to target platform/device/orientation/type (#7606) 2019-08-19 14:09:44 +03:00
4f39fb728b chore: update tslint rules (#7391) 2019-06-26 15:13:48 +03:00
b20e771552 chore: remove deprecated apis for ns 6.0 (#7382) 2019-06-25 16:52:01 +03:00
ecd9fc3e9d feat: bundle workflow support (#7337) 2019-06-20 15:58:36 +03:00
540b2b4f82 feat(view): added iOS parameter for modal presentation style (#6409)
* feat(view): added iOS parameter for modal presentation style

* Now passing options to showModal in one argument

* refactor: Move context and close in modal options

* chore: Comments added for UIModalPresentationStyle.Popover case

* refactor: Use modalOptions in e2e demo

* chore: fix pbroken test
2018-12-13 17:03:25 +02:00
64bccb9bbc feat(modals): Enable modal dialog chaining in IOS (#6637)
* feat(modals): fire close callback after close in IOS

* chore(tests): Fix some test depending on the order of events
2018-11-30 12:05:33 +02:00
a211bbdbdc test(safe-area): fix ios 12 landscape tests (#6434) 2018-10-19 18:48:20 +03:00
982acdc168 feat(iOS): Safe Area Support (#6230) 2018-09-28 18:21:50 +03:00
1365f13594 fix(modal): innerView.closeModal(...) not passing back context (#5833) 2018-05-18 16:50:27 +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
451589dbd6 fix(modal): exception when calling ViewBase.showModal(...) (#5737) 2018-04-26 00:19:44 +03:00
2704915384 fix(frame): add generic frame cleanup logic after modal dialog close (#5479) 2018-03-01 10:37:26 +02:00
4898c33a04 fix-next(modal) fix crash when closing modal dialog with root tabview inside (#5446) 2018-02-23 16:46:49 +02:00
2edef3de3b fix(frame): root tabview with modal frame when suspend/resume app (#5408) 2018-02-12 16:09:51 +02:00
85dc75e09a fix-next: navigation events' workflow in modal dialog scenarios (#5341) 2018-02-06 19:18:28 +02:00
058a216ac9 Move styleScope from Page to View
Fix image-source test for API 27
setupAsRootView now makes the component styleScope
set css, addCss & addCssFile makes view to be styleScopeHost which cannot be overriden later from parent
Android modals now call setupAsRootView
Small fixes on ios layouts
launch event fired in andriod too
Moved some requestLayout calls to ios files where they belongs
2017-12-19 16:35:15 +02:00
ac04ede97e Implemented showModal on View 2017-12-15 13:08:15 +02:00
5d7d70be2a Fix android unit-test 2017-12-15 13:06:34 +02:00
199d83c902 Generated platforms declarations for iOS 11
Fixed broken unit-tests
ios layout now run only for the innermost viewcontoller
ios layout for viewcontrollers now implemented with constraints
Added ios11 safeAreas layout support
onMeasure back for frame and tab-view so that they won't throw exception if measure is called on them
Page parents layout updated after page is layout so that inner layout flags are correct
2017-12-15 13:06:34 +02:00
38d026a3df Fix tslint
Revert code that set currentEntry in fragment.transitions.android
Update tests & apps runtime version
Fix broken import in frame-tests
Revert TabView to fire loaded for all TabViewItems
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
ea9213b243 edit broken page snippet tag (#4776)
* edit broken page snippet tag

* Increase timeout for HTTP tests (#4775)

* Typos (#4789)

* TypeScript 2.5 compatibility (#4794)

* edit broken page snippet tag

* fix(date-picker): Date picker changed check (#4797)

* edit broken page snippet tag
2017-09-05 18:23:46 +03:00
03a0ac75b1 Include assert to test_NavigateToNewPage_WithAndroidCache for reuse native views on forward navigation (#4764) 2017-08-28 17:16:41 +03:00
075e70e336 cache page on forward navigation (#4652)
* cache page on forward navigation
Still some failing navigation tests

* Current page is kept alive when navigating forward
Refactoring code and removing all hacks and flags
Remove one module circular reference

* Disable Page recycling because when there is transition between pages the nativeView stays animated (e.g. when transition is Fade the hidden page nativeView stays with Alpha 0)
Disable recycling if there is native anitmation

* Fix failing tests on ios & android API17
Fix wrong urls in http tests
Made some timer tests async

* Animations are not stored in BackstackEntry instead of Fragment because fragments could die (activity die) and recreated and we lose animations.

* Fix android crash when activity is recreated.
Refactoring transitionListener.
2017-08-07 17:24:12 +03:00
0f14101238 recycling now happens only if nativeView and android properties are not accessed. (#4627)
recycleNativeView filed now accepts: "always" | "never" | "auto". Always will recycle the nativeView no matter if its nativeView or android proprties are accessed. Never will disable recycling. Auto will recycle it only if nativeView and android properties are not accessed.
2017-08-01 15:04:16 +03:00
23757e5dfc Enable recycling of nativeView 2 (#4467)
* enable recycling of nativeView

* backgroundInternal is reset if setting new value leads to background.isEmpty() == true.

* android background.getDefault always return copy of the background. Now all controls that mutate the background can be reset to initial state (e.g. Button & ActionBar)
passing resources to copied background so it respect density.
fix properties initNativeView

* reset padding when backgroundInternal is reset.

* Fix text reset
Fix padding reset

* fix tsc errors

* fix ugly text rendering.

* Add unit tests for recycling native views
Fix several issues that came from the above tests
Fix maxLength property missing a converter callback
Remove old files

* Remove old files

* Revert backgroundInternal setter

* change the order of tests so that appium can work again

* Remove suggestion on every TextView & TextField init (strangely it is enabled after view is recycled....)

* Fix function to get parent layout if specified

* Button stateListAnimator restored when button is recycled
zIndex defaultValue is now undefined instead of NaN

* revert zIndex.setNative to always clear stateListAnimator because it was breaking one UI test (setting value=0 was returning the previous stateListAnimator)

* fix search-bar backgound-color recycling

* Fix alignments setters

* Fix imageView recycling
Fix button recycling
Fix edit-text recycling
resetNativeView is called only if recycleNativeView flag is true

* Fix incorrect merge

* Fix text-view & text-field textTransform

* Fix EditText text reset

* Fix runtime crash on ARM emulator API 21

* Fix text-base minHeight. maxHeight reset
Fix reset of isUserInteractionEnabled
2017-06-29 18:01:22 +03:00
9f0f3b1a5d Remove imports from some d.ts unit-tests 2017-03-29 17:23:50 +03:00
f2898f84d5 NativeView recycled for android 2017-03-28 18:08:59 +03:00
7b5ef052fd Tests moved into separate folders (#3794)
Fix android crash on application exit
2017-03-15 12:26:54 +02:00
629eb6e683 Use relative imports in tns-core-modules.
Use tns-core-modules/* imports in outside code (apps, tests, etc)
2017-03-13 14:37:59 +02:00
b2cf286948 Fixed text decoration tests, Color will now store just a single argb info in 32bit unsigned int internally and covert to a/r/g/b or hex when necessary 2017-02-17 14:45:31 +02:00
329ba3a2c5 Page tests fix. 2017-01-16 19:28:08 +02:00
7931ecd4f8 Fix tslint errors 2016-12-21 17:42:31 +02:00
e90e2de927 Revert tests for Length where NaN or number was used 2016-12-19 15:53:44 +02:00
6feeb140e3 Fixing type errors in tests 2016-12-19 10:36:25 +02:00
c3ec836d31 Fixed Percent margin test on IOS 2016-10-31 16:21:09 +02:00
75cab33f8f Percent support of margin of layouts/frame/page/contentview 2016-10-20 11:29:21 +03:00
39050861f3 Add NavigationEntry.bindingContext property
Resolves Issue  #731
2016-07-19 12:06:29 +03:00
36ae896933 Fix: Set the binding context of a page automatically when navigated to.
Resolves #731
2016-07-18 13:40:13 +03:00
09db46da0c Remove unicode nonbreaking whitespace in snippet declarations.
It was breaking the snippet extraction regexes.
2016-07-06 16:55:39 +03:00
846bafc660 Change snippet syntax to the new Jekyll tag. 2016-07-06 16:09:11 +03:00
4147e47948 Make cookbook articles appear in nativescript env only. 2016-06-20 14:32:12 +03:00
d2fbaa3307 Fix failing test 2016-05-31 13:39:04 +03:00
9a8542869e Add fragmentForPage method to AndroidFrame interface. 2016-05-30 16:10:46 +03:00
719ce1e33e Fixed test_NavigateToNewPage_WithAndroidCache failure on Android API level 17
Unit tests re-factoring and improvements
2016-05-27 13:07:49 +03:00
e135c20b14 Rename the files 2016-05-26 14:30:25 +03:00