HtmlNetwork Module
- class epyk.core.html.HtmlNetwork.Alert(page: PageModel, value, width, height, html_code, options, profile)
- property options: OptionsAlert
Property to the component options.
Optional can either impact the Python side or the Javascript builder.
Python can pass some options to the JavaScript layer.
Usage:
danger = page.ui.network.warning() danger.options.time = None
- class epyk.core.html.HtmlNetwork.Assistant(component: Html, title, page: PageModel, html_code, options, profile)
- class epyk.core.html.HtmlNetwork.Bot(page: PageModel, width, height, html_code, options, profile)
- Three main states for the bot:
Message
Question
Advice / Information
- property style: ClassNetworkBot
Property to the CSS Style of the component.
- class epyk.core.html.HtmlNetwork.Chat(page: PageModel, records, width, height, html_code, options, profile)
- enter(js_funcs, profile=None, source_event=None, on_ready=False)
- Parameters:
js_funcs – The Javascript functions.
profile – Optional. A flag to set the component performance storage.
source_event – Optional. The JavaScript DOM source for the event (can be a sug item).
on_ready – Optional. Specify if the event needs to be trigger when the page is loaded.
- property js: Chat
The Javascript functions defined for this component.
Those can be specific ones for the module or generic ones from the language.
- property options: OptionsChat
Property to the comments component options.
Optional can either impact the Python side or the Javascript builder.
Python can pass some options to the JavaScript layer.
- send(socket, channel=None, js_funcs=None, profile=None)
- Parameters:
socket –
channel –
js_funcs – The Javascript functions.
profile – Optional. A flag to set the component performance storage.
- subscribe(socket, channel, data=None, options=None, js_funcs=None, profile=None)
Subscribe to a socket channel.
Data received from the socket are defined as a dictionary with a field data.
The content of data will be used by this component.
Related Pages:
- Parameters:
socket – Socket. A python socket object
channel – The channel on which events will be received
data –
options –
js_funcs – The Javascript functions.
profile – Optional. A flag to set the component performance storage.
- class epyk.core.html.HtmlNetwork.Comments(page: PageModel, record, width, height, html_code, options, profile)
- add(text: str, time: str, **kwargs)
Add a text message.
- Parameters:
text – The text message
time – the timestamp
- enter(js_funcs: Optional[Union[List[Union[str, JsDataModel]], str]] = None, profile: Optional[Union[bool, dict]] = None, source_event: Optional[str] = None, on_ready: bool = False)
Define the function when the user press enter.
- Parameters:
js_funcs – The Javascript functions
profile – Optional. A flag to set the component performance storage
source_event – Optional. The JavaScript DOM source for the event (can be a sug item)
on_ready – Optional. Specify if the event needs to be trigger when the page is loaded
- property js: Chat
The Javascript functions defined for this component.
Those can be specific ones for the module or generic ones from the language.
- Returns:
A Javascript Dom object
- property options: OptionsChat
Property to the comments component options.
Optional can either impact the Python side or the Javascript builder.
Python can pass some options to the JavaScript layer.
- send(socket, channel=None, js_funcs: Optional[Union[List[Union[str, JsDataModel]], str]] = None, profile: Optional[Union[bool, dict]] = None)
- Parameters:
socket –
channel –
js_funcs – The Javascript functions
profile – Optional. A flag to set the component performance storage
- subscribe(socket, channel, data=None, options=None, js_funcs=None, profile=None)
Subscribe to a socket channel.
Data received from the socket are defined as a dictionary with a field data.
The content of data will be used by this component.
Related Pages:
- Parameters:
socket – Socket. A python socket object
channel – The channel on which events will be received
data –
options –
js_funcs –
profile –
- class epyk.core.html.HtmlNetwork.DropFile(page: PageModel, vals, delimiter, tooltip, width, height, html_code, options, profile)
- property dom: JsHtmlDropFiles
The dom component property
- drop(js_funcs, js_data=None, components=None, prevent_default=True, profile=None)
Add a drag and drop property to the element.
Usage:
drop_area.drop([ drop_area.transfer("<URL>") ], components=[])
- Parameters:
js_funcs – The Javascript series of functions
js_data – Optional. A datamap objection of a dictionary
components – The different HTML objects to be added to the component
prevent_default – Optional. Prevent default on the JavaScript event
profile – Optional. A flag to set the component performance storage
- Returns:
Return self to allow the chaining
- load(js_funcs, js_data=None, components=None, prevent_default=True, profile=None)
Load the content of the file.
This function will first use as underlying the drop method to get the file dropped.
Usage:
drop_area.load([ drop_area.transfer("<URL>") ], components=[])
- Parameters:
js_funcs – The Javascript series of functions
js_data – Optional. A datamap objection of a dictionary
components – Optional. The different HTML objects to be added to the component
prevent_default – Optional. Prevent default on the JavaScript event
profile – Optional. A flag to set the component performance storage
- loading(label: str = 'Processing data', **kwargs)
- Parameters:
label – Optional.
- property options: OptionFiles
Property to the component options.
Optional can either impact the Python side or the Javascript builder.
Python can pass some options to the JavaScript layer.
- paste(js_funcs, components=None, profile=None, source_event=None)
- Parameters:
js_funcs – Javascript functions
components – The different HTML objects to be added to the component
profile – Optional. A flag to set the component performance storage
source_event – Optional. The source target for the event
- transfer(url: str)
Create a Ajax transfer to a distant server.
- Parameters:
url – The transfer end point on the server.
- class epyk.core.html.HtmlNetwork.News(page: PageModel, value, width, height, html_code, options, profile)
- property js: News
The Javascript functions defined for this component.
Those can be specific ones for the module or generic ones from the language.
- property options: OptionsNews
Property to the component options.
Optional can either impact the Python side or the Javascript builder.
Python can pass some options to the JavaScript layer.