All Downloads are FREE. Search and download functionalities are using the official Maven repository.

libraries.Web.pec Maven / Gradle / Ivy

There is a newer version: 0.1.57
Show newest version
@Inlined
define MouseEvent as native category with bindings:
	
	define category bindings as:
		JavaScript: Event

and methods:
		
	define stopPropagation as method doing:
		JavaScript: this.stopPropagation();

	define preventDefault as method doing:
		JavaScript: this.preventDefault();

	define altKey as method returning Boolean doing:
		JavaScript: this.altKey;

	define ctrlKey as method returning Boolean doing:
		JavaScript: this.ctrlKey;

	define shiftKey as method returning Boolean doing:
		JavaScript: this.shiftKey;

	define metaKey as method returning Boolean doing:
		JavaScript: this.metaKey;
		

@Inlined
define KeyboardEvent as native category with bindings:
	
	define category bindings as:
		JavaScript: Event

and methods:
		
	define stopPropagation as method doing:
		JavaScript: this.stopPropagation();

	define preventDefault as method doing:
		JavaScript: this.preventDefault();
		
	define altKey as method returning Boolean doing:
		JavaScript: this.altKey;

	define ctrlKey as method returning Boolean doing:
		JavaScript: this.ctrlKey;

	define shiftKey as method returning Boolean doing:
		JavaScript: this.shiftKey;

	define metaKey as method returning Boolean doing:
		JavaScript: this.metaKey;


@Inlined
define RadioChangedEvent as native category with bindings:

	define category bindings as:
		JavaScript: Event

and methods:
		
	define getSelectedRadio as method returning Text doing:
		JavaScript: return this.target.id;
	
	define stopPropagation as method doing:
		JavaScript: this.stopPropagation();

	define preventDefault as method doing:
		JavaScript: this.preventDefault();
		

@Inlined
define InputChangedEvent as native category with bindings:

	define category bindings as:
		JavaScript: Event

and methods:
		
	define getCurrentText as method returning Text doing:
		JavaScript: return this.target.defaultValue;
	
	define getProposedText as method returning Text doing:
		JavaScript: return this.target.value;

	define stopPropagation as method doing:
		JavaScript: this.stopPropagation();

	define preventDefault as method doing:
		JavaScript: this.preventDefault();
		

@Inlined
define SubmitEvent as native category with bindings:

	define category bindings as:
		JavaScript: Event

and methods:
		
	define stopPropagation as method doing:
		JavaScript: this.stopPropagation();

	define preventDefault as method doing:
		JavaScript: this.preventDefault();

// TODO kept for compatibility, but should be removed
define ClickEventCallback as abstract method receiving MouseEvent event
define MouseEventCallback as abstract method receiving MouseEvent event
define KeyboardEventCallback as abstract method receiving KeyboardEvent event
// TODO kept for compatibility, but should be removed
define RadioChangedCallback as abstract method receiving RadioChangedEvent event
define RadioChangedEventCallback as abstract method receiving RadioChangedEvent event
// TODO kept for compatibility, but should be removed
define InputChangedCallback as abstract method receiving InputChangedEvent event
define InputChangedEventCallback as abstract method receiving InputChangedEvent event
define SubmitEventCallback as abstract method receiving SubmitEvent event
define DateChangedCallback as abstract method receiving Date value
define ToggleChangedCallback as abstract method receiving Boolean value
define ItemSelectedCallback as abstract method receiving Any value
define PageSelectedCallback as abstract method receiving Integer value

@Inlined
define FileRef as native category with bindings:

	define category bindings as:
		JavaScript: FileRef from module: prompto/web/FileRef.js

and methods: 

	define getName as method returning Text doing:
		JavaScript: return this.file.name;
	
	define getMimeType as method returning Text doing:
		JavaScript: return this.file.type;

	define getSize as method returning Integer doing:
		JavaScript: return this.file.size;

	define readText as method receiving TextCallback callback doing:
		JavaScript: this.readText(callback);

	define readImage as method returning Image doing:
		JavaScript: return this.readImage();

	define readBlob as method returning Blob doing:
		JavaScript: return this.readBlob();

define FileRefCallback as abstract method receiving FileRef file
 
define selectFile as native method receiving FileRefCallback callback and Text<> mimeTypes = nothing doing:
	JavaScript: selectFileRef(callback, mimeTypes); from module: prompto/web/FileRef.js

define getReactWidgetProps as native method receiving ReactWidget w returning Document doing:
	JavaScript: return w.props;


define getReactWidgetState as native method receiving ReactWidget w returning Document doing:
	JavaScript: return w.state;


define setReactWidgetState as native method receiving ReactWidget w, Document state and Callback callback = nothing doing:
	JavaScript: w.setState(state, callback);


define ReactStateAndPropsUpdater as abstract method receiving Document state and Document props returning Document


define setReactWidgetState as native method receiving ReactWidget w, ReactStateAndPropsUpdater updater and Callback callback = nothing doing:
	JavaScript: w.setState(updater, callback);


define forceReactWidgetRender as native method receiving ReactWidget w and Callback callback = nothing doing:
	JavaScript: w.forceUpdate(callback);


define showReactModal as native method receiving Html dialog doing:
	JavaScript: ReactUtils.showModal(dialog);


define hideReactModal as native method doing:
	JavaScript: ReactUtils.hideModal();


define showReactContextMenu as native method receiving MouseEvent event and Html menu doing:
	JavaScript: ReactUtils.showContextMenu(event, menu);


define hideReactContextMenu as native method doing:
	JavaScript: ReactUtils.hideContextMenu();


@WidgetField(name="state", type=Document)
@WidgetField(name="refs", type=Document)
@WidgetField(name="props", type=Document, isProperties=true)
define ReactWidget as widget with methods:
	
	@Static
	@Callback
	define getDerivedStateFromProps as method receiving Document props and Document state doing:
		return Nothing
		
	@Callback
	define componentDidMount as method doing:
		// nothing to do		

	@Callback
	define render as abstract method returning Html	

	@Callback
	define componentWillUnmount as method doing:
		// nothing to do		

	@Callback
	define shouldComponentUpdate as method receiving Document nextProps and Document nextState returning Boolean doing:
		return true		

	@Callback
	define getSnapshotBeforeUpdate as method receiving Document prevProps and Document prevState returning Boolean doing:
		return nothing		

	@Callback
	define componentDidUpdate as method receiving Document prevProps, Document prevState and Document snapshot returning Boolean doing:
		// nothing to do

	define getProperties as method doing:
		return getReactWidgetProps self

	define getState as method doing:
		return getReactWidgetState self
	
	define setState as method receiving Document state and Callback callback = nothing doing:
		setReactWidgetState self with state and callback

	define setState as method receiving ReactStateAndPropsUpdater updater and Callback callback = nothing doing:
		setReactWidgetState self with updater and callback

	define forceRender as method receiving Callback callback = nothing doing:
		forceReactWidgetRender self with callback

define WidgetCallback as abstract method receiving any ref

define alert as native method receiving Text text doing:
	JavaScript: alert(text);

define downloadFile as native method receiving Text url and Text name = Nothing doing:
	JavaScript: downloadFile(url, name); from module: prompto/web/Browser.js

define openBrowser as native method receiving Text url, Text name = Nothing and Text methodName = "open" returning Document doing:
	JavaScript: return openBrowser(methodName, url, name); from module: prompto/web/Browser.js

define browserHistoryBack as native method doing:
	JavaScript: window.history.back();

define browserHistoryForward as native method doing:
	JavaScript: window.history.forward();

define browserHistoryGo as native method receiving Integer count doing:
	JavaScript: window.history.go(count);

define browserHistoryCount as native method returning Integer doing:
	JavaScript: return window.history.length;

define browserGoto as native method receiving Text location doing:
	JavaScript: browserGoto(location); from module: prompto/web/Browser.js

define KeyboardShortcutCallback as abstract method returning Boolean

define browserBindKeyboardShortcuts as native method receiving Text[] shortcuts and KeyboardShortcutCallback callback doing:
	JavaScript: browserBindKeyboardShortcuts(shortcuts, callback); from module: prompto/web/Browser.js

define browserGetWindow as native method returning Document doing:
	JavaScript: return window;

define WebSocketCallback as abstract method receiving WebSocket value

define openWebSocket as native method receiving Text url, AnyCallback onMessage, Callback onClose = nothing and WebSocketCallback callback = nothing doing:
		JavaScript: openWebSocket(url, onMessage, onClose, callback); from module: prompto/web/WebSocket.js

@Inlined
define WebSocket as native category with bindings:

    define category bindings as:
		JavaScript: window.WebSocket

and methods: 

	define close as method doing:
        JavaScript: this.close();
	




© 2015 - 2024 Weber Informatics LLC | Privacy Policy