[]
        
(Showing Draft Content)

documentBinder/types

The following sections describe the module: documentBinder/types.

Interfaces

Type Aliases

Interfaces

Interface: BackendServer

Properties

token

token: string


The token needed to access the Wyn API.


Example

token: 'DA3CF35403BF9B0823A63CB2663D58E88B0B85FB588A1068753E0BDEF935B7C2'

URL

URL: string


The Wyn Server URL.


Example

url: 'http://localhost:51980/'

useTokenInHeader

Optional useTokenInHeader: boolean


When set to true, the token will be sent in the request header instead of the query parameter. The default value is false, meaning the token is passed through the URL.


Example

useTokenInHeader: true,

Interface: DocumentBinder

Properties

designer

Optional designer: Object

Type declaration

Name

Type

destroy

(element: Element) => void

init

(option: DocumentBinderInitOptionFull) => Element

destroy: (element: Element) => void


init: (option: DocumentBinderInitOptionFull) => Element



preview

Optional preview: Object

Type declaration

Name

Type

destroy

(element: Element) => void

init

(option: DocumentBinderInitOptionFull) => Element

destroy: (element: Element) => void


init: (option: DocumentBinderInitOptionFull) => Element


Interface: EventsOptionBase

Properties

afterDocumentSave

Optional afterDocumentSave: (success: boolean, documentId?: string) => void

Type declaration

▸ (success, documentId?): void


The callback after save.

Parameters

Name

Type

success

boolean

documentId?

string

Returns

void


Example

afterDocumentSave: () => {}

Interface: InitOption

Hierarchy

Properties

backendServer

backendServer: BackendServer


language

language: string


The designer or viewer language


Example

language: 'zh'

Inherited from

InitOptionBase.language


parentSelector

parentSelector: () => HTMLElement

Type declaration

▸ (): HTMLElement


The dom contains designer or viewer.

Returns

HTMLElement


Example

parentSelector: () => document.querySelector('#root')

siteTitle

Optional siteTitle: string


The web tab title.


Example

siteTitle: 'dataset'

Inherited from

InitOptionBase.siteTitle


theme

Optional theme: string


The designer or viewer theme.


Example

theme: 'red'

Inherited from

InitOptionBase.theme


version

Optional version: string


The designer or viewer version.


Example

version: '1.0.0'

Inherited from

InitOptionBase.version

Interface: InitOptionBase

Hierarchy

Properties

language

language: string


The designer or viewer language.

Example

language: 'zh'

siteTitle

Optional siteTitle: string


The web tab title


Example

siteTitle: 'dataset'

theme

Optional theme: string


The designer or viewer theme.


Example

theme: 'red'

version

Optional version: string


The designer or viewer version.


Example

version: '1.0.0'

Type Aliases

DocumentBinderInitOption

Ƭ DocumentBinderInitOption: InitOptionBase & DocumentBinderInitOptionCore


DocumentBinderInitOptionCore

Ƭ DocumentBinderInitOptionCore: Object

Type declaration

Name

Type

documentId?

string

showCloseButton?

boolean

documentId?: string


The documentBinder id.


Example

documentId: '1f183c3f-64f9-4b4c-ac92-cd37580bde21'

showCloseButton?: boolean


A flag specifying whether to show the showCloseButton.


Example

showCloseButton: true


DocumentBinderInitOptionFull

Ƭ DocumentBinderInitOptionFull: InitOption & DocumentBinderInitOptionCore


destroyAble

Ƭ destroyAble: Object

Type declaration

Name

Type

destroy

() => void

destroy: () => void