mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup reexports
This commit is contained in:
@@ -1,21 +1,29 @@
|
||||
// Types
|
||||
import { TextTransformation, TextDecoration, TextAlignment, TextTransform, WhiteSpace, getClosestPropertyValue } from "./text-base-common";
|
||||
import { TextDecoration, TextAlignment, TextTransform, WhiteSpace, getClosestPropertyValue } from "./text-base-common";
|
||||
|
||||
// Requires
|
||||
import { Font } from "../styling/font";
|
||||
import { backgroundColorProperty, VerticalAlignment } from "../styling/style-properties";
|
||||
import {
|
||||
TextBaseCommon, formattedTextProperty, textAlignmentProperty, textDecorationProperty, fontSizeProperty,
|
||||
textProperty, textTransformProperty, letterSpacingProperty, colorProperty, fontInternalProperty,
|
||||
paddingLeftProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty, Length,
|
||||
whiteSpaceProperty, lineHeightProperty, FormattedString, layout, Span, Color, isBold, resetSymbol
|
||||
TextBaseCommon, formattedTextProperty, textAlignmentProperty, textDecorationProperty,
|
||||
textProperty, textTransformProperty, letterSpacingProperty,
|
||||
whiteSpaceProperty, lineHeightProperty, isBold, resetSymbol
|
||||
} from "./text-base-common";
|
||||
import { Color } from "../../color";
|
||||
import { colorProperty, fontSizeProperty, fontInternalProperty, paddingLeftProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty, Length } from "../styling/style-properties";
|
||||
import { FormattedString } from "./formatted-string";
|
||||
import { Span } from "./span";
|
||||
import { layout } from "../../utils/utils";
|
||||
import { isString } from "../../utils/types";
|
||||
|
||||
export * from "./text-base-common";
|
||||
|
||||
let TextTransformation: TextTransformation;
|
||||
|
||||
export interface TextTransformation {
|
||||
new(owner: TextBase): any /* android.text.method.TransformationMethod */;
|
||||
}
|
||||
|
||||
function initializeTextTransformation(): void {
|
||||
if (TextTransformation) {
|
||||
return;
|
||||
@@ -545,7 +553,7 @@ function setSpanModifiers(ssb: android.text.SpannableStringBuilder, span: Span,
|
||||
ssb.setSpan(new android.text.style.ForegroundColorSpan(color.android), start, end, android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
|
||||
const backgroundColor: Color = getClosestPropertyValue(backgroundColorProperty, span);
|
||||
const backgroundColor: Color = getClosestPropertyValue(<any>backgroundColorProperty, span);
|
||||
|
||||
if (backgroundColor) {
|
||||
ssb.setSpan(new android.text.style.BackgroundColorSpan(backgroundColor.android), start, end, android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
|
||||
4
nativescript-core/ui/text-base/index.d.ts
vendored
4
nativescript-core/ui/text-base/index.d.ts
vendored
@@ -110,6 +110,10 @@ export class TextBase extends View implements AddChildFromBuilder {
|
||||
//@endprivate
|
||||
}
|
||||
|
||||
export interface TextTransformation {
|
||||
new(owner: TextBase): any /* android.text.method.TransformationMethod */;
|
||||
}
|
||||
|
||||
export const textProperty: Property<TextBase, string>;
|
||||
export const formattedTextProperty: Property<TextBase, FormattedString>;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ import { TextDecoration, TextAlignment, TextTransform, getClosestPropertyValue }
|
||||
|
||||
// Requires
|
||||
import { Font } from "../styling/font";
|
||||
import { VerticalAlignment } from "../styling/style-properties";
|
||||
import {
|
||||
TextBaseCommon, textProperty, formattedTextProperty, textAlignmentProperty, textDecorationProperty,
|
||||
textTransformProperty, letterSpacingProperty, lineHeightProperty,
|
||||
@@ -12,10 +11,9 @@ import {
|
||||
import { Color } from "../../color";
|
||||
import { FormattedString } from "./formatted-string";
|
||||
import { Span } from "./span";
|
||||
import { colorProperty, fontInternalProperty } from "../styling/style-properties";
|
||||
import { colorProperty, fontInternalProperty, VerticalAlignment } from "../styling/style-properties";
|
||||
import { isString } from "../../utils/types";
|
||||
import { ios, layout } from "../../utils/utils";
|
||||
import { Property } from "../core/properties";
|
||||
import { ios } from "../../utils/utils";
|
||||
|
||||
export * from "./text-base-common";
|
||||
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
// Types
|
||||
import { TextBase } from "./text-base";
|
||||
|
||||
export interface TextTransformation {
|
||||
new(owner: TextBase): any /* android.text.method.TransformationMethod */;
|
||||
}
|
||||
|
||||
export type WhiteSpace = "initial" | "normal" | "nowrap";
|
||||
export type WhiteSpace = "initial" | "normal" | "nowrap";
|
||||
export type TextAlignment = "initial" | "left" | "center" | "right";
|
||||
export type TextTransform = "initial" | "none" | "capitalize" | "uppercase" | "lowercase";
|
||||
export type TextDecoration = "none" | "underline" | "line-through" | "underline line-through";
|
||||
|
||||
Reference in New Issue
Block a user