noodl-types
Advanced tools
Comparing version 1.0.254 to 1.0.257
@@ -1,4 +0,1 @@ | ||
/** | ||
* @internal | ||
*/ | ||
export declare type OrArray<V = any> = V | V[]; |
import type { LiteralUnion } from 'type-fest'; | ||
import type { OrArray } from './_internal/types'; | ||
import type { EmitObjectFold, GotoObject, IfObject } from './uncategorizedTypes'; | ||
import type { EmitObject, EmitObjectFold, GotoObject, IfObject } from './uncategorizedTypes'; | ||
import type { BuiltInEvalObject, DataIn, ReferenceString } from './ecosTypes'; | ||
/** | ||
* Known props contained in {@link ActionObject} objects | ||
* @deprecated | ||
*/ | ||
export interface UncommonActionObjectProps { | ||
actions?: any[]; | ||
contentType?: string; | ||
emit?: EmitObjectFold; | ||
emit?: EmitObject; | ||
/** | ||
@@ -23,3 +19,3 @@ * The path to a data object or value. It might provide a different behavior depending on where it is placed. For example, a dataKey set on a textField component will bind its value to the path in the dataKey, enabling it to mutate the value while updating textField's value | ||
dataKey?: string | EmitObjectFold | IfObject; | ||
dataIn?: DataIn; | ||
dataIn?: any; | ||
/** | ||
@@ -150,4 +146,2 @@ * An object that contains data. | ||
/** | ||
* An action to handle navigating to different pages | ||
* | ||
* @example | ||
@@ -160,4 +154,2 @@ * ```json | ||
* ``` | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -169,4 +161,2 @@ export interface PageJumpActionObject extends ActionObject, Pick<UncommonActionObjectProps, 'destination'> { | ||
/** | ||
* An action to handle showing a {@link PopUpComponentObject} | ||
* | ||
* @example | ||
@@ -185,4 +175,2 @@ * ```json | ||
/** | ||
* An action to handle dismissing a {@link PopUpComponentObject} | ||
* | ||
* @example | ||
@@ -201,4 +189,2 @@ * ```json | ||
/** | ||
* An action to handle refreshing of the current page | ||
* | ||
* @example | ||
@@ -216,4 +202,2 @@ * ```json | ||
/** | ||
* An action to handle removing signatures | ||
* | ||
* @example | ||
@@ -233,4 +217,2 @@ * ```json | ||
/** | ||
* An action to handle saving data | ||
* | ||
* @example | ||
@@ -249,4 +231,2 @@ * ```json | ||
/** | ||
* An action to handle saving signatures | ||
* | ||
* @example | ||
@@ -269,5 +249,7 @@ * ```json | ||
} | ||
export interface UpdateGlobalActionObject extends ActionObject, Pick<UncommonActionObjectProps, 'dataKey'> { | ||
actionType: 'updateGlobal'; | ||
[key: string]: any; | ||
} | ||
/** | ||
* An action to handle data mutation/updates | ||
* | ||
* @example | ||
@@ -274,0 +256,0 @@ * ```json |
@@ -6,6 +6,2 @@ import type { ActionObject } from './actionTypes'; | ||
import type { ActionChain, EmitObject, EmitObjectFold, GotoObject, IfObject, Path, TextBoardObject } from './uncategorizedTypes'; | ||
/** | ||
* Known props contained in components | ||
* @deprecated | ||
*/ | ||
export declare type UncommonComponentObjectProps = { | ||
@@ -44,27 +40,9 @@ [key in EventType]: ActionChain; | ||
}; | ||
/** | ||
* The root generic component object. Implementations of component objects derive from this interface | ||
*/ | ||
export interface ComponentObject<T extends string = any> extends Partial<Record<EventType, ActionChain>> { | ||
/** | ||
* Component type | ||
*/ | ||
type: T; | ||
/** | ||
* Component {@link StyleObject} | ||
*/ | ||
style?: StyleObject; | ||
/** | ||
* A list of {@link ComponentObject} | ||
*/ | ||
children?: any[]; | ||
/** | ||
* Identifier commonly used in the app level to retrieve the pointer to the component | ||
*/ | ||
viewTag?: string; | ||
[key: string]: any; | ||
} | ||
/** | ||
* Component implementing chat room interfaces | ||
*/ | ||
export interface ChatListComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'chatItem' | 'contentType' | 'iteratorVar' | 'listObject'> { | ||
@@ -74,5 +52,2 @@ type: 'chatList'; | ||
} | ||
/** | ||
* Component implementing charts | ||
*/ | ||
export interface ChartComponentObject extends ComponentObject { | ||
@@ -82,5 +57,2 @@ type: 'chart'; | ||
} | ||
/** | ||
* Component implementing buttons | ||
*/ | ||
export interface ButtonComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'contentType' | 'text'> { | ||
@@ -90,5 +62,2 @@ type: 'button'; | ||
} | ||
/** | ||
* Component implementing canvases. An example would be an implementation of a signature pad. | ||
*/ | ||
export interface CanvasComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'dataKey'> { | ||
@@ -98,5 +67,2 @@ type: 'canvas'; | ||
} | ||
/** | ||
* Component implementing dividers. A divider is a component signaling the separation of contents | ||
*/ | ||
export interface DividerComponentObject extends ComponentObject { | ||
@@ -106,5 +72,2 @@ type: 'divider'; | ||
} | ||
/** | ||
* Component containing a reference to a {@link EcosDocument} on the `ecosObj` property | ||
*/ | ||
export interface EcosDocComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'ecosObj'> { | ||
@@ -114,5 +77,2 @@ type: 'ecosDoc'; | ||
} | ||
/** | ||
* Component implementing footers | ||
*/ | ||
export interface FooterComponentObject extends ComponentObject { | ||
@@ -122,5 +82,2 @@ type: 'footer'; | ||
} | ||
/** | ||
* Component implementing headers | ||
*/ | ||
export interface HeaderComponentObject extends ComponentObject { | ||
@@ -130,5 +87,2 @@ type: 'header'; | ||
} | ||
/** | ||
* Component implementing display of an image | ||
*/ | ||
export interface ImageComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'contentType' | 'dataKey' | 'path' | 'pathSelected'> { | ||
@@ -138,5 +92,2 @@ type: 'image'; | ||
} | ||
/** | ||
* Component implementing basic text display | ||
*/ | ||
export interface LabelComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'contentType' | 'dataKey' | 'placeholder' | 'text' | 'textBoard' | 'text=func'> { | ||
@@ -146,5 +97,2 @@ type: 'label'; | ||
} | ||
/** | ||
* Component implementing list components surrounding {@link ListItemComponentObject} components | ||
*/ | ||
export interface ListComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'contentType' | 'iteratorVar' | 'listObject'> { | ||
@@ -154,5 +102,2 @@ type: 'list'; | ||
} | ||
/** | ||
* Component implementing a list item which are direct children of {@link ListComponentObject} components | ||
*/ | ||
export interface ListItemComponentObject extends ComponentObject { | ||
@@ -162,5 +107,2 @@ type: 'listItem'; | ||
} | ||
/** | ||
* Component implementing maps | ||
*/ | ||
export interface MapComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'dataKey'> { | ||
@@ -170,5 +112,2 @@ type: 'map'; | ||
} | ||
/** | ||
* Component implementing a detached page. Detached pages render a separate noodl page **independently** | ||
*/ | ||
export interface PageComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'path'> { | ||
@@ -178,5 +117,2 @@ type: 'page'; | ||
} | ||
/** | ||
* Component implementing a generic plugin | ||
*/ | ||
export interface PluginComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'path'> { | ||
@@ -186,5 +122,2 @@ type: 'plugin'; | ||
} | ||
/** | ||
* Component implementing plugins that should be injected into the head (Example: the **head** element of the DOM) | ||
*/ | ||
export interface PluginHeadComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'path'> { | ||
@@ -194,5 +127,2 @@ type: 'pluginHead'; | ||
} | ||
/** | ||
* Component implementing plugins that should be injected into the beginning of a body (Example: the beginning of a **body** element of the DOM) | ||
*/ | ||
export interface PluginBodyTopComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'path'> { | ||
@@ -202,5 +132,2 @@ type: 'pluginBodyTop'; | ||
} | ||
/** | ||
* Component implementing plugins that should be injected into the end of a body (Example: the end of a **body** element of the DOM) | ||
*/ | ||
export interface PluginBodyTailComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'path'> { | ||
@@ -210,5 +137,2 @@ type: 'pluginBodyTail'; | ||
} | ||
/** | ||
* Component implementing popUp alerts. A common way to grab a pointer to popUp components are using the `viewTag` between the component and an {@link ActionObject} | ||
*/ | ||
export interface PopUpComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'popUpView'> { | ||
@@ -218,5 +142,2 @@ type: 'popUp'; | ||
} | ||
/** | ||
* Component that behave as observers for a specific event reference via `onEvent` | ||
*/ | ||
export interface RegisterComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'actions' | 'dataKey' | 'emit' | 'onEvent'> { | ||
@@ -226,5 +147,2 @@ type: 'register'; | ||
} | ||
/** | ||
* Component allowing users to select from a list of options | ||
*/ | ||
export interface SelectComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'contentType' | 'optionKey' | 'options' | 'placeholder' | 'required'> { | ||
@@ -234,5 +152,2 @@ type: 'select'; | ||
} | ||
/** | ||
* Component that contain further content contained in its own content area. All of its content should be visually accessed by users by a scrolling mechanism | ||
*/ | ||
export interface ScrollViewComponentObject extends ComponentObject { | ||
@@ -242,5 +157,2 @@ type: 'scrollView'; | ||
} | ||
/** | ||
* Component allowing users to input a keyword value | ||
*/ | ||
export interface TextFieldComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'contentType' | 'dataKey' | 'placeholder' | 'required'> { | ||
@@ -250,5 +162,2 @@ type: 'textField'; | ||
} | ||
/** | ||
* Component displaying an editable text view | ||
*/ | ||
export interface TextViewComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'contentType' | 'dataKey' | 'isEditable' | 'placeholder' | 'required'> { | ||
@@ -258,5 +167,2 @@ type: 'textView'; | ||
} | ||
/** | ||
* Component implementing videos being played to the user | ||
*/ | ||
export interface VideoComponentObject extends ComponentObject, Pick<UncommonComponentObjectProps, 'path' | 'poster' | 'videoFormat'> { | ||
@@ -266,5 +172,2 @@ type: 'video'; | ||
} | ||
/** | ||
* The most basic component which behaves as a basic view layer | ||
*/ | ||
export interface ViewComponentObject extends ComponentObject { | ||
@@ -274,5 +177,2 @@ type: 'view'; | ||
} | ||
/** | ||
* URLs that link to {@link PageComponentObject}. Useful when there are multiple {@link PageComponentObject} components active | ||
*/ | ||
export declare type PageComponentUrl<S extends string = string> = S extends `${string}@${string}#${string}` ? S : string; |
@@ -1,4 +0,1 @@ | ||
/** | ||
* An object of commonly known action types | ||
*/ | ||
export declare const action: { | ||
@@ -8,2 +5,3 @@ readonly builtIn: "builtIn"; | ||
readonly getLocationAddress: "getLocationAddress"; | ||
readonly updateGlobal: "updateGlobal"; | ||
readonly openCamera: "openCamera"; | ||
@@ -23,9 +21,3 @@ readonly openPhotoLibrary: "openPhotoLibrary"; | ||
}; | ||
/** | ||
* An array of commonly known action types | ||
*/ | ||
export declare const actionTypes: ("builtIn" | "evalObject" | "openCamera" | "openPhotoLibrary" | "openDocumentManager" | "pageJump" | "popUp" | "popUpDismiss" | "refresh" | "removeSignature" | "saveObject" | "saveSignature" | "getLocationAddress" | "scanCamera" | "register" | "updateObject")[]; | ||
/** | ||
* An object of commonly known component types | ||
*/ | ||
export declare const actionTypes: ("builtIn" | "evalObject" | "openCamera" | "openPhotoLibrary" | "openDocumentManager" | "pageJump" | "popUp" | "popUpDismiss" | "refresh" | "removeSignature" | "saveObject" | "saveSignature" | "getLocationAddress" | "updateGlobal" | "scanCamera" | "register" | "updateObject")[]; | ||
export declare const component: { | ||
@@ -60,27 +52,7 @@ readonly button: "button"; | ||
}; | ||
/** | ||
* An array of commonly known component keys | ||
* @deprecated | ||
*/ | ||
export declare const componentKeys: readonly ["backgroundColor", "borderRadius", "chatItem", "children", "contentType", "dataId", "dataIn", "dataKey", "dataModel", "ecosObj", "height", "isEditable", "itemObject", "iteratorVar", "itmeObject", "listObject", "onChange", "onClick", "onInput", "optionKey", "options", "path", "pathSelected", "placeHolder", "placeholder", "refresh", "required", "style", "text", "text=func", "textAlign", "textBoard", "type", "viewTag", "width", "zIndex", "chatItem"]; | ||
/** | ||
* An array of commonly known action types | ||
*/ | ||
export declare const componentTypes: ("page" | "popUp" | "register" | "button" | "canvas" | "chart" | "chatList" | "ecosDoc" | "divider" | "footer" | "header" | "image" | "label" | "list" | "listItem" | "map" | "plugin" | "pluginHead" | "pluginBodyTail" | "select" | "scrollView" | "textField" | "textView" | "video" | "view" | "rotation" | "checkbox")[]; | ||
/** | ||
* An array of commonly known content types | ||
*/ | ||
export declare const contentTypes: readonly ["countryCode", "email", "file", "formattedDate", "formattedDuration", "hidden", "listObject", "messageHidden", "number", "password", "passwordHidden", "phone", "phoneNumber", "tel", "text", "timer", "videoSubStream"]; | ||
/** | ||
* An array of DeviceType | ||
*/ | ||
export declare const deviceTypes: readonly ["web", "ios", "android"]; | ||
/** | ||
* An array of known StyleObject keys | ||
* @deprecated | ||
*/ | ||
export declare const styleKeys: readonly ["FontSize", "axis", "background", "backgroundColor", "border", "borderColor", "borderRadius", "borderRaduis", "borderWidth", "boxShadow", "boxSizing", "color", "contentSize", "diaplay", "display", "filter", "float", "flex", "flexFlow", "fontColor", "fontFamily", "fontSize", "fontStyle", "fontWeight", "foontWeight", "height", "hieght", "isHidden", "justifyContent", "left", "letterSpacing", "lineHeight", "marginLeft", "marginTop", "onClick", "padding", "paddingBottom", "paddingLeft", "placeholder", "position", "required", "shadow", "text-align", "textAlign", "textDecoration", "textIndent", "top", "width", "zIndex"]; | ||
/** | ||
* An array of known user event names | ||
*/ | ||
export declare const userEvent: readonly ["onBlur", "onClick", "onChange", "onFocus", "onHover", "onInput", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver", "onLazyLoading"]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.userEvent = exports.styleKeys = exports.deviceTypes = exports.contentTypes = exports.componentTypes = exports.componentKeys = exports.component = exports.actionTypes = exports.action = void 0; | ||
/** | ||
* An object of commonly known action types | ||
*/ | ||
exports.action = { | ||
@@ -11,2 +8,3 @@ builtIn: 'builtIn', | ||
getLocationAddress: 'getLocationAddress', | ||
updateGlobal: 'updateGlobal', | ||
openCamera: 'openCamera', | ||
@@ -26,9 +24,3 @@ openPhotoLibrary: 'openPhotoLibrary', | ||
}; | ||
/** | ||
* An array of commonly known action types | ||
*/ | ||
exports.actionTypes = Object.values(exports.action); | ||
/** | ||
* An object of commonly known component types | ||
*/ | ||
exports.component = { | ||
@@ -63,6 +55,2 @@ button: 'button', | ||
}; | ||
/** | ||
* An array of commonly known component keys | ||
* @deprecated | ||
*/ | ||
exports.componentKeys = [ | ||
@@ -107,9 +95,3 @@ 'backgroundColor', | ||
]; | ||
/** | ||
* An array of commonly known action types | ||
*/ | ||
exports.componentTypes = Object.values(exports.component); | ||
/** | ||
* An array of commonly known content types | ||
*/ | ||
exports.contentTypes = [ | ||
@@ -134,10 +116,3 @@ 'countryCode', | ||
]; | ||
/** | ||
* An array of DeviceType | ||
*/ | ||
exports.deviceTypes = ['web', 'ios', 'android']; | ||
/** | ||
* An array of known StyleObject keys | ||
* @deprecated | ||
*/ | ||
exports.styleKeys = [ | ||
@@ -194,5 +169,2 @@ 'FontSize', | ||
]; | ||
/** | ||
* An array of known user event names | ||
*/ | ||
exports.userEvent = [ | ||
@@ -199,0 +171,0 @@ 'onBlur', |
import * as c from './constants'; | ||
/** | ||
* Known action types | ||
*/ | ||
export declare type ActionType = typeof c.actionTypes[number]; | ||
/** | ||
* Known component types | ||
*/ | ||
export declare type ComponentType = typeof c.componentTypes[number]; | ||
/** | ||
* Known content types | ||
*/ | ||
export declare type ContentType = typeof c.contentTypes[number]; | ||
/** | ||
* Known event types | ||
*/ | ||
export declare type EventType = typeof c.userEvent[number]; |
@@ -6,3 +6,2 @@ import type { LiteralUnion } from 'type-fest'; | ||
/** | ||
* The hostname | ||
* @example | ||
@@ -15,3 +14,2 @@ * ```json | ||
/** | ||
* The port | ||
* @example | ||
@@ -44,5 +42,10 @@ * ``` | ||
/** | ||
* The filename appended to cadlBaseUrl to retrieve the **app** config | ||
* | ||
* For example, if _cadlMain_ is `'cadlEndpoint.yml'` and `cadlBaseUrl` is `'https://public.aitmed.com/cadl/www4.1/'`, the url to fetch the app config should resolve to `'https://public.aitmed.com/cadl/www4.1/cadlEndpoint.yml'` | ||
* The file name/path will be the pathname used to grab the "app" config | ||
* For example, if cadlMain is "cadlEndpoint.yml", the app should pick up | ||
* "${cadlBaseUrl}/cadlEndpoint.yml" where ${cadlBaseUrl} is a placeholder | ||
* for the cadlBaseUrl variable | ||
* @example | ||
* ```js | ||
* const cadlMain = 'cadlEndpoint.yml' | ||
* ``` | ||
*/ | ||
@@ -58,7 +61,7 @@ cadlMain: string; | ||
debug: string; | ||
/** Plugin resource. If this is specified the app should integrate this inside a plugin component */ | ||
/** If this is specified the app should transform this to a plugin component */ | ||
bodyTopPplugin?: string; | ||
/** Plugin resource. If this is specified the app should integrate this inside a plugin component */ | ||
/** If this is specified the app should transform this to a plugin component */ | ||
bodyTailPplugin?: string; | ||
/** Plugin resource. If this is specified the app should integrate this inside a plugin component */ | ||
/** If this is specified the app should transform this to a plugin component */ | ||
headPlugin?: string; | ||
@@ -77,4 +80,2 @@ platform?: string; | ||
/** | ||
* The config version configuration object for a specific mobile platform device | ||
* | ||
* @example | ||
@@ -92,39 +93,9 @@ * ```json | ||
*/ | ||
web?: RootConfigDeviceVersionObject; | ||
web: RootConfigDeviceVersionObject; | ||
ios: RootConfigDeviceVersionObject; | ||
android: RootConfigDeviceVersionObject; | ||
keywords: string[]; | ||
/** | ||
* The config version configuration object for a specific mobile platform device | ||
* | ||
* @example | ||
* ```json | ||
* { | ||
* "web": { | ||
* "cadlVersion": { | ||
* "test": "0.7d", | ||
* "stable": "0.7d" | ||
* } | ||
* } | ||
* } | ||
* ``` | ||
*/ | ||
ios?: RootConfigDeviceVersionObject; | ||
/** | ||
* The config version configuration object for a specific mobile platform device | ||
* | ||
* @example | ||
* ```json | ||
* { | ||
* "web": { | ||
* "cadlVersion": { | ||
* "test": "0.7d", | ||
* "stable": "0.7d" | ||
* } | ||
* } | ||
* } | ||
* ``` | ||
*/ | ||
android?: RootConfigDeviceVersionObject; | ||
keywords?: string[]; | ||
/** | ||
* @example | ||
* ```json | ||
* { "viewWidthHeightRatio": { "min": "7", "max": "8" } } | ||
@@ -142,16 +113,9 @@ * ``` | ||
/** | ||
* The base url prepended to asset pathnames | ||
* @example | ||
* ```js | ||
* const baseUrl = 'https://public.aitmed.com/cadl/www1.1/' | ||
* const assetsUrl = `${baseUrl}assets` | ||
* const imageComponent = { type: 'image', path: 'fruit.jpeg' } | ||
* | ||
* imageComponent.path = `${assetsUrl}${imageComponent.path}` | ||
* const assetsUrl = `${baseUrl}assets | ||
* ``` | ||
*/ | ||
assetsUrl: string; | ||
/** | ||
* The equivalent of "cadlBaseUrl" from the root config | ||
*/ | ||
/** The equivalent of "cadlBaseUrl" from the root config */ | ||
baseUrl: string; | ||
@@ -197,3 +161,3 @@ /** | ||
/** | ||
* Pages to be loaded and treated as routes | ||
* Pages to be loaded and treated as routes in the runtime | ||
* @example | ||
@@ -209,10 +173,4 @@ * ```js | ||
cadlVersion: { | ||
/** | ||
* The variable used to specify as the production environment | ||
*/ | ||
stable: number | string; | ||
/** | ||
* The variable used to specify as the development environment | ||
*/ | ||
test: number | string; | ||
stable: number; | ||
test: number; | ||
}; | ||
@@ -223,13 +181,20 @@ } | ||
* | ||
* Built in eval objects are implemented in the application | ||
* Built in eval objects are implemented in the application, making | ||
* it an app level implementation | ||
* | ||
* @example | ||
* ```json | ||
* { "=.builtIn.string.concat": ["+1", " ", "8882468442"] } | ||
* { | ||
* "=.builtIn.string.concat": [ | ||
* "+1", | ||
* " ", | ||
* "8882468442" | ||
* ] | ||
* } | ||
* ``` | ||
* | ||
* may be implemented as: | ||
* | ||
* becomes: | ||
* ```js | ||
* const stringConcat = (...s) => s.reduce((acc, str) => acc.concat(str)) | ||
* const myBuiltIn = function(...strings) { | ||
* return strings.reduce((acc, str) => acc.concat(str)) | ||
* } | ||
* ``` | ||
@@ -239,24 +204,11 @@ */ | ||
/** | ||
* **builtIn** eval strings may be placeholders for {@link BuiltInEvalObject} objects that behave as functions implemented in the app level | ||
* Strings that represent data that may mutate a value depending on if it is referencing a path. | ||
* If the eval reference is an object then it is transformed into a function instead. | ||
* - This function mutates the value at the referenced path (if any). | ||
*/ | ||
export declare type BuiltInEvalReference<S extends string> = ReferenceString<`builtIn${S}`, '=.'>; | ||
/** | ||
* The input to {@link BuiltInEvalObject} functions | ||
*/ | ||
export declare type DataIn = OrArray<EmitObjectFold | IfObject | PolymorphicObject | string>; | ||
/** | ||
* The output from {@link BuiltInEvalObject} functions. If this is a reference the path contained in the reference should be set this value | ||
*/ | ||
export declare type DataOut = OrArray<EmitObjectFold | IfObject | PolymorphicObject | string>; | ||
/** | ||
* User device type. Used to retrieve the config version in {@link RootConfig} | ||
*/ | ||
export declare type DeviceType = 'android' | 'ios' | 'web'; | ||
/** | ||
* Ecos environment. Also used in {@link RootConfig} | ||
*/ | ||
export declare type Env = 'stable' | 'test'; | ||
/** | ||
* An eCOS document object. These objects are received via `rd` requests and created via `cd` requests | ||
*/ | ||
export declare type EcosDocument<NF extends NameField = NameField, MT extends MediaType = MediaType> = { | ||
@@ -281,5 +233,2 @@ id?: string | null; | ||
}; | ||
/** | ||
* a JSON serialized object usually containing sensitive information such as a user's information | ||
*/ | ||
export interface NameField<Type extends MimeType.Options = MimeType.Options> { | ||
@@ -293,5 +242,2 @@ tags?: string[]; | ||
} | ||
/** | ||
* Mime types we can expect from noodl apps | ||
*/ | ||
export declare namespace MimeType { | ||
@@ -306,5 +252,2 @@ type Options = Audio | Image | Json | Pdf | Text | Video; | ||
} | ||
/** | ||
* Commonly found in {@link EcosDocument} objects | ||
*/ | ||
export interface SubtypeObject<MT extends MediaType = MediaType> { | ||
@@ -321,9 +264,3 @@ isOnServer?: boolean | null; | ||
} | ||
/** | ||
* Commonly found in {@link EcosDocument} objects | ||
*/ | ||
export declare type Deat = DeatObject | number; | ||
/** | ||
* Commonly found in {@link EcosDocument} objects | ||
*/ | ||
export interface DeatObject { | ||
@@ -346,9 +283,5 @@ url?: string; | ||
export declare type VideoMediaType = 9; | ||
/** | ||
* All variations of reference symbols | ||
*/ | ||
export declare type ReferenceSymbol = '.' | '..' | '=' | '~/' | '@'; | ||
/** | ||
* Strings that behave like placeholders which may in addition mutate the value at the referenced path. | ||
* | ||
* Strings that behave like placeholders which in addition mutates the value at referenced path when updates occur. | ||
* They are prefixed with "=" followed by a reference symbol such as ".", "..", "~", etc. | ||
@@ -359,3 +292,3 @@ * | ||
* const pageObject = { SignIn: { formData: { email: 'pfft@gmail.com' } } } | ||
* const refString = '.SignIn.formData.email' // Value should resolve to "pfft@gmail.com" | ||
* const refString = '.SignIn.formData.email' // Value should result to "pfft@gmail.com" when parsed | ||
* ``` | ||
@@ -362,0 +295,0 @@ */ |
@@ -134,2 +134,3 @@ import isAwaitReference from './utils/isAwaitReference'; | ||
scanCamera: (v: any) => v is t.ScanCameraActionObject; | ||
updateGlobal: (v: any) => v is t.UpdateGlobalActionObject; | ||
}; | ||
@@ -136,0 +137,0 @@ actionChain(v: unknown): boolean; |
@@ -49,2 +49,3 @@ "use strict"; | ||
scanCamera: identifyObj((v) => v.actionType === 'scanCamera'), | ||
updateGlobal: identifyObj((v) => v.actionType === 'updateGlobal'), | ||
}, | ||
@@ -51,0 +52,0 @@ actionChain(v) { |
import type { ComponentObject } from './componentTypes'; | ||
/** | ||
* The page object that are nodes of the root object | ||
*/ | ||
export interface PageObject { | ||
@@ -6,0 +3,0 @@ components: ComponentObject[]; |
@@ -1,6 +0,1 @@ | ||
/** | ||
* Style object. | ||
* | ||
* Most commonly found in {@link ComponentObject} objects to describe their design implementation | ||
*/ | ||
export interface StyleObject { | ||
@@ -7,0 +2,0 @@ /** |
@@ -14,3 +14,3 @@ { | ||
], | ||
"gitHead": "c8fff7d73d1597478386317eaa17c2b62a5651eb", | ||
"gitHead": "ca4e349fdbdcb6e941f8b92c1bd31ed7349eb695", | ||
"homepage": "", | ||
@@ -34,3 +34,3 @@ "license": "ISC", | ||
"types": "dist/index.d.ts", | ||
"version": "1.0.254" | ||
"version": "1.0.257" | ||
} |
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
116934
2337