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