-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compilacion de codigo y creacion de tipos
- Loading branch information
1 parent
d9963a0
commit 4099c60
Showing
27 changed files
with
210 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { NavigationView } from "tabris"; | ||
import type { Page, Action, SearchAction } from "tabris"; | ||
declare function addView(...widgets: (Page | Action | SearchAction)[]): NavigationView<import("tabris").widgets.Page, import("tabris").widgets.Action>; | ||
export default addView; | ||
export * from "./modal"; | ||
export * from "./navigation"; | ||
export * from "./preference"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default class AnimationTime { | ||
static LONG: number; | ||
static MEDIUM: number; | ||
static SHORT: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import type { Widget } from "tabris"; | ||
export declare function animateShow(element: Widget<any>, delay: number, duration: number): Promise<void>; | ||
export declare function animateHidden(element: Widget<any>, delay: number, duration: number): Promise<void>; | ||
export declare function animate(element: Widget<any>, delay: number, duration: number): Promise<void>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export { default as AnimationTime } from './animation-time'; | ||
export * from './animation'; | ||
export { default as Modal } from './modal'; | ||
export { default as Toast } from './toast'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Button, Listeners, Widget } from "tabris"; | ||
export default class Modal { | ||
[k: string]: any; | ||
remove: () => any; | ||
show: () => any; | ||
setButtonAccept: (text: string) => Listeners<{ | ||
target: Button; | ||
}>; | ||
setButtonCancel: (text: string) => Listeners<{ | ||
target: Button; | ||
}>; | ||
addView: (...view: Widget<any>[]) => any; | ||
removeView: () => any; | ||
removeButtons: () => any; | ||
constructor(attrs?: any); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import AnimationTime from "./animation-time"; | ||
export default class Toast extends AnimationTime { | ||
show: (time: number) => any; | ||
constructor(message: string, duration: number); | ||
static makeText(msg: string, duration?: number): Toast; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { NavigationView, Properties as PropertiesTabris } from "tabris"; | ||
type TypeWidget = any[] | Array<any[]>; | ||
/** | ||
* @description | ||
* utilizar en JSX <CoordinatePageComponent></CoordinatePageComponent> | ||
* encapsula la logica del menu de acciones del AppBar | ||
* cuando se añade un Page con Action o SearchAction | ||
* estas acciones desapareceran si la no es visible | ||
* haciendo que la nueva pagina no tenga los menus anteriores | ||
*/ | ||
export declare class CoordinatePageComponent extends NavigationView { | ||
constructor(props: PropertiesTabris<CoordinatePageComponent>); | ||
append(...widgets: TypeWidget): this; | ||
} | ||
/** | ||
* @description | ||
* encapsula en un proxy cuando se ejecute como funcion o instancia | ||
*/ | ||
export declare const CoordinatePage: import("../utils/proxy").Callback<CoordinatePageComponent>; | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './CoordinatePage'; | ||
export * from './menu'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Composite } from "tabris"; | ||
type MenuItemOf = MenuItem; | ||
interface IMenuItemOption { | ||
id: string; | ||
text: string; | ||
image?: string; | ||
} | ||
declare class MenuItem extends Composite { | ||
constructor(id: string); | ||
} | ||
export type { MenuItemOf }; | ||
export declare function menuDrawer(menus: IMenuItemOption[], eventSelectMenu: (menu: MenuItem) => void): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import type { CheckBox, Properties, RadioButton, Switch } from "tabris"; | ||
import ItemPreference from "./AbstractItemPreference"; | ||
export declare abstract class Checked extends ItemPreference { | ||
constructor(props: Pick<any, any>); | ||
addListener(checkButton: RadioButton | Switch | CheckBox, originalOnSelect: Function): void; | ||
abstract _getButton(props: Properties<CheckBox | Switch | RadioButton>): CheckBox | Switch | RadioButton; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import "string-tocapitalize"; | ||
import { Composite, Properties, WidgetTapEvent } from "tabris"; | ||
export interface PreferenceParams { | ||
key: string; | ||
value: string | number | boolean; | ||
title: string; | ||
summary: string; | ||
} | ||
type SelectEvent = (event: WidgetTapEvent<ItemPreference>) => any; | ||
export default abstract class ItemPreference extends Composite implements PreferenceParams { | ||
title: string; | ||
summary: string; | ||
key: string; | ||
value: string | number | boolean; | ||
set onSelect(fn: (event: SelectEvent) => any); | ||
get onSelect(): (event: SelectEvent) => any; | ||
constructor(props: Properties<ItemPreference>); | ||
} | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Properties } from "tabris"; | ||
import { Checked } from "./AbstractCheked"; | ||
export declare class CheckBoxPreferenceComponent extends Checked { | ||
constructor(props: Properties<CheckBoxPreferenceComponent>); | ||
_getButton(props: Properties<CheckBoxPreferenceComponent>): import("tabris").widgets.CheckBox; | ||
} | ||
export declare const CheckBoxPreference: import("../utils/proxy").Callback<CheckBoxPreferenceComponent>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { RadioButton, Properties } from "tabris"; | ||
import { Checked } from "./AbstractCheked"; | ||
export interface IEntry { | ||
id?: string; | ||
text: string; | ||
checked?: boolean; | ||
} | ||
export declare class ListPreferenceComponent extends Checked { | ||
entries: IEntry[]; | ||
textButtonAccept: string; | ||
_getButton(): RadioButton; | ||
constructor(props: Properties<ListPreferenceComponent> & { | ||
onSelect?: any; | ||
}); | ||
} | ||
export declare const ListPreference: import("../utils/proxy").Callback<ListPreferenceComponent>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Page, Properties } from "tabris"; | ||
export declare class PreferenceScreenComponent extends Page { | ||
constructor(props?: Properties<PreferenceScreenComponent>); | ||
} | ||
export declare const PreferenceScreen: import("../utils/proxy").Callback<PreferenceScreenComponent>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Properties } from "tabris"; | ||
import { Checked } from "./AbstractCheked"; | ||
export declare class SwitchPreferenceComponent extends Checked { | ||
onChange: any; | ||
constructor(props: Properties<SwitchPreferenceComponent>); | ||
_getButton(props: Properties<SwitchPreferenceComponent>): import("tabris").widgets.Switch; | ||
} | ||
export declare const SwitchPreference: import("../utils/proxy").Callback<SwitchPreferenceComponent>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { TextView, Properties } from "tabris"; | ||
import ItemPreference from "./AbstractItemPreference"; | ||
export declare class TextPreferenceComponent extends ItemPreference { | ||
constructor(props: Properties<TextView>); | ||
} | ||
export declare const TextPreference: import("../utils/proxy").Callback<TextPreferenceComponent>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export * from './AbstractCheked'; | ||
export { default as AbstractItemPreference } from './AbstractItemPreference'; | ||
export * from './CheckBoxPreference'; | ||
export * from './SwitchPreference'; | ||
export * from './TextPreference'; | ||
export * from './PreferenceScreen'; | ||
export * from './storage'; | ||
export * from './ListPreference'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export declare const name_key_pref = "voir-native-preference"; | ||
export declare const $preference: any; | ||
export declare const setPreference: (key: string, value: any) => void; | ||
export declare const getValuePreference: (key: string) => any; | ||
export declare const existsKeyPreference: (key: string) => boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { AnyWidget } from "tabris"; | ||
declare const _default: (widget: AnyWidget, name: string, props: any) => void; | ||
export default _default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import type { CallbackInstance } from "./proxy"; | ||
import type { Composite } from "tabris"; | ||
export declare function createInstance<ClassType extends Composite>(props: any, $Class: CallbackInstance<ClassType>): ClassType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { PreferenceParams } from "../preference/AbstractItemPreference"; | ||
import { CoordinatePageComponent } from "../navigation"; | ||
import { IEntry, ListPreferenceComponent, PreferenceScreenComponent } from "../preference"; | ||
import type { AnyWidget, CheckBox, Composite, JSXAttributes, PropertyChangedEvent, RadioButton, RadioButtonSelectEvent, Switch } from "tabris"; | ||
type CallbackAppend = (widgets: any[]) => any; | ||
type OptionalAtrributes<T> = { | ||
[K in keyof T]?: T[K]; | ||
}; | ||
type Attributes<View> = View extends PreferenceScreenComponent | CoordinatePageComponent ? JSXAttributes<View> & { | ||
children?: AnyWidget[]; | ||
} : OptionalAtrributes<PreferenceParams> & { | ||
onSelect?: (event: View extends RadioButton ? RadioButtonSelectEvent : PropertyChangedEvent<RadioButton | Switch | CheckBox, boolean>) => any; | ||
} & (View extends ListPreferenceComponent ? { | ||
entries: IEntry[]; | ||
} : {}); | ||
export type CallbackInstance<View extends AnyWidget> = new (props: Attributes<View>) => View; | ||
export type Callable<View extends AnyWidget> = (props?: Attributes<View>) => View; | ||
export type Callback<View extends AnyWidget> = CallbackInstance<View> | Callable<View>; | ||
export declare function createProxies<T extends Composite>(funReceivedProxy: Callback<T>, funAppend?: CallbackAppend): Callback<T>; | ||
export {}; |