mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Merge branch 'feat/monorepo' of https://github.com/NativeScript/NativeScript into feat/monorepo
This commit is contained in:
@@ -35,6 +35,7 @@ function loadActionIcon(item: ActionItemDefinition): any /* UIImage */ {
|
||||
return img;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class TapBarItemHandlerImpl extends NSObject {
|
||||
private _owner: WeakRef<ActionItemDefinition>;
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ class AnimationInfo {
|
||||
public delay: number;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class AnimationDelegateImpl extends NSObject implements CAAnimationDelegate {
|
||||
public nextAnimation: Function;
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ function initializeNativeClasses() {
|
||||
return;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class TabFragmentImplementation extends org.nativescript.widgets.FragmentBase {
|
||||
private owner: BottomNavigation;
|
||||
private index: number;
|
||||
@@ -143,6 +144,7 @@ function initializeNativeClasses() {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class BottomNavigationBarImplementation extends org.nativescript.widgets.BottomNavigationBar {
|
||||
constructor(context: android.content.Context, public owner: BottomNavigation) {
|
||||
super(context);
|
||||
|
||||
@@ -94,6 +94,7 @@ class UITabBarControllerImpl extends UITabBarController {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class UITabBarControllerDelegateImpl extends NSObject implements UITabBarControllerDelegate {
|
||||
public static ObjCProtocols = [UITabBarControllerDelegate];
|
||||
|
||||
@@ -160,6 +161,7 @@ class UITabBarControllerDelegateImpl extends NSObject implements UITabBarControl
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class UINavigationControllerDelegateImpl extends NSObject implements UINavigationControllerDelegate {
|
||||
public static ObjCProtocols = [UINavigationControllerDelegate];
|
||||
|
||||
|
||||
@@ -265,6 +265,7 @@ export class Button extends ButtonBase {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class TapHandlerImpl extends NSObject {
|
||||
private _owner: WeakRef<Button>;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* tslint:disable:no-unused-variable */
|
||||
import { ControlStateChangeListener as ControlStateChangeListenerDefinition } from '.';
|
||||
|
||||
@NativeClass
|
||||
class ObserverClass extends NSObject {
|
||||
// NOTE: Refactor this - use Typescript property instead of strings....
|
||||
observeValueForKeyPathOfObjectChangeContext(path: string) {
|
||||
|
||||
@@ -127,6 +127,7 @@ function initializeDialogFragment() {
|
||||
return;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class DialogImpl extends android.app.Dialog {
|
||||
constructor(public fragment: DialogFragmentImpl, context: android.content.Context, themeResId: number) {
|
||||
super(context, themeResId);
|
||||
|
||||
@@ -316,6 +316,7 @@ export namespace IOSHelper {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
export class UIAdaptivePresentationControllerDelegateImp extends NSObject implements UIAdaptivePresentationControllerDelegate {
|
||||
public static ObjCProtocols = [UIAdaptivePresentationControllerDelegate];
|
||||
|
||||
@@ -338,6 +339,7 @@ export namespace IOSHelper {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
export class UIPopoverPresentationControllerDelegateImp extends NSObject implements UIPopoverPresentationControllerDelegate {
|
||||
public static ObjCProtocols = [UIPopoverPresentationControllerDelegate];
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ export class DatePicker extends DatePickerBase {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class UIDatePickerChangeHandlerImpl extends NSObject {
|
||||
private _owner: WeakRef<DatePicker>;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { AndroidFragmentCallbacks, setFragmentCallbacks, setFragmentClass } from '.';
|
||||
|
||||
@JavaProxy('com.tns.FragmentClass')
|
||||
@NativeClass
|
||||
class FragmentClass extends org.nativescript.widgets.FragmentBase {
|
||||
// This field is updated in the frame module upon `new` (although hacky this eases the Fragment->callbacks association a lot)
|
||||
private _callbacks: AndroidFragmentCallbacks;
|
||||
|
||||
@@ -17,6 +17,7 @@ module UIViewControllerAnimatedTransitioningMethods {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class AnimatedTransitioning extends NSObject implements UIViewControllerAnimatedTransitioning {
|
||||
public static ObjCProtocols = [UIViewControllerAnimatedTransitioning];
|
||||
|
||||
|
||||
@@ -300,6 +300,7 @@ export class Frame extends FrameBase {
|
||||
|
||||
let transitionDelegates = new Array<TransitionDelegate>();
|
||||
|
||||
@NativeClass
|
||||
class TransitionDelegate extends NSObject {
|
||||
private _id: string;
|
||||
|
||||
@@ -348,6 +349,7 @@ class TransitionDelegate extends NSObject {
|
||||
|
||||
const _defaultTransitionDuration = 0.35;
|
||||
|
||||
@NativeClass
|
||||
class UINavigationControllerAnimatedDelegate extends NSObject implements UINavigationControllerDelegate {
|
||||
public static ObjCProtocols = [UINavigationControllerDelegate];
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ function initializeTapAndDoubleTapGestureListener() {
|
||||
return;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class TapAndDoubleTapGestureListenerImpl extends android.view.GestureDetector.SimpleOnGestureListener {
|
||||
private _observer: GesturesObserver;
|
||||
private _target: View;
|
||||
@@ -107,6 +108,7 @@ function initializePinchGestureListener() {
|
||||
return;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class PinchGestureListenerImpl extends android.view.ScaleGestureDetector.SimpleOnScaleGestureListener {
|
||||
private _observer: GesturesObserver;
|
||||
private _target: View;
|
||||
@@ -163,6 +165,7 @@ function initializeSwipeGestureListener() {
|
||||
return;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class SwipeGestureListenerImpl extends android.view.GestureDetector.SimpleOnGestureListener {
|
||||
private _observer: GesturesObserver;
|
||||
private _target: View;
|
||||
|
||||
@@ -19,6 +19,7 @@ export function observe(target: View, type: GestureTypes, callback: (args: Gestu
|
||||
return observer;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class UIGestureRecognizerDelegateImpl extends NSObject implements UIGestureRecognizerDelegate {
|
||||
public static ObjCProtocols = [UIGestureRecognizerDelegate];
|
||||
|
||||
@@ -38,6 +39,7 @@ class UIGestureRecognizerDelegateImpl extends NSObject implements UIGestureRecog
|
||||
}
|
||||
let recognizerDelegateInstance: UIGestureRecognizerDelegateImpl = <UIGestureRecognizerDelegateImpl>UIGestureRecognizerDelegateImpl.new();
|
||||
|
||||
@NativeClass
|
||||
class UIGestureRecognizerImpl extends NSObject {
|
||||
public static ObjCExposedMethods = {
|
||||
recognize: {
|
||||
|
||||
@@ -7,6 +7,7 @@ function ensureLruBitmapCacheClass() {
|
||||
return;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class LruBitmapCache extends android.util.LruCache<string, android.graphics.Bitmap> {
|
||||
constructor(cacheSize: number) {
|
||||
super(cacheSize);
|
||||
|
||||
@@ -12,6 +12,7 @@ function ensureHttpRequest() {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class MemmoryWarningHandler extends NSObject {
|
||||
static new(): MemmoryWarningHandler {
|
||||
return <MemmoryWarningHandler>super.new();
|
||||
|
||||
@@ -77,6 +77,7 @@ export class ListPicker extends ListPickerBase {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class ListPickerDataSource extends NSObject implements UIPickerViewDataSource {
|
||||
public static ObjCProtocols = [UIPickerViewDataSource];
|
||||
|
||||
@@ -100,6 +101,7 @@ class ListPickerDataSource extends NSObject implements UIPickerViewDataSource {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class ListPickerDelegateImpl extends NSObject implements UIPickerViewDelegate {
|
||||
public static ObjCProtocols = [UIPickerViewDelegate];
|
||||
|
||||
|
||||
@@ -235,6 +235,7 @@ function ensureListViewAdapterClass() {
|
||||
return;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class ListViewAdapter extends android.widget.BaseAdapter {
|
||||
constructor(public owner: ListView) {
|
||||
super();
|
||||
|
||||
@@ -73,6 +73,7 @@ function notifyForItemAtIndex(listView: ListViewBase, cell: any, view: View, eve
|
||||
return args;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class DataSource extends NSObject implements UITableViewDataSource {
|
||||
public static ObjCProtocols = [UITableViewDataSource];
|
||||
|
||||
@@ -118,6 +119,7 @@ class DataSource extends NSObject implements UITableViewDataSource {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class UITableViewDelegateImpl extends NSObject implements UITableViewDelegate {
|
||||
public static ObjCProtocols = [UITableViewDelegate];
|
||||
|
||||
@@ -182,6 +184,7 @@ class UITableViewDelegateImpl extends NSObject implements UITableViewDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class UITableViewRowHeightDelegateImpl extends NSObject implements UITableViewDelegate {
|
||||
public static ObjCProtocols = [UITableViewDelegate];
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ export * from './scroll-view-common';
|
||||
|
||||
const majorVersion = iOSNativeHelper.MajorVersion;
|
||||
|
||||
@NativeClass
|
||||
class UIScrollViewDelegateImpl extends NSObject implements UIScrollViewDelegate {
|
||||
private _owner: WeakRef<ScrollView>;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ export * from './search-bar-common';
|
||||
|
||||
const majorVersion = iOSNativeHelper.MajorVersion;
|
||||
|
||||
@NativeClass
|
||||
class UISearchBarDelegateImpl extends NSObject implements UISearchBarDelegate {
|
||||
public static ObjCProtocols = [UISearchBarDelegate];
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ function initializeNativeClasses(): void {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class TabHostImpl extends android.widget.TabHost {
|
||||
constructor(context: android.content.Context, attrs: android.util.AttributeSet) {
|
||||
super(context, attrs);
|
||||
|
||||
@@ -106,6 +106,7 @@ export class SegmentedBar extends SegmentedBarBase {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class SelectionHandlerImpl extends NSObject {
|
||||
private _owner: WeakRef<SegmentedBar>;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { Color } from '../../color';
|
||||
|
||||
export * from './slider-common';
|
||||
|
||||
@NativeClass
|
||||
class SliderChangeHandlerImpl extends NSObject {
|
||||
private _owner: WeakRef<Slider>;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import { layout } from '../../utils';
|
||||
|
||||
export * from './switch-common';
|
||||
|
||||
@NativeClass
|
||||
class SwitchChangeHandlerImpl extends NSObject {
|
||||
private _owner: WeakRef<Switch>;
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ function initializeNativeClasses() {
|
||||
return;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class TabFragmentImplementation extends org.nativescript.widgets.FragmentBase {
|
||||
private owner: TabView;
|
||||
private index: number;
|
||||
|
||||
@@ -86,6 +86,7 @@ class UITabBarControllerImpl extends UITabBarController {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class UITabBarControllerDelegateImpl extends NSObject implements UITabBarControllerDelegate {
|
||||
public static ObjCProtocols = [UITabBarControllerDelegate];
|
||||
|
||||
@@ -133,6 +134,7 @@ class UITabBarControllerDelegateImpl extends NSObject implements UITabBarControl
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class UINavigationControllerDelegateImpl extends NSObject implements UINavigationControllerDelegate {
|
||||
public static ObjCProtocols = [UINavigationControllerDelegate];
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ function initializeNativeClasses() {
|
||||
return;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class TabFragmentImplementation extends org.nativescript.widgets.FragmentBase {
|
||||
private owner: Tabs;
|
||||
private index: number;
|
||||
@@ -280,6 +281,7 @@ function initializeNativeClasses() {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class TabsBarImplementation extends org.nativescript.widgets.TabsBar {
|
||||
constructor(context: android.content.Context, public owner: Tabs) {
|
||||
super(context);
|
||||
|
||||
@@ -34,6 +34,7 @@ const invokeOnRunLoop = (function () {
|
||||
};
|
||||
})();
|
||||
|
||||
@NativeClass
|
||||
class MDCTabBarDelegateImpl extends NSObject implements MDCTabBarDelegate {
|
||||
public static ObjCProtocols = [MDCTabBarDelegate];
|
||||
|
||||
@@ -79,6 +80,7 @@ class MDCTabBarDelegateImpl extends NSObject implements MDCTabBarDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class BackgroundIndicatorTemplate extends NSObject implements MDCTabBarIndicatorTemplate {
|
||||
public static ObjCProtocols = [MDCTabBarIndicatorTemplate];
|
||||
|
||||
@@ -259,6 +261,7 @@ class UIPageViewControllerImpl extends UIPageViewController {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class UIPageViewControllerDataSourceImpl extends NSObject implements UIPageViewControllerDataSource {
|
||||
public static ObjCProtocols = [UIPageViewControllerDataSource];
|
||||
|
||||
@@ -345,6 +348,7 @@ class UIPageViewControllerDataSourceImpl extends NSObject implements UIPageViewC
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class UIPageViewControllerDelegateImpl extends NSObject implements UIPageViewControllerDelegate {
|
||||
public static ObjCProtocols = [UIPageViewControllerDelegate];
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ function initializeClickableSpan(): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class ClickableSpanImpl extends android.text.style.ClickableSpan {
|
||||
owner: WeakRef<Span>;
|
||||
|
||||
@@ -100,6 +101,7 @@ function initializeBaselineAdjustedSpan(): void {
|
||||
if (BaselineAdjustedSpan) {
|
||||
return;
|
||||
}
|
||||
@NativeClass
|
||||
class BaselineAdjustedSpanImpl extends android.text.style.MetricAffectingSpan {
|
||||
fontSize: number;
|
||||
align: VerticalAlignment = 'baseline';
|
||||
|
||||
@@ -15,6 +15,7 @@ export * from './text-base-common';
|
||||
|
||||
const majorVersion = iOSNativeHelper.MajorVersion;
|
||||
|
||||
@NativeClass
|
||||
class UILabelClickHandlerImpl extends NSObject {
|
||||
private _owner: WeakRef<TextBase>;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ const zeroLength: Length = {
|
||||
unit: 'px',
|
||||
};
|
||||
|
||||
@NativeClass
|
||||
class UITextFieldDelegateImpl extends NSObject implements UITextFieldDelegate {
|
||||
public static ObjCProtocols = [UITextFieldDelegate];
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import { profile } from '../../profiling';
|
||||
|
||||
const majorVersion = iOSNativeHelper.MajorVersion;
|
||||
|
||||
@NativeClass
|
||||
class UITextViewDelegateImpl extends NSObject implements UITextViewDelegate {
|
||||
public static ObjCProtocols = [UITextViewDelegate];
|
||||
|
||||
|
||||
@@ -114,6 +114,7 @@ export class TimePicker extends TimePickerBase {
|
||||
}
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class UITimePickerChangeHandlerImpl extends NSObject {
|
||||
private _owner: WeakRef<TimePicker>;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ function initializeWebViewClient(): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@NativeClass
|
||||
class WebViewClientImpl extends android.webkit.WebViewClient {
|
||||
constructor(public owner: WebViewBase) {
|
||||
super();
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Trace } from '../../trace';
|
||||
export * from './web-view-common';
|
||||
import { knownFolders } from '../../file-system';
|
||||
|
||||
@NativeClass
|
||||
class WKNavigationDelegateImpl extends NSObject implements WKNavigationDelegate {
|
||||
public static ObjCProtocols = [WKNavigationDelegate];
|
||||
public static initWithOwner(owner: WeakRef<WebView>): WKNavigationDelegateImpl {
|
||||
|
||||
Reference in New Issue
Block a user