activator-oce-exporter
Version:
Extract Activator binder and convert it to valid OCE mono pacakge
35 lines (32 loc) • 678 B
JavaScript
export function LinkExtension(superClass) {
return class extends superClass {
static get properties() {
return {
...super.properties,
href: {
type: String,
fieldType: 'String',
value: '',
},
target: {
type: String,
fieldType: 'Select',
value: '_blank',
selectOptions: [
'_blank',
'_parent',
'_top',
],
},
};
}
openLink() {
if (this.href) {
window.open(this.href, this.target);
}
}
firstUpdated() {
this.setAttribute('data-mo-prevent-link', true);
}
};
}