mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-20 07:26:11 +08:00
Merge branch 'master' of github.com:NativeScript/NativeScript
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
## [7.0.5](https://github.com/NativeScript/NativeScript/compare/7.0.4-core...7.0.5) (2020-09-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **core:** bundle entry points and global handling ([#8884](https://github.com/NativeScript/NativeScript/issues/8884)) ([1f790ed](https://github.com/NativeScript/NativeScript/commit/1f790edc8032fd36bde4b7a24e4d1c1c4b4dea49))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [7.0.4](https://github.com/NativeScript/NativeScript/compare/7.0.3-types-ios...7.0.4) (2020-09-23)
|
## [7.0.4](https://github.com/NativeScript/NativeScript/compare/7.0.3-types-ios...7.0.4) (2020-09-23)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nativescript",
|
"name": "nativescript",
|
||||||
"version": "7.0.4",
|
"version": "7.0.5",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"config": {
|
"config": {
|
||||||
"npm_alias": "npm"
|
"npm_alias": "npm"
|
||||||
|
@ -360,4 +360,4 @@ export function initGlobal() {
|
|||||||
}
|
}
|
||||||
if (!global.NativeScriptHasInitGlobal) {
|
if (!global.NativeScriptHasInitGlobal) {
|
||||||
initGlobal();
|
initGlobal();
|
||||||
}
|
}
|
@ -3,7 +3,7 @@
|
|||||||
"main": "index",
|
"main": "index",
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"description": "NativeScript Core Modules",
|
"description": "NativeScript Core Modules",
|
||||||
"version": "7.0.4",
|
"version": "7.0.5",
|
||||||
"homepage": "https://nativescript.org",
|
"homepage": "https://nativescript.org",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -26,6 +26,26 @@ export abstract class TextBaseCommon extends View implements TextBaseDefinition
|
|||||||
public text: string;
|
public text: string;
|
||||||
public formattedText: FormattedString;
|
public formattedText: FormattedString;
|
||||||
|
|
||||||
|
/***
|
||||||
|
* In the NativeScript Core; by default the nativeTextViewProtected points to the same value as nativeViewProtected.
|
||||||
|
* At this point no internal NS components need this indirection functionality.
|
||||||
|
* This indirection is used to allow support usage by third party components so they don't have to duplicate functionality.
|
||||||
|
*
|
||||||
|
* A third party component can just override the `nativeTextViewProtected` getter and return a different internal view and that view would be
|
||||||
|
* what all TextView/TextInput class features would be applied to.
|
||||||
|
*
|
||||||
|
* A example is the Android MaterialDesign TextInput class, it has a wrapper view of a TextInputLayout
|
||||||
|
* https://developer.android.com/reference/com/google/android/material/textfield/TextInputLayout
|
||||||
|
* which wraps the actual TextInput. This wrapper layout (TextInputLayout) must be assigned to the nativeViewProtected as the entire
|
||||||
|
* NS Core uses nativeViewProtected for everything related to layout, so that it can be measured, added to the parent view as a child, ect.
|
||||||
|
*
|
||||||
|
* However, its internal view would be the actual TextView/TextInput and to allow that sub-view to have the normal TextView/TextInput
|
||||||
|
* class features, which we expose and to allow them to work on it, the internal TextView/TextInput is what the needs to have the class values applied to it.
|
||||||
|
*
|
||||||
|
* So all code that works on what is expected to be a TextView/TextInput should use `nativeTextViewProtected` so that any third party
|
||||||
|
* components that need to have two separate components can work properly without them having to duplicate all the TextBase (and decendants) functionality
|
||||||
|
* by just overriding the nativeTextViewProtected getter.
|
||||||
|
**/
|
||||||
get nativeTextViewProtected() {
|
get nativeTextViewProtected() {
|
||||||
return this.nativeViewProtected;
|
return this.nativeViewProtected;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user