From 7931ecd4f8da768c08ddc2c47293e1502ee2e3f9 Mon Sep 17 00:00:00 2001 From: PanayotCankov Date: Wed, 21 Dec 2016 17:32:01 +0200 Subject: [PATCH] Fix tslint errors --- apps/app/ui-tests-app/css/text-decoration.ts | 1 - apps/app/ui-tests-app/font/button.ts | 1 - apps/app/ui-tests-app/layouts/grid.ts | 2 +- tests/app/app/style_props.ts | 13 +++--- tests/app/pages/fonts-test.ts | 1 - tests/app/pages/page11.ts | 7 ++-- tests/app/pages/page15.ts | 3 +- tests/app/pages/page9.ts | 1 - tests/app/ui/animation/css-animation-tests.ts | 1 - tests/app/ui/bindable-tests.ts | 3 +- tests/app/ui/helper.ts | 1 - tests/app/ui/image/image-tests.ts | 1 - tests/app/ui/label/label-tests.ts | 1 - tests/app/ui/layouts/common-layout-tests.ts | 1 - tests/app/ui/layouts/dock-layout-tests.ts | 2 - tests/app/ui/layouts/grid-layout-tests.ts | 1 - tests/app/ui/layouts/wrap-layout-tests.ts | 4 -- tests/app/ui/layouts/wrap-layout.md | 3 -- tests/app/ui/page/page-tests-common.ts | 2 +- tests/app/ui/styling/style-tests.ts | 2 - tests/app/ui/view/view-tests-common.ts | 1 - tns-core-modules/platform/platform.android.ts | 1 - .../ui/action-bar/action-bar-common.ts | 3 +- .../ui/action-bar/action-bar.android.ts | 3 +- .../ui/action-bar/action-bar.d.ts | 22 +--------- .../ui/action-bar/action-bar.ios.ts | 6 +-- .../activity-indicator.d.ts | 6 --- .../activity-indicator.ios.ts | 2 +- .../ui/animation/animation.android.ts | 4 +- tns-core-modules/ui/animation/animation.d.ts | 2 +- tns-core-modules/ui/border/border.ts | 1 - tns-core-modules/ui/builder/builder.ts | 1 - tns-core-modules/ui/button/button.android.ts | 5 +-- tns-core-modules/ui/button/button.d.ts | 2 +- tns-core-modules/ui/button/button.ios.ts | 2 +- tns-core-modules/ui/core/bindable.d.ts | 1 - tns-core-modules/ui/core/bindable.ts | 5 +-- tns-core-modules/ui/core/properties.ts | 32 --------------- tns-core-modules/ui/core/proxy.d.ts | 1 - tns-core-modules/ui/core/proxy.ts | 2 - tns-core-modules/ui/core/view-base.ts | 3 +- tns-core-modules/ui/core/view-common.ts | 40 +++++++------------ tns-core-modules/ui/core/view.android.ts | 15 +++---- tns-core-modules/ui/core/view.d.ts | 6 +-- tns-core-modules/ui/core/view.ios.ts | 7 +--- .../editable-text-base.android.ts | 2 +- .../editable-text-base.ios.ts | 5 +-- tns-core-modules/ui/frame/frame.android.ts | 1 - .../ui/gestures/gestures-common.ts | 2 +- tns-core-modules/ui/image/image-common.ts | 2 +- tns-core-modules/ui/image/image.android.ts | 1 - .../absolute-layout/absolute-layout-common.ts | 2 +- .../ui/layouts/dock-layout/dock-layout.ios.ts | 2 +- .../flexbox-layout/flexbox-layout-common.ts | 2 - .../flexbox-layout/flexbox-layout.ios.ts | 3 +- .../ui/layouts/grid-layout/grid-layout.ios.ts | 3 +- .../ui/layouts/layout-base.android.ts | 3 +- tns-core-modules/ui/layouts/layout-base.d.ts | 1 - .../layouts/stack-layout/stack-layout.ios.ts | 2 +- .../ui/layouts/wrap-layout/wrap-layout.ios.ts | 2 +- .../ui/list-view/list-view-common.ts | 3 +- .../ui/list-view/list-view.android.ts | 3 +- .../ui/list-view/list-view.ios.ts | 5 +-- tns-core-modules/ui/page/page-common.ts | 3 +- tns-core-modules/ui/page/page.android.ts | 2 +- tns-core-modules/ui/page/page.d.ts | 2 +- tns-core-modules/ui/page/page.ios.ts | 6 +-- .../ui/placeholder/placeholder.android.ts | 1 - .../ui/placeholder/placeholder.ios.ts | 1 - .../ui/progress/progress.android.ts | 2 +- tns-core-modules/ui/progress/progress.ios.ts | 2 +- tns-core-modules/ui/repeater/repeater.ts | 2 +- .../ui/scroll-view/scroll-view-common.ts | 3 +- .../ui/scroll-view/scroll-view.ios.ts | 2 +- .../ui/search-bar/search-bar-common.ts | 2 +- .../ui/search-bar/search-bar.android.ts | 2 - .../ui/segmented-bar/segmented-bar-common.ts | 2 +- .../ui/segmented-bar/segmented-bar.android.ts | 9 ++--- .../ui/styling/background-common.ts | 2 +- tns-core-modules/ui/styling/font.android.ts | 2 +- tns-core-modules/ui/styling/font.ios.ts | 5 +-- tns-core-modules/ui/styling/style-scope.ts | 2 - tns-core-modules/ui/styling/style.ts | 1 - tns-core-modules/ui/switch/switch.android.ts | 2 +- .../ui/tab-view/tab-view-common.ts | 2 +- .../ui/tab-view/tab-view.android.ts | 2 +- tns-core-modules/ui/tab-view/tab-view.ios.ts | 11 ++--- .../ui/text-base/text-base-common.ts | 4 +- .../ui/text-base/text-base.android.ts | 3 +- .../ui/text-base/text-base.ios.ts | 1 - .../ui/time-picker/time-picker.ios.ts | 2 +- .../ui/transition/transition.ios.ts | 6 ++- .../ui/web-view/web-view-common.ts | 2 +- .../ui/web-view/web-view.android.ts | 2 +- tns-core-modules/ui/web-view/web-view.ios.ts | 2 +- tns-core-modules/utils/utils.android.ts | 3 +- tns-core-modules/utils/utils.ios.ts | 6 +-- 97 files changed, 109 insertions(+), 260 deletions(-) diff --git a/apps/app/ui-tests-app/css/text-decoration.ts b/apps/app/ui-tests-app/css/text-decoration.ts index 737181045..443140781 100644 --- a/apps/app/ui-tests-app/css/text-decoration.ts +++ b/apps/app/ui-tests-app/css/text-decoration.ts @@ -1,5 +1,4 @@ import { EventData, TextBase, TextDecoration } from "ui/text-base"; -import { Page } from "ui/page"; const possibleValues = [ TextDecoration.NONE, diff --git a/apps/app/ui-tests-app/font/button.ts b/apps/app/ui-tests-app/font/button.ts index 535d67f43..571143cf8 100644 --- a/apps/app/ui-tests-app/font/button.ts +++ b/apps/app/ui-tests-app/font/button.ts @@ -1,5 +1,4 @@ import * as stack from "ui/layouts/stack-layout"; -import * as style from "ui/styling/style"; import * as view from "ui/core/view"; import { unsetValue } from "ui/core/view"; diff --git a/apps/app/ui-tests-app/layouts/grid.ts b/apps/app/ui-tests-app/layouts/grid.ts index 9a53ed4f1..dc7d34c76 100644 --- a/apps/app/ui-tests-app/layouts/grid.ts +++ b/apps/app/ui-tests-app/layouts/grid.ts @@ -1,7 +1,7 @@ import * as model from "./myview"; import { Button } from "ui/button"; import { Page } from "ui/page"; -import { GridLayout, ItemSpec, GridUnitType } from "ui/layouts/grid-layout"; +import { GridLayout, ItemSpec } from "ui/layouts/grid-layout"; export function onLoaded(args: { eventName: string, object: any }) { var page = args.object; diff --git a/tests/app/app/style_props.ts b/tests/app/app/style_props.ts index 39d78dab8..1b3ce7ca1 100644 --- a/tests/app/app/style_props.ts +++ b/tests/app/app/style_props.ts @@ -1,13 +1,14 @@ -import * as style from "ui/styling/style"; -import {PropertyMetadata, PropertyMetadataSettings} from "ui/core/dependency-observable"; -import * as view from "ui/core/view"; -import * as buttonModule from "ui/button"; +import * as buttonModule from "ui/button"; import * as pages from "ui/page"; import * as stackLayoutDef from "ui/layouts/stack-layout"; -import {isAndroid} from "platform"; + +// import {isAndroid} from "platform"; +// import * as style from "ui/styling/style"; +// import {PropertyMetadata, PropertyMetadataSettings} from "ui/core/dependency-observable"; +// import * as view from "ui/core/view"; // on Android we explicitly set propertySettings to None because android will invalidate its layout (skip unnecessary native call). -let AffectsLayout = isAndroid ? PropertyMetadataSettings.None : PropertyMetadataSettings.AffectsLayout; +// let AffectsLayout = isAndroid ? PropertyMetadataSettings.None : PropertyMetadataSettings.AffectsLayout; // export var fontFamilyProperty = new styleProperty.Property("fontFamily", "font-family", new PropertyMetadata(undefined, AffectsLayout)); diff --git a/tests/app/pages/fonts-test.ts b/tests/app/pages/fonts-test.ts index 6b1488a0e..66f4cf3cf 100644 --- a/tests/app/pages/fonts-test.ts +++ b/tests/app/pages/fonts-test.ts @@ -1,5 +1,4 @@ import * as stack from "ui/layouts/stack-layout"; -import * as style from "ui/styling/style"; import {unsetValue} from "ui/core/view"; export function buttonTap(args) { diff --git a/tests/app/pages/page11.ts b/tests/app/pages/page11.ts index 84d01f50b..80e27df93 100644 --- a/tests/app/pages/page11.ts +++ b/tests/app/pages/page11.ts @@ -1,8 +1,7 @@ -import * as p from "ui/page"; -import * as gridModule from "ui/layouts/grid-layout"; +import * as gridModule from "ui/layouts/grid-layout"; import * as sp from "ui/layouts/stack-layout"; import * as button from "ui/button"; -import * as enums from "ui/enums"; +import { Page } from "ui/page"; export function createPage() { var StackLayout = new sp.StackLayout(); @@ -48,7 +47,7 @@ export function createPage() { grid.addColumn(new gridModule.ItemSpec()); grid.addColumn(new gridModule.ItemSpec()); - var page = new p.Page(); + var page = new Page(); //page.content = GridLayout; page.content = StackLayout; var x = 1; diff --git a/tests/app/pages/page15.ts b/tests/app/pages/page15.ts index 11f44f0a7..3aeca01c0 100644 --- a/tests/app/pages/page15.ts +++ b/tests/app/pages/page15.ts @@ -1,5 +1,4 @@ -import * as enums from "ui/enums"; -import * as pageModule from "ui/page"; +import * as pageModule from "ui/page"; import * as buttonModule from "ui/button"; import * as stackModule from "ui/layouts/stack-layout"; diff --git a/tests/app/pages/page9.ts b/tests/app/pages/page9.ts index a5439964d..8d9ab589d 100644 --- a/tests/app/pages/page9.ts +++ b/tests/app/pages/page9.ts @@ -1,7 +1,6 @@ import * as pages from "ui/page"; import * as imageSource from "image-source"; import * as gridModule from "ui/layouts/grid-layout"; -import * as enums from "ui/enums"; import * as img from "ui/image"; export function createPage() { diff --git a/tests/app/ui/animation/css-animation-tests.ts b/tests/app/ui/animation/css-animation-tests.ts index 1d373dda6..9bf053491 100644 --- a/tests/app/ui/animation/css-animation-tests.ts +++ b/tests/app/ui/animation/css-animation-tests.ts @@ -8,7 +8,6 @@ import * as labelModule from "ui/label"; import * as color from "color"; import {SelectorCore} from "ui/styling/css-selector"; -import { unsetValue } from "ui/core/view"; //import * as styling from "ui/styling"; diff --git a/tests/app/ui/bindable-tests.ts b/tests/app/ui/bindable-tests.ts index cb6ec7398..debed3d09 100644 --- a/tests/app/ui/bindable-tests.ts +++ b/tests/app/ui/bindable-tests.ts @@ -1,7 +1,6 @@ -import { Observable, fromObjectRecursive } from "data/observable"; +import { Observable, fromObjectRecursive } from "data/observable"; import { ViewBase } from "ui/core/view-base"; import { BindingOptions } from "ui/core/bindable"; - import * as TKUnit from "../TKUnit"; import * as types from "utils/types"; import * as helper from "../ui/helper"; diff --git a/tests/app/ui/helper.ts b/tests/app/ui/helper.ts index 59f3bc916..47c1cd466 100644 --- a/tests/app/ui/helper.ts +++ b/tests/app/ui/helper.ts @@ -5,7 +5,6 @@ import * as stackLayoutModule from "ui/layouts/stack-layout"; import * as button from "ui/button"; import * as TKUnit from "../TKUnit"; import * as utils from "utils/utils"; -import * as types from "utils/types"; import * as platform from "platform"; import * as colorModule from "color"; import * as formattedStringModule from "text/formatted-string"; diff --git a/tests/app/ui/image/image-tests.ts b/tests/app/ui/image/image-tests.ts index 143458cd6..10773286b 100644 --- a/tests/app/ui/image/image-tests.ts +++ b/tests/app/ui/image/image-tests.ts @@ -18,7 +18,6 @@ import * as ImageSourceModule from "image-source"; import * as ViewModule from "ui/core/view"; import * as helper from "../helper"; import * as ObservableModule from "data/observable"; -import * as enumsModule from "ui/enums"; import * as fs from "file-system"; import * as color from "color"; diff --git a/tests/app/ui/label/label-tests.ts b/tests/app/ui/label/label-tests.ts index 142be3dec..bc13e3b0e 100644 --- a/tests/app/ui/label/label-tests.ts +++ b/tests/app/ui/label/label-tests.ts @@ -10,7 +10,6 @@ import * as colorModule from "color"; import * as utils from "utils/utils"; import * as observableModule from "data/observable"; import * as bindable from "ui/core/bindable"; -import * as textBase from "ui/text-base"; import * as enums from "ui/enums"; import * as labelTestsNative from "./label-tests-native"; import * as fs from "file-system"; diff --git a/tests/app/ui/layouts/common-layout-tests.ts b/tests/app/ui/layouts/common-layout-tests.ts index e732a5f28..0df392f1f 100644 --- a/tests/app/ui/layouts/common-layout-tests.ts +++ b/tests/app/ui/layouts/common-layout-tests.ts @@ -1,6 +1,5 @@ import * as TKUnit from "../../TKUnit"; import * as layoutHelper from "./layout-helper"; -import * as enums from "ui/enums"; import * as testModule from "../../ui-test"; import {LayoutBase, unsetValue, PercentLength} from "ui/layouts/layout-base"; import * as platform from "platform"; diff --git a/tests/app/ui/layouts/dock-layout-tests.ts b/tests/app/ui/layouts/dock-layout-tests.ts index a864d5fb0..b6198f641 100644 --- a/tests/app/ui/layouts/dock-layout-tests.ts +++ b/tests/app/ui/layouts/dock-layout-tests.ts @@ -3,9 +3,7 @@ import { DockLayout } from "ui/layouts/dock-layout"; import * as TKUnit from "../../TKUnit"; import * as helper from "./layout-helper"; import * as testModule from "../../ui-test"; -import * as layoutHelper from "./layout-helper"; import * as commonTests from "./common-layout-tests"; -import { PercentLength } from "ui/core/view"; // >> dock-layout-require import * as dockModule from "ui/layouts/dock-layout"; diff --git a/tests/app/ui/layouts/grid-layout-tests.ts b/tests/app/ui/layouts/grid-layout-tests.ts index 0f07e0688..a8aa3639e 100644 --- a/tests/app/ui/layouts/grid-layout-tests.ts +++ b/tests/app/ui/layouts/grid-layout-tests.ts @@ -5,7 +5,6 @@ import * as TKUnit from "../../TKUnit"; import * as view from "ui/core/view"; import { unsetValue } from "ui/core/view"; import * as builder from "ui/builder"; -import * as enums from "ui/enums"; import * as testModule from "../../ui-test"; import * as layoutHelper from "./layout-helper"; import * as platform from "platform"; diff --git a/tests/app/ui/layouts/wrap-layout-tests.ts b/tests/app/ui/layouts/wrap-layout-tests.ts index 2d94997c4..dabbdeb6b 100644 --- a/tests/app/ui/layouts/wrap-layout-tests.ts +++ b/tests/app/ui/layouts/wrap-layout-tests.ts @@ -8,10 +8,6 @@ import * as commonTests from "./common-layout-tests"; import * as wrapLayoutModule from "ui/layouts/wrap-layout"; // << wrap-layout-require -// >> wrap-layout-others -import * as enums from "ui/enums"; -// << wrap-layout-others - export class WrapLayoutTest extends testModule.UITest { public create(): wrapLayoutModule.WrapLayout { diff --git a/tests/app/ui/layouts/wrap-layout.md b/tests/app/ui/layouts/wrap-layout.md index aeaac4a66..85486b15f 100644 --- a/tests/app/ui/layouts/wrap-layout.md +++ b/tests/app/ui/layouts/wrap-layout.md @@ -21,9 +21,6 @@ Using a WrapLayout requires the WrapLayout module. ``` -Other frequently used modules when working with a WrapLayout include: -{%snippet wrap-layout-others%} - ## Creating a WrapLayout {%snippet wrap-layout-new%} diff --git a/tests/app/ui/page/page-tests-common.ts b/tests/app/ui/page/page-tests-common.ts index 956f453da..4fe829381 100644 --- a/tests/app/ui/page/page-tests-common.ts +++ b/tests/app/ui/page/page-tests-common.ts @@ -22,7 +22,7 @@ import { Label } from "ui/label"; import { EventData } from "data/observable"; import { PercentLength } from "ui/core/view"; import * as platform from "platform"; -import {unsetValue, Length} from "ui/core/view"; +import {unsetValue} from "ui/core/view"; export function addLabelToPage(page: Page, text?: string) { let label = new Label(); diff --git a/tests/app/ui/styling/style-tests.ts b/tests/app/ui/styling/style-tests.ts index bfb8efdf7..3c58b7845 100644 --- a/tests/app/ui/styling/style-tests.ts +++ b/tests/app/ui/styling/style-tests.ts @@ -9,8 +9,6 @@ import * as tabViewModule from "ui/tab-view"; import * as helper from "../../ui/helper"; import * as types from "utils/types"; import * as viewModule from "ui/core/view"; -import * as styleModule from "ui/styling/style"; -import * as dependencyObservableModule from "ui/core/dependency-observable"; import { resolveFileNameFromUrl } from "ui/styling/style-scope"; import { unsetValue } from "ui/core/view"; diff --git a/tests/app/ui/view/view-tests-common.ts b/tests/app/ui/view/view-tests-common.ts index fd5f93841..0b87f969f 100644 --- a/tests/app/ui/view/view-tests-common.ts +++ b/tests/app/ui/view/view-tests-common.ts @@ -13,7 +13,6 @@ import * as layoutModule from "ui/layouts/layout"; import * as observable from "data/observable"; import * as bindable from "ui/core/bindable"; import * as definition from "./view-tests"; -import * as enums from "ui/enums"; import * as absoluteLayoutModule from "ui/layouts/absolute-layout"; export var test_eachDescendant = function () { diff --git a/tns-core-modules/platform/platform.android.ts b/tns-core-modules/platform/platform.android.ts index cafad71c0..919a4e284 100644 --- a/tns-core-modules/platform/platform.android.ts +++ b/tns-core-modules/platform/platform.android.ts @@ -1,7 +1,6 @@ /* tslint:disable:class-name */ import * as definition from "platform"; import * as utils from "utils/utils"; -import * as enumsModule from "ui/enums"; const MIN_TABLET_PIXELS = 600; diff --git a/tns-core-modules/ui/action-bar/action-bar-common.ts b/tns-core-modules/ui/action-bar/action-bar-common.ts index aca8e8681..ec5ce4cb4 100644 --- a/tns-core-modules/ui/action-bar/action-bar-common.ts +++ b/tns-core-modules/ui/action-bar/action-bar-common.ts @@ -6,7 +6,7 @@ NavigationButton } from "ui/action-bar"; import { Page } from "ui/page"; -import { View, ViewBase, Bindable, Property, unsetValue, horizontalAlignmentProperty, verticalAlignmentProperty, HorizontalAlignment, VerticalAlignment } from "ui/core/view"; +import { View, ViewBase, Property, unsetValue, horizontalAlignmentProperty, verticalAlignmentProperty, HorizontalAlignment, VerticalAlignment } from "ui/core/view"; export * from "ui/core/view"; @@ -339,7 +339,6 @@ function onTitlePropertyChanged(actionBar: ActionBarBase, oldValue: string, newV let titleProperty = new Property({ name: "title", valueChanged: onTitlePropertyChanged }); titleProperty.register(ActionBarBase); - function onItemChanged(item: ActionItemBase, oldValue: string, newValue: string) { if (item.actionBar) { item.actionBar.update(); diff --git a/tns-core-modules/ui/action-bar/action-bar.android.ts b/tns-core-modules/ui/action-bar/action-bar.android.ts index 1f6b87d1e..eb0f594bf 100644 --- a/tns-core-modules/ui/action-bar/action-bar.android.ts +++ b/tns-core-modules/ui/action-bar/action-bar.android.ts @@ -1,5 +1,5 @@ import { AndroidActionBarSettings as AndroidActionBarSettingsDefinition, AndroidActionItemSettings } from "ui/action-bar"; -import { ActionItemBase, ActionBarBase, isVisible, View, colorProperty, Color } from "./action-bar-common"; +import { ActionItemBase, ActionBarBase, isVisible, View, colorProperty } from "./action-bar-common"; import { RESOURCE_PREFIX } from "utils/utils"; import { fromFileOrResource } from "image-source"; import * as application from "application"; @@ -331,7 +331,6 @@ export class ActionBar extends ActionBarBase { } } - get [colorProperty.native](): number { if (!defaultTitleTextColor) { let textView = new android.widget.TextView(this._context); diff --git a/tns-core-modules/ui/action-bar/action-bar.d.ts b/tns-core-modules/ui/action-bar/action-bar.d.ts index 5516899e0..7322243e3 100644 --- a/tns-core-modules/ui/action-bar/action-bar.d.ts +++ b/tns-core-modules/ui/action-bar/action-bar.d.ts @@ -2,7 +2,7 @@ * Contains the action bar related classes. */ declare module "ui/action-bar" { - import { EventData, ViewBase, View, AddArrayFromBuilder, AddChildFromBuilder, Property } from "ui/core/view"; + import { EventData, ViewBase, View, AddArrayFromBuilder, AddChildFromBuilder } from "ui/core/view"; import { Page } from "ui/page"; /** @@ -239,26 +239,6 @@ declare module "ui/action-bar" { } - /** - * String value used when hooking to tap event. - */ - let tapEvent: string; - - /** - * Represents the observable property backing the text property. - */ - let textProperty: Property; - - /** - * Represents the observable property backing the icon property. - */ - let iconProperty: Property; - - /** - * Represents the observable property backing the visibility property. - */ - let visibilityProperty: Property; - /** @internal */ export function _setNavBarColor(navBar: any /* UINavigationBar */, color: any /* UIColor */); /** @internal */ diff --git a/tns-core-modules/ui/action-bar/action-bar.ios.ts b/tns-core-modules/ui/action-bar/action-bar.ios.ts index 009ca1f93..34036025d 100644 --- a/tns-core-modules/ui/action-bar/action-bar.ios.ts +++ b/tns-core-modules/ui/action-bar/action-bar.ios.ts @@ -1,6 +1,5 @@ import { IOSActionItemSettings, ActionItem as ActionItemDefinition } from "ui/action-bar"; -import { ActionItemBase, ActionBarBase, isVisible, View, colorProperty, backgroundColorProperty, backgroundInternalProperty, Color, Background, layout } from "./action-bar-common"; -import { Frame, topmost as topmostFrame } from "ui/frame"; +import { ActionItemBase, ActionBarBase, isVisible, View, colorProperty, backgroundColorProperty, backgroundInternalProperty, layout } from "./action-bar-common"; import { ImageSource, fromFileOrResource } from "image-source"; export * from "./action-bar-common"; @@ -319,7 +318,6 @@ export class ActionBar extends ActionBarBase { get [backgroundInternalProperty.native](): UIColor { return null; } - set [backgroundInternalProperty.native](value: UIColor) { - + set [backgroundInternalProperty.native](value: UIColor) { // tslint:disable-line } } \ No newline at end of file diff --git a/tns-core-modules/ui/activity-indicator/activity-indicator.d.ts b/tns-core-modules/ui/activity-indicator/activity-indicator.d.ts index 84c0d92bc..004512bcd 100644 --- a/tns-core-modules/ui/activity-indicator/activity-indicator.d.ts +++ b/tns-core-modules/ui/activity-indicator/activity-indicator.d.ts @@ -3,7 +3,6 @@ */ declare module "ui/activity-indicator" { import { View } from "ui/core/view"; - import { Property } from "ui/core/properties"; /** * Represents a UI widget which displays a progress indicator hinting the user for some background operation running. @@ -24,9 +23,4 @@ declare module "ui/activity-indicator" { */ busy: boolean; } - - /** - * Represents the busy property of the ActivityIndicator class. - */ - let busyProperty: Property; } \ No newline at end of file diff --git a/tns-core-modules/ui/activity-indicator/activity-indicator.ios.ts b/tns-core-modules/ui/activity-indicator/activity-indicator.ios.ts index e1bd97fb5..efa6d72f2 100644 --- a/tns-core-modules/ui/activity-indicator/activity-indicator.ios.ts +++ b/tns-core-modules/ui/activity-indicator/activity-indicator.ios.ts @@ -1,4 +1,4 @@ -import { ActivityIndicatorBase, busyProperty, colorProperty, visibilityProperty, Visibility } from "./activity-indicator-common"; +import { ActivityIndicatorBase, busyProperty, colorProperty } from "./activity-indicator-common"; import { ios } from "utils/utils"; export * from "./activity-indicator-common"; diff --git a/tns-core-modules/ui/animation/animation.android.ts b/tns-core-modules/ui/animation/animation.android.ts index 082229a5d..7c7c2df66 100644 --- a/tns-core-modules/ui/animation/animation.android.ts +++ b/tns-core-modules/ui/animation/animation.android.ts @@ -172,7 +172,7 @@ export class Animation extends AnimationBase { return _resolveAnimationCurve(curve); } - private _onAndroidAnimationEnd() { + private _onAndroidAnimationEnd() { // tslint:disable-line if (!this.isPlaying) { // It has been cancelled return; @@ -187,7 +187,7 @@ export class Animation extends AnimationBase { this._resolveAnimationFinishedPromise(); } - private _onAndroidAnimationCancel() { + private _onAndroidAnimationCancel() { // tslint:disable-line let i = 0; let length = this._propertyResetCallbacks.length; for (; i < length; i++) { diff --git a/tns-core-modules/ui/animation/animation.d.ts b/tns-core-modules/ui/animation/animation.d.ts index c33b29142..4ff6b37ac 100644 --- a/tns-core-modules/ui/animation/animation.d.ts +++ b/tns-core-modules/ui/animation/animation.d.ts @@ -102,5 +102,5 @@ public _resolveAnimationCurve(curve: any): any; } - function _resolveAnimationCurve(curve: any): any; + export function _resolveAnimationCurve(curve: any): any; } \ No newline at end of file diff --git a/tns-core-modules/ui/border/border.ts b/tns-core-modules/ui/border/border.ts index 0ab66b882..dbbdaead4 100644 --- a/tns-core-modules/ui/border/border.ts +++ b/tns-core-modules/ui/border/border.ts @@ -35,7 +35,6 @@ export class Border extends ContentView implements BorderDefinition { } public onLayout(left: number, top: number, right: number, bottom: number): void { - let density = layout.getDisplayDensity(); let style = this.style; let horizontalBorderLength = style.effectiveBorderLeftWidth + style.effectiveBorderRightWidth; let verticalBorderLength = style.effectiveBorderTopWidth + style.effectiveBorderBottomWidth; diff --git a/tns-core-modules/ui/builder/builder.ts b/tns-core-modules/ui/builder/builder.ts index 31d9bfda9..a4f058204 100644 --- a/tns-core-modules/ui/builder/builder.ts +++ b/tns-core-modules/ui/builder/builder.ts @@ -536,7 +536,6 @@ namespace xml2ui { }); } - } else { var componentModule: ComponentModule; diff --git a/tns-core-modules/ui/button/button.android.ts b/tns-core-modules/ui/button/button.android.ts index dc462f493..6ac948321 100644 --- a/tns-core-modules/ui/button/button.android.ts +++ b/tns-core-modules/ui/button/button.android.ts @@ -1,6 +1,6 @@ import { - ButtonBase, textProperty, formattedTextProperty, TouchGestureEventData, FormattedString, GestureTypes, TouchAction, - PseudoClassHandler, TextTransform + ButtonBase, TouchGestureEventData, GestureTypes, TouchAction, + PseudoClassHandler } from "./button-common"; export * from "./button-common"; @@ -22,7 +22,6 @@ class ClickListener extends java.lang.Object implements android.view.View.OnClic export class Button extends ButtonBase { _button: android.widget.Button; - private _isPressed: boolean; private _highlightedHandler: (args: TouchGestureEventData) => void; get android(): android.widget.Button { diff --git a/tns-core-modules/ui/button/button.d.ts b/tns-core-modules/ui/button/button.d.ts index bfc54484b..a2e8e8ee2 100644 --- a/tns-core-modules/ui/button/button.d.ts +++ b/tns-core-modules/ui/button/button.d.ts @@ -2,7 +2,7 @@ * Contains the Button class, which represents a standard button widget. */ declare module "ui/button" { - import { TextBase, Property, EventData, FormattedString, FormattedStringView } from "ui/text-base"; + import { TextBase, EventData } from "ui/text-base"; /** * Represents a standard Button widget. diff --git a/tns-core-modules/ui/button/button.ios.ts b/tns-core-modules/ui/button/button.ios.ts index f7d18a440..758abfd85 100644 --- a/tns-core-modules/ui/button/button.ios.ts +++ b/tns-core-modules/ui/button/button.ios.ts @@ -1,6 +1,6 @@ import { ControlStateChangeListener } from "ui/core/control-state-change"; import { - View, ButtonBase, PseudoClassHandler, textProperty, formattedTextProperty, whiteSpaceProperty, + ButtonBase, PseudoClassHandler, whiteSpaceProperty, borderTopWidthProperty, borderRightWidthProperty, borderBottomWidthProperty, borderLeftWidthProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty, paddingLeftProperty, Length, WhiteSpace } from "./button-common"; diff --git a/tns-core-modules/ui/core/bindable.d.ts b/tns-core-modules/ui/core/bindable.d.ts index 15a3bdea0..a57ff9d75 100644 --- a/tns-core-modules/ui/core/bindable.d.ts +++ b/tns-core-modules/ui/core/bindable.d.ts @@ -66,7 +66,6 @@ */ unbind(property: string); - //@private // _onBindingContextChanged(oldValue: any, newValue: any); // _updateTwoWayBinding(propertyName: string, value: any); diff --git a/tns-core-modules/ui/core/bindable.ts b/tns-core-modules/ui/core/bindable.ts index b00668225..52b192ec1 100644 --- a/tns-core-modules/ui/core/bindable.ts +++ b/tns-core-modules/ui/core/bindable.ts @@ -1,6 +1,6 @@ import * as definition from "ui/core/bindable"; import { Observable, PropertyChangeData } from "data/observable"; -import { unsetValue, DependencyObservable, Property, PropertyMetadata, PropertyMetadataSettings, PropertyChangeData as DependencyPropertyChangeData } from "ui/core/dependency-observable"; +import { unsetValue, DependencyObservable, Property } from "ui/core/dependency-observable"; import { addWeakEventListener, removeWeakEventListener } from "ui/core/weak-event-listener"; import types = require("utils/types"); import bindingBuilder = require("../builder/binding-builder"); @@ -10,7 +10,7 @@ import * as polymerExpressions from "js-libs/polymer-expressions"; import * as specialProperties from "ui/builder/special-properties"; import * as utils from "utils/utils"; -import { enabled as traceEnabled, write as traceWrite, categories as traceCategories, notifyEvent as traceNotifyEvent, messageType as traceMessageType } from "trace"; +import { enabled as traceEnabled, write as traceWrite, categories as traceCategories, messageType as traceMessageType } from "trace"; // let bindingContextProperty = new Property( // "bindingContext", @@ -39,7 +39,6 @@ export class Bindable extends DependencyObservable implements definition.Bindabl private bindings = new Map(); - get bindingContext(): Object { throw new Error("Not implemented"); } diff --git a/tns-core-modules/ui/core/properties.ts b/tns-core-modules/ui/core/properties.ts index 76b300966..687989a0e 100644 --- a/tns-core-modules/ui/core/properties.ts +++ b/tns-core-modules/ui/core/properties.ts @@ -299,7 +299,6 @@ export class InheritedProperty extends Property { const setBase = this.set; const setFunc = (valueSource: ValueSource) => function (value: U): void { const that = this; - const currentValueSource: number = that[sourceKey] || ValueSource.Default; let unboxedValue: U; let newValueSource: number; @@ -358,8 +357,6 @@ export class InheritedProperty extends Property { export class CssProperty { private registered: boolean; - private readonly setLocalValue: (value: U) => void; - private readonly setCssValue: (value: U) => void; public readonly name: string; public readonly cssName: string; @@ -554,7 +551,6 @@ export class InheritedCssProperty extends CssProperty constructor(options: CssPropertyOptions) { super(options); const name = options.name; - const cssName = `css-${name}`; const key = this.key; const sourceKey = this.sourceKey; @@ -676,8 +672,6 @@ export class InheritedCssProperty extends CssProperty export class ShorthandProperty { private registered: boolean; - private readonly setLocalValue: (value: string) => void; - private readonly setCssValue: (value: string) => void; public readonly key: symbol; public readonly name: string; @@ -782,32 +776,6 @@ function inheritableCssPropertyValuesOn(style: Style): Array<{ property: Inherit return array; } -function inheritablePropertiesOn(view: ViewBase): Array> { - const array = new Array>(); - for (let prop of inheritableProperties) { - const sourceKey = prop.sourceKey; - const valueSource: number = view[sourceKey] || ValueSource.Default; - if (valueSource === ValueSource.Inherited) { - array.push(prop); - } - } - - return array; -} - -function inheritableCssPropertiesOn(style: Object): Array> { - const array = new Array>(); - for (let prop of inheritableCssProperties) { - const sourceKey = prop.sourceKey; - const valueSource: number = style[sourceKey] || ValueSource.Default; - if (valueSource === ValueSource.Inherited) { - array.push(prop); - } - } - - return array; -} - export function applyNativeSetters(view: ViewBase): void { let symbols = (Object).getOwnPropertySymbols(view); for (let symbol of symbols) { diff --git a/tns-core-modules/ui/core/proxy.d.ts b/tns-core-modules/ui/core/proxy.d.ts index 5dbf368f5..f5879f13e 100644 --- a/tns-core-modules/ui/core/proxy.d.ts +++ b/tns-core-modules/ui/core/proxy.d.ts @@ -1,6 +1,5 @@ declare module "ui/core/proxy" { import { DependencyObservable, Property, PropertyMetadata as PropertyMetadataBase, PropertyChangedCallback, PropertyValidationCallback } from "ui/core/dependency-observable"; - import { Bindable } from "ui/core/bindable"; /** * A class that describes dependency property metadata. diff --git a/tns-core-modules/ui/core/proxy.ts b/tns-core-modules/ui/core/proxy.ts index 36b6389aa..00a2ba0f1 100644 --- a/tns-core-modules/ui/core/proxy.ts +++ b/tns-core-modules/ui/core/proxy.ts @@ -1,8 +1,6 @@ import * as bindable from "ui/core/bindable"; import * as dependencyObservable from "ui/core/dependency-observable"; import * as definition from "ui/core/proxy"; -import * as types from "utils/types"; -import * as observable from "data/observable"; export class PropertyMetadata extends dependencyObservable.PropertyMetadata implements definition.PropertyMetadata { private _onSetNativeValue: dependencyObservable.PropertyChangedCallback; diff --git a/tns-core-modules/ui/core/view-base.ts b/tns-core-modules/ui/core/view-base.ts index 3912a3d29..ea258f2ff 100644 --- a/tns-core-modules/ui/core/view-base.ts +++ b/tns-core-modules/ui/core/view-base.ts @@ -1,6 +1,6 @@ import { ViewBase as ViewBaseDefinition } from "ui/core/view-base"; import { Observable, EventData } from "data/observable"; -import { Property, InheritedProperty, CssProperty, Style, clearInheritedProperties, propagateInheritedProperties, resetStyleProperties } from "./properties"; +import { Property, InheritedProperty, Style, clearInheritedProperties, propagateInheritedProperties, resetStyleProperties } from "./properties"; import { Binding, BindingOptions, Bindable } from "ui/core/bindable"; import { isIOS, isAndroid } from "platform"; import { fromString as gestureFromString } from "ui/gestures"; @@ -507,7 +507,6 @@ export class ViewBase extends Observable implements ViewBaseDefinition { export const bindingContextProperty = new InheritedProperty({ name: "bindingContext" }); bindingContextProperty.register(ViewBase); - function onCssClassPropertyChanged(view: ViewBase, oldValue: string, newValue: string) { let classes = view.cssClasses; classes.clear(); diff --git a/tns-core-modules/ui/core/view-common.ts b/tns-core-modules/ui/core/view-common.ts index 329609db2..5c4fbbc4c 100644 --- a/tns-core-modules/ui/core/view-common.ts +++ b/tns-core-modules/ui/core/view-common.ts @@ -4,9 +4,9 @@ import { Animation, AnimationPromise } from "ui/animation"; import { Source } from "utils/debug"; import { Background } from "ui/styling/background"; import { - ViewBase, getEventOrGestureName, Observable, EventData, Style, - Property, InheritedProperty, CssProperty, ShorthandProperty, InheritedCssProperty, - gestureFromString, isIOS, traceEnabled, traceWrite, traceCategories, traceNotifyEvent, printUnregisteredProperties, makeParser, makeValidator + ViewBase, getEventOrGestureName, EventData, Style, + Property, CssProperty, ShorthandProperty, InheritedCssProperty, + gestureFromString, isIOS, traceEnabled, traceWrite, traceCategories, printUnregisteredProperties, makeParser, makeValidator } from "./view-base"; import { observe as gestureObserve, GesturesObserver, GestureTypes, GestureEventData } from "ui/gestures"; import { Font, parseFont, FontStyle, FontWeight } from "ui/styling/font"; @@ -94,7 +94,6 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition { private _isLayoutValid: boolean; private _cssType: string; - private _updatingInheritedProperties: boolean; public _isAddedToNativeVisualTree: boolean; public _gestureObservers = {}; @@ -596,11 +595,6 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition { vAlignment = childStyle.verticalAlignment; } - let marginTop = childStyle.marginTop; - let marginBottom = childStyle.marginBottom; - let marginLeft = childStyle.marginLeft; - let marginRight = childStyle.marginRight; - switch (vAlignment) { case VerticalAlignment.TOP: childTop = top + effectiveMarginTop; @@ -676,7 +670,6 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition { let height = layout.getMeasureSpecSize(heightMeasureSpec); let heightMode = layout.getMeasureSpecMode(heightMeasureSpec); - let parentWidthMeasureSpec = parent._currentWidthMeasureSpec; updateChildLayoutParams(child, parent, density); let style = child.style; @@ -974,31 +967,31 @@ function updateChildLayoutParams(child: ViewCommon, parent: ViewCommon, density: function equalsCommon(a: Length, b: Length): boolean; function equalsCommon(a: PercentLength, b: PercentLength): boolean; function equalsCommon(a: PercentLength, b: PercentLength): boolean { - if (a == "auto") { - return b == "auto"; + if (a == "auto") { // tslint:disable-line + return b == "auto"; // tslint:disable-line } if (typeof a === "number") { - if (b == "auto") { + if (b == "auto") { // tslint:disable-line return false; } if (typeof b === "number") { - return a == b; + return a == b; // tslint:disable-line } - return b.unit == "dip" && a == b.value; + return b.unit == "dip" && a == b.value; // tslint:disable-line } - if (b == "auto") { + if (b == "auto") { // tslint:disable-line return false; } if (typeof b === "number") { - return a.unit == "dip" && a.value == b; + return a.unit == "dip" && a.value == b; // tslint:disable-line } - return a.value == b.value && a.unit == b.unit; + return a.value == b.value && a.unit == b.unit; // tslint:disable-line } function toDevicePixelsCommon(length: Length, auto: number): number; function toDevicePixelsCommon(length: PercentLength, auto: number, parentSize: number): number; function toDevicePixelsCommon(length: PercentLength, auto: number, parentAvailableWidth?: number): number { - if (length == "auto") { + if (length == "auto") { // tslint:disable-line return auto; } if (typeof length === "number") { @@ -1069,7 +1062,7 @@ export type Length = "auto" | number | { export namespace Length { export function parse(value: string | Length): Length { - if (value == "auto") { + if (value == "auto") { // tslint:disable-line return "auto"; } else if (typeof value === "string") { let type: "dip" | "px"; @@ -1478,7 +1471,7 @@ export const backgroundImageProperty = new CssProperty({ style.backgroundInternal = currentBackground.withImage(fromBase64(base64Data)); isValid = true; } else { - style.backgroundInternal, currentBackground.withImage(undefined); + style.backgroundInternal = currentBackground.withImage(undefined); } } else if (isFileOrResourcePath(url)) { @@ -1842,11 +1835,6 @@ function opacityConverter(value: any): number { throw new Error(`Opacity should be between [0, 1]. Value: ${newValue}`); } -function isOpacityValid(value: string): boolean { - let parsedValue: number = parseFloat(value); - return !isNaN(parsedValue) && 0 <= parsedValue && parsedValue <= 1; -} - export const opacityProperty = new CssProperty({ name: "opacity", cssName: "opacity", defaultValue: 1, valueConverter: opacityConverter }); opacityProperty.register(Style); diff --git a/tns-core-modules/ui/core/view.android.ts b/tns-core-modules/ui/core/view.android.ts index 8e7b7a895..5d968ff0d 100644 --- a/tns-core-modules/ui/core/view.android.ts +++ b/tns-core-modules/ui/core/view.android.ts @@ -1,4 +1,4 @@ -import { PercentLength, Length, Point, CustomLayoutView as CustomLayoutViewDefinition } from "ui/core/view"; +import { PercentLength, Point, CustomLayoutView as CustomLayoutViewDefinition } from "ui/core/view"; import { ad as androidBackground } from "ui/styling/background"; import { ViewCommon, layout, isEnabledProperty, originXProperty, originYProperty, automationTextProperty, isUserInteractionEnabledProperty, visibilityProperty, opacityProperty, minWidthProperty, minHeightProperty, @@ -6,14 +6,12 @@ import { marginRightProperty, marginBottomProperty, horizontalAlignmentProperty, verticalAlignmentProperty, rotateProperty, scaleXProperty, scaleYProperty, translateXProperty, translateYProperty, zIndexProperty, backgroundInternalProperty, - Background, GestureTypes, GestureEventData, applyNativeSetters, Property, + Background, GestureTypes, GestureEventData, applyNativeSetters, traceEnabled, traceWrite, traceCategories, traceNotifyEvent, Visibility, HorizontalAlignment, VerticalAlignment } from "./view-common"; export * from "./view-common"; -let flexbox; - const ANDROID = "_android"; const NATIVE_VIEW = "_nativeView"; const VIEW_GROUP = "_viewGroup"; @@ -65,7 +63,6 @@ const disableUserInteractionListener = new DisableUserInteractionListener(); export class View extends ViewCommon { private touchListenerIsSet: boolean; private touchListener: android.view.View.OnTouchListener; - private _gesturesListener: android.view.View.OnTouchListener; public nativeView: android.view.View; @@ -536,15 +533,15 @@ function createNativePercentLengthProperty({key, auto = 0, getPixels, setPixels, Object.defineProperty(View.prototype, key, { get: function (this: View) { return { value: getPixels(this.nativeView), unit: "px" } }, set: function (this: View, length: PercentLength) { - if (length == "auto") { + if (length == "auto") { // tslint:disable-line setPixels(this.nativeView, auto); } else if (typeof length === "number") { setPixels(this.nativeView, length * layout.getDisplayDensity()); - } else if (length.unit == "dip") { + } else if (length.unit == "dip") { // tslint:disable-line setPixels(this.nativeView, length.value * layout.getDisplayDensity()); - } else if (length.unit == "px") { + } else if (length.unit == "px") { // tslint:disable-line setPixels(this.nativeView, length.value); - } else if (length.unit == "%") { + } else if (length.unit == "%") { // tslint:disable-line setPercent(this.nativeView, length.value); } else { throw new Error(`Unsupported PercentLength ${length}`); diff --git a/tns-core-modules/ui/core/view.d.ts b/tns-core-modules/ui/core/view.d.ts index 3d038b552..9fee2f1f6 100644 --- a/tns-core-modules/ui/core/view.d.ts +++ b/tns-core-modules/ui/core/view.d.ts @@ -23,8 +23,7 @@ declare module "ui/core/view" { import { GestureTypes, GesturesObserver, GestureEventData, TouchGestureEventData, TouchAction } from "ui/gestures"; import { Animation, AnimationDefinition, AnimationPromise } from "ui/animation"; import { - ViewBase, Property, CssProperty, InheritedCssProperty, Style, - BindingOptions, Observable, EventData + ViewBase, Property, CssProperty, InheritedCssProperty, Style, EventData } from "ui/core/view-base"; import { Background } from "ui/styling/background"; import { Font, FontWeight, FontStyle } from "ui/styling/font"; @@ -550,7 +549,6 @@ declare module "ui/core/view" { // Lifecycle events - _context: any /* android.content.Context */; _childIndexToNativeChildIndex(index?: number): number; @@ -564,7 +562,6 @@ declare module "ui/core/view" { public _applyXmlAttribute(attribute: string, value: any): boolean; public eachChildView(callback: (view: View) => boolean): void; - //@private /** * A property has changed on the native side directly - e.g. the user types in a TextField. @@ -583,7 +580,6 @@ declare module "ui/core/view" { _addViewToNativeVisualTree(view: ViewBase, atIndex?: number): boolean; _removeViewFromNativeVisualTree(view: ViewBase): void; - _onAttached(context: any /* android.content.Context */): void; _onContextChanged(): void; _onDetached(force?: boolean): void; diff --git a/tns-core-modules/ui/core/view.ios.ts b/tns-core-modules/ui/core/view.ios.ts index 493f68a18..8c0d4182e 100644 --- a/tns-core-modules/ui/core/view.ios.ts +++ b/tns-core-modules/ui/core/view.ios.ts @@ -1,10 +1,7 @@ -import { Length, Point, CustomLayoutView as CustomLayoutViewDefinition, View as ViewDefinition } from "ui/core/view"; +import { Point, View as ViewDefinition } from "ui/core/view"; import { ios } from "ui/styling/background"; import { - ViewCommon, isEnabledProperty, originXProperty, originYProperty, automationTextProperty, isUserInteractionEnabledProperty, visibilityProperty, opacityProperty, minWidthProperty, minHeightProperty, - widthProperty, heightProperty, marginLeftProperty, marginTopProperty, - marginRightProperty, marginBottomProperty, horizontalAlignmentProperty, verticalAlignmentProperty, - paddingLeftProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty, + ViewCommon, isEnabledProperty, originXProperty, originYProperty, automationTextProperty, isUserInteractionEnabledProperty, visibilityProperty, opacityProperty, rotateProperty, scaleXProperty, scaleYProperty, translateXProperty, translateYProperty, zIndexProperty, backgroundInternalProperty, clipPathProperty, layout, traceEnabled, traceWrite, traceCategories, Background, Visibility diff --git a/tns-core-modules/ui/editable-text-base/editable-text-base.android.ts b/tns-core-modules/ui/editable-text-base/editable-text-base.android.ts index aa3a3c4f7..c7d669c84 100644 --- a/tns-core-modules/ui/editable-text-base/editable-text-base.android.ts +++ b/tns-core-modules/ui/editable-text-base/editable-text-base.android.ts @@ -1,6 +1,6 @@ import { EditableTextBase as EditableTextBaseCommon, keyboardTypeProperty, - returnKeyTypeProperty, editableProperty, updateTextTriggerProperty, + returnKeyTypeProperty, editableProperty, autocapitalizationTypeProperty, autocorrectProperty, hintProperty, textProperty, placeholderColorProperty, Color } from "./editable-text-base-common"; diff --git a/tns-core-modules/ui/editable-text-base/editable-text-base.ios.ts b/tns-core-modules/ui/editable-text-base/editable-text-base.ios.ts index d62b8f862..ed5967200 100644 --- a/tns-core-modules/ui/editable-text-base/editable-text-base.ios.ts +++ b/tns-core-modules/ui/editable-text-base/editable-text-base.ios.ts @@ -1,8 +1,7 @@ import { EditableTextBase as EditableTextBaseCommon, keyboardTypeProperty, - returnKeyTypeProperty, editableProperty, updateTextTriggerProperty, - autocapitalizationTypeProperty, autocorrectProperty, hintProperty, - textProperty + returnKeyTypeProperty, + autocapitalizationTypeProperty, autocorrectProperty } from "./editable-text-base-common"; export * from "./editable-text-base-common"; diff --git a/tns-core-modules/ui/frame/frame.android.ts b/tns-core-modules/ui/frame/frame.android.ts index 3b6d71e7e..0634d154f 100644 --- a/tns-core-modules/ui/frame/frame.android.ts +++ b/tns-core-modules/ui/frame/frame.android.ts @@ -679,7 +679,6 @@ class FragmentCallbacksImplementation implements AndroidFragmentCallbacks { traceWrite(`${fragment}.onCreate(${savedInstanceState})`, traceCategories.NativeLifecycle); } - superFunc.call(fragment, savedInstanceState); // There is no entry set to the fragment, so this must be destroyed fragment that was recreated by Android. // We should find its corresponding page in our backstack and set it manually. diff --git a/tns-core-modules/ui/gestures/gestures-common.ts b/tns-core-modules/ui/gestures/gestures-common.ts index 2ee7da4e5..c8a863de7 100644 --- a/tns-core-modules/ui/gestures/gestures-common.ts +++ b/tns-core-modules/ui/gestures/gestures-common.ts @@ -1,4 +1,4 @@ -import { GestureTypes as GestureTypesDefinition, GestureEventData, GesturesObserver as GesturesObserverDefinition } from "ui/gestures"; +import { GestureEventData as GestureEventData, GesturesObserver as GesturesObserverDefinition } from "ui/gestures"; import { View } from "ui/core/view"; export { View, EventData, layout } from "ui/core/view"; diff --git a/tns-core-modules/ui/image/image-common.ts b/tns-core-modules/ui/image/image-common.ts index 6f54ac5f3..5f0881c19 100644 --- a/tns-core-modules/ui/image/image-common.ts +++ b/tns-core-modules/ui/image/image-common.ts @@ -1,5 +1,5 @@ import { Image as ImageDefinition } from "ui/image"; -import { View, Property, CssProperty, InheritedCssProperty, Style, Color, isIOS, booleanConverter } from "ui/core/view"; +import { View, Property, InheritedCssProperty, Style, Color, isIOS, booleanConverter } from "ui/core/view"; import { ImageAsset } from "image-asset"; import { ImageSource, fromAsset, fromNativeSource, fromUrl } from "image-source"; import { isDataURI, isFileOrResourcePath, RESOURCE_PREFIX } from "utils/utils"; diff --git a/tns-core-modules/ui/image/image.android.ts b/tns-core-modules/ui/image/image.android.ts index b300b095e..0dd1f8bb9 100644 --- a/tns-core-modules/ui/image/image.android.ts +++ b/tns-core-modules/ui/image/image.android.ts @@ -86,7 +86,6 @@ export class Image extends ImageBase { let value = this.src; let async = this.loadMode === ASYNC; - let owner = new WeakRef(this); this._imageLoadedListener = this._imageLoadedListener || new ImageLoadedListener(new WeakRef(this)); this.imageSource = unsetValue; diff --git a/tns-core-modules/ui/layouts/absolute-layout/absolute-layout-common.ts b/tns-core-modules/ui/layouts/absolute-layout/absolute-layout-common.ts index cbd67540f..cd22bf877 100644 --- a/tns-core-modules/ui/layouts/absolute-layout/absolute-layout-common.ts +++ b/tns-core-modules/ui/layouts/absolute-layout/absolute-layout-common.ts @@ -1,5 +1,5 @@ import { AbsoluteLayout as AbsoluteLayoutDefinition } from "ui/layouts/absolute-layout"; -import { LayoutBase, View, Property, Length, lengthComparer, zeroLength, getLengthEffectiveValue } from "ui/layouts/layout-base"; +import { LayoutBase, View, Property, Length, zeroLength, getLengthEffectiveValue } from "ui/layouts/layout-base"; export * from "ui/layouts/layout-base"; diff --git a/tns-core-modules/ui/layouts/dock-layout/dock-layout.ios.ts b/tns-core-modules/ui/layouts/dock-layout/dock-layout.ios.ts index 0c8bcd97c..34f8576ea 100644 --- a/tns-core-modules/ui/layouts/dock-layout/dock-layout.ios.ts +++ b/tns-core-modules/ui/layouts/dock-layout/dock-layout.ios.ts @@ -1,4 +1,4 @@ -import { DockLayoutBase, View, dockProperty, stretchLastChildProperty, layout } from "./dock-layout-common"; +import { DockLayoutBase, View, layout } from "./dock-layout-common"; export * from "./dock-layout-common"; diff --git a/tns-core-modules/ui/layouts/flexbox-layout/flexbox-layout-common.ts b/tns-core-modules/ui/layouts/flexbox-layout/flexbox-layout-common.ts index 1213e6af6..27bab7bfd 100644 --- a/tns-core-modules/ui/layouts/flexbox-layout/flexbox-layout-common.ts +++ b/tns-core-modules/ui/layouts/flexbox-layout/flexbox-layout-common.ts @@ -1,4 +1,3 @@ -import * as flexbox from "ui/layouts/flexbox-layout"; import { LayoutBase, View, Style, Property, CssProperty, isIOS, ShorthandProperty, makeValidator, makeParser} from "ui/layouts/layout-base"; export * from "ui/layouts/layout-base"; @@ -276,7 +275,6 @@ flexWrapBeforeProperty1.register(View); const alignSelfProperty1 = new Property({ name: "alignSelf", defaultValue: AlignSelf.AUTO, valueConverter: AlignSelf.parse }); alignSelfProperty1.register(View); - // registerSpecialProperty("order", (instance, propertyValue) => { // FlexboxLayoutBase.setOrder(instance, !isNaN(+propertyValue) && +propertyValue); // }); diff --git a/tns-core-modules/ui/layouts/flexbox-layout/flexbox-layout.ios.ts b/tns-core-modules/ui/layouts/flexbox-layout/flexbox-layout.ios.ts index 42b2621d9..3cc814c4d 100644 --- a/tns-core-modules/ui/layouts/flexbox-layout/flexbox-layout.ios.ts +++ b/tns-core-modules/ui/layouts/flexbox-layout/flexbox-layout.ios.ts @@ -6,8 +6,7 @@ import { flexShrinkProperty, FlexShrink, flexWrapBeforeProperty, FlexWrapBefore, alignSelfProperty, AlignSelf, - FlexBasisPercent, - flexDirectionProperty, flexWrapProperty, justifyContentProperty, alignItemsProperty, alignContentProperty + FlexBasisPercent } from "./flexbox-layout-common"; export * from "./flexbox-layout-common"; diff --git a/tns-core-modules/ui/layouts/grid-layout/grid-layout.ios.ts b/tns-core-modules/ui/layouts/grid-layout/grid-layout.ios.ts index 34d280cc5..7ed9c8748 100644 --- a/tns-core-modules/ui/layouts/grid-layout/grid-layout.ios.ts +++ b/tns-core-modules/ui/layouts/grid-layout/grid-layout.ios.ts @@ -1,6 +1,5 @@ import { - GridLayoutBase, ItemSpec, View, layout, - rowProperty, columnProperty, rowSpanProperty, columnSpanProperty + GridLayoutBase, ItemSpec, View, layout } from "./grid-layout-common"; export * from "./grid-layout-common"; diff --git a/tns-core-modules/ui/layouts/layout-base.android.ts b/tns-core-modules/ui/layouts/layout-base.android.ts index e0034e6b5..8fbda3e3b 100644 --- a/tns-core-modules/ui/layouts/layout-base.android.ts +++ b/tns-core-modules/ui/layouts/layout-base.android.ts @@ -1,6 +1,6 @@ import { LayoutBaseCommon, clipToBoundsProperty, - paddingLeftProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty, Length, layout + paddingLeftProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty, Length } from "./layout-base-common"; export * from "./layout-base-common"; @@ -25,7 +25,6 @@ export class LayoutBase extends LayoutBaseCommon { console.warn(`clipToBounds with value false is not supported on Android. You can use this.android.getParent().setClipChildren(false) as an alternative`); } - //PaddingTop get [paddingTopProperty.native](): Length { return { value: org.nativescript.widgets.ViewHelper.getPaddingTop(this.nativeView), unit: "px" }; diff --git a/tns-core-modules/ui/layouts/layout-base.d.ts b/tns-core-modules/ui/layouts/layout-base.d.ts index 2abc2291d..95f5c8776 100644 --- a/tns-core-modules/ui/layouts/layout-base.d.ts +++ b/tns-core-modules/ui/layouts/layout-base.d.ts @@ -95,6 +95,5 @@ clipToBounds: boolean; } - export const clipToBoundsProperty: Property; } \ No newline at end of file diff --git a/tns-core-modules/ui/layouts/stack-layout/stack-layout.ios.ts b/tns-core-modules/ui/layouts/stack-layout/stack-layout.ios.ts index 920a0f7c7..a48789d0f 100644 --- a/tns-core-modules/ui/layouts/stack-layout/stack-layout.ios.ts +++ b/tns-core-modules/ui/layouts/stack-layout/stack-layout.ios.ts @@ -1,4 +1,4 @@ -import { StackLayoutBase, orientationProperty, View, layout, VerticalAlignment, HorizontalAlignment } from "./stack-layout-common"; +import { StackLayoutBase, View, layout, VerticalAlignment, HorizontalAlignment } from "./stack-layout-common"; export * from "./stack-layout-common"; diff --git a/tns-core-modules/ui/layouts/wrap-layout/wrap-layout.ios.ts b/tns-core-modules/ui/layouts/wrap-layout/wrap-layout.ios.ts index 36d342b6a..b89337273 100644 --- a/tns-core-modules/ui/layouts/wrap-layout/wrap-layout.ios.ts +++ b/tns-core-modules/ui/layouts/wrap-layout/wrap-layout.ios.ts @@ -1,4 +1,4 @@ -import { WrapLayoutBase, View, orientationProperty, itemWidthProperty, itemHeightProperty, layout } from "./wrap-layout-common"; +import { WrapLayoutBase, View, layout } from "./wrap-layout-common"; export * from "./wrap-layout-common"; diff --git a/tns-core-modules/ui/list-view/list-view-common.ts b/tns-core-modules/ui/list-view/list-view-common.ts index 04ac14662..578102e2c 100644 --- a/tns-core-modules/ui/list-view/list-view-common.ts +++ b/tns-core-modules/ui/list-view/list-view-common.ts @@ -1,5 +1,5 @@ import { ListView as ListViewDefinition, ItemsSource } from "ui/list-view"; -import { CoercibleProperty, CssProperty, Style, Bindable, EventData, Observable, View, Template, KeyedTemplate, Length, layout, Property, Color, lengthComparer } from "ui/core/view"; +import { CoercibleProperty, CssProperty, Style, Bindable, View, Template, KeyedTemplate, Length, Property, Color, lengthComparer } from "ui/core/view"; import { parse, parseMultipleTemplates } from "ui/builder"; import { Label } from "ui/label"; import { ObservableArray, ChangedData } from "data/observable-array"; @@ -25,7 +25,6 @@ export abstract class ListViewBase extends View implements ListViewDefinition { // TODO: get rid of such hacks. public static knownFunctions = ["itemTemplateSelector"]; //See component-builder.ts isKnownFunction - private _itemTemplateSelector: (item: any, index: number, items: any) => string; private _itemTemplateSelectorBindable = new Bindable(); public _defaultTemplate: KeyedTemplate = { diff --git a/tns-core-modules/ui/list-view/list-view.android.ts b/tns-core-modules/ui/list-view/list-view.android.ts index 68bf71038..869fd44a9 100644 --- a/tns-core-modules/ui/list-view/list-view.android.ts +++ b/tns-core-modules/ui/list-view/list-view.android.ts @@ -1,6 +1,6 @@ import { ItemEventData, ItemsSource } from "ui/list-view"; import { - ListViewBase, View, KeyedTemplate, Length, Property, unsetValue, Observable, Color, + ListViewBase, View, KeyedTemplate, Length, unsetValue, Observable, Color, separatorColorProperty, itemTemplatesProperty } from "./list-view-common"; import { StackLayout } from "ui/layouts/stack-layout"; @@ -51,7 +51,6 @@ export class ListView extends ListViewBase { ensureListViewAdapterClass(); this._android.setAdapter(new ListViewAdapterClass(this)); - let that = new WeakRef(this); this._itemClickListener = this._itemClickListener || new ItemClickListener(new WeakRef(this)); this.android.setOnItemClickListener(this._itemClickListener); } diff --git a/tns-core-modules/ui/list-view/list-view.ios.ts b/tns-core-modules/ui/list-view/list-view.ios.ts index d96829c18..60665854a 100644 --- a/tns-core-modules/ui/list-view/list-view.ios.ts +++ b/tns-core-modules/ui/list-view/list-view.ios.ts @@ -1,11 +1,10 @@ -import { ItemEventData, ItemsSource } from "ui/list-view"; +import { ItemEventData } from "ui/list-view"; import { - ListViewBase, View, KeyedTemplate, Length, Property, unsetValue, Observable, Color, + ListViewBase, View, KeyedTemplate, Length, Observable, Color, separatorColorProperty, itemTemplatesProperty, layout, EventData } from "./list-view-common"; import { StackLayout } from "ui/layouts/stack-layout"; import { ProxyViewContainer } from "ui/proxy-view-container"; -import { LayoutBase } from "ui/layouts/layout-base"; import { ios } from "utils/utils"; export * from "./list-view-common"; diff --git a/tns-core-modules/ui/page/page-common.ts b/tns-core-modules/ui/page/page-common.ts index ddab1c62b..db9e3d79c 100644 --- a/tns-core-modules/ui/page/page-common.ts +++ b/tns-core-modules/ui/page/page-common.ts @@ -1,6 +1,6 @@ import { Page as PageDefinition, NavigatedData, ShownModallyData } from "ui/page"; import { - ContentView, EventData, View, Template, KeyedTemplate, Length, backgroundColorProperty, + ContentView, View, backgroundColorProperty, eachDescendant, Property, Color, isIOS, booleanConverter, resetStyleProperties } from "ui/content-view"; import { Frame, topmost as topmostFrame, resolvePageFromEntry } from "ui/frame"; @@ -51,7 +51,6 @@ export class PageBase extends ContentView implements PageDefinition { // super.onLoaded(); // } - get navigationContext(): any { return this._navigationContext; } diff --git a/tns-core-modules/ui/page/page.android.ts b/tns-core-modules/ui/page/page.android.ts index bcef2ef9b..d44cfcd4a 100644 --- a/tns-core-modules/ui/page/page.android.ts +++ b/tns-core-modules/ui/page/page.android.ts @@ -1,4 +1,4 @@ -import { View, PageBase, Color, actionBarHiddenProperty, enableSwipeBackNavigationProperty, statusBarStyleProperty, androidStatusBarBackgroundProperty, HorizontalAlignment, VerticalAlignment } from "./page-common"; +import { View, PageBase, Color, actionBarHiddenProperty, statusBarStyleProperty, androidStatusBarBackgroundProperty, HorizontalAlignment, VerticalAlignment } from "./page-common"; import { ActionBar } from "ui/action-bar"; import { GridLayout } from "ui/layouts/grid-layout"; import { DIALOG_FRAGMENT_TAG } from "./constants"; diff --git a/tns-core-modules/ui/page/page.d.ts b/tns-core-modules/ui/page/page.d.ts index 616181467..f318d2739 100644 --- a/tns-core-modules/ui/page/page.d.ts +++ b/tns-core-modules/ui/page/page.d.ts @@ -2,7 +2,7 @@ * Contains the Page class, which represents a logical unit for navigation inside a Frame. */ declare module "ui/page" { - import { ContentView, EventData, View, Template, KeyedTemplate, Length, Property, Color } from "ui/content-view"; + import { ContentView, EventData, Property, Color } from "ui/content-view"; import { Frame } from "ui/frame"; import { ActionBar } from "ui/action-bar"; import { KeyframeAnimationInfo } from "ui/animation/keyframe-animation"; diff --git a/tns-core-modules/ui/page/page.ios.ts b/tns-core-modules/ui/page/page.ios.ts index 525f22f7c..3d85b4b49 100644 --- a/tns-core-modules/ui/page/page.ios.ts +++ b/tns-core-modules/ui/page/page.ios.ts @@ -1,12 +1,10 @@ import { - PageBase, View, layout, Color, - actionBarHiddenProperty, enableSwipeBackNavigationProperty, statusBarStyleProperty, + PageBase, View, layout, + actionBarHiddenProperty, statusBarStyleProperty, traceEnabled, traceWrite, traceCategories } from "./page-common"; import { ios as iosApp } from "application"; import { device } from "platform"; -import { ActionBar } from "ui/action-bar"; -import { GridLayout } from "ui/layouts/grid-layout"; import * as uiUtils from "ui/utils"; export * from "./page-common"; diff --git a/tns-core-modules/ui/placeholder/placeholder.android.ts b/tns-core-modules/ui/placeholder/placeholder.android.ts index a7aead4d9..4234abb08 100644 --- a/tns-core-modules/ui/placeholder/placeholder.android.ts +++ b/tns-core-modules/ui/placeholder/placeholder.android.ts @@ -1,5 +1,4 @@ import { Placeholder as PlaceholderDefinition, CreateViewEventData } from "ui/placeholder" -import { View } from "ui/core/view"; export class Placeholder extends PlaceholderDefinition { public static creatingViewEvent = "creatingView"; diff --git a/tns-core-modules/ui/placeholder/placeholder.ios.ts b/tns-core-modules/ui/placeholder/placeholder.ios.ts index 47e05d02f..8dde45932 100644 --- a/tns-core-modules/ui/placeholder/placeholder.ios.ts +++ b/tns-core-modules/ui/placeholder/placeholder.ios.ts @@ -1,5 +1,4 @@ import { Placeholder as PlaceholderDefinition, CreateViewEventData } from "ui/placeholder" -import { View } from "ui/core/view"; export class Placeholder extends PlaceholderDefinition { public static creatingViewEvent = "creatingView"; diff --git a/tns-core-modules/ui/progress/progress.android.ts b/tns-core-modules/ui/progress/progress.android.ts index 5600fa668..7eb481bba 100644 --- a/tns-core-modules/ui/progress/progress.android.ts +++ b/tns-core-modules/ui/progress/progress.android.ts @@ -1,5 +1,5 @@ import { - View, Color, ProgressBase, valueProperty, maxValueProperty, + Color, ProgressBase, valueProperty, maxValueProperty, colorProperty, backgroundColorProperty, backgroundInternalProperty } from "./progress-common"; diff --git a/tns-core-modules/ui/progress/progress.ios.ts b/tns-core-modules/ui/progress/progress.ios.ts index cfdfa114c..8cd1e1bcb 100644 --- a/tns-core-modules/ui/progress/progress.ios.ts +++ b/tns-core-modules/ui/progress/progress.ios.ts @@ -1,5 +1,5 @@ import { - ProgressBase, View, Color, valueProperty, maxValueProperty, + ProgressBase, Color, valueProperty, maxValueProperty, colorProperty, backgroundColorProperty, backgroundInternalProperty } from "./progress-common"; diff --git a/tns-core-modules/ui/repeater/repeater.ts b/tns-core-modules/ui/repeater/repeater.ts index 90902e419..ab6b17b14 100644 --- a/tns-core-modules/ui/repeater/repeater.ts +++ b/tns-core-modules/ui/repeater/repeater.ts @@ -1,6 +1,6 @@ import { Repeater as RepeaterDefinition, ItemsSource } from "ui/repeater"; import { Label } from "ui/label"; -import { LayoutBase, CustomLayoutView, View, Template, Property, Observable ,layout } from "ui/layouts/layout-base"; +import { LayoutBase, CustomLayoutView, View, Template, Property, layout } from "ui/layouts/layout-base"; import { StackLayout } from "ui/layouts/stack-layout"; import { ObservableArray, ChangedData } from "data/observable-array"; import { addWeakEventListener, removeWeakEventListener } from "ui/core/weak-event-listener"; diff --git a/tns-core-modules/ui/scroll-view/scroll-view-common.ts b/tns-core-modules/ui/scroll-view/scroll-view-common.ts index 5e081a8cd..ec7c7710b 100644 --- a/tns-core-modules/ui/scroll-view/scroll-view-common.ts +++ b/tns-core-modules/ui/scroll-view/scroll-view-common.ts @@ -1,5 +1,5 @@ import { ScrollView as ScrollViewDefinition } from "ui/scroll-view"; -import { ContentView, EventData, Property } from "ui/content-view"; +import { ContentView, Property } from "ui/content-view"; export * from "ui/content-view"; @@ -79,7 +79,6 @@ export abstract class ScrollViewBase extends ContentView implements ScrollViewDe public abstract scrollToHorizontalOffset(value: number, animated: boolean); } - export const orientationProperty = new Property({ name: "orientation", defaultValue: "vertical", affectsLayout: true, valueConverter: (value) => { if (value === "vertical") { diff --git a/tns-core-modules/ui/scroll-view/scroll-view.ios.ts b/tns-core-modules/ui/scroll-view/scroll-view.ios.ts index e92fbb396..5419eaf49 100644 --- a/tns-core-modules/ui/scroll-view/scroll-view.ios.ts +++ b/tns-core-modules/ui/scroll-view/scroll-view.ios.ts @@ -1,5 +1,5 @@ import { ScrollEventData } from "ui/scroll-view"; -import { View, layout, ScrollViewBase, orientationProperty } from "./scroll-view-common"; +import { View, layout, ScrollViewBase } from "./scroll-view-common"; export * from "./scroll-view-common"; diff --git a/tns-core-modules/ui/search-bar/search-bar-common.ts b/tns-core-modules/ui/search-bar/search-bar-common.ts index f27af05d8..0d193b028 100644 --- a/tns-core-modules/ui/search-bar/search-bar-common.ts +++ b/tns-core-modules/ui/search-bar/search-bar-common.ts @@ -1,5 +1,5 @@ import { SearchBar as SearchBarDefinition } from "ui/search-bar"; -import { View, Property, EventData, Color, isIOS } from "ui/core/view"; +import { View, Property, Color, isIOS } from "ui/core/view"; export * from "ui/core/view"; diff --git a/tns-core-modules/ui/search-bar/search-bar.android.ts b/tns-core-modules/ui/search-bar/search-bar.android.ts index 1bea5360b..c05f5ded0 100644 --- a/tns-core-modules/ui/search-bar/search-bar.android.ts +++ b/tns-core-modules/ui/search-bar/search-bar.android.ts @@ -83,7 +83,6 @@ export class SearchBar extends SearchBarBase { this._android.setIconified(false); - var that = new WeakRef(this); this._queryTextListener = this._queryTextListener || new QueryTextListener(new WeakRef(this)); this._android.setOnQueryTextListener(this._queryTextListener); @@ -144,7 +143,6 @@ export class SearchBar extends SearchBarBase { let textView = getSearchViewTextView(this._android); let typeface: android.graphics.Typeface; - let fontSize: number; if (value instanceof Font) { typeface = value.getAndroidTypeface(); textView.setTextSize(value.fontSize); diff --git a/tns-core-modules/ui/segmented-bar/segmented-bar-common.ts b/tns-core-modules/ui/segmented-bar/segmented-bar-common.ts index 670a7c0a2..95c599c61 100644 --- a/tns-core-modules/ui/segmented-bar/segmented-bar-common.ts +++ b/tns-core-modules/ui/segmented-bar/segmented-bar-common.ts @@ -1,7 +1,7 @@ import { SegmentedBar as SegmentedBarDefinition, SegmentedBarItem as SegmentedBarItemDefinition, SelectedIndexChangedEventData } from "ui/segmented-bar"; import { ViewBase, View, AddChildFromBuilder, AddArrayFromBuilder, - Property, CoercibleProperty, CssProperty, EventData, Color, Style + Property, CoercibleProperty, CssProperty, Color, Style } from "ui/core/view"; export * from "ui/core/view"; diff --git a/tns-core-modules/ui/segmented-bar/segmented-bar.android.ts b/tns-core-modules/ui/segmented-bar/segmented-bar.android.ts index 212805029..8814d1cfa 100644 --- a/tns-core-modules/ui/segmented-bar/segmented-bar.android.ts +++ b/tns-core-modules/ui/segmented-bar/segmented-bar.android.ts @@ -178,7 +178,6 @@ export class SegmentedBar extends SegmentedBarBase { private _android: android.widget.TabHost; private listener: android.widget.TabHost.OnTabChangeListener; private tabContentFactory: android.widget.TabHost.TabContentFactory; - private apiLevel: number; public _createUI() { ensureTabHostClass(); @@ -222,10 +221,10 @@ export class SegmentedBar extends SegmentedBarBase { // this.resetNativeListener(); } - private resetNativeListener() { - this.android.setOnTabChangedListener(null); - this.android.setOnTabChangedListener(this.listener); - } + // private resetNativeListener() { + // this.android.setOnTabChangedListener(null); + // this.android.setOnTabChangedListener(this.listener); + // } get [selectedIndexProperty.native](): number { return -1; diff --git a/tns-core-modules/ui/styling/background-common.ts b/tns-core-modules/ui/styling/background-common.ts index ec74ce988..b13111764 100644 --- a/tns-core-modules/ui/styling/background-common.ts +++ b/tns-core-modules/ui/styling/background-common.ts @@ -1,5 +1,5 @@ import { Background as BackgroundDefinition, BackgroundDrawParams } from "ui/styling/background"; -import { Color, layout, BackgroundRepeat } from "ui/core/view"; +import { Color, BackgroundRepeat } from "ui/core/view"; import { ImageSource } from "image-source"; import { CSSValue, parse as cssParse } from "css-value"; export * from "ui/core/view"; diff --git a/tns-core-modules/ui/styling/font.android.ts b/tns-core-modules/ui/styling/font.android.ts index d90713587..c096267c6 100644 --- a/tns-core-modules/ui/styling/font.android.ts +++ b/tns-core-modules/ui/styling/font.android.ts @@ -1,4 +1,4 @@ -import { FontBase, parseFontFamily, genericFontFamilies, parseFont, FontWeight } from "./font-common"; +import { FontBase, parseFontFamily, genericFontFamilies, FontWeight } from "./font-common"; import { enabled as traceEnabled, write as traceWrite, categories as traceCategories, messageType as traceMessageType } from "trace"; import * as application from "application"; import * as fs from "file-system"; diff --git a/tns-core-modules/ui/styling/font.ios.ts b/tns-core-modules/ui/styling/font.ios.ts index 986b90d5e..feb02bbac 100644 --- a/tns-core-modules/ui/styling/font.ios.ts +++ b/tns-core-modules/ui/styling/font.ios.ts @@ -1,4 +1,4 @@ -import { FontBase, parseFontFamily, genericFontFamilies, parseFont, FontStyle, FontWeight } from "./font-common"; +import { FontBase, parseFontFamily, genericFontFamilies, FontStyle, FontWeight } from "./font-common"; import { enabled as traceEnabled, write as traceWrite, categories as traceCategories, messageType as traceMessageType } from "trace"; import * as fs from "file-system"; import * as utils from "utils/utils"; @@ -42,7 +42,6 @@ export class Font extends FontBase { } } - export const systemFontFamilies = new Set(); export const systemFonts = new Set(); @@ -311,8 +310,6 @@ export module ios { const error = new interop.Reference(); if (!CTFontManagerRegisterGraphicsFont(font, error)) { - - if (traceEnabled) { traceWrite("Error occur while registering font: " + CFErrorCopyDescription(error.value), traceCategories.Error, traceMessageType.error); } diff --git a/tns-core-modules/ui/styling/style-scope.ts b/tns-core-modules/ui/styling/style-scope.ts index 4af57b86d..11fecf064 100644 --- a/tns-core-modules/ui/styling/style-scope.ts +++ b/tns-core-modules/ui/styling/style-scope.ts @@ -5,13 +5,11 @@ import { KeyframeAnimationInfo, KeyframeAnimation } from "ui/animation/keyframe- import { write as traceWrite, categories as traceCategories, messageType as traceMessageType } from "trace"; import { File, knownFolders, path } from "file-system"; import { CssAnimationParser } from "./css-animation-parser"; -import { isFileOrResourcePath } from "utils/utils"; import * as application from "application"; const animationsSymbol: symbol = Symbol("animations"); - let pattern: RegExp = /('|")(.*?)\1/; export class CssState { diff --git a/tns-core-modules/ui/styling/style.ts b/tns-core-modules/ui/styling/style.ts index 1f735628d..d18340a19 100644 --- a/tns-core-modules/ui/styling/style.ts +++ b/tns-core-modules/ui/styling/style.ts @@ -1,7 +1,6 @@ import { Style as StyleDefinition } from "ui/styling/style"; import { Length, PercentLength, Color, Background, Font, ViewBase, BackgroundRepeat, Visibility, HorizontalAlignment, VerticalAlignment } from "ui/core/view"; import { Observable } from "data/observable"; -import { resetStyleProperties } from "ui/core/properties"; import { FlexDirection, FlexWrap, JustifyContent, AlignItems, AlignContent, diff --git a/tns-core-modules/ui/switch/switch.android.ts b/tns-core-modules/ui/switch/switch.android.ts index c0e75cbd9..6979db1cc 100644 --- a/tns-core-modules/ui/switch/switch.android.ts +++ b/tns-core-modules/ui/switch/switch.android.ts @@ -1,5 +1,5 @@ import { Switch as SwitchDefinition } from "ui/switch"; -import { View, layout, Color, Property, colorProperty, backgroundColorProperty, backgroundInternalProperty, booleanConverter } from "ui/core/view"; +import { View, Color, Property, colorProperty, backgroundColorProperty, backgroundInternalProperty, booleanConverter } from "ui/core/view"; export * from "ui/core/view"; diff --git a/tns-core-modules/ui/tab-view/tab-view-common.ts b/tns-core-modules/ui/tab-view/tab-view-common.ts index 9fbc4ff69..5bb883ced 100644 --- a/tns-core-modules/ui/tab-view/tab-view-common.ts +++ b/tns-core-modules/ui/tab-view/tab-view-common.ts @@ -1,7 +1,7 @@ import { TabView as TabViewDefinition, TabViewItem as TabViewItemDefinition, SelectedIndexChangedEventData } from "ui/tab-view"; import { View, ViewBase, Style, Property, CssProperty, CoercibleProperty, - EventData, Color, isIOS, AddArrayFromBuilder, AddChildFromBuilder + Color, isIOS, AddArrayFromBuilder, AddChildFromBuilder } from "ui/core/view"; export * from "ui/core/view"; diff --git a/tns-core-modules/ui/tab-view/tab-view.android.ts b/tns-core-modules/ui/tab-view/tab-view.android.ts index 0806994de..863351c63 100644 --- a/tns-core-modules/ui/tab-view/tab-view.android.ts +++ b/tns-core-modules/ui/tab-view/tab-view.android.ts @@ -2,7 +2,7 @@ import { TabViewBase, TabViewItemBase, itemsProperty, selectedIndexProperty, tabTextColorProperty, tabBackgroundColorProperty, selectedTabTextColorProperty, androidSelectedTabHighlightColorProperty, androidOffscreenTabLimitProperty, - fontInternalProperty, traceCategory, View, colorProperty, layout, Bindable, isIOS, Color, Font, traceEnabled, traceWrite + fontInternalProperty, traceCategory, View, colorProperty, layout, Color, Font, traceEnabled, traceWrite } from "./tab-view-common" import { textTransformProperty, TextTransform, getTransformedText } from "ui/text-base"; import { fromFileOrResource } from "image-source"; diff --git a/tns-core-modules/ui/tab-view/tab-view.ios.ts b/tns-core-modules/ui/tab-view/tab-view.ios.ts index f60c9cf08..a7d58c623 100644 --- a/tns-core-modules/ui/tab-view/tab-view.ios.ts +++ b/tns-core-modules/ui/tab-view/tab-view.ios.ts @@ -1,15 +1,12 @@ import { TabViewBase, TabViewItemBase, itemsProperty, selectedIndexProperty, - tabTextColorProperty, tabBackgroundColorProperty, selectedTabTextColorProperty, iosIconRenderingModeProperty, traceCategory, - Font, View, colorProperty, fontInternalProperty, layout, Color, traceEnabled, traceWrite, traceCategories + tabTextColorProperty, tabBackgroundColorProperty, selectedTabTextColorProperty, iosIconRenderingModeProperty, + Font, View, fontInternalProperty, layout, Color, traceEnabled, traceWrite, traceCategories } from "./tab-view-common" import { textTransformProperty, TextTransform, getTransformedText } from "ui/text-base"; import { fromFileOrResource } from "image-source"; import { Page } from "ui/page"; -import { ios } from "utils/utils"; - -import getter = ios.getter; export * from "./tab-view-common"; @@ -451,8 +448,8 @@ export class TabView extends TabViewBase { if (items && items.length) { for (let i = 0, length = items.length; i < length; i++) { const item = items[i]; - if (items[i].iconSource) { - (items[i])._update(); + if (item.iconSource) { + (item)._update(); } } } diff --git a/tns-core-modules/ui/text-base/text-base-common.ts b/tns-core-modules/ui/text-base/text-base-common.ts index da8604702..1a696b830 100644 --- a/tns-core-modules/ui/text-base/text-base-common.ts +++ b/tns-core-modules/ui/text-base/text-base-common.ts @@ -1,5 +1,5 @@ import { TextBase as TextBaseDefinition } from "ui/text-base"; -import { View, AddChildFromBuilder, Property, CssProperty, InheritedCssProperty, Style, isIOS, Observable, makeValidator, makeParser } from "ui/core/view"; +import { View, Property, CssProperty, InheritedCssProperty, Style, isIOS, Observable, makeValidator, makeParser } from "ui/core/view"; import { PropertyChangeData } from "data/observable"; import { FormattedString, FormattedStringView } from "text/formatted-string"; import { addWeakEventListener, removeWeakEventListener } from "ui/core/weak-event-listener"; @@ -7,8 +7,6 @@ import { addWeakEventListener, removeWeakEventListener } from "ui/core/weak-even export { FormattedString }; export * from "ui/core/view"; -const CHILD_SPAN = "Span"; - export abstract class TextBaseCommon extends View implements TextBaseDefinition, FormattedStringView { public abstract _setFormattedTextPropertyToNative(value: FormattedString): void; diff --git a/tns-core-modules/ui/text-base/text-base.android.ts b/tns-core-modules/ui/text-base/text-base.android.ts index f285a832a..7c692d78e 100644 --- a/tns-core-modules/ui/text-base/text-base.android.ts +++ b/tns-core-modules/ui/text-base/text-base.android.ts @@ -2,7 +2,7 @@ TextBaseCommon, textProperty, formattedTextProperty, textAlignmentProperty, textDecorationProperty, textTransformProperty, letterSpacingProperty, colorProperty, fontInternalProperty, whiteSpaceProperty, Font, Color, FormattedString, TextDecoration, TextAlignment, TextTransform, WhiteSpace, - paddingLeftProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty, Length, layout + paddingLeftProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty, Length } from "./text-base-common"; export * from "./text-base-common"; @@ -54,7 +54,6 @@ export class TextBase extends TextBaseCommon { let textView = this._nativeView; let typeface: android.graphics.Typeface; - let fontSize: number; if (value instanceof Font) { typeface = value.getAndroidTypeface(); textView.setTextSize(value.fontSize); diff --git a/tns-core-modules/ui/text-base/text-base.ios.ts b/tns-core-modules/ui/text-base/text-base.ios.ts index a972a800a..2ae2ab819 100644 --- a/tns-core-modules/ui/text-base/text-base.ios.ts +++ b/tns-core-modules/ui/text-base/text-base.ios.ts @@ -171,7 +171,6 @@ export function getTransformedText(text: string, textTransform: TextTransform): } } - function NSStringFromNSAttributedString(source: NSAttributedString | string): NSString { return NSString.stringWithString(source instanceof NSAttributedString && source.string || source); } diff --git a/tns-core-modules/ui/time-picker/time-picker.ios.ts b/tns-core-modules/ui/time-picker/time-picker.ios.ts index 7fca0f77c..2dfdb2536 100644 --- a/tns-core-modules/ui/time-picker/time-picker.ios.ts +++ b/tns-core-modules/ui/time-picker/time-picker.ios.ts @@ -1,4 +1,4 @@ -import { TimePickerBase, timeProperty, minuteIntervalProperty, +import { TimePickerBase, timeProperty, minuteProperty, minMinuteProperty, maxMinuteProperty, hourProperty, minHourProperty, maxHourProperty, colorProperty } from "./time-picker-common"; diff --git a/tns-core-modules/ui/transition/transition.ios.ts b/tns-core-modules/ui/transition/transition.ios.ts index 7df1681e0..017cb1894 100644 --- a/tns-core-modules/ui/transition/transition.ios.ts +++ b/tns-core-modules/ui/transition/transition.ios.ts @@ -1,6 +1,10 @@ import { Transition as TransitionDefinition } from "ui/transition"; import { NavigationTransition } from "ui/frame"; -import { enabled as traceEnabled, write as traceWrite, categories as traceCategories, notifyEvent as traceNotifyEvent, isCategorySet } from "trace"; +import { + enabled as traceEnabled, + write as traceWrite, + categories as traceCategories +} from "trace"; import * as _slideTransitionModule from "./slide-transition"; import * as _fadeTransitionModule from "./fade-transition"; diff --git a/tns-core-modules/ui/web-view/web-view-common.ts b/tns-core-modules/ui/web-view/web-view-common.ts index 8f747d797..e76ea39ab 100644 --- a/tns-core-modules/ui/web-view/web-view-common.ts +++ b/tns-core-modules/ui/web-view/web-view-common.ts @@ -1,5 +1,5 @@ import { WebView as WebViewDefinition, LoadEventData } from "ui/web-view"; -import { View, Property, EventData } from "ui/core/view"; +import { View, Property } from "ui/core/view"; import { isFileOrResourcePath } from "utils/utils"; import { File, knownFolders, path } from "file-system"; diff --git a/tns-core-modules/ui/web-view/web-view.android.ts b/tns-core-modules/ui/web-view/web-view.android.ts index c74a12cdd..3b79d28c7 100644 --- a/tns-core-modules/ui/web-view/web-view.android.ts +++ b/tns-core-modules/ui/web-view/web-view.android.ts @@ -1,4 +1,4 @@ -import { WebViewBase, File, knownFolders, path, traceEnabled, traceWrite, traceCategories } from "./web-view-common"; +import { WebViewBase, knownFolders, traceEnabled, traceWrite, traceCategories } from "./web-view-common"; export * from "./web-view-common"; diff --git a/tns-core-modules/ui/web-view/web-view.ios.ts b/tns-core-modules/ui/web-view/web-view.ios.ts index c253ae133..6b1ef6bce 100644 --- a/tns-core-modules/ui/web-view/web-view.ios.ts +++ b/tns-core-modules/ui/web-view/web-view.ios.ts @@ -1,4 +1,4 @@ -import { WebViewBase, File, knownFolders, path, traceWrite, traceEnabled, traceCategories } from "./web-view-common"; +import { WebViewBase, knownFolders, traceWrite, traceEnabled, traceCategories } from "./web-view-common"; export * from "./web-view-common"; diff --git a/tns-core-modules/utils/utils.android.ts b/tns-core-modules/utils/utils.android.ts index a75815bfa..c45be48d8 100644 --- a/tns-core-modules/utils/utils.android.ts +++ b/tns-core-modules/utils/utils.android.ts @@ -1,6 +1,5 @@ import { - enabled as traceEnabled, write as traceWrite, categories as traceCategories, - messageType as traceMessageType, notifyEvent as traceNotifyEvent, isCategorySet + write as traceWrite, categories as traceCategories, messageType as traceMessageType } from "trace"; export * from "./utils-common"; diff --git a/tns-core-modules/utils/utils.ios.ts b/tns-core-modules/utils/utils.ios.ts index ae8e775ac..d6b0bd35f 100644 --- a/tns-core-modules/utils/utils.ios.ts +++ b/tns-core-modules/utils/utils.ios.ts @@ -1,9 +1,7 @@ -import * as dts from "utils/utils"; -import { Color } from "color"; +import { Color } from "color"; import * as fsModule from "file-system"; import { - enabled as traceEnabled, write as traceWrite, categories as traceCategories, - messageType as traceMessageType, notifyEvent as traceNotifyEvent, isCategorySet + write as traceWrite, categories as traceCategories, messageType as traceMessageType } from "trace"; export * from "./utils-common";