56 Commits

Author SHA1 Message Date
173665a620 refactor: address a comment 2019-10-03 15:06:22 +03:00
3de233887a feat(dark-mode): text-view colors 2019-10-03 15:06:22 +03:00
dfcbe6c319 style: formatting and whitespaces (#7840) 2019-09-19 15:40:31 +03:00
4f39fb728b chore: update tslint rules (#7391) 2019-06-26 15:13:48 +03:00
ecd9fc3e9d feat: bundle workflow support (#7337) 2019-06-20 15:58:36 +03:00
37b53c6030 fix(text): crash when removing FormattedText (#7237)
* fix(text): crash when removing FormattedText

* refactor: fixed crash on ios too
2019-05-13 17:03:46 +03:00
0416f7e80e fix(ios-textview): text alignment reset to default on blur (#6903) 2019-02-14 15:00:04 +02:00
9f8d24a811 Prevent app crash for css text-transform (#6815)
* Prevent app crash for css text-transform

* refactor: formatting

* refactor: formatting

* minor refactoring

* fix: use isString - text is sometimes String

* fix: use isString - text is sometimes String
2019-02-07 10:59: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
46705ee332 refactor(core-modules): implement createNativeView and initNativeView for all components
refactor(core-modules): implement createNativeView and initNativeView for all components
2018-09-26 13:59:12 +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
7cd8e7ef54 fix(text): Allow -1 to be a valid binding value for text views (#5563)
* fix(android/text ios/text): allow -1 to be a valid binding value

Instead of using -1 as special value, use Symbol(-1)
so that it can't be reset accidentally

Closes issue #5559

* renamed the symbol
2018-03-21 11:37:30 +01:00
75bd1d2c49 fix(uilabel): line height setter should not break line break mode (#5544)
fix(uilabel): line height setter should not break line break mode
2018-03-15 16:21:03 +02:00
d3a6a3f782 Line-height property breaks text alignment (iOS) (#4909) 2017-10-20 08:35:11 +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
43659799bc Implement non uniform border corner radiuses and fix blinking image-view radiuses (#4573)
* Image corners were blinking in #4322 and CSS border will now draw non uniform corner radiuses if the border color is uniform

* Implement per-side corner radiuses for iOS

* Update stretch-mode example

* Update matrix-mode example

* Update image resources

* Add clipping for non uniform radii without border width, don't throw for missing image resources in css
2017-07-27 15:36:47 +03:00
74f26f4498 Add CSS support for line-height (#4534)
* Add CSS support for line-height (issue #1664)

* Implemented @vakrilov's feedback

* Implemented @vakrilov's feedback (changed Android default impl)
2017-07-13 15:00:18 +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
f350f7191d textTransform, whiteSpace & textAlignment defaultValue is now “initia” (#3948)
removed enum namespaces
add valueConverter to clipToBounds
2017-04-06 09:50:37 +03:00
7a1f1b2b80 Merge pull request #3891 from NativeScript/tab-view-text-transform
Initial value for text transform
2017-03-31 09:57:56 +03:00
be85af4a0d Text transform - no default value 2017-03-30 18:35:55 +03:00
29e07dd027 Hhristov/fix tab view selected index (#3893)
* fix button ios color property when textDecoration is applied

* Button ios color set on titleLabel

* Coerce tabView selectedIndex after native items are set
2017-03-29 16:39:54 +03:00
2b28730011 Split get/set native to getDefault setNative 2017-03-22 16:37:52 +02:00
01368d4bb5 FontAwesome will now work in iOS buttons, being bold will fallback to Helvetica 2017-03-15 17:03:37 +02:00
a64bba62aa whiteSpace default value change to undefined (#3782)
TKUnit default message change to empty string
isSet method is now instance method of Property classes
fix detaching from parent bindingContext - were using oldParent.parent instead of parent
editable-text-base.android - onTextChanged implementation commented. Does nothing.
frame - onCreateView wrapped in try/catch and shows label with exception message if any
text-base.android - should support reset of nativeView. TransformationMethod won’t be set if TextField is secure
Change some types to their string couterparts
TextField.android won’t support multilines anymore in order to work as iOS
In android when page is removed from native backstack we won’t call tearDownUI again a second time
2017-03-14 10:26:45 +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
ea22eb9c20 refactoring circular imports 2017-03-06 14:05:55 +02:00
a2e09d5db0 Fix text view decorations, setting underline to none was not applied, setting decoration and text immediately was not applying the decoration 2017-03-01 11:50:35 +02:00
709dff0258 fix horizontal text-align for Button in iOS, use horizontalContentAlign of the native button 2017-02-21 16:01:53 +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
f539dd5f95 Improve background setter in iOS (#3582)
CoercableProperty now inherits from Property
VS Code typescript sdk removed
ViewBase will no longer clear native view if recycleNativeView is false
2017-02-06 11:49:54 +02:00
3770f7e636 formatted text fix (#3531)
* Fix formattedText implementation for iOS
Fix typeof undefined checks
Add slow tests message
Improve tests speed

* fix tslint
reduce transitions duration in test

* waitUntilReady will throw if timeout
fix tests that needs to wait without throwing
improve test speed
2017-01-26 18:21:30 +02:00
e34b0f622c fix span (#3510)
* Remove Bindable.
Fix Observable & ObservableArray tests
Fix formattedString text
Change implementation of Span, FormattedString & TextBase
properties valueChange called before native setter

* revetred formattedString tests asserts - formattedText update text property again
properties - when getting value we now use always property name instead of key (using key could return undefined for property that is set to its default value)
updated fontSize & fontInternal properties on all controls
fix font properties so that fontInternal is reset if the new font is the same as Font.default

* fix tslint errors
2017-01-20 16:42:20 +02:00
cd7877dfa0 Text field tests fixed. 2017-01-13 11:41:12 +02:00
cc337094e9 Fix text & fromattedText failing tests 2017-01-12 14:12:41 +02:00
45ac38d968 Refactor formatted text 2017-01-11 16:37:23 +02:00
309ea148e1 Fix setting text property to number. (#3449)
Fix setting JS property from native.
2017-01-09 18:13:31 +02:00
14e1da5820 Style-properties tests 2017-01-09 17:24:38 +02:00
becf428e90 Fix most of the label tests 2016-12-28 17:33:38 +02:00
228b914162 Remove redundant console.log 2016-12-27 15:29:43 +02:00
d00be55def Remove wrong type check 2016-12-27 15:27:28 +02:00
eba5534197 Make some Button tests pass for iOS 2016-12-27 14:54:30 +02:00
c66e3e8ab5 Fix tslint errors 2016-12-27 13:20:59 +02:00
7931ecd4f8 Fix tslint errors 2016-12-21 17:42:31 +02:00
93d4fa5d57 Total TextBase refactoring + several bug fixes. 2016-12-16 14:54:00 +02:00
51e448aa10 Fixed: getViewById, TextDecoration 2016-12-15 13:20:25 +02:00
19ee47ba24 got to layouts 2016-12-13 15:51:18 +02:00
1202cb7288 almost all without layouts 2016-12-13 15:51:18 +02:00
94dee2973a . 2016-12-13 15:51:18 +02:00
d795ee94e4 alpha2 2016-12-13 15:51:18 +02:00