@nent/core
Version:
42 lines (39 loc) • 1.05 kB
JavaScript
/*!
* NENT 2022
*/
import { r as registerInstance, h, a as getElement, H as Host } from './index-916ca544.js';
import { A as ActionService } from './service-9338e502.js';
import './index-f7016b94.js';
import './logging-5a93c8af.js';
import './state-27a8a5bc.js';
import './index-4bfabbbd.js';
const Action = class {
constructor(hostRef) {
registerInstance(this, hostRef);
this.valid = true;
this.actionService = new ActionService(this, 'n-action');
}
/**
* Get the underlying actionEvent instance. Used by the n-action-activator element.
*/
getAction() {
return this.actionService.getAction();
}
/**
* Send this action to the action messaging system.
*/
sendAction(data) {
return this.actionService.sendAction(data);
}
get childScript() {
return this.el.querySelector('script');
}
get childInputs() {
return this.el.querySelectorAll('input,select,textarea');
}
render() {
return h(Host, null);
}
get el() { return getElement(this); }
};
export { Action as n_action };