From 1d304cc3034997f5fe8409b22b0bce178e85c446 Mon Sep 17 00:00:00 2001 From: Ombuweb Date: Fri, 7 Oct 2022 09:03:46 +0200 Subject: [PATCH 1/3] fix: added reference to tailwind --- docs/components/modules/ROOT/pages/styling.adoc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/components/modules/ROOT/pages/styling.adoc b/docs/components/modules/ROOT/pages/styling.adoc index d0d55b6..ed13d98 100644 --- a/docs/components/modules/ROOT/pages/styling.adoc +++ b/docs/components/modules/ROOT/pages/styling.adoc @@ -1,10 +1,8 @@ == CSS -You change the looks and appearance of views (elements) in a NativeScript application similarly to how you do it in a web application using Cascading Style Sheets (CSS) or changing the style object of the elements in JavaScript. -Only a subset of the CSS language is supported. +By default, NativeScript provides you with a theme(@nativescript/theme) that allows to change the looks and appearance of views (elements) in a NativeScript application similarly to how you do it in a web application using Cascading Style Sheets (CSS). However, only a subset of the CSS language is supported. For a full CSS support, you can use [@nativescript/tailwind](/plugins/tailwindcss.md). In addition to CSS, you can also style the elements by changing their style object in JavaScript. -Similarly to the DOM Style Object, each View instance exposes a style property, which holds all the style properties for the view. -When the view is displayed, all its style properties are applied to the underlying native widget. +Similarly to the DOM Style Object, each View instance exposes a style property, which holds all the style properties for the view. When the view is displayed, all its style properties are applied to the underlying native widget. ''' From aab358900df62990639c969907982ff16b8fe174 Mon Sep 17 00:00:00 2001 From: Ombuweb Date: Fri, 7 Oct 2022 09:04:19 +0200 Subject: [PATCH 2/3] feat: added more API --- .../ROOT/pages/nativescript-core/utils.adoc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/guides/modules/ROOT/pages/nativescript-core/utils.adoc b/docs/guides/modules/ROOT/pages/nativescript-core/utils.adoc index 3cc35d6..845fe1b 100644 --- a/docs/guides/modules/ROOT/pages/nativescript-core/utils.adoc +++ b/docs/guides/modules/ROOT/pages/nativescript-core/utils.adoc @@ -321,8 +321,19 @@ Examples: + `console.log(Utils.isObject(""))` logs `false` + `console.log(Utils. | `verifyCallback(value: any)` | `void` -| A function that checks if something is a valid function. -Throws exception if passed value is not a valid function. +| A function that checks if something is a valid function. Throws exception if passed value is not a valid function. + +| `dataSerialize(data?: any, wrapPrimitives?: boolean)` +| `any` +| Data serialization from JS > Native. + +`wrapPrimitives`: Optionally wrap primitive types (Some APIs may require this) + +| `dataDeserialize(nativeData?: any)` +| `any` +| Data deserialization from Native > JS. + +`nativeData`: Native platform data |=== == Timer utilities From 6814f07323d7628934d0f9b23cb98daa62513e98 Mon Sep 17 00:00:00 2001 From: Ombuweb Date: Mon, 10 Oct 2022 12:16:31 +0200 Subject: [PATCH 3/3] fix: new content and clean up --- .../modules/ROOT/pages/styling.adoc | 2 +- .../modules/ROOT/pages/webview.adoc | 8 +++- .../ROOT/pages/basics/environment-setup.adoc | 46 +++++++++++-------- 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/docs/components/modules/ROOT/pages/styling.adoc b/docs/components/modules/ROOT/pages/styling.adoc index ed13d98..fd4ebb7 100644 --- a/docs/components/modules/ROOT/pages/styling.adoc +++ b/docs/components/modules/ROOT/pages/styling.adoc @@ -2,7 +2,7 @@ By default, NativeScript provides you with a theme(@nativescript/theme) that allows to change the looks and appearance of views (elements) in a NativeScript application similarly to how you do it in a web application using Cascading Style Sheets (CSS). However, only a subset of the CSS language is supported. For a full CSS support, you can use [@nativescript/tailwind](/plugins/tailwindcss.md). In addition to CSS, you can also style the elements by changing their style object in JavaScript. -Similarly to the DOM Style Object, each View instance exposes a style property, which holds all the style properties for the view. When the view is displayed, all its style properties are applied to the underlying native widget. +Similarly to the DOM Style Object, each View instance exposes a style property, which holds all its style properties. When the view is displayed, all its style properties are applied to the underlying native widget. ''' diff --git a/docs/components/modules/ROOT/pages/webview.adoc b/docs/components/modules/ROOT/pages/webview.adoc index 745f1a8..0ccc025 100644 --- a/docs/components/modules/ROOT/pages/webview.adoc +++ b/docs/components/modules/ROOT/pages/webview.adoc @@ -74,10 +74,16 @@ To do that we could access the android property and with the help of setDisplayZ | Name | Type | Description | `src` -| `String` +| `string` | Gets or sets the displayed web content. + Valid values: an absolute URL, the path to a local HTML file, or static HTML. +| `iosAllowInlineMediaPlayback` +| `boolean` +| `iOS only`: Enables inline media playback on iOS. +By default, webview forces iPhone into fullscreen media playback. + + | `+...Inherited+` | `Inherited` | Additional inherited properties not shown. diff --git a/docs/guides/modules/ROOT/pages/basics/environment-setup.adoc b/docs/guides/modules/ROOT/pages/basics/environment-setup.adoc index 1097772..d5a4a68 100644 --- a/docs/guides/modules/ROOT/pages/basics/environment-setup.adoc +++ b/docs/guides/modules/ROOT/pages/basics/environment-setup.adoc @@ -17,7 +17,7 @@ a popular package manager for Windows. To install *Node* and *JDK* (using the prebuilt OpenJDK binaries from https://adoptium.net/[Adoptium]) open an Administrator Command Prompt (right click and select "Run as Administrator") and run the following command: -[source%linenums,cli] +[source,bash] ---- choco install -y nodejs.install temurin11 ---- @@ -68,14 +68,14 @@ The default location is inside the Android SDK's `platform-tools` folder: Install the NativeScript CLI globally: -[source%linenums,cli] +[source,bash] ---- npm install -g nativescript ---- To verify if the installation was successful, open a new Command Prompt window to ensure the new environment variables are loaded and run -[source%linenums,cli] +[source,bash] ---- ns doctor android ---- @@ -120,7 +120,7 @@ a popular package manager for macOS. Once you have Homebrew installed, to install *Node* open a Terminal and run the following command: -[source%linenums,cli] +[source,bash] ---- brew install node ---- @@ -131,7 +131,7 @@ If you need to work with multiple versions of node, you may skip installing node To install a *JDK* (using the prebuilt OpenJDK binaries from https://adoptium.net/[Adoptium]) run the following command: -[source%linenums,cli] +[source,bash] ---- brew tap homebrew/cask-versions brew install --cask temurin11 @@ -167,14 +167,14 @@ export PATH=$PATH:$ANDROID_HOME/platform-tools Install the *NativeScript CLI* globally: -[source%linenums,cli] +[source,bash] ---- npm install -g nativescript ---- To verify if the installation was successful, open a new Command Prompt window to ensure the new environment variables are loaded and run -[source%linenums,cli] +[source,bash] ---- ns doctor android ---- @@ -210,7 +210,7 @@ a popular package manager for macOS. Once you have Homebrew installed, to install *Node* open a Terminal and run the following command: -[source%linenums,cli] +[source,bash] ---- brew install node ---- @@ -233,7 +233,7 @@ image::guides::environment-setup/xcode_command_line_tools.png[XCode Preferences, Install *ruby 2.7* and link it so it's available in your shell environment: -[source%linenums,cli] +[source,bash] ---- brew install ruby@2.7 brew link ruby@2.7 @@ -260,7 +260,7 @@ In a new terminal window, install the *++++++pip++++++* and install *++++++six++++++* by running the following: -[source%linenums,cli] +[source,bash] ---- python3 -m pip install --upgrade pip python3 -m pip install six ---- Now continue to the "Install the *NativeScript CLI* globally" section below. -==== + If you are not on macOS 12.3+, install *++++++pip++++++* and *++++++six++++++* by running the following: