Home Reference Source
import {ItemsModel} from 'datamatic/src/Model/itemsModel.js'
public class | source

ItemsModel

Extends:

BaseModel → ItemsModel

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get

handler: *

public get

Returns length of model array

public get

model: *

getter for object model

public set

model(value: *)

setter for object model

Inherited Summary

From class BaseModel
public static

createRef(ref: *, obj: *): *

creates owner Model reference on Proxied data object

public get

handler: object: {"setPrototypeOf": *, "isExtensible": *, "preventExtensions": *, "getOwnPropertyDescriptor": *, "defineProperty": *, "has": *, "ownKeys": *, "apply": *}

public get

Getter for Model validation status for hierarchy

public get

Getter for Object.isFrozen status of this node and it's ancestors

public get

Getter for path to JSON Object for Model

public get

model: object | array | null: *

stub for model getter, overridden by Model sub-class

public get

Getter for Model's Unique Object ID

public get

options: any: *

Get options (if any) for this model's schema todo: review for possible removal

public get

owner: Model: *

Getter for model's Model owner object

public get

Getter for Model's parent

public get

path: string: *

Getter for path to current Element

public get

Getter for root element of Model hierarchy

public get

schema: *: *

todo: add tests

public get

Provides formatted string for json-schema lookup

public

Applies Object.freeze to model and triggers complete notification -- unlike Object.freeze, this prevents modification -- to all children in Model hierarchy

public

pipeline(pipesOrSchemas: *): Pipeline

returns pipeline segment for process chaining

public

resets Model to empty value

public

subscribe(func: *): object

Subscribes handler method to observer for model

public

subscribeTo(path: *, func: *): object

Subscribes handler method to property observer for path

public

toJSON(): *

Provides JSON object representation of Model

public

Provides JSON String representation of Model

public

validate(value: json): boolean

Tests value for validation without setting value to Model

public

valueOf(): *

Raw value of this Model

Public Constructors

public constructor() source

Override:

BaseModel#constructor

Public Members

public get handler: * source

Override:

BaseModel#handler

public get length: number: * source

Returns length of model array

Return:

number

public get model: * source

getter for object model

Override:

BaseModel#model

public set model(value: *) source

setter for object model

Override:

BaseModel#model