noodl-types
Advanced tools
Comparing version 1.0.25 to 1.0.26
@@ -6,2 +6,4 @@ export interface UncommonActionObjectProps { | ||
destination?: string; | ||
dismissOnTouchOutside?: boolean; | ||
evolve?: boolean; | ||
funcName: string; | ||
@@ -11,2 +13,3 @@ object?: any; | ||
reload?: boolean; | ||
timer?: number; | ||
viewTag?: string; | ||
@@ -20,7 +23,7 @@ wait?: boolean | number; | ||
} | ||
export interface BuiltInActionObject extends ActionObject, Pick<UncommonActionObjectProps, 'contentType' | 'funcName' | 'reload' | 'viewTag'> { | ||
export interface BuiltInActionObject extends ActionObject, Pick<UncommonActionObjectProps, 'contentType' | 'dataKey' | 'evolve' | 'funcName' | 'reload' | 'viewTag'> { | ||
actionType: 'builtIn'; | ||
[key: string]: any; | ||
} | ||
export interface EvalActionObject extends ActionObject, Pick<UncommonActionObjectProps, 'object'> { | ||
export interface EvalActionObject extends ActionObject, Pick<UncommonActionObjectProps, 'dataKey' | 'dataObject' | 'object'> { | ||
actionType: 'evalObject'; | ||
@@ -33,8 +36,7 @@ [key: string]: any; | ||
} | ||
export interface PopupActionObject<V extends string = any> extends ActionObject { | ||
export interface PopupActionObject extends ActionObject, Pick<UncommonActionObjectProps, 'dismissOnTouchOutside' | 'popUpView' | 'wait'> { | ||
actionType: 'popUp'; | ||
popUpView: V; | ||
[key: string]: any; | ||
} | ||
export interface PopupDismissActionObject extends ActionObject, Pick<UncommonActionObjectProps, 'popUpView'> { | ||
export interface PopupDismissActionObject extends ActionObject, Pick<UncommonActionObjectProps, 'dismissOnTouchOutside' | 'popUpView' | 'wait'> { | ||
actionType: 'popUpDismiss'; | ||
@@ -51,8 +53,3 @@ [key: string]: any; | ||
} | ||
export declare type UpdateActionObject = ({ | ||
actionType: 'updateObject'; | ||
[key: string]: any; | ||
} & Pick<UncommonActionObjectProps, 'dataObject' | 'dataKey'>) | ({ | ||
actionType: 'updateObject'; | ||
[key: string]: any; | ||
} & Pick<UncommonActionObjectProps, 'object'>); | ||
export interface UpdateActionObject extends ActionObject, Pick<UncommonActionObjectProps, 'dataObject' | 'dataKey'> { | ||
} |
import { ActionObject } from './actionTypes'; | ||
import { EventType } from './constantTypes'; | ||
import { ContentType, EventType } from './constantTypes'; | ||
import { StyleObject, StyleTextAlign, StyleTextAlignObject } from './styleTypes'; | ||
import { ActionChain, EmitObject, GotoObject, IfObject, TextBoardObject } from './uncategorizedTypes'; | ||
import { ActionChain, EmitObject, GotoObject, Path, TextBoardObject } from './uncategorizedTypes'; | ||
export declare type AnyComponentObject = ButtonComponentObject | DividerComponentObject | FooterComponentObject | HeaderComponentObject | ImageComponentObject | LabelComponentObject | ListComponentObject | ListItemComponentObject | PageComponentObject | PluginComponentObject | PluginHeadComponentObject | PluginBodyTailComponentObject | PopUpComponentObject | RegisterComponentObject | SelectComponentObject | ScrollViewComponentObject | TextFieldComponentObject | TextViewComponentObject | VideoComponentObject | ViewComponentObject; | ||
@@ -10,11 +10,11 @@ export declare type UncommonComponentObjectProps = { | ||
actions?: (ActionObject | EmitObject | GotoObject)[]; | ||
contentType?: string; | ||
contentType?: ContentType; | ||
dataKey?: string; | ||
isEditable?: boolean; | ||
iteratorVar?: string; | ||
listObject?: '' | any[]; | ||
listObject?: any[]; | ||
onEvent?: string; | ||
optionKey?: string; | ||
options?: any[]; | ||
path?: string | IfObject | EmitObject; | ||
path?: Path; | ||
pathSelected?: string; | ||
@@ -30,9 +30,9 @@ placeholder?: string | EmitObject; | ||
'text=func'?: string; | ||
viewTag?: string; | ||
videoFormat?: string; | ||
}; | ||
export interface ComponentObject<T extends string = any> { | ||
export interface ComponentObject<T extends string = any> extends Record<EventType, ActionChain> { | ||
type: T; | ||
style?: StyleObject; | ||
children?: any[]; | ||
viewTag?: string; | ||
[key: string]: any; | ||
@@ -56,7 +56,7 @@ } | ||
} | ||
export interface ImageComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'path'> { | ||
export interface ImageComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'contentType' | 'dataKey' | 'path' | 'pathSelected'> { | ||
type: 'image'; | ||
[key: string]: any; | ||
} | ||
export interface LabelComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'contentType' | 'dataKey' | 'text' | 'textBoard' | 'text=func'> { | ||
export interface LabelComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'contentType' | 'dataKey' | 'placeholder' | 'text' | 'textBoard' | 'text=func'> { | ||
type: 'label'; | ||
@@ -97,3 +97,3 @@ [key: string]: any; | ||
} | ||
export interface SelectComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'optionKey' | 'options'> { | ||
export interface SelectComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'contentType' | 'optionKey' | 'options' | 'placeholder' | 'required'> { | ||
type: 'select'; | ||
@@ -106,7 +106,7 @@ [key: string]: any; | ||
} | ||
export interface TextFieldComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'dataKey' | 'placeholder'> { | ||
export interface TextFieldComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'contentType' | 'dataKey' | 'placeholder' | 'required'> { | ||
type: 'textField'; | ||
[key: string]: any; | ||
} | ||
export interface TextViewComponentObject extends ComponentObject { | ||
export interface TextViewComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'contentType' | 'dataKey' | 'isEditable' | 'placeholder' | 'required'> { | ||
type: 'textView'; | ||
@@ -113,0 +113,0 @@ [key: string]: any; |
export declare type ActionType = 'builtIn' | 'evalObject' | 'pageJump' | 'popUp' | 'popUpDismiss' | 'refresh' | 'saveObject' | 'updateObject'; | ||
export declare type ComponentType = 'button' | 'divider' | 'footer' | 'header' | 'image' | 'label' | 'list' | 'listItem' | 'page' | 'plugin' | 'pluginHead' | 'pluginBodyTail' | 'popUp' | 'register' | 'select' | 'scrollView' | 'textField' | 'textView' | 'video' | 'view'; | ||
export declare type ContentType = 'countryCode' | 'email' | 'formattedDate' | 'formattedDuration' | 'listObject' | 'number' | 'password' | 'passwordHidden' | 'phoneNumber' | 'phone' | 'tel' | 'text' | 'timer' | 'videoSubStream' | 'vidoeSubStream'; | ||
export declare type ContentType = 'countryCode' | 'email' | 'file' | 'formattedDate' | 'formattedDuration' | 'hidden' | 'listObject' | 'messageHidden' | 'number' | 'password' | 'passwordHidden' | 'phone' | 'phoneNumber' | 'tel' | 'text' | 'timer' | 'videoSubStream' | 'vidoeSubStream'; | ||
export declare type EventType = 'onClick' | 'onChange' | 'onHover' | 'onMouseEnter' | 'onMouseLeave' | 'onMouseOut' | 'onMouseOver'; |
@@ -1,2 +0,2 @@ | ||
declare const componentKeys: readonly ["backgroundColor", "borderRadius", "chatItem", "children", "contentType", "dataId", "dataKey", "dataModel", "height", "isEditable", "itemObject", "iteratorVar", "itmeObject", "listObject", "onChange", "onClick", "optionKey", "options", "path", "pathSelected", "placeHolder", "placeholder", "refresh", "required", "style", "text", "text=func", "textAlign", "textBoard", "type", "viewTag", "width", "zIndex"]; | ||
declare const componentKeys: readonly ["backgroundColor", "borderRadius", "children", "contentType", "dataId", "dataKey", "dataModel", "height", "isEditable", "itemObject", "iteratorVar", "itmeObject", "listObject", "onChange", "onClick", "optionKey", "options", "path", "pathSelected", "placeHolder", "placeholder", "refresh", "required", "style", "text", "text=func", "textAlign", "textBoard", "type", "viewTag", "width", "zIndex", "chatItem"]; | ||
export default componentKeys; |
@@ -6,3 +6,2 @@ "use strict"; | ||
"borderRadius", | ||
"chatItem", | ||
"children", | ||
@@ -37,5 +36,6 @@ "contentType", | ||
"width", | ||
"zIndex" | ||
"zIndex", | ||
"chatItem" | ||
]; | ||
exports.default = componentKeys; | ||
//# sourceMappingURL=componentKeys.js.map |
@@ -1,2 +0,2 @@ | ||
declare const componentTypes: readonly ["button", "chatList", "divider", "image", "label", "lael", "list", "listItem", "popUp", "scrollView", "select", "textField", "textView", "view"]; | ||
declare const componentTypes: readonly ["button", "divider", "image", "label", "lael", "list", "listItem", "popUp", "scrollView", "select", "textField", "textView", "view", "chatList"]; | ||
export default componentTypes; |
@@ -5,3 +5,2 @@ "use strict"; | ||
"button", | ||
"chatList", | ||
"divider", | ||
@@ -18,5 +17,6 @@ "image", | ||
"textView", | ||
"view" | ||
"view", | ||
"chatList" | ||
]; | ||
exports.default = componentTypes; | ||
//# sourceMappingURL=componentTypes.js.map |
@@ -95,3 +95,3 @@ import { StyleObject } from './styleTypes'; | ||
pageJump(v: unknown): v is T.PageJumpActionObject; | ||
popUp(v: unknown): v is T.PopupActionObject<any>; | ||
popUp(v: unknown): v is T.PopupActionObject; | ||
popUpDismiss(v: unknown): v is T.PopupDismissActionObject; | ||
@@ -98,0 +98,0 @@ refresh(v: unknown): v is T.RefreshActionObject; |
@@ -8,7 +8,7 @@ export interface StyleObject { | ||
border?: StyleBorderObject; | ||
borderWidth?: string; | ||
borderColor?: string; | ||
borderRadius?: string; | ||
borderWidth?: string; | ||
boxShadow?: string; | ||
boxSizing?: string; | ||
boxShadow?: string; | ||
color?: string; | ||
@@ -37,4 +37,6 @@ contentSize?: { | ||
padding?: string; | ||
paddingTop?: string; | ||
paddingLeft?: string; | ||
paddingRight?: string; | ||
paddingBottom?: string; | ||
position?: string; | ||
@@ -41,0 +43,0 @@ required?: string; |
{ | ||
"name": "noodl-types", | ||
"version": "1.0.25", | ||
"version": "1.0.26", | ||
"description": "NOODL TypeScript Definitions", | ||
@@ -33,3 +33,3 @@ "author": "Christopher Tran <christopher@aitmed.com>", | ||
}, | ||
"gitHead": "b49d75f1203e6d22f815cc4646e52744202acbfa" | ||
"gitHead": "2984864726bbd27d81c48acd5eb2d30c56249af5" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65811
1141