mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 11:17:04 +08:00
refactor: cleanup unused elements (#6732)
This commit is contained in:
@ -6,7 +6,6 @@ import {
|
|||||||
layout, Color, traceMissingIcon } from "./action-bar-common";
|
layout, Color, traceMissingIcon } from "./action-bar-common";
|
||||||
import { fromFileOrResource } from "../../image-source";
|
import { fromFileOrResource } from "../../image-source";
|
||||||
import { ios as iosUtils } from "../../utils/utils";
|
import { ios as iosUtils } from "../../utils/utils";
|
||||||
import { write as traceWrite, categories, messageType } from "../../trace";
|
|
||||||
|
|
||||||
export * from "./action-bar-common";
|
export * from "./action-bar-common";
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Definitions.
|
// Definitions.
|
||||||
import { Point, View as ViewDefinition, dip } from ".";
|
import { Point, View as ViewDefinition, dip } from ".";
|
||||||
import { ViewBase } from "../view-base";
|
import { ViewBase } from "../view-base";
|
||||||
import { booleanConverter, Property } from "../view";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ViewCommon, layout, isEnabledProperty, originXProperty, originYProperty, automationTextProperty, isUserInteractionEnabledProperty,
|
ViewCommon, layout, isEnabledProperty, originXProperty, originYProperty, automationTextProperty, isUserInteractionEnabledProperty,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* iOS specific dialogs functions implementation.
|
* iOS specific dialogs functions implementation.
|
||||||
*/
|
*/
|
||||||
import { View, ios as iosView } from "../core/view";
|
import { ios as iosView } from "../core/view";
|
||||||
import { ConfirmOptions, PromptOptions, PromptResult, LoginOptions, LoginResult, ActionOptions } from ".";
|
import { ConfirmOptions, PromptOptions, PromptResult, LoginOptions, LoginResult, ActionOptions } from ".";
|
||||||
import { getCurrentPage, getLabelColor, getButtonColors, getTextFieldColor, isDialogOptions, inputType, capitalizationType, ALERT, OK, CONFIRM, CANCEL, PROMPT, parseLoginOptions } from "./dialogs-common";
|
import { getCurrentPage, getLabelColor, getButtonColors, getTextFieldColor, isDialogOptions, inputType, capitalizationType, ALERT, OK, CONFIRM, CANCEL, PROMPT, parseLoginOptions } from "./dialogs-common";
|
||||||
import { isString, isDefined, isFunction } from "../../utils/types";
|
import { isString, isDefined, isFunction } from "../../utils/types";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ListView as ListViewDefinition, ItemsSource, ItemEventData, TemplatedItemsView } from ".";
|
import { ListView as ListViewDefinition, ItemsSource, ItemEventData, TemplatedItemsView } from ".";
|
||||||
import { CoercibleProperty, CssProperty, Style, View, ViewBase, ContainerView, Template, KeyedTemplate, Length, Property, Color, Observable, EventData, CSSType } from "../core/view";
|
import { CoercibleProperty, CssProperty, Style, View, ContainerView, Template, KeyedTemplate, Length, Property, Color, Observable, EventData, CSSType } from "../core/view";
|
||||||
import { parse, parseMultipleTemplates } from "../builder";
|
import { parse, parseMultipleTemplates } from "../builder";
|
||||||
import { Label } from "../label";
|
import { Label } from "../label";
|
||||||
import { ObservableArray, ChangedData } from "../../data/observable-array";
|
import { ObservableArray, ChangedData } from "../../data/observable-array";
|
||||||
|
@ -7,7 +7,6 @@ import { StackLayout } from "../layouts/stack-layout";
|
|||||||
import { ProxyViewContainer } from "../proxy-view-container";
|
import { ProxyViewContainer } from "../proxy-view-container";
|
||||||
import { profile } from "../../profiling";
|
import { profile } from "../../profiling";
|
||||||
import * as trace from "../../trace";
|
import * as trace from "../../trace";
|
||||||
import { ios as iosUtils } from "../../utils/utils";
|
|
||||||
|
|
||||||
export * from "./list-view-common";
|
export * from "./list-view-common";
|
||||||
|
|
||||||
@ -23,7 +22,6 @@ interface ViewItemIndex {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ItemView = View & ViewItemIndex;
|
type ItemView = View & ViewItemIndex;
|
||||||
const majorVersion = iosUtils.MajorVersion;
|
|
||||||
|
|
||||||
class ListViewCell extends UITableViewCell {
|
class ListViewCell extends UITableViewCell {
|
||||||
public static initWithEmptyBackground(): ListViewCell {
|
public static initWithEmptyBackground(): ListViewCell {
|
||||||
|
@ -3,9 +3,6 @@ import {
|
|||||||
View, layout, ScrollViewBase, scrollBarIndicatorVisibleProperty, isScrollEnabledProperty
|
View, layout, ScrollViewBase, scrollBarIndicatorVisibleProperty, isScrollEnabledProperty
|
||||||
} from "./scroll-view-common";
|
} from "./scroll-view-common";
|
||||||
import { ios as iosUtils } from "../../utils/utils";
|
import { ios as iosUtils } from "../../utils/utils";
|
||||||
// HACK: Webpack. Use a fully-qualified import to allow resolve.extensions(.ios.js) to
|
|
||||||
// kick in. `../utils` doesn't seem to trigger the webpack extensions mechanism.
|
|
||||||
import * as uiUtils from "tns-core-modules/ui/utils";
|
|
||||||
|
|
||||||
export * from "./scroll-view-common";
|
export * from "./scroll-view-common";
|
||||||
|
|
||||||
@ -193,18 +190,4 @@ export class ScrollView extends ScrollViewBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTabBarHeight(scrollView: ScrollView): number {
|
|
||||||
let parent = scrollView.parent;
|
|
||||||
while (parent) {
|
|
||||||
const controller = parent.viewController;
|
|
||||||
if (controller instanceof UITabBarController) {
|
|
||||||
return uiUtils.ios.getActualHeight(controller.tabBar);
|
|
||||||
}
|
|
||||||
|
|
||||||
parent = parent.parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ScrollView.prototype.recycleNativeView = "auto";
|
ScrollView.prototype.recycleNativeView = "auto";
|
||||||
|
@ -127,7 +127,6 @@ export module ios {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rootViewController.isKindOfClass(UITabBarController.class())) {
|
if (rootViewController.isKindOfClass(UITabBarController.class())) {
|
||||||
let selectedTab = (<UITabBarController>rootViewController).selectedViewController;
|
|
||||||
return getVisibleViewController(<UITabBarController>rootViewController);
|
return getVisibleViewController(<UITabBarController>rootViewController);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user