diff --git a/package-lock.json b/package-lock.json index 2f6b2f5..1e1b54d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gisce/ooui", - "version": "2.12.2", + "version": "2.13.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@gisce/ooui", - "version": "2.12.2", + "version": "2.13.0", "dependencies": { "@gisce/conscheck": "1.0.9", "html-entities": "^2.3.3", diff --git a/package.json b/package.json index e4c08eb..b1b73d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gisce/ooui", - "version": "2.12.2", + "version": "2.13.0", "engines": { "node": "20.5.0" }, diff --git a/src/Alert.ts b/src/Alert.ts index c289fcd..75b8e76 100644 --- a/src/Alert.ts +++ b/src/Alert.ts @@ -1,8 +1,9 @@ -import Field from "./Field"; +import ContainerWidget from "./ContainerWidget"; +import Button from "./Button"; type AlertType = "success" | "warning" | "info" | "error" | undefined; -class Alert extends Field { +class Alert extends ContainerWidget { /** * Alert type */ @@ -42,10 +43,13 @@ class Alert extends Field { this._icon = value; } + get buttons(): Button[] { + return this._container.rows.flat().filter((b) => !b.invisible) as Button[]; + } + constructor(props: any) { super(props); if (props) { - this._nolabel = true; if (props.alert_type) { this._alertType = props.alert_type; }