From 385c0da97ad78cf21209d27efd26e6a9d93f5bb1 Mon Sep 17 00:00:00 2001 From: DanyLE Date: Sun, 17 Jul 2022 14:13:44 +0200 Subject: [PATCH] update SDK --- libantosdk/build/debug/core/ts/antos.d.ts | 12099 ++++++++++---------- libantosdk/build/release/libantosdk.zip | Bin 1274931 -> 1276053 bytes libantosdk/core/ts/antos.d.ts | 12099 ++++++++++---------- 3 files changed, 12338 insertions(+), 11860 deletions(-) diff --git a/libantosdk/build/debug/core/ts/antos.d.ts b/libantosdk/build/debug/core/ts/antos.d.ts index 02b393b..8daae6b 100644 --- a/libantosdk/build/debug/core/ts/antos.d.ts +++ b/libantosdk/build/debug/core/ts/antos.d.ts @@ -1,3 +1,338 @@ +declare namespace OS { + namespace API { + /** + * Interface for user login data + * + * @export + * @interface UserLoginType + */ + interface UserLoginType { + /** + * The user credential + * + * @type {string} + * @memberof UserLoginType + */ + username: string; + /** + * The user password + * + * @type {string} + * @memberof UserLoginType + */ + password: string; + } + /** + * Interface for a command sent to + * server side package manage, it contains two field: + * + * @export + * @interface PackageCommandType + */ + interface PackageCommandType { + /** + * Command name, should be: `init`, `cache`, `install`, + * `uninstall` or `list` + * + * @type {string} + * @memberof PackageCommandType + */ + command: string; + /** + * Parameter object of each command + * + * @type {GenericObject} + * @memberof PackageCommandType + */ + args: GenericObject; + } + /** + * + * Interface for basic request result returned + * from the server-side. A valid server-side response should + * be in the following format + * ```json + * { + * "error": boolean or string_err, + * "result": JSON result object + * } + * ``` + * + * @export + * @interface RequestResult + */ + interface RequestResult { + /** + * Indicate whether the response is error + * + * @type {(boolean | string)} + * @memberof RequestResult + */ + error: boolean | string; + /** + * The response result, this value must be + * set when `error` is false + * + * @type {(string + * | boolean + * | GenericObject + * | any[] + * | FileInfoType + * | FileInfoType[] + * | setting.UserSettingType)} + * @memberof RequestResult + */ + result: string | boolean | GenericObject | any[] | FileInfoType | FileInfoType[] | setting.UserSettingType; + } + /** + * The host name of the server-side + */ + var HOST: string; + /** + * The base URI of the server-side API + */ + var BASE_URI: string; + /** + * The base REST URI of the server-side API + */ + var REST: string; + /** + * The namespace `handle` contains some low level API to + * communicate with the server side API. It is the only + * API layer that communicate directly with the server. + * To make AntOS compatible with any server side API, + * all exported variable unctions defined in the `handle` + * namespace should be re-implemented + */ + namespace handle { + /** + * Base URI for reading content of VFS file + */ + var get: string; + /** + * Base URI for VFS file sharing + */ + var shared: string; + /** + * Send a request to the server-side API for a directory scanning + * operation + * + * @export + * @param {string} p a VFS file path e.g. home://test/ + * @returns {Promise} A promise on a [[RequestResult]] + * which contains an error or a list of FileInfoType + */ + function scandir(p: string): Promise; + /** + * + * Send a request to the server-side API for directory creation + * + * @export + * @param {string} p VFS path of the directory to be created + * @returns {Promise} A promise on a RequestResult + * which contains an error or true on success + */ + function mkdir(p: string): Promise; + /** + * Send a request to the server-side API for sharing/unsharing a VFS file, + * once shared a VFS file will be publicly visible by everyone + * + * @export + * @param {string} p VFS file path to be shared + * @param {boolean} pub flag: share (true) or unshare (false) + * @returns {Promise} A promise on a RequestResult + * which contains an error or true on success + */ + function sharefile(p: string, pub: boolean): Promise; + /** + * Get VFS file meta-data + * + * @export + * @param {string} p VFS file path + * @returns {Promise} A promise on a [[RequestResult]] + * which contains an error or an object of FileInfoType + */ + function fileinfo(p: string): Promise; + /** + * Read a VFS file content. There are many ways a VFS file can be read: + * - Read as a raw text content + * - Read as a javascript file, in this case the content of the + * file will be executed + * - Read as JSON object + * + * @export + * @param {string} p path of the VFS file + * @param {string} t return data type: + * - jsonp: the response is an json object + * - script: the response is a javascript code + * - xml, html: the response is a XML/HTML object + * - text: plain text + * + * @returns {Promise} A promise on a [[RequestResult]] + * which contains an error or an object of [[FileInfoType]] + */ + function readfile(p: string, t: string): Promise; + /** + * Move a file to another location on server-side + * + * @export + * @param {string} s VFS source file path + * @param {string} d VFS destination file path + * @returns {Promise} A promise on a [[RequestResult]] + * which contains an error or a success response + */ + function move(s: string, d: string): Promise; + /** + * Delete a VFS file on the server-side + * + * @export + * @param {string} p VFS file path + * @returns {Promise} A promise on a [[RequestResult]] + * which contains an error or a success response + */ + function remove(p: string): Promise; + /** + * Read the file as binary data + * + * @export + * @param {string} p VFS file to be read + * @returns {Promise} a Promise on an array buffer + */ + function fileblob(p: string): Promise; + /** + * Send a command to the serverside package manager + * + * @export + * @param {PackageCommandType} d a package command of type PackageCommandType + * @returns {Promise} a promise on a [[RequestResult]] + */ + function packages(d: PackageCommandType): Promise; + /** + * Upload file to the server via VFS interface + * + * @export + * @param {string} d VFS destination directory path + * @returns {Promise} a promise on a [[RequestResult]] + */ + function upload(d: string): Promise; + /** + * Write Base 64 encoded data to a VFS file + * + * @export + * @param {string} p path to the VFS file + * @param {string} d file data encoded in Base 64 + * @returns {Promise} a promise on a [[RequestResult]] + */ + function write(p: string, d: string): Promise; + /** + * An apigateway allows client side to execute a custom server-side + * script and get back the result. This gateway is particularly + * useful in case of performing a task that is not provided by the core + * API + * + * @export + * @param {GenericObject} d execution indication, provided only when ws is `false` + * otherwise, `d` should be written directly to the websocket stream as JSON object. + * Two possible formats of `d`: + * ```text + * execute an server-side script file: + * + * { + * path: [VFS path], + * parameters: [parameters of the server-side script] + * } + * + * or, execute directly a snippet of server-side script: + * + * { code: [server-side script code snippet as string] } + * + * ``` + * + * @param {boolean} ws flag indicate whether to use websocket for the connection + * to the gateway API. In case of streaming data, the websocket is preferred + * @returns {Promise} a promise on the result object (any) + */ + function apigateway(d: GenericObject, ws: boolean): Promise; + /** + * Check if a user is logged in + * + * @export + * @returns {Promise} a promise on a [[RequestResult]] that + * contains an error or a [[UserSettingType]] object + */ + function auth(): Promise; + /** + * Perform a login operation + * + * @export + * @param {UserLoginType} d user data [[UserLoginType]] + * @returns {Promise} a promise on a [[RequestResult]] that + * contains an error or a [[UserSettingType]] object + */ + function login(d: UserLoginType): Promise; + /** + * Perform a logout operation + * + * @export + * @returns {Promise} a promise on a [[RequestResult]] + */ + function logout(): Promise; + /** + * Save the current user settings + * + * @export + * @returns {Promise} a promise on a [[RequestResult]] + */ + function setting(): Promise; + /** + * This is the low level function of AntOS VDB API. + * It requests the server API to perform some simple + * SQL query. + * + * @export + * @param {string} cmd action to perform: save, delete, get, select + * @param {GenericObject} d data object of the request based on each action: + * - save: + * ``` + * { table: "table name", data: [record data object]} + * ``` + * - get: + * ``` + * { table: "table name", id: [record id]} + * ``` + * - delete: + * ``` + * { table: "table name", id: [record id]} + * or + * { table: "table name", cond: [conditional object]} + * ``` + * - select: + * ``` + * { table: "table name", cond: [conditional object]} + * ``` + * @returns {Promise} a promise of [[RequestResult]] on the + * query data + * + * A conditional object represents a SQL condition statement as an object, + * example: `pid = 10 AND cid = 2 ORDER BY date DESC` + * ``` + * { + * exp: { + * "and": { + * pid: 10, + * cid: 2 + * } + * }, + * order: { + * date: "DESC" + * } + * } + * ``` + */ + function dbquery(cmd: string, d: GenericObject): Promise; + } + } +} declare namespace OS { namespace GUI { /** @@ -45,10 +380,11 @@ declare namespace OS { * * Need to be implemented by subclasses * - * @abstract - * @memberof SubWindow + * + * @returns {void} + * @memberof BaseDialog */ - abstract init(): void; + init(): void; /** * Main entry point after rendering of the sub-window * @@ -77,6 +413,13 @@ declare namespace OS { * @memberof SubWindow */ hide(): void; + /** + * blur the sub-window + * + * @returns {void} + * @memberof SubWindow + */ + blur(): void; } /** * Abstract prototype of all AntOS dialogs widget @@ -925,2458 +1268,6 @@ declare namespace OS { const schemes: GenericObject; } } -declare namespace OS { - namespace API { - /** - * Data type exchanged via - * the global Announcement interface - * - * @export - * @interface AnnouncementDataType - */ - interface AnnouncementDataType { - /** - * message string - * - * @type {string| FormattedString} - * @memberof AppAnnouncementDataType - */ - message: string | FormattedString; - /** - * Process ID - * - * @type {number} - * @memberof AppAnnouncementDataType - */ - id: number; - /** - * App name - * - * @type {string | FormattedString} - * @memberof AppAnnouncementDataType - */ - name: string | FormattedString; - /** - * Icon file - * - * @type {string} - * @memberof AppAnnouncementDataType - */ - icon?: string; - /** - * App icon class - * - * @type {string} - * @memberof AppAnnouncementDataType - */ - iconclass?: string; - /** - * User specific data - * - * @type {*} - * @memberof AppAnnouncementDataType - */ - u_data?: T; - } - /** - * Observable entry type definition - * - * @export - * @interface ObservableEntryType - */ - interface ObservableEntryType { - /** - * A Set of callbacks that should be called only once. - * These callbacks will be removed after the first - * occurrence of the corresponding event - * - * @memberof ObservableEntryType - */ - one: Set<(d: any) => void>; - /** - * A Set of callbacks that should be called - * every time the corresponding event is triggered - * - * @memberof ObservableEntryType - */ - many: Set<(d: any) => void>; - } - /** - * Announcement listener type definition - * - * @export - * @interface AnnouncerListenerType - */ - interface AnnouncerListenerType { - [index: number]: { - /** - * The event name - * - * @type {string} - */ - e: string; - /** - * The event callback - * - */ - f: (d: any) => void; - }[]; - } - /** - * This class is the based class used in AntOS event - * announcement system. - * It implements the observer pattern using simple - * subscribe/publish mechanism - * @export - * @class Announcer - */ - class Announcer { - /** - * The observable object that stores event name - * and its corresponding callback in [[ObservableEntryType]] - * - * @type {GenericObject} - * @memberof Announcer - */ - observable: GenericObject; - /** - * Enable/disable the announcer - * - * @type {boolean} - * @memberof Announcer - */ - enable: boolean; - /** - *Creates an instance of Announcer. - * @memberof Announcer - */ - constructor(); - /** - * Disable the announcer, when this function is called - * all events and their callbacks will be removed - * - * @returns - * @memberof Announcer - */ - disable(): boolean; - /** - * Subscribe to an event, the callback will be called - * every time the corresponding event is trigged - * - * @param {string} evtName event name - * @param {(d: any) => void} callback The corresponding callback - * @returns {void} - * @memberof Announcer - */ - on(evtName: string, callback: (d: any) => void): void; - /** - * Subscribe to an event, the callback will - * be called only once and then removed from the announcer - * - * @param {string} evtName event name - * @param {(d: any) => void} callback the corresponding callback - * @returns {void} - * @memberof Announcer - */ - one(evtName: string, callback: (d: any) => void): void; - /** - * Unsubscribe the callback from an event - * - * @param {string} evtName event name - * @param {(d: any) => void} [callback] the callback to be unsubscribed. - * When the `callback` is `*`, all callbacks related to `evtName` will be - * removed - * @memberof Announcer - */ - off(evtName: string, callback?: (d: any) => void): void; - /** - * Trigger an event - * - * @param {string} evtName event name - * @param {*} data data object that will be send to all related callback - * @returns {void} - * @memberof Announcer - */ - trigger(evtName: string, data: any): void; - } - } - /** - * This namespace defines every thing related to the system announcement. - * - * The system announcement provides a global way to communicate between - * processes (applications/services) using the subscribe/publish - * mechanism - */ - namespace announcer { - /** - * The global announcer object that manages global events - * and callbacks - */ - var observable: API.Announcer; - /** - * This variable is used to allocate the `id` of all messages - * passing between publishers and subscribers in the - * system announcement - */ - var quota: 0; - /** - * Placeholder of all global events listeners - */ - var listeners: API.AnnouncerListenerType; - /** - * Subscribe to a global event - * - * @export - * @param {string} e event name - * @param {(d: API.AnnouncementDataType) => void} f event callback - * @param {GUI.BaseModel} a the process (Application/service) related to the callback - */ - function on(e: string, f: (d: API.AnnouncementDataType) => void, a: BaseModel): void; - /** - * Trigger a global event - * - * @export - * @param {string} e event name - * @param {*} d data passing to all related callback - */ - function trigger(e: string, d: any): void; - /** - * Report system fail. This will trigger the global `fail` - * event - * - * @export - * @param {(string | FormattedString)} m message string - * @param {Error} e error to be reported - */ - function osfail(m: string | FormattedString, e: Error): void; - /** - * Report system error. This will trigger the global `error` - * event - * - * @export - * @param {(string | FormattedString)} m message string - * @param {Error} e error to be reported - */ - function oserror(m: string | FormattedString, e: Error): void; - /** - * Trigger system notification (`info` event) - * - * @export - * @param {(string | FormattedString)} m notification message - */ - function osinfo(m: string | FormattedString): void; - /** - * - * - * @export - * @param {string} e event name - * @param {(string| FormattedString)} m event message - * @param {*} [d] user data - */ - function ostrigger(e: string, m: string | FormattedString, d?: any): void; - /** - * Unregister a process (application/service) from - * the global announcement system - * - * @export - * @param {GUI.BaseModel} app reference to the process - * @returns {void} - */ - function unregister(app: BaseModel): void; - /** - * Allocate message id - * - * @export - * @returns {number} - */ - function getMID(): number; - } -} -declare namespace OS { - /** - * This namespace dedicated to all operations related to system - * process management - */ - namespace PM { - /** - * A process is either an instance of an application or a service - */ - type ProcessType = application.BaseApplication | application.BaseService; - /** - * Alias to all classes that extends [[BaseModel]] - */ - type ModelTypeClass = { - new (args: AppArgumentsType[]): T; - }; - /** - * Process id allocator, when a new process is created, the value of - * this variable is increased - */ - var pidalloc: number; - /** - * All running processes is stored in this variables - */ - var processes: GenericObject; - /** - * Create a new process of application or service - * - * @export - * @param {string} app class name string - * @param {ProcessTypeClass} cls prototype class - * @param {GUI.AppArgumentsType[]} [args] process arguments - * @returns {Promise} a promise on the created process - */ - function createProcess(app: string, cls: ModelTypeClass, args?: AppArgumentsType[]): Promise; - /** - * Get the reference to a process using its id - * - * @export - * @param {number} pid - * @returns {BaseModel} - */ - function appByPid(pid: number): BaseModel; - /** - * Kill a process - * - * @export - * @param {OS.GUI.BaseModel} app reference to the process - * @returns {void} - */ - function kill(app: BaseModel): void; - /** - * Kill all process of an application or service - * - * @export - * @param {string} app process class name - * @param {boolean} force force exit all process - * @returns {void} - */ - function killAll(app: string, force: boolean): void; - } -} -declare namespace OS { - namespace API { - /** - * Interface for user login data - * - * @export - * @interface UserLoginType - */ - interface UserLoginType { - /** - * The user credential - * - * @type {string} - * @memberof UserLoginType - */ - username: string; - /** - * The user password - * - * @type {string} - * @memberof UserLoginType - */ - password: string; - } - /** - * Interface for a command sent to - * server side package manage, it contains two field: - * - * @export - * @interface PackageCommandType - */ - interface PackageCommandType { - /** - * Command name, should be: `init`, `cache`, `install`, - * `uninstall` or `list` - * - * @type {string} - * @memberof PackageCommandType - */ - command: string; - /** - * Parameter object of each command - * - * @type {GenericObject} - * @memberof PackageCommandType - */ - args: GenericObject; - } - /** - * - * Interface for basic request result returned - * from the server-side. A valid server-side response should - * be in the following format - * ```json - * { - * "error": boolean or string_err, - * "result": JSON result object - * } - * ``` - * - * @export - * @interface RequestResult - */ - interface RequestResult { - /** - * Indicate whether the response is error - * - * @type {(boolean | string)} - * @memberof RequestResult - */ - error: boolean | string; - /** - * The response result, this value must be - * set when `error` is false - * - * @type {(string - * | boolean - * | GenericObject - * | any[] - * | FileInfoType - * | FileInfoType[] - * | setting.UserSettingType)} - * @memberof RequestResult - */ - result: string | boolean | GenericObject | any[] | FileInfoType | FileInfoType[] | setting.UserSettingType; - } - /** - * The host name of the server-side - */ - var HOST: string; - /** - * The base URI of the server-side API - */ - var BASE_URI: string; - /** - * The base REST URI of the server-side API - */ - var REST: string; - /** - * The namespace `handle` contains some low level API to - * communicate with the server side API. It is the only - * API layer that communicate directly with the server. - * To make AntOS compatible with any server side API, - * all exported variable unctions defined in the `handle` - * namespace should be re-implemented - */ - namespace handle { - /** - * Base URI for reading content of VFS file - */ - var get: string; - /** - * Base URI for VFS file sharing - */ - var shared: string; - /** - * Send a request to the server-side API for a directory scanning - * operation - * - * @export - * @param {string} p a VFS file path e.g. home://test/ - * @returns {Promise} A promise on a [[RequestResult]] - * which contains an error or a list of FileInfoType - */ - function scandir(p: string): Promise; - /** - * - * Send a request to the server-side API for directory creation - * - * @export - * @param {string} p VFS path of the directory to be created - * @returns {Promise} A promise on a RequestResult - * which contains an error or true on success - */ - function mkdir(p: string): Promise; - /** - * Send a request to the server-side API for sharing/unsharing a VFS file, - * once shared a VFS file will be publicly visible by everyone - * - * @export - * @param {string} p VFS file path to be shared - * @param {boolean} pub flag: share (true) or unshare (false) - * @returns {Promise} A promise on a RequestResult - * which contains an error or true on success - */ - function sharefile(p: string, pub: boolean): Promise; - /** - * Get VFS file meta-data - * - * @export - * @param {string} p VFS file path - * @returns {Promise} A promise on a [[RequestResult]] - * which contains an error or an object of FileInfoType - */ - function fileinfo(p: string): Promise; - /** - * Read a VFS file content. There are many ways a VFS file can be read: - * - Read as a raw text content - * - Read as a javascript file, in this case the content of the - * file will be executed - * - Read as JSON object - * - * @export - * @param {string} p path of the VFS file - * @param {string} t return data type: - * - jsonp: the response is an json object - * - script: the response is a javascript code - * - xml, html: the response is a XML/HTML object - * - text: plain text - * - * @returns {Promise} A promise on a [[RequestResult]] - * which contains an error or an object of [[FileInfoType]] - */ - function readfile(p: string, t: string): Promise; - /** - * Move a file to another location on server-side - * - * @export - * @param {string} s VFS source file path - * @param {string} d VFS destination file path - * @returns {Promise} A promise on a [[RequestResult]] - * which contains an error or a success response - */ - function move(s: string, d: string): Promise; - /** - * Delete a VFS file on the server-side - * - * @export - * @param {string} p VFS file path - * @returns {Promise} A promise on a [[RequestResult]] - * which contains an error or a success response - */ - function remove(p: string): Promise; - /** - * Read the file as binary data - * - * @export - * @param {string} p VFS file to be read - * @returns {Promise} a Promise on an array buffer - */ - function fileblob(p: string): Promise; - /** - * Send a command to the serverside package manager - * - * @export - * @param {PackageCommandType} d a package command of type PackageCommandType - * @returns {Promise} a promise on a [[RequestResult]] - */ - function packages(d: PackageCommandType): Promise; - /** - * Upload file to the server via VFS interface - * - * @export - * @param {string} d VFS destination directory path - * @returns {Promise} a promise on a [[RequestResult]] - */ - function upload(d: string): Promise; - /** - * Write Base 64 encoded data to a VFS file - * - * @export - * @param {string} p path to the VFS file - * @param {string} d file data encoded in Base 64 - * @returns {Promise} a promise on a [[RequestResult]] - */ - function write(p: string, d: string): Promise; - /** - * An apigateway allows client side to execute a custom server-side - * script and get back the result. This gateway is particularly - * useful in case of performing a task that is not provided by the core - * API - * - * @export - * @param {GenericObject} d execution indication, provided only when ws is `false` - * otherwise, `d` should be written directly to the websocket stream as JSON object. - * Two possible formats of `d`: - * ```text - * execute an server-side script file: - * - * { - * path: [VFS path], - * parameters: [parameters of the server-side script] - * } - * - * or, execute directly a snippet of server-side script: - * - * { code: [server-side script code snippet as string] } - * - * ``` - * - * @param {boolean} ws flag indicate whether to use websocket for the connection - * to the gateway API. In case of streaming data, the websocket is preferred - * @returns {Promise} a promise on the result object (any) - */ - function apigateway(d: GenericObject, ws: boolean): Promise; - /** - * Check if a user is logged in - * - * @export - * @returns {Promise} a promise on a [[RequestResult]] that - * contains an error or a [[UserSettingType]] object - */ - function auth(): Promise; - /** - * Perform a login operation - * - * @export - * @param {UserLoginType} d user data [[UserLoginType]] - * @returns {Promise} a promise on a [[RequestResult]] that - * contains an error or a [[UserSettingType]] object - */ - function login(d: UserLoginType): Promise; - /** - * Perform a logout operation - * - * @export - * @returns {Promise} a promise on a [[RequestResult]] - */ - function logout(): Promise; - /** - * Save the current user settings - * - * @export - * @returns {Promise} a promise on a [[RequestResult]] - */ - function setting(): Promise; - /** - * This is the low level function of AntOS VDB API. - * It requests the server API to perform some simple - * SQL query. - * - * @export - * @param {string} cmd action to perform: save, delete, get, select - * @param {GenericObject} d data object of the request based on each action: - * - save: - * ``` - * { table: "table name", data: [record data object]} - * ``` - * - get: - * ``` - * { table: "table name", id: [record id]} - * ``` - * - delete: - * ``` - * { table: "table name", id: [record id]} - * or - * { table: "table name", cond: [conditional object]} - * ``` - * - select: - * ``` - * { table: "table name", cond: [conditional object]} - * ``` - * @returns {Promise} a promise of [[RequestResult]] on the - * query data - * - * A conditional object represents a SQL condition statement as an object, - * example: `pid = 10 AND cid = 2 ORDER BY date DESC` - * ``` - * { - * exp: { - * "and": { - * pid: 10, - * cid: 2 - * } - * }, - * order: { - * date: "DESC" - * } - * } - * ``` - */ - function dbquery(cmd: string, d: GenericObject): Promise; - } - } -} -declare namespace OS { - /** - * This namespace is dedicated to everything related to the - * global system settings - */ - namespace setting { - /** - * User setting type definition - * - * @export - * @interface UserSettingType - */ - interface UserSettingType { - /** - * User full name - * - * @type {string} - * @memberof UserSettingType - */ - name: string; - /** - * User name - * - * @type {string} - * @memberof UserSettingType - */ - username: string; - /** - * User id - * - * @type {number} - * @memberof UserSettingType - */ - id: number; - /** - * User groups - * - * @type {{ [index: number]: string }} - * @memberof UserSettingType - */ - group?: { - [index: number]: string; - }; - [propName: string]: any; - } - /** - * Virtual desktop setting data type - * - * @export - * @interface DesktopSettingType - */ - interface DesktopSettingType { - /** - * Desktop VFS path - * - * @type {string} - * @memberof DesktopSettingType - */ - path: string; - /** - * Desktop menu, can be added automatically by applications - * - * @type {GUI.BasicItemType[]} - * @memberof DesktopSettingType - */ - menu: GUI.BasicItemType[]; - /** - * Show desktop hidden files - * - * @type {boolean} - * @memberof DesktopSettingType - */ - showhidden: boolean; - [propName: string]: any; - } - /** - * Wallpaper setting data type - * - * @export - * @interface WPSettingType - */ - interface WPSettingType { - /** - * Repeat wallpaper: - * - `repeat` - * - `repeat-x` - * - `repeat-y` - * - `no-repeat` - * - * @type {string} - * @memberof WPSettingType - */ - repeat: string; - /** - * Wallpaper size - * - `contain` - * - `cover` - * - `auto` - * - * @type {string} - * @memberof WPSettingType - */ - size: string; - /** - * VFS path to the wallpaper image - * - * @type {string} - * @memberof WPSettingType - */ - url: string; - } - /** - * Theme setting data type - * - * @export - * @interface ThemeSettingType - */ - interface ThemeSettingType { - /** - * Theme name, this value is used for looking - * theme file in system asset - * - * @type {string} - * @memberof ThemeSettingType - */ - name: string; - /** - * Theme user-friendly text - * - * @type {string} - * @memberof ThemeSettingType - */ - text: string; - } - /** - * Appearance setting data type - * - * @export - * @interface AppearanceSettingType - */ - interface AppearanceSettingType { - /** - * Current theme name - * - * @type {string} - * @memberof AppearanceSettingType - */ - theme: string; - /** - * All themes available in the system - * - * @type {ThemeSettingType[]} - * @memberof AppearanceSettingType - */ - themes: ThemeSettingType[]; - /** - * Current wallpaper setting - * - * @type {WPSettingType} - * @memberof AppearanceSettingType - */ - wp: WPSettingType; - /** - * All wallpapers available in the system - * - * @type {string[]} - * @memberof AppearanceSettingType - */ - wps: string[]; - } - /** - * VFS Mount points setting data type - * - * @export - * @interface VFSMountPointSettingType - */ - interface VFSMountPointSettingType { - /** - * Path to the mount point - * - * @type {string} - * @memberof VFSMountPointSettingType - */ - path: string; - /** - * User friendly mount point name - * - * @type {string} - * @memberof VFSMountPointSettingType - */ - text: string; - [propName: string]: any; - } - /** - * VFS setting data type - * - * @export - * @interface VFSSettingType - */ - interface VFSSettingType { - /** - * mount points setting - * - * @type {VFSMountPointSettingType[]} - * @memberof VFSSettingType - */ - mountpoints: VFSMountPointSettingType[]; - [propName: string]: any; - } - /** - * Global system setting data type - * - * @export - * @interface SystemSettingType - */ - interface SystemSettingType { - /** - * System error report URL - * - * @type {string} - * @memberof SystemSettingType - */ - error_report: string; - /** - * Current system locale e.g. `en_GB` - * - * @type {string} - * @memberof SystemSettingType - */ - locale: string; - /** - * System menus - * - * @type {API.PackageMetaType[]} - * @memberof API.PackageMetaType - */ - menu: API.PackageMetaType[]; - /** - * Packages meta-data - * - * @type {{ [index: string]: API.PackageMetaType }} - * @memberof SystemSettingType - */ - packages: { - [index: string]: API.PackageMetaType; - }; - /** - * Path to the installed packages - * - * @type {{ - * user: string; - * system: string; - * }} - * @memberof SystemSettingType - */ - pkgpaths: { - /** - * User specific packages install location - * - * @type {string} - */ - user: string; - /** - * System packages install location - * - * @type {string} - */ - system: string; - }; - /** - * Package repositories setting. - * This configuration is used by [[MarketPlace]] - * for package management - * - * @type {{ - * text: string; - * url: string; - * }[]} - * @memberof SystemSettingType - */ - repositories: { - /** - * Repository name - * - * @type {string} - */ - text: string; - /** - * Repository uri - * - * @type {string} - */ - url: string; - }[]; - /** - * Startup applications and services - * - * @type {{ - * apps: string[]; - * services: string[]; - * }} - * @memberof SystemSettingType - */ - startup: { - /** - * List of application names - * - * @type {string[]} - */ - apps: string[]; - /** - * List of service names - * - * @type {string[]} - */ - services: string[]; - /** - * List of pinned applications - * - * @type {string[]} - */ - pinned: string[]; - }; - } - /** - * User settings - */ - var user: UserSettingType; - /** - * Application settings - */ - var applications: GenericObject; - /** - * Desktop settings - */ - var desktop: DesktopSettingType; - /** - * Appearance settings - */ - var appearance: AppearanceSettingType; - /** - * VFS settings - */ - var VFS: VFSSettingType; - /** - * System settings - */ - var system: SystemSettingType; - } - /** - * Reset the system settings to default values - * - * @export - */ - function resetSetting(): void; - /** - * Apply the input parameter object to system settings. - * This object could be an object loaded from - * setting JSON file saved on the server. - * - * @export - * @param {*} conf - */ - function systemSetting(conf: any): void; -} -/// -declare namespace OS { - namespace application { - /** - * Services are processes that run in the background and - * are waken up in certain circumstances such as by global - * events or user interactions. - * - * Each service takes an entry in the system tray menu - * located on the system panel. This menu entry is used - * to access to service visual contents such as: options, - * task performing based on user interaction, etc. - * - * Services are singleton processes, there is only - * one process of a service at a time - * - * @export - * @abstract - * @class BaseService - * @extends {BaseModel} - */ - abstract class BaseService extends BaseModel { - /** - * The service icon shown in the system tray - * - * @type {string} - * @memberof BaseService - */ - icon: string; - /** - * CSS class of the service icon shown in the system tray - * - * @type {string} - * @memberof BaseService - */ - iconclass: string; - /** - * Text of the service shown in the system tray - * - * @type {string} - * @memberof BaseService - */ - text: string; - /** - * Reference to the menu entry DOM element attached - * to the service - * - * @type {HTMLElement} - * @memberof BaseService - */ - domel: HTMLElement; - /** - * Reference to the timer that periodically executes the callback - * defined in [[watch]]. - * - * @private - * @type {number} - * @memberof BaseService - */ - private timer; - /** - * Reference to the system tray menu - * - * @type {HTMLElement} - * @memberof BaseService - */ - holder: HTMLElement; - /** - * Placeholder for service select callback - * - * @memberof BaseService - */ - onmenuselect: (d: OS.GUI.TagEventType) => void; - /** - *Creates an instance of BaseService. - * @param {string} name service class name - * @param {AppArgumentsType[]} args service arguments - * @memberof BaseService - */ - constructor(name: string, args: AppArgumentsType[]); - /** - * Do nothing - * - * @memberof BaseService - */ - hide(): void; - /** - * Init the service before attaching it to - * the system tray: event subscribe, scheme - * loading. - * - * Should be implemented by all subclasses - * - * @abstract - * @memberof BaseService - */ - abstract init(): void; - /** - * Refresh the service menu entry in the - * system tray - * - * @memberof BaseService - */ - update(): void; - /** - * Get the service meta-data - * - * @returns {API.PackageMetaType} - * @memberof BaseService - */ - meta(): API.PackageMetaType; - /** - * Attach the service to a menu element - * such as the system tray menu - * - * @param {HTMLElement} h - * @memberof BaseService - */ - attach(h: HTMLElement): void; - /** - * Set the callback that will be called periodically - * after a period of time. - * - * Each service should only have at most one watcher - * - * @protected - * @param {number} t period time in seconds - * @param {() => void} f callback function - * @returns {number} - * @memberof BaseService - */ - protected watch(t: number, f: () => void): number; - /** - * This function is called when the service - * is exited - * - * @protected - * @param {BaseEvent} evt exit event - * @returns - * @memberof BaseService - */ - protected onexit(evt: BaseEvent): JQuery; - /** - * Do nothing - * - * @memberof BaseService - */ - main(): void; - /** - * Do nothing - * - * @memberof BaseService - */ - show(): void; - /** - * Awake the service, this function is usually called when - * the system tray menu entry attached to the service is - * selected. - * - * This function should be implemented by all subclasses - * - * @abstract - * @param {GUI.TagEventType} e - * @memberof BaseService - */ - abstract awake(e: GUI.TagEventType): void; - /** - * Do nothing - * - * @protected - * @param {BaseEvent} evt - * @memberof BaseService - */ - protected cleanup(evt: BaseEvent): void; - } - } -} -declare type VFSFileHandleClass = { - new (...args: any[]): OS.API.VFS.BaseFileHandle; -}; -interface String { - /** - * Convert a string to VFS file handle. - * - * This function will create a file handle object from the string - * with the help of [[VFS.findHandles]] - * - * @returns {OS.API.VFS.BaseFileHandle} - * @memberof String - */ - asFileHandle(): OS.API.VFS.BaseFileHandle; -} -declare namespace OS { - namespace API { - /** - * User permission data type - * - * @export - * @interface UserPermissionType - */ - interface UserPermissionType { - read: boolean; - write: boolean; - exec: boolean; - } - /** - * VFS file meta-data data type - * - * @export - * @interface FileInfoType - */ - interface FileInfoType { - /** - * File mime type - * - * @type {string} - * @memberof FileInfoType - */ - mime: string; - /** - * File size - * - * @type {number} - * @memberof FileInfoType - */ - size: number; - /** - * File name - * - * @type {string} - * @memberof FileInfoType - */ - name: string; - /** - * File path - * - * @type {string} - * @memberof FileInfoType - */ - path: string; - /** - * File type: - * - `file` - * - `dir` - * - `app` - * - * @type {string} - * @memberof FileInfoType - */ - type: string; - /** - * File permission - * - * @type {{ - * group: UserPermissionType; - * owner: UserPermissionType; - * other: UserPermissionType; - * }} - * @memberof FileInfoType - */ - perm?: { - /** - * Group permission - * - * @type {UserPermissionType} - */ - group: UserPermissionType; - /** - * Owner permission - * - * @type {UserPermissionType} - */ - owner: UserPermissionType; - /** - * Other permission - * - * @type {UserPermissionType} - */ - other: UserPermissionType; - }; - /** - * Creation time - * - * @type {string} - * @memberof FileInfoType - */ - ctime?: string; - /** - * Modification time - * - * @type {string} - * @memberof FileInfoType - */ - mtime?: string; - /** - * Group id - * - * @type {number} - * @memberof FileInfoType - */ - gid?: number; - /** - * User id - * - * @type {number} - * @memberof FileInfoType - */ - uid?: number; - [propName: string]: any; - } - /** - * This namespace is dedicated to all APIs related to - * AntOS Virtual File System (VFS) - */ - namespace VFS { - /** - * Placeholder stores VFS file protocol patterns and its attached file handle class. - * - */ - const handles: GenericObject; - /** - * Register a protocol to a handle class - * - * @export - * @param {string} protos VFS protocol pattern - * @param {VFSFileHandleClass} cls handle class - */ - function register(protos: string, cls: VFSFileHandleClass): void; - /** - * Load custom VFS handles if the package vfsx available - * - * @export - * @param {boolean} [force] force load the file - * @return {*} {Promise} - */ - function loadVFSX(force?: boolean): Promise; - /** - * Looking for a attached file handle class of a string protocol - * - * When converting a string to file handle, the system will look - * for a protocol pattern in the string, if the protocol found, - * its attached handle class (found in [[VFS.handles]]) will be - * used to initialize a file handle object from the string - * - * ```typescript - * "home://data/test.txt".asFileHandle() // -> an instance of RemoteFileHandle - * ``` - * @export - * @param {string} proto protocol string - * @returns {VFSFileHandleClass[]} - */ - function findHandles(proto: string): VFSFileHandleClass[]; - /** - * Abstract prototype of all all VFS file handle definition. - * - * This prototype provides a standardized interface to access - * to different underlay file systems such as remote file, - * cloud file (Dropbox, Google drive, etc.), URL or memory-based file - * - * @export - * @abstract - * @class BaseFileHandle - */ - abstract class BaseFileHandle { - /** - * Flag indicates whether the file is dirty - * - * @type {boolean} - * @memberof BaseFileHandle - */ - dirty: boolean; - /** - * Once read, file content will be cached in this placeholder - * - * @type {*} - * @memberof BaseFileHandle - */ - cache: any; - /** - * Flag indicated whether the file meta-data is loaded - * - * @type {boolean} - * @memberof BaseFileHandle - */ - ready: boolean; - /** - * File path - * - * @type {string} - * @memberof BaseFileHandle - */ - path: string; - /** - * File protocol e.g: - * - `os://` - * - `home://` - * - * @type {string} - * @memberof BaseFileHandle - */ - protocol: string; - /** - * List of path segments - * - * @type {string[]} - * @memberof BaseFileHandle - */ - genealogy: string[]; - /** - * File base name - * - * @type {string} - * @memberof BaseFileHandle - */ - basename: string; - /** - * Once loaded, [[ready]] will be set to true and - * file meta-data will be stored in this place holder - * - * @type {FileInfoType} - * @memberof BaseFileHandle - */ - info: FileInfoType; - /** - * File extension - * - * @type {string} - * @memberof BaseFileHandle - */ - ext: string; - /** - * - * File type - * @type {string} - * @memberof BaseFileHandle - */ - type: string; - /** - *Creates an instance of BaseFileHandle. - * @param {string} path file path - * @memberof BaseFileHandle - */ - constructor(path: string); - /** - * Set a file path to the current file handle - * - * @param {string} p - * @returns {void} - * @memberof BaseFileHandle - */ - setPath(p: string): void; - /** - * Getter: Get the file basename - * Setter: set the file name - * - * @returns {string} - * @memberof BaseFileHandle - */ - get filename(): string; - set filename(v: string); - /** - * Set data to the file cache - * - * @param {*} v data object - * @returns {BaseFileHandle} - * @memberof BaseFileHandle - */ - setCache(v: any): BaseFileHandle; - /** - * Return the object itself - * - * @returns {BaseFileHandle} - * @memberof BaseFileHandle - */ - asFileHandle(): BaseFileHandle; - /** - * Check whether the current file is the root of the file tree - * - * @returns {boolean} - * @memberof BaseFileHandle - */ - isRoot(): boolean; - /** - * Check whether the current file is a hidden file - * - * @returns {boolean} - * @memberof BaseFileHandle - */ - isHidden(): boolean; - /** - * Get hash number of the current file path - * - * @returns {number} - * @memberof BaseFileHandle - */ - hash(): number; - /** - * Convert the current file cache to Base64 - * - * @protected - * @param {string} t type of the file cache: - * - `object` - * - `mime type` - * @returns {(Promise)} promise on the converted data - * @memberof BaseFileHandle - */ - protected b64(t: string): Promise; - /** - * Get the parent file handle of the current file - * - * @returns {BaseFileHandle} - * @memberof BaseFileHandle - */ - parent(): BaseFileHandle; - /** - * Load the file meta-data before performing - * any task - * - * @returns {Promise} a promise on file meta-data - * @memberof BaseFileHandle - */ - onready(): Promise; - /** - * Public read operation - * - * This function calls the [[_rd]] function to perform the operation. - * - * If the current file is a directory, then the operation - * will return the meta-data of all files inside of the directory. - * Otherwise, file content will be returned - * - * @param {string} t data type - * - jsonp: the response is an json object - * - script: the response is a javascript code - * - xml, html: the response is a XML/HTML object - * - text: plain text - * - binary - * - * @returns {Promise} a promise on the file content - * @memberof BaseFileHandle - */ - read(t?: string): Promise; - /** - * Write the file cache to the actual file - * - * This function calls the [[_wr]] function to perform the operation - * - * @param {string} t data type - * - `base64` - * - `object` - * - `mime type` - * - * @returns {Promise} promise on the operation result - * @memberof BaseFileHandle - */ - write(t: string): Promise; - /** - * Sub-directory creation - * - * This function calls the [[_mk]] function to perform the operation - * - * @param {string} d sub directory name - * @returns {Promise} promise on the operation result - * @memberof BaseFileHandle - */ - mk(d: string): Promise; - /** - * Delete the file - * - * This function calls the [[_rm]] function to perform the operation - * - * @returns {Promise} promise on the operation result - * @memberof BaseFileHandle - */ - remove(): Promise; - /** - * Upload a file to the current directory - * - * Only work when the current file is a directory - * - * This function calls the [[_up]] function to perform the operation - * - * @returns {Promise} promise on the operation result - * @memberof BaseFileHandle - */ - upload(): Promise; - /** - * Share the file by publish it. - * - * Only work with file - * - * This function calls the [[_pub]] function to perform the operation - * - * @returns {Promise} promise on operation result - * @memberof BaseFileHandle - */ - publish(): Promise; - /** - * Download the file. - * - * Only work with file - * - * This function calls the [[_down]] function to perform the operation - * - * @returns {Promise} Promise on the operation result - * @memberof BaseFileHandle - */ - download(): Promise; - /** - * Move the current file to another location - * - * This function calls the [[_mv]] function to perform the operation - * - * @param {string} d destination location - * @returns {Promise} promise on the operation result - * @memberof BaseFileHandle - */ - move(d: string): Promise; - /** - * Execute the current file. - * - * This action depends on each file protocol - * - * This function calls the [[_exec]] function to perform the operation - * - * @returns {Promise} - * @memberof BaseFileHandle - */ - execute(): Promise; - /** - * Get an accessible link to the file - * that can be accessed from the browser - * - * @returns {string} - * @memberof BaseFileHandle - */ - getlink(): string; - /** - * Helper function returns a promise on unsupported action - * - * @param {string} t action name - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected unsupported(t: string): Promise; - /** - * Low level protocol-specific read operation - * - * This function should be overridden on the file handle class - * that supports the operation - * - * @protected - * @param {string} t data type, see [[read]] - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _rd(t: string): Promise; - /** - * Low level protocol-specific write operation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @protected - * @param {string} t data type, see [[write]] - * @param {*} [d] - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _wr(t: string, d?: any): Promise; - /** - * Low level protocol-specific sub-directory creation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @protected - * @param {string} d sub directory name - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _mk(d: string): Promise; - /** - * Low level protocol-specific delete operation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _rm(): Promise; - /** - * Low level protocol-specific move operation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @protected - * @param {string} d - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _mv(d: string): Promise; - /** - * Low level protocol-specific upload operation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _up(): Promise; - /** - * Low level protocol-specific download operation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _down(): Promise; - /** - * Low level protocol-specific execute operation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _exec(): Promise; - /** - * Low level protocol-specific share operation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _pub(): Promise; - /** - * Read the current file meta-data - * - * should be implemented by subclasses - * - * @abstract - * @returns {Promise} - * @memberof BaseFileHandle - */ - abstract meta(): Promise; - } - /** - * Remote file handle allows to perform file operation - * on AntOS remote server files. Its protocol is defined - * by the following pattern: - * - * ``` - * ^(home|desktop|os|Untitled)$ - * ``` - * - * @class RemoteFileHandle - * @extends {BaseFileHandle} - */ - class RemoteFileHandle extends BaseFileHandle { - /** - *Creates an instance of RemoteFileHandle. - * @param {string} path file path - * @memberof RemoteFileHandle - */ - constructor(path: string); - /** - * Read remote file meta-data - * - * @returns {Promise} - * @memberof RemoteFileHandle - */ - meta(): Promise; - /** - * Remote file access link - * - * @returns {string} - * @memberof RemoteFileHandle - */ - getlink(): string; - /** - * Read remote file content. - * - * If the current file is a directory, then the operation - * will return the meta-data of all files inside of the directory. - * Otherwise, file content will be returned - * - * @protected - * @param {string} t data type see [[read]] - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _rd(t: string): Promise; - /** - * Write file cache to the remote file - * - * @protected - * @param {string} t data type see [[write]] - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _wr(t: string): Promise; - /** - * Create sub directory - * - * Only work on directory file handle - * - * @protected - * @param {string} d sub directory name - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _mk(d: string): Promise; - /** - * Delete file/folder - * - * @protected - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _rm(): Promise; - /** - * Move file/folder - * - * @protected - * @param {string} d - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _mv(d: string): Promise; - /** - * Upload a file - * - * Only work with directory file handle - * - * @protected - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _up(): Promise; - /** - * Download a file - * - * only work with file - * - * @protected - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _down(): Promise; - /** - * Publish a file - * - * @protected - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _pub(): Promise; - } - /** - * Package file is remote file ([[RemoteFileHandle]]) located either in - * the local user packages location or system packages - * location, it should be in the following format: - * - * ``` - * pkg://PKG_NAME/path/to/file - * - * ``` - * - * The system will locale the package name PKG_NAME either in the system domain - * or in user domain and return the correct path to the package - * - * @export - * @class PackageFileHandle - * @extends {RemoteFileHandle} - */ - class PackageFileHandle extends RemoteFileHandle { - /** - *Creates an instance of PackageFileHandle. - * @param {string} pkg_path package path in string - * @memberof PackageFileHandle - */ - constructor(pkg_path: string); - } - /** - * Application file is an AntOS special file allowing to - * refer to an application as a regular file. Its protocol - * pattern is defined as: - * - * ```typescript - * "^app$" // e.g. app://Setting - * ``` - * - * @class ApplicationHandle - * @extends {BaseFileHandle} - */ - class ApplicationHandle extends BaseFileHandle { - /** - *Creates an instance of ApplicationHandle. - * @param {string} path file path - * @memberof ApplicationHandle - */ - constructor(path: string); - /** - * Read application meta-data - * - * @returns {Promise} - * @memberof ApplicationHandle - */ - meta(): Promise; - /** - * If the current file is root (e.g. `app://`), the operation - * will return all system packages meta-data. - * - * Otherwise, an error will be thrown - * - * @protected - * @param {string} t - * @returns {Promise} - * @memberof ApplicationHandle - */ - protected _rd(t: string): Promise; - } - /** - * A buffer file handle represents a virtual file that is stored - * on the system memory. Its protocol pattern is defined as: - * - * ```typescript - * "^mem$" // e.g. mem://test.txt - * ``` - * - * @class BufferFileHandle - * @extends {BaseFileHandle} - */ - class BufferFileHandle extends BaseFileHandle { - /** - *Creates an instance of BufferFileHandle. - * @param {string} path file path - * @param {string} mime file mime-type - * @param {*} data file data - * @memberof BufferFileHandle - */ - constructor(path: string, mime: string, data: any); - /** - * Read the file meta-data - * - * @returns {Promise} - * @memberof BufferFileHandle - */ - meta(): Promise; - /** - * Read file content stored in the file cached - * - * @protected - * @param {string} t data type see [[read]] - * @returns {Promise} - * @memberof BufferFileHandle - */ - protected _rd(t: string): Promise; - /** - * Write data to the file cache - * - * @protected - * @param {string} t data type, see [[write]] - * @param {*} d data - * @returns {Promise} - * @memberof BufferFileHandle - */ - protected _wr(t: string, d: any): Promise; - /** - * Download the buffer file - * - * @protected - * @returns {Promise} - * @memberof BufferFileHandle - */ - protected _down(): Promise; - } - /** - * URL file handle represents a HTTP/HTTPs link url - * as an AntOS VFS file handle. Its protocol is defined as - * - * ``` - * ^(http|https|ftp)$ - * ``` - * - * @class URLFileHandle - * @extends {BaseFileHandle} - */ - class URLFileHandle extends BaseFileHandle { - /** - *Creates an instance of URLFileHandle. - * @param {string} path - * @memberof URLFileHandle - */ - constructor(path: string); - /** - * Read file meta-data - * - * @returns {Promise} - * @memberof URLFileHandle - */ - meta(): Promise; - /** - * Read URL content - * - * @protected - * @param {string} t data type see [[read]] - * @returns {Promise} - * @memberof URLFileHandle - */ - protected _rd(t: string): Promise; - } - /** - * Shared file handle represents all AntOS shared file. - * Its protocol is defined as: - * - * ``` - * ^shared$ - * ``` - * - * @class SharedFileHandle - * @extends {API.VFS.BaseFileHandle} - */ - class SharedFileHandle extends API.VFS.BaseFileHandle { - /** - *Creates an instance of SharedFileHandle. - * @param {string} path file path - * @memberof SharedFileHandle - */ - constructor(path: string); - /** - * Read file meta-data - * - * @returns {Promise} - * @memberof SharedFileHandle - */ - meta(): Promise; - /** - * Read file content - * - * @protected - * @param {string} t data type, see [[read]] - * @returns {Promise} - * @memberof SharedFileHandle - */ - protected _rd(t: string): Promise; - /** - * write data to shared file - * - * @protected - * @param {string} t data type, see [[write]] - * @param {string} d file data - * @returns {Promise} - * @memberof SharedFileHandle - */ - protected _wr(t: string, d: string): Promise; - /** - * Un-publish the file - * - * @protected - * @returns {Promise} - * @memberof SharedFileHandle - */ - protected _rm(): Promise; - /** - * Download shared file - * - * @protected - * @returns {Promise} - * @memberof SharedFileHandle - */ - protected _down(): Promise; - /** - * Un publish the file - * - * @protected - * @returns {Promise} - * @memberof SharedFileHandle - */ - protected _pub(): Promise; - } - /**Utilities global functions */ - /** - * Read a file content from a zip archive - * - * The content type should be: - * - base64 : the result will be a string, the binary in a base64 form. - * - text (or string): the result will be an unicode string. - * - binarystring: the result will be a string in “binary” form, using 1 byte per char (2 bytes). - * - array: the result will be an Array of bytes (numbers between 0 and 255). - * - uint8array : the result will be a Uint8Array. This requires a compatible browser. - * - arraybuffer : the result will be a ArrayBuffer. This requires a compatible browser. - * - blob : the result will be a Blob. This requires a compatible browser. * - * If file_name is not specified, the first file_name in the zip archive will be read - * @export - * @param {string} file zip file - * @param {string} type content type to read - * @param {string} [file_name] the file should be read from the zip archive - * @return {*} {Promise} - */ - function readFileFromZip(file: string, type: string, file_name?: string): Promise; - /** - * Cat all files to a single out-put - * - * @export - * @param {string[]} list list of VFS files - * @param {string} data input data string that will be cat to the files content - * @param {string} join_by join on files content by this string - * @return {*} {Promise} - */ - function cat(list: string[], data: string, join_by?: string): Promise; - /** - * Read all files content on the list - * - * @export - * @param {string[]} list list of VFS files - * @param {GenericObject[]} contents content array - * @return {void} - */ - function read_files(list: string[]): Promise[]>; - /** - * Copy files to a folder - * - * @export - * @param {string[]} files list of files - * @param {string} to destination folder - * @return {*} {Promise} - */ - function copy(files: string[], to: string): Promise; - /** - * Create a zip archive from a folder - * - * @export - * @param {string} src source file/folder - * @param {string} dest destination archive - * @return {*} {Promise} - */ - function mkar(src: string, dest: string): Promise; - /** - * Create a list of directories - * - * @export - * @param {string[]} list of directories to be created - * @param {boolen} sync sync/async of directory creation - * @return {*} {Promise} - */ - function mkdirAll(list: string[], sync?: boolean): Promise; - /** - * - * - * @export Extract a zip fle - * @param {string} zfile zip file to extract - * @param {(zip:any) => Promise} [dest_callback] a callback to get extraction destination - * @return {*} {Promise} - */ - function extractZip(zfile: string | API.VFS.BaseFileHandle, dest_callback: (zip: any) => Promise): Promise; - /** - * Make files from a set of template files - * - * @export - * @param {Array} list mapping paths between templates files and created files - * @param {string} path files destination - * @param {(data: string) => string} callback: pre-processing files content before writing to destination files - * @return {*} {Promise} - */ - function mktpl(list: Array, path: string, callback: (data: string) => string): Promise; - } - } -} -/// -declare namespace OS { - /** - * This namespace is dedicated to application and service definition. - * When an application is loaded, its prototype definition will be - * inserted to this namespace for reuse lately - */ - namespace application { - /** - * Abstract prototype of all AntOS applications. - * Any new application definition should extend - * this prototype - * - * @export - * @abstract - * @class BaseApplication - * @extends {BaseModel} - */ - abstract class BaseApplication extends BaseModel { - /** - * Placeholder of all settings specific to the application. - * The settings stored in this object will be saved to system - * setting when logout and can be reused in the next login session - * - * @type {GenericObject} - * @memberof BaseApplication - */ - setting: GenericObject; - /** - * Hotkeys (shortcuts) defined for this application - * - * @protected - * @type {GUI.ShortcutType} - * @memberof BaseApplication - */ - protected keycomb: GUI.ShortcutType; - /** - * Reference to the system dock - * - * @type {GUI.tag.AppDockTag} - * @memberof BaseApplication - */ - sysdock: GUI.tag.AppDockTag; - /** - * Reference to the system application menu located - * on the system panel - * - * @type {GUI.tag.MenuTag} - * @memberof BaseApplication - */ - appmenu: GUI.tag.MenuTag; - /** - *Creates an instance of BaseApplication. - * @param {string} name application name - * @param {AppArgumentsType[]} args application arguments - * @memberof BaseApplication - */ - constructor(name: string, args: AppArgumentsType[]); - /** - * Init the application, this function is called when the - * application process is created and docked in the application - * dock. - * - * The application UI will be rendered after the execution - * of this function. - * - * @returns {void} - * @memberof BaseApplication - */ - init(): void; - /** - * Render the application UI by first loading its scheme - * and then mount this scheme to the DOM tree - * - * @protected - * @returns {void} - * @memberof BaseApplication - */ - protected loadScheme(): void; - /** - * API function to perform an heavy task. - * This function will trigger the global `loading` - * event at the beginning of the task, and the `loaded` - * event after finishing the task - * - * @protected - * @param {Promise} promise the promise on a task to be performed - * @returns {Promise} - * @memberof BaseApplication - */ - protected load(promise: Promise): Promise; - /** - * Bind a hotkey to the application, this function - * is used to define application keyboard shortcut - * - * @protected - * @param {string} k the hotkey to bind, should be in the following - * format: `[ALT|SHIFT|CTRL|META]-KEY`, e.g. `CTRL-S` - * @param {(e: JQuery.KeyboardEventBase) => void} f the callback function - * @returns {void} - * @memberof BaseApplication - */ - protected bindKey(k: string, f: (e: JQuery.KeyboardEventBase) => void): void; - /** - * Update the application local from the system - * locale or application specific locale configuration - * - * @param {string} name locale name e.g. `en_GB` - * @returns {void} - * @memberof BaseApplication - */ - updateLocale(name: string): void; - /** - * Execute the callback subscribed to a - * keyboard shortcut - * - * @param {string} fnk meta or modifier key e.g. `CTRL`, `ALT`, `SHIFT` or `META` - * @param {string} c a regular key - * @param {JQuery.KeyDownEvent} e JQuery keyboard event - * @returns {boolean} return whether the shortcut is executed - * @memberof BaseApplication - */ - shortcut(fnk: string, c: string, e: JQuery.KeyDownEvent): boolean; - /** - * Apply a setting to the application - * - * @protected - * @param {string} k the setting name - * @memberof BaseApplication - */ - protected applySetting(k: string): void; - /** - * Apply all settings to the application - * - * @protected - * @memberof BaseApplication - */ - protected applyAllSetting(): void; - /** - * Set a setting value to the application setting - * registry - * - * @protected - * @param {string} k setting name - * @param {*} v setting value - * @returns {void} - * @memberof BaseApplication - */ - protected registry(k: string, v: any): void; - /** - * Show the appliation - * - * @returns {void} - * @memberof BaseApplication - */ - show(): void; - /** - * Blur the application - * - * @returns {void} - * @memberof BaseApplication - */ - blur(): void; - /** - * Hide the application - * - * @returns {void} - * @memberof BaseApplication - */ - hide(): void; - /** - * Maximize or restore the application window size - * and its position - * - * @returns {void} - * @memberof BaseApplication - */ - toggle(): void; - /** - * Get the application title - * - * @returns {(string| FormattedString)} - * @memberof BaseApplication - */ - title(): string | FormattedString; - /** - * Function called when the application exit. - * If the input exit event is prevented, the application - * process will not be killed - * - * - * @protected - * @param {BaseEvent} evt exit event - * @memberof BaseApplication - */ - protected onexit(evt: BaseEvent): void; - /** - * Get the application meta-data - * - * @returns {API.PackageMetaType} - * @memberof BaseApplication - */ - meta(): API.PackageMetaType; - /** - * Base menu definition. This function - * returns the based menu definition of all applications. - * Other application specific menu entries - * should be defined in [[menu]] function - * - * @protected - * @returns {GUI.BasicItemType[]} - * @memberof BaseApplication - */ - protected baseMenu(): GUI.BasicItemType[]; - /** - * The main application entry that is called after - * the application UI is rendered. This application - * must be implemented by all subclasses - * - * @abstract - * @memberof BaseApplication - */ - abstract main(): void; - /** - * Application specific menu definition - * - * @protected - * @returns {GUI.BasicItemType[]} - * @memberof BaseApplication - */ - protected menu(): GUI.BasicItemType[]; - /** - * The cleanup function that is called by [[onexit]] function. - * Application need to override this function to perform some - * specific task before exiting or to prevent the application - * to be exited - * - * @protected - * @param {BaseEvent} e - * @memberof BaseApplication - */ - protected cleanup(e: BaseEvent): void; - } - } -} /** * Reference to the global this */ @@ -3517,6 +1408,13 @@ interface Date { * @memberof Date */ timestamp(): number; + /** + * Covnert to GMTString + * + * @returns {number} + * @memberof Date + */ + toGMTString(): string; } /** * Generic key-value pair object interface @@ -4322,6 +2220,274 @@ declare namespace OS { } } /// +declare namespace OS { + /** + * This namespace is dedicated to application and service definition. + * When an application is loaded, its prototype definition will be + * inserted to this namespace for reuse lately + */ + namespace application { + /** + * Abstract prototype of all AntOS applications. + * Any new application definition should extend + * this prototype + * + * @export + * @abstract + * @class BaseApplication + * @extends {BaseModel} + */ + abstract class BaseApplication extends BaseModel { + /** + * Placeholder of all settings specific to the application. + * The settings stored in this object will be saved to system + * setting when logout and can be reused in the next login session + * + * @type {GenericObject} + * @memberof BaseApplication + */ + setting: GenericObject; + /** + * Hotkeys (shortcuts) defined for this application + * + * @protected + * @type {GUI.ShortcutType} + * @memberof BaseApplication + */ + protected keycomb: GUI.ShortcutType; + /** + * Reference to the system dock + * + * @type {GUI.tag.AppDockTag} + * @memberof BaseApplication + */ + sysdock: GUI.tag.AppDockTag; + /** + * Reference to the system application menu located + * on the system panel + * + * @type {GUI.tag.MenuTag} + * @memberof BaseApplication + */ + appmenu: GUI.tag.MenuTag; + /** + * Loading animation check timeout + * + * @private + * @memberof BaseApplication + */ + private _loading_toh; + /** + * Store pending loading task + * + * @private + * @type {number[]} + * @memberof BaseApplication + */ + private _pending_task; + /** + *Creates an instance of BaseApplication. + * @param {string} name application name + * @param {AppArgumentsType[]} args application arguments + * @memberof BaseApplication + */ + constructor(name: string, args: AppArgumentsType[]); + /** + * Init the application, this function is called when the + * application process is created and docked in the application + * dock. + * + * The application UI will be rendered after the execution + * of this function. + * + * @returns {void} + * @memberof BaseApplication + */ + init(): void; + /** + * Render the application UI by first loading its scheme + * and then mount this scheme to the DOM tree + * + * @protected + * @returns {void} + * @memberof BaseApplication + */ + protected loadScheme(): void; + /** + * API function to perform an heavy task. + * This function will trigger the global `loading` + * event at the beginning of the task, and the `loaded` + * event after finishing the task + * + * @protected + * @param {Promise} promise the promise on a task to be performed + * @returns {Promise} + * @memberof BaseApplication + */ + protected load(promise: Promise): Promise; + /** + * Bind a hotkey to the application, this function + * is used to define application keyboard shortcut + * + * @protected + * @param {string} k the hotkey to bind, should be in the following + * format: `[ALT|SHIFT|CTRL|META]-KEY`, e.g. `CTRL-S` + * @param {(e: JQuery.KeyboardEventBase) => void} f the callback function + * @returns {void} + * @memberof BaseApplication + */ + protected bindKey(k: string, f: (e: JQuery.KeyboardEventBase) => void): void; + /** + * Update the application local from the system + * locale or application specific locale configuration + * + * @param {string} name locale name e.g. `en_GB` + * @returns {void} + * @memberof BaseApplication + */ + updateLocale(name: string): void; + /** + * Execute the callback subscribed to a + * keyboard shortcut + * + * @param {string} fnk meta or modifier key e.g. `CTRL`, `ALT`, `SHIFT` or `META` + * @param {string} c a regular key + * @param {JQuery.KeyDownEvent} e JQuery keyboard event + * @returns {boolean} return whether the shortcut is executed + * @memberof BaseApplication + */ + shortcut(fnk: string, c: string, e: JQuery.KeyDownEvent): boolean; + /** + * Apply a setting to the application + * + * @protected + * @param {string} k the setting name + * @memberof BaseApplication + */ + protected applySetting(k: string): void; + /** + * Apply all settings to the application + * + * @protected + * @memberof BaseApplication + */ + protected applyAllSetting(): void; + /** + * Set a setting value to the application setting + * registry + * + * @protected + * @param {string} k setting name + * @param {*} v setting value + * @returns {void} + * @memberof BaseApplication + */ + protected registry(k: string, v: any): void; + /** + * Show the appliation + * + * @returns {void} + * @memberof BaseApplication + */ + show(): void; + /** + * Blur the application + * + * @returns {void} + * @memberof BaseApplication + */ + blur(): void; + /** + * Hide the application + * + * @returns {void} + * @memberof BaseApplication + */ + hide(): void; + /** + * Maximize or restore the application window size + * and its position + * + * @returns {void} + * @memberof BaseApplication + */ + toggle(): void; + /** + * Get the application title + * + * @returns {(string| FormattedString)} + * @memberof BaseApplication + */ + title(): string | FormattedString; + /** + * Function called when the application exit. + * If the input exit event is prevented, the application + * process will not be killed + * + * + * @protected + * @param {BaseEvent} evt exit event + * @memberof BaseApplication + */ + protected onexit(evt: BaseEvent): void; + /** + * Get the application meta-data + * + * @returns {API.PackageMetaType} + * @memberof BaseApplication + */ + meta(): API.PackageMetaType; + /** + * Base menu definition. This function + * returns the based menu definition of all applications. + * Other application specific menu entries + * should be defined in [[menu]] function + * + * @protected + * @returns {GUI.BasicItemType[]} + * @memberof BaseApplication + */ + protected baseMenu(): GUI.BasicItemType[]; + /** + * The main application entry that is called after + * the application UI is rendered. This application + * must be implemented by all subclasses + * + * @abstract + * @memberof BaseApplication + */ + abstract main(): void; + /** + * Application specific menu definition + * + * @protected + * @returns {GUI.BasicItemType[]} + * @memberof BaseApplication + */ + protected menu(): GUI.BasicItemType[]; + /** + * The cleanup function that is called by [[onexit]] function. + * Application need to override this function to perform some + * specific task before exiting or to prevent the application + * to be exited + * + * @protected + * @param {BaseEvent} e + * @memberof BaseApplication + */ + protected cleanup(e: BaseEvent): void; + /** + * Check if the loading tasks ended, + * if it the case, stop the animation + * + * @private + * @memberof BaseApplication + */ + private animation_check; + } + } +} +/// declare namespace OS { /** * Application argument type definition @@ -4835,266 +3001,1512 @@ declare namespace OS { } } declare namespace OS { - namespace API { - /** - * Simple Virtual Database (VDB) application API. - * - * This API abstracts and provides a standard way to - * connect to a server-side relational database (e.g. sqlite). - * - * Each user when connected has their own database previously - * created. All VDB operations related to that user will be - * performed on this database. - * - * The creation of user database need to be managed by the server-side API. - * The VDB API assumes that the database already exist. All operations - * is performed in tables level - * - * @export - * @class DB - */ - class DB { + namespace GUI { + namespace tag { /** - * A table name on the user's database + * A switch tag is basically used to visualize an boolean data value. * - * @private - * @type {string} - * @memberof DB + * @export + * @class SwitchTag + * @extends {AFXTag} */ - private table; - /** - *Creates an instance of DB. - * @param {string} table table name - * @memberof DB - */ - constructor(table: string); - /** - * Save data to the current table. The input - * data must conform to the table record format. - * - * On the server side, if the table doest not - * exist yet, it should be created automatically - * by inferring the data structure of the input - * object - * - * @param {GenericObject} d data object represents a current table record - * @returns {Promise} - * @memberof DB - */ - save(d: GenericObject): Promise; - /** - * delete record(s) from the current table by - * a conditional object - * - * @param {*} c conditional object, c can be: - * - * * a `number`: the operation will delete the record with `id = c` - * * a `string`: The SQL string condition that selects record to delete - * * a conditional object represents a SQL condition statement as an object, - * example: `pid = 10 AND cid = 2` is represented by: - * - * ```typescript - * { - * exp: { - * "and": { - * pid: 10, - * cid: 2 - * } - * } - * ``` - * - * @returns {Promise} - * @memberof DB - */ - delete(c: GenericObject | number | string): Promise; - /** - * Get a record in the table by its primary key - * - * @param {number} id the primary key value - * @returns {Promise>} Promise on returned record data - * @memberof DB - */ - get(id: number): Promise>; - /** - * Find records by a condition - * - * @param {GenericObject} cond conditional object - * - * a conditional object represents a SQL condition statement as an object, - * example: `pid = 10 AND cid = 2 ORDER BY date DESC` is represented by: - * - * ```typescript - * { - * exp: { - * "and": { - * pid: 10, - * cid: 2 - * } - * }, - * order: { - * date: "DESC" - * } - * } - * ``` - * @returns {Promise[]>} - * @memberof DB - */ - find(cond: GenericObject): Promise[]>; + class SwitchTag extends AFXTag { + /** + * Placeholder for the onchange event handle + * + * @private + * @type {TagEventCallback} + * @memberof SwitchTag + */ + private _onchange; + /** + * Setter: Turn on/off the switch + * + * Getter: Check whether the switch is turned on + * + * @memberof SwitchTag + */ + set swon(v: boolean); + get swon(): boolean; + /** + * Setter: Enable the switch + * + * Getter: Check whether the switch is enabled + * + * @memberof SwitchTag + */ + set enable(v: boolean); + get enable(): boolean; + /** + * Set the onchange event handle + * + * @memberof SwitchTag + */ + set onswchange(v: TagEventCallback); + /** + * Mount the tag and bind the click event to the switch + * + * @protected + * @memberof SwitchTag + */ + protected mount(): void; + /** + * This function will turn the switch (on/off) + * and trigger the onchange event + * + * @private + * @param {JQuery.ClickEvent} e + * @returns + * @memberof SwitchTag + */ + private makechange; + /** + * Tag layout definition + * + * @protected + * @returns + * @memberof SwitchTag + */ + protected layout(): { + el: string; + ref: string; + }[]; + /** + * Init the tag: + * - switch is turn off + * - switch is enabled + * + * @protected + * @memberof SwitchTag + */ + protected init(): void; + /** + * Do nothing + * + * @protected + * @memberof SwitchTag + */ + protected calibrate(): void; + /** + * Do nothing + * + * @protected + * @param {*} [d] + * @memberof SwitchTag + */ + protected reload(d?: any): void; + } } } } declare namespace OS { namespace GUI { - /** - * - * Interface for an application dock item - * - * @export - * @interface AppDockItemType - */ - interface AppDockItemType { - /** - * Reference to the application process represented - * by the dock item - * - * @type {application.BaseApplication} - * @memberof AppDockItemType - */ - app: application.BaseApplication; - /** - * Reference to the DOM element of - * the owner dock item - * - * @type {AFXTag} - * @memberof AppDockItemType - */ - domel?: AFXTag; - [propName: string]: any; - } namespace tag { /** - * This class define the AntOS system application dock tag + * Definition of system file view widget * * @export - * @class AppDockTag + * @class FileViewTag * @extends {AFXTag} */ - class AppDockTag extends AFXTag { + class FileViewTag extends AFXTag { /** - * variable holds the application select event - * callback handle + * placeholder for file select event callback * * @private - * @type {TagEventCallback} - * @memberof AppDockTag + * @type {TagEventCallback} + * @memberof FileViewTag */ - private _onappselect; + private _onfileselect; /** - * Items data of the dock + * placeholder for file open event callback * * @private - * @type {AppDockItemType[]} - * @memberof AppDockTag + * @type {TagEventCallback} + * @memberof FileViewTag */ - private _items; + private _onfileopen; /** - * Reference to the currently select application - * process in the dock + * Reference to the all selected files meta-datas * * @private - * @type {AppDockItemType} - * @memberof AppDockTag + * @type {API.FileInfoType[]} + * @memberof FileViewTag */ - private _selectedItem; + private _selectedFiles; /** - *Creates an instance of AppDockTag. - * @memberof AppDockTag + * Data placeholder of the current working directory + * + * @private + * @type {API.FileInfoType[]} + * @memberof FileViewTag + */ + private _data; + /** + * The path of the current working directory + * + * @private + * @type {string} + * @memberof FileViewTag + */ + private _path; + /** + * Header definition of the widget grid view + * + * @private + * @type {(GenericObject[])} + * @memberof FileViewTag + */ + private _header; + /** + * placeholder for the user-specified meta-data fetch function + * + * @private + * @memberof FileViewTag + */ + private _fetch; + /** + *Creates an instance of FileViewTag. + * @memberof FileViewTag */ constructor(); /** - * Implementation of the abstract function: Update the current tag. - * It do nothing for this tag + * Init the widget before mounting * * @protected - * @param {*} [d] - * @memberof AppDockTag - */ - protected reload(d?: any): void; - /** - * Init the tag before mounting - * - * @protected - * @memberof AppDockTag + * @memberof FileViewTag */ protected init(): void; /** - * The tag layout, it is empty on creation but elements will - * be added automatically to it in operation + * Update the current widget, do nothing * * @protected - * @returns {TagLayoutType[]} - * @memberof AppDockTag + * @param {*} [d] + * @memberof FileViewTag */ - protected layout(): TagLayoutType[]; + protected reload(d?: any): void; /** - * getter to get the dock items + * set the function that allows to fetch file entries. + * This handle function should return a promise on + * an arry of [[API.FileInfoType]] * - * @readonly - * @type {AppDockItemType[]} - * @memberof AppDockTag + * @memberof FileViewTag */ - get items(): AppDockItemType[]; + set fetch(v: (p: string) => Promise); + /** + * set the callback handle for the file select event. + * The parameter of the callback should be an object + * of type [[TagEventType]] with the data type `T` is [[API.FileInfoType]] + * + * @memberof FileViewTag + */ + set onfileselect(e: TagEventCallback); + /** + set the callback handle for the file open event. + * The parameter of the callback should be an object + * of type [[TagEventType]] with the data type `T` is [[API.FileInfoType]] + * + * @memberof FileViewTag + */ + set onfileopen(e: TagEventCallback); /** * Setter: * - * set the selected application in the dock - * this will trigger two event: - * - `focus`: on the selected application - * - `blur`: on all other applications on the dock + * chang the view of the widget, there are three different views + * - `icon` + * - `list` + * - `tree` * * Getter: * - * Get the current selected application - * on the dock + * Get the current view setting of the widget * - * @memberof AppDockTag + * @memberof FileViewTag */ - set selectedApp(v: application.BaseApplication); - get selectedApp(): application.BaseApplication; + set view(v: string); + get view(): string; /** - * Get selected item of the dock + * Setter: + * + * Turn on/off the changing current working directory feature + * of the widget when a directory is double clicked. If enabled, + * the widget will use the configured [[fetch]] function to query + * the content of the selected directory + * + * Getter: + * + * check whether changing current working directory feature + * is enabled + * + * @memberof FileViewTag + */ + set chdir(v: boolean); + get chdir(): boolean; + /** + * Setter : Enable or disable the status bar of the widget + * + * Getter: Check whether the status bar is enabled + * + * @memberof FileViewTag + */ + set status(v: boolean); + get status(): boolean; + /** + * Setter: + * + * Allow the widget to show or hide hidden file + * + * Getter: + * + * Check whether the hidden file should be shown in + * the widget + * + * @memberof FileViewTag + */ + set showhidden(v: boolean); + get showhidden(): boolean; + /** + * Setter: + * + * Allow multiple selection on file view + * + * Getter: + * + * Check whether the multiselection is actived + * + * @memberof FileViewTag + */ + set multiselect(v: boolean); + get multiselect(): boolean; + /** + * Get the current selected file * * @readonly - * @type {AppDockItemType} - * @memberof AppDockTag + * @type {API.FileInfoType} + * @memberof FileViewTag */ - get selectedItem(): AppDockItemType; + get selectedFile(): API.FileInfoType; /** - * When a new application process is created, this function - * will be called to add new application entry to the dock. - * The added application will becomes the current selected - * application + * Get all selected files * - * @param {AppDockItemType} item an application dock item entry - * @memberof AppDockTag + * @readonly + * @type {API.FileInfoType[]} + * @memberof FileViewTag */ - newapp(item: AppDockItemType): void; + get selectedFiles(): API.FileInfoType[]; /** - * Delete and application entry from the dock. - * This function will be called when an application - * is exit + * Setter: * - * @param {BaseApplication} a the application to be removed from the dock - * @memberof AppDockTag + * Set the path of the current working directory. + * When called the widget will refresh the current + * working directory using the configured [[fetch]] + * function + * + * Getter: + * + * Get the path of the current working directory + * + * @memberof FileViewTag */ - removeapp(a: application.BaseApplication): void; + set path(v: string); + get path(): string; /** - * Mount the current dock tag + * Setter: Set the data of the current working directory + * + * Getter: Get the data of the current working directory + * + * @memberof FileViewTag + */ + set data(v: API.FileInfoType[]); + get data(): API.FileInfoType[]; + /** + * Set the file drag and drop event handle. This allows application + * to define custom behavior of the event + * + * @memberof FileViewTag + */ + set ondragndrop(v: TagEventCallback>); + /** + * Sort file by its type + * + * @private + * @param {API.FileInfoType} a + * @param {API.FileInfoType} b + * @return {*} {number} + * @memberof FileViewTag + */ + private sortByType; + /** + * sort file by its name + * + * @private + * @param {API.FileInfoType} a first file meta-data + * @param {API.FileInfoType} b second file meta-data + * @returns {number} + * @memberof FileViewTag + */ + private sortByName; + /** + * calibrate the widget layout + * + * @memberof FileViewTag + */ + calibrate(): void; + /** + * Refresh the list view of the widget. This function + * is called when the view of the widget changed to `icon` + * + * @private + * @memberof FileViewTag + */ + private refreshList; + /** + * Refresh the grid view of the widget, this function is called + * when the view of the widget set to `list` + * + * @private + * @memberof FileViewTag + */ + private refreshGrid; + /** + * Refresh the Treeview of the widget, this function is called + * when the view of the widget set to `tree` + * + * @private + * @memberof FileViewTag + */ + private refreshTree; + /** + * Create the tree data from the list of input + * file meta-data + * + * @private + * @param {API.FileInfoType[]} data list of file meta-data + * @returns {TreeViewDataType[]} + * @memberof FileViewTag + */ + private getTreeData; + /** + * Refresh data of the current widget view + * + * @private + * @returns {void} + * @memberof FileViewTag + */ + private refreshData; + /** + * Switch between three view options + * + * @private + * @memberof FileViewTag + */ + private switchView; + /** + * This function triggers the file select event + * + * @private + * @param {API.FileInfoType} e selected file meta-data + * @memberof FileViewTag + */ + private fileselect; + /** + * This function triggers the file open event + * + * @private + * @param {API.FileInfoType} e selected file meta-data + * @memberof FileViewTag + */ + private filedbclick; + /** + * Mount the widget in the DOM tree * * @protected - * @memberof AppDockTag + * @memberof FileViewTag */ protected mount(): void; + /** + * Layout definition of the widget + * + * @protected + * @returns {TagLayoutType[]} + * @memberof FileViewTag + */ + protected layout(): TagLayoutType[]; + } + } + } +} +/// +/** + * + * Extend the HTMLElement interface with some utility function need + * by AFX API + * + * @interface HTMLElement + */ +interface HTMLElement { + /** + * Recursively update a tag and all its children + * + * @param {*} [d] data to send to all element in the DOM subtree + * @memberof HTMLElement + */ + update(d?: any): void; + /** + * + * AFX will automatically bind the context menu on an HTMLElement + * if this function is defined on that element. The function should + * define the content of the context menu and its action + * + * Once the context menu is bound to the element, all context menu handle + * defined on any child of this element will be ignored. + * + * @param {JQuery.MouseEventBase} e a mouse event + * @param {OS.GUI.tag.MenuTag} m The context menu element [[MenuTag]] + * @memberof HTMLElement + */ + contextmenuHandle(e: JQuery.MouseEventBase, m: OS.GUI.tag.MenuTag): void; + /** + * Mount the element and all the children on its DOM subtree. This action + * is performed in a top-down manner + * + * @memberof HTMLElement + */ + sync(): void; + /** + * + * This action allows to generated all the DOM nodes defined by all AFX tags + * in its hierarchy. + * It performs two operations, one top-down operation to generate all the + * necessary DOM nodes, another bottom-up operation to init all the AFX tag + * in the current element DOM hierarchy + * + * @param {OS.API.Announcer} o an AntOS observable object + * @memberof HTMLElement + */ + afxml(o: OS.API.Announcer): void; + /** + * Perform DOM generation ([[afxml]]) then mount ([[sync]]) all the + * elements. + * + * @param {OS.API.Announcer} o an AntOS observable object + * @param {boolean} [flag] indicates whether this is the top-most call of the operation + * @memberof HTMLElement + */ + uify(o: OS.API.Announcer, flag?: boolean): void; + /** + * + * + * @type {*} + * @memberof HTMLElement + */ + mozRequestFullScreen: any; + /** + * + * + * @type {*} + * @memberof HTMLElement + */ + webkitRequestFullscreen: any; + /** + * + * + * @type {*} + * @memberof HTMLElement + */ + msRequestFullscreen: any; +} +/** + * + * + * @interface Document + */ +interface Document { + mozCancelFullScreen: any; + webkitExitFullscreen: any; + cancelFullScreen: any; +} +declare namespace OS { + namespace GUI { + /** + * [[TagLayoutType]] interface using by AFX tags to defined + * its internal DOM hierarchy + * + * @export + * @interface TagLayoutType + */ + interface TagLayoutType { + /** + * Element tag name + * + * @type {string} + * @memberof TagLayoutType + */ + el: string; + /** + * Children layout of the current element + * + * @type {TagLayoutType[]} + * @memberof TagLayoutType + */ + children?: TagLayoutType[]; + /** + * Reference name of the element used by AFX Tag + * + * @type {string} + * @memberof TagLayoutType + */ + ref?: string; + /** + * CSS class of the element + * + * @type {string} + * @memberof TagLayoutType + */ + class?: string; + /** + * this is the `data-id` attribute of the element, + * can be query by the [[aid]] Tag API function. + * Not to be confused with the DOM `id` attribute + * + * @type {(string | number)} + * @memberof TagLayoutType + */ + id?: string | number; + /** + * Tooltip text of the element + * + * @type {(string | FormattedString)} + * @memberof TagLayoutType + */ + tooltip?: string | FormattedString; + /** + * `data-width` of the element, not to be confused with + * the `width` attribute of the DOM element + * + * @type {number|string} + * @memberof TagLayoutType + */ + width?: number | string; + /** + ** `data-height` of the element, not to be confused with + * the `height` attribute of the DOM element + * + * @type {number|string} + * @memberof TagLayoutType + */ + height?: number | string; + } + /** + * Data type for event issued by AFX tags + * + * @export + * @interface TagEventDataType + * @template T item template + */ + interface TagEventDataType { + /** + * Reference to the item involved in the event + * + * @type {T} + * @memberof TagEventDataType + */ + item?: T; + [propName: string]: any; + } + /** + * Format of the event issued by AFX tags + * + * @export + * @interface TagEventType + * @template T data type + */ + interface TagEventType { + /** + * `data-id` of the tag that trigger the + * event + * + * @type {(number | string)} + * @memberof TagEventType + */ + id: number | string; + /** + * Data object of the event + * + * @type {T} + * @memberof TagEventType + */ + data: T; + } + /** + * Drag and Drop data type sent between mouse events + * + * @export + * @interface DnDEventDataType + * @template T + */ + interface DnDEventDataType { + /** + * Reference to the source DOM element + * + * @type {T} + * @memberof DnDEventDataType + */ + from: T[]; + /** + * Reference to the target DOM element + * + * @type {T} + * @memberof DnDEventDataType + */ + to: T; + } + /** + * Tag event callback type + */ + type TagEventCallback = (e: TagEventType) => void; + /** + * Base abstract class for tag implementation, any AFX tag should be + * subclass of this class + * + * @export + * @abstract + * @class AFXTag + * @extends {HTMLElement} + */ + abstract class AFXTag extends HTMLElement { + /** + * The announcer object of the tag + * + * @type {API.Announcer} + * @memberof AFXTag + */ + observable: API.Announcer; + /** + * Reference to some of the tag's children + * element. This reference object is built + * based on the `ref` property found in the + * tag layout [[TagLayoutType]] + * + * @protected + * @type {GenericObject} + * @memberof AFXTag + */ + protected refs: GenericObject; + /** + * boolean value indicated whether the tag + * is already mounted in the DOM tree + * + * @protected + * @type {boolean} + * @memberof AFXTag + */ + protected _mounted: boolean; + /** + *Creates an instance of AFXTag. + * @memberof AFXTag + */ + constructor(); + /** + * This function verifies if a property name of the input object + * corresponds to a setter of the current tag. If this is the + * case, it sets the value of that property to the setter + * + * @param {GenericObject} v input object + * @memberof AFXTag + */ + set(v: GenericObject): void; + /** + * Setter to set the tooltip text to the current tag. + * The text should be in the following format: + * ```text + * cr|cl|ct|cb: tooltip text + * ``` + * + * @memberof AFXTag + */ + set tooltip(v: string); + /** + * + * This function looking for a property name of the tag + * in its prototype chain. The descriptor of the property + * will be returned if it exists + * + * @private + * @param {string} k the property name to be queried + * @returns {PropertyDescriptor} the property descriptor or undefined + * @memberof AFXTag + */ + private descriptor_of; + /** + * Setter: set the id of the tag in string or number + * + * Getter: get the id of the current tag + * + * @memberof AFXTag + */ + set aid(v: string | number); + get aid(): string | number; + /** + * Implementation from HTMLElement interface, + * this function mount the current tag hierarchy + * + * @returns {void} + * @memberof AFXTag + */ + sync(): void; + /** + * Generate the DOM hierarchy of the current tag + * + * @param {API.Announcer} o observable object + * @memberof AFXTag + */ + afxml(o: API.Announcer): void; + /** + * Update the current tag hierarchy + * + * @param {*} d any data object + * @memberof AFXTag + */ + update(d: any): void; + /** + * Init the current tag, this function + * is called before the [[mount]] function + * + * @protected + * @abstract + * @memberof AFXTag + */ + protected abstract init(): void; + /** + * Mount only the current tag + * + * @protected + * @abstract + * @memberof AFXTag + */ + protected abstract mount(): void; + /** + * Layout definition of a tag + * + * @protected + * @abstract + * @returns {TagLayoutType[]} tag layout object + * @memberof AFXTag + */ + protected abstract layout(): TagLayoutType[]; + /** + * Update only the current tag, this function is + * called by [[update]] before chaining the + * update process to its children + * + * @protected + * @abstract + * @param {*} [d] + * @memberof AFXTag + */ + protected abstract reload(d?: any): void; + /** + * This function is used to re-render the current + * tag + * + * @protected + * @memberof AFXTag + */ + protected calibrate(): void; + /** + * This function parses the input layout object + * and generates all the elements defined by + * the tag + * + * @private + * @param {TagLayoutType} tag tag layout object + * @returns {Element} the DOM element specified by the tag layout + * @memberof AFXTag + */ + private mkui; + /** + * This function inserts or removes an attribute name + * to/from the target element based on the input `flag`. + * + * @protected + * @param {boolean} flag indicates whether the attribute name should be inserted o removed + * @param {string} v the attribute name + * @param {HTMLElement} [el] the target element + * @memberof AFXTag + */ + protected attsw(flag: boolean, v: string, el?: HTMLElement): void; + /** + * Insert the attribute name to the target element + * + * @protected + * @param {string} v the attribute name + * @param {HTMLElement} [el] the target element + * @memberof AFXTag + */ + protected atton(v: string, el?: HTMLElement): void; + /** + * Remove the attribute name from the target element + * + * @protected + * @param {string} v attribute name + * @param {HTMLElement} [el] the target element + * @memberof AFXTag + */ + protected attoff(v: string, el?: HTMLElement): void; + /** + * Verify if the target element has an attribute name + * + * @protected + * @param {string} v attribute name + * @param {HTMLElement} [el] target element + * @returns {boolean} + * @memberof AFXTag + */ + protected hasattr(v: string, el?: HTMLElement): boolean; + } + /** + * All the AFX tags are defined in this namespace, + * these tags are defined as custom DOM elements and will be + * stored in the `customElements` registry of the browser + */ + namespace tag { + /** + * Define an AFX tag as a custom element and add it to the + * global `customElements` registry. If the tag is redefined, i.e. + * the tag already exists, its behavior will be updated with the + * new definition + * + * @export + * @template T all classes that extends [[AFXTag]] + * @param {string} name name of the tag + * @param {{ new (): T }} cls the class that defines the tag + * @returns {void} + */ + function define(name: string, cls: { + new (): T; + }): void; + } + } +} +declare namespace OS { + namespace GUI { + namespace tag { + /** + * List item event data type + */ + type ListItemEventData = TagEventDataType; + /** + * A list item represent the individual view of an item in the [[ListView]]. + * This class is an abstract prototype class, implementation of any + * list view item should extend it + * + * + * @export + * @abstract + * @class ListViewItemTag + * @extends {AFXTag} + */ + abstract class ListViewItemTag extends AFXTag { + /** + * Data placeholder for the list item + * + * @private + * @type {GenericObject} + * @memberof ListViewItemTag + */ + private _data; + /** + * placeholder for the item select event callback + * + * @private + * @type {TagEventCallback} + * @memberof ListViewItemTag + */ + private _onselect; + /** + * Context menu event callback handle + * + * @private + * @type {TagEventCallback} + * @memberof ListViewItemTag + */ + private _onctxmenu; + /** + * Click event callback placeholder + * + * @private + * @type {TagEventCallback} + * @memberof ListViewItemTag + */ + private _onclick; + /** + * Double click event callback handle + * + * @private + * @type {TagEventCallback} + * @memberof ListViewItemTag + */ + private _ondbclick; + /** + * Item close event callback placeholder + * + * @private + * @type {TagEventCallback} + * @memberof ListViewItemTag + */ + private _onclose; + /** + *Creates an instance of ListViewItemTag. + * @memberof ListViewItemTag + */ + constructor(); + /** + * Setter: Turn on/off the `closable` feature of the list item + * + * Getter: Check whether the item is closable + * + * @memberof ListViewItemTag + */ + set closable(v: boolean); + get closable(): boolean; + /** + * Set item select event handle + * + * @memberof ListViewItemTag + */ + set onitemselect(v: TagEventCallback); + /** + * Setter: select/unselect the current item + * + * Getter: Check whether the current item is selected + * + * @memberof ListViewItemTag + */ + set selected(v: boolean); + get selected(): boolean; + /** + * Set the context menu event handle + * + * @memberof ListViewItemTag + */ + set onctxmenu(v: TagEventCallback); + /** + * Set the item click event handle + * + * @memberof ListViewItemTag + */ + set onitemclick(v: TagEventCallback); + /** + * Set the item double click event handle + * + * @memberof ListViewItemTag + */ + set onitemdbclick(v: TagEventCallback); + /** + * set the item close event handle + * + * @memberof ListViewItemTag + */ + set onitemclose(v: TagEventCallback); + /** + * Mount the tag and bind some events + * + * @protected + * @memberof ListViewItemTag + */ + protected mount(): void; + /** + * Layout definition of the item tag. + * This function define the outer layout of the item. + * Custom inner layout of each item implementation should + * be defined in [[itemlayout]] + * + * @protected + * @returns {TagLayoutType[]} + * @memberof ListViewItemTag + */ + protected layout(): TagLayoutType[]; + /** + * Setter: + * + * Set the data of the list item. This will + * trigger the [[ondatachange]] function + * + * Getter: + * + * Get the data of the current list item + * + * @memberof ListViewItemTag + */ + set data(v: GenericObject); + get data(): GenericObject; + /** + * Any subclass of this class should implement this + * function to provide its custom item layout + * + * @protected + * @abstract + * @returns {TagLayoutType} + * @memberof ListViewItemTag + */ + protected abstract itemlayout(): TagLayoutType; + /** + * This function is called when the item data is changed. + * It should be implemented in all subclass of this class + * + * @protected + * @abstract + * @memberof ListViewItemTag + */ + protected abstract ondatachange(): void; + } + /** + * The layout of a simple list item contains only a + * AFX label + * + * @export + * @class SimpleListItemTag + * @extends {ListViewItemTag} + */ + class SimpleListItemTag extends ListViewItemTag { + /** + *Creates an instance of SimpleListItemTag. + * @memberof SimpleListItemTag + */ + constructor(); + /** + * Reset some property to default + * + * @protected + * @memberof SimpleListItemTag + */ + protected init(): void; + /** + * Do nothing + * + * @protected + * @memberof SimpleListItemTag + */ + protected calibrate(): void; + /** + * Refresh the inner label when the item data + * is changed + * + * @protected + * @returns {void} + * @memberof SimpleListItemTag + */ + protected ondatachange(): void; + /** + * Re-render the list item + * + * @protected + * @memberof SimpleListItemTag + */ + protected reload(): void; + /** + * List item custom layout definition + * + * @protected + * @returns {TagLayoutType} + * @memberof SimpleListItemTag + */ + protected itemlayout(): TagLayoutType; + } + /** + * This tag defines a traditional or a dropdown list widget. + * It contains a collection of list items in which layout + * of each item may be variable + * + * @export + * @class ListViewTag + * @extends {AFXTag} + */ + class ListViewTag extends AFXTag { + /** + * placeholder of list select event handle + * + * @private + * @type {TagEventCallback} + * @memberof ListViewTag + */ + private _onlistselect; + /** + * placeholder of list double click event handle + * + * @private + * @type {TagEventCallback} + * @memberof ListViewTag + */ + private _onlistdbclick; + /** + * placeholder of list drag and drop event handle + * + * @private + * @type {TagEventCallback>} + * @memberof ListViewTag + */ + private _ondragndrop; + /** + * placeholder of list item close event handle + * + * @private + * @memberof ListViewTag + */ + private _onitemclose; + /** + * placeholder of drag and drop mouse down event handle + * + * @private + * @memberof ListViewTag + */ + private _onmousedown; + /** + * placeholder of drag and drop mouse up event handle + * + * @private + * @memberof ListViewTag + */ + private _onmouseup; + /** + * placeholder of drag and drop mouse move event handle + * + * @private + * @memberof ListViewTag + */ + private _onmousemove; + /** + * Reference to the latest selected DOM item + * + * @private + * @type {ListViewItemTag} + * @memberof ListViewTag + */ + private _selectedItem; + /** + * A collection of selected items in the list. + * The maximum size of this collection is 1 if + * the [[multiselect]] feature is disabled + * + * @private + * @type {ListViewItemTag[]} + * @memberof ListViewTag + */ + private _selectedItems; + /** + * Data placeholder of the list + * + * @private + * @type {GenericObject[]} + * @memberof ListViewTag + */ + private _data; + /** + * Event data passing between mouse event when performing + * drag and drop on the list + * + * @private + * @type {{ from: ListViewItemTag[]; to: ListViewItemTag }} + * @memberof ListViewTag + */ + private _dnd; + /** + *Creates an instance of ListViewTag. + * @memberof ListViewTag + */ + constructor(); + /** + * Reset the tag's properties to the default values + * + * @protected + * @memberof ListViewTag + */ + protected init(): void; + /** + * This function does nothing + * + * @protected + * @param {*} [d] + * @memberof ListViewTag + */ + protected reload(d?: any): void; + /** + * Setter: toggle between dropdown and traditional list + * + * Getter: Check whether the list is dropdown or traditional list + * + * @memberof ListViewTag + */ + set dropdown(v: boolean); + /** + * Set drag and drop event handle + * + * @memberof ListViewTag + */ + set ondragndrop(v: TagEventCallback>); + /** + * Set list select event handle + * + * @memberof ListViewTag + */ + set onlistselect(v: TagEventCallback); + /** + * Set double click event handle + * + * @memberof ListViewTag + */ + set onlistdbclick(v: TagEventCallback); + /** + * Set item close event handle + * + * @memberof ListViewTag + */ + set onitemclose(v: (e: TagEventType) => boolean); + get dropdown(): boolean; + /** + * Setter: + * + * Set the default tag name of list's items. + * If the tag name is not specified in the + * data of a list item, this tag will be used + * + * Getter: + * + * Get the default tag name of list item + * + * @memberof ListViewTag + */ + set itemtag(v: string); + get itemtag(): string; + /** + * Setter: + * + * Turn on/off of the `multiselect` feature + * + * Getter: + * + * Check whether multi-select is allowed + * in this list + * + * @memberof ListViewTag + */ + set multiselect(v: boolean); + get multiselect(): boolean; + /** + * Setter: Enable/disable drag and drop event in the list + * + * Getter: Check whether the drag and drop event is enabled + * + * @memberof ListViewTag + */ + set dragndrop(v: boolean); + get dragndrop(): boolean; + /** + * Set the buttons layout of the list. + * Button layout allows to add some custom + * behaviors to the list. + * + * Each button data should define the [[onbtclick]] + * event handle to specify the custom behavior + * + * When the list is configured as dropdown. The buttons + * layout will be disabled + * + * Example of a button data: + * + * ``` + * { + * text: "Button text", + * icon: "home://path/to/icon.png", + * iconclass: "icon-class-name", + * onbtclick: (e) => console.log(e) + * } + * ``` + * + * @memberof ListViewTag + */ + set buttons(v: GenericObject[]); + /** + * Getter: Get data of the list + * + * Setter: Set data to the list + * + * @type {GenericObject[]} + * @memberof ListViewTag + */ + get data(): GenericObject[]; + set data(data: GenericObject[]); + /** + * Do nothing + * + * @protected + * @memberof ListViewTag + */ + protected ondatachange(): void; + /** + * Setter: Select list item(s) by their indexes + * + * Getter: Get the indexes of all selected items + * + * @memberof ListViewTag + */ + set selected(idx: number | number[]); + /** + * Get the latest selected item + * + * @readonly + * @type {ListViewItemTag} + * @memberof ListViewTag + */ + get selectedItem(): ListViewItemTag; + /** + * Get all the selected items + * + * @readonly + * @type {ListViewItemTag[]} + * @memberof ListViewTag + */ + get selectedItems(): ListViewItemTag[]; + get selected(): number | number[]; + /** + * Add an item to the beginning of the list + * + * @param {GenericObject} item + * @returns {ListViewItemTag} the added list item element + * @memberof ListViewTag + */ + unshift(item: GenericObject): ListViewItemTag; + /** + * check whether the list has data + * + * @private + * @param {GenericObject} v + * @returns + * @memberof ListViewTag + */ + private has_data; + /** + * Add an item to the beginning or end of the list + * + * @param {GenericObject} item list item data + * @param {boolean} [flag] indicates whether to add the item in the beginning of the list + * @returns {ListViewItemTag} the added list item element + * @memberof ListViewTag + */ + push(item: GenericObject, flag?: boolean): ListViewItemTag; + /** + * Delete an item + * + * @param {ListViewItemTag} item item DOM element + * @memberof ListViewTag + */ + delete(item: ListViewItemTag): void; + /** + * Select item next to the currently selected item. + * If there is no item selected, the first item will + * be selected + * + * @returns {void} + * @memberof ListViewTag + */ + selectNext(): void; + /** + * Select the previous item in the list. + * + * @returns {void} + * @memberof ListViewTag + */ + selectPrev(): void; + /** + * Unselect all the selected items in the list + * + * @returns {void} + * @memberof ListViewTag + */ + unselect(): void; + /** + * This function triggers the click event on an item + * + * @private + * @param {TagEventType} e tag event object + * @param {boolean} flag indicates whether this is a double click event + * @returns {void} + * @memberof ListViewTag + */ + private iclick; + /** + * This function triggers the double click event on an item + * + * @private + * @param {TagEventType} e tag event object + * @returns + * @memberof ListViewTag + */ + private idbclick; + /** + * This function triggers the list item select event + * + * @private + * @param {TagEventType} e tag event object + * @returns + * @memberof ListViewTag + */ + private iselect; + /** + * Mount the tag and bind some basic event + * + * @protected + * @returns {void} + * @memberof ListViewTag + */ + protected mount(): void; + /** + * This function triggers the item close event + * + * @private + * @param {TagEventType} e tag event object + * @returns {void} + * @memberof ListViewTag + */ + private iclose; + /** + * Show the dropdown list. + * This function is called only when the list is a dropdown + * list + * + * @protected + * @param {*} e + * @returns {void} + * @memberof ListViewTag + */ + protected showlist(e: any): void; + /** + * Hide the dropdown list. + * This function is called only when the list is a dropdown + * list + * + * @protected + * @param {*} e + * @memberof ListViewTag + */ + protected dropoff(e: any): void; + /** + * calibrate the list layout + * + * @protected + * @returns {void} + * @memberof ListViewTag + */ + protected calibrate(): void; + /** + * List view layout definition + * + * @protected + * @returns {TagLayoutType[]} + * @memberof ListViewTag + */ + protected layout(): TagLayoutType[]; } } } @@ -5197,184 +4609,273 @@ declare namespace OS { namespace GUI { namespace tag { /** - * This class defines basic AFX label tag. - * A label contains a text and an icon (optional) + * Tag event data type definition + */ + type TabEventData = TagEventDataType; + /** + * a TabBar allows to control a collection of tabs * * @export - * @class LabelTag + * @class TabBarTag * @extends {AFXTag} */ - class LabelTag extends AFXTag { + export class TabBarTag extends AFXTag { /** - * placeholder of the text to be displayed + * Placeholder of currently selected tab index * * @private - * @type {(string | FormattedString)} - * @memberof LabelTag + * @type {number} + * @memberof TabBarTag */ - private _text; + private _selected; /** - *Creates an instance of LabelTag. - * @memberof LabelTag + * Placeholder of tab close event handle + * + * @private + * @memberof TabBarTag + */ + private _ontabclose; + /** + * Placeholder of tab select event handle + * + * @private + * @type {TagEventCallback} + * @memberof TabBarTag + */ + private _ontabselect; + /** + *Creates an instance of TabBarTag. + * @memberof TabBarTag */ constructor(); /** - * this implementation does nothing in this tag + * Init the tag * * @protected - * @memberof LabelTag - */ - protected mount(): void; - /** - * Refresh the text in the label - * - * @protected - * @param {*} d - * @memberof LabelTag - */ - protected reload(d: any): void; - /** - * Reset to default some property value - * - * @protected - * @memberof LabelTag + * @memberof TabBarTag */ protected init(): void; - /** - * This implementation of the function does nothing - * - * @protected - * @memberof LabelTag - */ - protected calibrate(): void; - /** - * Set the VFS path of the label icon - * - * @memberof LabelTag - */ - set icon(v: string); - /** - * Set the CSS class of the label icon - * - * @memberof LabelTag - */ - set iconclass(v: string); - /** - * Setter: Set the text of the label - * - * Getter: Get the text displayed on the label - * - * @memberof LabelTag - */ - set text(v: string | FormattedString); - get text(): string | FormattedString; - /** - * Lqbel layout definition - * - * @protected - * @returns {TagLayoutType[]} - * @memberof LabelTag - */ - protected layout(): TagLayoutType[]; - } - } - } -} -declare namespace OS { - namespace GUI { - namespace tag { - /** - * A switch tag is basically used to visualize an boolean data value. - * - * @export - * @class SwitchTag - * @extends {AFXTag} - */ - class SwitchTag extends AFXTag { - /** - * Placeholder for the onchange event handle - * - * @private - * @type {TagEventCallback} - * @memberof SwitchTag - */ - private _onchange; - /** - * Setter: Turn on/off the switch - * - * Getter: Check whether the switch is turned on - * - * @memberof SwitchTag - */ - set swon(v: boolean); - get swon(): boolean; - /** - * Setter: Enable the switch - * - * Getter: Check whether the switch is enabled - * - * @memberof SwitchTag - */ - set enable(v: boolean); - get enable(): boolean; - /** - * Set the onchange event handle - * - * @memberof SwitchTag - */ - set onswchange(v: TagEventCallback); - /** - * Mount the tag and bind the click event to the switch - * - * @protected - * @memberof SwitchTag - */ - protected mount(): void; - /** - * This function will turn the switch (on/off) - * and trigger the onchange event - * - * @private - * @param {JQuery.ClickEvent} e - * @returns - * @memberof SwitchTag - */ - private makechange; - /** - * Tag layout definition - * - * @protected - * @returns - * @memberof SwitchTag - */ - protected layout(): { - el: string; - ref: string; - }[]; - /** - * Init the tag: - * - switch is turn off - * - switch is enabled - * - * @protected - * @memberof SwitchTag - */ - protected init(): void; - /** - * Do nothing - * - * @protected - * @memberof SwitchTag - */ - protected calibrate(): void; /** * Do nothing * * @protected * @param {*} [d] - * @memberof SwitchTag + * @memberof TabBarTag */ protected reload(d?: any): void; + /** + * Setter: Enable/disable a tab to be closed + * + * Getter: Check whether tabs can be closed + * + * @memberof TabBarTag + */ + set closable(v: boolean); + get closable(): boolean; + /** + * Add a tab in the end of the tab bar + * + * @param {GenericObject} item tab data + * @memberof TabBarTag + */ + push(item: GenericObject): ListViewItemTag; + /** + * Delete a tab + * + * @param {ListViewItemTag} el reference to DOM element of a tab + * @memberof TabBarTag + */ + delete(el: ListViewItemTag): void; + /** + * Add a tab to the beginning of the tab bar + * + * @param {GenericObject} item tab data + * @memberof TabBarTag + */ + unshift(item: GenericObject): ListViewItemTag; + /** + * Setter: Set tabs data + * + * Getter: Get all tabs data + * + * @memberof TabBarTag + */ + set items(v: GenericObject[]); + get items(): GenericObject[]; + /** + * Setter: Select a tab by its index + * + * Getter: Get the currently selected tab + * + * @memberof TabBarTag + */ + set selected(v: number | number[]); + get selected(): number | number[]; + /** + * Set the tab close event handle + * + * @memberof TabBarTag + */ + set ontabclose(v: (e: TagEventType) => boolean); + /** + * Set the tab select event handle + * + * @memberof TabBarTag + */ + set ontabselect(v: TagEventCallback); + /** + * Mount the tab bar and bind some basic events + * + * @protected + * @memberof TabBarTag + */ + protected mount(): void; + /** + * TabBar layout definition + * + * @protected + * @returns {TagLayoutType[]} + * @memberof TabBarTag + */ + protected layout(): TagLayoutType[]; + } + export {}; + } + } +} +declare namespace OS { + namespace GUI { + /** + * Color type used by AFX API + * + * @export + * @interface ColorType + */ + interface ColorType { + /** + * Red chanel + * + * @type {number} + * @memberof ColorType + */ + r: number; + /** + * Green chanel + * + * @type {number} + * @memberof ColorType + */ + g: number; + /** + * Blue chanel + * + * @type {number} + * @memberof ColorType + */ + b: number; + /** + * Alpha chanel + * + * @type {number} + * @memberof ColorType + */ + a?: number; + /** + * color text in CSS format + * + * @type {string} + * @memberof ColorType + */ + text?: string; + /** + * Color in hex format + * + * @type {string} + * @memberof ColorType + */ + hex?: string; + } + namespace tag { + /** + * Class definition of Color picker widget + * + * @export + * @class ColorPickerTag + * @extends {AFXTag} + */ + class ColorPickerTag extends AFXTag { + /** + * The current selected color object + * + * @private + * @type {ColorType} + * @memberof ColorPickerTag + */ + private _selectedColor; + /** + * placeholder for the color select event callback + * + * @private + * @type {TagEventCallback} + * @memberof ColorPickerTag + */ + private _oncolorselect; + /** + * Creates an instance of ColorPickerTag. + * @memberof ColorPickerTag + */ + constructor(); + /** + * Init tag before mounting, do nothing + * + * @protected + * @memberof ColorPickerTag + */ + protected init(): void; + /** + * Reload tag, do nothing + * + * @protected + * @param {*} [d] + * @memberof ColorPickerTag + */ + protected reload(d?: any): void; + /** + * Get selected color value + * + * @readonly + * @type {ColorType} + * @memberof ColorPickerTag + */ + get selectedColor(): ColorType; + /** + * Set the color select event handle + * + * @memberof ColorPickerTag + */ + set oncolorselect(v: TagEventCallback); + /** + * Mount the widget to DOM tree + * + * @protected + * @memberof ColorPickerTag + */ + protected mount(): void; + /** + * Build the color palette + * + * @private + * @memberof ColorPickerTag + */ + private build_palette; + /** + * layout definition of the widget + * + * @protected + * @returns {TagLayoutType[]} + * @memberof ColorPickerTag + */ + protected layout(): TagLayoutType[]; } } } @@ -5543,81 +5044,1354 @@ declare namespace OS { namespace GUI { namespace tag { /** - * Meta tag that represents the virtual desktop environment. - * In near future, we may have multiple virtual desktop environments. - * Each desktop environment has a simple file manager and a window - * manager that render the window in a specific order. + * This class defines basic AFX label tag. + * A label contains a text and an icon (optional) * * @export - * @class DesktopTag - * @extends {FloatListTag} + * @class LabelTag + * @extends {AFXTag} */ - class DesktopTag extends FloatListTag { + class LabelTag extends AFXTag { /** - * internal handle to the desktop file location + * placeholder of the text to be displayed * * @private - * @type {API.VFS.BaseFileHandle} - * @memberof DesktopTag + * @type {(string | FormattedString)} + * @memberof LabelTag */ - private file; + private _text; /** - * local observer that detect if a new child element is - * added or removed - * - * @private - * @type {MutationObserver} - * @memberof DesktopTag - */ - private observer; - /** - * Internal list of the current opened window - * - * @private - * @type {Set} - * @memberof DesktopTag - */ - private window_list; - /** - * Creates an instance of DesktopTag. - * @memberof DesktopTag + *Creates an instance of LabelTag. + * @memberof LabelTag */ constructor(); /** - * Mount the virtual desktop to the DOM tree + * this implementation does nothing in this tag * * @protected - * @memberof DesktopTag + * @memberof LabelTag */ protected mount(): void; /** - * Display all files and folders in the specific desktop location + * Refresh the text in the label * - * @return {*} {Promise} - * @memberof DesktopTag + * @protected + * @param {*} d + * @memberof LabelTag */ - refresh(): Promise; + protected reload(d: any): void; /** - * Remove this element from its parent + * Reset to default some property value * - * @memberof DesktopTag + * @protected + * @memberof LabelTag */ - remove(): void; + protected init(): void; /** - * Active a window above all other windows + * This implementation of the function does nothing + * + * @protected + * @memberof LabelTag + */ + protected calibrate(): void; + /** + * Set the VFS path of the label icon + * + * @memberof LabelTag + */ + set icon(v: string); + /** + * Set the CSS class of the label icon + * + * @memberof LabelTag + */ + set iconclass(v: string); + /** + * Setter: Set the text of the label + * + * Getter: Get the text displayed on the label + * + * @memberof LabelTag + */ + set text(v: string | FormattedString); + get text(): string | FormattedString; + /** + * Setter: Turn on/off text selection + * + * Getter: Check whether the label is selectable + * + * @memberof LabelTag + */ + set selectable(v: boolean); + get swon(): boolean; + /** + * Lqbel layout definition + * + * @protected + * @returns {TagLayoutType[]} + * @memberof LabelTag + */ + protected layout(): TagLayoutType[]; + } + } + } +} +declare namespace OS { + namespace GUI { + /** + * Tab container data type definition + * + * @export + * @interface TabContainerTabType + */ + interface TabContainerTabType { + /** + * Reference to the DOM element of the current container + * + * @type {HTMLElement} + * @memberof TabContainerTabType + */ + container: HTMLElement; + [propName: string]: any; + } + namespace tag { + /** + * A tab container allows to attach each tab on a [[TabBarTag]] + * with a container widget. The attached container widget should be + * composed inside a [[HBoxTag]] + * + * The tab bar in a tab container can be configured to display tabs + * in horizontal (row) or vertical (column) order. Default to vertical order + * + * Once a tab is selected, its attached container will be shown + * + * @export + * @class TabContainerTag + * @extends {AFXTag} + */ + class TabContainerTag extends AFXTag { + /** + * Reference to the currently selected tab DOM element * * @private - * @param {WindowTag} win - * @memberof DesktopTag + * @type {TabContainerTabType} + * @memberof TabContainerTag */ - private selectWindow; + private _selectedTab; /** - * Render all windows in order from bottom to top + * Placeholder of the tab select event handle * * @private - * @memberof DesktopTag + * @type {TagEventCallback} + * @memberof TabContainerTag */ - private render; + private _ontabselect; + /** + *Creates an instance of TabContainerTag. + * @memberof TabContainerTag + */ + constructor(); + /** + * Init the tab bar direction to vertical (column) + * + * @protected + * @memberof TabContainerTag + */ + protected init(): void; + /** + * Do nothing + * + * @protected + * @param {*} [d] + * @memberof TabContainerTag + */ + protected reload(d?: any): void; + /** + * Set the tab select event handle + * + * @memberof TabContainerTag + */ + set ontabselect(f: TagEventCallback); + /** + * Get all tab items in the container + * + * @readonly + * @type {TabContainerTabType[]} + * @memberof TabContainerTag + */ + get tabs(): TabContainerTabType[]; + /** + * Select a tab by its index + * + * @memberof TabContainerTag + */ + set selectedIndex(i: number); + /** + * Setter: + * + * Set the tab bar direction: + * - `row`: horizontal direction + * - `column`: vertical direction + * + * Getter: + * + * Get the tab bar direction + * + * @memberof TabContainerTag + */ + set dir(v: "row" | "column"); + get dir(): "row" | "column"; + /** + * Setter: + * + * Select a tab using the its tab data type. + * This will show the attached container to the tab + * + * Getter: + * + * Get the tab data of the currently selected Tab + * + * @memberof TabContainerTag + */ + set selectedTab(v: TabContainerTabType); + get selectedTab(): TabContainerTabType; + /** + * Set the tab bar width, this function only + * works when the tab bar direction is set to + * `row` + * + * @memberof TabContainerTag + */ + set tabbarwidth(v: number); + /** + * Set the tab bar height, this function only works + * when the tab bar direction is set to `column` + * + * @memberof TabContainerTag + */ + set tabbarheight(v: number); + /** + * Add a new tab with container to the container + * + * item should be in the following format: + * + * ```ts + * { + * text: string, + * icon?: string, + * iconclass?: string, + * container: HTMLElement + * } + * ``` + * + * @param {GenericObject} item tab descriptor + * @param {boolean} insert insert the tab content to the container ? + * @returns {ListViewItemTag} the tab DOM element + * @memberof TabContainerTag + */ + addTab(item: GenericObject, insert: boolean): ListViewItemTag; + /** + * Remove a tab from the container + * + * @param {ListViewItemTag} tab the tab item to be removed + * @memberof TabContainerTag + */ + removeTab(tab: ListViewItemTag): void; + /** + * Mount the tag and bind basic events + * + * @protected + * @memberof TabContainerTag + */ + protected mount(): void; + /** + * calibrate the tab container + * + * @memberof TabContainerTag + */ + calibrate(): void; + /** + * Layout definition + * + * @protected + * @returns {TagLayoutType[]} + * @memberof TabContainerTag + */ + protected layout(): TagLayoutType[]; + } + } + } +} +/** + * Extend the Array interface with some + * property needed by AFX API + * + * @interface Array + * @template T + */ +interface Array { + /** + * Reference to a DOM element created by AFX API, + * this property is used by some AFX tags to refer + * to its child element in it data object + * + * @type {GenericObject} + * @memberof Array + */ + domel?: GenericObject; +} +declare namespace OS { + namespace GUI { + namespace tag { + /** + * Row item event data type + */ + type GridRowEventData = TagEventDataType; + /** + * A grid Row is a simple element that + * contains a group of grid cell + * + * @export + * @class GridRowTag + * @extends {AFXTag} + */ + class GridRowTag extends AFXTag { + /** + * Data placeholder for a collection of cell data + * + * @type {GenericObject[]} + * @memberof GridRowTag + */ + data: GenericObject[]; + /** + * placeholder for the row select event callback + * + * @private + * @type {TagEventCallback} + * @memberof ListViewItemTag + */ + private _onselect; + /** + *Creates an instance of GridRowTag. + * @memberof GridRowTag + */ + constructor(); + /** + * Set item select event handle + * + * @memberof ListViewItemTag + */ + set onrowselect(v: TagEventCallback); + /** + * Setter: select/unselect the current item + * + * Getter: Check whether the current item is selected + * + * @memberof ListViewItemTag + */ + set selected(v: boolean); + get selected(): boolean; + /** + * Mount the tag, do nothing + * + * @protected + * @memberof GridRowTag + */ + protected mount(): void; + /** + * Init the tag before mounting: reset the data placeholder + * + * @protected + * @memberof GridRowTag + */ + protected init(): void; + /** + * Empty layout + * + * @protected + * @returns {TagLayoutType[]} + * @memberof GridRowTag + */ + protected layout(): TagLayoutType[]; + /** + * This function does nothing in this tag + * + * @protected + * @memberof GridRowTag + */ + protected calibrate(): void; + /** + * This function does nothing in this tag + * + * @protected + * @param {*} [d] + * @memberof GridRowTag + */ + protected reload(d?: any): void; + } + /** + * Event data used by grid cell + */ + type CellEventData = TagEventDataType; + /** + * Prototype of any grid cell, custom grid cell + * definition should extend and implement this + * abstract prototype + * + * @export + * @abstract + * @class GridCellPrototype + * @extends {AFXTag} + */ + abstract class GridCellPrototype extends AFXTag { + /** + * placeholder for cell selected event callback + * + * @private + * @type {TagEventCallback} + * @memberof GridCellPrototype + */ + private _oncellselect; + /** + * placeholder for cell double click event callback + * + * @private + * @type {TagEventCallback} + * @memberof GridCellPrototype + */ + private _oncelldbclick; + /** + * Data placeholder of the current cell + * + * @private + * @type {GenericObject} + * @memberof GridCellPrototype + */ + private _data; + /** + *Creates an instance of GridCellPrototype. + * @memberof GridCellPrototype + */ + constructor(); + /** + * Set the cell selected event callback + * + * @memberof GridCellPrototype + */ + set oncellselect(v: TagEventCallback); + /** + * Set the cell double click event callback + * + * @memberof GridCellPrototype + */ + set oncelldbclick(v: TagEventCallback); + /** + * Setter: + * + * Set the data of the cell, this will trigger + * the [[ondatachange]] function + * + * Getter: + * + * Get the current cell data placeholder + * + * @memberof GridCellPrototype + */ + set data(v: GenericObject); + get data(): GenericObject; + /** + * Setter: + * + * Set/unset the current cell as selected. + * This will trigger the [[cellselect]] + * event + * + * Getter: + * + * Check whether the current cell is selected + * + * @memberof GridCellPrototype + */ + set selected(v: boolean); + get selected(): boolean; + /** + * Update the current cell. This will + * reset the cell data + * + * @protected + * @param {*} d + * @memberof GridCellPrototype + */ + protected reload(d: any): void; + /** + * Mount the current cell to the grid + * + * @protected + * @memberof GridCellPrototype + */ + protected mount(): void; + /** + * This function triggers the cell select + * event + * + * @private + * @param {TagEventType} e + * @param {boolean} flag + * @returns {void} + * @memberof GridCellPrototype + */ + private cellselect; + /** + * Abstract function called when the cell data changed. + * This should be implemented by subclasses + * + * @protected + * @abstract + * @memberof GridCellPrototype + */ + protected abstract ondatachange(): void; + } + /** + * Simple grid cell defines a grid cell with + * an [[LabelTag]] as it cell layout + * + * @export + * @class SimpleGridCellTag + * @extends {GridCellPrototype} + */ + class SimpleGridCellTag extends GridCellPrototype { + /** + *Creates an instance of SimpleGridCellTag. + * @memberof SimpleGridCellTag + */ + constructor(); + /** + * Reset the label of the cell with its data + * + * @protected + * @memberof SimpleGridCellTag + */ + protected ondatachange(): void; + /** + * This function do nothing in this tag + * + * @protected + * @memberof SimpleGridCellTag + */ + protected init(): void; + /** + * This function do nothing in this tag + * + * @protected + * @memberof SimpleGridCellTag + */ + protected calibrate(): void; + /** + * The layout of the cell with a simple [[LabelTag]] + * + * @returns + * @memberof SimpleGridCellTag + */ + layout(): { + el: string; + ref: string; + }[]; + } + /** + * A Grid contains a header and a collection grid rows + * which has the same number of cells as the number of + * the header elements + * + * @export + * @class GridViewTag + * @extends {AFXTag} + */ + class GridViewTag extends AFXTag { + /** + * Grid header definition + * + * @private + * @type {GenericObject[]} + * @memberof GridViewTag + */ + private _header; + /** + * Grid rows data placeholder + * + * @private + * @type {GenericObject[][]} + * @memberof GridViewTag + */ + private _rows; + /** + * Reference to the current selected row DOM element + * + * @private + * @type {GridRowTag} + * @memberof GridViewTag + */ + private _selectedRow; + /** + * A collection of selected grid rows DOM element + * + * @private + * @type {GridRowTag[]} + * @memberof GridViewTag + */ + private _selectedRows; + /** + * Reference to the current selected cell + * + * @private + * @type {GridCellPrototype} + * @memberof GridViewTag + */ + private _selectedCell; + /** + * Cell select event callback placeholder + * + * @private + * @type {TagEventCallback} + * @memberof GridViewTag + */ + private _oncellselect; + /** + * Row select event callback placeholder + * + * @private + * @type {TagEventCallback} + * @memberof GridViewTag + */ + private _onrowselect; + /** + * Cell double click event callback placeholder + * + * @private + * @type {TagEventCallback} + * @memberof GridViewTag + */ + private _oncelldbclick; + /** + * Event data passing between mouse event when performing + * drag and drop on the list + * + * @private + * @type {{ from: GridRowTag[]; to: GridRowTag }} + * @memberof GridViewTag + */ + private _dnd; + /** + * placeholder of list drag and drop event handle + * + * @private + * @type {TagEventCallback>} + * @memberof GridViewTag + */ + private _ondragndrop; + /** + * Creates an instance of GridViewTag. + * @memberof GridViewTag + */ + constructor(); + /** + * Set drag and drop event handle + * + * @memberof GridViewTag + */ + set ondragndrop(v: TagEventCallback>); + /** + * Setter: Enable/disable drag and drop event in the list + * + * Getter: Check whether the drag and drop event is enabled + * + * @memberof GridViewTag + */ + set dragndrop(v: boolean); + get dragndrop(): boolean; + /** + * placeholder of drag and drop mouse down event handle + * + * @private + * @memberof GridViewTag + */ + private _onmousedown; + /** + * placeholder of drag and drop mouse up event handle + * + * @private + * @memberof GridViewTag + */ + private _onmouseup; + /** + * placeholder of drag and drop mouse move event handle + * + * @private + * @memberof GridViewTag + */ + private _onmousemove; + /** + * Init the grid view before mounting. + * Reset all the placeholders to default values + * + * @protected + * @memberof GridViewTag + */ + protected init(): void; + /** + * This function does nothing + * + * @protected + * @param {*} [d] + * @memberof GridViewTag + */ + protected reload(d?: any): void; + /** + * set the cell select event callback + * + * @memberof GridViewTag + */ + set oncellselect(v: TagEventCallback); + /** + * set the row select event callback + * + * @memberof GridViewTag + */ + set onrowselect(v: TagEventCallback); + /** + * set the cell double click event callback + * + * @memberof GridViewTag + */ + set oncelldbclick(v: TagEventCallback); + /** + * Setter: set the tag name of the header cells + * + * Getter: get the grid header tag name + * + * @memberof GridViewTag + */ + set headeritem(v: string); + get headeritem(): string; + /** + * Setter: set the tag name of the grid cell + * + * Getter: get the tag name of the grid cell + * + * @memberof GridViewTag + */ + set cellitem(v: string); + get cellitem(): string; + /** + * Setter: set the header data + * + * Getter: get the header data placeholder + * + * @type {GenericObject[]} + * @memberof GridViewTag + */ + get header(): GenericObject[]; + set header(v: GenericObject[]); + /** + * Get all the selected rows + * + * @readonly + * @type {GridRowTag[]} + * @memberof GridViewTag + */ + get selectedRows(): GridRowTag[]; + /** + * Get the latest selected row + * + * @readonly + * @type {GridRowTag} + * @memberof GridViewTag + */ + get selectedRow(): GridRowTag; + /** + * Get the current selected cell + * + * @readonly + * @type {GridCellPrototype} + * @memberof GridViewTag + */ + get selectedCell(): GridCellPrototype; + /** + * Setter: set the rows data + * + * Getter: get the rows data + * + * @memberof GridViewTag + */ + set rows(rows: GenericObject[][]); + get rows(): GenericObject[][]; + /** + * Setter: activate deactivate multi-select + * + * Getter: check whether the `multiselect` option is activated + * + * @memberof GridViewTag + */ + set multiselect(v: boolean); + get multiselect(): boolean; + /** + * Set and Get the resizable attribute + * + * This allows to enable/disable column resize feature + * + * @memberof GridViewTag + */ + set resizable(v: boolean); + get resizable(): boolean; + /** + * Sort the grid using a sort function + * + * @param {context: any} context of the executed function + * @param {(a:GenericObject[], b:GenericObject[]) => boolean} a sort function that compares two rows data + * * @param {index: number} current header index + * @returns {void} + * @memberof GridViewTag + */ + sort(context: any, fn: (a: GenericObject[], b: GenericObject[], index?: number) => number): void; + /** + * Delete a grid rows + * + * @param {GridRowTag} row row DOM element + * @returns {void} + * @memberof GridViewTag + */ + delete(row: GridRowTag): void; + /** + * Push a row to the grid + * + * @param {GenericObject[]} row list of cell data + * @param {boolean} flag indicates where the row is add to beginning or end + * of the row + * @memberof GridViewTags + */ + push(row: GenericObject[], flag: boolean): void; + /** + * Unshift a row to the grid + * + * @param {GenericObject[]} row list of cell data in the row + * @memberof GridViewTag + */ + unshift(row: GenericObject[]): void; + /** + * This function triggers the cell select event + * + * @private + * @param {TagEventType} e event contains cell event data + * @param {boolean} flag indicates whether the event is double clicked + * @returns {void} + * @memberof GridViewTag + */ + private cellselect; + /** + * This function triggers the row select event, a cell select + * event will also trigger this event + * + * @param {TagEventType} e + * @returns {void} + * @memberof GridViewTag + */ + private rowselect; + /** + * Unselect all the selected rows in the grid + * + * @returns {void} + * @memberof GridViewTag + */ + unselect(): void; + /** + * Check whether the grid has header + * + * @private + * @returns {boolean} + * @memberof GridViewTag + */ + private has_header; + /** + * Calibrate the grid + * + * @protected + * @memberof GridViewTag + */ + protected calibrate(): void; + /** + * Recalculate the size of each header cell, changing + * in header cell size will also resize the entire + * related column + * + * @private + * @returns {void} + * @memberof GridViewTag + */ + private calibrate_header; + /** + * Mount the grid view tag + * + * @protected + * @returns {void} + * @memberof GridViewTag + */ + protected mount(): void; + /** + * Layout definition of the grid view + * + * @protected + * @returns {TagLayoutType[]} + * @memberof GridViewTag + */ + protected layout(): TagLayoutType[]; + } + } + } +} +declare namespace OS { + namespace GUI { + namespace tag { + /** + * A system panel contains the following elements: + * - Spotlight to access to applications menu + * - Current focused application menu + * - System tray for all running services running in background + * + * @export + * @class SystemPanelTag + * @extends {AFXTag} + */ + class SystemPanelTag extends AFXTag { + /** + * Reference to spotlight data + * + * @private + * @type {(GenericObject)} + * @memberof SystemPanelTag + */ + private _osmenu; + /** + * Placeholder indicates whether the spotlight is currently shown + * + * @private + * @type {boolean} + * @memberof SystemPanelTag + */ + private _view; + /** + * Store pending loading task + * + * @private + * @type {number[]} + * @memberof SystemPanelTag + */ + private _pending_task; + /** + * Loading animation check timeout + * + * @memberof SystemPanelTag + */ + private _loading_toh; + /** + * Place holder for a private callback function + * + * @private + * @memberof SystemPanelTag + */ + private _cb; + /** + * Place holder for system app list + * + * @private + * @type {GenericObject[]} + * @memberof SystemPanelTag + */ + private app_list; + /** + *Creates an instance of SystemPanelTag. + * @memberof SystemPanelTag + */ + constructor(); + /** + * Do nothing + * + * @protected + * @memberof SystemPanelTag + */ + protected init(): void; + /** + * Do nothing + * + * @protected + * @param {*} [d] + * @memberof SystemPanelTag + */ + protected reload(d?: any): void; + /** + * Attach a service to the system tray on the pannel, + * this operation is performed when a service is started + * + * @param {BaseService} s + * @returns + * @memberof SystemPanelTag + */ + attachservice(s: application.BaseService): void; + /** + * Launch the selected application from the spotlight + * applications list + * + * @private + * @returns {void} + * @memberof SystemPanelTag + */ + private open; + /** + * Perform spotlight search operation on keyboard event + * + * @private + * @param {JQuery.KeyboardEventBase} e + * @returns {void} + * @memberof SystemPanelTag + */ + private search; + /** + * detach a service from the system tray of the panel. + * This function is called when the corresponding running + * service is killed + * + * @param {BaseService} s + * @memberof SystemPanelTag + */ + detachservice(s: application.BaseService): void; + /** + * Layout definition of the panel + * + * @protected + * @returns {TagLayoutType[]} + * @memberof SystemPanelTag + */ + protected layout(): TagLayoutType[]; + /** + * Refresh applications list on the spotlight widget + * from system packages meta-data + * + * @private + * @memberof SystemPanelTag + */ + private refreshAppList; + /** + * Show/hide the spotlight + * + * @private + * @param {boolean} flag + * @memberof SystemPanelTag + */ + private toggle; + /** + * Calibrate the spotlight widget + * + * @memberof SystemPanelTag + */ + calibrate(): void; + /** + * Refresh the pinned applications menu + * + * @private + * @memberof SystemPanelTag + */ + private RefreshPinnedApp; + /** + * Check if the loading tasks ended, + * if it the case, stop the animation + * + * @private + * @memberof SystemPanelTag + */ + private animation_check; + /** + * Mount the tag bind some basic event + * + * @protected + * @memberof SystemPanelTag + */ + protected mount(): void; + } + } + } +} +/// +declare namespace OS { + namespace GUI { + namespace tag { + /** + * This tag define a basic button and its behavior + * + * @export + * @class ButtonTag + * @extends {AFXTag} + */ + class ButtonTag extends AFXTag { + /** + * Variable hold the button click callback handle + * + * @private + * @type {TagEventCallback} + * @memberof ButtonTag + */ + private _onbtclick; + /** + * Custom user data + * + * @type {GenericObject} + * @memberof ButtonTag + */ + data: GenericObject; + /** + *Creates an instance of ButtonTag. + * @memberof ButtonTag + */ + constructor(); + /** + * Set the click callback handle for the target button + * + * @memberof ButtonTag + */ + set onbtclick(v: TagEventCallback); + /** + * Set the path to the button icon, the path should be + * a VFS file path + * + * @memberof ButtonTag + */ + set icon(v: string); + /** + * Set the icon class to the button, this property + * allows to style the button icon using CSS + * + * @memberof ButtonTag + */ + set iconclass(v: string); + /** + * Setter: Set the text of the button + * + * Getter: Get the current button test + * + * @memberof ButtonTag + */ + set text(v: string | FormattedString); + get text(): string | FormattedString; + /** + * Setter: Enable or disable the button + * + * Getter: Get the `enable` property of the button + * + * @memberof ButtonTag + */ + set enable(v: boolean); + get enable(): boolean; + /** + * Setter: set or remove the attribute `selected` of the button + * + * Getter: check whether the attribute `selected` of the button is set + * + * @memberof ButtonTag + */ + set selected(v: boolean); + get selected(): boolean; + /** + * Setter: activate or deactivate the toggle mode of the button + * + * Getter: Check whether the button is in toggle mode + * + * @memberof ButtonTag + */ + set toggle(v: boolean); + get toggle(): boolean; + /** + * Mount the tag + * + * @protected + * @memberof ButtonTag + */ + protected mount(): void; + /** + * Init the tag before mounting + * + * @protected + * @memberof ButtonTag + */ + protected init(): void; + /** + * Re-calibrate the button, do nothing in this tag + * + * @protected + * @memberof ButtonTag + */ + protected calibrate(): void; + /** + * Update the current tag, do nothing in this tag + * + * @param {*} [d] + * @memberof ButtonTag + */ + reload(d?: any): void; + /** + * Button layout definition + * + * @protected + * @returns {TagLayoutType[]} + * @memberof ButtonTag + */ + protected layout(): TagLayoutType[]; + } + } + } +} +declare namespace OS { + namespace GUI { + namespace tag { + /** + * A tile layout organize it child elements + * in a fixed horizontal or vertical direction. + * + * The size of each child element is attributed based + * on its configuration of automatically based on the + * remaining space in the layout + * + * + * @export + * @class TileLayoutTag + * @extends {AFXTag} + */ + class TileLayoutTag extends AFXTag { + /** + *C reates an instance of TileLayoutTag. + * @memberof TileLayoutTag + */ + constructor(); + /** + * Do nothing + * + * @protected + * @memberof TileLayoutTag + */ + protected init(): void; + /** + * Do nothing + * + * @protected + * @param {*} [d] + * @memberof TileLayoutTag + */ + protected reload(d?: any): void; + /** + * Setter: Set the name of the tile container, should be: `hbox` or `vbox` + * + * Getter: Get the name of the tile container + * + * @memberof TileLayoutTag + */ + set name(v: string); + get name(): string; + /** + * Setter: + * + * SET the layout direction, should be: + * - `row`: horizontal direction + * - `column`: vertical direction + * + * Getter: + * + * Get layout direction + * + * @memberof TileLayoutTag + */ + set dir(v: "row" | "column"); + get dir(): "row" | "column"; + /** + * Mount the element + * + * @protected + * @returns {void} + * @memberof TileLayoutTag + */ + protected mount(): void; + /** + * re-organize the layout + * + * @returns {void} + * @memberof TileLayoutTag + */ + calibrate(): void; + /** + * Organize the layout in horizontal direction, only work when + * the layout direction set to horizontal + * + * @private + * @returns {void} + * @memberof TileLayoutTag + */ + private hcalibrate; + /** + * Organize the layout in vertical direction, only work when + * the layout direction set to vertical + * + * @private + * @returns {void} + * @memberof TileLayoutTag + */ + private vcalibrate; + /** + * Layout definition + * + * @returns + * @memberof TileLayoutTag + */ + layout(): { + el: string; + ref: string; + }[]; + } + /** + * A HBox organize its child elements in horizontal direction + * + * @export + * @class HBoxTag + * @extends {TileLayoutTag} + */ + class HBoxTag extends TileLayoutTag { + /** + * Creates an instance of HBoxTag. + * @memberof HBoxTag + */ + constructor(); + /** + * Mount the tag + * + * @protected + * @memberof HBoxTag + */ + protected mount(): void; + } + /** + * A VBox organize its child elements in vertical direction + * + * @export + * @class VBoxTag + * @extends {TileLayoutTag} + */ + class VBoxTag extends TileLayoutTag { + /** + *Creates an instance of VBoxTag. + * @memberof VBoxTag + */ + constructor(); + /** + * Mount the tag + * + * @protected + * @memberof VBoxTag + */ + protected mount(): void; } } } @@ -5975,7 +6749,7 @@ declare namespace OS { * Private data object passing between dragndrop mouse event * * @private - * @type {{ from: TreeViewTag; to: TreeViewTag }} + * @type {{ from: TreeViewTag[]; to: TreeViewTag }} * @memberof TreeViewTag */ private _dnd; @@ -6022,7 +6796,7 @@ declare namespace OS { * current tree. This function should return a promise on * a list of [[TreeViewDataType]] * - * @memberof TreeViewItemPrototype + * @memberof TreeViewTag */ fetch: (d: TreeViewItemPrototype) => Promise; /** @@ -6175,247 +6949,6 @@ declare namespace OS { } } } -declare namespace OS { - namespace GUI { - namespace tag { - /** - * An overlay tag is a layout tag that alway stay on top of - * the virtual desktop environment. Tile layout elements ([[VBoxTag]], [[HboxTag]]) - * can be used inside this tag to compose elements - * - * @export - * @class OverlayTag - * @extends {AFXTag} - */ - class OverlayTag extends AFXTag { - /** - * Tag width placeholder - * - * @private - * @type {string} - * @memberof OverlayTag - */ - private _width; - /** - * Tag height place holder - * - * @private - * @type {string} - * @memberof OverlayTag - */ - private _height; - /** - *Creates an instance of OverlayTag. - * @memberof OverlayTag - */ - constructor(); - /** - * Put the tag on top of the virtual desktop environment - * - * @protected - * @memberof OverlayTag - */ - protected init(): void; - /** - * Do nothing - * - * @protected - * @param {*} [d] - * @memberof OverlayTag - */ - protected reload(d?: any): void; - /** - * Setter: - * - * Set the width of the tag, the tag width should be in form of: - * `100px` of `80%` - * - * Getter: - * - * Get the tag width - * - * @memberof OverlayTag - */ - set width(v: string); - get width(): string; - /** - * Setter: - * - * Set the tag height, the tag height should be in form of: - * `100px` of `80%` - * - * Getter: - * - * Get the tag height - * - * @memberof OverlayTag - */ - set height(v: string); - get height(): string; - /** - * Calibrate the element when mounting - * - * @protected - * @returns {void} - * @memberof OverlayTag - */ - protected mount(): void; - /** - * Calibrate the width and height of the tag - * - * @returns {void} - * @memberof OverlayTag - */ - calibrate(): void; - /** - * Layout definition of the tag - * - * @protected - * @returns {TagLayoutType[]} - * @memberof OverlayTag - */ - protected layout(): TagLayoutType[]; - } - } - } -} -declare namespace OS { - namespace GUI { - /** - * Color type used by AFX API - * - * @export - * @interface ColorType - */ - interface ColorType { - /** - * Red chanel - * - * @type {number} - * @memberof ColorType - */ - r: number; - /** - * Green chanel - * - * @type {number} - * @memberof ColorType - */ - g: number; - /** - * Blue chanel - * - * @type {number} - * @memberof ColorType - */ - b: number; - /** - * Alpha chanel - * - * @type {number} - * @memberof ColorType - */ - a?: number; - /** - * color text in CSS format - * - * @type {string} - * @memberof ColorType - */ - text?: string; - /** - * Color in hex format - * - * @type {string} - * @memberof ColorType - */ - hex?: string; - } - namespace tag { - /** - * Class definition of Color picker widget - * - * @export - * @class ColorPickerTag - * @extends {AFXTag} - */ - class ColorPickerTag extends AFXTag { - /** - * The current selected color object - * - * @private - * @type {ColorType} - * @memberof ColorPickerTag - */ - private _selectedColor; - /** - * placeholder for the color select event callback - * - * @private - * @type {TagEventCallback} - * @memberof ColorPickerTag - */ - private _oncolorselect; - /** - * Creates an instance of ColorPickerTag. - * @memberof ColorPickerTag - */ - constructor(); - /** - * Init tag before mounting, do nothing - * - * @protected - * @memberof ColorPickerTag - */ - protected init(): void; - /** - * Reload tag, do nothing - * - * @protected - * @param {*} [d] - * @memberof ColorPickerTag - */ - protected reload(d?: any): void; - /** - * Get selected color value - * - * @readonly - * @type {ColorType} - * @memberof ColorPickerTag - */ - get selectedColor(): ColorType; - /** - * Set the color select event handle - * - * @memberof ColorPickerTag - */ - set oncolorselect(v: TagEventCallback); - /** - * Mount the widget to DOM tree - * - * @protected - * @memberof ColorPickerTag - */ - protected mount(): void; - /** - * Build the color palette - * - * @private - * @memberof ColorPickerTag - */ - private build_palette; - /** - * layout definition of the widget - * - * @protected - * @returns {TagLayoutType[]} - * @memberof ColorPickerTag - */ - protected layout(): TagLayoutType[]; - } - } - } -} /// declare namespace OS { namespace GUI { @@ -6917,804 +7450,6 @@ declare namespace OS { } } } -declare namespace OS { - namespace GUI { - namespace tag { - /** - * Tag event data type definition - */ - type TabEventData = TagEventDataType; - /** - * a TabBar allows to control a collection of tabs - * - * @export - * @class TabBarTag - * @extends {AFXTag} - */ - export class TabBarTag extends AFXTag { - /** - * Placeholder of currently selected tab index - * - * @private - * @type {number} - * @memberof TabBarTag - */ - private _selected; - /** - * Placeholder of tab close event handle - * - * @private - * @memberof TabBarTag - */ - private _ontabclose; - /** - * Placeholder of tab select event handle - * - * @private - * @type {TagEventCallback} - * @memberof TabBarTag - */ - private _ontabselect; - /** - *Creates an instance of TabBarTag. - * @memberof TabBarTag - */ - constructor(); - /** - * Init the tag - * - * @protected - * @memberof TabBarTag - */ - protected init(): void; - /** - * Do nothing - * - * @protected - * @param {*} [d] - * @memberof TabBarTag - */ - protected reload(d?: any): void; - /** - * Setter: Enable/disable a tab to be closed - * - * Getter: Check whether tabs can be closed - * - * @memberof TabBarTag - */ - set closable(v: boolean); - get closable(): boolean; - /** - * Add a tab in the end of the tab bar - * - * @param {GenericObject} item tab data - * @memberof TabBarTag - */ - push(item: GenericObject): ListViewItemTag; - /** - * Delete a tab - * - * @param {ListViewItemTag} el reference to DOM element of a tab - * @memberof TabBarTag - */ - delete(el: ListViewItemTag): void; - /** - * Add a tab to the beginning of the tab bar - * - * @param {GenericObject} item tab data - * @memberof TabBarTag - */ - unshift(item: GenericObject): ListViewItemTag; - /** - * Setter: Set tabs data - * - * Getter: Get all tabs data - * - * @memberof TabBarTag - */ - set items(v: GenericObject[]); - get items(): GenericObject[]; - /** - * Setter: Select a tab by its index - * - * Getter: Get the currently selected tab - * - * @memberof TabBarTag - */ - set selected(v: number | number[]); - get selected(): number | number[]; - /** - * Set the tab close event handle - * - * @memberof TabBarTag - */ - set ontabclose(v: (e: TagEventType) => boolean); - /** - * Set the tab select event handle - * - * @memberof TabBarTag - */ - set ontabselect(v: TagEventCallback); - /** - * Mount the tab bar and bind some basic events - * - * @protected - * @memberof TabBarTag - */ - protected mount(): void; - /** - * TabBar layout definition - * - * @protected - * @returns {TagLayoutType[]} - * @memberof TabBarTag - */ - protected layout(): TagLayoutType[]; - } - export {}; - } - } -} -declare namespace OS { - namespace GUI { - namespace tag { - /** - * A float list is a list of items in which each - * item can be moved (drag and drop) freely - * - * @export - * @class FloatListTag - * @extends {ListViewTag} - */ - class FloatListTag extends ListViewTag { - /** - * Update the current tag, do nothing - * - * @protected - * @param {*} [d] - * @memberof FloatListTag - */ - protected reload(d?: any): void; - /** - * Variable that hold the onready callback of - * the tag. This callback will be called after - * the tag is mounted - * - * @private - * @memberof FloatListTag - */ - private _onready; - /** - *Creates an instance of FloatListTag. - * @memberof FloatListTag - */ - constructor(); - /** - * set the onready callback function to the tag. - * This callback will be called after - * the tag is mounted - * - * @memberof FloatListTag - */ - set onready(v: (e: FloatListTag) => void); - /** - * Setter: - * - * Set the direction of the list item layout. - * Two directions are available: - * - `vertical` - * - `horizontal` - * - * This setter acts as a DOM attribute - * - * Getter: - * - * Get the currently set direction of list - * item layout - * - * @memberof FloatListTag - */ - set dir(v: string); - get dir(): string; - /** - * Disable the dropdown option in this list - * - * @memberof FloatListTag - */ - set dropdown(v: boolean); - /** - * Disable the list buttons configuration in this - * list - * - * @memberof FloatListTag - */ - set buttons(v: GenericObject[]); - /** - * Disable the `showlist` behavior in this list - * - * @protected - * @param {*} e - * @memberof FloatListTag - */ - protected showlist(e: any): void; - /** - * Disable the `dropoff` behavior in this list - * - * @protected - * @param {*} e - * @memberof FloatListTag - */ - protected dropoff(e: any): void; - /** - * Function called when the data of the list - * is changed - * - * @protected - * @memberof FloatListTag - */ - protected ondatachange(): void; - /** - * Mount the list to the DOM tree - * - * @protected - * @returns {void} - * @memberof FloatListTag - */ - protected mount(): void; - /** - * Push an element to the list - * - * @param {GenericObject} v an element data - * @returns - * @memberof FloatListTag - */ - push(v: GenericObject): ListViewItemTag; - /** - * Enable drag and drop on the list - * - * @private - * @param {ListViewItemTag} el the list item DOM element - * @memberof FloatListTag - */ - private enable_drag; - /** - * Calibrate the view of the list - * - * @memberof FloatListTag - */ - calibrate(): void; - } - } - } -} -/** - * Extend the Array interface with some - * property needed by AFX API - * - * @interface Array - * @template T - */ -interface Array { - /** - * Reference to a DOM element created by AFX API, - * this property is used by some AFX tags to refer - * to its child element in it data object - * - * @type {GenericObject} - * @memberof Array - */ - domel?: GenericObject; -} -declare namespace OS { - namespace GUI { - namespace tag { - /** - * A grid Row is a simple element that - * contains a group of grid cell - * - * @export - * @class GridRowTag - * @extends {AFXTag} - */ - class GridRowTag extends AFXTag { - /** - * Data placeholder for a collection of cell data - * - * @type {GenericObject[]} - * @memberof GridRowTag - */ - data: GenericObject[]; - /** - *Creates an instance of GridRowTag. - * @memberof GridRowTag - */ - constructor(); - /** - * Mount the tag, do nothing - * - * @protected - * @memberof GridRowTag - */ - protected mount(): void; - /** - * Init the tag before mounting: reset the data placeholder - * - * @protected - * @memberof GridRowTag - */ - protected init(): void; - /** - * Empty layout - * - * @protected - * @returns {TagLayoutType[]} - * @memberof GridRowTag - */ - protected layout(): TagLayoutType[]; - /** - * This function does nothing in this tag - * - * @protected - * @memberof GridRowTag - */ - protected calibrate(): void; - /** - * This function does nothing in this tag - * - * @protected - * @param {*} [d] - * @memberof GridRowTag - */ - protected reload(d?: any): void; - } - /** - * Event data used by grid cell - */ - type CellEventData = TagEventDataType; - /** - * Prototype of any grid cell, custom grid cell - * definition should extend and implement this - * abstract prototype - * - * @export - * @abstract - * @class GridCellPrototype - * @extends {AFXTag} - */ - abstract class GridCellPrototype extends AFXTag { - /** - * placeholder for cell selected event callback - * - * @private - * @type {TagEventCallback} - * @memberof GridCellPrototype - */ - private _oncellselect; - /** - * placeholder for cell double click event callback - * - * @private - * @type {TagEventCallback} - * @memberof GridCellPrototype - */ - private _oncelldbclick; - /** - * Data placeholder of the current cell - * - * @private - * @type {GenericObject} - * @memberof GridCellPrototype - */ - private _data; - /** - *Creates an instance of GridCellPrototype. - * @memberof GridCellPrototype - */ - constructor(); - /** - * Set the cell selected event callback - * - * @memberof GridCellPrototype - */ - set oncellselect(v: TagEventCallback); - /** - * Set the cell double click event callback - * - * @memberof GridCellPrototype - */ - set oncelldbclick(v: TagEventCallback); - /** - * Setter: - * - * Set the data of the cell, this will trigger - * the [[ondatachange]] function - * - * Getter: - * - * Get the current cell data placeholder - * - * @memberof GridCellPrototype - */ - set data(v: GenericObject); - get data(): GenericObject; - /** - * Setter: - * - * Set/unset the current cell as selected. - * This will trigger the [[cellselect]] - * event - * - * Getter: - * - * Check whether the current cell is selected - * - * @memberof GridCellPrototype - */ - set selected(v: boolean); - get selected(): boolean; - /** - * Update the current cell. This will - * reset the cell data - * - * @protected - * @param {*} d - * @memberof GridCellPrototype - */ - protected reload(d: any): void; - /** - * Mount the current cell to the grid - * - * @protected - * @memberof GridCellPrototype - */ - protected mount(): void; - /** - * This function triggers the cell select - * event - * - * @private - * @param {TagEventType} e - * @param {boolean} flag - * @returns {void} - * @memberof GridCellPrototype - */ - private cellselect; - /** - * Abstract function called when the cell data changed. - * This should be implemented by subclasses - * - * @protected - * @abstract - * @memberof GridCellPrototype - */ - protected abstract ondatachange(): void; - } - /** - * Simple grid cell defines a grid cell with - * an [[LabelTag]] as it cell layout - * - * @export - * @class SimpleGridCellTag - * @extends {GridCellPrototype} - */ - class SimpleGridCellTag extends GridCellPrototype { - /** - *Creates an instance of SimpleGridCellTag. - * @memberof SimpleGridCellTag - */ - constructor(); - /** - * Reset the label of the cell with its data - * - * @protected - * @memberof SimpleGridCellTag - */ - protected ondatachange(): void; - /** - * This function do nothing in this tag - * - * @protected - * @memberof SimpleGridCellTag - */ - protected init(): void; - /** - * This function do nothing in this tag - * - * @protected - * @memberof SimpleGridCellTag - */ - protected calibrate(): void; - /** - * The layout of the cell with a simple [[LabelTag]] - * - * @returns - * @memberof SimpleGridCellTag - */ - layout(): { - el: string; - ref: string; - }[]; - } - /** - * A Grid contains a header and a collection grid rows - * which has the same number of cells as the number of - * the header elements - * - * @export - * @class GridViewTag - * @extends {AFXTag} - */ - class GridViewTag extends AFXTag { - /** - * Grid header definition - * - * @private - * @type {GenericObject[]} - * @memberof GridViewTag - */ - private _header; - /** - * Grid rows data placeholder - * - * @private - * @type {GenericObject[][]} - * @memberof GridViewTag - */ - private _rows; - /** - * Reference to the current selected row DOM element - * - * @private - * @type {GridRowTag} - * @memberof GridViewTag - */ - private _selectedRow; - /** - * A collection of selected grid rows DOM element - * - * @private - * @type {GridRowTag[]} - * @memberof GridViewTag - */ - private _selectedRows; - /** - * Reference to the current selected cell - * - * @private - * @type {GridCellPrototype} - * @memberof GridViewTag - */ - private _selectedCell; - /** - * Cell select event callback placeholder - * - * @private - * @type {TagEventCallback} - * @memberof GridViewTag - */ - private _oncellselect; - /** - * Row select event callback placeholder - * - * @private - * @type {TagEventCallback} - * @memberof GridViewTag - */ - private _onrowselect; - /** - * Cell double click event callback placeholder - * - * @private - * @type {TagEventCallback} - * @memberof GridViewTag - */ - private _oncelldbclick; - /** - * Creates an instance of GridViewTag. - * @memberof GridViewTag - */ - constructor(); - /** - * Init the grid view before mounting. - * Reset all the placeholders to default values - * - * @protected - * @memberof GridViewTag - */ - protected init(): void; - /** - * This function does nothing - * - * @protected - * @param {*} [d] - * @memberof GridViewTag - */ - protected reload(d?: any): void; - /** - * set the cell select event callback - * - * @memberof GridViewTag - */ - set oncellselect(v: TagEventCallback); - /** - * set the row select event callback - * - * @memberof GridViewTag - */ - set onrowselect(v: TagEventCallback); - /** - * set the cell double click event callback - * - * @memberof GridViewTag - */ - set oncelldbclick(v: TagEventCallback); - /** - * Setter: set the tag name of the header cells - * - * Getter: get the grid header tag name - * - * @memberof GridViewTag - */ - set headeritem(v: string); - get headeritem(): string; - /** - * Setter: set the tag name of the grid cell - * - * Getter: get the tag name of the grid cell - * - * @memberof GridViewTag - */ - set cellitem(v: string); - get cellitem(): string; - /** - * Setter: set the header data - * - * Getter: get the header data placeholder - * - * @type {GenericObject[]} - * @memberof GridViewTag - */ - get header(): GenericObject[]; - set header(v: GenericObject[]); - /** - * Get all the selected rows - * - * @readonly - * @type {GridRowTag[]} - * @memberof GridViewTag - */ - get selectedRows(): GridRowTag[]; - /** - * Get the latest selected row - * - * @readonly - * @type {GridRowTag} - * @memberof GridViewTag - */ - get selectedRow(): GridRowTag; - /** - * Get the current selected cell - * - * @readonly - * @type {GridCellPrototype} - * @memberof GridViewTag - */ - get selectedCell(): GridCellPrototype; - /** - * Setter: set the rows data - * - * Getter: get the rows data - * - * @memberof GridViewTag - */ - set rows(rows: GenericObject[][]); - get rows(): GenericObject[][]; - /** - * Setter: activate deactivate multi-select - * - * Getter: check whether the `multiselect` option is activated - * - * @memberof GridViewTag - */ - set multiselect(v: boolean); - get multiselect(): boolean; - /** - * Set and Get the resizable attribute - * - * This allows to enable/disable column resize feature - * - * @memberof GridViewTag - */ - set resizable(v: boolean); - get resizable(): boolean; - /** - * Delete a grid rows - * - * @param {GridRowTag} row row DOM element - * @returns {void} - * @memberof GridViewTag - */ - delete(row: GridRowTag): void; - /** - * Push a row to the grid - * - * @param {GenericObject[]} row list of cell data - * @param {boolean} flag indicates where the row is add to beginning or end - * of the row - * @memberof GridViewTags - */ - push(row: GenericObject[], flag: boolean): void; - /** - * Unshift a row to the grid - * - * @param {GenericObject[]} row list of cell data in the row - * @memberof GridViewTag - */ - unshift(row: GenericObject[]): void; - /** - * This function triggers the cell select event - * - * @private - * @param {TagEventType} e event contains cell event data - * @param {boolean} flag indicates whether the event is double clicked - * @returns {void} - * @memberof GridViewTag - */ - private cellselect; - /** - * This function triggers the row select event, a cell select - * event will also trigger this event - * - * @param {TagEventType} e - * @returns {void} - * @memberof GridViewTag - */ - private rowselect; - /** - * Check whether the grid has header - * - * @private - * @returns {boolean} - * @memberof GridViewTag - */ - private has_header; - /** - * Calibrate the grid - * - * @protected - * @memberof GridViewTag - */ - protected calibrate(): void; - /** - * Recalculate the size of each header cell, changing - * in header cell size will also resize the entire - * related column - * - * @private - * @returns {void} - * @memberof GridViewTag - */ - private calibrate_header; - /** - * Mount the grid view tag - * - * @protected - * @returns {void} - * @memberof GridViewTag - */ - protected mount(): void; - /** - * Layout definition of the grid view - * - * @protected - * @returns {TagLayoutType[]} - * @memberof GridViewTag - */ - protected layout(): TagLayoutType[]; - } - } - } -} declare namespace OS { namespace GUI { namespace tag { @@ -7855,456 +7590,621 @@ declare namespace OS { } } } -/// -/** - * - * Extend the HTMLElement interface with some utility function need - * by AFX API - * - * @interface HTMLElement - */ -interface HTMLElement { - /** - * Recursively update a tag and all its children - * - * @param {*} [d] data to send to all element in the DOM subtree - * @memberof HTMLElement - */ - update(d?: any): void; - /** - * - * AFX will automatically bind the context menu on an HTMLElement - * if this function is defined on that element. The function should - * define the content of the context menu and its action - * - * Once the context menu is bound to the element, all context menu handle - * defined on any child of this element will be ignored. - * - * @param {JQuery.MouseEventBase} e a mouse event - * @param {OS.GUI.tag.MenuTag} m The context menu element [[MenuTag]] - * @memberof HTMLElement - */ - contextmenuHandle(e: JQuery.MouseEventBase, m: OS.GUI.tag.MenuTag): void; - /** - * Mount the element and all the children on its DOM subtree. This action - * is performed in a top-down manner - * - * @memberof HTMLElement - */ - sync(): void; - /** - * - * This action allows to generated all the DOM nodes defined by all AFX tags - * in its hierarchy. - * It performs two operations, one top-down operation to generate all the - * necessary DOM nodes, another bottom-up operation to init all the AFX tag - * in the current element DOM hierarchy - * - * @param {OS.API.Announcer} o an AntOS observable object - * @memberof HTMLElement - */ - afxml(o: OS.API.Announcer): void; - /** - * Perform DOM generation ([[afxml]]) then mount ([[sync]]) all the - * elements. - * - * @param {OS.API.Announcer} o an AntOS observable object - * @param {boolean} [flag] indicates whether this is the top-most call of the operation - * @memberof HTMLElement - */ - uify(o: OS.API.Announcer, flag?: boolean): void; - /** - * - * - * @type {*} - * @memberof HTMLElement - */ - mozRequestFullScreen: any; - /** - * - * - * @type {*} - * @memberof HTMLElement - */ - webkitRequestFullscreen: any; - /** - * - * - * @type {*} - * @memberof HTMLElement - */ - msRequestFullscreen: any; +declare namespace OS { + namespace GUI { + namespace tag { + /** + * An overlay tag is a layout tag that alway stay on top of + * the virtual desktop environment. Tile layout elements ([[VBoxTag]], [[HboxTag]]) + * can be used inside this tag to compose elements + * + * @export + * @class OverlayTag + * @extends {AFXTag} + */ + class OverlayTag extends AFXTag { + /** + * Tag width placeholder + * + * @private + * @type {string} + * @memberof OverlayTag + */ + private _width; + /** + * Tag height place holder + * + * @private + * @type {string} + * @memberof OverlayTag + */ + private _height; + /** + *Creates an instance of OverlayTag. + * @memberof OverlayTag + */ + constructor(); + /** + * Put the tag on top of the virtual desktop environment + * + * @protected + * @memberof OverlayTag + */ + protected init(): void; + /** + * Do nothing + * + * @protected + * @param {*} [d] + * @memberof OverlayTag + */ + protected reload(d?: any): void; + /** + * Setter: + * + * Set the width of the tag, the tag width should be in form of: + * `100px` of `80%` + * + * Getter: + * + * Get the tag width + * + * @memberof OverlayTag + */ + set width(v: string); + get width(): string; + /** + * Setter: + * + * Set the tag height, the tag height should be in form of: + * `100px` of `80%` + * + * Getter: + * + * Get the tag height + * + * @memberof OverlayTag + */ + set height(v: string); + get height(): string; + /** + * Calibrate the element when mounting + * + * @protected + * @returns {void} + * @memberof OverlayTag + */ + protected mount(): void; + /** + * Calibrate the width and height of the tag + * + * @returns {void} + * @memberof OverlayTag + */ + calibrate(): void; + /** + * Layout definition of the tag + * + * @protected + * @returns {TagLayoutType[]} + * @memberof OverlayTag + */ + protected layout(): TagLayoutType[]; + } + } + } } -/** - * - * - * @interface Document - */ -interface Document { - mozCancelFullScreen: any; - webkitExitFullscreen: any; - cancelFullScreen: any; +declare namespace OS { + namespace GUI { + namespace tag { + /** + * Meta tag that represents the virtual desktop environment. + * In near future, we may have multiple virtual desktop environments. + * Each desktop environment has a simple file manager and a window + * manager that render the window in a specific order. + * + * @export + * @class DesktopTag + * @extends {FloatListTag} + */ + class DesktopTag extends FloatListTag { + /** + * internal handle to the desktop file location + * + * @private + * @type {API.VFS.BaseFileHandle} + * @memberof DesktopTag + */ + private file; + /** + * local observer that detect if a new child element is + * added or removed + * + * @private + * @type {MutationObserver} + * @memberof DesktopTag + */ + private observer; + /** + * Internal list of the current opened window + * + * @private + * @type {Set} + * @memberof DesktopTag + */ + private window_list; + /** + * Creates an instance of DesktopTag. + * @memberof DesktopTag + */ + constructor(); + /** + * Mount the virtual desktop to the DOM tree + * + * @protected + * @memberof DesktopTag + */ + protected mount(): void; + /** + * Display all files and folders in the specific desktop location + * + * @return {*} {Promise} + * @memberof DesktopTag + */ + refresh(): Promise; + /** + * Remove this element from its parent + * + * @memberof DesktopTag + */ + remove(): void; + /** + * Active a window above all other windows + * + * @private + * @param {WindowTag} win + * @memberof DesktopTag + */ + private selectWindow; + /** + * Render all windows in order from bottom to top + * + * @private + * @memberof DesktopTag + */ + private render; + } + } + } +} +declare namespace OS { + namespace GUI { + namespace tag { + /** + * A float list is a list of items in which each + * item can be moved (drag and drop) freely + * + * @export + * @class FloatListTag + * @extends {ListViewTag} + */ + class FloatListTag extends ListViewTag { + /** + * Update the current tag, do nothing + * + * @protected + * @param {*} [d] + * @memberof FloatListTag + */ + protected reload(d?: any): void; + /** + * Variable that hold the onready callback of + * the tag. This callback will be called after + * the tag is mounted + * + * @private + * @memberof FloatListTag + */ + private _onready; + /** + *Creates an instance of FloatListTag. + * @memberof FloatListTag + */ + constructor(); + /** + * set the onready callback function to the tag. + * This callback will be called after + * the tag is mounted + * + * @memberof FloatListTag + */ + set onready(v: (e: FloatListTag) => void); + /** + * Setter: + * + * Set the direction of the list item layout. + * Two directions are available: + * - `vertical` + * - `horizontal` + * + * This setter acts as a DOM attribute + * + * Getter: + * + * Get the currently set direction of list + * item layout + * + * @memberof FloatListTag + */ + set dir(v: string); + get dir(): string; + /** + * Disable the dropdown option in this list + * + * @memberof FloatListTag + */ + set dropdown(v: boolean); + /** + * Disable the list buttons configuration in this + * list + * + * @memberof FloatListTag + */ + set buttons(v: GenericObject[]); + /** + * Disable the `showlist` behavior in this list + * + * @protected + * @param {*} e + * @memberof FloatListTag + */ + protected showlist(e: any): void; + /** + * Disable the `dropoff` behavior in this list + * + * @protected + * @param {*} e + * @memberof FloatListTag + */ + protected dropoff(e: any): void; + /** + * Function called when the data of the list + * is changed + * + * @protected + * @memberof FloatListTag + */ + protected ondatachange(): void; + /** + * Mount the list to the DOM tree + * + * @protected + * @returns {void} + * @memberof FloatListTag + */ + protected mount(): void; + /** + * Push an element to the list + * + * @param {GenericObject} v an element data + * @returns + * @memberof FloatListTag + */ + push(v: GenericObject): ListViewItemTag; + /** + * Enable drag and drop on the list + * + * @private + * @param {ListViewItemTag} el the list item DOM element + * @memberof FloatListTag + */ + private enable_drag; + /** + * Calibrate the view of the list + * + * @memberof FloatListTag + */ + calibrate(): void; + } + } + } } declare namespace OS { namespace GUI { /** - * [[TagLayoutType]] interface using by AFX tags to defined - * its internal DOM hierarchy + * + * Interface for an application dock item * * @export - * @interface TagLayoutType + * @interface AppDockItemType */ - interface TagLayoutType { + interface AppDockItemType { /** - * Element tag name + * Reference to the application process represented + * by the dock item * - * @type {string} - * @memberof TagLayoutType + * @type {application.BaseApplication} + * @memberof AppDockItemType */ - el: string; + app: application.BaseApplication; /** - * Children layout of the current element + * Reference to the DOM element of + * the owner dock item * - * @type {TagLayoutType[]} - * @memberof TagLayoutType + * @type {AFXTag} + * @memberof AppDockItemType */ - children?: TagLayoutType[]; - /** - * Reference name of the element used by AFX Tag - * - * @type {string} - * @memberof TagLayoutType - */ - ref?: string; - /** - * CSS class of the element - * - * @type {string} - * @memberof TagLayoutType - */ - class?: string; - /** - * this is the `data-id` attribute of the element, - * can be query by the [[aid]] Tag API function. - * Not to be confused with the DOM `id` attribute - * - * @type {(string | number)} - * @memberof TagLayoutType - */ - id?: string | number; - /** - * Tooltip text of the element - * - * @type {(string | FormattedString)} - * @memberof TagLayoutType - */ - tooltip?: string | FormattedString; - /** - * `data-width` of the element, not to be confused with - * the `width` attribute of the DOM element - * - * @type {number|string} - * @memberof TagLayoutType - */ - width?: number | string; - /** - ** `data-height` of the element, not to be confused with - * the `height` attribute of the DOM element - * - * @type {number|string} - * @memberof TagLayoutType - */ - height?: number | string; - } - /** - * Data type for event issued by AFX tags - * - * @export - * @interface TagEventDataType - * @template T item template - */ - interface TagEventDataType { - /** - * Reference to the item involved in the event - * - * @type {T} - * @memberof TagEventDataType - */ - item?: T; + domel?: AFXTag; [propName: string]: any; } - /** - * Format of the event issued by AFX tags - * - * @export - * @interface TagEventType - * @template T data type - */ - interface TagEventType { - /** - * `data-id` of the tag that trigger the - * event - * - * @type {(number | string)} - * @memberof TagEventType - */ - id: number | string; - /** - * Data object of the event - * - * @type {T} - * @memberof TagEventType - */ - data: T; - } - /** - * Drag and Drop data type sent between mouse events - * - * @export - * @interface DnDEventDataType - * @template T - */ - interface DnDEventDataType { - /** - * Reference to the source DOM element - * - * @type {T} - * @memberof DnDEventDataType - */ - from: T; - /** - * Reference to the target DOM element - * - * @type {T} - * @memberof DnDEventDataType - */ - to: T; - } - /** - * Tag event callback type - */ - type TagEventCallback = (e: TagEventType) => void; - /** - * Base abstract class for tag implementation, any AFX tag should be - * subclass of this class - * - * @export - * @abstract - * @class AFXTag - * @extends {HTMLElement} - */ - abstract class AFXTag extends HTMLElement { - /** - * The announcer object of the tag - * - * @type {API.Announcer} - * @memberof AFXTag - */ - observable: API.Announcer; - /** - * Reference to some of the tag's children - * element. This reference object is built - * based on the `ref` property found in the - * tag layout [[TagLayoutType]] - * - * @protected - * @type {GenericObject} - * @memberof AFXTag - */ - protected refs: GenericObject; - /** - * boolean value indicated whether the tag - * is already mounted in the DOM tree - * - * @protected - * @type {boolean} - * @memberof AFXTag - */ - protected _mounted: boolean; - /** - *Creates an instance of AFXTag. - * @memberof AFXTag - */ - constructor(); - /** - * This function verifies if a property name of the input object - * corresponds to a setter of the current tag. If this is the - * case, it sets the value of that property to the setter - * - * @param {GenericObject} v input object - * @memberof AFXTag - */ - set(v: GenericObject): void; - /** - * Setter to set the tooltip text to the current tag. - * The text should be in the following format: - * ```text - * cr|cl|ct|cb: tooltip text - * ``` - * - * @memberof AFXTag - */ - set tooltip(v: string); - /** - * - * This function looking for a property name of the tag - * in its prototype chain. The descriptor of the property - * will be returned if it exists - * - * @private - * @param {string} k the property name to be queried - * @returns {PropertyDescriptor} the property descriptor or undefined - * @memberof AFXTag - */ - private descriptor_of; - /** - * Setter: set the id of the tag in string or number - * - * Getter: get the id of the current tag - * - * @memberof AFXTag - */ - set aid(v: string | number); - get aid(): string | number; - /** - * Implementation from HTMLElement interface, - * this function mount the current tag hierarchy - * - * @returns {void} - * @memberof AFXTag - */ - sync(): void; - /** - * Generate the DOM hierarchy of the current tag - * - * @param {API.Announcer} o observable object - * @memberof AFXTag - */ - afxml(o: API.Announcer): void; - /** - * Update the current tag hierarchy - * - * @param {*} d any data object - * @memberof AFXTag - */ - update(d: any): void; - /** - * Init the current tag, this function - * is called before the [[mount]] function - * - * @protected - * @abstract - * @memberof AFXTag - */ - protected abstract init(): void; - /** - * Mount only the current tag - * - * @protected - * @abstract - * @memberof AFXTag - */ - protected abstract mount(): void; - /** - * Layout definition of a tag - * - * @protected - * @abstract - * @returns {TagLayoutType[]} tag layout object - * @memberof AFXTag - */ - protected abstract layout(): TagLayoutType[]; - /** - * Update only the current tag, this function is - * called by [[update]] before chaining the - * update process to its children - * - * @protected - * @abstract - * @param {*} [d] - * @memberof AFXTag - */ - protected abstract reload(d?: any): void; - /** - * This function is used to re-render the current - * tag - * - * @protected - * @memberof AFXTag - */ - protected calibrate(): void; - /** - * This function parses the input layout object - * and generates all the elements defined by - * the tag - * - * @private - * @param {TagLayoutType} tag tag layout object - * @returns {Element} the DOM element specified by the tag layout - * @memberof AFXTag - */ - private mkui; - /** - * This function inserts or removes an attribute name - * to/from the target element based on the input `flag`. - * - * @protected - * @param {boolean} flag indicates whether the attribute name should be inserted o removed - * @param {string} v the attribute name - * @param {HTMLElement} [el] the target element - * @memberof AFXTag - */ - protected attsw(flag: boolean, v: string, el?: HTMLElement): void; - /** - * Insert the attribute name to the target element - * - * @protected - * @param {string} v the attribute name - * @param {HTMLElement} [el] the target element - * @memberof AFXTag - */ - protected atton(v: string, el?: HTMLElement): void; - /** - * Remove the attribute name from the target element - * - * @protected - * @param {string} v attribute name - * @param {HTMLElement} [el] the target element - * @memberof AFXTag - */ - protected attoff(v: string, el?: HTMLElement): void; - /** - * Verify if the target element has an attribute name - * - * @protected - * @param {string} v attribute name - * @param {HTMLElement} [el] target element - * @returns {boolean} - * @memberof AFXTag - */ - protected hasattr(v: string, el?: HTMLElement): boolean; - } - /** - * All the AFX tags are defined in this namespace, - * these tags are defined as custom DOM elements and will be - * stored in the `customElements` registry of the browser - */ namespace tag { /** - * Define an AFX tag as a custom element and add it to the - * global `customElements` registry. If the tag is redefined, i.e. - * the tag already exists, its behavior will be updated with the - * new definition + * This class define the AntOS system application dock tag * * @export - * @template T all classes that extends [[AFXTag]] - * @param {string} name name of the tag - * @param {{ new (): T }} cls the class that defines the tag - * @returns {void} + * @class AppDockTag + * @extends {AFXTag} */ - function define(name: string, cls: { - new (): T; - }): void; + class AppDockTag extends AFXTag { + /** + * variable holds the application select event + * callback handle + * + * @private + * @type {TagEventCallback} + * @memberof AppDockTag + */ + private _onappselect; + /** + * Items data of the dock + * + * @private + * @type {AppDockItemType[]} + * @memberof AppDockTag + */ + private _items; + /** + * Reference to the currently select application + * process in the dock + * + * @private + * @type {AppDockItemType} + * @memberof AppDockTag + */ + private _selectedItem; + /** + *Creates an instance of AppDockTag. + * @memberof AppDockTag + */ + constructor(); + /** + * Implementation of the abstract function: Update the current tag. + * It do nothing for this tag + * + * @protected + * @param {*} [d] + * @memberof AppDockTag + */ + protected reload(d?: any): void; + /** + * Init the tag before mounting + * + * @protected + * @memberof AppDockTag + */ + protected init(): void; + /** + * The tag layout, it is empty on creation but elements will + * be added automatically to it in operation + * + * @protected + * @returns {TagLayoutType[]} + * @memberof AppDockTag + */ + protected layout(): TagLayoutType[]; + /** + * getter to get the dock items + * + * @readonly + * @type {AppDockItemType[]} + * @memberof AppDockTag + */ + get items(): AppDockItemType[]; + /** + * Setter: + * + * set the selected application in the dock + * this will trigger two event: + * - `focus`: on the selected application + * - `blur`: on all other applications on the dock + * + * Getter: + * + * Get the current selected application + * on the dock + * + * @memberof AppDockTag + */ + set selectedApp(v: application.BaseApplication); + get selectedApp(): application.BaseApplication; + /** + * Get selected item of the dock + * + * @readonly + * @type {AppDockItemType} + * @memberof AppDockTag + */ + get selectedItem(): AppDockItemType; + /** + * When a new application process is created, this function + * will be called to add new application entry to the dock. + * The added application will becomes the current selected + * application + * + * @param {AppDockItemType} item an application dock item entry + * @memberof AppDockTag + */ + newapp(item: AppDockItemType): void; + /** + * Delete and application entry from the dock. + * This function will be called when an application + * is exit + * + * @param {BaseApplication} a the application to be removed from the dock + * @memberof AppDockTag + */ + removeapp(a: application.BaseApplication): void; + /** + * Mount the current dock tag + * + * @protected + * @memberof AppDockTag + */ + protected mount(): void; + } + } + } +} +declare namespace OS { + namespace GUI { + namespace tag { + /** + * Tag that define system calendar widget + * + * @export + * @class CalendarTag + * @extends {AFXTag} + */ + class CalendarTag extends AFXTag { + /** + * The current selected day + * + * @private + * @type {number} + * @memberof CalendarTag + */ + private _day; + /** + * The current selected month + * + * @private + * @type {number} + * @memberof CalendarTag + */ + private _month; + /** + * The current selected year + * + * @private + * @type {number} + * @memberof CalendarTag + */ + private _year; + /** + * The current selected date object + * + * @private + * @type {Date} + * @memberof CalendarTag + */ + private _selectedDate; + /** + * placeholder for date select event callback + * + * @private + * @type {TagEventCallback} + * @memberof CalendarTag + */ + private _ondateselect; + /** + *Creates an instance of CalendarTag. + * @memberof CalendarTag + */ + constructor(); + /** + * Init the tag before mounting + * + * @protected + * @memberof CalendarTag + */ + protected init(): void; + /** + * Update the current tag, doing nothing in this tag + * + * @protected + * @param {*} [d] any data object + * @memberof CalendarTag + */ + protected reload(d?: any): void; + /** + * Get the current selected date in the widget + * + * @readonly + * @type {Date} + * @memberof CalendarTag + */ + get selectedDate(): Date; + /** + * Set the date select event callback handle for the widget + * + * @memberof CalendarTag + */ + set ondateselect(v: TagEventCallback); + /** + * Mount the current widget to the DOM tree + * + * @protected + * @memberof CalendarTag + */ + protected mount(): void; + /** + * This function triggers the date select event + * + * @private + * @param {TagEventType} e AFX tag event data [[TagEventType]] + * @returns {void} + * @memberof CalendarTag + */ + private dateselect; + /** + * Calibrate the layout of the tag + * + * @protected + * @memberof CalendarTag + */ + protected calibrate(): void; + /** + * Display the previous month of the current month + * + * @private + * @memberof CalendarTag + */ + private prevmonth; + /** + * Display the next month of the current month + * + * @private + * @returns + * @memberof CalendarTag + */ + private nextmonth; + /** + * Visualize the calendar base on input date + * + * @private + * @param {Date} date + * @memberof CalendarTag + */ + private calendar; + /** + * Layout definition of the widget + * + * @protected + * @returns {TagLayoutType[]} + * @memberof CalendarTag + */ + protected layout(): TagLayoutType[]; + } } } } @@ -8524,1719 +8424,2058 @@ declare namespace OS { } } } -declare namespace OS { - namespace GUI { - namespace tag { - /** - * A tile layout organize it child elements - * in a fixed horizontal or vertical direction. - * - * The size of each child element is attributed based - * on its configuration of automatically based on the - * remaining space in the layout - * - * - * @export - * @class TileLayoutTag - * @extends {AFXTag} - */ - class TileLayoutTag extends AFXTag { - /** - *C reates an instance of TileLayoutTag. - * @memberof TileLayoutTag - */ - constructor(); - /** - * Do nothing - * - * @protected - * @memberof TileLayoutTag - */ - protected init(): void; - /** - * Do nothing - * - * @protected - * @param {*} [d] - * @memberof TileLayoutTag - */ - protected reload(d?: any): void; - /** - * Setter: Set the name of the tile container, should be: `hbox` or `vbox` - * - * Getter: Get the name of the tile container - * - * @memberof TileLayoutTag - */ - set name(v: string); - get name(): string; - /** - * Setter: - * - * SET the layout direction, should be: - * - `row`: horizontal direction - * - `column`: vertical direction - * - * Getter: - * - * Get layout direction - * - * @memberof TileLayoutTag - */ - set dir(v: "row" | "column"); - get dir(): "row" | "column"; - /** - * Mount the element - * - * @protected - * @returns {void} - * @memberof TileLayoutTag - */ - protected mount(): void; - /** - * re-organize the layout - * - * @returns {void} - * @memberof TileLayoutTag - */ - calibrate(): void; - /** - * Organize the layout in horizontal direction, only work when - * the layout direction set to horizontal - * - * @private - * @returns {void} - * @memberof TileLayoutTag - */ - private hcalibrate; - /** - * Organize the layout in vertical direction, only work when - * the layout direction set to vertical - * - * @private - * @returns {void} - * @memberof TileLayoutTag - */ - private vcalibrate; - /** - * Layout definition - * - * @returns - * @memberof TileLayoutTag - */ - layout(): { - el: string; - ref: string; - }[]; - } - /** - * A HBox organize its child elements in horizontal direction - * - * @export - * @class HBoxTag - * @extends {TileLayoutTag} - */ - class HBoxTag extends TileLayoutTag { - /** - * Creates an instance of HBoxTag. - * @memberof HBoxTag - */ - constructor(); - /** - * Mount the tag - * - * @protected - * @memberof HBoxTag - */ - protected mount(): void; - } - /** - * A VBox organize its child elements in vertical direction - * - * @export - * @class VBoxTag - * @extends {TileLayoutTag} - */ - class VBoxTag extends TileLayoutTag { - /** - *Creates an instance of VBoxTag. - * @memberof VBoxTag - */ - constructor(); - /** - * Mount the tag - * - * @protected - * @memberof VBoxTag - */ - protected mount(): void; - } - } - } -} -/// -declare namespace OS { - namespace GUI { - namespace tag { - /** - * This tag define a basic button and its behavior - * - * @export - * @class ButtonTag - * @extends {AFXTag} - */ - class ButtonTag extends AFXTag { - /** - * Variable hold the button click callback handle - * - * @private - * @type {TagEventCallback} - * @memberof ButtonTag - */ - private _onbtclick; - /** - * Custom user data - * - * @type {GenericObject} - * @memberof ButtonTag - */ - data: GenericObject; - /** - *Creates an instance of ButtonTag. - * @memberof ButtonTag - */ - constructor(); - /** - * Set the click callback handle for the target button - * - * @memberof ButtonTag - */ - set onbtclick(v: TagEventCallback); - /** - * Set the path to the button icon, the path should be - * a VFS file path - * - * @memberof ButtonTag - */ - set icon(v: string); - /** - * Set the icon class to the button, this property - * allows to style the button icon using CSS - * - * @memberof ButtonTag - */ - set iconclass(v: string); - /** - * Setter: Set the text of the button - * - * Getter: Get the current button test - * - * @memberof ButtonTag - */ - set text(v: string | FormattedString); - get text(): string | FormattedString; - /** - * Setter: Enable or disable the button - * - * Getter: Get the `enable` property of the button - * - * @memberof ButtonTag - */ - set enable(v: boolean); - get enable(): boolean; - /** - * Setter: set or remove the attribute `selected` of the button - * - * Getter: check whether the attribute `selected` of the button is set - * - * @memberof ButtonTag - */ - set selected(v: boolean); - get selected(): boolean; - /** - * Setter: activate or deactivate the toggle mode of the button - * - * Getter: Check whether the button is in toggle mode - * - * @memberof ButtonTag - */ - set toggle(v: boolean); - get toggle(): boolean; - /** - * Mount the tag - * - * @protected - * @memberof ButtonTag - */ - protected mount(): void; - /** - * Init the tag before mounting - * - * @protected - * @memberof ButtonTag - */ - protected init(): void; - /** - * Re-calibrate the button, do nothing in this tag - * - * @protected - * @memberof ButtonTag - */ - protected calibrate(): void; - /** - * Update the current tag, do nothing in this tag - * - * @param {*} [d] - * @memberof ButtonTag - */ - reload(d?: any): void; - /** - * Button layout definition - * - * @protected - * @returns {TagLayoutType[]} - * @memberof ButtonTag - */ - protected layout(): TagLayoutType[]; - } - } - } +declare type VFSFileHandleClass = { + new (...args: any[]): OS.API.VFS.BaseFileHandle; +}; +interface String { + /** + * Convert a string to VFS file handle. + * + * This function will create a file handle object from the string + * with the help of [[VFS.findHandles]] + * + * @returns {OS.API.VFS.BaseFileHandle} + * @memberof String + */ + asFileHandle(): OS.API.VFS.BaseFileHandle; } declare namespace OS { - namespace GUI { - namespace tag { + namespace API { + /** + * User permission data type + * + * @export + * @interface UserPermissionType + */ + interface UserPermissionType { + read: boolean; + write: boolean; + exec: boolean; + } + /** + * VFS file meta-data data type + * + * @export + * @interface FileInfoType + */ + interface FileInfoType { /** - * Tag that define system calendar widget + * File mime type + * + * @type {string} + * @memberof FileInfoType + */ + mime: string; + /** + * File size + * + * @type {number} + * @memberof FileInfoType + */ + size: number; + /** + * File name + * + * @type {string} + * @memberof FileInfoType + */ + name: string; + /** + * File path + * + * @type {string} + * @memberof FileInfoType + */ + path: string; + /** + * File type: + * - `file` + * - `dir` + * - `app` + * + * @type {string} + * @memberof FileInfoType + */ + type: string; + /** + * File permission + * + * @type {{ + * group: UserPermissionType; + * owner: UserPermissionType; + * other: UserPermissionType; + * }} + * @memberof FileInfoType + */ + perm?: { + /** + * Group permission + * + * @type {UserPermissionType} + */ + group: UserPermissionType; + /** + * Owner permission + * + * @type {UserPermissionType} + */ + owner: UserPermissionType; + /** + * Other permission + * + * @type {UserPermissionType} + */ + other: UserPermissionType; + }; + /** + * Creation time + * + * @type {string} + * @memberof FileInfoType + */ + ctime?: string; + /** + * Modification time + * + * @type {string} + * @memberof FileInfoType + */ + mtime?: string; + /** + * Group id + * + * @type {number} + * @memberof FileInfoType + */ + gid?: number; + /** + * User id + * + * @type {number} + * @memberof FileInfoType + */ + uid?: number; + [propName: string]: any; + } + /** + * This namespace is dedicated to all APIs related to + * AntOS Virtual File System (VFS) + */ + namespace VFS { + /** + * Placeholder stores VFS file protocol patterns and its attached file handle class. + * + */ + const handles: GenericObject; + /** + * Register a protocol to a handle class * * @export - * @class CalendarTag - * @extends {AFXTag} + * @param {string} protos VFS protocol pattern + * @param {VFSFileHandleClass} cls handle class */ - class CalendarTag extends AFXTag { - /** - * The current selected day - * - * @private - * @type {number} - * @memberof CalendarTag - */ - private _day; - /** - * The current selected month - * - * @private - * @type {number} - * @memberof CalendarTag - */ - private _month; - /** - * The current selected year - * - * @private - * @type {number} - * @memberof CalendarTag - */ - private _year; - /** - * The current selected date object - * - * @private - * @type {Date} - * @memberof CalendarTag - */ - private _selectedDate; - /** - * placeholder for date select event callback - * - * @private - * @type {TagEventCallback} - * @memberof CalendarTag - */ - private _ondateselect; - /** - *Creates an instance of CalendarTag. - * @memberof CalendarTag - */ - constructor(); - /** - * Init the tag before mounting - * - * @protected - * @memberof CalendarTag - */ - protected init(): void; - /** - * Update the current tag, doing nothing in this tag - * - * @protected - * @param {*} [d] any data object - * @memberof CalendarTag - */ - protected reload(d?: any): void; - /** - * Get the current selected date in the widget - * - * @readonly - * @type {Date} - * @memberof CalendarTag - */ - get selectedDate(): Date; - /** - * Set the date select event callback handle for the widget - * - * @memberof CalendarTag - */ - set ondateselect(v: TagEventCallback); - /** - * Mount the current widget to the DOM tree - * - * @protected - * @memberof CalendarTag - */ - protected mount(): void; - /** - * This function triggers the date select event - * - * @private - * @param {TagEventType} e AFX tag event data [[TagEventType]] - * @returns {void} - * @memberof CalendarTag - */ - private dateselect; - /** - * Calibrate the layout of the tag - * - * @protected - * @memberof CalendarTag - */ - protected calibrate(): void; - /** - * Display the previous month of the current month - * - * @private - * @memberof CalendarTag - */ - private prevmonth; - /** - * Display the next month of the current month - * - * @private - * @returns - * @memberof CalendarTag - */ - private nextmonth; - /** - * Visualize the calendar base on input date - * - * @private - * @param {Date} date - * @memberof CalendarTag - */ - private calendar; - /** - * Layout definition of the widget - * - * @protected - * @returns {TagLayoutType[]} - * @memberof CalendarTag - */ - protected layout(): TagLayoutType[]; - } - } - } -} -declare namespace OS { - namespace GUI { - namespace tag { + function register(protos: string, cls: VFSFileHandleClass): void; /** - * List item event data type - */ - type ListItemEventData = TagEventDataType; - /** - * A list item represent the individual view of an item in the [[ListView]]. - * This class is an abstract prototype class, implementation of any - * list view item should extend it + * Load custom VFS handles if the package vfsx available * + * @export + * @param {boolean} [force] force load the file + * @return {*} {Promise} + */ + function loadVFSX(force?: boolean): Promise; + /** + * Looking for a attached file handle class of a string protocol + * + * When converting a string to file handle, the system will look + * for a protocol pattern in the string, if the protocol found, + * its attached handle class (found in [[VFS.handles]]) will be + * used to initialize a file handle object from the string + * + * ```typescript + * "home://data/test.txt".asFileHandle() // -> an instance of RemoteFileHandle + * ``` + * @export + * @param {string} proto protocol string + * @returns {VFSFileHandleClass[]} + */ + function findHandles(proto: string): VFSFileHandleClass[]; + /** + * Abstract prototype of all all VFS file handle definition. + * + * This prototype provides a standardized interface to access + * to different underlay file systems such as remote file, + * cloud file (Dropbox, Google drive, etc.), URL or memory-based file * * @export * @abstract - * @class ListViewItemTag - * @extends {AFXTag} + * @class BaseFileHandle */ - abstract class ListViewItemTag extends AFXTag { + abstract class BaseFileHandle { /** - * Data placeholder for the list item + * Flag indicates whether the file is dirty * - * @private - * @type {GenericObject} - * @memberof ListViewItemTag - */ - private _data; - /** - * placeholder for the item select event callback - * - * @private - * @type {TagEventCallback} - * @memberof ListViewItemTag - */ - private _onselect; - /** - * Context menu event callback handle - * - * @private - * @type {TagEventCallback} - * @memberof ListViewItemTag - */ - private _onctxmenu; - /** - * Click event callback placeholder - * - * @private - * @type {TagEventCallback} - * @memberof ListViewItemTag - */ - private _onclick; - /** - * Double click event callback handle - * - * @private - * @type {TagEventCallback} - * @memberof ListViewItemTag - */ - private _ondbclick; - /** - * Item close event callback placeholder - * - * @private - * @type {TagEventCallback} - * @memberof ListViewItemTag - */ - private _onclose; - /** - *Creates an instance of ListViewItemTag. - * @memberof ListViewItemTag - */ - constructor(); - /** - * Setter: Turn on/off the `closable` feature of the list item - * - * Getter: Check whether the item is closable - * - * @memberof ListViewItemTag - */ - set closable(v: boolean); - get closable(): boolean; - /** - * Set item select event handle - * - * @memberof ListViewItemTag - */ - set onitemselect(v: TagEventCallback); - /** - * Setter: select/unselect the current item - * - * Getter: Check whether the current item is selected - * - * @memberof ListViewItemTag - */ - set selected(v: boolean); - get selected(): boolean; - /** - * Set the context menu event handle - * - * @memberof ListViewItemTag - */ - set onctxmenu(v: TagEventCallback); - /** - * Set the item click event handle - * - * @memberof ListViewItemTag - */ - set onitemclick(v: TagEventCallback); - /** - * Set the item double click event handle - * - * @memberof ListViewItemTag - */ - set onitemdbclick(v: TagEventCallback); - /** - * set the item close event handle - * - * @memberof ListViewItemTag - */ - set onitemclose(v: TagEventCallback); - /** - * Mount the tag and bind some events - * - * @protected - * @memberof ListViewItemTag - */ - protected mount(): void; - /** - * Layout definition of the item tag. - * This function define the outer layout of the item. - * Custom inner layout of each item implementation should - * be defined in [[itemlayout]] - * - * @protected - * @returns {TagLayoutType[]} - * @memberof ListViewItemTag - */ - protected layout(): TagLayoutType[]; - /** - * Setter: - * - * Set the data of the list item. This will - * trigger the [[ondatachange]] function - * - * Getter: - * - * Get the data of the current list item - * - * @memberof ListViewItemTag - */ - set data(v: GenericObject); - get data(): GenericObject; - /** - * Any subclass of this class should implement this - * function to provide its custom item layout - * - * @protected - * @abstract - * @returns {TagLayoutType} - * @memberof ListViewItemTag - */ - protected abstract itemlayout(): TagLayoutType; - /** - * This function is called when the item data is changed. - * It should be implemented in all subclass of this class - * - * @protected - * @abstract - * @memberof ListViewItemTag - */ - protected abstract ondatachange(): void; - } - /** - * The layout of a simple list item contains only a - * AFX label - * - * @export - * @class SimpleListItemTag - * @extends {ListViewItemTag} - */ - class SimpleListItemTag extends ListViewItemTag { - /** - *Creates an instance of SimpleListItemTag. - * @memberof SimpleListItemTag - */ - constructor(); - /** - * Reset some property to default - * - * @protected - * @memberof SimpleListItemTag - */ - protected init(): void; - /** - * Do nothing - * - * @protected - * @memberof SimpleListItemTag - */ - protected calibrate(): void; - /** - * Refresh the inner label when the item data - * is changed - * - * @protected - * @returns {void} - * @memberof SimpleListItemTag - */ - protected ondatachange(): void; - /** - * Re-render the list item - * - * @protected - * @memberof SimpleListItemTag - */ - protected reload(): void; - /** - * List item custom layout definition - * - * @protected - * @returns {TagLayoutType} - * @memberof SimpleListItemTag - */ - protected itemlayout(): TagLayoutType; - } - /** - * This tag defines a traditional or a dropdown list widget. - * It contains a collection of list items in which layout - * of each item may be variable - * - * @export - * @class ListViewTag - * @extends {AFXTag} - */ - class ListViewTag extends AFXTag { - /** - * placeholder of list select event handle - * - * @private - * @type {TagEventCallback} - * @memberof ListViewTag - */ - private _onlistselect; - /** - * placeholder of list double click event handle - * - * @private - * @type {TagEventCallback} - * @memberof ListViewTag - */ - private _onlistdbclick; - /** - * placeholder of list drag and drop event handle - * - * @private - * @type {TagEventCallback>} - * @memberof ListViewTag - */ - private _ondragndrop; - /** - * placeholder of list item close event handle - * - * @private - * @memberof ListViewTag - */ - private _onitemclose; - /** - * placeholder of drag and drop mouse down event handle - * - * @private - * @memberof ListViewTag - */ - private _onmousedown; - /** - * placeholder of drag and drop mouse up event handle - * - * @private - * @memberof ListViewTag - */ - private _onmouseup; - /** - * placeholder of drag and drop mouse move event handle - * - * @private - * @memberof ListViewTag - */ - private _onmousemove; - /** - * Reference to the latest selected DOM item - * - * @private - * @type {ListViewItemTag} - * @memberof ListViewTag - */ - private _selectedItem; - /** - * A collection of selected items in the list. - * The maximum size of this collection is 1 if - * the [[multiselect]] feature is disabled - * - * @private - * @type {ListViewItemTag[]} - * @memberof ListViewTag - */ - private _selectedItems; - /** - * Data placeholder of the list - * - * @private - * @type {GenericObject[]} - * @memberof ListViewTag - */ - private _data; - /** - * Event data passing between mouse event when performing - * drag and drop on the list - * - * @private - * @type {{ from: ListViewItemTag; to: ListViewItemTag }} - * @memberof ListViewTag - */ - private _dnd; - /** - *Creates an instance of ListViewTag. - * @memberof ListViewTag - */ - constructor(); - /** - * Reset the tag's properties to the default values - * - * @protected - * @memberof ListViewTag - */ - protected init(): void; - /** - * This function does nothing - * - * @protected - * @param {*} [d] - * @memberof ListViewTag - */ - protected reload(d?: any): void; - /** - * Setter: toggle between dropdown and traditional list - * - * Getter: Check whether the list is dropdown or traditional list - * - * @memberof ListViewTag - */ - set dropdown(v: boolean); - /** - * Set drag and drop event handle - * - * @memberof ListViewTag - */ - set ondragndrop(v: TagEventCallback>); - /** - * Set list select event handle - * - * @memberof ListViewTag - */ - set onlistselect(v: TagEventCallback); - /** - * Set double click event handle - * - * @memberof ListViewTag - */ - set onlistdbclick(v: TagEventCallback); - /** - * Set item close event handle - * - * @memberof ListViewTag - */ - set onitemclose(v: (e: TagEventType) => boolean); - get dropdown(): boolean; - /** - * Setter: - * - * Set the default tag name of list's items. - * If the tag name is not specified in the - * data of a list item, this tag will be used - * - * Getter: - * - * Get the default tag name of list item - * - * @memberof ListViewTag - */ - set itemtag(v: string); - get itemtag(): string; - /** - * Setter: - * - * Turn on/off of the `multiselect` feature - * - * Getter: - * - * Check whether multi-select is allowed - * in this list - * - * @memberof ListViewTag - */ - set multiselect(v: boolean); - get multiselect(): boolean; - /** - * Setter: Enable/disable drag and drop event in the list - * - * Getter: Check whether the drag and drop event is enabled - * - * @memberof ListViewTag - */ - set dragndrop(v: boolean); - get dragndrop(): boolean; - /** - * Set the buttons layout of the list. - * Button layout allows to add some custom - * behaviors to the list. - * - * Each button data should define the [[onbtclick]] - * event handle to specify the custom behavior - * - * When the list is configured as dropdown. The buttons - * layout will be disabled - * - * Example of a button data: - * - * ``` - * { - * text: "Button text", - * icon: "home://path/to/icon.png", - * iconclass: "icon-class-name", - * onbtclick: (e) => console.log(e) - * } - * ``` - * - * @memberof ListViewTag - */ - set buttons(v: GenericObject[]); - /** - * Getter: Get data of the list - * - * Setter: Set data to the list - * - * @type {GenericObject[]} - * @memberof ListViewTag - */ - get data(): GenericObject[]; - set data(data: GenericObject[]); - /** - * Do nothing - * - * @protected - * @memberof ListViewTag - */ - protected ondatachange(): void; - /** - * Setter: Select list item(s) by their indexes - * - * Getter: Get the indexes of all selected items - * - * @memberof ListViewTag - */ - set selected(idx: number | number[]); - /** - * Get the latest selected item - * - * @readonly - * @type {ListViewItemTag} - * @memberof ListViewTag - */ - get selectedItem(): ListViewItemTag; - /** - * Get all the selected items - * - * @readonly - * @type {ListViewItemTag[]} - * @memberof ListViewTag - */ - get selectedItems(): ListViewItemTag[]; - get selected(): number | number[]; - /** - * Add an item to the beginning of the list - * - * @param {GenericObject} item - * @returns {ListViewItemTag} the added list item element - * @memberof ListViewTag - */ - unshift(item: GenericObject): ListViewItemTag; - /** - * check whether the list has data - * - * @private - * @param {GenericObject} v - * @returns - * @memberof ListViewTag - */ - private has_data; - /** - * Add an item to the beginning or end of the list - * - * @param {GenericObject} item list item data - * @param {boolean} [flag] indicates whether to add the item in the beginning of the list - * @returns {ListViewItemTag} the added list item element - * @memberof ListViewTag - */ - push(item: GenericObject, flag?: boolean): ListViewItemTag; - /** - * Delete an item - * - * @param {ListViewItemTag} item item DOM element - * @memberof ListViewTag - */ - delete(item: ListViewItemTag): void; - /** - * Select item next to the currently selected item. - * If there is no item selected, the first item will - * be selected - * - * @returns {void} - * @memberof ListViewTag - */ - selectNext(): void; - /** - * Select the previous item in the list. - * - * @returns {void} - * @memberof ListViewTag - */ - selectPrev(): void; - /** - * Unselect all the selected items in the list - * - * @returns {void} - * @memberof ListViewTag - */ - unselect(): void; - /** - * This function triggers the click event on an item - * - * @private - * @param {TagEventType} e tag event object - * @param {boolean} flag indicates whether this is a double click event - * @returns {void} - * @memberof ListViewTag - */ - private iclick; - /** - * This function triggers the double click event on an item - * - * @private - * @param {TagEventType} e tag event object - * @returns - * @memberof ListViewTag - */ - private idbclick; - /** - * This function triggers the list item select event - * - * @private - * @param {TagEventType} e tag event object - * @returns - * @memberof ListViewTag - */ - private iselect; - /** - * Mount the tag and bind some basic event - * - * @protected - * @returns {void} - * @memberof ListViewTag - */ - protected mount(): void; - /** - * This function triggers the item close event - * - * @private - * @param {TagEventType} e tag event object - * @returns {void} - * @memberof ListViewTag - */ - private iclose; - /** - * Show the dropdown list. - * This function is called only when the list is a dropdown - * list - * - * @protected - * @param {*} e - * @returns {void} - * @memberof ListViewTag - */ - protected showlist(e: any): void; - /** - * Hide the dropdown list. - * This function is called only when the list is a dropdown - * list - * - * @protected - * @param {*} e - * @memberof ListViewTag - */ - protected dropoff(e: any): void; - /** - * calibrate the list layout - * - * @protected - * @returns {void} - * @memberof ListViewTag - */ - protected calibrate(): void; - /** - * List view layout definition - * - * @protected - * @returns {TagLayoutType[]} - * @memberof ListViewTag - */ - protected layout(): TagLayoutType[]; - } - } - } -} -declare namespace OS { - namespace GUI { - namespace tag { - /** - * A system panel contains the following elements: - * - Spotlight to access to applications menu - * - Current focused application menu - * - System tray for all running services running in background - * - * @export - * @class SystemPanelTag - * @extends {AFXTag} - */ - class SystemPanelTag extends AFXTag { - /** - * Reference to spotlight data - * - * @private - * @type {(GenericObject)} - * @memberof SystemPanelTag - */ - private _osmenu; - /** - * Placeholder indicates whether the spotlight is currently shown - * - * @private * @type {boolean} - * @memberof SystemPanelTag + * @memberof BaseFileHandle */ - private _view; + dirty: boolean; /** - * Store pending loading task + * Once read, file content will be cached in this placeholder * * @private - * @type {number[]} - * @memberof SystemPanelTag + * @type {*} + * @memberof BaseFileHandle */ - private _pending_task; + private _cache; /** - * Loading animation check timeout + * Flag indicated whether the file meta-data is loaded * - * @memberof SystemPanelTag + * @type {boolean} + * @memberof BaseFileHandle */ - private _loading_toh; + ready: boolean; /** - * Place holder for a private callback function + * File path * - * @private - * @memberof SystemPanelTag + * @type {string} + * @memberof BaseFileHandle */ - private _cb; + path: string; /** - * Place holder for system app list + * File protocol e.g: + * - `os://` + * - `home://` * - * @private - * @type {GenericObject[]} - * @memberof SystemPanelTag + * @type {string} + * @memberof BaseFileHandle */ - private app_list; + protocol: string; /** - *Creates an instance of SystemPanelTag. - * @memberof SystemPanelTag + * List of path segments + * + * @type {string[]} + * @memberof BaseFileHandle */ - constructor(); + genealogy: string[]; /** - * Do nothing + * File base name + * + * @type {string} + * @memberof BaseFileHandle + */ + basename: string; + /** + * Once loaded, [[ready]] will be set to true and + * file meta-data will be stored in this place holder + * + * @type {FileInfoType} + * @memberof BaseFileHandle + */ + info: FileInfoType; + /** + * File extension + * + * @type {string} + * @memberof BaseFileHandle + */ + ext: string; + /** + * + * File type + * @type {string} + * @memberof BaseFileHandle + */ + type: string; + /** + *Creates an instance of BaseFileHandle. + * @param {string} path file path + * @memberof BaseFileHandle + */ + constructor(path: string); + /** + * Set a file path to the current file handle + * + * @param {string} p + * @returns {void} + * @memberof BaseFileHandle + */ + setPath(p: string): void; + /** + * Getter: Get the file basename + * Setter: set the file name + * + * @returns {string} + * @memberof BaseFileHandle + */ + get filename(): string; + set filename(v: string); + /** + * Getter: Get the file cache + * Setter: set the file cache + * + * @returns {any} + * @memberof BaseFileHandle + */ + get cache(): any; + set cache(v: any); + /** + * Set data to the file cache + * + * @param {*} v data object + * @returns {BaseFileHandle} + * @memberof BaseFileHandle + */ + setCache(v: any): BaseFileHandle; + /** + * Return the object itself + * + * @returns {BaseFileHandle} + * @memberof BaseFileHandle + */ + asFileHandle(): BaseFileHandle; + /** + * Check whether the current file is the root of the file tree + * + * @returns {boolean} + * @memberof BaseFileHandle + */ + isRoot(): boolean; + /** + * Check whether the current file is a hidden file + * + * @returns {boolean} + * @memberof BaseFileHandle + */ + isHidden(): boolean; + /** + * Get hash number of the current file path + * + * @returns {number} + * @memberof BaseFileHandle + */ + hash(): number; + /** + * Convert the current file cache to Base64 * * @protected - * @memberof SystemPanelTag + * @param {string} t type of the file cache: + * - `object` + * - `mime type` + * @returns {(Promise)} promise on the converted data + * @memberof BaseFileHandle */ - protected init(): void; + protected b64(t: string): Promise; /** - * Do nothing + * Get the parent file handle of the current file + * + * @returns {BaseFileHandle} + * @memberof BaseFileHandle + */ + parent(): BaseFileHandle; + /** + * Load the file meta-data before performing + * any task + * + * @returns {Promise} a promise on file meta-data + * @memberof BaseFileHandle + */ + onready(): Promise; + /** + * Public read operation + * + * This function calls the [[_rd]] function to perform the operation. + * + * If the current file is a directory, then the operation + * will return the meta-data of all files inside of the directory. + * Otherwise, file content will be returned + * + * @param {string} t data type + * - jsonp: the response is an json object + * - script: the response is a javascript code + * - xml, html: the response is a XML/HTML object + * - text: plain text + * - binary + * + * @returns {Promise} a promise on the file content + * @memberof BaseFileHandle + */ + read(t?: string): Promise; + /** + * Write the file cache to the actual file + * + * This function calls the [[_wr]] function to perform the operation + * + * @param {string} t data type + * - `base64` + * - `object` + * - `mime type` + * + * @returns {Promise} promise on the operation result + * @memberof BaseFileHandle + */ + write(t: string): Promise; + /** + * Sub-directory creation + * + * This function calls the [[_mk]] function to perform the operation + * + * @param {string} d sub directory name + * @returns {Promise} promise on the operation result + * @memberof BaseFileHandle + */ + mk(d: string): Promise; + /** + * Delete the file + * + * This function calls the [[_rm]] function to perform the operation + * + * @returns {Promise} promise on the operation result + * @memberof BaseFileHandle + */ + remove(): Promise; + /** + * Upload a file to the current directory + * + * Only work when the current file is a directory + * + * This function calls the [[_up]] function to perform the operation + * + * @returns {Promise} promise on the operation result + * @memberof BaseFileHandle + */ + upload(): Promise; + /** + * Share the file by publish it. + * + * Only work with file + * + * This function calls the [[_pub]] function to perform the operation + * + * @returns {Promise} promise on operation result + * @memberof BaseFileHandle + */ + publish(): Promise; + /** + * Download the file. + * + * Only work with file + * + * This function calls the [[_down]] function to perform the operation + * + * @returns {Promise} Promise on the operation result + * @memberof BaseFileHandle + */ + download(): Promise; + /** + * Move the current file to another location + * + * This function calls the [[_mv]] function to perform the operation + * + * @param {string} d destination location + * @returns {Promise} promise on the operation result + * @memberof BaseFileHandle + */ + move(d: string): Promise; + /** + * Execute the current file. + * + * This action depends on each file protocol + * + * This function calls the [[_exec]] function to perform the operation + * + * @returns {Promise} + * @memberof BaseFileHandle + */ + execute(): Promise; + /** + * Get an accessible link to the file + * that can be accessed from the browser + * + * @returns {string} + * @memberof BaseFileHandle + */ + getlink(): string; + /** + * Helper function returns a promise on unsupported action + * + * @param {string} t action name + * @returns {Promise} + * @memberof BaseFileHandle + */ + protected unsupported(t: string): Promise; + /** + * trigger cache changed event + * + * This function triggered when the file cached changed * * @protected + * @memberof BaseFileHandle + */ + protected _cache_changed(): void; + /** + * Low level protocol-specific read operation + * + * This function should be overridden on the file handle class + * that supports the operation + * + * @protected + * @param {string} t data type, see [[read]] + * @returns {Promise} + * @memberof BaseFileHandle + */ + protected _rd(t: string): Promise; + /** + * Low level protocol-specific write operation + * + * This function should be overridden by the file handle class + * that supports the operation + * + * @protected + * @param {string} t data type, see [[write]] * @param {*} [d] - * @memberof SystemPanelTag + * @returns {Promise} + * @memberof BaseFileHandle */ - protected reload(d?: any): void; + protected _wr(t: string, d?: any): Promise; /** - * Attach a service to the system tray on the pannel, - * this operation is performed when a service is started + * Low level protocol-specific sub-directory creation * - * @param {BaseService} s - * @returns - * @memberof SystemPanelTag - */ - attachservice(s: application.BaseService): void; - /** - * Launch the selected application from the spotlight - * applications list - * - * @private - * @returns {void} - * @memberof SystemPanelTag - */ - private open; - /** - * Perform spotlight search operation on keyboard event - * - * @private - * @param {JQuery.KeyboardEventBase} e - * @returns {void} - * @memberof SystemPanelTag - */ - private search; - /** - * detach a service from the system tray of the panel. - * This function is called when the corresponding running - * service is killed - * - * @param {BaseService} s - * @memberof SystemPanelTag - */ - detachservice(s: application.BaseService): void; - /** - * Layout definition of the panel + * This function should be overridden by the file handle class + * that supports the operation * * @protected - * @returns {TagLayoutType[]} - * @memberof SystemPanelTag + * @param {string} d sub directory name + * @returns {Promise} + * @memberof BaseFileHandle */ - protected layout(): TagLayoutType[]; + protected _mk(d: string): Promise; /** - * Refresh applications list on the spotlight widget - * from system packages meta-data + * Low level protocol-specific delete operation * - * @private - * @memberof SystemPanelTag - */ - private refreshAppList; - /** - * Show/hide the spotlight + * This function should be overridden by the file handle class + * that supports the operation * - * @private - * @param {boolean} flag - * @memberof SystemPanelTag + * @returns {Promise} + * @memberof BaseFileHandle */ - private toggle; + protected _rm(): Promise; /** - * Calibrate the spotlight widget + * Low level protocol-specific move operation * - * @memberof SystemPanelTag - */ - calibrate(): void; - /** - * Refresh the pinned applications menu - * - * @private - * @memberof SystemPanelTag - */ - private RefreshPinnedApp; - /** - * Check if the loading tasks ended, - * if it the case, stop the animation - * - * @private - * @memberof SystemPanelTag - */ - private animation_check; - /** - * Mount the tag bind some basic event + * This function should be overridden by the file handle class + * that supports the operation * * @protected - * @memberof SystemPanelTag + * @param {string} d + * @returns {Promise} + * @memberof BaseFileHandle */ - protected mount(): void; + protected _mv(d: string): Promise; + /** + * Low level protocol-specific upload operation + * + * This function should be overridden by the file handle class + * that supports the operation + * + * @returns {Promise} + * @memberof BaseFileHandle + */ + protected _up(): Promise; + /** + * Low level protocol-specific download operation + * + * This function should be overridden by the file handle class + * that supports the operation + * + * @returns {Promise} + * @memberof BaseFileHandle + */ + protected _down(): Promise; + /** + * Low level protocol-specific execute operation + * + * This function should be overridden by the file handle class + * that supports the operation + * + * @returns {Promise} + * @memberof BaseFileHandle + */ + protected _exec(): Promise; + /** + * Low level protocol-specific share operation + * + * This function should be overridden by the file handle class + * that supports the operation + * + * @returns {Promise} + * @memberof BaseFileHandle + */ + protected _pub(): Promise; + /** + * Read the current file meta-data + * + * should be implemented by subclasses + * + * @abstract + * @returns {Promise} + * @memberof BaseFileHandle + */ + abstract meta(): Promise; } + /** + * Remote file handle allows to perform file operation + * on AntOS remote server files. Its protocol is defined + * by the following pattern: + * + * ``` + * ^(home|desktop|os|Untitled)$ + * ``` + * + * @class RemoteFileHandle + * @extends {BaseFileHandle} + */ + class RemoteFileHandle extends BaseFileHandle { + /** + *Creates an instance of RemoteFileHandle. + * @param {string} path file path + * @memberof RemoteFileHandle + */ + constructor(path: string); + /** + * Read remote file meta-data + * + * @returns {Promise} + * @memberof RemoteFileHandle + */ + meta(): Promise; + /** + * Remote file access link + * + * @returns {string} + * @memberof RemoteFileHandle + */ + getlink(): string; + /** + * Read remote file content. + * + * If the current file is a directory, then the operation + * will return the meta-data of all files inside of the directory. + * Otherwise, file content will be returned + * + * @protected + * @param {string} t data type see [[read]] + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _rd(t: string): Promise; + /** + * Write file cache to the remote file + * + * @protected + * @param {string} t data type see [[write]] + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _wr(t: string): Promise; + /** + * Create sub directory + * + * Only work on directory file handle + * + * @protected + * @param {string} d sub directory name + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _mk(d: string): Promise; + /** + * Delete file/folder + * + * @protected + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _rm(): Promise; + /** + * Move file/folder + * + * @protected + * @param {string} d + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _mv(d: string): Promise; + /** + * Upload a file + * + * Only work with directory file handle + * + * @protected + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _up(): Promise; + /** + * Download a file + * + * only work with file + * + * @protected + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _down(): Promise; + /** + * Publish a file + * + * @protected + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _pub(): Promise; + } + /** + * Package file is remote file ([[RemoteFileHandle]]) located either in + * the local user packages location or system packages + * location, it should be in the following format: + * + * ``` + * pkg://PKG_NAME/path/to/file + * + * ``` + * + * The system will locale the package name PKG_NAME either in the system domain + * or in user domain and return the correct path to the package + * + * @export + * @class PackageFileHandle + * @extends {RemoteFileHandle} + */ + class PackageFileHandle extends RemoteFileHandle { + /** + *Creates an instance of PackageFileHandle. + * @param {string} pkg_path package path in string + * @memberof PackageFileHandle + */ + constructor(pkg_path: string); + } + /** + * Application file is an AntOS special file allowing to + * refer to an application as a regular file. Its protocol + * pattern is defined as: + * + * ```typescript + * "^app$" // e.g. app://Setting + * ``` + * + * @class ApplicationHandle + * @extends {BaseFileHandle} + */ + class ApplicationHandle extends BaseFileHandle { + /** + *Creates an instance of ApplicationHandle. + * @param {string} path file path + * @memberof ApplicationHandle + */ + constructor(path: string); + /** + * Read application meta-data + * + * @returns {Promise} + * @memberof ApplicationHandle + */ + meta(): Promise; + /** + * If the current file is root (e.g. `app://`), the operation + * will return all system packages meta-data. + * + * Otherwise, an error will be thrown + * + * @protected + * @param {string} t + * @returns {Promise} + * @memberof ApplicationHandle + */ + protected _rd(t: string): Promise; + } + /** + * A buffer file handle represents a virtual file that is stored + * on the system memory. Its protocol pattern is defined as: + * + * ```typescript + * "^mem$" // e.g. mem://test.txt + * ``` + * + * @class BufferFileHandle + * @extends {BaseFileHandle} + */ + class BufferFileHandle extends BaseFileHandle { + /** + *Creates an instance of BufferFileHandle. + * @param {string} path file path + * @param {string} mime file mime-type + * @param {*} data file data + * @memberof BufferFileHandle + */ + constructor(path: string, mime: string, data: any); + /** + * init the mem file tree if necessary + */ + private init_file_tree; + /** + * cache changed handle + */ + protected _cache_changed(): void; + /** + * Read the file meta-data + * + * @returns {Promise} + * @memberof BufferFileHandle + */ + meta(): Promise; + /** + * Load the file meta-data before performing + * any task + * + * @returns {Promise} a promise on file meta-data + * @memberof BufferFileHandle + */ + onready(): Promise; + /** + * Read file content stored in the file cached + * + * @protected + * @param {string} t data type see [[read]] + * @returns {Promise} + * @memberof BufferFileHandle + */ + protected _rd(t: string): Promise; + /** + * Write data to the file cache + * + * @protected + * @param {string} t data type, see [[write]] + * @returns {Promise} + * @memberof BufferFileHandle + */ + protected _wr(t: string): Promise; + /** + * Create sub directory + * + * Only work on directory file handle + * + * @protected + * @param {string} d sub directory name + * @returns {Promise} + * @memberof BufferFileHandle + */ + protected _mk(d: string): Promise; + /** + * Delete file/folder + * + * @protected + * @returns {Promise} + * @memberof BufferFileHandle + */ + protected _rm(): Promise; + setPath(p: string): void; + private updatePath; + /** + * Move file/folder + * + * @protected + * @param {string} d + * @returns {Promise} + * @memberof BufferFileHandle + */ + protected _mv(d: string): Promise; + /** + * Download the buffer file + * + * @protected + * @returns {Promise} + * @memberof BufferFileHandle + */ + protected _down(): Promise; + } + /** + * URL file handle represents a HTTP/HTTPs link url + * as an AntOS VFS file handle. Its protocol is defined as + * + * ``` + * ^(http|https|ftp)$ + * ``` + * + * @class URLFileHandle + * @extends {BaseFileHandle} + */ + class URLFileHandle extends BaseFileHandle { + /** + *Creates an instance of URLFileHandle. + * @param {string} path + * @memberof URLFileHandle + */ + constructor(path: string); + /** + * Read file meta-data + * + * @returns {Promise} + * @memberof URLFileHandle + */ + meta(): Promise; + /** + * Read URL content + * + * @protected + * @param {string} t data type see [[read]] + * @returns {Promise} + * @memberof URLFileHandle + */ + protected _rd(t: string): Promise; + } + /** + * Shared file handle represents all AntOS shared file. + * Its protocol is defined as: + * + * ``` + * ^shared$ + * ``` + * + * @class SharedFileHandle + * @extends {API.VFS.BaseFileHandle} + */ + class SharedFileHandle extends API.VFS.BaseFileHandle { + /** + *Creates an instance of SharedFileHandle. + * @param {string} path file path + * @memberof SharedFileHandle + */ + constructor(path: string); + /** + * Read file meta-data + * + * @returns {Promise} + * @memberof SharedFileHandle + */ + meta(): Promise; + /** + * Read file content + * + * @protected + * @param {string} t data type, see [[read]] + * @returns {Promise} + * @memberof SharedFileHandle + */ + protected _rd(t: string): Promise; + /** + * write data to shared file + * + * @protected + * @param {string} t data type, see [[write]] + * @param {string} d file data + * @returns {Promise} + * @memberof SharedFileHandle + */ + protected _wr(t: string, d: string): Promise; + /** + * Un-publish the file + * + * @protected + * @returns {Promise} + * @memberof SharedFileHandle + */ + protected _rm(): Promise; + /** + * Download shared file + * + * @protected + * @returns {Promise} + * @memberof SharedFileHandle + */ + protected _down(): Promise; + /** + * Un publish the file + * + * @protected + * @returns {Promise} + * @memberof SharedFileHandle + */ + protected _pub(): Promise; + } + /**Utilities global functions */ + /** + * Read a file content from a zip archive + * + * The content type should be: + * - base64 : the result will be a string, the binary in a base64 form. + * - text (or string): the result will be an unicode string. + * - binarystring: the result will be a string in “binary” form, using 1 byte per char (2 bytes). + * - array: the result will be an Array of bytes (numbers between 0 and 255). + * - uint8array : the result will be a Uint8Array. This requires a compatible browser. + * - arraybuffer : the result will be a ArrayBuffer. This requires a compatible browser. + * - blob : the result will be a Blob. This requires a compatible browser. * + * If file_name is not specified, the first file_name in the zip archive will be read + * @export + * @param {string} file zip file + * @param {string} type content type to read + * @param {string} [file_name] the file should be read from the zip archive + * @return {*} {Promise} + */ + function readFileFromZip(file: string, type: string, file_name?: string): Promise; + /** + * Cat all files to a single out-put + * + * @export + * @param {string[]} list list of VFS files + * @param {string} data input data string that will be cat to the files content + * @param {string} join_by join on files content by this string + * @return {*} {Promise} + */ + function cat(list: string[], data: string, join_by?: string): Promise; + /** + * Read all files content on the list + * + * @export + * @param {string[]} list list of VFS files + * @param {GenericObject[]} contents content array + * @return {void} + */ + function read_files(list: string[]): Promise[]>; + /** + * Copy files to a folder + * + * @export + * @param {string[]} files list of files + * @param {string} to destination folder + * @return {*} {Promise} + */ + function copy(files: string[], to: string): Promise; + /** + * Create a zip archive from a folder + * + * @export + * @param {string} src source file/folder + * @param {string} dest destination archive + * @return {*} {Promise} + */ + function mkar(src: string, dest: string): Promise; + /** + * Create a list of directories + * + * @export + * @param {string[]} list of directories to be created + * @param {boolen} sync sync/async of directory creation + * @return {*} {Promise} + */ + function mkdirAll(list: string[], sync?: boolean): Promise; + /** + * + * + * @export Extract a zip fle + * @param {string} zfile zip file to extract + * @param {(zip:any) => Promise} [dest_callback] a callback to get extraction destination + * @return {*} {Promise} + */ + function extractZip(zfile: string | API.VFS.BaseFileHandle, dest_callback: (zip: any) => Promise): Promise; + /** + * Make files from a set of template files + * + * @export + * @param {Array} list mapping paths between templates files and created files + * @param {string} path files destination + * @param {(data: string) => string} callback: pre-processing files content before writing to destination files + * @return {*} {Promise} + */ + function mktpl(list: Array, path: string, callback: (data: string) => string): Promise; } } } declare namespace OS { - namespace GUI { + /** + * This namespace is dedicated to everything related to the + * global system settings + */ + namespace setting { /** - * Tab container data type definition + * User setting type definition * * @export - * @interface TabContainerTabType + * @interface UserSettingType */ - interface TabContainerTabType { + interface UserSettingType { /** - * Reference to the DOM element of the current container + * User full name * - * @type {HTMLElement} - * @memberof TabContainerTabType + * @type {string} + * @memberof UserSettingType */ - container: HTMLElement; + name: string; + /** + * User name + * + * @type {string} + * @memberof UserSettingType + */ + username: string; + /** + * User id + * + * @type {number} + * @memberof UserSettingType + */ + id: number; + /** + * User groups + * + * @type {{ [index: number]: string }} + * @memberof UserSettingType + */ + group?: { + [index: number]: string; + }; [propName: string]: any; } - namespace tag { + /** + * Virtual desktop setting data type + * + * @export + * @interface DesktopSettingType + */ + interface DesktopSettingType { /** - * A tab container allows to attach each tab on a [[TabBarTag]] - * with a container widget. The attached container widget should be - * composed inside a [[HBoxTag]] + * Desktop VFS path * - * The tab bar in a tab container can be configured to display tabs - * in horizontal (row) or vertical (column) order. Default to vertical order - * - * Once a tab is selected, its attached container will be shown - * - * @export - * @class TabContainerTag - * @extends {AFXTag} + * @type {string} + * @memberof DesktopSettingType */ - class TabContainerTag extends AFXTag { + path: string; + /** + * Desktop menu, can be added automatically by applications + * + * @type {GUI.BasicItemType[]} + * @memberof DesktopSettingType + */ + menu: GUI.BasicItemType[]; + /** + * Show desktop hidden files + * + * @type {boolean} + * @memberof DesktopSettingType + */ + showhidden: boolean; + [propName: string]: any; + } + /** + * Wallpaper setting data type + * + * @export + * @interface WPSettingType + */ + interface WPSettingType { + /** + * Repeat wallpaper: + * - `repeat` + * - `repeat-x` + * - `repeat-y` + * - `no-repeat` + * + * @type {string} + * @memberof WPSettingType + */ + repeat: string; + /** + * Wallpaper size + * - `contain` + * - `cover` + * - `auto` + * + * @type {string} + * @memberof WPSettingType + */ + size: string; + /** + * VFS path to the wallpaper image + * + * @type {string} + * @memberof WPSettingType + */ + url: string; + } + /** + * Theme setting data type + * + * @export + * @interface ThemeSettingType + */ + interface ThemeSettingType { + /** + * Theme name, this value is used for looking + * theme file in system asset + * + * @type {string} + * @memberof ThemeSettingType + */ + name: string; + /** + * Theme user-friendly text + * + * @type {string} + * @memberof ThemeSettingType + */ + text: string; + } + /** + * Appearance setting data type + * + * @export + * @interface AppearanceSettingType + */ + interface AppearanceSettingType { + /** + * Current theme name + * + * @type {string} + * @memberof AppearanceSettingType + */ + theme: string; + /** + * All themes available in the system + * + * @type {ThemeSettingType[]} + * @memberof AppearanceSettingType + */ + themes: ThemeSettingType[]; + /** + * Current wallpaper setting + * + * @type {WPSettingType} + * @memberof AppearanceSettingType + */ + wp: WPSettingType; + /** + * All wallpapers available in the system + * + * @type {string[]} + * @memberof AppearanceSettingType + */ + wps: string[]; + } + /** + * VFS Mount points setting data type + * + * @export + * @interface VFSMountPointSettingType + */ + interface VFSMountPointSettingType { + /** + * Path to the mount point + * + * @type {string} + * @memberof VFSMountPointSettingType + */ + path: string; + /** + * User friendly mount point name + * + * @type {string} + * @memberof VFSMountPointSettingType + */ + text: string; + [propName: string]: any; + } + /** + * VFS setting data type + * + * @export + * @interface VFSSettingType + */ + interface VFSSettingType { + /** + * mount points setting + * + * @type {VFSMountPointSettingType[]} + * @memberof VFSSettingType + */ + mountpoints: VFSMountPointSettingType[]; + [propName: string]: any; + } + /** + * Global system setting data type + * + * @export + * @interface SystemSettingType + */ + interface SystemSettingType { + /** + * System error report URL + * + * @type {string} + * @memberof SystemSettingType + */ + error_report: string; + /** + * Current system locale e.g. `en_GB` + * + * @type {string} + * @memberof SystemSettingType + */ + locale: string; + /** + * System menus + * + * @type {API.PackageMetaType[]} + * @memberof API.PackageMetaType + */ + menu: API.PackageMetaType[]; + /** + * Packages meta-data + * + * @type {{ [index: string]: API.PackageMetaType }} + * @memberof SystemSettingType + */ + packages: { + [index: string]: API.PackageMetaType; + }; + /** + * Path to the installed packages + * + * @type {{ + * user: string; + * system: string; + * }} + * @memberof SystemSettingType + */ + pkgpaths: { /** - * Reference to the currently selected tab DOM element + * User specific packages install location * - * @private - * @type {TabContainerTabType} - * @memberof TabContainerTag + * @type {string} */ - private _selectedTab; + user: string; /** - * Placeholder of the tab select event handle + * System packages install location * - * @private - * @type {TagEventCallback} - * @memberof TabContainerTag + * @type {string} */ - private _ontabselect; + system: string; + }; + /** + * Package repositories setting. + * This configuration is used by [[MarketPlace]] + * for package management + * + * @type {{ + * text: string; + * url: string; + * }[]} + * @memberof SystemSettingType + */ + repositories: { /** - *Creates an instance of TabContainerTag. - * @memberof TabContainerTag + * Repository name + * + * @type {string} */ - constructor(); + text: string; /** - * Init the tab bar direction to vertical (column) + * Repository uri * - * @protected - * @memberof TabContainerTag + * @type {string} */ - protected init(): void; + url: string; + }[]; + /** + * Startup applications and services + * + * @type {{ + * apps: string[]; + * services: string[]; + * }} + * @memberof SystemSettingType + */ + startup: { /** - * Do nothing + * List of application names * - * @protected - * @param {*} [d] - * @memberof TabContainerTag + * @type {string[]} */ - protected reload(d?: any): void; + apps: string[]; /** - * Set the tab select event handle + * List of service names * - * @memberof TabContainerTag + * @type {string[]} */ - set ontabselect(f: TagEventCallback); + services: string[]; /** - * Get all tab items in the container + * List of pinned applications * - * @readonly - * @type {TabContainerTabType[]} - * @memberof TabContainerTag + * @type {string[]} */ - get tabs(): TabContainerTabType[]; - /** - * Select a tab by its index - * - * @memberof TabContainerTag - */ - set selectedIndex(i: number); - /** - * Setter: - * - * Set the tab bar direction: - * - `row`: horizontal direction - * - `column`: vertical direction - * - * Getter: - * - * Get the tab bar direction - * - * @memberof TabContainerTag - */ - set dir(v: "row" | "column"); - get dir(): "row" | "column"; - /** - * Setter: - * - * Select a tab using the its tab data type. - * This will show the attached container to the tab - * - * Getter: - * - * Get the tab data of the currently selected Tab - * - * @memberof TabContainerTag - */ - set selectedTab(v: TabContainerTabType); - get selectedTab(): TabContainerTabType; - /** - * Set the tab bar width, this function only - * works when the tab bar direction is set to - * `row` - * - * @memberof TabContainerTag - */ - set tabbarwidth(v: number); - /** - * Set the tab bar height, this function only works - * when the tab bar direction is set to `column` - * - * @memberof TabContainerTag - */ - set tabbarheight(v: number); - /** - * Add a new tab with container to the container - * - * item should be in the following format: - * - * ```ts - * { - * text: string, - * icon?: string, - * iconclass?: string, - * container: HTMLElement - * } - * ``` - * - * @param {GenericObject} item tab descriptor - * @param {boolean} insert insert the tab content to the container ? - * @returns {ListViewItemTag} the tab DOM element - * @memberof TabContainerTag - */ - addTab(item: GenericObject, insert: boolean): ListViewItemTag; - /** - * Remove a tab from the container - * - * @param {ListViewItemTag} tab the tab item to be removed - * @memberof TabContainerTag - */ - removeTab(tab: ListViewItemTag): void; - /** - * Mount the tag and bind basic events - * - * @protected - * @memberof TabContainerTag - */ - protected mount(): void; - /** - * calibrate the tab container - * - * @memberof TabContainerTag - */ - calibrate(): void; - /** - * Layout definition - * - * @protected - * @returns {TagLayoutType[]} - * @memberof TabContainerTag - */ - protected layout(): TagLayoutType[]; - } + pinned: string[]; + }; + } + /** + * User settings + */ + var user: UserSettingType; + /** + * Application settings + */ + var applications: GenericObject; + /** + * Desktop settings + */ + var desktop: DesktopSettingType; + /** + * Appearance settings + */ + var appearance: AppearanceSettingType; + /** + * VFS settings + */ + var VFS: VFSSettingType; + /** + * System settings + */ + var system: SystemSettingType; + } + /** + * Reset the system settings to default values + * + * @export + */ + function resetSetting(): void; + /** + * Apply the input parameter object to system settings. + * This object could be an object loaded from + * setting JSON file saved on the server. + * + * @export + * @param {*} conf + */ + function systemSetting(conf: any): void; +} +/// +declare namespace OS { + namespace application { + /** + * Services are processes that run in the background and + * are waken up in certain circumstances such as by global + * events or user interactions. + * + * Each service takes an entry in the system tray menu + * located on the system panel. This menu entry is used + * to access to service visual contents such as: options, + * task performing based on user interaction, etc. + * + * Services are singleton processes, there is only + * one process of a service at a time + * + * @export + * @abstract + * @class BaseService + * @extends {BaseModel} + */ + abstract class BaseService extends BaseModel { + /** + * The service icon shown in the system tray + * + * @type {string} + * @memberof BaseService + */ + icon: string; + /** + * CSS class of the service icon shown in the system tray + * + * @type {string} + * @memberof BaseService + */ + iconclass: string; + /** + * Text of the service shown in the system tray + * + * @type {string} + * @memberof BaseService + */ + text: string; + /** + * Reference to the menu entry DOM element attached + * to the service + * + * @type {HTMLElement} + * @memberof BaseService + */ + domel: HTMLElement; + /** + * Reference to the timer that periodically executes the callback + * defined in [[watch]]. + * + * @private + * @type {number} + * @memberof BaseService + */ + private timer; + /** + * Reference to the system tray menu + * + * @type {HTMLElement} + * @memberof BaseService + */ + holder: HTMLElement; + /** + * Placeholder for service select callback + * + * @memberof BaseService + */ + onmenuselect: (d: OS.GUI.TagEventType) => void; + /** + *Creates an instance of BaseService. + * @param {string} name service class name + * @param {AppArgumentsType[]} args service arguments + * @memberof BaseService + */ + constructor(name: string, args: AppArgumentsType[]); + /** + * Do nothing + * + * @memberof BaseService + */ + hide(): void; + /** + * Init the service before attaching it to + * the system tray: event subscribe, scheme + * loading. + * + * Should be implemented by all subclasses + * + * @abstract + * @memberof BaseService + */ + abstract init(): void; + /** + * Refresh the service menu entry in the + * system tray + * + * @memberof BaseService + */ + update(): void; + /** + * Get the service meta-data + * + * @returns {API.PackageMetaType} + * @memberof BaseService + */ + meta(): API.PackageMetaType; + /** + * Attach the service to a menu element + * such as the system tray menu + * + * @param {HTMLElement} h + * @memberof BaseService + */ + attach(h: HTMLElement): void; + /** + * Set the callback that will be called periodically + * after a period of time. + * + * Each service should only have at most one watcher + * + * @protected + * @param {number} t period time in seconds + * @param {() => void} f callback function + * @returns {number} + * @memberof BaseService + */ + protected watch(t: number, f: () => void): number; + /** + * This function is called when the service + * is exited + * + * @protected + * @param {BaseEvent} evt exit event + * @returns + * @memberof BaseService + */ + protected onexit(evt: BaseEvent): JQuery; + /** + * Do nothing + * + * @memberof BaseService + */ + main(): void; + /** + * Do nothing + * + * @memberof BaseService + */ + show(): void; + /** + * Awake the service, this function is usually called when + * the system tray menu entry attached to the service is + * selected. + * + * This function should be implemented by all subclasses + * + * @abstract + * @param {GUI.TagEventType} e + * @memberof BaseService + */ + abstract awake(e: GUI.TagEventType): void; + /** + * Do nothing + * + * @protected + * @param {BaseEvent} evt + * @memberof BaseService + */ + protected cleanup(evt: BaseEvent): void; } } } declare namespace OS { - namespace GUI { - namespace tag { + namespace API { + /** + * Data type exchanged via + * the global Announcement interface + * + * @export + * @interface AnnouncementDataType + */ + interface AnnouncementDataType { /** - * Definition of system file view widget + * message string * - * @export - * @class FileViewTag - * @extends {AFXTag} + * @type {string| FormattedString} + * @memberof AppAnnouncementDataType */ - class FileViewTag extends AFXTag { + message: string | FormattedString; + /** + * Process ID + * + * @type {number} + * @memberof AppAnnouncementDataType + */ + id: number; + /** + * App name + * + * @type {string | FormattedString} + * @memberof AppAnnouncementDataType + */ + name: string | FormattedString; + /** + * Icon file + * + * @type {string} + * @memberof AppAnnouncementDataType + */ + icon?: string; + /** + * App icon class + * + * @type {string} + * @memberof AppAnnouncementDataType + */ + iconclass?: string; + /** + * User specific data + * + * @type {*} + * @memberof AppAnnouncementDataType + */ + u_data?: T; + } + /** + * Observable entry type definition + * + * @export + * @interface ObservableEntryType + */ + interface ObservableEntryType { + /** + * A Set of callbacks that should be called only once. + * These callbacks will be removed after the first + * occurrence of the corresponding event + * + * @memberof ObservableEntryType + */ + one: Set<(d: any) => void>; + /** + * A Set of callbacks that should be called + * every time the corresponding event is triggered + * + * @memberof ObservableEntryType + */ + many: Set<(d: any) => void>; + } + /** + * Announcement listener type definition + * + * @export + * @interface AnnouncerListenerType + */ + interface AnnouncerListenerType { + [index: number]: { /** - * placeholder for file select event callback + * The event name * - * @private - * @type {TagEventCallback} - * @memberof FileViewTag - */ - private _onfileselect; - /** - * placeholder for file open event callback - * - * @private - * @type {TagEventCallback} - * @memberof FileViewTag - */ - private _onfileopen; - /** - * Reference to the currently selected file meta-data - * - * @private - * @type {API.FileInfoType} - * @memberof FileViewTag - */ - private _selectedFile; - /** - * Data placeholder of the current working directory - * - * @private - * @type {API.FileInfoType[]} - * @memberof FileViewTag - */ - private _data; - /** - * The path of the current working directory - * - * @private * @type {string} - * @memberof FileViewTag */ - private _path; + e: string; /** - * Header definition of the widget grid view + * The event callback * - * @private - * @type {(GenericObject[])} - * @memberof FileViewTag */ - private _header; - /** - * placeholder for the user-specified meta-data fetch function - * - * @private - * @memberof FileViewTag - */ - private _fetch; - /** - *Creates an instance of FileViewTag. - * @memberof FileViewTag - */ - constructor(); - /** - * Init the widget before mounting - * - * @protected - * @memberof FileViewTag - */ - protected init(): void; - /** - * Update the current widget, do nothing - * - * @protected - * @param {*} [d] - * @memberof FileViewTag - */ - protected reload(d?: any): void; - /** - * set the function that allows to fetch file entries. - * This handle function should return a promise on - * an arry of [[API.FileInfoType]] - * - * @memberof FileViewTag - */ - set fetch(v: (p: string) => Promise); - /** - * set the callback handle for the file select event. - * The parameter of the callback should be an object - * of type [[TagEventType]] with the data type `T` is [[API.FileInfoType]] - * - * @memberof FileViewTag - */ - set onfileselect(e: TagEventCallback); - /** - set the callback handle for the file open event. - * The parameter of the callback should be an object - * of type [[TagEventType]] with the data type `T` is [[API.FileInfoType]] - * - * @memberof FileViewTag - */ - set onfileopen(e: TagEventCallback); - /** - * Setter: - * - * chang the view of the widget, there are three different views - * - `icon` - * - `list` - * - `tree` - * - * Getter: - * - * Get the current view setting of the widget - * - * @memberof FileViewTag - */ - set view(v: string); - get view(): string; - /** - * Setter: - * - * Turn on/off the changing current working directory feature - * of the widget when a directory is double clicked. If enabled, - * the widget will use the configured [[fetch]] function to query - * the content of the selected directory - * - * Getter: - * - * check whether changing current working directory feature - * is enabled - * - * @memberof FileViewTag - */ - set chdir(v: boolean); - get chdir(): boolean; - /** - * Setter : Enable or disable the status bar of the widget - * - * Getter: Check whether the status bar is enabled - * - * @memberof FileViewTag - */ - set status(v: boolean); - get status(): boolean; - /** - * Setter: - * - * Allow the widget to show or hide hidden file - * - * Getter: - * - * Check whether the hidden file should be shown in - * the widget - * - * @memberof FileViewTag - */ - set showhidden(v: boolean); - get showhidden(): boolean; - /** - * Get the current selected file - * - * @readonly - * @type {API.FileInfoType} - * @memberof FileViewTag - */ - get selectedFile(): API.FileInfoType; - /** - * Setter: - * - * Set the path of the current working directory. - * When called the widget will refresh the current - * working directory using the configured [[fetch]] - * function - * - * Getter: - * - * Get the path of the current working directory - * - * @memberof FileViewTag - */ - set path(v: string); - get path(): string; - /** - * Setter: Set the data of the current working directory - * - * Getter: Get the data of the current working directory - * - * @memberof FileViewTag - */ - set data(v: API.FileInfoType[]); - get data(): API.FileInfoType[]; - /** - * Set the file drag and drop event handle. This allows application - * to define custom behavior of the event - * - * @memberof FileViewTag - */ - set ondragndrop(v: TagEventCallback>); - /** - * Sort file by its type - * - * @private - * @param {API.FileInfoType} a - * @param {API.FileInfoType} b - * @return {*} {number} - * @memberof FileViewTag - */ - private sortByType; - /** - * sort file by its name - * - * @private - * @param {API.FileInfoType} a first file meta-data - * @param {API.FileInfoType} b second file meta-data - * @returns {number} - * @memberof FileViewTag - */ - private sortByName; - /** - * calibrate the widget layout - * - * @memberof FileViewTag - */ - calibrate(): void; - /** - * Refresh the list view of the widget. This function - * is called when the view of the widget changed to `icon` - * - * @private - * @memberof FileViewTag - */ - private refreshList; - /** - * Refresh the grid view of the widget, this function is called - * when the view of the widget set to `list` - * - * @private - * @memberof FileViewTag - */ - private refreshGrid; - /** - * Refresh the Treeview of the widget, this function is called - * when the view of the widget set to `tree` - * - * @private - * @memberof FileViewTag - */ - private refreshTree; - /** - * Create the tree data from the list of input - * file meta-data - * - * @private - * @param {API.FileInfoType[]} data list of file meta-data - * @returns {TreeViewDataType[]} - * @memberof FileViewTag - */ - private getTreeData; - /** - * Refresh data of the current widget view - * - * @private - * @returns {void} - * @memberof FileViewTag - */ - private refreshData; - /** - * Switch between three view options - * - * @private - * @memberof FileViewTag - */ - private switchView; - /** - * This function triggers the file select event - * - * @private - * @param {API.FileInfoType} e selected file meta-data - * @memberof FileViewTag - */ - private fileselect; - /** - * This function triggers the file open event - * - * @private - * @param {API.FileInfoType} e selected file meta-data - * @memberof FileViewTag - */ - private filedbclick; - /** - * Mount the widget in the DOM tree - * - * @protected - * @memberof FileViewTag - */ - protected mount(): void; - /** - * Layout definition of the widget - * - * @protected - * @returns {TagLayoutType[]} - * @memberof FileViewTag - */ - protected layout(): TagLayoutType[]; - } + f: (d: any) => void; + }[]; + } + /** + * This class is the based class used in AntOS event + * announcement system. + * It implements the observer pattern using simple + * subscribe/publish mechanism + * @export + * @class Announcer + */ + class Announcer { + /** + * The observable object that stores event name + * and its corresponding callback in [[ObservableEntryType]] + * + * @type {GenericObject} + * @memberof Announcer + */ + observable: GenericObject; + /** + * Enable/disable the announcer + * + * @type {boolean} + * @memberof Announcer + */ + enable: boolean; + /** + *Creates an instance of Announcer. + * @memberof Announcer + */ + constructor(); + /** + * Disable the announcer, when this function is called + * all events and their callbacks will be removed + * + * @returns + * @memberof Announcer + */ + disable(): boolean; + /** + * Subscribe to an event, the callback will be called + * every time the corresponding event is trigged + * + * @param {string} evtName event name + * @param {(d: any) => void} callback The corresponding callback + * @returns {void} + * @memberof Announcer + */ + on(evtName: string, callback: (d: any) => void): void; + /** + * Subscribe to an event, the callback will + * be called only once and then removed from the announcer + * + * @param {string} evtName event name + * @param {(d: any) => void} callback the corresponding callback + * @returns {void} + * @memberof Announcer + */ + one(evtName: string, callback: (d: any) => void): void; + /** + * Unsubscribe the callback from an event + * + * @param {string} evtName event name + * @param {(d: any) => void} [callback] the callback to be unsubscribed. + * When the `callback` is `*`, all callbacks related to `evtName` will be + * removed + * @memberof Announcer + */ + off(evtName: string, callback?: (d: any) => void): void; + /** + * Trigger an event + * + * @param {string} evtName event name + * @param {*} data data object that will be send to all related callback + * @returns {void} + * @memberof Announcer + */ + trigger(evtName: string, data: any): void; + } + } + /** + * This namespace defines every thing related to the system announcement. + * + * The system announcement provides a global way to communicate between + * processes (applications/services) using the subscribe/publish + * mechanism + */ + namespace announcer { + /** + * The global announcer object that manages global events + * and callbacks + */ + var observable: API.Announcer; + /** + * This variable is used to allocate the `id` of all messages + * passing between publishers and subscribers in the + * system announcement + */ + var quota: 0; + /** + * Placeholder of all global events listeners + */ + var listeners: API.AnnouncerListenerType; + /** + * Subscribe to a global event + * + * @export + * @param {string} e event name + * @param {(d: API.AnnouncementDataType) => void} f event callback + * @param {GUI.BaseModel} a the process (Application/service) related to the callback + */ + function on(e: string, f: (d: API.AnnouncementDataType) => void, a: BaseModel): void; + /** + * Trigger a global event + * + * @export + * @param {string} e event name + * @param {*} d data passing to all related callback + */ + function trigger(e: string, d: any): void; + /** + * Report system fail. This will trigger the global `fail` + * event + * + * @export + * @param {(string | FormattedString)} m message string + * @param {Error} e error to be reported + */ + function osfail(m: string | FormattedString, e: Error): void; + /** + * Report system error. This will trigger the global `error` + * event + * + * @export + * @param {(string | FormattedString)} m message string + * @param {Error} e error to be reported + */ + function oserror(m: string | FormattedString, e: Error): void; + /** + * Trigger system notification (`info` event) + * + * @export + * @param {(string | FormattedString)} m notification message + */ + function osinfo(m: string | FormattedString): void; + /** + * + * + * @export + * @param {string} e event name + * @param {(string| FormattedString)} m event message + * @param {*} [d] user data + */ + function ostrigger(e: string, m: string | FormattedString, d?: any): void; + /** + * Unregister a process (application/service) from + * the global announcement system + * + * @export + * @param {GUI.BaseModel} app reference to the process + * @returns {void} + */ + function unregister(app: BaseModel): void; + /** + * Allocate message id + * + * @export + * @returns {number} + */ + function getMID(): number; + } +} +declare namespace OS { + namespace API { + /** + * Simple Virtual Database (VDB) application API. + * + * This API abstracts and provides a standard way to + * connect to a server-side relational database (e.g. sqlite). + * + * Each user when connected has their own database previously + * created. All VDB operations related to that user will be + * performed on this database. + * + * The creation of user database need to be managed by the server-side API. + * The VDB API assumes that the database already exist. All operations + * is performed in tables level + * + * @export + * @class DB + */ + class DB { + /** + * A table name on the user's database + * + * @private + * @type {string} + * @memberof DB + */ + private table; + /** + *Creates an instance of DB. + * @param {string} table table name + * @memberof DB + */ + constructor(table: string); + /** + * Save data to the current table. The input + * data must conform to the table record format. + * + * On the server side, if the table doest not + * exist yet, it should be created automatically + * by inferring the data structure of the input + * object + * + * @param {GenericObject} d data object represents a current table record + * @returns {Promise} + * @memberof DB + */ + save(d: GenericObject): Promise; + /** + * delete record(s) from the current table by + * a conditional object + * + * @param {*} c conditional object, c can be: + * + * * a `number`: the operation will delete the record with `id = c` + * * a `string`: The SQL string condition that selects record to delete + * * a conditional object represents a SQL condition statement as an object, + * example: `pid = 10 AND cid = 2` is represented by: + * + * ```typescript + * { + * exp: { + * "and": { + * pid: 10, + * cid: 2 + * } + * } + * ``` + * + * @returns {Promise} + * @memberof DB + */ + delete(c: GenericObject | number | string): Promise; + /** + * Get a record in the table by its primary key + * + * @param {number} id the primary key value + * @returns {Promise>} Promise on returned record data + * @memberof DB + */ + get(id: number): Promise>; + /** + * Find records by a condition + * + * @param {GenericObject} cond conditional object + * + * a conditional object represents a SQL condition statement as an object, + * example: `pid = 10 AND cid = 2 ORDER BY date DESC` is represented by: + * + * ```typescript + * { + * exp: { + * "and": { + * pid: 10, + * cid: 2 + * } + * }, + * order: { + * date: "DESC" + * } + * } + * ``` + * @returns {Promise[]>} + * @memberof DB + */ + find(cond: GenericObject): Promise[]>; } } } +declare namespace OS { + /** + * This namespace dedicated to all operations related to system + * process management + */ + namespace PM { + /** + * A process is either an instance of an application or a service + */ + type ProcessType = application.BaseApplication | application.BaseService; + /** + * Alias to all classes that extends [[BaseModel]] + */ + type ModelTypeClass = { + new (args: AppArgumentsType[]): T; + }; + /** + * Process id allocator, when a new process is created, the value of + * this variable is increased + */ + var pidalloc: number; + /** + * All running processes is stored in this variables + */ + /** + * Current active process ID + */ + var pidactive: number; + var processes: GenericObject; + /** + * Create a new process of application or service + * + * @export + * @param {string} app class name string + * @param {ProcessTypeClass} cls prototype class + * @param {GUI.AppArgumentsType[]} [args] process arguments + * @returns {Promise} a promise on the created process + */ + function createProcess(app: string, cls: ModelTypeClass, args?: AppArgumentsType[]): Promise; + /** + * Get the reference to a process using its id + * + * @export + * @param {number} pid + * @returns {BaseModel} + */ + function appByPid(pid: number): BaseModel; + /** + * Kill a process + * + * @export + * @param {OS.GUI.BaseModel} app reference to the process + * @returns {void} + */ + function kill(app: BaseModel): void; + /** + * Kill all process of an application or service + * + * @export + * @param {string} app process class name + * @param {boolean} force force exit all process + * @returns {void} + */ + function killAll(app: string, force: boolean): void; + /** + * Get the current active application + * @export + * @returns {BaseModel} + */ + function getActiveApp(): BaseModel; + } +} diff --git a/libantosdk/build/release/libantosdk.zip b/libantosdk/build/release/libantosdk.zip index 664ea9bee5be41460954aef1680fa552613a2c1c..ebce638258bd138ed3285033f276533e4eda2732 100644 GIT binary patch delta 50080 zcmXtYN+sOp?zxSN`u)0?5>aObj($%}s zaH^1cr+}m^2Mz%T0s;a9l5c#c-VhJf2@UnXo&?$l3h{rVbw~mKBMt8miT`U_;D11& zK>pvLWECXh|JSeKj?NzPf6R}{5#oPr8bt*Df6Nt06YPJChC=0k4V~cRf9;Ei>VL)t zo3ON)uz=2n|L;7)7u!Hv7Tdta6aIfdxDPU1xDV<-p#KBrKVbg@?myuF1K~dq{{!hi zkXwZNP&6t2ccSSw(}cY>^Dr zJ?%IMo^NS|#%|dq9-%&* zodXmt`~j(~sBmDgbKS25@8Mk~#AgRj41!qK2cf>5(*G*71ag?ZCA6G&WVQ>F8ykPW^s+)I=7l{7gHQz8#y%&Yu^p<97VCTH5eh_pL~8(C>&fM(hu z`k{)Uj!*vnnvGICyy~pG_&@+FMUY4rW|^u5&w}| zV9=wygVKrBdL#UBHW8ZO=^FsLKJK6+Ntx^3cBP<$4E{YbF5EFH%-2d(S!Q{hR7~;z z88S!PVn!!1QdCzjQjCtUnvau-r`+;KH}g>+0E$4f2|91ZP);S@swPPDS@t0LKp#P< zjj9P@771&Q7q{?xT`18^(G{%rVbP3HYv5k`P*8FBUbJ2wvIa}v`p&2A{GoH&yRH2% zvs_a<*BRL2W2`*er%r{((4?KhO3x|3V{76DFgx>95p2D^VX0{MNmTl15nQ7m2;b~8 z08phpnQ)VBRNL)XAMBGk4^wF_eX!l#t-fza+qObu8|mp< zeir>Nx>E%jXJcqce>K?VbQKaoKZRqYDh`=+607Yiq&!`NBzv9d8PlO65+UvwyfyZh zhjQzu&ij0crSyl8DX#YC@qXnT_i|J~10I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u?eYuoSVfBJuw<(zMx#23SaK_r~0=<>9uh|MkqGn z^*7#8*Mjt+tGmtM((m7WW0brR%)gb=?1=VeB-%c4Of$? zMMdh#ep-->}A#ytp^nRgQDPfrj$2`glt1R*B{)eSb!j|VQ>1=)|g6z1c>%B8`% zQ@#+#rw%?dkgKHGE*1&EcXE$#(GkV3Oz!^oiqhC=c767mf)Epq8o)%j%OL-nGc6#k z!b=SfW|F+*9Cobeq=dGprCYrxy!o9n>-#YLn9xB+_%`DE*N`b{firs_drq0Pi@*lX zu%9K^0fK!zB=+H6f=;lJP%|$rXehi@Ea49(7MQVHY?_*p*yTjYz3XqHHz5aievcol z*?75$(>POZuvNMfDRn~oU|siPR8GLJ5^75Czw=XQ9WTM#&}oA8>AAXTNFZ7m+cLp8 z@uf&NoF&CTTCvv32erEH1JDTq8i;~-&DC<@;(SUWD&R(fGmU>D#J|sCAFSDnnyc0C z1^iSNlIG9axp+(G_8_ItUX6S|IBLqG5arIoLR}gCL{^jmhkyeC0f7N2(GCSw34{3# z{$&tf2Ki-BUk3eUFkc4yWpG~x|78eYhS&`A9Z8)W3I?Q9J5(j?;{@f)P@6wa(BvZ^ zioY(UcDn#@xxTnT?2N4J8BJVV6lFlc&_Vta?jNF~R)8rJ6a+*Z0t5u%AMpPk!Jw&m zU)~U3qEu4pT>-ef-@!pZTudy@?93P~UF~fDC)GbttO)&^{TG!#7zhaL|E2kNat4u# z>I%U650&BJGr9{pVs| zUfe47)vNMfqR{?VCd;V_C~e;;4{2$CWVo+|7C!1#|Vvga3D$JZr#PXIB=KMm6W$2N^t5D-LB$p5Fg z<bpCD} + * @memberof PackageCommandType + */ + args: GenericObject; + } + /** + * + * Interface for basic request result returned + * from the server-side. A valid server-side response should + * be in the following format + * ```json + * { + * "error": boolean or string_err, + * "result": JSON result object + * } + * ``` + * + * @export + * @interface RequestResult + */ + interface RequestResult { + /** + * Indicate whether the response is error + * + * @type {(boolean | string)} + * @memberof RequestResult + */ + error: boolean | string; + /** + * The response result, this value must be + * set when `error` is false + * + * @type {(string + * | boolean + * | GenericObject + * | any[] + * | FileInfoType + * | FileInfoType[] + * | setting.UserSettingType)} + * @memberof RequestResult + */ + result: string | boolean | GenericObject | any[] | FileInfoType | FileInfoType[] | setting.UserSettingType; + } + /** + * The host name of the server-side + */ + var HOST: string; + /** + * The base URI of the server-side API + */ + var BASE_URI: string; + /** + * The base REST URI of the server-side API + */ + var REST: string; + /** + * The namespace `handle` contains some low level API to + * communicate with the server side API. It is the only + * API layer that communicate directly with the server. + * To make AntOS compatible with any server side API, + * all exported variable unctions defined in the `handle` + * namespace should be re-implemented + */ + namespace handle { + /** + * Base URI for reading content of VFS file + */ + var get: string; + /** + * Base URI for VFS file sharing + */ + var shared: string; + /** + * Send a request to the server-side API for a directory scanning + * operation + * + * @export + * @param {string} p a VFS file path e.g. home://test/ + * @returns {Promise} A promise on a [[RequestResult]] + * which contains an error or a list of FileInfoType + */ + function scandir(p: string): Promise; + /** + * + * Send a request to the server-side API for directory creation + * + * @export + * @param {string} p VFS path of the directory to be created + * @returns {Promise} A promise on a RequestResult + * which contains an error or true on success + */ + function mkdir(p: string): Promise; + /** + * Send a request to the server-side API for sharing/unsharing a VFS file, + * once shared a VFS file will be publicly visible by everyone + * + * @export + * @param {string} p VFS file path to be shared + * @param {boolean} pub flag: share (true) or unshare (false) + * @returns {Promise} A promise on a RequestResult + * which contains an error or true on success + */ + function sharefile(p: string, pub: boolean): Promise; + /** + * Get VFS file meta-data + * + * @export + * @param {string} p VFS file path + * @returns {Promise} A promise on a [[RequestResult]] + * which contains an error or an object of FileInfoType + */ + function fileinfo(p: string): Promise; + /** + * Read a VFS file content. There are many ways a VFS file can be read: + * - Read as a raw text content + * - Read as a javascript file, in this case the content of the + * file will be executed + * - Read as JSON object + * + * @export + * @param {string} p path of the VFS file + * @param {string} t return data type: + * - jsonp: the response is an json object + * - script: the response is a javascript code + * - xml, html: the response is a XML/HTML object + * - text: plain text + * + * @returns {Promise} A promise on a [[RequestResult]] + * which contains an error or an object of [[FileInfoType]] + */ + function readfile(p: string, t: string): Promise; + /** + * Move a file to another location on server-side + * + * @export + * @param {string} s VFS source file path + * @param {string} d VFS destination file path + * @returns {Promise} A promise on a [[RequestResult]] + * which contains an error or a success response + */ + function move(s: string, d: string): Promise; + /** + * Delete a VFS file on the server-side + * + * @export + * @param {string} p VFS file path + * @returns {Promise} A promise on a [[RequestResult]] + * which contains an error or a success response + */ + function remove(p: string): Promise; + /** + * Read the file as binary data + * + * @export + * @param {string} p VFS file to be read + * @returns {Promise} a Promise on an array buffer + */ + function fileblob(p: string): Promise; + /** + * Send a command to the serverside package manager + * + * @export + * @param {PackageCommandType} d a package command of type PackageCommandType + * @returns {Promise} a promise on a [[RequestResult]] + */ + function packages(d: PackageCommandType): Promise; + /** + * Upload file to the server via VFS interface + * + * @export + * @param {string} d VFS destination directory path + * @returns {Promise} a promise on a [[RequestResult]] + */ + function upload(d: string): Promise; + /** + * Write Base 64 encoded data to a VFS file + * + * @export + * @param {string} p path to the VFS file + * @param {string} d file data encoded in Base 64 + * @returns {Promise} a promise on a [[RequestResult]] + */ + function write(p: string, d: string): Promise; + /** + * An apigateway allows client side to execute a custom server-side + * script and get back the result. This gateway is particularly + * useful in case of performing a task that is not provided by the core + * API + * + * @export + * @param {GenericObject} d execution indication, provided only when ws is `false` + * otherwise, `d` should be written directly to the websocket stream as JSON object. + * Two possible formats of `d`: + * ```text + * execute an server-side script file: + * + * { + * path: [VFS path], + * parameters: [parameters of the server-side script] + * } + * + * or, execute directly a snippet of server-side script: + * + * { code: [server-side script code snippet as string] } + * + * ``` + * + * @param {boolean} ws flag indicate whether to use websocket for the connection + * to the gateway API. In case of streaming data, the websocket is preferred + * @returns {Promise} a promise on the result object (any) + */ + function apigateway(d: GenericObject, ws: boolean): Promise; + /** + * Check if a user is logged in + * + * @export + * @returns {Promise} a promise on a [[RequestResult]] that + * contains an error or a [[UserSettingType]] object + */ + function auth(): Promise; + /** + * Perform a login operation + * + * @export + * @param {UserLoginType} d user data [[UserLoginType]] + * @returns {Promise} a promise on a [[RequestResult]] that + * contains an error or a [[UserSettingType]] object + */ + function login(d: UserLoginType): Promise; + /** + * Perform a logout operation + * + * @export + * @returns {Promise} a promise on a [[RequestResult]] + */ + function logout(): Promise; + /** + * Save the current user settings + * + * @export + * @returns {Promise} a promise on a [[RequestResult]] + */ + function setting(): Promise; + /** + * This is the low level function of AntOS VDB API. + * It requests the server API to perform some simple + * SQL query. + * + * @export + * @param {string} cmd action to perform: save, delete, get, select + * @param {GenericObject} d data object of the request based on each action: + * - save: + * ``` + * { table: "table name", data: [record data object]} + * ``` + * - get: + * ``` + * { table: "table name", id: [record id]} + * ``` + * - delete: + * ``` + * { table: "table name", id: [record id]} + * or + * { table: "table name", cond: [conditional object]} + * ``` + * - select: + * ``` + * { table: "table name", cond: [conditional object]} + * ``` + * @returns {Promise} a promise of [[RequestResult]] on the + * query data + * + * A conditional object represents a SQL condition statement as an object, + * example: `pid = 10 AND cid = 2 ORDER BY date DESC` + * ``` + * { + * exp: { + * "and": { + * pid: 10, + * cid: 2 + * } + * }, + * order: { + * date: "DESC" + * } + * } + * ``` + */ + function dbquery(cmd: string, d: GenericObject): Promise; + } + } +} declare namespace OS { namespace GUI { /** @@ -45,10 +380,11 @@ declare namespace OS { * * Need to be implemented by subclasses * - * @abstract - * @memberof SubWindow + * + * @returns {void} + * @memberof BaseDialog */ - abstract init(): void; + init(): void; /** * Main entry point after rendering of the sub-window * @@ -77,6 +413,13 @@ declare namespace OS { * @memberof SubWindow */ hide(): void; + /** + * blur the sub-window + * + * @returns {void} + * @memberof SubWindow + */ + blur(): void; } /** * Abstract prototype of all AntOS dialogs widget @@ -925,2458 +1268,6 @@ declare namespace OS { const schemes: GenericObject; } } -declare namespace OS { - namespace API { - /** - * Data type exchanged via - * the global Announcement interface - * - * @export - * @interface AnnouncementDataType - */ - interface AnnouncementDataType { - /** - * message string - * - * @type {string| FormattedString} - * @memberof AppAnnouncementDataType - */ - message: string | FormattedString; - /** - * Process ID - * - * @type {number} - * @memberof AppAnnouncementDataType - */ - id: number; - /** - * App name - * - * @type {string | FormattedString} - * @memberof AppAnnouncementDataType - */ - name: string | FormattedString; - /** - * Icon file - * - * @type {string} - * @memberof AppAnnouncementDataType - */ - icon?: string; - /** - * App icon class - * - * @type {string} - * @memberof AppAnnouncementDataType - */ - iconclass?: string; - /** - * User specific data - * - * @type {*} - * @memberof AppAnnouncementDataType - */ - u_data?: T; - } - /** - * Observable entry type definition - * - * @export - * @interface ObservableEntryType - */ - interface ObservableEntryType { - /** - * A Set of callbacks that should be called only once. - * These callbacks will be removed after the first - * occurrence of the corresponding event - * - * @memberof ObservableEntryType - */ - one: Set<(d: any) => void>; - /** - * A Set of callbacks that should be called - * every time the corresponding event is triggered - * - * @memberof ObservableEntryType - */ - many: Set<(d: any) => void>; - } - /** - * Announcement listener type definition - * - * @export - * @interface AnnouncerListenerType - */ - interface AnnouncerListenerType { - [index: number]: { - /** - * The event name - * - * @type {string} - */ - e: string; - /** - * The event callback - * - */ - f: (d: any) => void; - }[]; - } - /** - * This class is the based class used in AntOS event - * announcement system. - * It implements the observer pattern using simple - * subscribe/publish mechanism - * @export - * @class Announcer - */ - class Announcer { - /** - * The observable object that stores event name - * and its corresponding callback in [[ObservableEntryType]] - * - * @type {GenericObject} - * @memberof Announcer - */ - observable: GenericObject; - /** - * Enable/disable the announcer - * - * @type {boolean} - * @memberof Announcer - */ - enable: boolean; - /** - *Creates an instance of Announcer. - * @memberof Announcer - */ - constructor(); - /** - * Disable the announcer, when this function is called - * all events and their callbacks will be removed - * - * @returns - * @memberof Announcer - */ - disable(): boolean; - /** - * Subscribe to an event, the callback will be called - * every time the corresponding event is trigged - * - * @param {string} evtName event name - * @param {(d: any) => void} callback The corresponding callback - * @returns {void} - * @memberof Announcer - */ - on(evtName: string, callback: (d: any) => void): void; - /** - * Subscribe to an event, the callback will - * be called only once and then removed from the announcer - * - * @param {string} evtName event name - * @param {(d: any) => void} callback the corresponding callback - * @returns {void} - * @memberof Announcer - */ - one(evtName: string, callback: (d: any) => void): void; - /** - * Unsubscribe the callback from an event - * - * @param {string} evtName event name - * @param {(d: any) => void} [callback] the callback to be unsubscribed. - * When the `callback` is `*`, all callbacks related to `evtName` will be - * removed - * @memberof Announcer - */ - off(evtName: string, callback?: (d: any) => void): void; - /** - * Trigger an event - * - * @param {string} evtName event name - * @param {*} data data object that will be send to all related callback - * @returns {void} - * @memberof Announcer - */ - trigger(evtName: string, data: any): void; - } - } - /** - * This namespace defines every thing related to the system announcement. - * - * The system announcement provides a global way to communicate between - * processes (applications/services) using the subscribe/publish - * mechanism - */ - namespace announcer { - /** - * The global announcer object that manages global events - * and callbacks - */ - var observable: API.Announcer; - /** - * This variable is used to allocate the `id` of all messages - * passing between publishers and subscribers in the - * system announcement - */ - var quota: 0; - /** - * Placeholder of all global events listeners - */ - var listeners: API.AnnouncerListenerType; - /** - * Subscribe to a global event - * - * @export - * @param {string} e event name - * @param {(d: API.AnnouncementDataType) => void} f event callback - * @param {GUI.BaseModel} a the process (Application/service) related to the callback - */ - function on(e: string, f: (d: API.AnnouncementDataType) => void, a: BaseModel): void; - /** - * Trigger a global event - * - * @export - * @param {string} e event name - * @param {*} d data passing to all related callback - */ - function trigger(e: string, d: any): void; - /** - * Report system fail. This will trigger the global `fail` - * event - * - * @export - * @param {(string | FormattedString)} m message string - * @param {Error} e error to be reported - */ - function osfail(m: string | FormattedString, e: Error): void; - /** - * Report system error. This will trigger the global `error` - * event - * - * @export - * @param {(string | FormattedString)} m message string - * @param {Error} e error to be reported - */ - function oserror(m: string | FormattedString, e: Error): void; - /** - * Trigger system notification (`info` event) - * - * @export - * @param {(string | FormattedString)} m notification message - */ - function osinfo(m: string | FormattedString): void; - /** - * - * - * @export - * @param {string} e event name - * @param {(string| FormattedString)} m event message - * @param {*} [d] user data - */ - function ostrigger(e: string, m: string | FormattedString, d?: any): void; - /** - * Unregister a process (application/service) from - * the global announcement system - * - * @export - * @param {GUI.BaseModel} app reference to the process - * @returns {void} - */ - function unregister(app: BaseModel): void; - /** - * Allocate message id - * - * @export - * @returns {number} - */ - function getMID(): number; - } -} -declare namespace OS { - /** - * This namespace dedicated to all operations related to system - * process management - */ - namespace PM { - /** - * A process is either an instance of an application or a service - */ - type ProcessType = application.BaseApplication | application.BaseService; - /** - * Alias to all classes that extends [[BaseModel]] - */ - type ModelTypeClass = { - new (args: AppArgumentsType[]): T; - }; - /** - * Process id allocator, when a new process is created, the value of - * this variable is increased - */ - var pidalloc: number; - /** - * All running processes is stored in this variables - */ - var processes: GenericObject; - /** - * Create a new process of application or service - * - * @export - * @param {string} app class name string - * @param {ProcessTypeClass} cls prototype class - * @param {GUI.AppArgumentsType[]} [args] process arguments - * @returns {Promise} a promise on the created process - */ - function createProcess(app: string, cls: ModelTypeClass, args?: AppArgumentsType[]): Promise; - /** - * Get the reference to a process using its id - * - * @export - * @param {number} pid - * @returns {BaseModel} - */ - function appByPid(pid: number): BaseModel; - /** - * Kill a process - * - * @export - * @param {OS.GUI.BaseModel} app reference to the process - * @returns {void} - */ - function kill(app: BaseModel): void; - /** - * Kill all process of an application or service - * - * @export - * @param {string} app process class name - * @param {boolean} force force exit all process - * @returns {void} - */ - function killAll(app: string, force: boolean): void; - } -} -declare namespace OS { - namespace API { - /** - * Interface for user login data - * - * @export - * @interface UserLoginType - */ - interface UserLoginType { - /** - * The user credential - * - * @type {string} - * @memberof UserLoginType - */ - username: string; - /** - * The user password - * - * @type {string} - * @memberof UserLoginType - */ - password: string; - } - /** - * Interface for a command sent to - * server side package manage, it contains two field: - * - * @export - * @interface PackageCommandType - */ - interface PackageCommandType { - /** - * Command name, should be: `init`, `cache`, `install`, - * `uninstall` or `list` - * - * @type {string} - * @memberof PackageCommandType - */ - command: string; - /** - * Parameter object of each command - * - * @type {GenericObject} - * @memberof PackageCommandType - */ - args: GenericObject; - } - /** - * - * Interface for basic request result returned - * from the server-side. A valid server-side response should - * be in the following format - * ```json - * { - * "error": boolean or string_err, - * "result": JSON result object - * } - * ``` - * - * @export - * @interface RequestResult - */ - interface RequestResult { - /** - * Indicate whether the response is error - * - * @type {(boolean | string)} - * @memberof RequestResult - */ - error: boolean | string; - /** - * The response result, this value must be - * set when `error` is false - * - * @type {(string - * | boolean - * | GenericObject - * | any[] - * | FileInfoType - * | FileInfoType[] - * | setting.UserSettingType)} - * @memberof RequestResult - */ - result: string | boolean | GenericObject | any[] | FileInfoType | FileInfoType[] | setting.UserSettingType; - } - /** - * The host name of the server-side - */ - var HOST: string; - /** - * The base URI of the server-side API - */ - var BASE_URI: string; - /** - * The base REST URI of the server-side API - */ - var REST: string; - /** - * The namespace `handle` contains some low level API to - * communicate with the server side API. It is the only - * API layer that communicate directly with the server. - * To make AntOS compatible with any server side API, - * all exported variable unctions defined in the `handle` - * namespace should be re-implemented - */ - namespace handle { - /** - * Base URI for reading content of VFS file - */ - var get: string; - /** - * Base URI for VFS file sharing - */ - var shared: string; - /** - * Send a request to the server-side API for a directory scanning - * operation - * - * @export - * @param {string} p a VFS file path e.g. home://test/ - * @returns {Promise} A promise on a [[RequestResult]] - * which contains an error or a list of FileInfoType - */ - function scandir(p: string): Promise; - /** - * - * Send a request to the server-side API for directory creation - * - * @export - * @param {string} p VFS path of the directory to be created - * @returns {Promise} A promise on a RequestResult - * which contains an error or true on success - */ - function mkdir(p: string): Promise; - /** - * Send a request to the server-side API for sharing/unsharing a VFS file, - * once shared a VFS file will be publicly visible by everyone - * - * @export - * @param {string} p VFS file path to be shared - * @param {boolean} pub flag: share (true) or unshare (false) - * @returns {Promise} A promise on a RequestResult - * which contains an error or true on success - */ - function sharefile(p: string, pub: boolean): Promise; - /** - * Get VFS file meta-data - * - * @export - * @param {string} p VFS file path - * @returns {Promise} A promise on a [[RequestResult]] - * which contains an error or an object of FileInfoType - */ - function fileinfo(p: string): Promise; - /** - * Read a VFS file content. There are many ways a VFS file can be read: - * - Read as a raw text content - * - Read as a javascript file, in this case the content of the - * file will be executed - * - Read as JSON object - * - * @export - * @param {string} p path of the VFS file - * @param {string} t return data type: - * - jsonp: the response is an json object - * - script: the response is a javascript code - * - xml, html: the response is a XML/HTML object - * - text: plain text - * - * @returns {Promise} A promise on a [[RequestResult]] - * which contains an error or an object of [[FileInfoType]] - */ - function readfile(p: string, t: string): Promise; - /** - * Move a file to another location on server-side - * - * @export - * @param {string} s VFS source file path - * @param {string} d VFS destination file path - * @returns {Promise} A promise on a [[RequestResult]] - * which contains an error or a success response - */ - function move(s: string, d: string): Promise; - /** - * Delete a VFS file on the server-side - * - * @export - * @param {string} p VFS file path - * @returns {Promise} A promise on a [[RequestResult]] - * which contains an error or a success response - */ - function remove(p: string): Promise; - /** - * Read the file as binary data - * - * @export - * @param {string} p VFS file to be read - * @returns {Promise} a Promise on an array buffer - */ - function fileblob(p: string): Promise; - /** - * Send a command to the serverside package manager - * - * @export - * @param {PackageCommandType} d a package command of type PackageCommandType - * @returns {Promise} a promise on a [[RequestResult]] - */ - function packages(d: PackageCommandType): Promise; - /** - * Upload file to the server via VFS interface - * - * @export - * @param {string} d VFS destination directory path - * @returns {Promise} a promise on a [[RequestResult]] - */ - function upload(d: string): Promise; - /** - * Write Base 64 encoded data to a VFS file - * - * @export - * @param {string} p path to the VFS file - * @param {string} d file data encoded in Base 64 - * @returns {Promise} a promise on a [[RequestResult]] - */ - function write(p: string, d: string): Promise; - /** - * An apigateway allows client side to execute a custom server-side - * script and get back the result. This gateway is particularly - * useful in case of performing a task that is not provided by the core - * API - * - * @export - * @param {GenericObject} d execution indication, provided only when ws is `false` - * otherwise, `d` should be written directly to the websocket stream as JSON object. - * Two possible formats of `d`: - * ```text - * execute an server-side script file: - * - * { - * path: [VFS path], - * parameters: [parameters of the server-side script] - * } - * - * or, execute directly a snippet of server-side script: - * - * { code: [server-side script code snippet as string] } - * - * ``` - * - * @param {boolean} ws flag indicate whether to use websocket for the connection - * to the gateway API. In case of streaming data, the websocket is preferred - * @returns {Promise} a promise on the result object (any) - */ - function apigateway(d: GenericObject, ws: boolean): Promise; - /** - * Check if a user is logged in - * - * @export - * @returns {Promise} a promise on a [[RequestResult]] that - * contains an error or a [[UserSettingType]] object - */ - function auth(): Promise; - /** - * Perform a login operation - * - * @export - * @param {UserLoginType} d user data [[UserLoginType]] - * @returns {Promise} a promise on a [[RequestResult]] that - * contains an error or a [[UserSettingType]] object - */ - function login(d: UserLoginType): Promise; - /** - * Perform a logout operation - * - * @export - * @returns {Promise} a promise on a [[RequestResult]] - */ - function logout(): Promise; - /** - * Save the current user settings - * - * @export - * @returns {Promise} a promise on a [[RequestResult]] - */ - function setting(): Promise; - /** - * This is the low level function of AntOS VDB API. - * It requests the server API to perform some simple - * SQL query. - * - * @export - * @param {string} cmd action to perform: save, delete, get, select - * @param {GenericObject} d data object of the request based on each action: - * - save: - * ``` - * { table: "table name", data: [record data object]} - * ``` - * - get: - * ``` - * { table: "table name", id: [record id]} - * ``` - * - delete: - * ``` - * { table: "table name", id: [record id]} - * or - * { table: "table name", cond: [conditional object]} - * ``` - * - select: - * ``` - * { table: "table name", cond: [conditional object]} - * ``` - * @returns {Promise} a promise of [[RequestResult]] on the - * query data - * - * A conditional object represents a SQL condition statement as an object, - * example: `pid = 10 AND cid = 2 ORDER BY date DESC` - * ``` - * { - * exp: { - * "and": { - * pid: 10, - * cid: 2 - * } - * }, - * order: { - * date: "DESC" - * } - * } - * ``` - */ - function dbquery(cmd: string, d: GenericObject): Promise; - } - } -} -declare namespace OS { - /** - * This namespace is dedicated to everything related to the - * global system settings - */ - namespace setting { - /** - * User setting type definition - * - * @export - * @interface UserSettingType - */ - interface UserSettingType { - /** - * User full name - * - * @type {string} - * @memberof UserSettingType - */ - name: string; - /** - * User name - * - * @type {string} - * @memberof UserSettingType - */ - username: string; - /** - * User id - * - * @type {number} - * @memberof UserSettingType - */ - id: number; - /** - * User groups - * - * @type {{ [index: number]: string }} - * @memberof UserSettingType - */ - group?: { - [index: number]: string; - }; - [propName: string]: any; - } - /** - * Virtual desktop setting data type - * - * @export - * @interface DesktopSettingType - */ - interface DesktopSettingType { - /** - * Desktop VFS path - * - * @type {string} - * @memberof DesktopSettingType - */ - path: string; - /** - * Desktop menu, can be added automatically by applications - * - * @type {GUI.BasicItemType[]} - * @memberof DesktopSettingType - */ - menu: GUI.BasicItemType[]; - /** - * Show desktop hidden files - * - * @type {boolean} - * @memberof DesktopSettingType - */ - showhidden: boolean; - [propName: string]: any; - } - /** - * Wallpaper setting data type - * - * @export - * @interface WPSettingType - */ - interface WPSettingType { - /** - * Repeat wallpaper: - * - `repeat` - * - `repeat-x` - * - `repeat-y` - * - `no-repeat` - * - * @type {string} - * @memberof WPSettingType - */ - repeat: string; - /** - * Wallpaper size - * - `contain` - * - `cover` - * - `auto` - * - * @type {string} - * @memberof WPSettingType - */ - size: string; - /** - * VFS path to the wallpaper image - * - * @type {string} - * @memberof WPSettingType - */ - url: string; - } - /** - * Theme setting data type - * - * @export - * @interface ThemeSettingType - */ - interface ThemeSettingType { - /** - * Theme name, this value is used for looking - * theme file in system asset - * - * @type {string} - * @memberof ThemeSettingType - */ - name: string; - /** - * Theme user-friendly text - * - * @type {string} - * @memberof ThemeSettingType - */ - text: string; - } - /** - * Appearance setting data type - * - * @export - * @interface AppearanceSettingType - */ - interface AppearanceSettingType { - /** - * Current theme name - * - * @type {string} - * @memberof AppearanceSettingType - */ - theme: string; - /** - * All themes available in the system - * - * @type {ThemeSettingType[]} - * @memberof AppearanceSettingType - */ - themes: ThemeSettingType[]; - /** - * Current wallpaper setting - * - * @type {WPSettingType} - * @memberof AppearanceSettingType - */ - wp: WPSettingType; - /** - * All wallpapers available in the system - * - * @type {string[]} - * @memberof AppearanceSettingType - */ - wps: string[]; - } - /** - * VFS Mount points setting data type - * - * @export - * @interface VFSMountPointSettingType - */ - interface VFSMountPointSettingType { - /** - * Path to the mount point - * - * @type {string} - * @memberof VFSMountPointSettingType - */ - path: string; - /** - * User friendly mount point name - * - * @type {string} - * @memberof VFSMountPointSettingType - */ - text: string; - [propName: string]: any; - } - /** - * VFS setting data type - * - * @export - * @interface VFSSettingType - */ - interface VFSSettingType { - /** - * mount points setting - * - * @type {VFSMountPointSettingType[]} - * @memberof VFSSettingType - */ - mountpoints: VFSMountPointSettingType[]; - [propName: string]: any; - } - /** - * Global system setting data type - * - * @export - * @interface SystemSettingType - */ - interface SystemSettingType { - /** - * System error report URL - * - * @type {string} - * @memberof SystemSettingType - */ - error_report: string; - /** - * Current system locale e.g. `en_GB` - * - * @type {string} - * @memberof SystemSettingType - */ - locale: string; - /** - * System menus - * - * @type {API.PackageMetaType[]} - * @memberof API.PackageMetaType - */ - menu: API.PackageMetaType[]; - /** - * Packages meta-data - * - * @type {{ [index: string]: API.PackageMetaType }} - * @memberof SystemSettingType - */ - packages: { - [index: string]: API.PackageMetaType; - }; - /** - * Path to the installed packages - * - * @type {{ - * user: string; - * system: string; - * }} - * @memberof SystemSettingType - */ - pkgpaths: { - /** - * User specific packages install location - * - * @type {string} - */ - user: string; - /** - * System packages install location - * - * @type {string} - */ - system: string; - }; - /** - * Package repositories setting. - * This configuration is used by [[MarketPlace]] - * for package management - * - * @type {{ - * text: string; - * url: string; - * }[]} - * @memberof SystemSettingType - */ - repositories: { - /** - * Repository name - * - * @type {string} - */ - text: string; - /** - * Repository uri - * - * @type {string} - */ - url: string; - }[]; - /** - * Startup applications and services - * - * @type {{ - * apps: string[]; - * services: string[]; - * }} - * @memberof SystemSettingType - */ - startup: { - /** - * List of application names - * - * @type {string[]} - */ - apps: string[]; - /** - * List of service names - * - * @type {string[]} - */ - services: string[]; - /** - * List of pinned applications - * - * @type {string[]} - */ - pinned: string[]; - }; - } - /** - * User settings - */ - var user: UserSettingType; - /** - * Application settings - */ - var applications: GenericObject; - /** - * Desktop settings - */ - var desktop: DesktopSettingType; - /** - * Appearance settings - */ - var appearance: AppearanceSettingType; - /** - * VFS settings - */ - var VFS: VFSSettingType; - /** - * System settings - */ - var system: SystemSettingType; - } - /** - * Reset the system settings to default values - * - * @export - */ - function resetSetting(): void; - /** - * Apply the input parameter object to system settings. - * This object could be an object loaded from - * setting JSON file saved on the server. - * - * @export - * @param {*} conf - */ - function systemSetting(conf: any): void; -} -/// -declare namespace OS { - namespace application { - /** - * Services are processes that run in the background and - * are waken up in certain circumstances such as by global - * events or user interactions. - * - * Each service takes an entry in the system tray menu - * located on the system panel. This menu entry is used - * to access to service visual contents such as: options, - * task performing based on user interaction, etc. - * - * Services are singleton processes, there is only - * one process of a service at a time - * - * @export - * @abstract - * @class BaseService - * @extends {BaseModel} - */ - abstract class BaseService extends BaseModel { - /** - * The service icon shown in the system tray - * - * @type {string} - * @memberof BaseService - */ - icon: string; - /** - * CSS class of the service icon shown in the system tray - * - * @type {string} - * @memberof BaseService - */ - iconclass: string; - /** - * Text of the service shown in the system tray - * - * @type {string} - * @memberof BaseService - */ - text: string; - /** - * Reference to the menu entry DOM element attached - * to the service - * - * @type {HTMLElement} - * @memberof BaseService - */ - domel: HTMLElement; - /** - * Reference to the timer that periodically executes the callback - * defined in [[watch]]. - * - * @private - * @type {number} - * @memberof BaseService - */ - private timer; - /** - * Reference to the system tray menu - * - * @type {HTMLElement} - * @memberof BaseService - */ - holder: HTMLElement; - /** - * Placeholder for service select callback - * - * @memberof BaseService - */ - onmenuselect: (d: OS.GUI.TagEventType) => void; - /** - *Creates an instance of BaseService. - * @param {string} name service class name - * @param {AppArgumentsType[]} args service arguments - * @memberof BaseService - */ - constructor(name: string, args: AppArgumentsType[]); - /** - * Do nothing - * - * @memberof BaseService - */ - hide(): void; - /** - * Init the service before attaching it to - * the system tray: event subscribe, scheme - * loading. - * - * Should be implemented by all subclasses - * - * @abstract - * @memberof BaseService - */ - abstract init(): void; - /** - * Refresh the service menu entry in the - * system tray - * - * @memberof BaseService - */ - update(): void; - /** - * Get the service meta-data - * - * @returns {API.PackageMetaType} - * @memberof BaseService - */ - meta(): API.PackageMetaType; - /** - * Attach the service to a menu element - * such as the system tray menu - * - * @param {HTMLElement} h - * @memberof BaseService - */ - attach(h: HTMLElement): void; - /** - * Set the callback that will be called periodically - * after a period of time. - * - * Each service should only have at most one watcher - * - * @protected - * @param {number} t period time in seconds - * @param {() => void} f callback function - * @returns {number} - * @memberof BaseService - */ - protected watch(t: number, f: () => void): number; - /** - * This function is called when the service - * is exited - * - * @protected - * @param {BaseEvent} evt exit event - * @returns - * @memberof BaseService - */ - protected onexit(evt: BaseEvent): JQuery; - /** - * Do nothing - * - * @memberof BaseService - */ - main(): void; - /** - * Do nothing - * - * @memberof BaseService - */ - show(): void; - /** - * Awake the service, this function is usually called when - * the system tray menu entry attached to the service is - * selected. - * - * This function should be implemented by all subclasses - * - * @abstract - * @param {GUI.TagEventType} e - * @memberof BaseService - */ - abstract awake(e: GUI.TagEventType): void; - /** - * Do nothing - * - * @protected - * @param {BaseEvent} evt - * @memberof BaseService - */ - protected cleanup(evt: BaseEvent): void; - } - } -} -declare type VFSFileHandleClass = { - new (...args: any[]): OS.API.VFS.BaseFileHandle; -}; -interface String { - /** - * Convert a string to VFS file handle. - * - * This function will create a file handle object from the string - * with the help of [[VFS.findHandles]] - * - * @returns {OS.API.VFS.BaseFileHandle} - * @memberof String - */ - asFileHandle(): OS.API.VFS.BaseFileHandle; -} -declare namespace OS { - namespace API { - /** - * User permission data type - * - * @export - * @interface UserPermissionType - */ - interface UserPermissionType { - read: boolean; - write: boolean; - exec: boolean; - } - /** - * VFS file meta-data data type - * - * @export - * @interface FileInfoType - */ - interface FileInfoType { - /** - * File mime type - * - * @type {string} - * @memberof FileInfoType - */ - mime: string; - /** - * File size - * - * @type {number} - * @memberof FileInfoType - */ - size: number; - /** - * File name - * - * @type {string} - * @memberof FileInfoType - */ - name: string; - /** - * File path - * - * @type {string} - * @memberof FileInfoType - */ - path: string; - /** - * File type: - * - `file` - * - `dir` - * - `app` - * - * @type {string} - * @memberof FileInfoType - */ - type: string; - /** - * File permission - * - * @type {{ - * group: UserPermissionType; - * owner: UserPermissionType; - * other: UserPermissionType; - * }} - * @memberof FileInfoType - */ - perm?: { - /** - * Group permission - * - * @type {UserPermissionType} - */ - group: UserPermissionType; - /** - * Owner permission - * - * @type {UserPermissionType} - */ - owner: UserPermissionType; - /** - * Other permission - * - * @type {UserPermissionType} - */ - other: UserPermissionType; - }; - /** - * Creation time - * - * @type {string} - * @memberof FileInfoType - */ - ctime?: string; - /** - * Modification time - * - * @type {string} - * @memberof FileInfoType - */ - mtime?: string; - /** - * Group id - * - * @type {number} - * @memberof FileInfoType - */ - gid?: number; - /** - * User id - * - * @type {number} - * @memberof FileInfoType - */ - uid?: number; - [propName: string]: any; - } - /** - * This namespace is dedicated to all APIs related to - * AntOS Virtual File System (VFS) - */ - namespace VFS { - /** - * Placeholder stores VFS file protocol patterns and its attached file handle class. - * - */ - const handles: GenericObject; - /** - * Register a protocol to a handle class - * - * @export - * @param {string} protos VFS protocol pattern - * @param {VFSFileHandleClass} cls handle class - */ - function register(protos: string, cls: VFSFileHandleClass): void; - /** - * Load custom VFS handles if the package vfsx available - * - * @export - * @param {boolean} [force] force load the file - * @return {*} {Promise} - */ - function loadVFSX(force?: boolean): Promise; - /** - * Looking for a attached file handle class of a string protocol - * - * When converting a string to file handle, the system will look - * for a protocol pattern in the string, if the protocol found, - * its attached handle class (found in [[VFS.handles]]) will be - * used to initialize a file handle object from the string - * - * ```typescript - * "home://data/test.txt".asFileHandle() // -> an instance of RemoteFileHandle - * ``` - * @export - * @param {string} proto protocol string - * @returns {VFSFileHandleClass[]} - */ - function findHandles(proto: string): VFSFileHandleClass[]; - /** - * Abstract prototype of all all VFS file handle definition. - * - * This prototype provides a standardized interface to access - * to different underlay file systems such as remote file, - * cloud file (Dropbox, Google drive, etc.), URL or memory-based file - * - * @export - * @abstract - * @class BaseFileHandle - */ - abstract class BaseFileHandle { - /** - * Flag indicates whether the file is dirty - * - * @type {boolean} - * @memberof BaseFileHandle - */ - dirty: boolean; - /** - * Once read, file content will be cached in this placeholder - * - * @type {*} - * @memberof BaseFileHandle - */ - cache: any; - /** - * Flag indicated whether the file meta-data is loaded - * - * @type {boolean} - * @memberof BaseFileHandle - */ - ready: boolean; - /** - * File path - * - * @type {string} - * @memberof BaseFileHandle - */ - path: string; - /** - * File protocol e.g: - * - `os://` - * - `home://` - * - * @type {string} - * @memberof BaseFileHandle - */ - protocol: string; - /** - * List of path segments - * - * @type {string[]} - * @memberof BaseFileHandle - */ - genealogy: string[]; - /** - * File base name - * - * @type {string} - * @memberof BaseFileHandle - */ - basename: string; - /** - * Once loaded, [[ready]] will be set to true and - * file meta-data will be stored in this place holder - * - * @type {FileInfoType} - * @memberof BaseFileHandle - */ - info: FileInfoType; - /** - * File extension - * - * @type {string} - * @memberof BaseFileHandle - */ - ext: string; - /** - * - * File type - * @type {string} - * @memberof BaseFileHandle - */ - type: string; - /** - *Creates an instance of BaseFileHandle. - * @param {string} path file path - * @memberof BaseFileHandle - */ - constructor(path: string); - /** - * Set a file path to the current file handle - * - * @param {string} p - * @returns {void} - * @memberof BaseFileHandle - */ - setPath(p: string): void; - /** - * Getter: Get the file basename - * Setter: set the file name - * - * @returns {string} - * @memberof BaseFileHandle - */ - get filename(): string; - set filename(v: string); - /** - * Set data to the file cache - * - * @param {*} v data object - * @returns {BaseFileHandle} - * @memberof BaseFileHandle - */ - setCache(v: any): BaseFileHandle; - /** - * Return the object itself - * - * @returns {BaseFileHandle} - * @memberof BaseFileHandle - */ - asFileHandle(): BaseFileHandle; - /** - * Check whether the current file is the root of the file tree - * - * @returns {boolean} - * @memberof BaseFileHandle - */ - isRoot(): boolean; - /** - * Check whether the current file is a hidden file - * - * @returns {boolean} - * @memberof BaseFileHandle - */ - isHidden(): boolean; - /** - * Get hash number of the current file path - * - * @returns {number} - * @memberof BaseFileHandle - */ - hash(): number; - /** - * Convert the current file cache to Base64 - * - * @protected - * @param {string} t type of the file cache: - * - `object` - * - `mime type` - * @returns {(Promise)} promise on the converted data - * @memberof BaseFileHandle - */ - protected b64(t: string): Promise; - /** - * Get the parent file handle of the current file - * - * @returns {BaseFileHandle} - * @memberof BaseFileHandle - */ - parent(): BaseFileHandle; - /** - * Load the file meta-data before performing - * any task - * - * @returns {Promise} a promise on file meta-data - * @memberof BaseFileHandle - */ - onready(): Promise; - /** - * Public read operation - * - * This function calls the [[_rd]] function to perform the operation. - * - * If the current file is a directory, then the operation - * will return the meta-data of all files inside of the directory. - * Otherwise, file content will be returned - * - * @param {string} t data type - * - jsonp: the response is an json object - * - script: the response is a javascript code - * - xml, html: the response is a XML/HTML object - * - text: plain text - * - binary - * - * @returns {Promise} a promise on the file content - * @memberof BaseFileHandle - */ - read(t?: string): Promise; - /** - * Write the file cache to the actual file - * - * This function calls the [[_wr]] function to perform the operation - * - * @param {string} t data type - * - `base64` - * - `object` - * - `mime type` - * - * @returns {Promise} promise on the operation result - * @memberof BaseFileHandle - */ - write(t: string): Promise; - /** - * Sub-directory creation - * - * This function calls the [[_mk]] function to perform the operation - * - * @param {string} d sub directory name - * @returns {Promise} promise on the operation result - * @memberof BaseFileHandle - */ - mk(d: string): Promise; - /** - * Delete the file - * - * This function calls the [[_rm]] function to perform the operation - * - * @returns {Promise} promise on the operation result - * @memberof BaseFileHandle - */ - remove(): Promise; - /** - * Upload a file to the current directory - * - * Only work when the current file is a directory - * - * This function calls the [[_up]] function to perform the operation - * - * @returns {Promise} promise on the operation result - * @memberof BaseFileHandle - */ - upload(): Promise; - /** - * Share the file by publish it. - * - * Only work with file - * - * This function calls the [[_pub]] function to perform the operation - * - * @returns {Promise} promise on operation result - * @memberof BaseFileHandle - */ - publish(): Promise; - /** - * Download the file. - * - * Only work with file - * - * This function calls the [[_down]] function to perform the operation - * - * @returns {Promise} Promise on the operation result - * @memberof BaseFileHandle - */ - download(): Promise; - /** - * Move the current file to another location - * - * This function calls the [[_mv]] function to perform the operation - * - * @param {string} d destination location - * @returns {Promise} promise on the operation result - * @memberof BaseFileHandle - */ - move(d: string): Promise; - /** - * Execute the current file. - * - * This action depends on each file protocol - * - * This function calls the [[_exec]] function to perform the operation - * - * @returns {Promise} - * @memberof BaseFileHandle - */ - execute(): Promise; - /** - * Get an accessible link to the file - * that can be accessed from the browser - * - * @returns {string} - * @memberof BaseFileHandle - */ - getlink(): string; - /** - * Helper function returns a promise on unsupported action - * - * @param {string} t action name - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected unsupported(t: string): Promise; - /** - * Low level protocol-specific read operation - * - * This function should be overridden on the file handle class - * that supports the operation - * - * @protected - * @param {string} t data type, see [[read]] - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _rd(t: string): Promise; - /** - * Low level protocol-specific write operation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @protected - * @param {string} t data type, see [[write]] - * @param {*} [d] - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _wr(t: string, d?: any): Promise; - /** - * Low level protocol-specific sub-directory creation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @protected - * @param {string} d sub directory name - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _mk(d: string): Promise; - /** - * Low level protocol-specific delete operation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _rm(): Promise; - /** - * Low level protocol-specific move operation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @protected - * @param {string} d - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _mv(d: string): Promise; - /** - * Low level protocol-specific upload operation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _up(): Promise; - /** - * Low level protocol-specific download operation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _down(): Promise; - /** - * Low level protocol-specific execute operation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _exec(): Promise; - /** - * Low level protocol-specific share operation - * - * This function should be overridden by the file handle class - * that supports the operation - * - * @returns {Promise} - * @memberof BaseFileHandle - */ - protected _pub(): Promise; - /** - * Read the current file meta-data - * - * should be implemented by subclasses - * - * @abstract - * @returns {Promise} - * @memberof BaseFileHandle - */ - abstract meta(): Promise; - } - /** - * Remote file handle allows to perform file operation - * on AntOS remote server files. Its protocol is defined - * by the following pattern: - * - * ``` - * ^(home|desktop|os|Untitled)$ - * ``` - * - * @class RemoteFileHandle - * @extends {BaseFileHandle} - */ - class RemoteFileHandle extends BaseFileHandle { - /** - *Creates an instance of RemoteFileHandle. - * @param {string} path file path - * @memberof RemoteFileHandle - */ - constructor(path: string); - /** - * Read remote file meta-data - * - * @returns {Promise} - * @memberof RemoteFileHandle - */ - meta(): Promise; - /** - * Remote file access link - * - * @returns {string} - * @memberof RemoteFileHandle - */ - getlink(): string; - /** - * Read remote file content. - * - * If the current file is a directory, then the operation - * will return the meta-data of all files inside of the directory. - * Otherwise, file content will be returned - * - * @protected - * @param {string} t data type see [[read]] - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _rd(t: string): Promise; - /** - * Write file cache to the remote file - * - * @protected - * @param {string} t data type see [[write]] - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _wr(t: string): Promise; - /** - * Create sub directory - * - * Only work on directory file handle - * - * @protected - * @param {string} d sub directory name - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _mk(d: string): Promise; - /** - * Delete file/folder - * - * @protected - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _rm(): Promise; - /** - * Move file/folder - * - * @protected - * @param {string} d - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _mv(d: string): Promise; - /** - * Upload a file - * - * Only work with directory file handle - * - * @protected - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _up(): Promise; - /** - * Download a file - * - * only work with file - * - * @protected - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _down(): Promise; - /** - * Publish a file - * - * @protected - * @returns {Promise} - * @memberof RemoteFileHandle - */ - protected _pub(): Promise; - } - /** - * Package file is remote file ([[RemoteFileHandle]]) located either in - * the local user packages location or system packages - * location, it should be in the following format: - * - * ``` - * pkg://PKG_NAME/path/to/file - * - * ``` - * - * The system will locale the package name PKG_NAME either in the system domain - * or in user domain and return the correct path to the package - * - * @export - * @class PackageFileHandle - * @extends {RemoteFileHandle} - */ - class PackageFileHandle extends RemoteFileHandle { - /** - *Creates an instance of PackageFileHandle. - * @param {string} pkg_path package path in string - * @memberof PackageFileHandle - */ - constructor(pkg_path: string); - } - /** - * Application file is an AntOS special file allowing to - * refer to an application as a regular file. Its protocol - * pattern is defined as: - * - * ```typescript - * "^app$" // e.g. app://Setting - * ``` - * - * @class ApplicationHandle - * @extends {BaseFileHandle} - */ - class ApplicationHandle extends BaseFileHandle { - /** - *Creates an instance of ApplicationHandle. - * @param {string} path file path - * @memberof ApplicationHandle - */ - constructor(path: string); - /** - * Read application meta-data - * - * @returns {Promise} - * @memberof ApplicationHandle - */ - meta(): Promise; - /** - * If the current file is root (e.g. `app://`), the operation - * will return all system packages meta-data. - * - * Otherwise, an error will be thrown - * - * @protected - * @param {string} t - * @returns {Promise} - * @memberof ApplicationHandle - */ - protected _rd(t: string): Promise; - } - /** - * A buffer file handle represents a virtual file that is stored - * on the system memory. Its protocol pattern is defined as: - * - * ```typescript - * "^mem$" // e.g. mem://test.txt - * ``` - * - * @class BufferFileHandle - * @extends {BaseFileHandle} - */ - class BufferFileHandle extends BaseFileHandle { - /** - *Creates an instance of BufferFileHandle. - * @param {string} path file path - * @param {string} mime file mime-type - * @param {*} data file data - * @memberof BufferFileHandle - */ - constructor(path: string, mime: string, data: any); - /** - * Read the file meta-data - * - * @returns {Promise} - * @memberof BufferFileHandle - */ - meta(): Promise; - /** - * Read file content stored in the file cached - * - * @protected - * @param {string} t data type see [[read]] - * @returns {Promise} - * @memberof BufferFileHandle - */ - protected _rd(t: string): Promise; - /** - * Write data to the file cache - * - * @protected - * @param {string} t data type, see [[write]] - * @param {*} d data - * @returns {Promise} - * @memberof BufferFileHandle - */ - protected _wr(t: string, d: any): Promise; - /** - * Download the buffer file - * - * @protected - * @returns {Promise} - * @memberof BufferFileHandle - */ - protected _down(): Promise; - } - /** - * URL file handle represents a HTTP/HTTPs link url - * as an AntOS VFS file handle. Its protocol is defined as - * - * ``` - * ^(http|https|ftp)$ - * ``` - * - * @class URLFileHandle - * @extends {BaseFileHandle} - */ - class URLFileHandle extends BaseFileHandle { - /** - *Creates an instance of URLFileHandle. - * @param {string} path - * @memberof URLFileHandle - */ - constructor(path: string); - /** - * Read file meta-data - * - * @returns {Promise} - * @memberof URLFileHandle - */ - meta(): Promise; - /** - * Read URL content - * - * @protected - * @param {string} t data type see [[read]] - * @returns {Promise} - * @memberof URLFileHandle - */ - protected _rd(t: string): Promise; - } - /** - * Shared file handle represents all AntOS shared file. - * Its protocol is defined as: - * - * ``` - * ^shared$ - * ``` - * - * @class SharedFileHandle - * @extends {API.VFS.BaseFileHandle} - */ - class SharedFileHandle extends API.VFS.BaseFileHandle { - /** - *Creates an instance of SharedFileHandle. - * @param {string} path file path - * @memberof SharedFileHandle - */ - constructor(path: string); - /** - * Read file meta-data - * - * @returns {Promise} - * @memberof SharedFileHandle - */ - meta(): Promise; - /** - * Read file content - * - * @protected - * @param {string} t data type, see [[read]] - * @returns {Promise} - * @memberof SharedFileHandle - */ - protected _rd(t: string): Promise; - /** - * write data to shared file - * - * @protected - * @param {string} t data type, see [[write]] - * @param {string} d file data - * @returns {Promise} - * @memberof SharedFileHandle - */ - protected _wr(t: string, d: string): Promise; - /** - * Un-publish the file - * - * @protected - * @returns {Promise} - * @memberof SharedFileHandle - */ - protected _rm(): Promise; - /** - * Download shared file - * - * @protected - * @returns {Promise} - * @memberof SharedFileHandle - */ - protected _down(): Promise; - /** - * Un publish the file - * - * @protected - * @returns {Promise} - * @memberof SharedFileHandle - */ - protected _pub(): Promise; - } - /**Utilities global functions */ - /** - * Read a file content from a zip archive - * - * The content type should be: - * - base64 : the result will be a string, the binary in a base64 form. - * - text (or string): the result will be an unicode string. - * - binarystring: the result will be a string in “binary” form, using 1 byte per char (2 bytes). - * - array: the result will be an Array of bytes (numbers between 0 and 255). - * - uint8array : the result will be a Uint8Array. This requires a compatible browser. - * - arraybuffer : the result will be a ArrayBuffer. This requires a compatible browser. - * - blob : the result will be a Blob. This requires a compatible browser. * - * If file_name is not specified, the first file_name in the zip archive will be read - * @export - * @param {string} file zip file - * @param {string} type content type to read - * @param {string} [file_name] the file should be read from the zip archive - * @return {*} {Promise} - */ - function readFileFromZip(file: string, type: string, file_name?: string): Promise; - /** - * Cat all files to a single out-put - * - * @export - * @param {string[]} list list of VFS files - * @param {string} data input data string that will be cat to the files content - * @param {string} join_by join on files content by this string - * @return {*} {Promise} - */ - function cat(list: string[], data: string, join_by?: string): Promise; - /** - * Read all files content on the list - * - * @export - * @param {string[]} list list of VFS files - * @param {GenericObject[]} contents content array - * @return {void} - */ - function read_files(list: string[]): Promise[]>; - /** - * Copy files to a folder - * - * @export - * @param {string[]} files list of files - * @param {string} to destination folder - * @return {*} {Promise} - */ - function copy(files: string[], to: string): Promise; - /** - * Create a zip archive from a folder - * - * @export - * @param {string} src source file/folder - * @param {string} dest destination archive - * @return {*} {Promise} - */ - function mkar(src: string, dest: string): Promise; - /** - * Create a list of directories - * - * @export - * @param {string[]} list of directories to be created - * @param {boolen} sync sync/async of directory creation - * @return {*} {Promise} - */ - function mkdirAll(list: string[], sync?: boolean): Promise; - /** - * - * - * @export Extract a zip fle - * @param {string} zfile zip file to extract - * @param {(zip:any) => Promise} [dest_callback] a callback to get extraction destination - * @return {*} {Promise} - */ - function extractZip(zfile: string | API.VFS.BaseFileHandle, dest_callback: (zip: any) => Promise): Promise; - /** - * Make files from a set of template files - * - * @export - * @param {Array} list mapping paths between templates files and created files - * @param {string} path files destination - * @param {(data: string) => string} callback: pre-processing files content before writing to destination files - * @return {*} {Promise} - */ - function mktpl(list: Array, path: string, callback: (data: string) => string): Promise; - } - } -} -/// -declare namespace OS { - /** - * This namespace is dedicated to application and service definition. - * When an application is loaded, its prototype definition will be - * inserted to this namespace for reuse lately - */ - namespace application { - /** - * Abstract prototype of all AntOS applications. - * Any new application definition should extend - * this prototype - * - * @export - * @abstract - * @class BaseApplication - * @extends {BaseModel} - */ - abstract class BaseApplication extends BaseModel { - /** - * Placeholder of all settings specific to the application. - * The settings stored in this object will be saved to system - * setting when logout and can be reused in the next login session - * - * @type {GenericObject} - * @memberof BaseApplication - */ - setting: GenericObject; - /** - * Hotkeys (shortcuts) defined for this application - * - * @protected - * @type {GUI.ShortcutType} - * @memberof BaseApplication - */ - protected keycomb: GUI.ShortcutType; - /** - * Reference to the system dock - * - * @type {GUI.tag.AppDockTag} - * @memberof BaseApplication - */ - sysdock: GUI.tag.AppDockTag; - /** - * Reference to the system application menu located - * on the system panel - * - * @type {GUI.tag.MenuTag} - * @memberof BaseApplication - */ - appmenu: GUI.tag.MenuTag; - /** - *Creates an instance of BaseApplication. - * @param {string} name application name - * @param {AppArgumentsType[]} args application arguments - * @memberof BaseApplication - */ - constructor(name: string, args: AppArgumentsType[]); - /** - * Init the application, this function is called when the - * application process is created and docked in the application - * dock. - * - * The application UI will be rendered after the execution - * of this function. - * - * @returns {void} - * @memberof BaseApplication - */ - init(): void; - /** - * Render the application UI by first loading its scheme - * and then mount this scheme to the DOM tree - * - * @protected - * @returns {void} - * @memberof BaseApplication - */ - protected loadScheme(): void; - /** - * API function to perform an heavy task. - * This function will trigger the global `loading` - * event at the beginning of the task, and the `loaded` - * event after finishing the task - * - * @protected - * @param {Promise} promise the promise on a task to be performed - * @returns {Promise} - * @memberof BaseApplication - */ - protected load(promise: Promise): Promise; - /** - * Bind a hotkey to the application, this function - * is used to define application keyboard shortcut - * - * @protected - * @param {string} k the hotkey to bind, should be in the following - * format: `[ALT|SHIFT|CTRL|META]-KEY`, e.g. `CTRL-S` - * @param {(e: JQuery.KeyboardEventBase) => void} f the callback function - * @returns {void} - * @memberof BaseApplication - */ - protected bindKey(k: string, f: (e: JQuery.KeyboardEventBase) => void): void; - /** - * Update the application local from the system - * locale or application specific locale configuration - * - * @param {string} name locale name e.g. `en_GB` - * @returns {void} - * @memberof BaseApplication - */ - updateLocale(name: string): void; - /** - * Execute the callback subscribed to a - * keyboard shortcut - * - * @param {string} fnk meta or modifier key e.g. `CTRL`, `ALT`, `SHIFT` or `META` - * @param {string} c a regular key - * @param {JQuery.KeyDownEvent} e JQuery keyboard event - * @returns {boolean} return whether the shortcut is executed - * @memberof BaseApplication - */ - shortcut(fnk: string, c: string, e: JQuery.KeyDownEvent): boolean; - /** - * Apply a setting to the application - * - * @protected - * @param {string} k the setting name - * @memberof BaseApplication - */ - protected applySetting(k: string): void; - /** - * Apply all settings to the application - * - * @protected - * @memberof BaseApplication - */ - protected applyAllSetting(): void; - /** - * Set a setting value to the application setting - * registry - * - * @protected - * @param {string} k setting name - * @param {*} v setting value - * @returns {void} - * @memberof BaseApplication - */ - protected registry(k: string, v: any): void; - /** - * Show the appliation - * - * @returns {void} - * @memberof BaseApplication - */ - show(): void; - /** - * Blur the application - * - * @returns {void} - * @memberof BaseApplication - */ - blur(): void; - /** - * Hide the application - * - * @returns {void} - * @memberof BaseApplication - */ - hide(): void; - /** - * Maximize or restore the application window size - * and its position - * - * @returns {void} - * @memberof BaseApplication - */ - toggle(): void; - /** - * Get the application title - * - * @returns {(string| FormattedString)} - * @memberof BaseApplication - */ - title(): string | FormattedString; - /** - * Function called when the application exit. - * If the input exit event is prevented, the application - * process will not be killed - * - * - * @protected - * @param {BaseEvent} evt exit event - * @memberof BaseApplication - */ - protected onexit(evt: BaseEvent): void; - /** - * Get the application meta-data - * - * @returns {API.PackageMetaType} - * @memberof BaseApplication - */ - meta(): API.PackageMetaType; - /** - * Base menu definition. This function - * returns the based menu definition of all applications. - * Other application specific menu entries - * should be defined in [[menu]] function - * - * @protected - * @returns {GUI.BasicItemType[]} - * @memberof BaseApplication - */ - protected baseMenu(): GUI.BasicItemType[]; - /** - * The main application entry that is called after - * the application UI is rendered. This application - * must be implemented by all subclasses - * - * @abstract - * @memberof BaseApplication - */ - abstract main(): void; - /** - * Application specific menu definition - * - * @protected - * @returns {GUI.BasicItemType[]} - * @memberof BaseApplication - */ - protected menu(): GUI.BasicItemType[]; - /** - * The cleanup function that is called by [[onexit]] function. - * Application need to override this function to perform some - * specific task before exiting or to prevent the application - * to be exited - * - * @protected - * @param {BaseEvent} e - * @memberof BaseApplication - */ - protected cleanup(e: BaseEvent): void; - } - } -} /** * Reference to the global this */ @@ -3517,6 +1408,13 @@ interface Date { * @memberof Date */ timestamp(): number; + /** + * Covnert to GMTString + * + * @returns {number} + * @memberof Date + */ + toGMTString(): string; } /** * Generic key-value pair object interface @@ -4322,6 +2220,274 @@ declare namespace OS { } } /// +declare namespace OS { + /** + * This namespace is dedicated to application and service definition. + * When an application is loaded, its prototype definition will be + * inserted to this namespace for reuse lately + */ + namespace application { + /** + * Abstract prototype of all AntOS applications. + * Any new application definition should extend + * this prototype + * + * @export + * @abstract + * @class BaseApplication + * @extends {BaseModel} + */ + abstract class BaseApplication extends BaseModel { + /** + * Placeholder of all settings specific to the application. + * The settings stored in this object will be saved to system + * setting when logout and can be reused in the next login session + * + * @type {GenericObject} + * @memberof BaseApplication + */ + setting: GenericObject; + /** + * Hotkeys (shortcuts) defined for this application + * + * @protected + * @type {GUI.ShortcutType} + * @memberof BaseApplication + */ + protected keycomb: GUI.ShortcutType; + /** + * Reference to the system dock + * + * @type {GUI.tag.AppDockTag} + * @memberof BaseApplication + */ + sysdock: GUI.tag.AppDockTag; + /** + * Reference to the system application menu located + * on the system panel + * + * @type {GUI.tag.MenuTag} + * @memberof BaseApplication + */ + appmenu: GUI.tag.MenuTag; + /** + * Loading animation check timeout + * + * @private + * @memberof BaseApplication + */ + private _loading_toh; + /** + * Store pending loading task + * + * @private + * @type {number[]} + * @memberof BaseApplication + */ + private _pending_task; + /** + *Creates an instance of BaseApplication. + * @param {string} name application name + * @param {AppArgumentsType[]} args application arguments + * @memberof BaseApplication + */ + constructor(name: string, args: AppArgumentsType[]); + /** + * Init the application, this function is called when the + * application process is created and docked in the application + * dock. + * + * The application UI will be rendered after the execution + * of this function. + * + * @returns {void} + * @memberof BaseApplication + */ + init(): void; + /** + * Render the application UI by first loading its scheme + * and then mount this scheme to the DOM tree + * + * @protected + * @returns {void} + * @memberof BaseApplication + */ + protected loadScheme(): void; + /** + * API function to perform an heavy task. + * This function will trigger the global `loading` + * event at the beginning of the task, and the `loaded` + * event after finishing the task + * + * @protected + * @param {Promise} promise the promise on a task to be performed + * @returns {Promise} + * @memberof BaseApplication + */ + protected load(promise: Promise): Promise; + /** + * Bind a hotkey to the application, this function + * is used to define application keyboard shortcut + * + * @protected + * @param {string} k the hotkey to bind, should be in the following + * format: `[ALT|SHIFT|CTRL|META]-KEY`, e.g. `CTRL-S` + * @param {(e: JQuery.KeyboardEventBase) => void} f the callback function + * @returns {void} + * @memberof BaseApplication + */ + protected bindKey(k: string, f: (e: JQuery.KeyboardEventBase) => void): void; + /** + * Update the application local from the system + * locale or application specific locale configuration + * + * @param {string} name locale name e.g. `en_GB` + * @returns {void} + * @memberof BaseApplication + */ + updateLocale(name: string): void; + /** + * Execute the callback subscribed to a + * keyboard shortcut + * + * @param {string} fnk meta or modifier key e.g. `CTRL`, `ALT`, `SHIFT` or `META` + * @param {string} c a regular key + * @param {JQuery.KeyDownEvent} e JQuery keyboard event + * @returns {boolean} return whether the shortcut is executed + * @memberof BaseApplication + */ + shortcut(fnk: string, c: string, e: JQuery.KeyDownEvent): boolean; + /** + * Apply a setting to the application + * + * @protected + * @param {string} k the setting name + * @memberof BaseApplication + */ + protected applySetting(k: string): void; + /** + * Apply all settings to the application + * + * @protected + * @memberof BaseApplication + */ + protected applyAllSetting(): void; + /** + * Set a setting value to the application setting + * registry + * + * @protected + * @param {string} k setting name + * @param {*} v setting value + * @returns {void} + * @memberof BaseApplication + */ + protected registry(k: string, v: any): void; + /** + * Show the appliation + * + * @returns {void} + * @memberof BaseApplication + */ + show(): void; + /** + * Blur the application + * + * @returns {void} + * @memberof BaseApplication + */ + blur(): void; + /** + * Hide the application + * + * @returns {void} + * @memberof BaseApplication + */ + hide(): void; + /** + * Maximize or restore the application window size + * and its position + * + * @returns {void} + * @memberof BaseApplication + */ + toggle(): void; + /** + * Get the application title + * + * @returns {(string| FormattedString)} + * @memberof BaseApplication + */ + title(): string | FormattedString; + /** + * Function called when the application exit. + * If the input exit event is prevented, the application + * process will not be killed + * + * + * @protected + * @param {BaseEvent} evt exit event + * @memberof BaseApplication + */ + protected onexit(evt: BaseEvent): void; + /** + * Get the application meta-data + * + * @returns {API.PackageMetaType} + * @memberof BaseApplication + */ + meta(): API.PackageMetaType; + /** + * Base menu definition. This function + * returns the based menu definition of all applications. + * Other application specific menu entries + * should be defined in [[menu]] function + * + * @protected + * @returns {GUI.BasicItemType[]} + * @memberof BaseApplication + */ + protected baseMenu(): GUI.BasicItemType[]; + /** + * The main application entry that is called after + * the application UI is rendered. This application + * must be implemented by all subclasses + * + * @abstract + * @memberof BaseApplication + */ + abstract main(): void; + /** + * Application specific menu definition + * + * @protected + * @returns {GUI.BasicItemType[]} + * @memberof BaseApplication + */ + protected menu(): GUI.BasicItemType[]; + /** + * The cleanup function that is called by [[onexit]] function. + * Application need to override this function to perform some + * specific task before exiting or to prevent the application + * to be exited + * + * @protected + * @param {BaseEvent} e + * @memberof BaseApplication + */ + protected cleanup(e: BaseEvent): void; + /** + * Check if the loading tasks ended, + * if it the case, stop the animation + * + * @private + * @memberof BaseApplication + */ + private animation_check; + } + } +} +/// declare namespace OS { /** * Application argument type definition @@ -4835,266 +3001,1512 @@ declare namespace OS { } } declare namespace OS { - namespace API { - /** - * Simple Virtual Database (VDB) application API. - * - * This API abstracts and provides a standard way to - * connect to a server-side relational database (e.g. sqlite). - * - * Each user when connected has their own database previously - * created. All VDB operations related to that user will be - * performed on this database. - * - * The creation of user database need to be managed by the server-side API. - * The VDB API assumes that the database already exist. All operations - * is performed in tables level - * - * @export - * @class DB - */ - class DB { + namespace GUI { + namespace tag { /** - * A table name on the user's database + * A switch tag is basically used to visualize an boolean data value. * - * @private - * @type {string} - * @memberof DB + * @export + * @class SwitchTag + * @extends {AFXTag} */ - private table; - /** - *Creates an instance of DB. - * @param {string} table table name - * @memberof DB - */ - constructor(table: string); - /** - * Save data to the current table. The input - * data must conform to the table record format. - * - * On the server side, if the table doest not - * exist yet, it should be created automatically - * by inferring the data structure of the input - * object - * - * @param {GenericObject} d data object represents a current table record - * @returns {Promise} - * @memberof DB - */ - save(d: GenericObject): Promise; - /** - * delete record(s) from the current table by - * a conditional object - * - * @param {*} c conditional object, c can be: - * - * * a `number`: the operation will delete the record with `id = c` - * * a `string`: The SQL string condition that selects record to delete - * * a conditional object represents a SQL condition statement as an object, - * example: `pid = 10 AND cid = 2` is represented by: - * - * ```typescript - * { - * exp: { - * "and": { - * pid: 10, - * cid: 2 - * } - * } - * ``` - * - * @returns {Promise} - * @memberof DB - */ - delete(c: GenericObject | number | string): Promise; - /** - * Get a record in the table by its primary key - * - * @param {number} id the primary key value - * @returns {Promise>} Promise on returned record data - * @memberof DB - */ - get(id: number): Promise>; - /** - * Find records by a condition - * - * @param {GenericObject} cond conditional object - * - * a conditional object represents a SQL condition statement as an object, - * example: `pid = 10 AND cid = 2 ORDER BY date DESC` is represented by: - * - * ```typescript - * { - * exp: { - * "and": { - * pid: 10, - * cid: 2 - * } - * }, - * order: { - * date: "DESC" - * } - * } - * ``` - * @returns {Promise[]>} - * @memberof DB - */ - find(cond: GenericObject): Promise[]>; + class SwitchTag extends AFXTag { + /** + * Placeholder for the onchange event handle + * + * @private + * @type {TagEventCallback} + * @memberof SwitchTag + */ + private _onchange; + /** + * Setter: Turn on/off the switch + * + * Getter: Check whether the switch is turned on + * + * @memberof SwitchTag + */ + set swon(v: boolean); + get swon(): boolean; + /** + * Setter: Enable the switch + * + * Getter: Check whether the switch is enabled + * + * @memberof SwitchTag + */ + set enable(v: boolean); + get enable(): boolean; + /** + * Set the onchange event handle + * + * @memberof SwitchTag + */ + set onswchange(v: TagEventCallback); + /** + * Mount the tag and bind the click event to the switch + * + * @protected + * @memberof SwitchTag + */ + protected mount(): void; + /** + * This function will turn the switch (on/off) + * and trigger the onchange event + * + * @private + * @param {JQuery.ClickEvent} e + * @returns + * @memberof SwitchTag + */ + private makechange; + /** + * Tag layout definition + * + * @protected + * @returns + * @memberof SwitchTag + */ + protected layout(): { + el: string; + ref: string; + }[]; + /** + * Init the tag: + * - switch is turn off + * - switch is enabled + * + * @protected + * @memberof SwitchTag + */ + protected init(): void; + /** + * Do nothing + * + * @protected + * @memberof SwitchTag + */ + protected calibrate(): void; + /** + * Do nothing + * + * @protected + * @param {*} [d] + * @memberof SwitchTag + */ + protected reload(d?: any): void; + } } } } declare namespace OS { namespace GUI { - /** - * - * Interface for an application dock item - * - * @export - * @interface AppDockItemType - */ - interface AppDockItemType { - /** - * Reference to the application process represented - * by the dock item - * - * @type {application.BaseApplication} - * @memberof AppDockItemType - */ - app: application.BaseApplication; - /** - * Reference to the DOM element of - * the owner dock item - * - * @type {AFXTag} - * @memberof AppDockItemType - */ - domel?: AFXTag; - [propName: string]: any; - } namespace tag { /** - * This class define the AntOS system application dock tag + * Definition of system file view widget * * @export - * @class AppDockTag + * @class FileViewTag * @extends {AFXTag} */ - class AppDockTag extends AFXTag { + class FileViewTag extends AFXTag { /** - * variable holds the application select event - * callback handle + * placeholder for file select event callback * * @private - * @type {TagEventCallback} - * @memberof AppDockTag + * @type {TagEventCallback} + * @memberof FileViewTag */ - private _onappselect; + private _onfileselect; /** - * Items data of the dock + * placeholder for file open event callback * * @private - * @type {AppDockItemType[]} - * @memberof AppDockTag + * @type {TagEventCallback} + * @memberof FileViewTag */ - private _items; + private _onfileopen; /** - * Reference to the currently select application - * process in the dock + * Reference to the all selected files meta-datas * * @private - * @type {AppDockItemType} - * @memberof AppDockTag + * @type {API.FileInfoType[]} + * @memberof FileViewTag */ - private _selectedItem; + private _selectedFiles; /** - *Creates an instance of AppDockTag. - * @memberof AppDockTag + * Data placeholder of the current working directory + * + * @private + * @type {API.FileInfoType[]} + * @memberof FileViewTag + */ + private _data; + /** + * The path of the current working directory + * + * @private + * @type {string} + * @memberof FileViewTag + */ + private _path; + /** + * Header definition of the widget grid view + * + * @private + * @type {(GenericObject[])} + * @memberof FileViewTag + */ + private _header; + /** + * placeholder for the user-specified meta-data fetch function + * + * @private + * @memberof FileViewTag + */ + private _fetch; + /** + *Creates an instance of FileViewTag. + * @memberof FileViewTag */ constructor(); /** - * Implementation of the abstract function: Update the current tag. - * It do nothing for this tag + * Init the widget before mounting * * @protected - * @param {*} [d] - * @memberof AppDockTag - */ - protected reload(d?: any): void; - /** - * Init the tag before mounting - * - * @protected - * @memberof AppDockTag + * @memberof FileViewTag */ protected init(): void; /** - * The tag layout, it is empty on creation but elements will - * be added automatically to it in operation + * Update the current widget, do nothing * * @protected - * @returns {TagLayoutType[]} - * @memberof AppDockTag + * @param {*} [d] + * @memberof FileViewTag */ - protected layout(): TagLayoutType[]; + protected reload(d?: any): void; /** - * getter to get the dock items + * set the function that allows to fetch file entries. + * This handle function should return a promise on + * an arry of [[API.FileInfoType]] * - * @readonly - * @type {AppDockItemType[]} - * @memberof AppDockTag + * @memberof FileViewTag */ - get items(): AppDockItemType[]; + set fetch(v: (p: string) => Promise); + /** + * set the callback handle for the file select event. + * The parameter of the callback should be an object + * of type [[TagEventType]] with the data type `T` is [[API.FileInfoType]] + * + * @memberof FileViewTag + */ + set onfileselect(e: TagEventCallback); + /** + set the callback handle for the file open event. + * The parameter of the callback should be an object + * of type [[TagEventType]] with the data type `T` is [[API.FileInfoType]] + * + * @memberof FileViewTag + */ + set onfileopen(e: TagEventCallback); /** * Setter: * - * set the selected application in the dock - * this will trigger two event: - * - `focus`: on the selected application - * - `blur`: on all other applications on the dock + * chang the view of the widget, there are three different views + * - `icon` + * - `list` + * - `tree` * * Getter: * - * Get the current selected application - * on the dock + * Get the current view setting of the widget * - * @memberof AppDockTag + * @memberof FileViewTag */ - set selectedApp(v: application.BaseApplication); - get selectedApp(): application.BaseApplication; + set view(v: string); + get view(): string; /** - * Get selected item of the dock + * Setter: + * + * Turn on/off the changing current working directory feature + * of the widget when a directory is double clicked. If enabled, + * the widget will use the configured [[fetch]] function to query + * the content of the selected directory + * + * Getter: + * + * check whether changing current working directory feature + * is enabled + * + * @memberof FileViewTag + */ + set chdir(v: boolean); + get chdir(): boolean; + /** + * Setter : Enable or disable the status bar of the widget + * + * Getter: Check whether the status bar is enabled + * + * @memberof FileViewTag + */ + set status(v: boolean); + get status(): boolean; + /** + * Setter: + * + * Allow the widget to show or hide hidden file + * + * Getter: + * + * Check whether the hidden file should be shown in + * the widget + * + * @memberof FileViewTag + */ + set showhidden(v: boolean); + get showhidden(): boolean; + /** + * Setter: + * + * Allow multiple selection on file view + * + * Getter: + * + * Check whether the multiselection is actived + * + * @memberof FileViewTag + */ + set multiselect(v: boolean); + get multiselect(): boolean; + /** + * Get the current selected file * * @readonly - * @type {AppDockItemType} - * @memberof AppDockTag + * @type {API.FileInfoType} + * @memberof FileViewTag */ - get selectedItem(): AppDockItemType; + get selectedFile(): API.FileInfoType; /** - * When a new application process is created, this function - * will be called to add new application entry to the dock. - * The added application will becomes the current selected - * application + * Get all selected files * - * @param {AppDockItemType} item an application dock item entry - * @memberof AppDockTag + * @readonly + * @type {API.FileInfoType[]} + * @memberof FileViewTag */ - newapp(item: AppDockItemType): void; + get selectedFiles(): API.FileInfoType[]; /** - * Delete and application entry from the dock. - * This function will be called when an application - * is exit + * Setter: * - * @param {BaseApplication} a the application to be removed from the dock - * @memberof AppDockTag + * Set the path of the current working directory. + * When called the widget will refresh the current + * working directory using the configured [[fetch]] + * function + * + * Getter: + * + * Get the path of the current working directory + * + * @memberof FileViewTag */ - removeapp(a: application.BaseApplication): void; + set path(v: string); + get path(): string; /** - * Mount the current dock tag + * Setter: Set the data of the current working directory + * + * Getter: Get the data of the current working directory + * + * @memberof FileViewTag + */ + set data(v: API.FileInfoType[]); + get data(): API.FileInfoType[]; + /** + * Set the file drag and drop event handle. This allows application + * to define custom behavior of the event + * + * @memberof FileViewTag + */ + set ondragndrop(v: TagEventCallback>); + /** + * Sort file by its type + * + * @private + * @param {API.FileInfoType} a + * @param {API.FileInfoType} b + * @return {*} {number} + * @memberof FileViewTag + */ + private sortByType; + /** + * sort file by its name + * + * @private + * @param {API.FileInfoType} a first file meta-data + * @param {API.FileInfoType} b second file meta-data + * @returns {number} + * @memberof FileViewTag + */ + private sortByName; + /** + * calibrate the widget layout + * + * @memberof FileViewTag + */ + calibrate(): void; + /** + * Refresh the list view of the widget. This function + * is called when the view of the widget changed to `icon` + * + * @private + * @memberof FileViewTag + */ + private refreshList; + /** + * Refresh the grid view of the widget, this function is called + * when the view of the widget set to `list` + * + * @private + * @memberof FileViewTag + */ + private refreshGrid; + /** + * Refresh the Treeview of the widget, this function is called + * when the view of the widget set to `tree` + * + * @private + * @memberof FileViewTag + */ + private refreshTree; + /** + * Create the tree data from the list of input + * file meta-data + * + * @private + * @param {API.FileInfoType[]} data list of file meta-data + * @returns {TreeViewDataType[]} + * @memberof FileViewTag + */ + private getTreeData; + /** + * Refresh data of the current widget view + * + * @private + * @returns {void} + * @memberof FileViewTag + */ + private refreshData; + /** + * Switch between three view options + * + * @private + * @memberof FileViewTag + */ + private switchView; + /** + * This function triggers the file select event + * + * @private + * @param {API.FileInfoType} e selected file meta-data + * @memberof FileViewTag + */ + private fileselect; + /** + * This function triggers the file open event + * + * @private + * @param {API.FileInfoType} e selected file meta-data + * @memberof FileViewTag + */ + private filedbclick; + /** + * Mount the widget in the DOM tree * * @protected - * @memberof AppDockTag + * @memberof FileViewTag */ protected mount(): void; + /** + * Layout definition of the widget + * + * @protected + * @returns {TagLayoutType[]} + * @memberof FileViewTag + */ + protected layout(): TagLayoutType[]; + } + } + } +} +/// +/** + * + * Extend the HTMLElement interface with some utility function need + * by AFX API + * + * @interface HTMLElement + */ +interface HTMLElement { + /** + * Recursively update a tag and all its children + * + * @param {*} [d] data to send to all element in the DOM subtree + * @memberof HTMLElement + */ + update(d?: any): void; + /** + * + * AFX will automatically bind the context menu on an HTMLElement + * if this function is defined on that element. The function should + * define the content of the context menu and its action + * + * Once the context menu is bound to the element, all context menu handle + * defined on any child of this element will be ignored. + * + * @param {JQuery.MouseEventBase} e a mouse event + * @param {OS.GUI.tag.MenuTag} m The context menu element [[MenuTag]] + * @memberof HTMLElement + */ + contextmenuHandle(e: JQuery.MouseEventBase, m: OS.GUI.tag.MenuTag): void; + /** + * Mount the element and all the children on its DOM subtree. This action + * is performed in a top-down manner + * + * @memberof HTMLElement + */ + sync(): void; + /** + * + * This action allows to generated all the DOM nodes defined by all AFX tags + * in its hierarchy. + * It performs two operations, one top-down operation to generate all the + * necessary DOM nodes, another bottom-up operation to init all the AFX tag + * in the current element DOM hierarchy + * + * @param {OS.API.Announcer} o an AntOS observable object + * @memberof HTMLElement + */ + afxml(o: OS.API.Announcer): void; + /** + * Perform DOM generation ([[afxml]]) then mount ([[sync]]) all the + * elements. + * + * @param {OS.API.Announcer} o an AntOS observable object + * @param {boolean} [flag] indicates whether this is the top-most call of the operation + * @memberof HTMLElement + */ + uify(o: OS.API.Announcer, flag?: boolean): void; + /** + * + * + * @type {*} + * @memberof HTMLElement + */ + mozRequestFullScreen: any; + /** + * + * + * @type {*} + * @memberof HTMLElement + */ + webkitRequestFullscreen: any; + /** + * + * + * @type {*} + * @memberof HTMLElement + */ + msRequestFullscreen: any; +} +/** + * + * + * @interface Document + */ +interface Document { + mozCancelFullScreen: any; + webkitExitFullscreen: any; + cancelFullScreen: any; +} +declare namespace OS { + namespace GUI { + /** + * [[TagLayoutType]] interface using by AFX tags to defined + * its internal DOM hierarchy + * + * @export + * @interface TagLayoutType + */ + interface TagLayoutType { + /** + * Element tag name + * + * @type {string} + * @memberof TagLayoutType + */ + el: string; + /** + * Children layout of the current element + * + * @type {TagLayoutType[]} + * @memberof TagLayoutType + */ + children?: TagLayoutType[]; + /** + * Reference name of the element used by AFX Tag + * + * @type {string} + * @memberof TagLayoutType + */ + ref?: string; + /** + * CSS class of the element + * + * @type {string} + * @memberof TagLayoutType + */ + class?: string; + /** + * this is the `data-id` attribute of the element, + * can be query by the [[aid]] Tag API function. + * Not to be confused with the DOM `id` attribute + * + * @type {(string | number)} + * @memberof TagLayoutType + */ + id?: string | number; + /** + * Tooltip text of the element + * + * @type {(string | FormattedString)} + * @memberof TagLayoutType + */ + tooltip?: string | FormattedString; + /** + * `data-width` of the element, not to be confused with + * the `width` attribute of the DOM element + * + * @type {number|string} + * @memberof TagLayoutType + */ + width?: number | string; + /** + ** `data-height` of the element, not to be confused with + * the `height` attribute of the DOM element + * + * @type {number|string} + * @memberof TagLayoutType + */ + height?: number | string; + } + /** + * Data type for event issued by AFX tags + * + * @export + * @interface TagEventDataType + * @template T item template + */ + interface TagEventDataType { + /** + * Reference to the item involved in the event + * + * @type {T} + * @memberof TagEventDataType + */ + item?: T; + [propName: string]: any; + } + /** + * Format of the event issued by AFX tags + * + * @export + * @interface TagEventType + * @template T data type + */ + interface TagEventType { + /** + * `data-id` of the tag that trigger the + * event + * + * @type {(number | string)} + * @memberof TagEventType + */ + id: number | string; + /** + * Data object of the event + * + * @type {T} + * @memberof TagEventType + */ + data: T; + } + /** + * Drag and Drop data type sent between mouse events + * + * @export + * @interface DnDEventDataType + * @template T + */ + interface DnDEventDataType { + /** + * Reference to the source DOM element + * + * @type {T} + * @memberof DnDEventDataType + */ + from: T[]; + /** + * Reference to the target DOM element + * + * @type {T} + * @memberof DnDEventDataType + */ + to: T; + } + /** + * Tag event callback type + */ + type TagEventCallback = (e: TagEventType) => void; + /** + * Base abstract class for tag implementation, any AFX tag should be + * subclass of this class + * + * @export + * @abstract + * @class AFXTag + * @extends {HTMLElement} + */ + abstract class AFXTag extends HTMLElement { + /** + * The announcer object of the tag + * + * @type {API.Announcer} + * @memberof AFXTag + */ + observable: API.Announcer; + /** + * Reference to some of the tag's children + * element. This reference object is built + * based on the `ref` property found in the + * tag layout [[TagLayoutType]] + * + * @protected + * @type {GenericObject} + * @memberof AFXTag + */ + protected refs: GenericObject; + /** + * boolean value indicated whether the tag + * is already mounted in the DOM tree + * + * @protected + * @type {boolean} + * @memberof AFXTag + */ + protected _mounted: boolean; + /** + *Creates an instance of AFXTag. + * @memberof AFXTag + */ + constructor(); + /** + * This function verifies if a property name of the input object + * corresponds to a setter of the current tag. If this is the + * case, it sets the value of that property to the setter + * + * @param {GenericObject} v input object + * @memberof AFXTag + */ + set(v: GenericObject): void; + /** + * Setter to set the tooltip text to the current tag. + * The text should be in the following format: + * ```text + * cr|cl|ct|cb: tooltip text + * ``` + * + * @memberof AFXTag + */ + set tooltip(v: string); + /** + * + * This function looking for a property name of the tag + * in its prototype chain. The descriptor of the property + * will be returned if it exists + * + * @private + * @param {string} k the property name to be queried + * @returns {PropertyDescriptor} the property descriptor or undefined + * @memberof AFXTag + */ + private descriptor_of; + /** + * Setter: set the id of the tag in string or number + * + * Getter: get the id of the current tag + * + * @memberof AFXTag + */ + set aid(v: string | number); + get aid(): string | number; + /** + * Implementation from HTMLElement interface, + * this function mount the current tag hierarchy + * + * @returns {void} + * @memberof AFXTag + */ + sync(): void; + /** + * Generate the DOM hierarchy of the current tag + * + * @param {API.Announcer} o observable object + * @memberof AFXTag + */ + afxml(o: API.Announcer): void; + /** + * Update the current tag hierarchy + * + * @param {*} d any data object + * @memberof AFXTag + */ + update(d: any): void; + /** + * Init the current tag, this function + * is called before the [[mount]] function + * + * @protected + * @abstract + * @memberof AFXTag + */ + protected abstract init(): void; + /** + * Mount only the current tag + * + * @protected + * @abstract + * @memberof AFXTag + */ + protected abstract mount(): void; + /** + * Layout definition of a tag + * + * @protected + * @abstract + * @returns {TagLayoutType[]} tag layout object + * @memberof AFXTag + */ + protected abstract layout(): TagLayoutType[]; + /** + * Update only the current tag, this function is + * called by [[update]] before chaining the + * update process to its children + * + * @protected + * @abstract + * @param {*} [d] + * @memberof AFXTag + */ + protected abstract reload(d?: any): void; + /** + * This function is used to re-render the current + * tag + * + * @protected + * @memberof AFXTag + */ + protected calibrate(): void; + /** + * This function parses the input layout object + * and generates all the elements defined by + * the tag + * + * @private + * @param {TagLayoutType} tag tag layout object + * @returns {Element} the DOM element specified by the tag layout + * @memberof AFXTag + */ + private mkui; + /** + * This function inserts or removes an attribute name + * to/from the target element based on the input `flag`. + * + * @protected + * @param {boolean} flag indicates whether the attribute name should be inserted o removed + * @param {string} v the attribute name + * @param {HTMLElement} [el] the target element + * @memberof AFXTag + */ + protected attsw(flag: boolean, v: string, el?: HTMLElement): void; + /** + * Insert the attribute name to the target element + * + * @protected + * @param {string} v the attribute name + * @param {HTMLElement} [el] the target element + * @memberof AFXTag + */ + protected atton(v: string, el?: HTMLElement): void; + /** + * Remove the attribute name from the target element + * + * @protected + * @param {string} v attribute name + * @param {HTMLElement} [el] the target element + * @memberof AFXTag + */ + protected attoff(v: string, el?: HTMLElement): void; + /** + * Verify if the target element has an attribute name + * + * @protected + * @param {string} v attribute name + * @param {HTMLElement} [el] target element + * @returns {boolean} + * @memberof AFXTag + */ + protected hasattr(v: string, el?: HTMLElement): boolean; + } + /** + * All the AFX tags are defined in this namespace, + * these tags are defined as custom DOM elements and will be + * stored in the `customElements` registry of the browser + */ + namespace tag { + /** + * Define an AFX tag as a custom element and add it to the + * global `customElements` registry. If the tag is redefined, i.e. + * the tag already exists, its behavior will be updated with the + * new definition + * + * @export + * @template T all classes that extends [[AFXTag]] + * @param {string} name name of the tag + * @param {{ new (): T }} cls the class that defines the tag + * @returns {void} + */ + function define(name: string, cls: { + new (): T; + }): void; + } + } +} +declare namespace OS { + namespace GUI { + namespace tag { + /** + * List item event data type + */ + type ListItemEventData = TagEventDataType; + /** + * A list item represent the individual view of an item in the [[ListView]]. + * This class is an abstract prototype class, implementation of any + * list view item should extend it + * + * + * @export + * @abstract + * @class ListViewItemTag + * @extends {AFXTag} + */ + abstract class ListViewItemTag extends AFXTag { + /** + * Data placeholder for the list item + * + * @private + * @type {GenericObject} + * @memberof ListViewItemTag + */ + private _data; + /** + * placeholder for the item select event callback + * + * @private + * @type {TagEventCallback} + * @memberof ListViewItemTag + */ + private _onselect; + /** + * Context menu event callback handle + * + * @private + * @type {TagEventCallback} + * @memberof ListViewItemTag + */ + private _onctxmenu; + /** + * Click event callback placeholder + * + * @private + * @type {TagEventCallback} + * @memberof ListViewItemTag + */ + private _onclick; + /** + * Double click event callback handle + * + * @private + * @type {TagEventCallback} + * @memberof ListViewItemTag + */ + private _ondbclick; + /** + * Item close event callback placeholder + * + * @private + * @type {TagEventCallback} + * @memberof ListViewItemTag + */ + private _onclose; + /** + *Creates an instance of ListViewItemTag. + * @memberof ListViewItemTag + */ + constructor(); + /** + * Setter: Turn on/off the `closable` feature of the list item + * + * Getter: Check whether the item is closable + * + * @memberof ListViewItemTag + */ + set closable(v: boolean); + get closable(): boolean; + /** + * Set item select event handle + * + * @memberof ListViewItemTag + */ + set onitemselect(v: TagEventCallback); + /** + * Setter: select/unselect the current item + * + * Getter: Check whether the current item is selected + * + * @memberof ListViewItemTag + */ + set selected(v: boolean); + get selected(): boolean; + /** + * Set the context menu event handle + * + * @memberof ListViewItemTag + */ + set onctxmenu(v: TagEventCallback); + /** + * Set the item click event handle + * + * @memberof ListViewItemTag + */ + set onitemclick(v: TagEventCallback); + /** + * Set the item double click event handle + * + * @memberof ListViewItemTag + */ + set onitemdbclick(v: TagEventCallback); + /** + * set the item close event handle + * + * @memberof ListViewItemTag + */ + set onitemclose(v: TagEventCallback); + /** + * Mount the tag and bind some events + * + * @protected + * @memberof ListViewItemTag + */ + protected mount(): void; + /** + * Layout definition of the item tag. + * This function define the outer layout of the item. + * Custom inner layout of each item implementation should + * be defined in [[itemlayout]] + * + * @protected + * @returns {TagLayoutType[]} + * @memberof ListViewItemTag + */ + protected layout(): TagLayoutType[]; + /** + * Setter: + * + * Set the data of the list item. This will + * trigger the [[ondatachange]] function + * + * Getter: + * + * Get the data of the current list item + * + * @memberof ListViewItemTag + */ + set data(v: GenericObject); + get data(): GenericObject; + /** + * Any subclass of this class should implement this + * function to provide its custom item layout + * + * @protected + * @abstract + * @returns {TagLayoutType} + * @memberof ListViewItemTag + */ + protected abstract itemlayout(): TagLayoutType; + /** + * This function is called when the item data is changed. + * It should be implemented in all subclass of this class + * + * @protected + * @abstract + * @memberof ListViewItemTag + */ + protected abstract ondatachange(): void; + } + /** + * The layout of a simple list item contains only a + * AFX label + * + * @export + * @class SimpleListItemTag + * @extends {ListViewItemTag} + */ + class SimpleListItemTag extends ListViewItemTag { + /** + *Creates an instance of SimpleListItemTag. + * @memberof SimpleListItemTag + */ + constructor(); + /** + * Reset some property to default + * + * @protected + * @memberof SimpleListItemTag + */ + protected init(): void; + /** + * Do nothing + * + * @protected + * @memberof SimpleListItemTag + */ + protected calibrate(): void; + /** + * Refresh the inner label when the item data + * is changed + * + * @protected + * @returns {void} + * @memberof SimpleListItemTag + */ + protected ondatachange(): void; + /** + * Re-render the list item + * + * @protected + * @memberof SimpleListItemTag + */ + protected reload(): void; + /** + * List item custom layout definition + * + * @protected + * @returns {TagLayoutType} + * @memberof SimpleListItemTag + */ + protected itemlayout(): TagLayoutType; + } + /** + * This tag defines a traditional or a dropdown list widget. + * It contains a collection of list items in which layout + * of each item may be variable + * + * @export + * @class ListViewTag + * @extends {AFXTag} + */ + class ListViewTag extends AFXTag { + /** + * placeholder of list select event handle + * + * @private + * @type {TagEventCallback} + * @memberof ListViewTag + */ + private _onlistselect; + /** + * placeholder of list double click event handle + * + * @private + * @type {TagEventCallback} + * @memberof ListViewTag + */ + private _onlistdbclick; + /** + * placeholder of list drag and drop event handle + * + * @private + * @type {TagEventCallback>} + * @memberof ListViewTag + */ + private _ondragndrop; + /** + * placeholder of list item close event handle + * + * @private + * @memberof ListViewTag + */ + private _onitemclose; + /** + * placeholder of drag and drop mouse down event handle + * + * @private + * @memberof ListViewTag + */ + private _onmousedown; + /** + * placeholder of drag and drop mouse up event handle + * + * @private + * @memberof ListViewTag + */ + private _onmouseup; + /** + * placeholder of drag and drop mouse move event handle + * + * @private + * @memberof ListViewTag + */ + private _onmousemove; + /** + * Reference to the latest selected DOM item + * + * @private + * @type {ListViewItemTag} + * @memberof ListViewTag + */ + private _selectedItem; + /** + * A collection of selected items in the list. + * The maximum size of this collection is 1 if + * the [[multiselect]] feature is disabled + * + * @private + * @type {ListViewItemTag[]} + * @memberof ListViewTag + */ + private _selectedItems; + /** + * Data placeholder of the list + * + * @private + * @type {GenericObject[]} + * @memberof ListViewTag + */ + private _data; + /** + * Event data passing between mouse event when performing + * drag and drop on the list + * + * @private + * @type {{ from: ListViewItemTag[]; to: ListViewItemTag }} + * @memberof ListViewTag + */ + private _dnd; + /** + *Creates an instance of ListViewTag. + * @memberof ListViewTag + */ + constructor(); + /** + * Reset the tag's properties to the default values + * + * @protected + * @memberof ListViewTag + */ + protected init(): void; + /** + * This function does nothing + * + * @protected + * @param {*} [d] + * @memberof ListViewTag + */ + protected reload(d?: any): void; + /** + * Setter: toggle between dropdown and traditional list + * + * Getter: Check whether the list is dropdown or traditional list + * + * @memberof ListViewTag + */ + set dropdown(v: boolean); + /** + * Set drag and drop event handle + * + * @memberof ListViewTag + */ + set ondragndrop(v: TagEventCallback>); + /** + * Set list select event handle + * + * @memberof ListViewTag + */ + set onlistselect(v: TagEventCallback); + /** + * Set double click event handle + * + * @memberof ListViewTag + */ + set onlistdbclick(v: TagEventCallback); + /** + * Set item close event handle + * + * @memberof ListViewTag + */ + set onitemclose(v: (e: TagEventType) => boolean); + get dropdown(): boolean; + /** + * Setter: + * + * Set the default tag name of list's items. + * If the tag name is not specified in the + * data of a list item, this tag will be used + * + * Getter: + * + * Get the default tag name of list item + * + * @memberof ListViewTag + */ + set itemtag(v: string); + get itemtag(): string; + /** + * Setter: + * + * Turn on/off of the `multiselect` feature + * + * Getter: + * + * Check whether multi-select is allowed + * in this list + * + * @memberof ListViewTag + */ + set multiselect(v: boolean); + get multiselect(): boolean; + /** + * Setter: Enable/disable drag and drop event in the list + * + * Getter: Check whether the drag and drop event is enabled + * + * @memberof ListViewTag + */ + set dragndrop(v: boolean); + get dragndrop(): boolean; + /** + * Set the buttons layout of the list. + * Button layout allows to add some custom + * behaviors to the list. + * + * Each button data should define the [[onbtclick]] + * event handle to specify the custom behavior + * + * When the list is configured as dropdown. The buttons + * layout will be disabled + * + * Example of a button data: + * + * ``` + * { + * text: "Button text", + * icon: "home://path/to/icon.png", + * iconclass: "icon-class-name", + * onbtclick: (e) => console.log(e) + * } + * ``` + * + * @memberof ListViewTag + */ + set buttons(v: GenericObject[]); + /** + * Getter: Get data of the list + * + * Setter: Set data to the list + * + * @type {GenericObject[]} + * @memberof ListViewTag + */ + get data(): GenericObject[]; + set data(data: GenericObject[]); + /** + * Do nothing + * + * @protected + * @memberof ListViewTag + */ + protected ondatachange(): void; + /** + * Setter: Select list item(s) by their indexes + * + * Getter: Get the indexes of all selected items + * + * @memberof ListViewTag + */ + set selected(idx: number | number[]); + /** + * Get the latest selected item + * + * @readonly + * @type {ListViewItemTag} + * @memberof ListViewTag + */ + get selectedItem(): ListViewItemTag; + /** + * Get all the selected items + * + * @readonly + * @type {ListViewItemTag[]} + * @memberof ListViewTag + */ + get selectedItems(): ListViewItemTag[]; + get selected(): number | number[]; + /** + * Add an item to the beginning of the list + * + * @param {GenericObject} item + * @returns {ListViewItemTag} the added list item element + * @memberof ListViewTag + */ + unshift(item: GenericObject): ListViewItemTag; + /** + * check whether the list has data + * + * @private + * @param {GenericObject} v + * @returns + * @memberof ListViewTag + */ + private has_data; + /** + * Add an item to the beginning or end of the list + * + * @param {GenericObject} item list item data + * @param {boolean} [flag] indicates whether to add the item in the beginning of the list + * @returns {ListViewItemTag} the added list item element + * @memberof ListViewTag + */ + push(item: GenericObject, flag?: boolean): ListViewItemTag; + /** + * Delete an item + * + * @param {ListViewItemTag} item item DOM element + * @memberof ListViewTag + */ + delete(item: ListViewItemTag): void; + /** + * Select item next to the currently selected item. + * If there is no item selected, the first item will + * be selected + * + * @returns {void} + * @memberof ListViewTag + */ + selectNext(): void; + /** + * Select the previous item in the list. + * + * @returns {void} + * @memberof ListViewTag + */ + selectPrev(): void; + /** + * Unselect all the selected items in the list + * + * @returns {void} + * @memberof ListViewTag + */ + unselect(): void; + /** + * This function triggers the click event on an item + * + * @private + * @param {TagEventType} e tag event object + * @param {boolean} flag indicates whether this is a double click event + * @returns {void} + * @memberof ListViewTag + */ + private iclick; + /** + * This function triggers the double click event on an item + * + * @private + * @param {TagEventType} e tag event object + * @returns + * @memberof ListViewTag + */ + private idbclick; + /** + * This function triggers the list item select event + * + * @private + * @param {TagEventType} e tag event object + * @returns + * @memberof ListViewTag + */ + private iselect; + /** + * Mount the tag and bind some basic event + * + * @protected + * @returns {void} + * @memberof ListViewTag + */ + protected mount(): void; + /** + * This function triggers the item close event + * + * @private + * @param {TagEventType} e tag event object + * @returns {void} + * @memberof ListViewTag + */ + private iclose; + /** + * Show the dropdown list. + * This function is called only when the list is a dropdown + * list + * + * @protected + * @param {*} e + * @returns {void} + * @memberof ListViewTag + */ + protected showlist(e: any): void; + /** + * Hide the dropdown list. + * This function is called only when the list is a dropdown + * list + * + * @protected + * @param {*} e + * @memberof ListViewTag + */ + protected dropoff(e: any): void; + /** + * calibrate the list layout + * + * @protected + * @returns {void} + * @memberof ListViewTag + */ + protected calibrate(): void; + /** + * List view layout definition + * + * @protected + * @returns {TagLayoutType[]} + * @memberof ListViewTag + */ + protected layout(): TagLayoutType[]; } } } @@ -5197,184 +4609,273 @@ declare namespace OS { namespace GUI { namespace tag { /** - * This class defines basic AFX label tag. - * A label contains a text and an icon (optional) + * Tag event data type definition + */ + type TabEventData = TagEventDataType; + /** + * a TabBar allows to control a collection of tabs * * @export - * @class LabelTag + * @class TabBarTag * @extends {AFXTag} */ - class LabelTag extends AFXTag { + export class TabBarTag extends AFXTag { /** - * placeholder of the text to be displayed + * Placeholder of currently selected tab index * * @private - * @type {(string | FormattedString)} - * @memberof LabelTag + * @type {number} + * @memberof TabBarTag */ - private _text; + private _selected; /** - *Creates an instance of LabelTag. - * @memberof LabelTag + * Placeholder of tab close event handle + * + * @private + * @memberof TabBarTag + */ + private _ontabclose; + /** + * Placeholder of tab select event handle + * + * @private + * @type {TagEventCallback} + * @memberof TabBarTag + */ + private _ontabselect; + /** + *Creates an instance of TabBarTag. + * @memberof TabBarTag */ constructor(); /** - * this implementation does nothing in this tag + * Init the tag * * @protected - * @memberof LabelTag - */ - protected mount(): void; - /** - * Refresh the text in the label - * - * @protected - * @param {*} d - * @memberof LabelTag - */ - protected reload(d: any): void; - /** - * Reset to default some property value - * - * @protected - * @memberof LabelTag + * @memberof TabBarTag */ protected init(): void; - /** - * This implementation of the function does nothing - * - * @protected - * @memberof LabelTag - */ - protected calibrate(): void; - /** - * Set the VFS path of the label icon - * - * @memberof LabelTag - */ - set icon(v: string); - /** - * Set the CSS class of the label icon - * - * @memberof LabelTag - */ - set iconclass(v: string); - /** - * Setter: Set the text of the label - * - * Getter: Get the text displayed on the label - * - * @memberof LabelTag - */ - set text(v: string | FormattedString); - get text(): string | FormattedString; - /** - * Lqbel layout definition - * - * @protected - * @returns {TagLayoutType[]} - * @memberof LabelTag - */ - protected layout(): TagLayoutType[]; - } - } - } -} -declare namespace OS { - namespace GUI { - namespace tag { - /** - * A switch tag is basically used to visualize an boolean data value. - * - * @export - * @class SwitchTag - * @extends {AFXTag} - */ - class SwitchTag extends AFXTag { - /** - * Placeholder for the onchange event handle - * - * @private - * @type {TagEventCallback} - * @memberof SwitchTag - */ - private _onchange; - /** - * Setter: Turn on/off the switch - * - * Getter: Check whether the switch is turned on - * - * @memberof SwitchTag - */ - set swon(v: boolean); - get swon(): boolean; - /** - * Setter: Enable the switch - * - * Getter: Check whether the switch is enabled - * - * @memberof SwitchTag - */ - set enable(v: boolean); - get enable(): boolean; - /** - * Set the onchange event handle - * - * @memberof SwitchTag - */ - set onswchange(v: TagEventCallback); - /** - * Mount the tag and bind the click event to the switch - * - * @protected - * @memberof SwitchTag - */ - protected mount(): void; - /** - * This function will turn the switch (on/off) - * and trigger the onchange event - * - * @private - * @param {JQuery.ClickEvent} e - * @returns - * @memberof SwitchTag - */ - private makechange; - /** - * Tag layout definition - * - * @protected - * @returns - * @memberof SwitchTag - */ - protected layout(): { - el: string; - ref: string; - }[]; - /** - * Init the tag: - * - switch is turn off - * - switch is enabled - * - * @protected - * @memberof SwitchTag - */ - protected init(): void; - /** - * Do nothing - * - * @protected - * @memberof SwitchTag - */ - protected calibrate(): void; /** * Do nothing * * @protected * @param {*} [d] - * @memberof SwitchTag + * @memberof TabBarTag */ protected reload(d?: any): void; + /** + * Setter: Enable/disable a tab to be closed + * + * Getter: Check whether tabs can be closed + * + * @memberof TabBarTag + */ + set closable(v: boolean); + get closable(): boolean; + /** + * Add a tab in the end of the tab bar + * + * @param {GenericObject} item tab data + * @memberof TabBarTag + */ + push(item: GenericObject): ListViewItemTag; + /** + * Delete a tab + * + * @param {ListViewItemTag} el reference to DOM element of a tab + * @memberof TabBarTag + */ + delete(el: ListViewItemTag): void; + /** + * Add a tab to the beginning of the tab bar + * + * @param {GenericObject} item tab data + * @memberof TabBarTag + */ + unshift(item: GenericObject): ListViewItemTag; + /** + * Setter: Set tabs data + * + * Getter: Get all tabs data + * + * @memberof TabBarTag + */ + set items(v: GenericObject[]); + get items(): GenericObject[]; + /** + * Setter: Select a tab by its index + * + * Getter: Get the currently selected tab + * + * @memberof TabBarTag + */ + set selected(v: number | number[]); + get selected(): number | number[]; + /** + * Set the tab close event handle + * + * @memberof TabBarTag + */ + set ontabclose(v: (e: TagEventType) => boolean); + /** + * Set the tab select event handle + * + * @memberof TabBarTag + */ + set ontabselect(v: TagEventCallback); + /** + * Mount the tab bar and bind some basic events + * + * @protected + * @memberof TabBarTag + */ + protected mount(): void; + /** + * TabBar layout definition + * + * @protected + * @returns {TagLayoutType[]} + * @memberof TabBarTag + */ + protected layout(): TagLayoutType[]; + } + export {}; + } + } +} +declare namespace OS { + namespace GUI { + /** + * Color type used by AFX API + * + * @export + * @interface ColorType + */ + interface ColorType { + /** + * Red chanel + * + * @type {number} + * @memberof ColorType + */ + r: number; + /** + * Green chanel + * + * @type {number} + * @memberof ColorType + */ + g: number; + /** + * Blue chanel + * + * @type {number} + * @memberof ColorType + */ + b: number; + /** + * Alpha chanel + * + * @type {number} + * @memberof ColorType + */ + a?: number; + /** + * color text in CSS format + * + * @type {string} + * @memberof ColorType + */ + text?: string; + /** + * Color in hex format + * + * @type {string} + * @memberof ColorType + */ + hex?: string; + } + namespace tag { + /** + * Class definition of Color picker widget + * + * @export + * @class ColorPickerTag + * @extends {AFXTag} + */ + class ColorPickerTag extends AFXTag { + /** + * The current selected color object + * + * @private + * @type {ColorType} + * @memberof ColorPickerTag + */ + private _selectedColor; + /** + * placeholder for the color select event callback + * + * @private + * @type {TagEventCallback} + * @memberof ColorPickerTag + */ + private _oncolorselect; + /** + * Creates an instance of ColorPickerTag. + * @memberof ColorPickerTag + */ + constructor(); + /** + * Init tag before mounting, do nothing + * + * @protected + * @memberof ColorPickerTag + */ + protected init(): void; + /** + * Reload tag, do nothing + * + * @protected + * @param {*} [d] + * @memberof ColorPickerTag + */ + protected reload(d?: any): void; + /** + * Get selected color value + * + * @readonly + * @type {ColorType} + * @memberof ColorPickerTag + */ + get selectedColor(): ColorType; + /** + * Set the color select event handle + * + * @memberof ColorPickerTag + */ + set oncolorselect(v: TagEventCallback); + /** + * Mount the widget to DOM tree + * + * @protected + * @memberof ColorPickerTag + */ + protected mount(): void; + /** + * Build the color palette + * + * @private + * @memberof ColorPickerTag + */ + private build_palette; + /** + * layout definition of the widget + * + * @protected + * @returns {TagLayoutType[]} + * @memberof ColorPickerTag + */ + protected layout(): TagLayoutType[]; } } } @@ -5543,81 +5044,1354 @@ declare namespace OS { namespace GUI { namespace tag { /** - * Meta tag that represents the virtual desktop environment. - * In near future, we may have multiple virtual desktop environments. - * Each desktop environment has a simple file manager and a window - * manager that render the window in a specific order. + * This class defines basic AFX label tag. + * A label contains a text and an icon (optional) * * @export - * @class DesktopTag - * @extends {FloatListTag} + * @class LabelTag + * @extends {AFXTag} */ - class DesktopTag extends FloatListTag { + class LabelTag extends AFXTag { /** - * internal handle to the desktop file location + * placeholder of the text to be displayed * * @private - * @type {API.VFS.BaseFileHandle} - * @memberof DesktopTag + * @type {(string | FormattedString)} + * @memberof LabelTag */ - private file; + private _text; /** - * local observer that detect if a new child element is - * added or removed - * - * @private - * @type {MutationObserver} - * @memberof DesktopTag - */ - private observer; - /** - * Internal list of the current opened window - * - * @private - * @type {Set} - * @memberof DesktopTag - */ - private window_list; - /** - * Creates an instance of DesktopTag. - * @memberof DesktopTag + *Creates an instance of LabelTag. + * @memberof LabelTag */ constructor(); /** - * Mount the virtual desktop to the DOM tree + * this implementation does nothing in this tag * * @protected - * @memberof DesktopTag + * @memberof LabelTag */ protected mount(): void; /** - * Display all files and folders in the specific desktop location + * Refresh the text in the label * - * @return {*} {Promise} - * @memberof DesktopTag + * @protected + * @param {*} d + * @memberof LabelTag */ - refresh(): Promise; + protected reload(d: any): void; /** - * Remove this element from its parent + * Reset to default some property value * - * @memberof DesktopTag + * @protected + * @memberof LabelTag */ - remove(): void; + protected init(): void; /** - * Active a window above all other windows + * This implementation of the function does nothing + * + * @protected + * @memberof LabelTag + */ + protected calibrate(): void; + /** + * Set the VFS path of the label icon + * + * @memberof LabelTag + */ + set icon(v: string); + /** + * Set the CSS class of the label icon + * + * @memberof LabelTag + */ + set iconclass(v: string); + /** + * Setter: Set the text of the label + * + * Getter: Get the text displayed on the label + * + * @memberof LabelTag + */ + set text(v: string | FormattedString); + get text(): string | FormattedString; + /** + * Setter: Turn on/off text selection + * + * Getter: Check whether the label is selectable + * + * @memberof LabelTag + */ + set selectable(v: boolean); + get swon(): boolean; + /** + * Lqbel layout definition + * + * @protected + * @returns {TagLayoutType[]} + * @memberof LabelTag + */ + protected layout(): TagLayoutType[]; + } + } + } +} +declare namespace OS { + namespace GUI { + /** + * Tab container data type definition + * + * @export + * @interface TabContainerTabType + */ + interface TabContainerTabType { + /** + * Reference to the DOM element of the current container + * + * @type {HTMLElement} + * @memberof TabContainerTabType + */ + container: HTMLElement; + [propName: string]: any; + } + namespace tag { + /** + * A tab container allows to attach each tab on a [[TabBarTag]] + * with a container widget. The attached container widget should be + * composed inside a [[HBoxTag]] + * + * The tab bar in a tab container can be configured to display tabs + * in horizontal (row) or vertical (column) order. Default to vertical order + * + * Once a tab is selected, its attached container will be shown + * + * @export + * @class TabContainerTag + * @extends {AFXTag} + */ + class TabContainerTag extends AFXTag { + /** + * Reference to the currently selected tab DOM element * * @private - * @param {WindowTag} win - * @memberof DesktopTag + * @type {TabContainerTabType} + * @memberof TabContainerTag */ - private selectWindow; + private _selectedTab; /** - * Render all windows in order from bottom to top + * Placeholder of the tab select event handle * * @private - * @memberof DesktopTag + * @type {TagEventCallback} + * @memberof TabContainerTag */ - private render; + private _ontabselect; + /** + *Creates an instance of TabContainerTag. + * @memberof TabContainerTag + */ + constructor(); + /** + * Init the tab bar direction to vertical (column) + * + * @protected + * @memberof TabContainerTag + */ + protected init(): void; + /** + * Do nothing + * + * @protected + * @param {*} [d] + * @memberof TabContainerTag + */ + protected reload(d?: any): void; + /** + * Set the tab select event handle + * + * @memberof TabContainerTag + */ + set ontabselect(f: TagEventCallback); + /** + * Get all tab items in the container + * + * @readonly + * @type {TabContainerTabType[]} + * @memberof TabContainerTag + */ + get tabs(): TabContainerTabType[]; + /** + * Select a tab by its index + * + * @memberof TabContainerTag + */ + set selectedIndex(i: number); + /** + * Setter: + * + * Set the tab bar direction: + * - `row`: horizontal direction + * - `column`: vertical direction + * + * Getter: + * + * Get the tab bar direction + * + * @memberof TabContainerTag + */ + set dir(v: "row" | "column"); + get dir(): "row" | "column"; + /** + * Setter: + * + * Select a tab using the its tab data type. + * This will show the attached container to the tab + * + * Getter: + * + * Get the tab data of the currently selected Tab + * + * @memberof TabContainerTag + */ + set selectedTab(v: TabContainerTabType); + get selectedTab(): TabContainerTabType; + /** + * Set the tab bar width, this function only + * works when the tab bar direction is set to + * `row` + * + * @memberof TabContainerTag + */ + set tabbarwidth(v: number); + /** + * Set the tab bar height, this function only works + * when the tab bar direction is set to `column` + * + * @memberof TabContainerTag + */ + set tabbarheight(v: number); + /** + * Add a new tab with container to the container + * + * item should be in the following format: + * + * ```ts + * { + * text: string, + * icon?: string, + * iconclass?: string, + * container: HTMLElement + * } + * ``` + * + * @param {GenericObject} item tab descriptor + * @param {boolean} insert insert the tab content to the container ? + * @returns {ListViewItemTag} the tab DOM element + * @memberof TabContainerTag + */ + addTab(item: GenericObject, insert: boolean): ListViewItemTag; + /** + * Remove a tab from the container + * + * @param {ListViewItemTag} tab the tab item to be removed + * @memberof TabContainerTag + */ + removeTab(tab: ListViewItemTag): void; + /** + * Mount the tag and bind basic events + * + * @protected + * @memberof TabContainerTag + */ + protected mount(): void; + /** + * calibrate the tab container + * + * @memberof TabContainerTag + */ + calibrate(): void; + /** + * Layout definition + * + * @protected + * @returns {TagLayoutType[]} + * @memberof TabContainerTag + */ + protected layout(): TagLayoutType[]; + } + } + } +} +/** + * Extend the Array interface with some + * property needed by AFX API + * + * @interface Array + * @template T + */ +interface Array { + /** + * Reference to a DOM element created by AFX API, + * this property is used by some AFX tags to refer + * to its child element in it data object + * + * @type {GenericObject} + * @memberof Array + */ + domel?: GenericObject; +} +declare namespace OS { + namespace GUI { + namespace tag { + /** + * Row item event data type + */ + type GridRowEventData = TagEventDataType; + /** + * A grid Row is a simple element that + * contains a group of grid cell + * + * @export + * @class GridRowTag + * @extends {AFXTag} + */ + class GridRowTag extends AFXTag { + /** + * Data placeholder for a collection of cell data + * + * @type {GenericObject[]} + * @memberof GridRowTag + */ + data: GenericObject[]; + /** + * placeholder for the row select event callback + * + * @private + * @type {TagEventCallback} + * @memberof ListViewItemTag + */ + private _onselect; + /** + *Creates an instance of GridRowTag. + * @memberof GridRowTag + */ + constructor(); + /** + * Set item select event handle + * + * @memberof ListViewItemTag + */ + set onrowselect(v: TagEventCallback); + /** + * Setter: select/unselect the current item + * + * Getter: Check whether the current item is selected + * + * @memberof ListViewItemTag + */ + set selected(v: boolean); + get selected(): boolean; + /** + * Mount the tag, do nothing + * + * @protected + * @memberof GridRowTag + */ + protected mount(): void; + /** + * Init the tag before mounting: reset the data placeholder + * + * @protected + * @memberof GridRowTag + */ + protected init(): void; + /** + * Empty layout + * + * @protected + * @returns {TagLayoutType[]} + * @memberof GridRowTag + */ + protected layout(): TagLayoutType[]; + /** + * This function does nothing in this tag + * + * @protected + * @memberof GridRowTag + */ + protected calibrate(): void; + /** + * This function does nothing in this tag + * + * @protected + * @param {*} [d] + * @memberof GridRowTag + */ + protected reload(d?: any): void; + } + /** + * Event data used by grid cell + */ + type CellEventData = TagEventDataType; + /** + * Prototype of any grid cell, custom grid cell + * definition should extend and implement this + * abstract prototype + * + * @export + * @abstract + * @class GridCellPrototype + * @extends {AFXTag} + */ + abstract class GridCellPrototype extends AFXTag { + /** + * placeholder for cell selected event callback + * + * @private + * @type {TagEventCallback} + * @memberof GridCellPrototype + */ + private _oncellselect; + /** + * placeholder for cell double click event callback + * + * @private + * @type {TagEventCallback} + * @memberof GridCellPrototype + */ + private _oncelldbclick; + /** + * Data placeholder of the current cell + * + * @private + * @type {GenericObject} + * @memberof GridCellPrototype + */ + private _data; + /** + *Creates an instance of GridCellPrototype. + * @memberof GridCellPrototype + */ + constructor(); + /** + * Set the cell selected event callback + * + * @memberof GridCellPrototype + */ + set oncellselect(v: TagEventCallback); + /** + * Set the cell double click event callback + * + * @memberof GridCellPrototype + */ + set oncelldbclick(v: TagEventCallback); + /** + * Setter: + * + * Set the data of the cell, this will trigger + * the [[ondatachange]] function + * + * Getter: + * + * Get the current cell data placeholder + * + * @memberof GridCellPrototype + */ + set data(v: GenericObject); + get data(): GenericObject; + /** + * Setter: + * + * Set/unset the current cell as selected. + * This will trigger the [[cellselect]] + * event + * + * Getter: + * + * Check whether the current cell is selected + * + * @memberof GridCellPrototype + */ + set selected(v: boolean); + get selected(): boolean; + /** + * Update the current cell. This will + * reset the cell data + * + * @protected + * @param {*} d + * @memberof GridCellPrototype + */ + protected reload(d: any): void; + /** + * Mount the current cell to the grid + * + * @protected + * @memberof GridCellPrototype + */ + protected mount(): void; + /** + * This function triggers the cell select + * event + * + * @private + * @param {TagEventType} e + * @param {boolean} flag + * @returns {void} + * @memberof GridCellPrototype + */ + private cellselect; + /** + * Abstract function called when the cell data changed. + * This should be implemented by subclasses + * + * @protected + * @abstract + * @memberof GridCellPrototype + */ + protected abstract ondatachange(): void; + } + /** + * Simple grid cell defines a grid cell with + * an [[LabelTag]] as it cell layout + * + * @export + * @class SimpleGridCellTag + * @extends {GridCellPrototype} + */ + class SimpleGridCellTag extends GridCellPrototype { + /** + *Creates an instance of SimpleGridCellTag. + * @memberof SimpleGridCellTag + */ + constructor(); + /** + * Reset the label of the cell with its data + * + * @protected + * @memberof SimpleGridCellTag + */ + protected ondatachange(): void; + /** + * This function do nothing in this tag + * + * @protected + * @memberof SimpleGridCellTag + */ + protected init(): void; + /** + * This function do nothing in this tag + * + * @protected + * @memberof SimpleGridCellTag + */ + protected calibrate(): void; + /** + * The layout of the cell with a simple [[LabelTag]] + * + * @returns + * @memberof SimpleGridCellTag + */ + layout(): { + el: string; + ref: string; + }[]; + } + /** + * A Grid contains a header and a collection grid rows + * which has the same number of cells as the number of + * the header elements + * + * @export + * @class GridViewTag + * @extends {AFXTag} + */ + class GridViewTag extends AFXTag { + /** + * Grid header definition + * + * @private + * @type {GenericObject[]} + * @memberof GridViewTag + */ + private _header; + /** + * Grid rows data placeholder + * + * @private + * @type {GenericObject[][]} + * @memberof GridViewTag + */ + private _rows; + /** + * Reference to the current selected row DOM element + * + * @private + * @type {GridRowTag} + * @memberof GridViewTag + */ + private _selectedRow; + /** + * A collection of selected grid rows DOM element + * + * @private + * @type {GridRowTag[]} + * @memberof GridViewTag + */ + private _selectedRows; + /** + * Reference to the current selected cell + * + * @private + * @type {GridCellPrototype} + * @memberof GridViewTag + */ + private _selectedCell; + /** + * Cell select event callback placeholder + * + * @private + * @type {TagEventCallback} + * @memberof GridViewTag + */ + private _oncellselect; + /** + * Row select event callback placeholder + * + * @private + * @type {TagEventCallback} + * @memberof GridViewTag + */ + private _onrowselect; + /** + * Cell double click event callback placeholder + * + * @private + * @type {TagEventCallback} + * @memberof GridViewTag + */ + private _oncelldbclick; + /** + * Event data passing between mouse event when performing + * drag and drop on the list + * + * @private + * @type {{ from: GridRowTag[]; to: GridRowTag }} + * @memberof GridViewTag + */ + private _dnd; + /** + * placeholder of list drag and drop event handle + * + * @private + * @type {TagEventCallback>} + * @memberof GridViewTag + */ + private _ondragndrop; + /** + * Creates an instance of GridViewTag. + * @memberof GridViewTag + */ + constructor(); + /** + * Set drag and drop event handle + * + * @memberof GridViewTag + */ + set ondragndrop(v: TagEventCallback>); + /** + * Setter: Enable/disable drag and drop event in the list + * + * Getter: Check whether the drag and drop event is enabled + * + * @memberof GridViewTag + */ + set dragndrop(v: boolean); + get dragndrop(): boolean; + /** + * placeholder of drag and drop mouse down event handle + * + * @private + * @memberof GridViewTag + */ + private _onmousedown; + /** + * placeholder of drag and drop mouse up event handle + * + * @private + * @memberof GridViewTag + */ + private _onmouseup; + /** + * placeholder of drag and drop mouse move event handle + * + * @private + * @memberof GridViewTag + */ + private _onmousemove; + /** + * Init the grid view before mounting. + * Reset all the placeholders to default values + * + * @protected + * @memberof GridViewTag + */ + protected init(): void; + /** + * This function does nothing + * + * @protected + * @param {*} [d] + * @memberof GridViewTag + */ + protected reload(d?: any): void; + /** + * set the cell select event callback + * + * @memberof GridViewTag + */ + set oncellselect(v: TagEventCallback); + /** + * set the row select event callback + * + * @memberof GridViewTag + */ + set onrowselect(v: TagEventCallback); + /** + * set the cell double click event callback + * + * @memberof GridViewTag + */ + set oncelldbclick(v: TagEventCallback); + /** + * Setter: set the tag name of the header cells + * + * Getter: get the grid header tag name + * + * @memberof GridViewTag + */ + set headeritem(v: string); + get headeritem(): string; + /** + * Setter: set the tag name of the grid cell + * + * Getter: get the tag name of the grid cell + * + * @memberof GridViewTag + */ + set cellitem(v: string); + get cellitem(): string; + /** + * Setter: set the header data + * + * Getter: get the header data placeholder + * + * @type {GenericObject[]} + * @memberof GridViewTag + */ + get header(): GenericObject[]; + set header(v: GenericObject[]); + /** + * Get all the selected rows + * + * @readonly + * @type {GridRowTag[]} + * @memberof GridViewTag + */ + get selectedRows(): GridRowTag[]; + /** + * Get the latest selected row + * + * @readonly + * @type {GridRowTag} + * @memberof GridViewTag + */ + get selectedRow(): GridRowTag; + /** + * Get the current selected cell + * + * @readonly + * @type {GridCellPrototype} + * @memberof GridViewTag + */ + get selectedCell(): GridCellPrototype; + /** + * Setter: set the rows data + * + * Getter: get the rows data + * + * @memberof GridViewTag + */ + set rows(rows: GenericObject[][]); + get rows(): GenericObject[][]; + /** + * Setter: activate deactivate multi-select + * + * Getter: check whether the `multiselect` option is activated + * + * @memberof GridViewTag + */ + set multiselect(v: boolean); + get multiselect(): boolean; + /** + * Set and Get the resizable attribute + * + * This allows to enable/disable column resize feature + * + * @memberof GridViewTag + */ + set resizable(v: boolean); + get resizable(): boolean; + /** + * Sort the grid using a sort function + * + * @param {context: any} context of the executed function + * @param {(a:GenericObject[], b:GenericObject[]) => boolean} a sort function that compares two rows data + * * @param {index: number} current header index + * @returns {void} + * @memberof GridViewTag + */ + sort(context: any, fn: (a: GenericObject[], b: GenericObject[], index?: number) => number): void; + /** + * Delete a grid rows + * + * @param {GridRowTag} row row DOM element + * @returns {void} + * @memberof GridViewTag + */ + delete(row: GridRowTag): void; + /** + * Push a row to the grid + * + * @param {GenericObject[]} row list of cell data + * @param {boolean} flag indicates where the row is add to beginning or end + * of the row + * @memberof GridViewTags + */ + push(row: GenericObject[], flag: boolean): void; + /** + * Unshift a row to the grid + * + * @param {GenericObject[]} row list of cell data in the row + * @memberof GridViewTag + */ + unshift(row: GenericObject[]): void; + /** + * This function triggers the cell select event + * + * @private + * @param {TagEventType} e event contains cell event data + * @param {boolean} flag indicates whether the event is double clicked + * @returns {void} + * @memberof GridViewTag + */ + private cellselect; + /** + * This function triggers the row select event, a cell select + * event will also trigger this event + * + * @param {TagEventType} e + * @returns {void} + * @memberof GridViewTag + */ + private rowselect; + /** + * Unselect all the selected rows in the grid + * + * @returns {void} + * @memberof GridViewTag + */ + unselect(): void; + /** + * Check whether the grid has header + * + * @private + * @returns {boolean} + * @memberof GridViewTag + */ + private has_header; + /** + * Calibrate the grid + * + * @protected + * @memberof GridViewTag + */ + protected calibrate(): void; + /** + * Recalculate the size of each header cell, changing + * in header cell size will also resize the entire + * related column + * + * @private + * @returns {void} + * @memberof GridViewTag + */ + private calibrate_header; + /** + * Mount the grid view tag + * + * @protected + * @returns {void} + * @memberof GridViewTag + */ + protected mount(): void; + /** + * Layout definition of the grid view + * + * @protected + * @returns {TagLayoutType[]} + * @memberof GridViewTag + */ + protected layout(): TagLayoutType[]; + } + } + } +} +declare namespace OS { + namespace GUI { + namespace tag { + /** + * A system panel contains the following elements: + * - Spotlight to access to applications menu + * - Current focused application menu + * - System tray for all running services running in background + * + * @export + * @class SystemPanelTag + * @extends {AFXTag} + */ + class SystemPanelTag extends AFXTag { + /** + * Reference to spotlight data + * + * @private + * @type {(GenericObject)} + * @memberof SystemPanelTag + */ + private _osmenu; + /** + * Placeholder indicates whether the spotlight is currently shown + * + * @private + * @type {boolean} + * @memberof SystemPanelTag + */ + private _view; + /** + * Store pending loading task + * + * @private + * @type {number[]} + * @memberof SystemPanelTag + */ + private _pending_task; + /** + * Loading animation check timeout + * + * @memberof SystemPanelTag + */ + private _loading_toh; + /** + * Place holder for a private callback function + * + * @private + * @memberof SystemPanelTag + */ + private _cb; + /** + * Place holder for system app list + * + * @private + * @type {GenericObject[]} + * @memberof SystemPanelTag + */ + private app_list; + /** + *Creates an instance of SystemPanelTag. + * @memberof SystemPanelTag + */ + constructor(); + /** + * Do nothing + * + * @protected + * @memberof SystemPanelTag + */ + protected init(): void; + /** + * Do nothing + * + * @protected + * @param {*} [d] + * @memberof SystemPanelTag + */ + protected reload(d?: any): void; + /** + * Attach a service to the system tray on the pannel, + * this operation is performed when a service is started + * + * @param {BaseService} s + * @returns + * @memberof SystemPanelTag + */ + attachservice(s: application.BaseService): void; + /** + * Launch the selected application from the spotlight + * applications list + * + * @private + * @returns {void} + * @memberof SystemPanelTag + */ + private open; + /** + * Perform spotlight search operation on keyboard event + * + * @private + * @param {JQuery.KeyboardEventBase} e + * @returns {void} + * @memberof SystemPanelTag + */ + private search; + /** + * detach a service from the system tray of the panel. + * This function is called when the corresponding running + * service is killed + * + * @param {BaseService} s + * @memberof SystemPanelTag + */ + detachservice(s: application.BaseService): void; + /** + * Layout definition of the panel + * + * @protected + * @returns {TagLayoutType[]} + * @memberof SystemPanelTag + */ + protected layout(): TagLayoutType[]; + /** + * Refresh applications list on the spotlight widget + * from system packages meta-data + * + * @private + * @memberof SystemPanelTag + */ + private refreshAppList; + /** + * Show/hide the spotlight + * + * @private + * @param {boolean} flag + * @memberof SystemPanelTag + */ + private toggle; + /** + * Calibrate the spotlight widget + * + * @memberof SystemPanelTag + */ + calibrate(): void; + /** + * Refresh the pinned applications menu + * + * @private + * @memberof SystemPanelTag + */ + private RefreshPinnedApp; + /** + * Check if the loading tasks ended, + * if it the case, stop the animation + * + * @private + * @memberof SystemPanelTag + */ + private animation_check; + /** + * Mount the tag bind some basic event + * + * @protected + * @memberof SystemPanelTag + */ + protected mount(): void; + } + } + } +} +/// +declare namespace OS { + namespace GUI { + namespace tag { + /** + * This tag define a basic button and its behavior + * + * @export + * @class ButtonTag + * @extends {AFXTag} + */ + class ButtonTag extends AFXTag { + /** + * Variable hold the button click callback handle + * + * @private + * @type {TagEventCallback} + * @memberof ButtonTag + */ + private _onbtclick; + /** + * Custom user data + * + * @type {GenericObject} + * @memberof ButtonTag + */ + data: GenericObject; + /** + *Creates an instance of ButtonTag. + * @memberof ButtonTag + */ + constructor(); + /** + * Set the click callback handle for the target button + * + * @memberof ButtonTag + */ + set onbtclick(v: TagEventCallback); + /** + * Set the path to the button icon, the path should be + * a VFS file path + * + * @memberof ButtonTag + */ + set icon(v: string); + /** + * Set the icon class to the button, this property + * allows to style the button icon using CSS + * + * @memberof ButtonTag + */ + set iconclass(v: string); + /** + * Setter: Set the text of the button + * + * Getter: Get the current button test + * + * @memberof ButtonTag + */ + set text(v: string | FormattedString); + get text(): string | FormattedString; + /** + * Setter: Enable or disable the button + * + * Getter: Get the `enable` property of the button + * + * @memberof ButtonTag + */ + set enable(v: boolean); + get enable(): boolean; + /** + * Setter: set or remove the attribute `selected` of the button + * + * Getter: check whether the attribute `selected` of the button is set + * + * @memberof ButtonTag + */ + set selected(v: boolean); + get selected(): boolean; + /** + * Setter: activate or deactivate the toggle mode of the button + * + * Getter: Check whether the button is in toggle mode + * + * @memberof ButtonTag + */ + set toggle(v: boolean); + get toggle(): boolean; + /** + * Mount the tag + * + * @protected + * @memberof ButtonTag + */ + protected mount(): void; + /** + * Init the tag before mounting + * + * @protected + * @memberof ButtonTag + */ + protected init(): void; + /** + * Re-calibrate the button, do nothing in this tag + * + * @protected + * @memberof ButtonTag + */ + protected calibrate(): void; + /** + * Update the current tag, do nothing in this tag + * + * @param {*} [d] + * @memberof ButtonTag + */ + reload(d?: any): void; + /** + * Button layout definition + * + * @protected + * @returns {TagLayoutType[]} + * @memberof ButtonTag + */ + protected layout(): TagLayoutType[]; + } + } + } +} +declare namespace OS { + namespace GUI { + namespace tag { + /** + * A tile layout organize it child elements + * in a fixed horizontal or vertical direction. + * + * The size of each child element is attributed based + * on its configuration of automatically based on the + * remaining space in the layout + * + * + * @export + * @class TileLayoutTag + * @extends {AFXTag} + */ + class TileLayoutTag extends AFXTag { + /** + *C reates an instance of TileLayoutTag. + * @memberof TileLayoutTag + */ + constructor(); + /** + * Do nothing + * + * @protected + * @memberof TileLayoutTag + */ + protected init(): void; + /** + * Do nothing + * + * @protected + * @param {*} [d] + * @memberof TileLayoutTag + */ + protected reload(d?: any): void; + /** + * Setter: Set the name of the tile container, should be: `hbox` or `vbox` + * + * Getter: Get the name of the tile container + * + * @memberof TileLayoutTag + */ + set name(v: string); + get name(): string; + /** + * Setter: + * + * SET the layout direction, should be: + * - `row`: horizontal direction + * - `column`: vertical direction + * + * Getter: + * + * Get layout direction + * + * @memberof TileLayoutTag + */ + set dir(v: "row" | "column"); + get dir(): "row" | "column"; + /** + * Mount the element + * + * @protected + * @returns {void} + * @memberof TileLayoutTag + */ + protected mount(): void; + /** + * re-organize the layout + * + * @returns {void} + * @memberof TileLayoutTag + */ + calibrate(): void; + /** + * Organize the layout in horizontal direction, only work when + * the layout direction set to horizontal + * + * @private + * @returns {void} + * @memberof TileLayoutTag + */ + private hcalibrate; + /** + * Organize the layout in vertical direction, only work when + * the layout direction set to vertical + * + * @private + * @returns {void} + * @memberof TileLayoutTag + */ + private vcalibrate; + /** + * Layout definition + * + * @returns + * @memberof TileLayoutTag + */ + layout(): { + el: string; + ref: string; + }[]; + } + /** + * A HBox organize its child elements in horizontal direction + * + * @export + * @class HBoxTag + * @extends {TileLayoutTag} + */ + class HBoxTag extends TileLayoutTag { + /** + * Creates an instance of HBoxTag. + * @memberof HBoxTag + */ + constructor(); + /** + * Mount the tag + * + * @protected + * @memberof HBoxTag + */ + protected mount(): void; + } + /** + * A VBox organize its child elements in vertical direction + * + * @export + * @class VBoxTag + * @extends {TileLayoutTag} + */ + class VBoxTag extends TileLayoutTag { + /** + *Creates an instance of VBoxTag. + * @memberof VBoxTag + */ + constructor(); + /** + * Mount the tag + * + * @protected + * @memberof VBoxTag + */ + protected mount(): void; } } } @@ -5975,7 +6749,7 @@ declare namespace OS { * Private data object passing between dragndrop mouse event * * @private - * @type {{ from: TreeViewTag; to: TreeViewTag }} + * @type {{ from: TreeViewTag[]; to: TreeViewTag }} * @memberof TreeViewTag */ private _dnd; @@ -6022,7 +6796,7 @@ declare namespace OS { * current tree. This function should return a promise on * a list of [[TreeViewDataType]] * - * @memberof TreeViewItemPrototype + * @memberof TreeViewTag */ fetch: (d: TreeViewItemPrototype) => Promise; /** @@ -6175,247 +6949,6 @@ declare namespace OS { } } } -declare namespace OS { - namespace GUI { - namespace tag { - /** - * An overlay tag is a layout tag that alway stay on top of - * the virtual desktop environment. Tile layout elements ([[VBoxTag]], [[HboxTag]]) - * can be used inside this tag to compose elements - * - * @export - * @class OverlayTag - * @extends {AFXTag} - */ - class OverlayTag extends AFXTag { - /** - * Tag width placeholder - * - * @private - * @type {string} - * @memberof OverlayTag - */ - private _width; - /** - * Tag height place holder - * - * @private - * @type {string} - * @memberof OverlayTag - */ - private _height; - /** - *Creates an instance of OverlayTag. - * @memberof OverlayTag - */ - constructor(); - /** - * Put the tag on top of the virtual desktop environment - * - * @protected - * @memberof OverlayTag - */ - protected init(): void; - /** - * Do nothing - * - * @protected - * @param {*} [d] - * @memberof OverlayTag - */ - protected reload(d?: any): void; - /** - * Setter: - * - * Set the width of the tag, the tag width should be in form of: - * `100px` of `80%` - * - * Getter: - * - * Get the tag width - * - * @memberof OverlayTag - */ - set width(v: string); - get width(): string; - /** - * Setter: - * - * Set the tag height, the tag height should be in form of: - * `100px` of `80%` - * - * Getter: - * - * Get the tag height - * - * @memberof OverlayTag - */ - set height(v: string); - get height(): string; - /** - * Calibrate the element when mounting - * - * @protected - * @returns {void} - * @memberof OverlayTag - */ - protected mount(): void; - /** - * Calibrate the width and height of the tag - * - * @returns {void} - * @memberof OverlayTag - */ - calibrate(): void; - /** - * Layout definition of the tag - * - * @protected - * @returns {TagLayoutType[]} - * @memberof OverlayTag - */ - protected layout(): TagLayoutType[]; - } - } - } -} -declare namespace OS { - namespace GUI { - /** - * Color type used by AFX API - * - * @export - * @interface ColorType - */ - interface ColorType { - /** - * Red chanel - * - * @type {number} - * @memberof ColorType - */ - r: number; - /** - * Green chanel - * - * @type {number} - * @memberof ColorType - */ - g: number; - /** - * Blue chanel - * - * @type {number} - * @memberof ColorType - */ - b: number; - /** - * Alpha chanel - * - * @type {number} - * @memberof ColorType - */ - a?: number; - /** - * color text in CSS format - * - * @type {string} - * @memberof ColorType - */ - text?: string; - /** - * Color in hex format - * - * @type {string} - * @memberof ColorType - */ - hex?: string; - } - namespace tag { - /** - * Class definition of Color picker widget - * - * @export - * @class ColorPickerTag - * @extends {AFXTag} - */ - class ColorPickerTag extends AFXTag { - /** - * The current selected color object - * - * @private - * @type {ColorType} - * @memberof ColorPickerTag - */ - private _selectedColor; - /** - * placeholder for the color select event callback - * - * @private - * @type {TagEventCallback} - * @memberof ColorPickerTag - */ - private _oncolorselect; - /** - * Creates an instance of ColorPickerTag. - * @memberof ColorPickerTag - */ - constructor(); - /** - * Init tag before mounting, do nothing - * - * @protected - * @memberof ColorPickerTag - */ - protected init(): void; - /** - * Reload tag, do nothing - * - * @protected - * @param {*} [d] - * @memberof ColorPickerTag - */ - protected reload(d?: any): void; - /** - * Get selected color value - * - * @readonly - * @type {ColorType} - * @memberof ColorPickerTag - */ - get selectedColor(): ColorType; - /** - * Set the color select event handle - * - * @memberof ColorPickerTag - */ - set oncolorselect(v: TagEventCallback); - /** - * Mount the widget to DOM tree - * - * @protected - * @memberof ColorPickerTag - */ - protected mount(): void; - /** - * Build the color palette - * - * @private - * @memberof ColorPickerTag - */ - private build_palette; - /** - * layout definition of the widget - * - * @protected - * @returns {TagLayoutType[]} - * @memberof ColorPickerTag - */ - protected layout(): TagLayoutType[]; - } - } - } -} /// declare namespace OS { namespace GUI { @@ -6917,804 +7450,6 @@ declare namespace OS { } } } -declare namespace OS { - namespace GUI { - namespace tag { - /** - * Tag event data type definition - */ - type TabEventData = TagEventDataType; - /** - * a TabBar allows to control a collection of tabs - * - * @export - * @class TabBarTag - * @extends {AFXTag} - */ - export class TabBarTag extends AFXTag { - /** - * Placeholder of currently selected tab index - * - * @private - * @type {number} - * @memberof TabBarTag - */ - private _selected; - /** - * Placeholder of tab close event handle - * - * @private - * @memberof TabBarTag - */ - private _ontabclose; - /** - * Placeholder of tab select event handle - * - * @private - * @type {TagEventCallback} - * @memberof TabBarTag - */ - private _ontabselect; - /** - *Creates an instance of TabBarTag. - * @memberof TabBarTag - */ - constructor(); - /** - * Init the tag - * - * @protected - * @memberof TabBarTag - */ - protected init(): void; - /** - * Do nothing - * - * @protected - * @param {*} [d] - * @memberof TabBarTag - */ - protected reload(d?: any): void; - /** - * Setter: Enable/disable a tab to be closed - * - * Getter: Check whether tabs can be closed - * - * @memberof TabBarTag - */ - set closable(v: boolean); - get closable(): boolean; - /** - * Add a tab in the end of the tab bar - * - * @param {GenericObject} item tab data - * @memberof TabBarTag - */ - push(item: GenericObject): ListViewItemTag; - /** - * Delete a tab - * - * @param {ListViewItemTag} el reference to DOM element of a tab - * @memberof TabBarTag - */ - delete(el: ListViewItemTag): void; - /** - * Add a tab to the beginning of the tab bar - * - * @param {GenericObject} item tab data - * @memberof TabBarTag - */ - unshift(item: GenericObject): ListViewItemTag; - /** - * Setter: Set tabs data - * - * Getter: Get all tabs data - * - * @memberof TabBarTag - */ - set items(v: GenericObject[]); - get items(): GenericObject[]; - /** - * Setter: Select a tab by its index - * - * Getter: Get the currently selected tab - * - * @memberof TabBarTag - */ - set selected(v: number | number[]); - get selected(): number | number[]; - /** - * Set the tab close event handle - * - * @memberof TabBarTag - */ - set ontabclose(v: (e: TagEventType) => boolean); - /** - * Set the tab select event handle - * - * @memberof TabBarTag - */ - set ontabselect(v: TagEventCallback); - /** - * Mount the tab bar and bind some basic events - * - * @protected - * @memberof TabBarTag - */ - protected mount(): void; - /** - * TabBar layout definition - * - * @protected - * @returns {TagLayoutType[]} - * @memberof TabBarTag - */ - protected layout(): TagLayoutType[]; - } - export {}; - } - } -} -declare namespace OS { - namespace GUI { - namespace tag { - /** - * A float list is a list of items in which each - * item can be moved (drag and drop) freely - * - * @export - * @class FloatListTag - * @extends {ListViewTag} - */ - class FloatListTag extends ListViewTag { - /** - * Update the current tag, do nothing - * - * @protected - * @param {*} [d] - * @memberof FloatListTag - */ - protected reload(d?: any): void; - /** - * Variable that hold the onready callback of - * the tag. This callback will be called after - * the tag is mounted - * - * @private - * @memberof FloatListTag - */ - private _onready; - /** - *Creates an instance of FloatListTag. - * @memberof FloatListTag - */ - constructor(); - /** - * set the onready callback function to the tag. - * This callback will be called after - * the tag is mounted - * - * @memberof FloatListTag - */ - set onready(v: (e: FloatListTag) => void); - /** - * Setter: - * - * Set the direction of the list item layout. - * Two directions are available: - * - `vertical` - * - `horizontal` - * - * This setter acts as a DOM attribute - * - * Getter: - * - * Get the currently set direction of list - * item layout - * - * @memberof FloatListTag - */ - set dir(v: string); - get dir(): string; - /** - * Disable the dropdown option in this list - * - * @memberof FloatListTag - */ - set dropdown(v: boolean); - /** - * Disable the list buttons configuration in this - * list - * - * @memberof FloatListTag - */ - set buttons(v: GenericObject[]); - /** - * Disable the `showlist` behavior in this list - * - * @protected - * @param {*} e - * @memberof FloatListTag - */ - protected showlist(e: any): void; - /** - * Disable the `dropoff` behavior in this list - * - * @protected - * @param {*} e - * @memberof FloatListTag - */ - protected dropoff(e: any): void; - /** - * Function called when the data of the list - * is changed - * - * @protected - * @memberof FloatListTag - */ - protected ondatachange(): void; - /** - * Mount the list to the DOM tree - * - * @protected - * @returns {void} - * @memberof FloatListTag - */ - protected mount(): void; - /** - * Push an element to the list - * - * @param {GenericObject} v an element data - * @returns - * @memberof FloatListTag - */ - push(v: GenericObject): ListViewItemTag; - /** - * Enable drag and drop on the list - * - * @private - * @param {ListViewItemTag} el the list item DOM element - * @memberof FloatListTag - */ - private enable_drag; - /** - * Calibrate the view of the list - * - * @memberof FloatListTag - */ - calibrate(): void; - } - } - } -} -/** - * Extend the Array interface with some - * property needed by AFX API - * - * @interface Array - * @template T - */ -interface Array { - /** - * Reference to a DOM element created by AFX API, - * this property is used by some AFX tags to refer - * to its child element in it data object - * - * @type {GenericObject} - * @memberof Array - */ - domel?: GenericObject; -} -declare namespace OS { - namespace GUI { - namespace tag { - /** - * A grid Row is a simple element that - * contains a group of grid cell - * - * @export - * @class GridRowTag - * @extends {AFXTag} - */ - class GridRowTag extends AFXTag { - /** - * Data placeholder for a collection of cell data - * - * @type {GenericObject[]} - * @memberof GridRowTag - */ - data: GenericObject[]; - /** - *Creates an instance of GridRowTag. - * @memberof GridRowTag - */ - constructor(); - /** - * Mount the tag, do nothing - * - * @protected - * @memberof GridRowTag - */ - protected mount(): void; - /** - * Init the tag before mounting: reset the data placeholder - * - * @protected - * @memberof GridRowTag - */ - protected init(): void; - /** - * Empty layout - * - * @protected - * @returns {TagLayoutType[]} - * @memberof GridRowTag - */ - protected layout(): TagLayoutType[]; - /** - * This function does nothing in this tag - * - * @protected - * @memberof GridRowTag - */ - protected calibrate(): void; - /** - * This function does nothing in this tag - * - * @protected - * @param {*} [d] - * @memberof GridRowTag - */ - protected reload(d?: any): void; - } - /** - * Event data used by grid cell - */ - type CellEventData = TagEventDataType; - /** - * Prototype of any grid cell, custom grid cell - * definition should extend and implement this - * abstract prototype - * - * @export - * @abstract - * @class GridCellPrototype - * @extends {AFXTag} - */ - abstract class GridCellPrototype extends AFXTag { - /** - * placeholder for cell selected event callback - * - * @private - * @type {TagEventCallback} - * @memberof GridCellPrototype - */ - private _oncellselect; - /** - * placeholder for cell double click event callback - * - * @private - * @type {TagEventCallback} - * @memberof GridCellPrototype - */ - private _oncelldbclick; - /** - * Data placeholder of the current cell - * - * @private - * @type {GenericObject} - * @memberof GridCellPrototype - */ - private _data; - /** - *Creates an instance of GridCellPrototype. - * @memberof GridCellPrototype - */ - constructor(); - /** - * Set the cell selected event callback - * - * @memberof GridCellPrototype - */ - set oncellselect(v: TagEventCallback); - /** - * Set the cell double click event callback - * - * @memberof GridCellPrototype - */ - set oncelldbclick(v: TagEventCallback); - /** - * Setter: - * - * Set the data of the cell, this will trigger - * the [[ondatachange]] function - * - * Getter: - * - * Get the current cell data placeholder - * - * @memberof GridCellPrototype - */ - set data(v: GenericObject); - get data(): GenericObject; - /** - * Setter: - * - * Set/unset the current cell as selected. - * This will trigger the [[cellselect]] - * event - * - * Getter: - * - * Check whether the current cell is selected - * - * @memberof GridCellPrototype - */ - set selected(v: boolean); - get selected(): boolean; - /** - * Update the current cell. This will - * reset the cell data - * - * @protected - * @param {*} d - * @memberof GridCellPrototype - */ - protected reload(d: any): void; - /** - * Mount the current cell to the grid - * - * @protected - * @memberof GridCellPrototype - */ - protected mount(): void; - /** - * This function triggers the cell select - * event - * - * @private - * @param {TagEventType} e - * @param {boolean} flag - * @returns {void} - * @memberof GridCellPrototype - */ - private cellselect; - /** - * Abstract function called when the cell data changed. - * This should be implemented by subclasses - * - * @protected - * @abstract - * @memberof GridCellPrototype - */ - protected abstract ondatachange(): void; - } - /** - * Simple grid cell defines a grid cell with - * an [[LabelTag]] as it cell layout - * - * @export - * @class SimpleGridCellTag - * @extends {GridCellPrototype} - */ - class SimpleGridCellTag extends GridCellPrototype { - /** - *Creates an instance of SimpleGridCellTag. - * @memberof SimpleGridCellTag - */ - constructor(); - /** - * Reset the label of the cell with its data - * - * @protected - * @memberof SimpleGridCellTag - */ - protected ondatachange(): void; - /** - * This function do nothing in this tag - * - * @protected - * @memberof SimpleGridCellTag - */ - protected init(): void; - /** - * This function do nothing in this tag - * - * @protected - * @memberof SimpleGridCellTag - */ - protected calibrate(): void; - /** - * The layout of the cell with a simple [[LabelTag]] - * - * @returns - * @memberof SimpleGridCellTag - */ - layout(): { - el: string; - ref: string; - }[]; - } - /** - * A Grid contains a header and a collection grid rows - * which has the same number of cells as the number of - * the header elements - * - * @export - * @class GridViewTag - * @extends {AFXTag} - */ - class GridViewTag extends AFXTag { - /** - * Grid header definition - * - * @private - * @type {GenericObject[]} - * @memberof GridViewTag - */ - private _header; - /** - * Grid rows data placeholder - * - * @private - * @type {GenericObject[][]} - * @memberof GridViewTag - */ - private _rows; - /** - * Reference to the current selected row DOM element - * - * @private - * @type {GridRowTag} - * @memberof GridViewTag - */ - private _selectedRow; - /** - * A collection of selected grid rows DOM element - * - * @private - * @type {GridRowTag[]} - * @memberof GridViewTag - */ - private _selectedRows; - /** - * Reference to the current selected cell - * - * @private - * @type {GridCellPrototype} - * @memberof GridViewTag - */ - private _selectedCell; - /** - * Cell select event callback placeholder - * - * @private - * @type {TagEventCallback} - * @memberof GridViewTag - */ - private _oncellselect; - /** - * Row select event callback placeholder - * - * @private - * @type {TagEventCallback} - * @memberof GridViewTag - */ - private _onrowselect; - /** - * Cell double click event callback placeholder - * - * @private - * @type {TagEventCallback} - * @memberof GridViewTag - */ - private _oncelldbclick; - /** - * Creates an instance of GridViewTag. - * @memberof GridViewTag - */ - constructor(); - /** - * Init the grid view before mounting. - * Reset all the placeholders to default values - * - * @protected - * @memberof GridViewTag - */ - protected init(): void; - /** - * This function does nothing - * - * @protected - * @param {*} [d] - * @memberof GridViewTag - */ - protected reload(d?: any): void; - /** - * set the cell select event callback - * - * @memberof GridViewTag - */ - set oncellselect(v: TagEventCallback); - /** - * set the row select event callback - * - * @memberof GridViewTag - */ - set onrowselect(v: TagEventCallback); - /** - * set the cell double click event callback - * - * @memberof GridViewTag - */ - set oncelldbclick(v: TagEventCallback); - /** - * Setter: set the tag name of the header cells - * - * Getter: get the grid header tag name - * - * @memberof GridViewTag - */ - set headeritem(v: string); - get headeritem(): string; - /** - * Setter: set the tag name of the grid cell - * - * Getter: get the tag name of the grid cell - * - * @memberof GridViewTag - */ - set cellitem(v: string); - get cellitem(): string; - /** - * Setter: set the header data - * - * Getter: get the header data placeholder - * - * @type {GenericObject[]} - * @memberof GridViewTag - */ - get header(): GenericObject[]; - set header(v: GenericObject[]); - /** - * Get all the selected rows - * - * @readonly - * @type {GridRowTag[]} - * @memberof GridViewTag - */ - get selectedRows(): GridRowTag[]; - /** - * Get the latest selected row - * - * @readonly - * @type {GridRowTag} - * @memberof GridViewTag - */ - get selectedRow(): GridRowTag; - /** - * Get the current selected cell - * - * @readonly - * @type {GridCellPrototype} - * @memberof GridViewTag - */ - get selectedCell(): GridCellPrototype; - /** - * Setter: set the rows data - * - * Getter: get the rows data - * - * @memberof GridViewTag - */ - set rows(rows: GenericObject[][]); - get rows(): GenericObject[][]; - /** - * Setter: activate deactivate multi-select - * - * Getter: check whether the `multiselect` option is activated - * - * @memberof GridViewTag - */ - set multiselect(v: boolean); - get multiselect(): boolean; - /** - * Set and Get the resizable attribute - * - * This allows to enable/disable column resize feature - * - * @memberof GridViewTag - */ - set resizable(v: boolean); - get resizable(): boolean; - /** - * Delete a grid rows - * - * @param {GridRowTag} row row DOM element - * @returns {void} - * @memberof GridViewTag - */ - delete(row: GridRowTag): void; - /** - * Push a row to the grid - * - * @param {GenericObject[]} row list of cell data - * @param {boolean} flag indicates where the row is add to beginning or end - * of the row - * @memberof GridViewTags - */ - push(row: GenericObject[], flag: boolean): void; - /** - * Unshift a row to the grid - * - * @param {GenericObject[]} row list of cell data in the row - * @memberof GridViewTag - */ - unshift(row: GenericObject[]): void; - /** - * This function triggers the cell select event - * - * @private - * @param {TagEventType} e event contains cell event data - * @param {boolean} flag indicates whether the event is double clicked - * @returns {void} - * @memberof GridViewTag - */ - private cellselect; - /** - * This function triggers the row select event, a cell select - * event will also trigger this event - * - * @param {TagEventType} e - * @returns {void} - * @memberof GridViewTag - */ - private rowselect; - /** - * Check whether the grid has header - * - * @private - * @returns {boolean} - * @memberof GridViewTag - */ - private has_header; - /** - * Calibrate the grid - * - * @protected - * @memberof GridViewTag - */ - protected calibrate(): void; - /** - * Recalculate the size of each header cell, changing - * in header cell size will also resize the entire - * related column - * - * @private - * @returns {void} - * @memberof GridViewTag - */ - private calibrate_header; - /** - * Mount the grid view tag - * - * @protected - * @returns {void} - * @memberof GridViewTag - */ - protected mount(): void; - /** - * Layout definition of the grid view - * - * @protected - * @returns {TagLayoutType[]} - * @memberof GridViewTag - */ - protected layout(): TagLayoutType[]; - } - } - } -} declare namespace OS { namespace GUI { namespace tag { @@ -7855,456 +7590,621 @@ declare namespace OS { } } } -/// -/** - * - * Extend the HTMLElement interface with some utility function need - * by AFX API - * - * @interface HTMLElement - */ -interface HTMLElement { - /** - * Recursively update a tag and all its children - * - * @param {*} [d] data to send to all element in the DOM subtree - * @memberof HTMLElement - */ - update(d?: any): void; - /** - * - * AFX will automatically bind the context menu on an HTMLElement - * if this function is defined on that element. The function should - * define the content of the context menu and its action - * - * Once the context menu is bound to the element, all context menu handle - * defined on any child of this element will be ignored. - * - * @param {JQuery.MouseEventBase} e a mouse event - * @param {OS.GUI.tag.MenuTag} m The context menu element [[MenuTag]] - * @memberof HTMLElement - */ - contextmenuHandle(e: JQuery.MouseEventBase, m: OS.GUI.tag.MenuTag): void; - /** - * Mount the element and all the children on its DOM subtree. This action - * is performed in a top-down manner - * - * @memberof HTMLElement - */ - sync(): void; - /** - * - * This action allows to generated all the DOM nodes defined by all AFX tags - * in its hierarchy. - * It performs two operations, one top-down operation to generate all the - * necessary DOM nodes, another bottom-up operation to init all the AFX tag - * in the current element DOM hierarchy - * - * @param {OS.API.Announcer} o an AntOS observable object - * @memberof HTMLElement - */ - afxml(o: OS.API.Announcer): void; - /** - * Perform DOM generation ([[afxml]]) then mount ([[sync]]) all the - * elements. - * - * @param {OS.API.Announcer} o an AntOS observable object - * @param {boolean} [flag] indicates whether this is the top-most call of the operation - * @memberof HTMLElement - */ - uify(o: OS.API.Announcer, flag?: boolean): void; - /** - * - * - * @type {*} - * @memberof HTMLElement - */ - mozRequestFullScreen: any; - /** - * - * - * @type {*} - * @memberof HTMLElement - */ - webkitRequestFullscreen: any; - /** - * - * - * @type {*} - * @memberof HTMLElement - */ - msRequestFullscreen: any; +declare namespace OS { + namespace GUI { + namespace tag { + /** + * An overlay tag is a layout tag that alway stay on top of + * the virtual desktop environment. Tile layout elements ([[VBoxTag]], [[HboxTag]]) + * can be used inside this tag to compose elements + * + * @export + * @class OverlayTag + * @extends {AFXTag} + */ + class OverlayTag extends AFXTag { + /** + * Tag width placeholder + * + * @private + * @type {string} + * @memberof OverlayTag + */ + private _width; + /** + * Tag height place holder + * + * @private + * @type {string} + * @memberof OverlayTag + */ + private _height; + /** + *Creates an instance of OverlayTag. + * @memberof OverlayTag + */ + constructor(); + /** + * Put the tag on top of the virtual desktop environment + * + * @protected + * @memberof OverlayTag + */ + protected init(): void; + /** + * Do nothing + * + * @protected + * @param {*} [d] + * @memberof OverlayTag + */ + protected reload(d?: any): void; + /** + * Setter: + * + * Set the width of the tag, the tag width should be in form of: + * `100px` of `80%` + * + * Getter: + * + * Get the tag width + * + * @memberof OverlayTag + */ + set width(v: string); + get width(): string; + /** + * Setter: + * + * Set the tag height, the tag height should be in form of: + * `100px` of `80%` + * + * Getter: + * + * Get the tag height + * + * @memberof OverlayTag + */ + set height(v: string); + get height(): string; + /** + * Calibrate the element when mounting + * + * @protected + * @returns {void} + * @memberof OverlayTag + */ + protected mount(): void; + /** + * Calibrate the width and height of the tag + * + * @returns {void} + * @memberof OverlayTag + */ + calibrate(): void; + /** + * Layout definition of the tag + * + * @protected + * @returns {TagLayoutType[]} + * @memberof OverlayTag + */ + protected layout(): TagLayoutType[]; + } + } + } } -/** - * - * - * @interface Document - */ -interface Document { - mozCancelFullScreen: any; - webkitExitFullscreen: any; - cancelFullScreen: any; +declare namespace OS { + namespace GUI { + namespace tag { + /** + * Meta tag that represents the virtual desktop environment. + * In near future, we may have multiple virtual desktop environments. + * Each desktop environment has a simple file manager and a window + * manager that render the window in a specific order. + * + * @export + * @class DesktopTag + * @extends {FloatListTag} + */ + class DesktopTag extends FloatListTag { + /** + * internal handle to the desktop file location + * + * @private + * @type {API.VFS.BaseFileHandle} + * @memberof DesktopTag + */ + private file; + /** + * local observer that detect if a new child element is + * added or removed + * + * @private + * @type {MutationObserver} + * @memberof DesktopTag + */ + private observer; + /** + * Internal list of the current opened window + * + * @private + * @type {Set} + * @memberof DesktopTag + */ + private window_list; + /** + * Creates an instance of DesktopTag. + * @memberof DesktopTag + */ + constructor(); + /** + * Mount the virtual desktop to the DOM tree + * + * @protected + * @memberof DesktopTag + */ + protected mount(): void; + /** + * Display all files and folders in the specific desktop location + * + * @return {*} {Promise} + * @memberof DesktopTag + */ + refresh(): Promise; + /** + * Remove this element from its parent + * + * @memberof DesktopTag + */ + remove(): void; + /** + * Active a window above all other windows + * + * @private + * @param {WindowTag} win + * @memberof DesktopTag + */ + private selectWindow; + /** + * Render all windows in order from bottom to top + * + * @private + * @memberof DesktopTag + */ + private render; + } + } + } +} +declare namespace OS { + namespace GUI { + namespace tag { + /** + * A float list is a list of items in which each + * item can be moved (drag and drop) freely + * + * @export + * @class FloatListTag + * @extends {ListViewTag} + */ + class FloatListTag extends ListViewTag { + /** + * Update the current tag, do nothing + * + * @protected + * @param {*} [d] + * @memberof FloatListTag + */ + protected reload(d?: any): void; + /** + * Variable that hold the onready callback of + * the tag. This callback will be called after + * the tag is mounted + * + * @private + * @memberof FloatListTag + */ + private _onready; + /** + *Creates an instance of FloatListTag. + * @memberof FloatListTag + */ + constructor(); + /** + * set the onready callback function to the tag. + * This callback will be called after + * the tag is mounted + * + * @memberof FloatListTag + */ + set onready(v: (e: FloatListTag) => void); + /** + * Setter: + * + * Set the direction of the list item layout. + * Two directions are available: + * - `vertical` + * - `horizontal` + * + * This setter acts as a DOM attribute + * + * Getter: + * + * Get the currently set direction of list + * item layout + * + * @memberof FloatListTag + */ + set dir(v: string); + get dir(): string; + /** + * Disable the dropdown option in this list + * + * @memberof FloatListTag + */ + set dropdown(v: boolean); + /** + * Disable the list buttons configuration in this + * list + * + * @memberof FloatListTag + */ + set buttons(v: GenericObject[]); + /** + * Disable the `showlist` behavior in this list + * + * @protected + * @param {*} e + * @memberof FloatListTag + */ + protected showlist(e: any): void; + /** + * Disable the `dropoff` behavior in this list + * + * @protected + * @param {*} e + * @memberof FloatListTag + */ + protected dropoff(e: any): void; + /** + * Function called when the data of the list + * is changed + * + * @protected + * @memberof FloatListTag + */ + protected ondatachange(): void; + /** + * Mount the list to the DOM tree + * + * @protected + * @returns {void} + * @memberof FloatListTag + */ + protected mount(): void; + /** + * Push an element to the list + * + * @param {GenericObject} v an element data + * @returns + * @memberof FloatListTag + */ + push(v: GenericObject): ListViewItemTag; + /** + * Enable drag and drop on the list + * + * @private + * @param {ListViewItemTag} el the list item DOM element + * @memberof FloatListTag + */ + private enable_drag; + /** + * Calibrate the view of the list + * + * @memberof FloatListTag + */ + calibrate(): void; + } + } + } } declare namespace OS { namespace GUI { /** - * [[TagLayoutType]] interface using by AFX tags to defined - * its internal DOM hierarchy + * + * Interface for an application dock item * * @export - * @interface TagLayoutType + * @interface AppDockItemType */ - interface TagLayoutType { + interface AppDockItemType { /** - * Element tag name + * Reference to the application process represented + * by the dock item * - * @type {string} - * @memberof TagLayoutType + * @type {application.BaseApplication} + * @memberof AppDockItemType */ - el: string; + app: application.BaseApplication; /** - * Children layout of the current element + * Reference to the DOM element of + * the owner dock item * - * @type {TagLayoutType[]} - * @memberof TagLayoutType + * @type {AFXTag} + * @memberof AppDockItemType */ - children?: TagLayoutType[]; - /** - * Reference name of the element used by AFX Tag - * - * @type {string} - * @memberof TagLayoutType - */ - ref?: string; - /** - * CSS class of the element - * - * @type {string} - * @memberof TagLayoutType - */ - class?: string; - /** - * this is the `data-id` attribute of the element, - * can be query by the [[aid]] Tag API function. - * Not to be confused with the DOM `id` attribute - * - * @type {(string | number)} - * @memberof TagLayoutType - */ - id?: string | number; - /** - * Tooltip text of the element - * - * @type {(string | FormattedString)} - * @memberof TagLayoutType - */ - tooltip?: string | FormattedString; - /** - * `data-width` of the element, not to be confused with - * the `width` attribute of the DOM element - * - * @type {number|string} - * @memberof TagLayoutType - */ - width?: number | string; - /** - ** `data-height` of the element, not to be confused with - * the `height` attribute of the DOM element - * - * @type {number|string} - * @memberof TagLayoutType - */ - height?: number | string; - } - /** - * Data type for event issued by AFX tags - * - * @export - * @interface TagEventDataType - * @template T item template - */ - interface TagEventDataType { - /** - * Reference to the item involved in the event - * - * @type {T} - * @memberof TagEventDataType - */ - item?: T; + domel?: AFXTag; [propName: string]: any; } - /** - * Format of the event issued by AFX tags - * - * @export - * @interface TagEventType - * @template T data type - */ - interface TagEventType { - /** - * `data-id` of the tag that trigger the - * event - * - * @type {(number | string)} - * @memberof TagEventType - */ - id: number | string; - /** - * Data object of the event - * - * @type {T} - * @memberof TagEventType - */ - data: T; - } - /** - * Drag and Drop data type sent between mouse events - * - * @export - * @interface DnDEventDataType - * @template T - */ - interface DnDEventDataType { - /** - * Reference to the source DOM element - * - * @type {T} - * @memberof DnDEventDataType - */ - from: T; - /** - * Reference to the target DOM element - * - * @type {T} - * @memberof DnDEventDataType - */ - to: T; - } - /** - * Tag event callback type - */ - type TagEventCallback = (e: TagEventType) => void; - /** - * Base abstract class for tag implementation, any AFX tag should be - * subclass of this class - * - * @export - * @abstract - * @class AFXTag - * @extends {HTMLElement} - */ - abstract class AFXTag extends HTMLElement { - /** - * The announcer object of the tag - * - * @type {API.Announcer} - * @memberof AFXTag - */ - observable: API.Announcer; - /** - * Reference to some of the tag's children - * element. This reference object is built - * based on the `ref` property found in the - * tag layout [[TagLayoutType]] - * - * @protected - * @type {GenericObject} - * @memberof AFXTag - */ - protected refs: GenericObject; - /** - * boolean value indicated whether the tag - * is already mounted in the DOM tree - * - * @protected - * @type {boolean} - * @memberof AFXTag - */ - protected _mounted: boolean; - /** - *Creates an instance of AFXTag. - * @memberof AFXTag - */ - constructor(); - /** - * This function verifies if a property name of the input object - * corresponds to a setter of the current tag. If this is the - * case, it sets the value of that property to the setter - * - * @param {GenericObject} v input object - * @memberof AFXTag - */ - set(v: GenericObject): void; - /** - * Setter to set the tooltip text to the current tag. - * The text should be in the following format: - * ```text - * cr|cl|ct|cb: tooltip text - * ``` - * - * @memberof AFXTag - */ - set tooltip(v: string); - /** - * - * This function looking for a property name of the tag - * in its prototype chain. The descriptor of the property - * will be returned if it exists - * - * @private - * @param {string} k the property name to be queried - * @returns {PropertyDescriptor} the property descriptor or undefined - * @memberof AFXTag - */ - private descriptor_of; - /** - * Setter: set the id of the tag in string or number - * - * Getter: get the id of the current tag - * - * @memberof AFXTag - */ - set aid(v: string | number); - get aid(): string | number; - /** - * Implementation from HTMLElement interface, - * this function mount the current tag hierarchy - * - * @returns {void} - * @memberof AFXTag - */ - sync(): void; - /** - * Generate the DOM hierarchy of the current tag - * - * @param {API.Announcer} o observable object - * @memberof AFXTag - */ - afxml(o: API.Announcer): void; - /** - * Update the current tag hierarchy - * - * @param {*} d any data object - * @memberof AFXTag - */ - update(d: any): void; - /** - * Init the current tag, this function - * is called before the [[mount]] function - * - * @protected - * @abstract - * @memberof AFXTag - */ - protected abstract init(): void; - /** - * Mount only the current tag - * - * @protected - * @abstract - * @memberof AFXTag - */ - protected abstract mount(): void; - /** - * Layout definition of a tag - * - * @protected - * @abstract - * @returns {TagLayoutType[]} tag layout object - * @memberof AFXTag - */ - protected abstract layout(): TagLayoutType[]; - /** - * Update only the current tag, this function is - * called by [[update]] before chaining the - * update process to its children - * - * @protected - * @abstract - * @param {*} [d] - * @memberof AFXTag - */ - protected abstract reload(d?: any): void; - /** - * This function is used to re-render the current - * tag - * - * @protected - * @memberof AFXTag - */ - protected calibrate(): void; - /** - * This function parses the input layout object - * and generates all the elements defined by - * the tag - * - * @private - * @param {TagLayoutType} tag tag layout object - * @returns {Element} the DOM element specified by the tag layout - * @memberof AFXTag - */ - private mkui; - /** - * This function inserts or removes an attribute name - * to/from the target element based on the input `flag`. - * - * @protected - * @param {boolean} flag indicates whether the attribute name should be inserted o removed - * @param {string} v the attribute name - * @param {HTMLElement} [el] the target element - * @memberof AFXTag - */ - protected attsw(flag: boolean, v: string, el?: HTMLElement): void; - /** - * Insert the attribute name to the target element - * - * @protected - * @param {string} v the attribute name - * @param {HTMLElement} [el] the target element - * @memberof AFXTag - */ - protected atton(v: string, el?: HTMLElement): void; - /** - * Remove the attribute name from the target element - * - * @protected - * @param {string} v attribute name - * @param {HTMLElement} [el] the target element - * @memberof AFXTag - */ - protected attoff(v: string, el?: HTMLElement): void; - /** - * Verify if the target element has an attribute name - * - * @protected - * @param {string} v attribute name - * @param {HTMLElement} [el] target element - * @returns {boolean} - * @memberof AFXTag - */ - protected hasattr(v: string, el?: HTMLElement): boolean; - } - /** - * All the AFX tags are defined in this namespace, - * these tags are defined as custom DOM elements and will be - * stored in the `customElements` registry of the browser - */ namespace tag { /** - * Define an AFX tag as a custom element and add it to the - * global `customElements` registry. If the tag is redefined, i.e. - * the tag already exists, its behavior will be updated with the - * new definition + * This class define the AntOS system application dock tag * * @export - * @template T all classes that extends [[AFXTag]] - * @param {string} name name of the tag - * @param {{ new (): T }} cls the class that defines the tag - * @returns {void} + * @class AppDockTag + * @extends {AFXTag} */ - function define(name: string, cls: { - new (): T; - }): void; + class AppDockTag extends AFXTag { + /** + * variable holds the application select event + * callback handle + * + * @private + * @type {TagEventCallback} + * @memberof AppDockTag + */ + private _onappselect; + /** + * Items data of the dock + * + * @private + * @type {AppDockItemType[]} + * @memberof AppDockTag + */ + private _items; + /** + * Reference to the currently select application + * process in the dock + * + * @private + * @type {AppDockItemType} + * @memberof AppDockTag + */ + private _selectedItem; + /** + *Creates an instance of AppDockTag. + * @memberof AppDockTag + */ + constructor(); + /** + * Implementation of the abstract function: Update the current tag. + * It do nothing for this tag + * + * @protected + * @param {*} [d] + * @memberof AppDockTag + */ + protected reload(d?: any): void; + /** + * Init the tag before mounting + * + * @protected + * @memberof AppDockTag + */ + protected init(): void; + /** + * The tag layout, it is empty on creation but elements will + * be added automatically to it in operation + * + * @protected + * @returns {TagLayoutType[]} + * @memberof AppDockTag + */ + protected layout(): TagLayoutType[]; + /** + * getter to get the dock items + * + * @readonly + * @type {AppDockItemType[]} + * @memberof AppDockTag + */ + get items(): AppDockItemType[]; + /** + * Setter: + * + * set the selected application in the dock + * this will trigger two event: + * - `focus`: on the selected application + * - `blur`: on all other applications on the dock + * + * Getter: + * + * Get the current selected application + * on the dock + * + * @memberof AppDockTag + */ + set selectedApp(v: application.BaseApplication); + get selectedApp(): application.BaseApplication; + /** + * Get selected item of the dock + * + * @readonly + * @type {AppDockItemType} + * @memberof AppDockTag + */ + get selectedItem(): AppDockItemType; + /** + * When a new application process is created, this function + * will be called to add new application entry to the dock. + * The added application will becomes the current selected + * application + * + * @param {AppDockItemType} item an application dock item entry + * @memberof AppDockTag + */ + newapp(item: AppDockItemType): void; + /** + * Delete and application entry from the dock. + * This function will be called when an application + * is exit + * + * @param {BaseApplication} a the application to be removed from the dock + * @memberof AppDockTag + */ + removeapp(a: application.BaseApplication): void; + /** + * Mount the current dock tag + * + * @protected + * @memberof AppDockTag + */ + protected mount(): void; + } + } + } +} +declare namespace OS { + namespace GUI { + namespace tag { + /** + * Tag that define system calendar widget + * + * @export + * @class CalendarTag + * @extends {AFXTag} + */ + class CalendarTag extends AFXTag { + /** + * The current selected day + * + * @private + * @type {number} + * @memberof CalendarTag + */ + private _day; + /** + * The current selected month + * + * @private + * @type {number} + * @memberof CalendarTag + */ + private _month; + /** + * The current selected year + * + * @private + * @type {number} + * @memberof CalendarTag + */ + private _year; + /** + * The current selected date object + * + * @private + * @type {Date} + * @memberof CalendarTag + */ + private _selectedDate; + /** + * placeholder for date select event callback + * + * @private + * @type {TagEventCallback} + * @memberof CalendarTag + */ + private _ondateselect; + /** + *Creates an instance of CalendarTag. + * @memberof CalendarTag + */ + constructor(); + /** + * Init the tag before mounting + * + * @protected + * @memberof CalendarTag + */ + protected init(): void; + /** + * Update the current tag, doing nothing in this tag + * + * @protected + * @param {*} [d] any data object + * @memberof CalendarTag + */ + protected reload(d?: any): void; + /** + * Get the current selected date in the widget + * + * @readonly + * @type {Date} + * @memberof CalendarTag + */ + get selectedDate(): Date; + /** + * Set the date select event callback handle for the widget + * + * @memberof CalendarTag + */ + set ondateselect(v: TagEventCallback); + /** + * Mount the current widget to the DOM tree + * + * @protected + * @memberof CalendarTag + */ + protected mount(): void; + /** + * This function triggers the date select event + * + * @private + * @param {TagEventType} e AFX tag event data [[TagEventType]] + * @returns {void} + * @memberof CalendarTag + */ + private dateselect; + /** + * Calibrate the layout of the tag + * + * @protected + * @memberof CalendarTag + */ + protected calibrate(): void; + /** + * Display the previous month of the current month + * + * @private + * @memberof CalendarTag + */ + private prevmonth; + /** + * Display the next month of the current month + * + * @private + * @returns + * @memberof CalendarTag + */ + private nextmonth; + /** + * Visualize the calendar base on input date + * + * @private + * @param {Date} date + * @memberof CalendarTag + */ + private calendar; + /** + * Layout definition of the widget + * + * @protected + * @returns {TagLayoutType[]} + * @memberof CalendarTag + */ + protected layout(): TagLayoutType[]; + } } } } @@ -8524,1719 +8424,2058 @@ declare namespace OS { } } } -declare namespace OS { - namespace GUI { - namespace tag { - /** - * A tile layout organize it child elements - * in a fixed horizontal or vertical direction. - * - * The size of each child element is attributed based - * on its configuration of automatically based on the - * remaining space in the layout - * - * - * @export - * @class TileLayoutTag - * @extends {AFXTag} - */ - class TileLayoutTag extends AFXTag { - /** - *C reates an instance of TileLayoutTag. - * @memberof TileLayoutTag - */ - constructor(); - /** - * Do nothing - * - * @protected - * @memberof TileLayoutTag - */ - protected init(): void; - /** - * Do nothing - * - * @protected - * @param {*} [d] - * @memberof TileLayoutTag - */ - protected reload(d?: any): void; - /** - * Setter: Set the name of the tile container, should be: `hbox` or `vbox` - * - * Getter: Get the name of the tile container - * - * @memberof TileLayoutTag - */ - set name(v: string); - get name(): string; - /** - * Setter: - * - * SET the layout direction, should be: - * - `row`: horizontal direction - * - `column`: vertical direction - * - * Getter: - * - * Get layout direction - * - * @memberof TileLayoutTag - */ - set dir(v: "row" | "column"); - get dir(): "row" | "column"; - /** - * Mount the element - * - * @protected - * @returns {void} - * @memberof TileLayoutTag - */ - protected mount(): void; - /** - * re-organize the layout - * - * @returns {void} - * @memberof TileLayoutTag - */ - calibrate(): void; - /** - * Organize the layout in horizontal direction, only work when - * the layout direction set to horizontal - * - * @private - * @returns {void} - * @memberof TileLayoutTag - */ - private hcalibrate; - /** - * Organize the layout in vertical direction, only work when - * the layout direction set to vertical - * - * @private - * @returns {void} - * @memberof TileLayoutTag - */ - private vcalibrate; - /** - * Layout definition - * - * @returns - * @memberof TileLayoutTag - */ - layout(): { - el: string; - ref: string; - }[]; - } - /** - * A HBox organize its child elements in horizontal direction - * - * @export - * @class HBoxTag - * @extends {TileLayoutTag} - */ - class HBoxTag extends TileLayoutTag { - /** - * Creates an instance of HBoxTag. - * @memberof HBoxTag - */ - constructor(); - /** - * Mount the tag - * - * @protected - * @memberof HBoxTag - */ - protected mount(): void; - } - /** - * A VBox organize its child elements in vertical direction - * - * @export - * @class VBoxTag - * @extends {TileLayoutTag} - */ - class VBoxTag extends TileLayoutTag { - /** - *Creates an instance of VBoxTag. - * @memberof VBoxTag - */ - constructor(); - /** - * Mount the tag - * - * @protected - * @memberof VBoxTag - */ - protected mount(): void; - } - } - } -} -/// -declare namespace OS { - namespace GUI { - namespace tag { - /** - * This tag define a basic button and its behavior - * - * @export - * @class ButtonTag - * @extends {AFXTag} - */ - class ButtonTag extends AFXTag { - /** - * Variable hold the button click callback handle - * - * @private - * @type {TagEventCallback} - * @memberof ButtonTag - */ - private _onbtclick; - /** - * Custom user data - * - * @type {GenericObject} - * @memberof ButtonTag - */ - data: GenericObject; - /** - *Creates an instance of ButtonTag. - * @memberof ButtonTag - */ - constructor(); - /** - * Set the click callback handle for the target button - * - * @memberof ButtonTag - */ - set onbtclick(v: TagEventCallback); - /** - * Set the path to the button icon, the path should be - * a VFS file path - * - * @memberof ButtonTag - */ - set icon(v: string); - /** - * Set the icon class to the button, this property - * allows to style the button icon using CSS - * - * @memberof ButtonTag - */ - set iconclass(v: string); - /** - * Setter: Set the text of the button - * - * Getter: Get the current button test - * - * @memberof ButtonTag - */ - set text(v: string | FormattedString); - get text(): string | FormattedString; - /** - * Setter: Enable or disable the button - * - * Getter: Get the `enable` property of the button - * - * @memberof ButtonTag - */ - set enable(v: boolean); - get enable(): boolean; - /** - * Setter: set or remove the attribute `selected` of the button - * - * Getter: check whether the attribute `selected` of the button is set - * - * @memberof ButtonTag - */ - set selected(v: boolean); - get selected(): boolean; - /** - * Setter: activate or deactivate the toggle mode of the button - * - * Getter: Check whether the button is in toggle mode - * - * @memberof ButtonTag - */ - set toggle(v: boolean); - get toggle(): boolean; - /** - * Mount the tag - * - * @protected - * @memberof ButtonTag - */ - protected mount(): void; - /** - * Init the tag before mounting - * - * @protected - * @memberof ButtonTag - */ - protected init(): void; - /** - * Re-calibrate the button, do nothing in this tag - * - * @protected - * @memberof ButtonTag - */ - protected calibrate(): void; - /** - * Update the current tag, do nothing in this tag - * - * @param {*} [d] - * @memberof ButtonTag - */ - reload(d?: any): void; - /** - * Button layout definition - * - * @protected - * @returns {TagLayoutType[]} - * @memberof ButtonTag - */ - protected layout(): TagLayoutType[]; - } - } - } +declare type VFSFileHandleClass = { + new (...args: any[]): OS.API.VFS.BaseFileHandle; +}; +interface String { + /** + * Convert a string to VFS file handle. + * + * This function will create a file handle object from the string + * with the help of [[VFS.findHandles]] + * + * @returns {OS.API.VFS.BaseFileHandle} + * @memberof String + */ + asFileHandle(): OS.API.VFS.BaseFileHandle; } declare namespace OS { - namespace GUI { - namespace tag { + namespace API { + /** + * User permission data type + * + * @export + * @interface UserPermissionType + */ + interface UserPermissionType { + read: boolean; + write: boolean; + exec: boolean; + } + /** + * VFS file meta-data data type + * + * @export + * @interface FileInfoType + */ + interface FileInfoType { /** - * Tag that define system calendar widget + * File mime type + * + * @type {string} + * @memberof FileInfoType + */ + mime: string; + /** + * File size + * + * @type {number} + * @memberof FileInfoType + */ + size: number; + /** + * File name + * + * @type {string} + * @memberof FileInfoType + */ + name: string; + /** + * File path + * + * @type {string} + * @memberof FileInfoType + */ + path: string; + /** + * File type: + * - `file` + * - `dir` + * - `app` + * + * @type {string} + * @memberof FileInfoType + */ + type: string; + /** + * File permission + * + * @type {{ + * group: UserPermissionType; + * owner: UserPermissionType; + * other: UserPermissionType; + * }} + * @memberof FileInfoType + */ + perm?: { + /** + * Group permission + * + * @type {UserPermissionType} + */ + group: UserPermissionType; + /** + * Owner permission + * + * @type {UserPermissionType} + */ + owner: UserPermissionType; + /** + * Other permission + * + * @type {UserPermissionType} + */ + other: UserPermissionType; + }; + /** + * Creation time + * + * @type {string} + * @memberof FileInfoType + */ + ctime?: string; + /** + * Modification time + * + * @type {string} + * @memberof FileInfoType + */ + mtime?: string; + /** + * Group id + * + * @type {number} + * @memberof FileInfoType + */ + gid?: number; + /** + * User id + * + * @type {number} + * @memberof FileInfoType + */ + uid?: number; + [propName: string]: any; + } + /** + * This namespace is dedicated to all APIs related to + * AntOS Virtual File System (VFS) + */ + namespace VFS { + /** + * Placeholder stores VFS file protocol patterns and its attached file handle class. + * + */ + const handles: GenericObject; + /** + * Register a protocol to a handle class * * @export - * @class CalendarTag - * @extends {AFXTag} + * @param {string} protos VFS protocol pattern + * @param {VFSFileHandleClass} cls handle class */ - class CalendarTag extends AFXTag { - /** - * The current selected day - * - * @private - * @type {number} - * @memberof CalendarTag - */ - private _day; - /** - * The current selected month - * - * @private - * @type {number} - * @memberof CalendarTag - */ - private _month; - /** - * The current selected year - * - * @private - * @type {number} - * @memberof CalendarTag - */ - private _year; - /** - * The current selected date object - * - * @private - * @type {Date} - * @memberof CalendarTag - */ - private _selectedDate; - /** - * placeholder for date select event callback - * - * @private - * @type {TagEventCallback} - * @memberof CalendarTag - */ - private _ondateselect; - /** - *Creates an instance of CalendarTag. - * @memberof CalendarTag - */ - constructor(); - /** - * Init the tag before mounting - * - * @protected - * @memberof CalendarTag - */ - protected init(): void; - /** - * Update the current tag, doing nothing in this tag - * - * @protected - * @param {*} [d] any data object - * @memberof CalendarTag - */ - protected reload(d?: any): void; - /** - * Get the current selected date in the widget - * - * @readonly - * @type {Date} - * @memberof CalendarTag - */ - get selectedDate(): Date; - /** - * Set the date select event callback handle for the widget - * - * @memberof CalendarTag - */ - set ondateselect(v: TagEventCallback); - /** - * Mount the current widget to the DOM tree - * - * @protected - * @memberof CalendarTag - */ - protected mount(): void; - /** - * This function triggers the date select event - * - * @private - * @param {TagEventType} e AFX tag event data [[TagEventType]] - * @returns {void} - * @memberof CalendarTag - */ - private dateselect; - /** - * Calibrate the layout of the tag - * - * @protected - * @memberof CalendarTag - */ - protected calibrate(): void; - /** - * Display the previous month of the current month - * - * @private - * @memberof CalendarTag - */ - private prevmonth; - /** - * Display the next month of the current month - * - * @private - * @returns - * @memberof CalendarTag - */ - private nextmonth; - /** - * Visualize the calendar base on input date - * - * @private - * @param {Date} date - * @memberof CalendarTag - */ - private calendar; - /** - * Layout definition of the widget - * - * @protected - * @returns {TagLayoutType[]} - * @memberof CalendarTag - */ - protected layout(): TagLayoutType[]; - } - } - } -} -declare namespace OS { - namespace GUI { - namespace tag { + function register(protos: string, cls: VFSFileHandleClass): void; /** - * List item event data type - */ - type ListItemEventData = TagEventDataType; - /** - * A list item represent the individual view of an item in the [[ListView]]. - * This class is an abstract prototype class, implementation of any - * list view item should extend it + * Load custom VFS handles if the package vfsx available * + * @export + * @param {boolean} [force] force load the file + * @return {*} {Promise} + */ + function loadVFSX(force?: boolean): Promise; + /** + * Looking for a attached file handle class of a string protocol + * + * When converting a string to file handle, the system will look + * for a protocol pattern in the string, if the protocol found, + * its attached handle class (found in [[VFS.handles]]) will be + * used to initialize a file handle object from the string + * + * ```typescript + * "home://data/test.txt".asFileHandle() // -> an instance of RemoteFileHandle + * ``` + * @export + * @param {string} proto protocol string + * @returns {VFSFileHandleClass[]} + */ + function findHandles(proto: string): VFSFileHandleClass[]; + /** + * Abstract prototype of all all VFS file handle definition. + * + * This prototype provides a standardized interface to access + * to different underlay file systems such as remote file, + * cloud file (Dropbox, Google drive, etc.), URL or memory-based file * * @export * @abstract - * @class ListViewItemTag - * @extends {AFXTag} + * @class BaseFileHandle */ - abstract class ListViewItemTag extends AFXTag { + abstract class BaseFileHandle { /** - * Data placeholder for the list item + * Flag indicates whether the file is dirty * - * @private - * @type {GenericObject} - * @memberof ListViewItemTag - */ - private _data; - /** - * placeholder for the item select event callback - * - * @private - * @type {TagEventCallback} - * @memberof ListViewItemTag - */ - private _onselect; - /** - * Context menu event callback handle - * - * @private - * @type {TagEventCallback} - * @memberof ListViewItemTag - */ - private _onctxmenu; - /** - * Click event callback placeholder - * - * @private - * @type {TagEventCallback} - * @memberof ListViewItemTag - */ - private _onclick; - /** - * Double click event callback handle - * - * @private - * @type {TagEventCallback} - * @memberof ListViewItemTag - */ - private _ondbclick; - /** - * Item close event callback placeholder - * - * @private - * @type {TagEventCallback} - * @memberof ListViewItemTag - */ - private _onclose; - /** - *Creates an instance of ListViewItemTag. - * @memberof ListViewItemTag - */ - constructor(); - /** - * Setter: Turn on/off the `closable` feature of the list item - * - * Getter: Check whether the item is closable - * - * @memberof ListViewItemTag - */ - set closable(v: boolean); - get closable(): boolean; - /** - * Set item select event handle - * - * @memberof ListViewItemTag - */ - set onitemselect(v: TagEventCallback); - /** - * Setter: select/unselect the current item - * - * Getter: Check whether the current item is selected - * - * @memberof ListViewItemTag - */ - set selected(v: boolean); - get selected(): boolean; - /** - * Set the context menu event handle - * - * @memberof ListViewItemTag - */ - set onctxmenu(v: TagEventCallback); - /** - * Set the item click event handle - * - * @memberof ListViewItemTag - */ - set onitemclick(v: TagEventCallback); - /** - * Set the item double click event handle - * - * @memberof ListViewItemTag - */ - set onitemdbclick(v: TagEventCallback); - /** - * set the item close event handle - * - * @memberof ListViewItemTag - */ - set onitemclose(v: TagEventCallback); - /** - * Mount the tag and bind some events - * - * @protected - * @memberof ListViewItemTag - */ - protected mount(): void; - /** - * Layout definition of the item tag. - * This function define the outer layout of the item. - * Custom inner layout of each item implementation should - * be defined in [[itemlayout]] - * - * @protected - * @returns {TagLayoutType[]} - * @memberof ListViewItemTag - */ - protected layout(): TagLayoutType[]; - /** - * Setter: - * - * Set the data of the list item. This will - * trigger the [[ondatachange]] function - * - * Getter: - * - * Get the data of the current list item - * - * @memberof ListViewItemTag - */ - set data(v: GenericObject); - get data(): GenericObject; - /** - * Any subclass of this class should implement this - * function to provide its custom item layout - * - * @protected - * @abstract - * @returns {TagLayoutType} - * @memberof ListViewItemTag - */ - protected abstract itemlayout(): TagLayoutType; - /** - * This function is called when the item data is changed. - * It should be implemented in all subclass of this class - * - * @protected - * @abstract - * @memberof ListViewItemTag - */ - protected abstract ondatachange(): void; - } - /** - * The layout of a simple list item contains only a - * AFX label - * - * @export - * @class SimpleListItemTag - * @extends {ListViewItemTag} - */ - class SimpleListItemTag extends ListViewItemTag { - /** - *Creates an instance of SimpleListItemTag. - * @memberof SimpleListItemTag - */ - constructor(); - /** - * Reset some property to default - * - * @protected - * @memberof SimpleListItemTag - */ - protected init(): void; - /** - * Do nothing - * - * @protected - * @memberof SimpleListItemTag - */ - protected calibrate(): void; - /** - * Refresh the inner label when the item data - * is changed - * - * @protected - * @returns {void} - * @memberof SimpleListItemTag - */ - protected ondatachange(): void; - /** - * Re-render the list item - * - * @protected - * @memberof SimpleListItemTag - */ - protected reload(): void; - /** - * List item custom layout definition - * - * @protected - * @returns {TagLayoutType} - * @memberof SimpleListItemTag - */ - protected itemlayout(): TagLayoutType; - } - /** - * This tag defines a traditional or a dropdown list widget. - * It contains a collection of list items in which layout - * of each item may be variable - * - * @export - * @class ListViewTag - * @extends {AFXTag} - */ - class ListViewTag extends AFXTag { - /** - * placeholder of list select event handle - * - * @private - * @type {TagEventCallback} - * @memberof ListViewTag - */ - private _onlistselect; - /** - * placeholder of list double click event handle - * - * @private - * @type {TagEventCallback} - * @memberof ListViewTag - */ - private _onlistdbclick; - /** - * placeholder of list drag and drop event handle - * - * @private - * @type {TagEventCallback>} - * @memberof ListViewTag - */ - private _ondragndrop; - /** - * placeholder of list item close event handle - * - * @private - * @memberof ListViewTag - */ - private _onitemclose; - /** - * placeholder of drag and drop mouse down event handle - * - * @private - * @memberof ListViewTag - */ - private _onmousedown; - /** - * placeholder of drag and drop mouse up event handle - * - * @private - * @memberof ListViewTag - */ - private _onmouseup; - /** - * placeholder of drag and drop mouse move event handle - * - * @private - * @memberof ListViewTag - */ - private _onmousemove; - /** - * Reference to the latest selected DOM item - * - * @private - * @type {ListViewItemTag} - * @memberof ListViewTag - */ - private _selectedItem; - /** - * A collection of selected items in the list. - * The maximum size of this collection is 1 if - * the [[multiselect]] feature is disabled - * - * @private - * @type {ListViewItemTag[]} - * @memberof ListViewTag - */ - private _selectedItems; - /** - * Data placeholder of the list - * - * @private - * @type {GenericObject[]} - * @memberof ListViewTag - */ - private _data; - /** - * Event data passing between mouse event when performing - * drag and drop on the list - * - * @private - * @type {{ from: ListViewItemTag; to: ListViewItemTag }} - * @memberof ListViewTag - */ - private _dnd; - /** - *Creates an instance of ListViewTag. - * @memberof ListViewTag - */ - constructor(); - /** - * Reset the tag's properties to the default values - * - * @protected - * @memberof ListViewTag - */ - protected init(): void; - /** - * This function does nothing - * - * @protected - * @param {*} [d] - * @memberof ListViewTag - */ - protected reload(d?: any): void; - /** - * Setter: toggle between dropdown and traditional list - * - * Getter: Check whether the list is dropdown or traditional list - * - * @memberof ListViewTag - */ - set dropdown(v: boolean); - /** - * Set drag and drop event handle - * - * @memberof ListViewTag - */ - set ondragndrop(v: TagEventCallback>); - /** - * Set list select event handle - * - * @memberof ListViewTag - */ - set onlistselect(v: TagEventCallback); - /** - * Set double click event handle - * - * @memberof ListViewTag - */ - set onlistdbclick(v: TagEventCallback); - /** - * Set item close event handle - * - * @memberof ListViewTag - */ - set onitemclose(v: (e: TagEventType) => boolean); - get dropdown(): boolean; - /** - * Setter: - * - * Set the default tag name of list's items. - * If the tag name is not specified in the - * data of a list item, this tag will be used - * - * Getter: - * - * Get the default tag name of list item - * - * @memberof ListViewTag - */ - set itemtag(v: string); - get itemtag(): string; - /** - * Setter: - * - * Turn on/off of the `multiselect` feature - * - * Getter: - * - * Check whether multi-select is allowed - * in this list - * - * @memberof ListViewTag - */ - set multiselect(v: boolean); - get multiselect(): boolean; - /** - * Setter: Enable/disable drag and drop event in the list - * - * Getter: Check whether the drag and drop event is enabled - * - * @memberof ListViewTag - */ - set dragndrop(v: boolean); - get dragndrop(): boolean; - /** - * Set the buttons layout of the list. - * Button layout allows to add some custom - * behaviors to the list. - * - * Each button data should define the [[onbtclick]] - * event handle to specify the custom behavior - * - * When the list is configured as dropdown. The buttons - * layout will be disabled - * - * Example of a button data: - * - * ``` - * { - * text: "Button text", - * icon: "home://path/to/icon.png", - * iconclass: "icon-class-name", - * onbtclick: (e) => console.log(e) - * } - * ``` - * - * @memberof ListViewTag - */ - set buttons(v: GenericObject[]); - /** - * Getter: Get data of the list - * - * Setter: Set data to the list - * - * @type {GenericObject[]} - * @memberof ListViewTag - */ - get data(): GenericObject[]; - set data(data: GenericObject[]); - /** - * Do nothing - * - * @protected - * @memberof ListViewTag - */ - protected ondatachange(): void; - /** - * Setter: Select list item(s) by their indexes - * - * Getter: Get the indexes of all selected items - * - * @memberof ListViewTag - */ - set selected(idx: number | number[]); - /** - * Get the latest selected item - * - * @readonly - * @type {ListViewItemTag} - * @memberof ListViewTag - */ - get selectedItem(): ListViewItemTag; - /** - * Get all the selected items - * - * @readonly - * @type {ListViewItemTag[]} - * @memberof ListViewTag - */ - get selectedItems(): ListViewItemTag[]; - get selected(): number | number[]; - /** - * Add an item to the beginning of the list - * - * @param {GenericObject} item - * @returns {ListViewItemTag} the added list item element - * @memberof ListViewTag - */ - unshift(item: GenericObject): ListViewItemTag; - /** - * check whether the list has data - * - * @private - * @param {GenericObject} v - * @returns - * @memberof ListViewTag - */ - private has_data; - /** - * Add an item to the beginning or end of the list - * - * @param {GenericObject} item list item data - * @param {boolean} [flag] indicates whether to add the item in the beginning of the list - * @returns {ListViewItemTag} the added list item element - * @memberof ListViewTag - */ - push(item: GenericObject, flag?: boolean): ListViewItemTag; - /** - * Delete an item - * - * @param {ListViewItemTag} item item DOM element - * @memberof ListViewTag - */ - delete(item: ListViewItemTag): void; - /** - * Select item next to the currently selected item. - * If there is no item selected, the first item will - * be selected - * - * @returns {void} - * @memberof ListViewTag - */ - selectNext(): void; - /** - * Select the previous item in the list. - * - * @returns {void} - * @memberof ListViewTag - */ - selectPrev(): void; - /** - * Unselect all the selected items in the list - * - * @returns {void} - * @memberof ListViewTag - */ - unselect(): void; - /** - * This function triggers the click event on an item - * - * @private - * @param {TagEventType} e tag event object - * @param {boolean} flag indicates whether this is a double click event - * @returns {void} - * @memberof ListViewTag - */ - private iclick; - /** - * This function triggers the double click event on an item - * - * @private - * @param {TagEventType} e tag event object - * @returns - * @memberof ListViewTag - */ - private idbclick; - /** - * This function triggers the list item select event - * - * @private - * @param {TagEventType} e tag event object - * @returns - * @memberof ListViewTag - */ - private iselect; - /** - * Mount the tag and bind some basic event - * - * @protected - * @returns {void} - * @memberof ListViewTag - */ - protected mount(): void; - /** - * This function triggers the item close event - * - * @private - * @param {TagEventType} e tag event object - * @returns {void} - * @memberof ListViewTag - */ - private iclose; - /** - * Show the dropdown list. - * This function is called only when the list is a dropdown - * list - * - * @protected - * @param {*} e - * @returns {void} - * @memberof ListViewTag - */ - protected showlist(e: any): void; - /** - * Hide the dropdown list. - * This function is called only when the list is a dropdown - * list - * - * @protected - * @param {*} e - * @memberof ListViewTag - */ - protected dropoff(e: any): void; - /** - * calibrate the list layout - * - * @protected - * @returns {void} - * @memberof ListViewTag - */ - protected calibrate(): void; - /** - * List view layout definition - * - * @protected - * @returns {TagLayoutType[]} - * @memberof ListViewTag - */ - protected layout(): TagLayoutType[]; - } - } - } -} -declare namespace OS { - namespace GUI { - namespace tag { - /** - * A system panel contains the following elements: - * - Spotlight to access to applications menu - * - Current focused application menu - * - System tray for all running services running in background - * - * @export - * @class SystemPanelTag - * @extends {AFXTag} - */ - class SystemPanelTag extends AFXTag { - /** - * Reference to spotlight data - * - * @private - * @type {(GenericObject)} - * @memberof SystemPanelTag - */ - private _osmenu; - /** - * Placeholder indicates whether the spotlight is currently shown - * - * @private * @type {boolean} - * @memberof SystemPanelTag + * @memberof BaseFileHandle */ - private _view; + dirty: boolean; /** - * Store pending loading task + * Once read, file content will be cached in this placeholder * * @private - * @type {number[]} - * @memberof SystemPanelTag + * @type {*} + * @memberof BaseFileHandle */ - private _pending_task; + private _cache; /** - * Loading animation check timeout + * Flag indicated whether the file meta-data is loaded * - * @memberof SystemPanelTag + * @type {boolean} + * @memberof BaseFileHandle */ - private _loading_toh; + ready: boolean; /** - * Place holder for a private callback function + * File path * - * @private - * @memberof SystemPanelTag + * @type {string} + * @memberof BaseFileHandle */ - private _cb; + path: string; /** - * Place holder for system app list + * File protocol e.g: + * - `os://` + * - `home://` * - * @private - * @type {GenericObject[]} - * @memberof SystemPanelTag + * @type {string} + * @memberof BaseFileHandle */ - private app_list; + protocol: string; /** - *Creates an instance of SystemPanelTag. - * @memberof SystemPanelTag + * List of path segments + * + * @type {string[]} + * @memberof BaseFileHandle */ - constructor(); + genealogy: string[]; /** - * Do nothing + * File base name + * + * @type {string} + * @memberof BaseFileHandle + */ + basename: string; + /** + * Once loaded, [[ready]] will be set to true and + * file meta-data will be stored in this place holder + * + * @type {FileInfoType} + * @memberof BaseFileHandle + */ + info: FileInfoType; + /** + * File extension + * + * @type {string} + * @memberof BaseFileHandle + */ + ext: string; + /** + * + * File type + * @type {string} + * @memberof BaseFileHandle + */ + type: string; + /** + *Creates an instance of BaseFileHandle. + * @param {string} path file path + * @memberof BaseFileHandle + */ + constructor(path: string); + /** + * Set a file path to the current file handle + * + * @param {string} p + * @returns {void} + * @memberof BaseFileHandle + */ + setPath(p: string): void; + /** + * Getter: Get the file basename + * Setter: set the file name + * + * @returns {string} + * @memberof BaseFileHandle + */ + get filename(): string; + set filename(v: string); + /** + * Getter: Get the file cache + * Setter: set the file cache + * + * @returns {any} + * @memberof BaseFileHandle + */ + get cache(): any; + set cache(v: any); + /** + * Set data to the file cache + * + * @param {*} v data object + * @returns {BaseFileHandle} + * @memberof BaseFileHandle + */ + setCache(v: any): BaseFileHandle; + /** + * Return the object itself + * + * @returns {BaseFileHandle} + * @memberof BaseFileHandle + */ + asFileHandle(): BaseFileHandle; + /** + * Check whether the current file is the root of the file tree + * + * @returns {boolean} + * @memberof BaseFileHandle + */ + isRoot(): boolean; + /** + * Check whether the current file is a hidden file + * + * @returns {boolean} + * @memberof BaseFileHandle + */ + isHidden(): boolean; + /** + * Get hash number of the current file path + * + * @returns {number} + * @memberof BaseFileHandle + */ + hash(): number; + /** + * Convert the current file cache to Base64 * * @protected - * @memberof SystemPanelTag + * @param {string} t type of the file cache: + * - `object` + * - `mime type` + * @returns {(Promise)} promise on the converted data + * @memberof BaseFileHandle */ - protected init(): void; + protected b64(t: string): Promise; /** - * Do nothing + * Get the parent file handle of the current file + * + * @returns {BaseFileHandle} + * @memberof BaseFileHandle + */ + parent(): BaseFileHandle; + /** + * Load the file meta-data before performing + * any task + * + * @returns {Promise} a promise on file meta-data + * @memberof BaseFileHandle + */ + onready(): Promise; + /** + * Public read operation + * + * This function calls the [[_rd]] function to perform the operation. + * + * If the current file is a directory, then the operation + * will return the meta-data of all files inside of the directory. + * Otherwise, file content will be returned + * + * @param {string} t data type + * - jsonp: the response is an json object + * - script: the response is a javascript code + * - xml, html: the response is a XML/HTML object + * - text: plain text + * - binary + * + * @returns {Promise} a promise on the file content + * @memberof BaseFileHandle + */ + read(t?: string): Promise; + /** + * Write the file cache to the actual file + * + * This function calls the [[_wr]] function to perform the operation + * + * @param {string} t data type + * - `base64` + * - `object` + * - `mime type` + * + * @returns {Promise} promise on the operation result + * @memberof BaseFileHandle + */ + write(t: string): Promise; + /** + * Sub-directory creation + * + * This function calls the [[_mk]] function to perform the operation + * + * @param {string} d sub directory name + * @returns {Promise} promise on the operation result + * @memberof BaseFileHandle + */ + mk(d: string): Promise; + /** + * Delete the file + * + * This function calls the [[_rm]] function to perform the operation + * + * @returns {Promise} promise on the operation result + * @memberof BaseFileHandle + */ + remove(): Promise; + /** + * Upload a file to the current directory + * + * Only work when the current file is a directory + * + * This function calls the [[_up]] function to perform the operation + * + * @returns {Promise} promise on the operation result + * @memberof BaseFileHandle + */ + upload(): Promise; + /** + * Share the file by publish it. + * + * Only work with file + * + * This function calls the [[_pub]] function to perform the operation + * + * @returns {Promise} promise on operation result + * @memberof BaseFileHandle + */ + publish(): Promise; + /** + * Download the file. + * + * Only work with file + * + * This function calls the [[_down]] function to perform the operation + * + * @returns {Promise} Promise on the operation result + * @memberof BaseFileHandle + */ + download(): Promise; + /** + * Move the current file to another location + * + * This function calls the [[_mv]] function to perform the operation + * + * @param {string} d destination location + * @returns {Promise} promise on the operation result + * @memberof BaseFileHandle + */ + move(d: string): Promise; + /** + * Execute the current file. + * + * This action depends on each file protocol + * + * This function calls the [[_exec]] function to perform the operation + * + * @returns {Promise} + * @memberof BaseFileHandle + */ + execute(): Promise; + /** + * Get an accessible link to the file + * that can be accessed from the browser + * + * @returns {string} + * @memberof BaseFileHandle + */ + getlink(): string; + /** + * Helper function returns a promise on unsupported action + * + * @param {string} t action name + * @returns {Promise} + * @memberof BaseFileHandle + */ + protected unsupported(t: string): Promise; + /** + * trigger cache changed event + * + * This function triggered when the file cached changed * * @protected + * @memberof BaseFileHandle + */ + protected _cache_changed(): void; + /** + * Low level protocol-specific read operation + * + * This function should be overridden on the file handle class + * that supports the operation + * + * @protected + * @param {string} t data type, see [[read]] + * @returns {Promise} + * @memberof BaseFileHandle + */ + protected _rd(t: string): Promise; + /** + * Low level protocol-specific write operation + * + * This function should be overridden by the file handle class + * that supports the operation + * + * @protected + * @param {string} t data type, see [[write]] * @param {*} [d] - * @memberof SystemPanelTag + * @returns {Promise} + * @memberof BaseFileHandle */ - protected reload(d?: any): void; + protected _wr(t: string, d?: any): Promise; /** - * Attach a service to the system tray on the pannel, - * this operation is performed when a service is started + * Low level protocol-specific sub-directory creation * - * @param {BaseService} s - * @returns - * @memberof SystemPanelTag - */ - attachservice(s: application.BaseService): void; - /** - * Launch the selected application from the spotlight - * applications list - * - * @private - * @returns {void} - * @memberof SystemPanelTag - */ - private open; - /** - * Perform spotlight search operation on keyboard event - * - * @private - * @param {JQuery.KeyboardEventBase} e - * @returns {void} - * @memberof SystemPanelTag - */ - private search; - /** - * detach a service from the system tray of the panel. - * This function is called when the corresponding running - * service is killed - * - * @param {BaseService} s - * @memberof SystemPanelTag - */ - detachservice(s: application.BaseService): void; - /** - * Layout definition of the panel + * This function should be overridden by the file handle class + * that supports the operation * * @protected - * @returns {TagLayoutType[]} - * @memberof SystemPanelTag + * @param {string} d sub directory name + * @returns {Promise} + * @memberof BaseFileHandle */ - protected layout(): TagLayoutType[]; + protected _mk(d: string): Promise; /** - * Refresh applications list on the spotlight widget - * from system packages meta-data + * Low level protocol-specific delete operation * - * @private - * @memberof SystemPanelTag - */ - private refreshAppList; - /** - * Show/hide the spotlight + * This function should be overridden by the file handle class + * that supports the operation * - * @private - * @param {boolean} flag - * @memberof SystemPanelTag + * @returns {Promise} + * @memberof BaseFileHandle */ - private toggle; + protected _rm(): Promise; /** - * Calibrate the spotlight widget + * Low level protocol-specific move operation * - * @memberof SystemPanelTag - */ - calibrate(): void; - /** - * Refresh the pinned applications menu - * - * @private - * @memberof SystemPanelTag - */ - private RefreshPinnedApp; - /** - * Check if the loading tasks ended, - * if it the case, stop the animation - * - * @private - * @memberof SystemPanelTag - */ - private animation_check; - /** - * Mount the tag bind some basic event + * This function should be overridden by the file handle class + * that supports the operation * * @protected - * @memberof SystemPanelTag + * @param {string} d + * @returns {Promise} + * @memberof BaseFileHandle */ - protected mount(): void; + protected _mv(d: string): Promise; + /** + * Low level protocol-specific upload operation + * + * This function should be overridden by the file handle class + * that supports the operation + * + * @returns {Promise} + * @memberof BaseFileHandle + */ + protected _up(): Promise; + /** + * Low level protocol-specific download operation + * + * This function should be overridden by the file handle class + * that supports the operation + * + * @returns {Promise} + * @memberof BaseFileHandle + */ + protected _down(): Promise; + /** + * Low level protocol-specific execute operation + * + * This function should be overridden by the file handle class + * that supports the operation + * + * @returns {Promise} + * @memberof BaseFileHandle + */ + protected _exec(): Promise; + /** + * Low level protocol-specific share operation + * + * This function should be overridden by the file handle class + * that supports the operation + * + * @returns {Promise} + * @memberof BaseFileHandle + */ + protected _pub(): Promise; + /** + * Read the current file meta-data + * + * should be implemented by subclasses + * + * @abstract + * @returns {Promise} + * @memberof BaseFileHandle + */ + abstract meta(): Promise; } + /** + * Remote file handle allows to perform file operation + * on AntOS remote server files. Its protocol is defined + * by the following pattern: + * + * ``` + * ^(home|desktop|os|Untitled)$ + * ``` + * + * @class RemoteFileHandle + * @extends {BaseFileHandle} + */ + class RemoteFileHandle extends BaseFileHandle { + /** + *Creates an instance of RemoteFileHandle. + * @param {string} path file path + * @memberof RemoteFileHandle + */ + constructor(path: string); + /** + * Read remote file meta-data + * + * @returns {Promise} + * @memberof RemoteFileHandle + */ + meta(): Promise; + /** + * Remote file access link + * + * @returns {string} + * @memberof RemoteFileHandle + */ + getlink(): string; + /** + * Read remote file content. + * + * If the current file is a directory, then the operation + * will return the meta-data of all files inside of the directory. + * Otherwise, file content will be returned + * + * @protected + * @param {string} t data type see [[read]] + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _rd(t: string): Promise; + /** + * Write file cache to the remote file + * + * @protected + * @param {string} t data type see [[write]] + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _wr(t: string): Promise; + /** + * Create sub directory + * + * Only work on directory file handle + * + * @protected + * @param {string} d sub directory name + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _mk(d: string): Promise; + /** + * Delete file/folder + * + * @protected + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _rm(): Promise; + /** + * Move file/folder + * + * @protected + * @param {string} d + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _mv(d: string): Promise; + /** + * Upload a file + * + * Only work with directory file handle + * + * @protected + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _up(): Promise; + /** + * Download a file + * + * only work with file + * + * @protected + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _down(): Promise; + /** + * Publish a file + * + * @protected + * @returns {Promise} + * @memberof RemoteFileHandle + */ + protected _pub(): Promise; + } + /** + * Package file is remote file ([[RemoteFileHandle]]) located either in + * the local user packages location or system packages + * location, it should be in the following format: + * + * ``` + * pkg://PKG_NAME/path/to/file + * + * ``` + * + * The system will locale the package name PKG_NAME either in the system domain + * or in user domain and return the correct path to the package + * + * @export + * @class PackageFileHandle + * @extends {RemoteFileHandle} + */ + class PackageFileHandle extends RemoteFileHandle { + /** + *Creates an instance of PackageFileHandle. + * @param {string} pkg_path package path in string + * @memberof PackageFileHandle + */ + constructor(pkg_path: string); + } + /** + * Application file is an AntOS special file allowing to + * refer to an application as a regular file. Its protocol + * pattern is defined as: + * + * ```typescript + * "^app$" // e.g. app://Setting + * ``` + * + * @class ApplicationHandle + * @extends {BaseFileHandle} + */ + class ApplicationHandle extends BaseFileHandle { + /** + *Creates an instance of ApplicationHandle. + * @param {string} path file path + * @memberof ApplicationHandle + */ + constructor(path: string); + /** + * Read application meta-data + * + * @returns {Promise} + * @memberof ApplicationHandle + */ + meta(): Promise; + /** + * If the current file is root (e.g. `app://`), the operation + * will return all system packages meta-data. + * + * Otherwise, an error will be thrown + * + * @protected + * @param {string} t + * @returns {Promise} + * @memberof ApplicationHandle + */ + protected _rd(t: string): Promise; + } + /** + * A buffer file handle represents a virtual file that is stored + * on the system memory. Its protocol pattern is defined as: + * + * ```typescript + * "^mem$" // e.g. mem://test.txt + * ``` + * + * @class BufferFileHandle + * @extends {BaseFileHandle} + */ + class BufferFileHandle extends BaseFileHandle { + /** + *Creates an instance of BufferFileHandle. + * @param {string} path file path + * @param {string} mime file mime-type + * @param {*} data file data + * @memberof BufferFileHandle + */ + constructor(path: string, mime: string, data: any); + /** + * init the mem file tree if necessary + */ + private init_file_tree; + /** + * cache changed handle + */ + protected _cache_changed(): void; + /** + * Read the file meta-data + * + * @returns {Promise} + * @memberof BufferFileHandle + */ + meta(): Promise; + /** + * Load the file meta-data before performing + * any task + * + * @returns {Promise} a promise on file meta-data + * @memberof BufferFileHandle + */ + onready(): Promise; + /** + * Read file content stored in the file cached + * + * @protected + * @param {string} t data type see [[read]] + * @returns {Promise} + * @memberof BufferFileHandle + */ + protected _rd(t: string): Promise; + /** + * Write data to the file cache + * + * @protected + * @param {string} t data type, see [[write]] + * @returns {Promise} + * @memberof BufferFileHandle + */ + protected _wr(t: string): Promise; + /** + * Create sub directory + * + * Only work on directory file handle + * + * @protected + * @param {string} d sub directory name + * @returns {Promise} + * @memberof BufferFileHandle + */ + protected _mk(d: string): Promise; + /** + * Delete file/folder + * + * @protected + * @returns {Promise} + * @memberof BufferFileHandle + */ + protected _rm(): Promise; + setPath(p: string): void; + private updatePath; + /** + * Move file/folder + * + * @protected + * @param {string} d + * @returns {Promise} + * @memberof BufferFileHandle + */ + protected _mv(d: string): Promise; + /** + * Download the buffer file + * + * @protected + * @returns {Promise} + * @memberof BufferFileHandle + */ + protected _down(): Promise; + } + /** + * URL file handle represents a HTTP/HTTPs link url + * as an AntOS VFS file handle. Its protocol is defined as + * + * ``` + * ^(http|https|ftp)$ + * ``` + * + * @class URLFileHandle + * @extends {BaseFileHandle} + */ + class URLFileHandle extends BaseFileHandle { + /** + *Creates an instance of URLFileHandle. + * @param {string} path + * @memberof URLFileHandle + */ + constructor(path: string); + /** + * Read file meta-data + * + * @returns {Promise} + * @memberof URLFileHandle + */ + meta(): Promise; + /** + * Read URL content + * + * @protected + * @param {string} t data type see [[read]] + * @returns {Promise} + * @memberof URLFileHandle + */ + protected _rd(t: string): Promise; + } + /** + * Shared file handle represents all AntOS shared file. + * Its protocol is defined as: + * + * ``` + * ^shared$ + * ``` + * + * @class SharedFileHandle + * @extends {API.VFS.BaseFileHandle} + */ + class SharedFileHandle extends API.VFS.BaseFileHandle { + /** + *Creates an instance of SharedFileHandle. + * @param {string} path file path + * @memberof SharedFileHandle + */ + constructor(path: string); + /** + * Read file meta-data + * + * @returns {Promise} + * @memberof SharedFileHandle + */ + meta(): Promise; + /** + * Read file content + * + * @protected + * @param {string} t data type, see [[read]] + * @returns {Promise} + * @memberof SharedFileHandle + */ + protected _rd(t: string): Promise; + /** + * write data to shared file + * + * @protected + * @param {string} t data type, see [[write]] + * @param {string} d file data + * @returns {Promise} + * @memberof SharedFileHandle + */ + protected _wr(t: string, d: string): Promise; + /** + * Un-publish the file + * + * @protected + * @returns {Promise} + * @memberof SharedFileHandle + */ + protected _rm(): Promise; + /** + * Download shared file + * + * @protected + * @returns {Promise} + * @memberof SharedFileHandle + */ + protected _down(): Promise; + /** + * Un publish the file + * + * @protected + * @returns {Promise} + * @memberof SharedFileHandle + */ + protected _pub(): Promise; + } + /**Utilities global functions */ + /** + * Read a file content from a zip archive + * + * The content type should be: + * - base64 : the result will be a string, the binary in a base64 form. + * - text (or string): the result will be an unicode string. + * - binarystring: the result will be a string in “binary” form, using 1 byte per char (2 bytes). + * - array: the result will be an Array of bytes (numbers between 0 and 255). + * - uint8array : the result will be a Uint8Array. This requires a compatible browser. + * - arraybuffer : the result will be a ArrayBuffer. This requires a compatible browser. + * - blob : the result will be a Blob. This requires a compatible browser. * + * If file_name is not specified, the first file_name in the zip archive will be read + * @export + * @param {string} file zip file + * @param {string} type content type to read + * @param {string} [file_name] the file should be read from the zip archive + * @return {*} {Promise} + */ + function readFileFromZip(file: string, type: string, file_name?: string): Promise; + /** + * Cat all files to a single out-put + * + * @export + * @param {string[]} list list of VFS files + * @param {string} data input data string that will be cat to the files content + * @param {string} join_by join on files content by this string + * @return {*} {Promise} + */ + function cat(list: string[], data: string, join_by?: string): Promise; + /** + * Read all files content on the list + * + * @export + * @param {string[]} list list of VFS files + * @param {GenericObject[]} contents content array + * @return {void} + */ + function read_files(list: string[]): Promise[]>; + /** + * Copy files to a folder + * + * @export + * @param {string[]} files list of files + * @param {string} to destination folder + * @return {*} {Promise} + */ + function copy(files: string[], to: string): Promise; + /** + * Create a zip archive from a folder + * + * @export + * @param {string} src source file/folder + * @param {string} dest destination archive + * @return {*} {Promise} + */ + function mkar(src: string, dest: string): Promise; + /** + * Create a list of directories + * + * @export + * @param {string[]} list of directories to be created + * @param {boolen} sync sync/async of directory creation + * @return {*} {Promise} + */ + function mkdirAll(list: string[], sync?: boolean): Promise; + /** + * + * + * @export Extract a zip fle + * @param {string} zfile zip file to extract + * @param {(zip:any) => Promise} [dest_callback] a callback to get extraction destination + * @return {*} {Promise} + */ + function extractZip(zfile: string | API.VFS.BaseFileHandle, dest_callback: (zip: any) => Promise): Promise; + /** + * Make files from a set of template files + * + * @export + * @param {Array} list mapping paths between templates files and created files + * @param {string} path files destination + * @param {(data: string) => string} callback: pre-processing files content before writing to destination files + * @return {*} {Promise} + */ + function mktpl(list: Array, path: string, callback: (data: string) => string): Promise; } } } declare namespace OS { - namespace GUI { + /** + * This namespace is dedicated to everything related to the + * global system settings + */ + namespace setting { /** - * Tab container data type definition + * User setting type definition * * @export - * @interface TabContainerTabType + * @interface UserSettingType */ - interface TabContainerTabType { + interface UserSettingType { /** - * Reference to the DOM element of the current container + * User full name * - * @type {HTMLElement} - * @memberof TabContainerTabType + * @type {string} + * @memberof UserSettingType */ - container: HTMLElement; + name: string; + /** + * User name + * + * @type {string} + * @memberof UserSettingType + */ + username: string; + /** + * User id + * + * @type {number} + * @memberof UserSettingType + */ + id: number; + /** + * User groups + * + * @type {{ [index: number]: string }} + * @memberof UserSettingType + */ + group?: { + [index: number]: string; + }; [propName: string]: any; } - namespace tag { + /** + * Virtual desktop setting data type + * + * @export + * @interface DesktopSettingType + */ + interface DesktopSettingType { /** - * A tab container allows to attach each tab on a [[TabBarTag]] - * with a container widget. The attached container widget should be - * composed inside a [[HBoxTag]] + * Desktop VFS path * - * The tab bar in a tab container can be configured to display tabs - * in horizontal (row) or vertical (column) order. Default to vertical order - * - * Once a tab is selected, its attached container will be shown - * - * @export - * @class TabContainerTag - * @extends {AFXTag} + * @type {string} + * @memberof DesktopSettingType */ - class TabContainerTag extends AFXTag { + path: string; + /** + * Desktop menu, can be added automatically by applications + * + * @type {GUI.BasicItemType[]} + * @memberof DesktopSettingType + */ + menu: GUI.BasicItemType[]; + /** + * Show desktop hidden files + * + * @type {boolean} + * @memberof DesktopSettingType + */ + showhidden: boolean; + [propName: string]: any; + } + /** + * Wallpaper setting data type + * + * @export + * @interface WPSettingType + */ + interface WPSettingType { + /** + * Repeat wallpaper: + * - `repeat` + * - `repeat-x` + * - `repeat-y` + * - `no-repeat` + * + * @type {string} + * @memberof WPSettingType + */ + repeat: string; + /** + * Wallpaper size + * - `contain` + * - `cover` + * - `auto` + * + * @type {string} + * @memberof WPSettingType + */ + size: string; + /** + * VFS path to the wallpaper image + * + * @type {string} + * @memberof WPSettingType + */ + url: string; + } + /** + * Theme setting data type + * + * @export + * @interface ThemeSettingType + */ + interface ThemeSettingType { + /** + * Theme name, this value is used for looking + * theme file in system asset + * + * @type {string} + * @memberof ThemeSettingType + */ + name: string; + /** + * Theme user-friendly text + * + * @type {string} + * @memberof ThemeSettingType + */ + text: string; + } + /** + * Appearance setting data type + * + * @export + * @interface AppearanceSettingType + */ + interface AppearanceSettingType { + /** + * Current theme name + * + * @type {string} + * @memberof AppearanceSettingType + */ + theme: string; + /** + * All themes available in the system + * + * @type {ThemeSettingType[]} + * @memberof AppearanceSettingType + */ + themes: ThemeSettingType[]; + /** + * Current wallpaper setting + * + * @type {WPSettingType} + * @memberof AppearanceSettingType + */ + wp: WPSettingType; + /** + * All wallpapers available in the system + * + * @type {string[]} + * @memberof AppearanceSettingType + */ + wps: string[]; + } + /** + * VFS Mount points setting data type + * + * @export + * @interface VFSMountPointSettingType + */ + interface VFSMountPointSettingType { + /** + * Path to the mount point + * + * @type {string} + * @memberof VFSMountPointSettingType + */ + path: string; + /** + * User friendly mount point name + * + * @type {string} + * @memberof VFSMountPointSettingType + */ + text: string; + [propName: string]: any; + } + /** + * VFS setting data type + * + * @export + * @interface VFSSettingType + */ + interface VFSSettingType { + /** + * mount points setting + * + * @type {VFSMountPointSettingType[]} + * @memberof VFSSettingType + */ + mountpoints: VFSMountPointSettingType[]; + [propName: string]: any; + } + /** + * Global system setting data type + * + * @export + * @interface SystemSettingType + */ + interface SystemSettingType { + /** + * System error report URL + * + * @type {string} + * @memberof SystemSettingType + */ + error_report: string; + /** + * Current system locale e.g. `en_GB` + * + * @type {string} + * @memberof SystemSettingType + */ + locale: string; + /** + * System menus + * + * @type {API.PackageMetaType[]} + * @memberof API.PackageMetaType + */ + menu: API.PackageMetaType[]; + /** + * Packages meta-data + * + * @type {{ [index: string]: API.PackageMetaType }} + * @memberof SystemSettingType + */ + packages: { + [index: string]: API.PackageMetaType; + }; + /** + * Path to the installed packages + * + * @type {{ + * user: string; + * system: string; + * }} + * @memberof SystemSettingType + */ + pkgpaths: { /** - * Reference to the currently selected tab DOM element + * User specific packages install location * - * @private - * @type {TabContainerTabType} - * @memberof TabContainerTag + * @type {string} */ - private _selectedTab; + user: string; /** - * Placeholder of the tab select event handle + * System packages install location * - * @private - * @type {TagEventCallback} - * @memberof TabContainerTag + * @type {string} */ - private _ontabselect; + system: string; + }; + /** + * Package repositories setting. + * This configuration is used by [[MarketPlace]] + * for package management + * + * @type {{ + * text: string; + * url: string; + * }[]} + * @memberof SystemSettingType + */ + repositories: { /** - *Creates an instance of TabContainerTag. - * @memberof TabContainerTag + * Repository name + * + * @type {string} */ - constructor(); + text: string; /** - * Init the tab bar direction to vertical (column) + * Repository uri * - * @protected - * @memberof TabContainerTag + * @type {string} */ - protected init(): void; + url: string; + }[]; + /** + * Startup applications and services + * + * @type {{ + * apps: string[]; + * services: string[]; + * }} + * @memberof SystemSettingType + */ + startup: { /** - * Do nothing + * List of application names * - * @protected - * @param {*} [d] - * @memberof TabContainerTag + * @type {string[]} */ - protected reload(d?: any): void; + apps: string[]; /** - * Set the tab select event handle + * List of service names * - * @memberof TabContainerTag + * @type {string[]} */ - set ontabselect(f: TagEventCallback); + services: string[]; /** - * Get all tab items in the container + * List of pinned applications * - * @readonly - * @type {TabContainerTabType[]} - * @memberof TabContainerTag + * @type {string[]} */ - get tabs(): TabContainerTabType[]; - /** - * Select a tab by its index - * - * @memberof TabContainerTag - */ - set selectedIndex(i: number); - /** - * Setter: - * - * Set the tab bar direction: - * - `row`: horizontal direction - * - `column`: vertical direction - * - * Getter: - * - * Get the tab bar direction - * - * @memberof TabContainerTag - */ - set dir(v: "row" | "column"); - get dir(): "row" | "column"; - /** - * Setter: - * - * Select a tab using the its tab data type. - * This will show the attached container to the tab - * - * Getter: - * - * Get the tab data of the currently selected Tab - * - * @memberof TabContainerTag - */ - set selectedTab(v: TabContainerTabType); - get selectedTab(): TabContainerTabType; - /** - * Set the tab bar width, this function only - * works when the tab bar direction is set to - * `row` - * - * @memberof TabContainerTag - */ - set tabbarwidth(v: number); - /** - * Set the tab bar height, this function only works - * when the tab bar direction is set to `column` - * - * @memberof TabContainerTag - */ - set tabbarheight(v: number); - /** - * Add a new tab with container to the container - * - * item should be in the following format: - * - * ```ts - * { - * text: string, - * icon?: string, - * iconclass?: string, - * container: HTMLElement - * } - * ``` - * - * @param {GenericObject} item tab descriptor - * @param {boolean} insert insert the tab content to the container ? - * @returns {ListViewItemTag} the tab DOM element - * @memberof TabContainerTag - */ - addTab(item: GenericObject, insert: boolean): ListViewItemTag; - /** - * Remove a tab from the container - * - * @param {ListViewItemTag} tab the tab item to be removed - * @memberof TabContainerTag - */ - removeTab(tab: ListViewItemTag): void; - /** - * Mount the tag and bind basic events - * - * @protected - * @memberof TabContainerTag - */ - protected mount(): void; - /** - * calibrate the tab container - * - * @memberof TabContainerTag - */ - calibrate(): void; - /** - * Layout definition - * - * @protected - * @returns {TagLayoutType[]} - * @memberof TabContainerTag - */ - protected layout(): TagLayoutType[]; - } + pinned: string[]; + }; + } + /** + * User settings + */ + var user: UserSettingType; + /** + * Application settings + */ + var applications: GenericObject; + /** + * Desktop settings + */ + var desktop: DesktopSettingType; + /** + * Appearance settings + */ + var appearance: AppearanceSettingType; + /** + * VFS settings + */ + var VFS: VFSSettingType; + /** + * System settings + */ + var system: SystemSettingType; + } + /** + * Reset the system settings to default values + * + * @export + */ + function resetSetting(): void; + /** + * Apply the input parameter object to system settings. + * This object could be an object loaded from + * setting JSON file saved on the server. + * + * @export + * @param {*} conf + */ + function systemSetting(conf: any): void; +} +/// +declare namespace OS { + namespace application { + /** + * Services are processes that run in the background and + * are waken up in certain circumstances such as by global + * events or user interactions. + * + * Each service takes an entry in the system tray menu + * located on the system panel. This menu entry is used + * to access to service visual contents such as: options, + * task performing based on user interaction, etc. + * + * Services are singleton processes, there is only + * one process of a service at a time + * + * @export + * @abstract + * @class BaseService + * @extends {BaseModel} + */ + abstract class BaseService extends BaseModel { + /** + * The service icon shown in the system tray + * + * @type {string} + * @memberof BaseService + */ + icon: string; + /** + * CSS class of the service icon shown in the system tray + * + * @type {string} + * @memberof BaseService + */ + iconclass: string; + /** + * Text of the service shown in the system tray + * + * @type {string} + * @memberof BaseService + */ + text: string; + /** + * Reference to the menu entry DOM element attached + * to the service + * + * @type {HTMLElement} + * @memberof BaseService + */ + domel: HTMLElement; + /** + * Reference to the timer that periodically executes the callback + * defined in [[watch]]. + * + * @private + * @type {number} + * @memberof BaseService + */ + private timer; + /** + * Reference to the system tray menu + * + * @type {HTMLElement} + * @memberof BaseService + */ + holder: HTMLElement; + /** + * Placeholder for service select callback + * + * @memberof BaseService + */ + onmenuselect: (d: OS.GUI.TagEventType) => void; + /** + *Creates an instance of BaseService. + * @param {string} name service class name + * @param {AppArgumentsType[]} args service arguments + * @memberof BaseService + */ + constructor(name: string, args: AppArgumentsType[]); + /** + * Do nothing + * + * @memberof BaseService + */ + hide(): void; + /** + * Init the service before attaching it to + * the system tray: event subscribe, scheme + * loading. + * + * Should be implemented by all subclasses + * + * @abstract + * @memberof BaseService + */ + abstract init(): void; + /** + * Refresh the service menu entry in the + * system tray + * + * @memberof BaseService + */ + update(): void; + /** + * Get the service meta-data + * + * @returns {API.PackageMetaType} + * @memberof BaseService + */ + meta(): API.PackageMetaType; + /** + * Attach the service to a menu element + * such as the system tray menu + * + * @param {HTMLElement} h + * @memberof BaseService + */ + attach(h: HTMLElement): void; + /** + * Set the callback that will be called periodically + * after a period of time. + * + * Each service should only have at most one watcher + * + * @protected + * @param {number} t period time in seconds + * @param {() => void} f callback function + * @returns {number} + * @memberof BaseService + */ + protected watch(t: number, f: () => void): number; + /** + * This function is called when the service + * is exited + * + * @protected + * @param {BaseEvent} evt exit event + * @returns + * @memberof BaseService + */ + protected onexit(evt: BaseEvent): JQuery; + /** + * Do nothing + * + * @memberof BaseService + */ + main(): void; + /** + * Do nothing + * + * @memberof BaseService + */ + show(): void; + /** + * Awake the service, this function is usually called when + * the system tray menu entry attached to the service is + * selected. + * + * This function should be implemented by all subclasses + * + * @abstract + * @param {GUI.TagEventType} e + * @memberof BaseService + */ + abstract awake(e: GUI.TagEventType): void; + /** + * Do nothing + * + * @protected + * @param {BaseEvent} evt + * @memberof BaseService + */ + protected cleanup(evt: BaseEvent): void; } } } declare namespace OS { - namespace GUI { - namespace tag { + namespace API { + /** + * Data type exchanged via + * the global Announcement interface + * + * @export + * @interface AnnouncementDataType + */ + interface AnnouncementDataType { /** - * Definition of system file view widget + * message string * - * @export - * @class FileViewTag - * @extends {AFXTag} + * @type {string| FormattedString} + * @memberof AppAnnouncementDataType */ - class FileViewTag extends AFXTag { + message: string | FormattedString; + /** + * Process ID + * + * @type {number} + * @memberof AppAnnouncementDataType + */ + id: number; + /** + * App name + * + * @type {string | FormattedString} + * @memberof AppAnnouncementDataType + */ + name: string | FormattedString; + /** + * Icon file + * + * @type {string} + * @memberof AppAnnouncementDataType + */ + icon?: string; + /** + * App icon class + * + * @type {string} + * @memberof AppAnnouncementDataType + */ + iconclass?: string; + /** + * User specific data + * + * @type {*} + * @memberof AppAnnouncementDataType + */ + u_data?: T; + } + /** + * Observable entry type definition + * + * @export + * @interface ObservableEntryType + */ + interface ObservableEntryType { + /** + * A Set of callbacks that should be called only once. + * These callbacks will be removed after the first + * occurrence of the corresponding event + * + * @memberof ObservableEntryType + */ + one: Set<(d: any) => void>; + /** + * A Set of callbacks that should be called + * every time the corresponding event is triggered + * + * @memberof ObservableEntryType + */ + many: Set<(d: any) => void>; + } + /** + * Announcement listener type definition + * + * @export + * @interface AnnouncerListenerType + */ + interface AnnouncerListenerType { + [index: number]: { /** - * placeholder for file select event callback + * The event name * - * @private - * @type {TagEventCallback} - * @memberof FileViewTag - */ - private _onfileselect; - /** - * placeholder for file open event callback - * - * @private - * @type {TagEventCallback} - * @memberof FileViewTag - */ - private _onfileopen; - /** - * Reference to the currently selected file meta-data - * - * @private - * @type {API.FileInfoType} - * @memberof FileViewTag - */ - private _selectedFile; - /** - * Data placeholder of the current working directory - * - * @private - * @type {API.FileInfoType[]} - * @memberof FileViewTag - */ - private _data; - /** - * The path of the current working directory - * - * @private * @type {string} - * @memberof FileViewTag */ - private _path; + e: string; /** - * Header definition of the widget grid view + * The event callback * - * @private - * @type {(GenericObject[])} - * @memberof FileViewTag */ - private _header; - /** - * placeholder for the user-specified meta-data fetch function - * - * @private - * @memberof FileViewTag - */ - private _fetch; - /** - *Creates an instance of FileViewTag. - * @memberof FileViewTag - */ - constructor(); - /** - * Init the widget before mounting - * - * @protected - * @memberof FileViewTag - */ - protected init(): void; - /** - * Update the current widget, do nothing - * - * @protected - * @param {*} [d] - * @memberof FileViewTag - */ - protected reload(d?: any): void; - /** - * set the function that allows to fetch file entries. - * This handle function should return a promise on - * an arry of [[API.FileInfoType]] - * - * @memberof FileViewTag - */ - set fetch(v: (p: string) => Promise); - /** - * set the callback handle for the file select event. - * The parameter of the callback should be an object - * of type [[TagEventType]] with the data type `T` is [[API.FileInfoType]] - * - * @memberof FileViewTag - */ - set onfileselect(e: TagEventCallback); - /** - set the callback handle for the file open event. - * The parameter of the callback should be an object - * of type [[TagEventType]] with the data type `T` is [[API.FileInfoType]] - * - * @memberof FileViewTag - */ - set onfileopen(e: TagEventCallback); - /** - * Setter: - * - * chang the view of the widget, there are three different views - * - `icon` - * - `list` - * - `tree` - * - * Getter: - * - * Get the current view setting of the widget - * - * @memberof FileViewTag - */ - set view(v: string); - get view(): string; - /** - * Setter: - * - * Turn on/off the changing current working directory feature - * of the widget when a directory is double clicked. If enabled, - * the widget will use the configured [[fetch]] function to query - * the content of the selected directory - * - * Getter: - * - * check whether changing current working directory feature - * is enabled - * - * @memberof FileViewTag - */ - set chdir(v: boolean); - get chdir(): boolean; - /** - * Setter : Enable or disable the status bar of the widget - * - * Getter: Check whether the status bar is enabled - * - * @memberof FileViewTag - */ - set status(v: boolean); - get status(): boolean; - /** - * Setter: - * - * Allow the widget to show or hide hidden file - * - * Getter: - * - * Check whether the hidden file should be shown in - * the widget - * - * @memberof FileViewTag - */ - set showhidden(v: boolean); - get showhidden(): boolean; - /** - * Get the current selected file - * - * @readonly - * @type {API.FileInfoType} - * @memberof FileViewTag - */ - get selectedFile(): API.FileInfoType; - /** - * Setter: - * - * Set the path of the current working directory. - * When called the widget will refresh the current - * working directory using the configured [[fetch]] - * function - * - * Getter: - * - * Get the path of the current working directory - * - * @memberof FileViewTag - */ - set path(v: string); - get path(): string; - /** - * Setter: Set the data of the current working directory - * - * Getter: Get the data of the current working directory - * - * @memberof FileViewTag - */ - set data(v: API.FileInfoType[]); - get data(): API.FileInfoType[]; - /** - * Set the file drag and drop event handle. This allows application - * to define custom behavior of the event - * - * @memberof FileViewTag - */ - set ondragndrop(v: TagEventCallback>); - /** - * Sort file by its type - * - * @private - * @param {API.FileInfoType} a - * @param {API.FileInfoType} b - * @return {*} {number} - * @memberof FileViewTag - */ - private sortByType; - /** - * sort file by its name - * - * @private - * @param {API.FileInfoType} a first file meta-data - * @param {API.FileInfoType} b second file meta-data - * @returns {number} - * @memberof FileViewTag - */ - private sortByName; - /** - * calibrate the widget layout - * - * @memberof FileViewTag - */ - calibrate(): void; - /** - * Refresh the list view of the widget. This function - * is called when the view of the widget changed to `icon` - * - * @private - * @memberof FileViewTag - */ - private refreshList; - /** - * Refresh the grid view of the widget, this function is called - * when the view of the widget set to `list` - * - * @private - * @memberof FileViewTag - */ - private refreshGrid; - /** - * Refresh the Treeview of the widget, this function is called - * when the view of the widget set to `tree` - * - * @private - * @memberof FileViewTag - */ - private refreshTree; - /** - * Create the tree data from the list of input - * file meta-data - * - * @private - * @param {API.FileInfoType[]} data list of file meta-data - * @returns {TreeViewDataType[]} - * @memberof FileViewTag - */ - private getTreeData; - /** - * Refresh data of the current widget view - * - * @private - * @returns {void} - * @memberof FileViewTag - */ - private refreshData; - /** - * Switch between three view options - * - * @private - * @memberof FileViewTag - */ - private switchView; - /** - * This function triggers the file select event - * - * @private - * @param {API.FileInfoType} e selected file meta-data - * @memberof FileViewTag - */ - private fileselect; - /** - * This function triggers the file open event - * - * @private - * @param {API.FileInfoType} e selected file meta-data - * @memberof FileViewTag - */ - private filedbclick; - /** - * Mount the widget in the DOM tree - * - * @protected - * @memberof FileViewTag - */ - protected mount(): void; - /** - * Layout definition of the widget - * - * @protected - * @returns {TagLayoutType[]} - * @memberof FileViewTag - */ - protected layout(): TagLayoutType[]; - } + f: (d: any) => void; + }[]; + } + /** + * This class is the based class used in AntOS event + * announcement system. + * It implements the observer pattern using simple + * subscribe/publish mechanism + * @export + * @class Announcer + */ + class Announcer { + /** + * The observable object that stores event name + * and its corresponding callback in [[ObservableEntryType]] + * + * @type {GenericObject} + * @memberof Announcer + */ + observable: GenericObject; + /** + * Enable/disable the announcer + * + * @type {boolean} + * @memberof Announcer + */ + enable: boolean; + /** + *Creates an instance of Announcer. + * @memberof Announcer + */ + constructor(); + /** + * Disable the announcer, when this function is called + * all events and their callbacks will be removed + * + * @returns + * @memberof Announcer + */ + disable(): boolean; + /** + * Subscribe to an event, the callback will be called + * every time the corresponding event is trigged + * + * @param {string} evtName event name + * @param {(d: any) => void} callback The corresponding callback + * @returns {void} + * @memberof Announcer + */ + on(evtName: string, callback: (d: any) => void): void; + /** + * Subscribe to an event, the callback will + * be called only once and then removed from the announcer + * + * @param {string} evtName event name + * @param {(d: any) => void} callback the corresponding callback + * @returns {void} + * @memberof Announcer + */ + one(evtName: string, callback: (d: any) => void): void; + /** + * Unsubscribe the callback from an event + * + * @param {string} evtName event name + * @param {(d: any) => void} [callback] the callback to be unsubscribed. + * When the `callback` is `*`, all callbacks related to `evtName` will be + * removed + * @memberof Announcer + */ + off(evtName: string, callback?: (d: any) => void): void; + /** + * Trigger an event + * + * @param {string} evtName event name + * @param {*} data data object that will be send to all related callback + * @returns {void} + * @memberof Announcer + */ + trigger(evtName: string, data: any): void; + } + } + /** + * This namespace defines every thing related to the system announcement. + * + * The system announcement provides a global way to communicate between + * processes (applications/services) using the subscribe/publish + * mechanism + */ + namespace announcer { + /** + * The global announcer object that manages global events + * and callbacks + */ + var observable: API.Announcer; + /** + * This variable is used to allocate the `id` of all messages + * passing between publishers and subscribers in the + * system announcement + */ + var quota: 0; + /** + * Placeholder of all global events listeners + */ + var listeners: API.AnnouncerListenerType; + /** + * Subscribe to a global event + * + * @export + * @param {string} e event name + * @param {(d: API.AnnouncementDataType) => void} f event callback + * @param {GUI.BaseModel} a the process (Application/service) related to the callback + */ + function on(e: string, f: (d: API.AnnouncementDataType) => void, a: BaseModel): void; + /** + * Trigger a global event + * + * @export + * @param {string} e event name + * @param {*} d data passing to all related callback + */ + function trigger(e: string, d: any): void; + /** + * Report system fail. This will trigger the global `fail` + * event + * + * @export + * @param {(string | FormattedString)} m message string + * @param {Error} e error to be reported + */ + function osfail(m: string | FormattedString, e: Error): void; + /** + * Report system error. This will trigger the global `error` + * event + * + * @export + * @param {(string | FormattedString)} m message string + * @param {Error} e error to be reported + */ + function oserror(m: string | FormattedString, e: Error): void; + /** + * Trigger system notification (`info` event) + * + * @export + * @param {(string | FormattedString)} m notification message + */ + function osinfo(m: string | FormattedString): void; + /** + * + * + * @export + * @param {string} e event name + * @param {(string| FormattedString)} m event message + * @param {*} [d] user data + */ + function ostrigger(e: string, m: string | FormattedString, d?: any): void; + /** + * Unregister a process (application/service) from + * the global announcement system + * + * @export + * @param {GUI.BaseModel} app reference to the process + * @returns {void} + */ + function unregister(app: BaseModel): void; + /** + * Allocate message id + * + * @export + * @returns {number} + */ + function getMID(): number; + } +} +declare namespace OS { + namespace API { + /** + * Simple Virtual Database (VDB) application API. + * + * This API abstracts and provides a standard way to + * connect to a server-side relational database (e.g. sqlite). + * + * Each user when connected has their own database previously + * created. All VDB operations related to that user will be + * performed on this database. + * + * The creation of user database need to be managed by the server-side API. + * The VDB API assumes that the database already exist. All operations + * is performed in tables level + * + * @export + * @class DB + */ + class DB { + /** + * A table name on the user's database + * + * @private + * @type {string} + * @memberof DB + */ + private table; + /** + *Creates an instance of DB. + * @param {string} table table name + * @memberof DB + */ + constructor(table: string); + /** + * Save data to the current table. The input + * data must conform to the table record format. + * + * On the server side, if the table doest not + * exist yet, it should be created automatically + * by inferring the data structure of the input + * object + * + * @param {GenericObject} d data object represents a current table record + * @returns {Promise} + * @memberof DB + */ + save(d: GenericObject): Promise; + /** + * delete record(s) from the current table by + * a conditional object + * + * @param {*} c conditional object, c can be: + * + * * a `number`: the operation will delete the record with `id = c` + * * a `string`: The SQL string condition that selects record to delete + * * a conditional object represents a SQL condition statement as an object, + * example: `pid = 10 AND cid = 2` is represented by: + * + * ```typescript + * { + * exp: { + * "and": { + * pid: 10, + * cid: 2 + * } + * } + * ``` + * + * @returns {Promise} + * @memberof DB + */ + delete(c: GenericObject | number | string): Promise; + /** + * Get a record in the table by its primary key + * + * @param {number} id the primary key value + * @returns {Promise>} Promise on returned record data + * @memberof DB + */ + get(id: number): Promise>; + /** + * Find records by a condition + * + * @param {GenericObject} cond conditional object + * + * a conditional object represents a SQL condition statement as an object, + * example: `pid = 10 AND cid = 2 ORDER BY date DESC` is represented by: + * + * ```typescript + * { + * exp: { + * "and": { + * pid: 10, + * cid: 2 + * } + * }, + * order: { + * date: "DESC" + * } + * } + * ``` + * @returns {Promise[]>} + * @memberof DB + */ + find(cond: GenericObject): Promise[]>; } } } +declare namespace OS { + /** + * This namespace dedicated to all operations related to system + * process management + */ + namespace PM { + /** + * A process is either an instance of an application or a service + */ + type ProcessType = application.BaseApplication | application.BaseService; + /** + * Alias to all classes that extends [[BaseModel]] + */ + type ModelTypeClass = { + new (args: AppArgumentsType[]): T; + }; + /** + * Process id allocator, when a new process is created, the value of + * this variable is increased + */ + var pidalloc: number; + /** + * All running processes is stored in this variables + */ + /** + * Current active process ID + */ + var pidactive: number; + var processes: GenericObject; + /** + * Create a new process of application or service + * + * @export + * @param {string} app class name string + * @param {ProcessTypeClass} cls prototype class + * @param {GUI.AppArgumentsType[]} [args] process arguments + * @returns {Promise} a promise on the created process + */ + function createProcess(app: string, cls: ModelTypeClass, args?: AppArgumentsType[]): Promise; + /** + * Get the reference to a process using its id + * + * @export + * @param {number} pid + * @returns {BaseModel} + */ + function appByPid(pid: number): BaseModel; + /** + * Kill a process + * + * @export + * @param {OS.GUI.BaseModel} app reference to the process + * @returns {void} + */ + function kill(app: BaseModel): void; + /** + * Kill all process of an application or service + * + * @export + * @param {string} app process class name + * @param {boolean} force force exit all process + * @returns {void} + */ + function killAll(app: string, force: boolean): void; + /** + * Get the current active application + * @export + * @returns {BaseModel} + */ + function getActiveApp(): BaseModel; + } +}