How to use the @nativescript/core/ui/core/view.Property function in @nativescript/core

To help you get started, we’ve selected a few @nativescript/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Notalib / nativescript-webview-ext / src / webview-ext-common.ts View on Github external
valueConverter: booleanConverter,
});

export const debugModeProperty = new Property({
    name: "debugMode",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const displayZoomControlsProperty = new Property({
    name: "displayZoomControls",
    defaultValue: true,
    valueConverter: booleanConverter,
});

export const supportZoomProperty = new Property({
    name: "supportZoom",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const srcProperty = new Property({
    name: "src",
});

export const scrollBounceProperty = new Property({
    name: "scrollBounce",
    valueConverter: booleanConverter,
});

export type ViewPortValue = boolean | ViewPortProperties;
export const viewPortProperty = new Property({
github Notalib / nativescript-webview-ext / src / webview-ext-common.ts View on Github external
defaultValue: "default",
});

export const databaseStorageProperty = new Property({
    name: "databaseStorage",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const domStorageProperty = new Property({
    name: "domStorage",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const debugModeProperty = new Property({
    name: "debugMode",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const displayZoomControlsProperty = new Property({
    name: "displayZoomControls",
    defaultValue: true,
    valueConverter: booleanConverter,
});

export const supportZoomProperty = new Property({
    name: "supportZoom",
    defaultValue: false,
    valueConverter: booleanConverter,
});
github Notalib / nativescript-webview-ext / src / webview-ext-common.ts View on Github external
name: "supportZoom",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const srcProperty = new Property({
    name: "src",
});

export const scrollBounceProperty = new Property({
    name: "scrollBounce",
    valueConverter: booleanConverter,
});

export type ViewPortValue = boolean | ViewPortProperties;
export const viewPortProperty = new Property({
    name: "viewPortSize",
    defaultValue: false,
    valueConverter(value: string | ViewPortProperties): ViewPortValue {
        const defaultViewPort: ViewPortProperties = {
            initialScale: 1.0,
        };

        const valueLowerCaseStr = `${value || ""}`.toLowerCase();
        if (valueLowerCaseStr === "false") {
            return false;
        } else if (valueLowerCaseStr === "true" || valueLowerCaseStr === "") {
            return defaultViewPort;
        }

        let viewPortInputValues = { ...defaultViewPort };
github Notalib / nativescript-webview-ext / src / webview-ext-common.ts View on Github external
import * as URL from "url";
import { fetchPolyfill, metadataViewPort, promisePolyfill, webViewBridge } from "./nativescript-webview-bridge-loader";

export * from "@nativescript/core/ui/core/view";
export interface ViewPortProperties {
    width?: number | "device-width";
    height?: number | "device-height";
    initialScale?: number;
    maximumScale?: number;
    minimumScale?: number;
    userScalable?: boolean;
}

export type CacheMode = "default" | "cache_first" | "no_cache" | "cache_only" | "normal";

export const autoInjectJSBridgeProperty = new Property({
    name: "autoInjectJSBridge",
    defaultValue: true,
    valueConverter: booleanConverter,
});

export const builtInZoomControlsProperty = new Property({
    name: "builtInZoomControls",
    defaultValue: true,
    valueConverter: booleanConverter,
});

export const cacheModeProperty = new Property({
    name: "cacheMode",
    defaultValue: "default",
});
github Notalib / nativescript-webview-ext / src / webview-ext-common.ts View on Github external
valueConverter: booleanConverter,
});

export const domStorageProperty = new Property({
    name: "domStorage",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const debugModeProperty = new Property({
    name: "debugMode",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const displayZoomControlsProperty = new Property({
    name: "displayZoomControls",
    defaultValue: true,
    valueConverter: booleanConverter,
});

export const supportZoomProperty = new Property({
    name: "supportZoom",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const srcProperty = new Property({
    name: "src",
});

export const scrollBounceProperty = new Property({
github Notalib / nativescript-webview-ext / src / webview-ext-common.ts View on Github external
defaultValue: true,
    valueConverter: booleanConverter,
});

export const cacheModeProperty = new Property({
    name: "cacheMode",
    defaultValue: "default",
});

export const databaseStorageProperty = new Property({
    name: "databaseStorage",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const domStorageProperty = new Property({
    name: "domStorage",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const debugModeProperty = new Property({
    name: "debugMode",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const displayZoomControlsProperty = new Property({
    name: "displayZoomControls",
    defaultValue: true,
    valueConverter: booleanConverter,
});
github Notalib / nativescript-webview-ext / src / webview-ext-common.ts View on Github external
name: "displayZoomControls",
    defaultValue: true,
    valueConverter: booleanConverter,
});

export const supportZoomProperty = new Property({
    name: "supportZoom",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const srcProperty = new Property({
    name: "src",
});

export const scrollBounceProperty = new Property({
    name: "scrollBounce",
    valueConverter: booleanConverter,
});

export type ViewPortValue = boolean | ViewPortProperties;
export const viewPortProperty = new Property({
    name: "viewPortSize",
    defaultValue: false,
    valueConverter(value: string | ViewPortProperties): ViewPortValue {
        const defaultViewPort: ViewPortProperties = {
            initialScale: 1.0,
        };

        const valueLowerCaseStr = `${value || ""}`.toLowerCase();
        if (valueLowerCaseStr === "false") {
            return false;
github Notalib / nativescript-webview-ext / src / webview-ext-common.ts View on Github external
valueConverter: booleanConverter,
});

export const displayZoomControlsProperty = new Property({
    name: "displayZoomControls",
    defaultValue: true,
    valueConverter: booleanConverter,
});

export const supportZoomProperty = new Property({
    name: "supportZoom",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const srcProperty = new Property({
    name: "src",
});

export const scrollBounceProperty = new Property({
    name: "scrollBounce",
    valueConverter: booleanConverter,
});

export type ViewPortValue = boolean | ViewPortProperties;
export const viewPortProperty = new Property({
    name: "viewPortSize",
    defaultValue: false,
    valueConverter(value: string | ViewPortProperties): ViewPortValue {
        const defaultViewPort: ViewPortProperties = {
            initialScale: 1.0,
        };
github Notalib / nativescript-webview-ext / src / webview-ext-common.ts View on Github external
height?: number | "device-height";
    initialScale?: number;
    maximumScale?: number;
    minimumScale?: number;
    userScalable?: boolean;
}

export type CacheMode = "default" | "cache_first" | "no_cache" | "cache_only" | "normal";

export const autoInjectJSBridgeProperty = new Property({
    name: "autoInjectJSBridge",
    defaultValue: true,
    valueConverter: booleanConverter,
});

export const builtInZoomControlsProperty = new Property({
    name: "builtInZoomControls",
    defaultValue: true,
    valueConverter: booleanConverter,
});

export const cacheModeProperty = new Property({
    name: "cacheMode",
    defaultValue: "default",
});

export const databaseStorageProperty = new Property({
    name: "databaseStorage",
    defaultValue: false,
    valueConverter: booleanConverter,
});
github Notalib / nativescript-webview-ext / src / webview-ext-common.ts View on Github external
export type CacheMode = "default" | "cache_first" | "no_cache" | "cache_only" | "normal";

export const autoInjectJSBridgeProperty = new Property({
    name: "autoInjectJSBridge",
    defaultValue: true,
    valueConverter: booleanConverter,
});

export const builtInZoomControlsProperty = new Property({
    name: "builtInZoomControls",
    defaultValue: true,
    valueConverter: booleanConverter,
});

export const cacheModeProperty = new Property({
    name: "cacheMode",
    defaultValue: "default",
});

export const databaseStorageProperty = new Property({
    name: "databaseStorage",
    defaultValue: false,
    valueConverter: booleanConverter,
});

export const domStorageProperty = new Property({
    name: "domStorage",
    defaultValue: false,
    valueConverter: booleanConverter,
});