mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +01:00
e323cd1d79
Update shoelace to 2.9.0
45 lines
828 B
TypeScript
45 lines
828 B
TypeScript
import {Et2Select} from "../Et2Select";
|
|
import {Et2StaticSelectMixin, StaticOptions} from "../StaticOptions";
|
|
import {SelectOption} from "../FindSelectOptions";
|
|
|
|
export class Et2SelectState extends Et2StaticSelectMixin(Et2Select)
|
|
{
|
|
/**
|
|
* Two-letter ISO country code
|
|
*/
|
|
protected __countryCode;
|
|
|
|
static get properties()
|
|
{
|
|
return {
|
|
...super.properties,
|
|
countryCode: String,
|
|
}
|
|
}
|
|
|
|
constructor()
|
|
{
|
|
super();
|
|
|
|
this.countryCode = 'DE';
|
|
}
|
|
|
|
get countryCode()
|
|
{
|
|
return this.__countryCode;
|
|
}
|
|
|
|
set countryCode(code : string)
|
|
{
|
|
this.__countryCode = code;
|
|
this._static_options = <SelectOption[]>StaticOptions.state(this, {country_code: code});
|
|
this.requestUpdate("select_options");
|
|
}
|
|
|
|
set_country_code(code)
|
|
{
|
|
this.countryCode = code;
|
|
}
|
|
}
|
|
|
|
customElements.define("et2-select-state", Et2SelectState); |