27 Commits

Author SHA1 Message Date
f8eee40e69 feat(android): add openFile to utils (#6895)
* feat(android): add openFile to utils

* tests: move test_openFile() test to apps/ui-tests-app

Small changes to openFile() method
2019-03-05 11:39:13 +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
05c2460fc4 feat: Pass NS app to the native app instead of presenting it over the root VC (#5967)
* feat: Pass NS app native controller to the native app instead of presenting it over the rootViewController

When NativeScript embedded app is created from the native one we check for whether the topmost UIViewController has NativeScriptEmbedder protocol (implemented in the iOS Runtime) method 'presentNativeScriptApp:'. If yes, we call it with the NS app viewcontroller as a parameter so the embedder has control over the NS app (where and how to present it etc.) For backwards compatibility we present the NS app on top of the topmost UIViewController as a fallback.

* style: Fix lint errors

* feat: Check for protocol instead of selector in embedding

I

* Check for rootController instead of topViewController to prevent crash if !rootController

* feat: Introduce NativeScriptEmbedder singleton

NativeScriptEmbedder is responsive for communication between the NS and the native iOS app. His delegate will implement methods which we can call from javascript such as "presentNativeScriptApp:".
2018-06-27 16:48:11 +03:00
43fbabb5e9 Fixed most module cyclic references. There is one left for ios and android: (#4978)
- http -> http-request -> image-source
that can't be fixed easily and will be removed once we delete image-source module because it is obsolete anyway.
There is one more for android:
- frame -> fragment that could be removed if we use global object.
Updated madge bersion
2017-11-10 15:47:02 +02:00
d62df3789c Do not change the Android layer types (hardware/software) (#4625) 2017-08-25 10:45:58 +03:00
7b364613da fix: typo on android utils, getPalleteColor to getPaletteColor (#4687)
* fix: typo on android, getPalleteColor to getPaletteColor

* fix: adress comments
2017-08-24 11:55:31 +03:00
6e06eba218 Fixed a bunch of typo's and minor errors in TypeScript definition files. (#4707)
* Fix a bunch of typo's and minor errors in TypeScript definition files.

* Implemented the requested change by @hshristov
2017-08-21 11:22:04 +03:00
9bba250424 Refactor transform animations (#4296)
* feat: add matrix module

* fix(animations): parse transform property correctly

* fix(css-animations): compute transformation value with matrix

* refactor: add typings for keyframes array in style scope

* fix(animations): transform regex and method invocation

* fix(matrix): rewrite decomposition function

* refactor: transform animations parse

* test: add tests for css animation transform

* refactor: move transformConverter to style-properties

* lint: remove unnecessary comma

* lint: remove unnecessary word in d.ts

* fix(style-properties): correctly use transformConverter

* fix(matrix): flat multiply affine 2d matrices

cc @PanayotCankov
2017-06-09 18:20:07 +03:00
e26032f5fe Revert the translateX/Y to be in dip 2017-04-25 14:49:12 +03:00
9e3222781a backgroundImage property now use Fetcher & Cache as Image component (#4030)
* backgroundImage property now use Fetcher & Cache as Image component
Fix GridLayout tests on iPhone Plus - actualLength wasn’t rounded
ImageCache is closed when activity is stopped

* Fix reset of background drawable.

* additional check for drawable

* imageCache init cache on activity Started
2017-04-21 16:50:12 +03:00
d098ff43f5 Add module names for the typedoc, make it work
Mark members with @private for typedoc.
2017-04-20 16:58:30 +03:00
81aa5d2795 Remove getColor form utils.d.ts 2017-04-12 17:25:54 +03:00
fe54ac6ead Layout round instead of ceiling (#3833)
* Layout round instead of cailing
Add helper method to layout module to convert to/from dips to px and measure the native view
whiteSpace affects layout added for iOS
Fix bug in switch onMeasure implementation
Fix bug in cssValueToDevicePixels iOS implementation
ActionBar for iOS is measured with AT_MOST modifier

* Fix switch measure routine
2017-03-20 16:11:16 +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
b4e742b00f Android keyboard fixes 2017-03-09 14:51:31 +02:00
b45cbe929b No more ambient modules for tns-core-modules/* subpackages.
- Use path mappings in tsconfig.json to resolve module typings
- Only use ambient mobules for global API's
- Move single-file modules to a subdir with the same name so that
we can provide a hand-written typing next to it (via package.json)
- Delete all mentions of tns-core-modules.d.ts
- Delete reference d.ts assembly build steps. Not needed anymore.
- HACK! Use a <reference> for global typings in application.d.ts
to avoid publishing a separate @types/tns-core-modules package.
- Rename declarations.d.ts to tns-core-modules.d.ts to preserve
JS project mappings in references.d.ts (the only place we use those)
2017-03-07 17:59:02 +02:00
ea22eb9c20 refactoring circular imports 2017-03-06 14:05:55 +02:00
a582adc561 Hhristov/fix (#3653)
* Fix action-bar systemIcon
Fix CSS applying

* refactoring

* fix console

* remove StyleScope import - it is private and cannot be imported in public .d.ts
2017-02-17 17:21:57 +02:00
6feeb140e3 Fixing type errors in tests 2016-12-19 10:36:25 +02:00
93d4fa5d57 Total TextBase refactoring + several bug fixes. 2016-12-16 14:54:00 +02:00
9fc143ee03 Add support for TabView CSS
TabView {
    tab-text-color: green;
    tab-background-color: yellow;
    selected-tab-text-color: red;
    android-selected-tab-highlight-color: orange;
    text-transform: uppercase;
}
2016-10-24 15:07:22 +03:00
791aab04e5 Flexbox ios initial commit
Items now appear, but they should initially shrink and they don't

Add 15-ish tests for flexbox layout

Port reasonable flexbox test set

Fixing issues, adding unit tests

Moved from .tsx to .ts and used our ui/builder.parse
2016-10-19 17:02:26 +03:00
e895f37f0b Apply getter check to determine if API is exposed as property or as method for iOS backward compatibility 2016-09-12 14:38:54 +03:00
15d891cc08 Refactor application of text decoration, text transform, letter spacing and formatted text.
Related to #2427
2016-07-28 10:33:33 +03:00
9ac40a5acb Fixed sorting issue with Css Selectors with same specificity. 2016-06-17 13:34:15 +03:00
0a8d211665 Enable hardware acceleration for views animations in Android
Resolves #2217
2016-05-31 16:46:19 +03:00
e135c20b14 Rename the files 2016-05-26 14:30:25 +03:00