@oicl/openbridge-webcomponents 2.0.0-next.57 → 2.0.0-next.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/openbridge-webcomponents.bundle.js +6585 -4581
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +1047 -83
- package/dist/alert-severity.d.ts +38 -0
- package/dist/alert-severity.d.ts.map +1 -0
- package/dist/alert-severity.js +176 -0
- package/dist/alert-severity.js.map +1 -0
- package/dist/ar/building-blocks/poi-header/poi-header.css.js +38 -7
- package/dist/ar/building-blocks/poi-header/poi-header.css.js.map +1 -1
- package/dist/ar/building-blocks/poi-header/poi-header.d.ts +7 -2
- package/dist/ar/building-blocks/poi-header/poi-header.d.ts.map +1 -1
- package/dist/ar/building-blocks/poi-header/poi-header.js +5 -0
- package/dist/ar/building-blocks/poi-header/poi-header.js.map +1 -1
- package/dist/ar/poi-button/poi-button.css.js +110 -32
- package/dist/ar/poi-button/poi-button.css.js.map +1 -1
- package/dist/ar/poi-button/poi-button.d.ts +7 -2
- package/dist/ar/poi-button/poi-button.d.ts.map +1 -1
- package/dist/ar/poi-button/poi-button.js +15 -0
- package/dist/ar/poi-button/poi-button.js.map +1 -1
- package/dist/ar/types.d.ts +6 -1
- package/dist/ar/types.d.ts.map +1 -1
- package/dist/ar/types.js +5 -0
- package/dist/ar/types.js.map +1 -1
- package/dist/automation/automation-badge/automation-badge.d.ts +9 -1
- package/dist/automation/automation-badge/automation-badge.d.ts.map +1 -1
- package/dist/automation/automation-badge/automation-badge.js +119 -12
- package/dist/automation/automation-badge/automation-badge.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +25 -1
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js +7 -2
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.d.ts +10 -3
- package/dist/automation/automation-button/abstract-automation-button.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.js +23 -2
- package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
- package/dist/automation/automation-button/automation-button.css.js +9 -4
- package/dist/automation/automation-button/automation-button.css.js.map +1 -1
- package/dist/automation/automation-button/automation-button.d.ts +4 -2
- package/dist/automation/automation-button/automation-button.d.ts.map +1 -1
- package/dist/automation/automation-button/automation-button.js +24 -6
- package/dist/automation/automation-button/automation-button.js.map +1 -1
- package/dist/automation/automation-tank/automation-tank.d.ts +3 -2
- package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
- package/dist/automation/automation-tank/automation-tank.js +13 -2
- package/dist/automation/automation-tank/automation-tank.js.map +1 -1
- package/dist/building-blocks/instrument-radial/instrument-radial.d.ts +10 -0
- package/dist/building-blocks/instrument-radial/instrument-radial.d.ts.map +1 -1
- package/dist/building-blocks/instrument-radial/instrument-radial.js +86 -21
- package/dist/building-blocks/instrument-radial/instrument-radial.js.map +1 -1
- package/dist/components/accordion-card/accordion-card.css.js +34 -0
- package/dist/components/accordion-card/accordion-card.css.js.map +1 -1
- package/dist/components/accordion-card/accordion-card.d.ts +3 -2
- package/dist/components/accordion-card/accordion-card.d.ts.map +1 -1
- package/dist/components/accordion-card/accordion-card.js +4 -3
- package/dist/components/accordion-card/accordion-card.js.map +1 -1
- package/dist/components/alert-button/alert-button.css.js +744 -7
- package/dist/components/alert-button/alert-button.css.js.map +1 -1
- package/dist/components/alert-button/alert-button.d.ts +3 -1
- package/dist/components/alert-button/alert-button.d.ts.map +1 -1
- package/dist/components/alert-button/alert-button.js +33 -31
- package/dist/components/alert-button/alert-button.js.map +1 -1
- package/dist/components/alert-frame/alert-frame.css.js +116 -29
- package/dist/components/alert-frame/alert-frame.css.js.map +1 -1
- package/dist/components/alert-frame/alert-frame.d.ts +42 -15
- package/dist/components/alert-frame/alert-frame.d.ts.map +1 -1
- package/dist/components/alert-frame/alert-frame.js +68 -17
- package/dist/components/alert-frame/alert-frame.js.map +1 -1
- package/dist/components/alert-frame/critical-badge.d.ts +12 -0
- package/dist/components/alert-frame/critical-badge.d.ts.map +1 -0
- package/dist/components/alert-frame/critical-badge.js +47 -0
- package/dist/components/alert-frame/critical-badge.js.map +1 -0
- package/dist/components/alert-frame/diagnostic-badge.d.ts +12 -0
- package/dist/components/alert-frame/diagnostic-badge.d.ts.map +1 -0
- package/dist/components/alert-frame/diagnostic-badge.js +60 -0
- package/dist/components/alert-frame/diagnostic-badge.js.map +1 -0
- package/dist/components/alert-icon/alert-icon.d.ts +6 -1
- package/dist/components/alert-icon/alert-icon.d.ts.map +1 -1
- package/dist/components/alert-icon/alert-icon.js +96 -38
- package/dist/components/alert-icon/alert-icon.js.map +1 -1
- package/dist/components/alert-icon/icons/icon-critical.d.ts +3 -0
- package/dist/components/alert-icon/icons/icon-critical.d.ts.map +1 -0
- package/dist/components/alert-icon/icons/icon-critical.js +26 -0
- package/dist/components/alert-icon/icons/icon-critical.js.map +1 -0
- package/dist/components/alert-list-details/alert-list-details.d.ts.map +1 -1
- package/dist/components/alert-list-details/alert-list-details.js +6 -7
- package/dist/components/alert-list-details/alert-list-details.js.map +1 -1
- package/dist/components/badge/badge.css.js +50 -2
- package/dist/components/badge/badge.css.js.map +1 -1
- package/dist/components/badge/badge.d.ts +13 -2
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +54 -0
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/manual-icon/icon-alerts-critical-twotone.d.ts +30 -0
- package/dist/manual-icon/icon-alerts-critical-twotone.d.ts.map +1 -0
- package/dist/manual-icon/icon-alerts-critical-twotone.js +55 -0
- package/dist/manual-icon/icon-alerts-critical-twotone.js.map +1 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.d.ts +30 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.d.ts.map +1 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.js +55 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.js.map +1 -0
- package/dist/navigation-instruments/gauge-radial/gauge-radial.css.js +99 -0
- package/dist/navigation-instruments/gauge-radial/gauge-radial.css.js.map +1 -0
- package/dist/navigation-instruments/gauge-radial/gauge-radial.d.ts +42 -7
- package/dist/navigation-instruments/gauge-radial/gauge-radial.d.ts.map +1 -1
- package/dist/navigation-instruments/gauge-radial/gauge-radial.js +178 -31
- package/dist/navigation-instruments/gauge-radial/gauge-radial.js.map +1 -1
- package/dist/navigation-instruments/readout/readout.css.js +7 -18
- package/dist/navigation-instruments/readout/readout.css.js.map +1 -1
- package/dist/navigation-instruments/readout/readout.d.ts +6 -7
- package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
- package/dist/navigation-instruments/readout/readout.js +54 -52
- package/dist/navigation-instruments/readout/readout.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +9 -36
- package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts +8 -8
- package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.js +49 -42
- package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
- package/dist/navigation-instruments/watch/tickmark.d.ts +2 -1
- package/dist/navigation-instruments/watch/tickmark.d.ts.map +1 -1
- package/dist/navigation-instruments/watch/tickmark.js +24 -4
- package/dist/navigation-instruments/watch/tickmark.js.map +1 -1
- package/dist/navigation-instruments/watch/watch.d.ts +23 -1
- package/dist/navigation-instruments/watch/watch.d.ts.map +1 -1
- package/dist/navigation-instruments/watch/watch.js +48 -20
- package/dist/navigation-instruments/watch/watch.js.map +1 -1
- package/dist/openbridge.css +155 -0
- package/dist/types.d.ts +7 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +18 -7
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ObcAlertFrameThickness, ObcAlertFrameMode, ObcAlertFrameType } from "../../components/alert-frame/alert-frame.js";
|
|
2
2
|
import { MotorizedVariant } from "./abstract-automation-button-motorized.js";
|
|
3
3
|
import { AutomationButtonPositioning, AutomationButtonDirection, AutomationButtonLabelDirection } from "./automation-button.js";
|
|
4
4
|
import { CircularProgressMode } from "../../building-blocks/circular-progress/circular-progress.js";
|
|
5
5
|
import { AutomationButtonBadgeAlert, AutomationButtonBadgeInterlock, AutomationButtonBadgeCommandLocked, AutomationButtonBadgeControl } from "./abstract-automation-button.js";
|
|
6
|
+
import { AlertType } from "../../types.js";
|
|
6
7
|
const argTypesAbstractAutomationButton = {
|
|
7
8
|
tag: {
|
|
8
9
|
control: { type: "text" }
|
|
@@ -19,12 +20,16 @@ const argTypesAbstractAutomationButton = {
|
|
|
19
20
|
options: Object.values(ObcAlertFrameType),
|
|
20
21
|
control: { type: "radio" }
|
|
21
22
|
},
|
|
23
|
+
alertFrameMode: {
|
|
24
|
+
options: Object.values(ObcAlertFrameMode),
|
|
25
|
+
control: { type: "radio" }
|
|
26
|
+
},
|
|
22
27
|
alertFrameThickness: {
|
|
23
28
|
options: Object.values(ObcAlertFrameThickness),
|
|
24
29
|
control: { type: "radio" }
|
|
25
30
|
},
|
|
26
31
|
alertFrameStatus: {
|
|
27
|
-
options: Object.values(
|
|
32
|
+
options: Object.values(AlertType),
|
|
28
33
|
control: { type: "radio" }
|
|
29
34
|
},
|
|
30
35
|
positioning: {
|
package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-automation-button-storybook-helpers.js","sources":["../../../src/automation/automation-button/abstract-automation-button-storybook-helpers.ts"],"sourcesContent":["import {\n ObcAlertFrameStatus,\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n} from '../../components/alert-frame/alert-frame.js';\nimport {MotorizedVariant} from './abstract-automation-button-motorized.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonLabelDirection,\n AutomationButtonPositioning,\n} from './automation-button.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\nimport {\n AutomationButtonBadgeAlert,\n AutomationButtonBadgeCommandLocked,\n AutomationButtonBadgeControl,\n AutomationButtonBadgeInterlock,\n} from './abstract-automation-button.js';\n\nexport const argTypesAbstractAutomationButton = {\n tag: {\n control: {type: 'text'},\n },\n readoutPosition: {\n options: ['top', 'bottom', 'left', 'right'],\n control: {type: 'radio'},\n },\n readoutSize: {\n options: ['small', 'regular', 'enhanced'],\n control: {type: 'radio'},\n },\n alertFrameType: {\n options: Object.values(ObcAlertFrameType),\n control: {type: 'radio'},\n },\n alertFrameThickness: {\n options: Object.values(ObcAlertFrameThickness),\n control: {type: 'radio'},\n },\n alertFrameStatus: {\n options: Object.values(ObcAlertFrameStatus),\n control: {type: 'radio'},\n },\n positioning: {\n options: Object.values(AutomationButtonPositioning),\n control: {type: 'select'},\n },\n badgeControl: {\n options: Object.values(AutomationButtonBadgeControl),\n control: {type: 'select'},\n },\n badgeCommandLocked: {\n options: Object.values(AutomationButtonBadgeCommandLocked),\n control: {type: 'select'},\n },\n badgeInterlock: {\n options: Object.values(AutomationButtonBadgeInterlock),\n control: {type: 'select'},\n },\n badgeAlert: {\n options: Object.values(AutomationButtonBadgeAlert),\n control: {type: 'select'},\n },\n progressMode: {\n options: Object.values(CircularProgressMode),\n control: {type: 'select'},\n if: {arg: 'progress'},\n },\n progressValue: {\n control: {type: 'range', min: 0, max: 100, step: 1},\n if: {arg: 'progress'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonPassiveRound = {\n ...argTypesAbstractAutomationButton,\n variant: {\n options: ['regular', 'flat'],\n control: {type: 'radio'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonPassiveSquare = {\n ...argTypesAbstractAutomationButton,\n variant: {\n options: ['square', 'flat'],\n control: {type: 'radio'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonMotorized = {\n ...argTypesAbstractAutomationButton,\n speedInPercent: {\n control: {type: 'range', min: 0, max: 100, step: 1},\n },\n labelDirection: {\n options: Object.values(AutomationButtonLabelDirection),\n control: {type: 'radio'},\n },\n direction: {\n options: Object.values(AutomationButtonDirection),\n control: {type: 'radio'},\n },\n variant: {\n options: Object.values(MotorizedVariant),\n control: {type: 'radio'},\n },\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"abstract-automation-button-storybook-helpers.js","sources":["../../../src/automation/automation-button/abstract-automation-button-storybook-helpers.ts"],"sourcesContent":["import {\n ObcAlertFrameStatus,\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n ObcAlertFrameMode,\n} from '../../components/alert-frame/alert-frame.js';\nimport {MotorizedVariant} from './abstract-automation-button-motorized.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonLabelDirection,\n AutomationButtonPositioning,\n} from './automation-button.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\nimport {\n AutomationButtonBadgeAlert,\n AutomationButtonBadgeCommandLocked,\n AutomationButtonBadgeControl,\n AutomationButtonBadgeInterlock,\n} from './abstract-automation-button.js';\n\nexport const argTypesAbstractAutomationButton = {\n tag: {\n control: {type: 'text'},\n },\n readoutPosition: {\n options: ['top', 'bottom', 'left', 'right'],\n control: {type: 'radio'},\n },\n readoutSize: {\n options: ['small', 'regular', 'enhanced'],\n control: {type: 'radio'},\n },\n alertFrameType: {\n options: Object.values(ObcAlertFrameType),\n control: {type: 'radio'},\n },\n alertFrameMode: {\n options: Object.values(ObcAlertFrameMode),\n control: {type: 'radio'},\n },\n alertFrameThickness: {\n options: Object.values(ObcAlertFrameThickness),\n control: {type: 'radio'},\n },\n alertFrameStatus: {\n options: Object.values(ObcAlertFrameStatus),\n control: {type: 'radio'},\n },\n positioning: {\n options: Object.values(AutomationButtonPositioning),\n control: {type: 'select'},\n },\n badgeControl: {\n options: Object.values(AutomationButtonBadgeControl),\n control: {type: 'select'},\n },\n badgeCommandLocked: {\n options: Object.values(AutomationButtonBadgeCommandLocked),\n control: {type: 'select'},\n },\n badgeInterlock: {\n options: Object.values(AutomationButtonBadgeInterlock),\n control: {type: 'select'},\n },\n badgeAlert: {\n options: Object.values(AutomationButtonBadgeAlert),\n control: {type: 'select'},\n },\n progressMode: {\n options: Object.values(CircularProgressMode),\n control: {type: 'select'},\n if: {arg: 'progress'},\n },\n progressValue: {\n control: {type: 'range', min: 0, max: 100, step: 1},\n if: {arg: 'progress'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonPassiveRound = {\n ...argTypesAbstractAutomationButton,\n variant: {\n options: ['regular', 'flat'],\n control: {type: 'radio'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonPassiveSquare = {\n ...argTypesAbstractAutomationButton,\n variant: {\n options: ['square', 'flat'],\n control: {type: 'radio'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonMotorized = {\n ...argTypesAbstractAutomationButton,\n speedInPercent: {\n control: {type: 'range', min: 0, max: 100, step: 1},\n },\n labelDirection: {\n options: Object.values(AutomationButtonLabelDirection),\n control: {type: 'radio'},\n },\n direction: {\n options: Object.values(AutomationButtonDirection),\n control: {type: 'radio'},\n },\n variant: {\n options: Object.values(MotorizedVariant),\n control: {type: 'radio'},\n },\n};\n"],"names":["ObcAlertFrameStatus"],"mappings":";;;;;;AAoBO,MAAM,mCAAmC;AAAA,EAC9C,KAAK;AAAA,IACH,SAAS,EAAC,MAAM,OAAA;AAAA,EAAM;AAAA,EAExB,iBAAiB;AAAA,IACf,SAAS,CAAC,OAAO,UAAU,QAAQ,OAAO;AAAA,IAC1C,SAAS,EAAC,MAAM,QAAA;AAAA,EAAO;AAAA,EAEzB,aAAa;AAAA,IACX,SAAS,CAAC,SAAS,WAAW,UAAU;AAAA,IACxC,SAAS,EAAC,MAAM,QAAA;AAAA,EAAO;AAAA,EAEz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A,EAAU;AAExB;AAEO,MAAM,+CAA+C;AAAA,EAC1D,GAAG;AAAA,EACH,SAAS;AAAA,IACP,SAAS,CAAC,WAAW,MAAM;AAAA,IAC3B,SAAS,EAAC,MAAM,QAAA;AAAA,EAAO;AAE3B;AAEO,MAAM,gDAAgD;AAAA,EAC3D,GAAG;AAAA,EACH,SAAS;AAAA,IACP,SAAS,CAAC,UAAU,MAAM;AAAA,IAC1B,SAAS,EAAC,MAAM,QAAA;AAAA,EAAO;AAE3B;AAEO,MAAM,4CAA4C;AAAA,EACvD,GAAG;AAAA,EACH,gBAAgB;AAAA,IACd,SAAS,EAAC,MAAM,SAAS,KAAK,GAAG,KAAK,KAAK,MAAM,EAAA;AAAA,EAAC;AAAA,EAEpD,gBAAgB;AAAA,IACd,SAAS,OAAO,OAAO,8BAA8B;AAAA,IACrD,SAAS,EAAC,MAAM,QAAA;AAAA,EAAO;AAAA,EAEzB,WAAW;AAAA,IACT,SAAS,OAAO,OAAO,yBAAyB;AAAA,IAChD,SAAS,EAAC,MAAM,QAAA;AAAA,EAAO;AAAA,EAEzB,SAAS;AAAA,IACP,SAAS,OAAO,OAAO,gBAAgB;AAAA,IACvC,SAAS,EAAC,MAAM,QAAA;AAAA,EAAO;AAE3B;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { LitElement, TemplateResult } from 'lit';
|
|
2
2
|
import { AutomationButtonDirection, AutomationButtonPositioning, AutomationButtonReadoutPosition, AutomationButtonVariant } from '../automation-button/automation-button.js';
|
|
3
3
|
import { AutomationButtonReadoutStack, AutomationButtonReadoutStackSize } from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';
|
|
4
|
-
import {
|
|
4
|
+
import { ObcAlertFrameThickness, ObcAlertFrameType, ObcAlertFrameMode } from '../../components/alert-frame/alert-frame.js';
|
|
5
|
+
import { AlertType } from '../../types.js';
|
|
5
6
|
import { CircularProgressMode } from '../../building-blocks/circular-progress/circular-progress.js';
|
|
6
7
|
import '../automation-button/automation-button.js';
|
|
7
8
|
import '../automation-badge/automation-badge.js';
|
|
@@ -10,7 +11,12 @@ export declare enum AutomationButtonBadgeAlert {
|
|
|
10
11
|
Silence = "silence",
|
|
11
12
|
Caution = "caution",
|
|
12
13
|
Warning = "warning",
|
|
13
|
-
Alarm = "alarm"
|
|
14
|
+
Alarm = "alarm",
|
|
15
|
+
IsaCritical = "isa-critical",
|
|
16
|
+
IsaHigh = "isa-high",
|
|
17
|
+
IsaMedium = "isa-medium",
|
|
18
|
+
IsaLow = "isa-low",
|
|
19
|
+
IsaDiagnostic = "isa-diagnostic"
|
|
14
20
|
}
|
|
15
21
|
export declare enum AutomationButtonBadgeInterlock {
|
|
16
22
|
None = "none",
|
|
@@ -37,7 +43,8 @@ export declare class ObcAbstractAutomationButton extends LitElement {
|
|
|
37
43
|
alert: boolean;
|
|
38
44
|
alertFrameType: ObcAlertFrameType;
|
|
39
45
|
alertFrameThickness: ObcAlertFrameThickness;
|
|
40
|
-
alertFrameStatus:
|
|
46
|
+
alertFrameStatus: AlertType;
|
|
47
|
+
alertFrameMode: ObcAlertFrameMode;
|
|
41
48
|
showAlertCategoryIcon: boolean;
|
|
42
49
|
showAlertIcon: boolean;
|
|
43
50
|
progress: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-automation-button.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/abstract-automation-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,cAAc,EAAgB,MAAM,KAAK,CAAC;AAE9D,OAAO,2CAA2C,CAAC;AACnD,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,+BAA+B,EAE/B,uBAAuB,EACxB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,4BAA4B,EAC5B,gCAAgC,EACjC,MAAM,qFAAqF,CAAC;AAC7F,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"abstract-automation-button.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/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EAAE,sBAAsB,CACtC;IACL,gBAAgB,EAAE,SAAS,CAAmB;IAC9C,cAAc,EAAE,iBAAiB,CAC3B;IACa,qBAAqB,EAAE,OAAO,CACpE;IACoB,aAAa,EAAE,OAAO,CAAS;IAC/B,QAAQ,EAAE,OAAO,CAAS;IAC3B,YAAY,EAAE,oBAAoB,CACvB;IACX,aAAa,EAAE,MAAM,CAAK;IAC1B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC1B,SAAS,EAAE,yBAAyB,CAC1B;IACV,YAAY,EAAE,4BAA4B,CAChC;IAEpC,kBAAkB,EAAE,kCAAkC,CACZ;IAChB,cAAc,EAAE,8BAA8B,CAClC;IACZ,UAAU,EAAE,0BAA0B,CAC9B;IAElC,IAAI,IAAI,IAAI,cAAc,CAEzB;IAED,IAAI,GAAG,IAAI,OAAO,CAEjB;IAED,IAAI,QAAQ,IAAI,uBAAuB,CAGtC;IAED,IAAI,aAAa,IAAI,4BAA4B,EAAE,CAElD;IAGD,aAAa,EAAG,WAAW,EAAE,CAAC;IAE9B,YAAY,EAAG,WAAW,EAAE,CAAC;IAE7B,eAAe,EAAG,WAAW,EAAE,CAAC;IAEhC,gBAAgB,EAAG,WAAW,EAAE,CAAC;IAEjC,OAAO,CAAC,cAAc;IA4BtB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,iBAAiB;IAuBzB,OAAO,CAAC,mBAAmB;IAe3B,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,yBAAyB;IAUxB,MAAM;CA8EhB"}
|
|
@@ -2,7 +2,8 @@ import { LitElement, nothing, html } from "lit";
|
|
|
2
2
|
import { property, queryAssignedElements } from "lit/decorators.js";
|
|
3
3
|
import { AutomationButtonReadoutPosition, AutomationButtonPositioning, AutomationButtonDirection, AutomationButtonState } from "./automation-button.js";
|
|
4
4
|
import { AutomationButtonReadoutStackSize } from "../../components/automation-button-readout-stack/automation-button-readout-stack.js";
|
|
5
|
-
import { ObcAlertFrameType, ObcAlertFrameThickness,
|
|
5
|
+
import { ObcAlertFrameType, ObcAlertFrameThickness, ObcAlertFrameMode } from "../../components/alert-frame/alert-frame.js";
|
|
6
|
+
import { AlertType } from "../../types.js";
|
|
6
7
|
import { ObcAutomationBadgeType } from "../automation-badge/automation-badge.js";
|
|
7
8
|
import { CircularProgressMode } from "../../building-blocks/circular-progress/circular-progress.js";
|
|
8
9
|
var __defProp = Object.defineProperty;
|
|
@@ -20,6 +21,11 @@ var AutomationButtonBadgeAlert = /* @__PURE__ */ ((AutomationButtonBadgeAlert2)
|
|
|
20
21
|
AutomationButtonBadgeAlert2["Caution"] = "caution";
|
|
21
22
|
AutomationButtonBadgeAlert2["Warning"] = "warning";
|
|
22
23
|
AutomationButtonBadgeAlert2["Alarm"] = "alarm";
|
|
24
|
+
AutomationButtonBadgeAlert2["IsaCritical"] = "isa-critical";
|
|
25
|
+
AutomationButtonBadgeAlert2["IsaHigh"] = "isa-high";
|
|
26
|
+
AutomationButtonBadgeAlert2["IsaMedium"] = "isa-medium";
|
|
27
|
+
AutomationButtonBadgeAlert2["IsaLow"] = "isa-low";
|
|
28
|
+
AutomationButtonBadgeAlert2["IsaDiagnostic"] = "isa-diagnostic";
|
|
23
29
|
return AutomationButtonBadgeAlert2;
|
|
24
30
|
})(AutomationButtonBadgeAlert || {});
|
|
25
31
|
var AutomationButtonBadgeInterlock = /* @__PURE__ */ ((AutomationButtonBadgeInterlock2) => {
|
|
@@ -52,7 +58,8 @@ class ObcAbstractAutomationButton extends LitElement {
|
|
|
52
58
|
this.alert = false;
|
|
53
59
|
this.alertFrameType = ObcAlertFrameType.SmallSideFlip;
|
|
54
60
|
this.alertFrameThickness = ObcAlertFrameThickness.Small;
|
|
55
|
-
this.alertFrameStatus =
|
|
61
|
+
this.alertFrameStatus = AlertType.Alarm;
|
|
62
|
+
this.alertFrameMode = ObcAlertFrameMode.ackedActive;
|
|
56
63
|
this.showAlertCategoryIcon = true;
|
|
57
64
|
this.showAlertIcon = false;
|
|
58
65
|
this.progress = false;
|
|
@@ -108,6 +115,16 @@ class ObcAbstractAutomationButton extends LitElement {
|
|
|
108
115
|
return ObcAutomationBadgeType.Warning;
|
|
109
116
|
} else if (this.badgeAlert === "alarm") {
|
|
110
117
|
return ObcAutomationBadgeType.Alarm;
|
|
118
|
+
} else if (this.badgeAlert === "isa-critical") {
|
|
119
|
+
return ObcAutomationBadgeType.IsaCritical;
|
|
120
|
+
} else if (this.badgeAlert === "isa-high") {
|
|
121
|
+
return ObcAutomationBadgeType.IsaHigh;
|
|
122
|
+
} else if (this.badgeAlert === "isa-medium") {
|
|
123
|
+
return ObcAutomationBadgeType.IsaMedium;
|
|
124
|
+
} else if (this.badgeAlert === "isa-low") {
|
|
125
|
+
return ObcAutomationBadgeType.IsaLow;
|
|
126
|
+
} else if (this.badgeAlert === "isa-diagnostic") {
|
|
127
|
+
return ObcAutomationBadgeType.IsaDiagnostic;
|
|
111
128
|
}
|
|
112
129
|
return null;
|
|
113
130
|
}
|
|
@@ -156,6 +173,7 @@ class ObcAbstractAutomationButton extends LitElement {
|
|
|
156
173
|
.alertFrameType=${this.alertFrameType}
|
|
157
174
|
.alertFrameThickness=${this.alertFrameThickness}
|
|
158
175
|
.alertFrameStatus=${this.alertFrameStatus}
|
|
176
|
+
.alertFrameMode=${this.alertFrameMode}
|
|
159
177
|
.showAlertCategoryIcon=${this.showAlertCategoryIcon}
|
|
160
178
|
.showAlertIcon=${this.showAlertIcon}
|
|
161
179
|
?progress=${this.progress}
|
|
@@ -230,6 +248,9 @@ __decorateClass([
|
|
|
230
248
|
__decorateClass([
|
|
231
249
|
property({ type: String })
|
|
232
250
|
], ObcAbstractAutomationButton.prototype, "alertFrameStatus");
|
|
251
|
+
__decorateClass([
|
|
252
|
+
property({ type: String })
|
|
253
|
+
], ObcAbstractAutomationButton.prototype, "alertFrameMode");
|
|
233
254
|
__decorateClass([
|
|
234
255
|
property({ type: Boolean, attribute: false })
|
|
235
256
|
], ObcAbstractAutomationButton.prototype, "showAlertCategoryIcon");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-automation-button.js","sources":["../../../src/automation/automation-button/abstract-automation-button.ts"],"sourcesContent":["import {LitElement, TemplateResult, html, nothing} from 'lit';\nimport {property, queryAssignedElements} from 'lit/decorators.js';\nimport '../automation-button/automation-button.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonPositioning,\n AutomationButtonReadoutPosition,\n AutomationButtonState,\n AutomationButtonVariant,\n} from '../automation-button/automation-button.js';\nimport {\n AutomationButtonReadoutStack,\n AutomationButtonReadoutStackSize,\n} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport {\n ObcAlertFrameStatus,\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n} from '../../components/alert-frame/alert-frame.js';\nimport '../automation-badge/automation-badge.js';\nimport {ObcAutomationBadgeType} from '../automation-badge/automation-badge.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\n\nexport enum AutomationButtonBadgeAlert {\n None = 'none',\n Silence = 'silence',\n Caution = 'caution',\n Warning = 'warning',\n Alarm = 'alarm',\n}\n\nexport enum AutomationButtonBadgeInterlock {\n None = 'none',\n Interlock = 'interlock',\n InterlockInhibit = 'interlock-inhibit',\n}\n\nexport enum AutomationButtonBadgeControl {\n None = 'none',\n Local = 'local',\n LocalOnly = 'local-only',\n Manual = 'manual',\n ManualOnly = 'manual-only',\n Auto = 'auto',\n}\n\nexport enum AutomationButtonBadgeCommandLocked {\n None = 'none',\n CommandLocked = 'command-locked',\n}\n\nexport class ObcAbstractAutomationButton extends LitElement {\n @property({type: Boolean, attribute: false}) showReadoutStack: boolean = true;\n @property({type: String}) readoutPosition: AutomationButtonReadoutPosition =\n AutomationButtonReadoutPosition.bottom;\n @property({type: String}) readoutSize: AutomationButtonReadoutStackSize =\n AutomationButtonReadoutStackSize.regular;\n @property({type: String}) positioning: AutomationButtonPositioning =\n AutomationButtonPositioning.point;\n @property({type: Boolean}) alert: boolean = false;\n @property({type: String}) alertFrameType: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n @property({type: String}) alertFrameThickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n @property({type: String}) alertFrameStatus: ObcAlertFrameStatus =\n ObcAlertFrameStatus.Alarm;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n @property({type: Boolean}) progress: boolean = false;\n @property({type: String}) progressMode: CircularProgressMode =\n CircularProgressMode.indeterminate;\n @property({type: Number}) progressValue: number = 0;\n @property({type: String}) tag: string | null = null;\n @property({type: String}) direction: AutomationButtonDirection =\n AutomationButtonDirection.forward;\n @property({type: String}) badgeControl: AutomationButtonBadgeControl =\n AutomationButtonBadgeControl.None;\n @property({type: String})\n badgeCommandLocked: AutomationButtonBadgeCommandLocked =\n AutomationButtonBadgeCommandLocked.None;\n @property({type: String}) badgeInterlock: AutomationButtonBadgeInterlock =\n AutomationButtonBadgeInterlock.None;\n @property({type: String}) badgeAlert: AutomationButtonBadgeAlert =\n AutomationButtonBadgeAlert.None;\n\n get icon(): TemplateResult {\n throw new Error('Method \"icon\" must be implemented in subclass');\n }\n\n get _on(): boolean {\n throw new Error('Method \"_on\" must be implemented in subclass');\n }\n\n get _variant(): AutomationButtonVariant {\n // @ts-expect-error - property should be defined in subclass\n return this.variant as AutomationButtonVariant;\n }\n\n get extraReadouts(): AutomationButtonReadoutStack[] {\n return [];\n }\n\n @queryAssignedElements({slot: 'badge-top-right'})\n badgeTopRight!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-top-left'})\n badgeTopLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-left'})\n badgeBottomLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-right'})\n badgeBottomRight!: HTMLElement[];\n\n private getBadgeSpacer(): boolean {\n if (!this.showReadoutStack) {\n return false;\n }\n\n const topLeft =\n this.badgeTopLeft.length > 0 || this.getBadgeControlType() !== null;\n const topRight =\n this.badgeTopRight.length > 0 || this.getBadgeAlertType() !== null;\n const bottomLeft =\n this.badgeBottomLeft.length > 0 || this.getBadgeInterlockType() !== null;\n const bottomRight =\n this.badgeBottomRight.length > 0 ||\n this.getBadgeCommandLockedType() !== null;\n if (this.readoutPosition === AutomationButtonReadoutPosition.top) {\n return topRight || topLeft;\n } else if (\n this.readoutPosition === AutomationButtonReadoutPosition.bottom\n ) {\n return bottomLeft || bottomRight;\n } else if (this.readoutPosition === AutomationButtonReadoutPosition.left) {\n return topLeft || bottomLeft;\n } else if (this.readoutPosition === AutomationButtonReadoutPosition.right) {\n return topRight || bottomRight;\n }\n return false;\n }\n\n private handleBadgeSlotChange() {\n this.requestUpdate();\n }\n\n private getBadgeAlertType(): ObcAutomationBadgeType | null {\n if (this.badgeAlert === AutomationButtonBadgeAlert.Silence) {\n return ObcAutomationBadgeType.AlertSilenced;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Caution) {\n return ObcAutomationBadgeType.Caution;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Warning) {\n return ObcAutomationBadgeType.Warning;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Alarm) {\n return ObcAutomationBadgeType.Alarm;\n }\n return null;\n }\n\n private getBadgeControlType(): ObcAutomationBadgeType | null {\n if (this.badgeControl === AutomationButtonBadgeControl.Local) {\n return ObcAutomationBadgeType.Local;\n } else if (this.badgeControl === AutomationButtonBadgeControl.LocalOnly) {\n return ObcAutomationBadgeType.LocalOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Manual) {\n return ObcAutomationBadgeType.Manual;\n } else if (this.badgeControl === AutomationButtonBadgeControl.ManualOnly) {\n return ObcAutomationBadgeType.ManualOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Auto) {\n return ObcAutomationBadgeType.Auto;\n }\n return null;\n }\n\n private getBadgeInterlockType(): ObcAutomationBadgeType | null {\n if (this.badgeInterlock === AutomationButtonBadgeInterlock.Interlock) {\n return ObcAutomationBadgeType.Interlock;\n } else if (\n this.badgeInterlock === AutomationButtonBadgeInterlock.InterlockInhibit\n ) {\n return ObcAutomationBadgeType.InterlockInhibit;\n }\n return null;\n }\n\n private getBadgeCommandLockedType(): ObcAutomationBadgeType | null {\n if (\n this.badgeCommandLocked ===\n AutomationButtonBadgeCommandLocked.CommandLocked\n ) {\n return ObcAutomationBadgeType.CommandLocked;\n }\n return null;\n }\n\n override render() {\n const readouts: AutomationButtonReadoutStack[] = [...this.extraReadouts];\n const badgeAlertType = this.getBadgeAlertType();\n const badgeControlType = this.getBadgeControlType();\n const badgeInterlockType = this.getBadgeInterlockType();\n const badgeCommandLockedType = this.getBadgeCommandLockedType();\n\n return html`<obc-automation-button\n .state=${this._on\n ? AutomationButtonState.open\n : AutomationButtonState.closed}\n .readouts=${readouts}\n .tag=${this.tag}\n .showReadoutStack=${this.showReadoutStack}\n .readoutPosition=${this.readoutPosition}\n .readoutSize=${this.readoutSize}\n ?alert=${this.alert}\n .alertFrameType=${this.alertFrameType}\n .alertFrameThickness=${this.alertFrameThickness}\n .alertFrameStatus=${this.alertFrameStatus}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showAlertIcon=${this.showAlertIcon}\n ?progress=${this.progress}\n .progressMode=${this.progressMode}\n .progressValue=${this.progressValue}\n .variant=${this._variant}\n .direction=${this.direction}\n .hasBadgeSpacer=${this.getBadgeSpacer()}\n .positioning=${this.positioning}\n >\n ${this.icon}\n <slot\n name=\"badge-top-right\"\n slot=\"badge-top-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${badgeAlertType\n ? html`<obc-automation-badge\n .type=${badgeAlertType}\n ></obc-automation-badge>`\n : nothing}\n </slot>\n <slot\n name=\"badge-top-left\"\n slot=\"badge-top-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${badgeControlType\n ? html`<obc-automation-badge\n .type=${badgeControlType}\n ></obc-automation-badge>`\n : nothing}\n </slot>\n <slot\n name=\"badge-bottom-left\"\n slot=\"badge-bottom-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${badgeInterlockType\n ? html`<obc-automation-badge\n .type=${badgeInterlockType}\n ></obc-automation-badge>`\n : nothing}\n </slot>\n <slot\n name=\"badge-bottom-right\"\n slot=\"badge-bottom-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${badgeCommandLockedType\n ? html`<obc-automation-badge\n .type=${badgeCommandLockedType}\n ></obc-automation-badge>`\n : nothing}\n </slot>\n </obc-automation-button>`;\n }\n}\n"],"names":["AutomationButtonBadgeAlert","AutomationButtonBadgeInterlock","AutomationButtonBadgeControl","AutomationButtonBadgeCommandLocked"],"mappings":";;;;;;;;;;;;;;;;AAuBO,IAAK,+CAAAA,gCAAL;AACLA,8BAAA,MAAA,IAAO;AACPA,8BAAA,SAAA,IAAU;AACVA,8BAAA,SAAA,IAAU;AACVA,8BAAA,SAAA,IAAU;AACVA,8BAAA,OAAA,IAAQ;AALE,SAAAA;AAAA,GAAA,8BAAA,CAAA,CAAA;AAQL,IAAK,mDAAAC,oCAAL;AACLA,kCAAA,MAAA,IAAO;AACPA,kCAAA,WAAA,IAAY;AACZA,kCAAA,kBAAA,IAAmB;AAHT,SAAAA;AAAA,GAAA,kCAAA,CAAA,CAAA;AAML,IAAK,iDAAAC,kCAAL;AACLA,gCAAA,MAAA,IAAO;AACPA,gCAAA,OAAA,IAAQ;AACRA,gCAAA,WAAA,IAAY;AACZA,gCAAA,QAAA,IAAS;AACTA,gCAAA,YAAA,IAAa;AACbA,gCAAA,MAAA,IAAO;AANG,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AASL,IAAK,uDAAAC,wCAAL;AACLA,sCAAA,MAAA,IAAO;AACPA,sCAAA,eAAA,IAAgB;AAFN,SAAAA;AAAA,GAAA,sCAAA,CAAA,CAAA;AAKL,MAAM,oCAAoC,WAAW;AAAA,EAArD,cAAA;AAAA,UAAA,GAAA,SAAA;AACwC,SA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,EADC,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA3Bb,4BA4BX,WAAA,oBAAA;AAE0B,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA9Bb,4BA8Be,WAAA,gBAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAhCb,4BAgCe,WAAA,YAAA;AAqB1B,gBAAA;AAAA,EADC,sBAAsB,EAAC,MAAM,kBAAA,CAAkB;AAAA,GApDrC,4BAqDX,WAAA,eAAA;AAEA,gBAAA;AAAA,EADC,sBAAsB,EAAC,MAAM,iBAAA,CAAiB;AAAA,GAtDpC,4BAuDX,WAAA,cAAA;AAEA,gBAAA;AAAA,EADC,sBAAsB,EAAC,MAAM,oBAAA,CAAoB;AAAA,GAxDvC,4BAyDX,WAAA,iBAAA;AAEA,gBAAA;AAAA,EADC,sBAAsB,EAAC,MAAM,qBAAA,CAAqB;AAAA,GA1DxC,4BA2DX,WAAA,kBAAA;"}
|
|
1
|
+
{"version":3,"file":"abstract-automation-button.js","sources":["../../../src/automation/automation-button/abstract-automation-button.ts"],"sourcesContent":["import {LitElement, TemplateResult, html, nothing} from 'lit';\nimport {property, queryAssignedElements} from 'lit/decorators.js';\nimport '../automation-button/automation-button.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonPositioning,\n AutomationButtonReadoutPosition,\n AutomationButtonState,\n AutomationButtonVariant,\n} from '../automation-button/automation-button.js';\nimport {\n AutomationButtonReadoutStack,\n AutomationButtonReadoutStackSize,\n} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport {\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n ObcAlertFrameMode,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport '../automation-badge/automation-badge.js';\nimport {ObcAutomationBadgeType} from '../automation-badge/automation-badge.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\n\nexport enum AutomationButtonBadgeAlert {\n None = 'none',\n Silence = 'silence',\n Caution = 'caution',\n Warning = 'warning',\n Alarm = 'alarm',\n IsaCritical = 'isa-critical',\n IsaHigh = 'isa-high',\n IsaMedium = 'isa-medium',\n IsaLow = 'isa-low',\n IsaDiagnostic = 'isa-diagnostic',\n}\n\nexport enum AutomationButtonBadgeInterlock {\n None = 'none',\n Interlock = 'interlock',\n InterlockInhibit = 'interlock-inhibit',\n}\n\nexport enum AutomationButtonBadgeControl {\n None = 'none',\n Local = 'local',\n LocalOnly = 'local-only',\n Manual = 'manual',\n ManualOnly = 'manual-only',\n Auto = 'auto',\n}\n\nexport enum AutomationButtonBadgeCommandLocked {\n None = 'none',\n CommandLocked = 'command-locked',\n}\n\nexport class ObcAbstractAutomationButton extends LitElement {\n @property({type: Boolean, attribute: false}) showReadoutStack: boolean = true;\n @property({type: String}) readoutPosition: AutomationButtonReadoutPosition =\n AutomationButtonReadoutPosition.bottom;\n @property({type: String}) readoutSize: AutomationButtonReadoutStackSize =\n AutomationButtonReadoutStackSize.regular;\n @property({type: String}) positioning: AutomationButtonPositioning =\n AutomationButtonPositioning.point;\n @property({type: Boolean}) alert: boolean = false;\n @property({type: String}) alertFrameType: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n @property({type: String}) alertFrameThickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n @property({type: String}) alertFrameStatus: AlertType = AlertType.Alarm;\n @property({type: String}) alertFrameMode: ObcAlertFrameMode =\n ObcAlertFrameMode.ackedActive;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n @property({type: Boolean}) progress: boolean = false;\n @property({type: String}) progressMode: CircularProgressMode =\n CircularProgressMode.indeterminate;\n @property({type: Number}) progressValue: number = 0;\n @property({type: String}) tag: string | null = null;\n @property({type: String}) direction: AutomationButtonDirection =\n AutomationButtonDirection.forward;\n @property({type: String}) badgeControl: AutomationButtonBadgeControl =\n AutomationButtonBadgeControl.None;\n @property({type: String})\n badgeCommandLocked: AutomationButtonBadgeCommandLocked =\n AutomationButtonBadgeCommandLocked.None;\n @property({type: String}) badgeInterlock: AutomationButtonBadgeInterlock =\n AutomationButtonBadgeInterlock.None;\n @property({type: String}) badgeAlert: AutomationButtonBadgeAlert =\n AutomationButtonBadgeAlert.None;\n\n get icon(): TemplateResult {\n throw new Error('Method \"icon\" must be implemented in subclass');\n }\n\n get _on(): boolean {\n throw new Error('Method \"_on\" must be implemented in subclass');\n }\n\n get _variant(): AutomationButtonVariant {\n // @ts-expect-error - property should be defined in subclass\n return this.variant as AutomationButtonVariant;\n }\n\n get extraReadouts(): AutomationButtonReadoutStack[] {\n return [];\n }\n\n @queryAssignedElements({slot: 'badge-top-right'})\n badgeTopRight!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-top-left'})\n badgeTopLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-left'})\n badgeBottomLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-right'})\n badgeBottomRight!: HTMLElement[];\n\n private getBadgeSpacer(): boolean {\n if (!this.showReadoutStack) {\n return false;\n }\n\n const topLeft =\n this.badgeTopLeft.length > 0 || this.getBadgeControlType() !== null;\n const topRight =\n this.badgeTopRight.length > 0 || this.getBadgeAlertType() !== null;\n const bottomLeft =\n this.badgeBottomLeft.length > 0 || this.getBadgeInterlockType() !== null;\n const bottomRight =\n this.badgeBottomRight.length > 0 ||\n this.getBadgeCommandLockedType() !== null;\n if (this.readoutPosition === AutomationButtonReadoutPosition.top) {\n return topRight || topLeft;\n } else if (\n this.readoutPosition === AutomationButtonReadoutPosition.bottom\n ) {\n return bottomLeft || bottomRight;\n } else if (this.readoutPosition === AutomationButtonReadoutPosition.left) {\n return topLeft || bottomLeft;\n } else if (this.readoutPosition === AutomationButtonReadoutPosition.right) {\n return topRight || bottomRight;\n }\n return false;\n }\n\n private handleBadgeSlotChange() {\n this.requestUpdate();\n }\n\n private getBadgeAlertType(): ObcAutomationBadgeType | null {\n if (this.badgeAlert === AutomationButtonBadgeAlert.Silence) {\n return ObcAutomationBadgeType.AlertSilenced;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Caution) {\n return ObcAutomationBadgeType.Caution;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Warning) {\n return ObcAutomationBadgeType.Warning;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Alarm) {\n return ObcAutomationBadgeType.Alarm;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.IsaCritical) {\n return ObcAutomationBadgeType.IsaCritical;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.IsaHigh) {\n return ObcAutomationBadgeType.IsaHigh;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.IsaMedium) {\n return ObcAutomationBadgeType.IsaMedium;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.IsaLow) {\n return ObcAutomationBadgeType.IsaLow;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.IsaDiagnostic) {\n return ObcAutomationBadgeType.IsaDiagnostic;\n }\n return null;\n }\n\n private getBadgeControlType(): ObcAutomationBadgeType | null {\n if (this.badgeControl === AutomationButtonBadgeControl.Local) {\n return ObcAutomationBadgeType.Local;\n } else if (this.badgeControl === AutomationButtonBadgeControl.LocalOnly) {\n return ObcAutomationBadgeType.LocalOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Manual) {\n return ObcAutomationBadgeType.Manual;\n } else if (this.badgeControl === AutomationButtonBadgeControl.ManualOnly) {\n return ObcAutomationBadgeType.ManualOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Auto) {\n return ObcAutomationBadgeType.Auto;\n }\n return null;\n }\n\n private getBadgeInterlockType(): ObcAutomationBadgeType | null {\n if (this.badgeInterlock === AutomationButtonBadgeInterlock.Interlock) {\n return ObcAutomationBadgeType.Interlock;\n } else if (\n this.badgeInterlock === AutomationButtonBadgeInterlock.InterlockInhibit\n ) {\n return ObcAutomationBadgeType.InterlockInhibit;\n }\n return null;\n }\n\n private getBadgeCommandLockedType(): ObcAutomationBadgeType | null {\n if (\n this.badgeCommandLocked ===\n AutomationButtonBadgeCommandLocked.CommandLocked\n ) {\n return ObcAutomationBadgeType.CommandLocked;\n }\n return null;\n }\n\n override render() {\n const readouts: AutomationButtonReadoutStack[] = [...this.extraReadouts];\n const badgeAlertType = this.getBadgeAlertType();\n const badgeControlType = this.getBadgeControlType();\n const badgeInterlockType = this.getBadgeInterlockType();\n const badgeCommandLockedType = this.getBadgeCommandLockedType();\n\n return html`<obc-automation-button\n .state=${this._on\n ? AutomationButtonState.open\n : AutomationButtonState.closed}\n .readouts=${readouts}\n .tag=${this.tag}\n .showReadoutStack=${this.showReadoutStack}\n .readoutPosition=${this.readoutPosition}\n .readoutSize=${this.readoutSize}\n ?alert=${this.alert}\n .alertFrameType=${this.alertFrameType}\n .alertFrameThickness=${this.alertFrameThickness}\n .alertFrameStatus=${this.alertFrameStatus}\n .alertFrameMode=${this.alertFrameMode}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showAlertIcon=${this.showAlertIcon}\n ?progress=${this.progress}\n .progressMode=${this.progressMode}\n .progressValue=${this.progressValue}\n .variant=${this._variant}\n .direction=${this.direction}\n .hasBadgeSpacer=${this.getBadgeSpacer()}\n .positioning=${this.positioning}\n >\n ${this.icon}\n <slot\n name=\"badge-top-right\"\n slot=\"badge-top-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${badgeAlertType\n ? html`<obc-automation-badge\n .type=${badgeAlertType}\n ></obc-automation-badge>`\n : nothing}\n </slot>\n <slot\n name=\"badge-top-left\"\n slot=\"badge-top-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${badgeControlType\n ? html`<obc-automation-badge\n .type=${badgeControlType}\n ></obc-automation-badge>`\n : nothing}\n </slot>\n <slot\n name=\"badge-bottom-left\"\n slot=\"badge-bottom-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${badgeInterlockType\n ? html`<obc-automation-badge\n .type=${badgeInterlockType}\n ></obc-automation-badge>`\n : nothing}\n </slot>\n <slot\n name=\"badge-bottom-right\"\n slot=\"badge-bottom-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${badgeCommandLockedType\n ? html`<obc-automation-badge\n .type=${badgeCommandLockedType}\n ></obc-automation-badge>`\n : nothing}\n </slot>\n </obc-automation-button>`;\n }\n}\n"],"names":["AutomationButtonBadgeAlert","AutomationButtonBadgeInterlock","AutomationButtonBadgeControl","AutomationButtonBadgeCommandLocked"],"mappings":";;;;;;;;;;;;;;;;;AAwBO,IAAK,+CAAAA,gCAAL;AACLA,8BAAA,MAAA,IAAO;AACPA,8BAAA,SAAA,IAAU;AACVA,8BAAA,SAAA,IAAU;AACVA,8BAAA,SAAA,IAAU;AACVA,8BAAA,OAAA,IAAQ;AACRA,8BAAA,aAAA,IAAc;AACdA,8BAAA,SAAA,IAAU;AACVA,8BAAA,WAAA,IAAY;AACZA,8BAAA,QAAA,IAAS;AACTA,8BAAA,eAAA,IAAgB;AAVN,SAAAA;AAAA,GAAA,8BAAA,CAAA,CAAA;AAaL,IAAK,mDAAAC,oCAAL;AACLA,kCAAA,MAAA,IAAO;AACPA,kCAAA,WAAA,IAAY;AACZA,kCAAA,kBAAA,IAAmB;AAHT,SAAAA;AAAA,GAAA,kCAAA,CAAA,CAAA;AAML,IAAK,iDAAAC,kCAAL;AACLA,gCAAA,MAAA,IAAO;AACPA,gCAAA,OAAA,IAAQ;AACRA,gCAAA,WAAA,IAAY;AACZA,gCAAA,QAAA,IAAS;AACTA,gCAAA,YAAA,IAAa;AACbA,gCAAA,MAAA,IAAO;AANG,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AASL,IAAK,uDAAAC,wCAAL;AACLA,sCAAA,MAAA,IAAO;AACPA,sCAAA,eAAA,IAAgB;AAFN,SAAAA;AAAA,GAAA,sCAAA,CAAA,CAAA;AAKL,MAAM,oCAA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-wrapper {
|
|
17
|
+
width: fit-content;
|
|
18
|
+
height: fit-content;
|
|
19
|
+
}
|
|
20
|
+
|
|
16
21
|
.positioning-point.label-bottom {
|
|
17
22
|
top: calc(var(--automation-components-button-touch-target-size) / -2);
|
|
18
23
|
transform: translateX(-50%);
|
|
@@ -291,10 +296,10 @@ const compentStyle = css`
|
|
|
291
296
|
|
|
292
297
|
.alert-frame {
|
|
293
298
|
position: absolute;
|
|
294
|
-
top:
|
|
295
|
-
right:
|
|
296
|
-
left:
|
|
297
|
-
bottom:
|
|
299
|
+
top: 0;
|
|
300
|
+
right: 0;
|
|
301
|
+
left: 0;
|
|
302
|
+
bottom: 0;
|
|
298
303
|
}
|
|
299
304
|
`;
|
|
300
305
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"automation-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HTMLTemplateResult, LitElement } from 'lit';
|
|
2
|
-
import {
|
|
2
|
+
import { ObcAlertFrameThickness, ObcAlertFrameType, ObcAlertFrameMode } from '../../components/alert-frame/alert-frame.js';
|
|
3
|
+
import { AlertType } from '../../types.js';
|
|
3
4
|
import { AutomationButtonReadoutStack, AutomationButtonReadoutStackSize } from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';
|
|
4
5
|
import { CircularProgressMode } from '../../building-blocks/circular-progress/circular-progress.js';
|
|
5
6
|
import '../../icons/icon-forward.js';
|
|
@@ -73,7 +74,8 @@ export declare class ObcAutomationButton extends LitElement {
|
|
|
73
74
|
alert: boolean;
|
|
74
75
|
alertFrameType: ObcAlertFrameType;
|
|
75
76
|
alertFrameThickness: ObcAlertFrameThickness;
|
|
76
|
-
alertFrameStatus:
|
|
77
|
+
alertFrameStatus: AlertType;
|
|
78
|
+
alertFrameMode: ObcAlertFrameMode;
|
|
77
79
|
showAlertCategoryIcon: boolean;
|
|
78
80
|
showAlertIcon: boolean;
|
|
79
81
|
progress: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-button.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/automation-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,UAAU,EAA2B,MAAM,KAAK,CAAC;AAI7E,OAAO,6BAA6B,CAAC;AACrC,OAAO,kCAAkC,CAAC;AAC1C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,8BAA8B,CAAC;AACtC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,6BAA6B,CAAC;AACrC,OAAO,qCAAqC,CAAC;AAC7C,OAAO,uCAAuC,CAAC;AAC/C,OAAO,uCAAuC,CAAC;AAC/C,OAAO,wCAAwC,CAAC;AAChD,OAAO,6CAA6C,CAAC;AACrD,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"automation-button.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/automation-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,UAAU,EAA2B,MAAM,KAAK,CAAC;AAI7E,OAAO,6BAA6B,CAAC;AACrC,OAAO,kCAAkC,CAAC;AAC1C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,8BAA8B,CAAC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,mBAAoB,SAAQ,UAAU;IACvB,OAAO,EAAE,uBAAuB,CACxB;IACR,KAAK,EAAE,qBAAqB,CACzB;IACF,MAAM,EAAE,OAAO,CAAS;IACN,gBAAgB,EAAE,OAAO,CAAQ;IAE9E,QAAQ,EAAE,4BAA4B,EAAE,CAAM;IAE9C,GAAG,EAAE,MAAM,GAAG,IAAI,CAAQ;IACA,eAAe,EAAE,+BAA+B,CACjC;IACf,WAAW,EAAE,gCAAgC,CAC5B;IAChB,KAAK,EAAE,OAAO,CAAS;IACxB,cAAc,EAAE,iBAAiB,CACzB;IACR,mBAAmB,EAAE,sBAAsB,CACtC;IACL,gBAAgB,EAAE,SAAS,CAAmB;IAC9C,cAAc,EAAE,iBAAiB,CAC3B;IACa,qBAAqB,EAAE,OAAO,CACpE;IACoB,aAAa,EAAE,OAAO,CAAS;IAC/B,QAAQ,EAAE,OAAO,CAAS;IAC3B,YAAY,EAAE,oBAAoB,CACvB;IACX,aAAa,EAAE,MAAM,CAAK;IAC1B,SAAS,EAAE,yBAAyB,CAC1B;IACV,WAAW,EAAE,2BAA2B,CAC9B;IACpC,2FAA2F;IAChE,cAAc,EAAE,OAAO,CAAS;IAElD,MAAM;IAkEf,OAAO,CAAC,WAAW;IA8BnB,OAAgB,MAAM,0BAA2B;IAEjD,OAAO,KAAK,gBAAgB,GAK3B;IAED,OAAO,CAAC,gBAAgB;IAuCxB,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,gBAAgB;IAkHxB,OAAO,CAAC,mBAAmB;CAM5B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,uBAAuB,EAAE,mBAAmB,CAAC;KAC9C;CACF"}
|
|
@@ -13,7 +13,8 @@ import "../../icons/icon-arrow-up-google.js";
|
|
|
13
13
|
import "../../icons/icon-arrow-down-google.js";
|
|
14
14
|
import "../../icons/icon-arrow-left-google.js";
|
|
15
15
|
import "../../icons/icon-arrow-right-google.js";
|
|
16
|
-
import { ObcAlertFrameType, ObcAlertFrameThickness,
|
|
16
|
+
import { ObcAlertFrameType, ObcAlertFrameThickness, ObcAlertFrameMode, wrapWithAlertFrame } from "../../components/alert-frame/alert-frame.js";
|
|
17
|
+
import { AlertType } from "../../types.js";
|
|
17
18
|
import { customElement } from "../../decorator.js";
|
|
18
19
|
import { AutomationButtonReadoutStackSize, IdTagOrientation } from "../../components/automation-button-readout-stack/automation-button-readout-stack.js";
|
|
19
20
|
import { CircularProgressMode } from "../../building-blocks/circular-progress/circular-progress.js";
|
|
@@ -85,7 +86,8 @@ let ObcAutomationButton = class extends LitElement {
|
|
|
85
86
|
this.alert = false;
|
|
86
87
|
this.alertFrameType = ObcAlertFrameType.SmallSideFlip;
|
|
87
88
|
this.alertFrameThickness = ObcAlertFrameThickness.Small;
|
|
88
|
-
this.alertFrameStatus =
|
|
89
|
+
this.alertFrameStatus = AlertType.Alarm;
|
|
90
|
+
this.alertFrameMode = ObcAlertFrameMode.ackedActive;
|
|
89
91
|
this.showAlertCategoryIcon = true;
|
|
90
92
|
this.showAlertIcon = false;
|
|
91
93
|
this.progress = false;
|
|
@@ -137,11 +139,12 @@ let ObcAutomationButton = class extends LitElement {
|
|
|
137
139
|
.idTagOrientation=${this.getIdTagOrientation()}
|
|
138
140
|
></obc-automation-button-readout-stack>
|
|
139
141
|
` : nothing}
|
|
140
|
-
${this.alert ? html` <obc-alert-frame
|
|
142
|
+
${this.alert && this.positioning === "point" ? html` <obc-alert-frame
|
|
141
143
|
class="alert-frame"
|
|
142
144
|
.type=${this.alertFrameType}
|
|
143
145
|
.thickness=${this.alertFrameThickness}
|
|
144
146
|
.status=${this.alertFrameStatus}
|
|
147
|
+
.mode=${this.alertFrameMode}
|
|
145
148
|
.showAlertCategoryIcon=${this.showAlertCategoryIcon}
|
|
146
149
|
.showIcon=${this.showAlertIcon}
|
|
147
150
|
>
|
|
@@ -155,17 +158,29 @@ let ObcAutomationButton = class extends LitElement {
|
|
|
155
158
|
wrapContent(content) {
|
|
156
159
|
if (this.positioning === "point") {
|
|
157
160
|
return html`<div class="point-wrapper">${content}</div>`;
|
|
158
|
-
}
|
|
161
|
+
}
|
|
162
|
+
const innerContent = wrapWithAlertFrame(
|
|
163
|
+
this.alert ? {
|
|
164
|
+
type: this.alertFrameType,
|
|
165
|
+
thickness: this.alertFrameThickness,
|
|
166
|
+
status: this.alertFrameStatus,
|
|
167
|
+
mode: this.alertFrameMode,
|
|
168
|
+
showIcon: this.showAlertIcon,
|
|
169
|
+
showAlertCategoryIcon: this.showAlertCategoryIcon
|
|
170
|
+
} : false,
|
|
171
|
+
content
|
|
172
|
+
);
|
|
173
|
+
if (this.positioning === "symbol") {
|
|
159
174
|
return html`<div
|
|
160
175
|
class=${classMap({
|
|
161
176
|
"symbol-wrapper": true,
|
|
162
177
|
["label-" + this.readoutPosition]: true
|
|
163
178
|
})}
|
|
164
179
|
>
|
|
165
|
-
${
|
|
180
|
+
${innerContent}
|
|
166
181
|
</div> `;
|
|
167
182
|
}
|
|
168
|
-
return
|
|
183
|
+
return innerContent;
|
|
169
184
|
}
|
|
170
185
|
get effectiveVariant() {
|
|
171
186
|
if (this.progress) {
|
|
@@ -370,6 +385,9 @@ __decorateClass([
|
|
|
370
385
|
__decorateClass([
|
|
371
386
|
property({ type: String })
|
|
372
387
|
], ObcAutomationButton.prototype, "alertFrameStatus", 2);
|
|
388
|
+
__decorateClass([
|
|
389
|
+
property({ type: String })
|
|
390
|
+
], ObcAutomationButton.prototype, "alertFrameMode", 2);
|
|
373
391
|
__decorateClass([
|
|
374
392
|
property({ type: Boolean, attribute: false })
|
|
375
393
|
], ObcAutomationButton.prototype, "showAlertCategoryIcon", 2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-button.js","sources":["../../../src/automation/automation-button/automation-button.ts"],"sourcesContent":["import {HTMLTemplateResult, LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport compentStyle from './automation-button.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport '../../icons/icon-forward.js';\nimport '../../icons/icon-forward-fast.js';\nimport '../../icons/icon-forward-stopped.js';\nimport '../../icons/icon-backward.js';\nimport '../../icons/icon-backward-fast.js';\nimport '../../icons/icon-backward-stopped.js';\nimport '../../icons/icon-standby.js';\nimport '../../icons/icon-arrow-up-google.js';\nimport '../../icons/icon-arrow-down-google.js';\nimport '../../icons/icon-arrow-left-google.js';\nimport '../../icons/icon-arrow-right-google.js';\nimport '../../components/alert-frame/alert-frame.js';\nimport {\n ObcAlertFrameStatus,\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n} from '../../components/alert-frame/alert-frame.js';\nimport {customElement} from '../../decorator.js';\nimport {\n AutomationButtonReadoutStack,\n AutomationButtonReadoutStackSize,\n IdTagOrientation,\n} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport '../../building-blocks/circular-progress/circular-progress.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\n\nexport {CircularProgressMode};\n\nexport enum AutomationButtonVariant {\n regular = 'regular',\n double = 'double',\n forward = 'forward',\n square = 'square',\n flat = 'flat',\n flatForward = 'flat-forward',\n}\n\nexport enum AutomationButtonState {\n closed = 'closed',\n open = 'open',\n}\n\nexport enum AutomationButtonReadoutPosition {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport enum AutomationButtonDirection {\n forward = 'forward',\n forwardFast = 'forward-fast',\n forwardStopped = 'forward-stopped',\n backward = 'backward',\n backwardFast = 'backward-fast',\n backwardStopped = 'backward-stopped',\n standby = 'standby',\n}\n\nexport enum AutomationButtonLabelDirection {\n up = 'up',\n down = 'down',\n left = 'left',\n right = 'right',\n}\n\n/**\n * The positioning of the automation button.\n * - `point`: The button is wrapped in a 0x0 px div, where the center of the symbol is the center of the div.\n * - `symbol`: The button is wrapped in a div containing the symbol but not the readout stack\n * - `button`: The button not wrapped, in is positioned based on the full size of the button.\n */\nexport enum AutomationButtonPositioning {\n point = 'point',\n symbol = 'symbol',\n button = 'button',\n}\n\n@customElement('obc-automation-button')\nexport class ObcAutomationButton extends LitElement {\n @property({type: String}) variant: AutomationButtonVariant =\n AutomationButtonVariant.regular;\n @property({type: String}) state: AutomationButtonState =\n AutomationButtonState.open;\n @property({type: Boolean}) static: boolean = false;\n @property({type: Boolean, attribute: false}) showReadoutStack: boolean = true;\n @property({type: Array, attribute: false})\n readouts: AutomationButtonReadoutStack[] = [];\n @property({type: String})\n tag: string | null = null;\n @property({type: String}) readoutPosition: AutomationButtonReadoutPosition =\n AutomationButtonReadoutPosition.bottom;\n @property({type: String}) readoutSize: AutomationButtonReadoutStackSize =\n AutomationButtonReadoutStackSize.regular;\n @property({type: Boolean}) alert: boolean = false;\n @property({type: String}) alertFrameType: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n @property({type: String}) alertFrameThickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n @property({type: String}) alertFrameStatus: ObcAlertFrameStatus =\n ObcAlertFrameStatus.Alarm;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n @property({type: Boolean}) progress: boolean = false;\n @property({type: String}) progressMode: CircularProgressMode =\n CircularProgressMode.indeterminate;\n @property({type: Number}) progressValue: number = 0;\n @property({type: String}) direction: AutomationButtonDirection =\n AutomationButtonDirection.forward;\n @property({type: String}) positioning: AutomationButtonPositioning =\n AutomationButtonPositioning.point;\n /** Badge spacer should be set to true if there is a badge on the same side as the label */\n @property({type: Boolean}) hasBadgeSpacer: boolean = false;\n\n override render() {\n const effectiveVariant = this.effectiveVariant;\n\n const hasLabelContent =\n this.showReadoutStack && (this.readouts.length > 0 || this.tag !== null);\n\n return this.wrapContent(html`\n <button\n class=${classMap({\n wrapper: true,\n ['positioning-' + this.positioning]: true,\n ['variant-' + effectiveVariant]: true,\n ['state-' + this.state]: true,\n 'label-empty': !hasLabelContent,\n ['label-' + this.readoutPosition]: true,\n 'has-badge-spacer': this.hasBadgeSpacer,\n alert: this.alert,\n progress: this.progress,\n static: this.static,\n })}\n >\n <div class=\"icon-touch-target\">\n ${this.renderIconHolder()}\n <div class=\"badge-top-right\">\n <slot name=\"badge-top-right\"></slot>\n </div>\n <div class=\"badge-top-left\">\n <slot name=\"badge-top-left\"></slot>\n </div>\n <div class=\"badge-bottom-left\">\n <slot name=\"badge-bottom-left\"></slot>\n </div>\n <div class=\"badge-bottom-right\">\n <slot name=\"badge-bottom-right\"></slot>\n </div>\n </div>\n ${this.showReadoutStack\n ? html`\n <div class=\"badge-spacer\"></div>\n <obc-automation-button-readout-stack\n .readouts=${this.readouts}\n .tag=${this.tag}\n .size=${this.readoutSize}\n .idTagOrientation=${this.getIdTagOrientation()}\n ></obc-automation-button-readout-stack>\n `\n : nothing}\n ${this.alert\n ? html` <obc-alert-frame\n class=\"alert-frame\"\n .type=${this.alertFrameType}\n .thickness=${this.alertFrameThickness}\n .status=${this.alertFrameStatus}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showIcon=${this.showAlertIcon}\n >\n <span slot=\"icon\"><slot name=\"alert-icon\"></slot></span>\n <span slot=\"label\"><slot name=\"alert-label\"></slot></span>\n <span slot=\"timer\"><slot name=\"alert-timer\"></slot></span>\n </obc-alert-frame>`\n : nothing}\n </button>\n `);\n }\n\n private wrapContent(content: HTMLTemplateResult): HTMLTemplateResult {\n if (this.positioning === AutomationButtonPositioning.point) {\n return html`<div class=\"point-wrapper\">${content}</div>`;\n } else if (this.positioning === AutomationButtonPositioning.symbol) {\n return html`<div\n class=${classMap({\n 'symbol-wrapper': true,\n ['label-' + this.readoutPosition]: true,\n })}\n >\n ${content}\n </div> `;\n }\n return content;\n }\n\n static override styles = unsafeCSS(compentStyle);\n\n private get effectiveVariant(): AutomationButtonVariant {\n if (this.progress) {\n return AutomationButtonVariant.regular;\n }\n return this.variant;\n }\n\n private renderIconHolder(): HTMLTemplateResult {\n const effectiveVariant = this.effectiveVariant;\n const progressRing = this.getProgressRing();\n if (this.variant === AutomationButtonVariant.flatForward) {\n return html`<div class=\"icon-holder\">\n ${this.getDirectionIcon(effectiveVariant, 'icon-primary')}\n ${this.getDirectionIcon(effectiveVariant, 'icon-silhouette')}\n ${progressRing}\n </div>`;\n } else if (this.variant === AutomationButtonVariant.forward) {\n return html`<div class=\"icon-holder\">\n ${this.getDirectionIcon(effectiveVariant, 'icon-primary')}\n ${progressRing}\n </div>`;\n }\n\n const direction = this.getDirectionIcon(effectiveVariant);\n const showIcon = [\n AutomationButtonVariant.regular,\n AutomationButtonVariant.double,\n AutomationButtonVariant.flat,\n AutomationButtonVariant.square,\n ].includes(effectiveVariant);\n return html`<div class=\"icon-holder\">\n ${direction}\n ${showIcon\n ? html`<div class=\"icon-primary\">\n <slot name=\"icon\"></slot>\n </div>\n ${effectiveVariant === AutomationButtonVariant.flat\n ? html` <div class=\"icon-silhouette\">\n <slot name=\"icon-silhouette\"></slot>\n </div>`\n : nothing} `\n : nothing}\n ${progressRing}\n </div>`;\n }\n\n private getProgressRing(): null | HTMLTemplateResult {\n if (!this.progress) {\n return null;\n }\n\n return html`<obc-circular-progress\n class=\"progress-ring\"\n .mode=${this.progressMode}\n .value=${this.progressValue}\n ></obc-circular-progress>`;\n }\n\n private getDirectionIcon(\n variant: AutomationButtonVariant,\n className: string = 'icon-direction'\n ): typeof nothing | HTMLTemplateResult {\n if (\n ![\n AutomationButtonVariant.double,\n AutomationButtonVariant.forward,\n AutomationButtonVariant.flatForward,\n ].includes(variant)\n ) {\n return nothing;\n } else if (this.direction === AutomationButtonDirection.forward) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 5 v 14 L 20 12Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.forwardFast) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.5 5 v 14 l 8.5 -7 Z M14.5 5 v 14 l 8.5 -7 Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.forwardStopped) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 5 v 14 L 20 12Z\"\n fill=\"var(--automation-device-tertiary-color)\"\n stroke=\"var(--automation-device-tertiary-inverted-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.backward) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 5 v 14 L 4 12Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg>`;\n } else if (this.direction === AutomationButtonDirection.backwardFast) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M20.5 5 v 14 l -8.5 -7 Z M9.5 5 v 14 l -8.5 -7 Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg>`;\n } else if (this.direction === AutomationButtonDirection.backwardStopped) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 5 v 14 L 4 12Z\"\n fill=\"var(--automation-device-tertiary-color)\"\n stroke=\"var(--automation-device-tertiary-inverted-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.standby) {\n return html`<obi-standby class=\"${className}\" usecsscolor></obi-standby>`;\n }\n throw new Error('Invalid direction');\n }\n\n private getIdTagOrientation(): IdTagOrientation {\n if (this.readoutPosition === AutomationButtonReadoutPosition.top) {\n return IdTagOrientation.top;\n }\n return IdTagOrientation.bottom;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-automation-button': ObcAutomationButton;\n }\n}\n"],"names":["AutomationButtonVariant","AutomationButtonState","AutomationButtonReadoutPosition","AutomationButtonDirection","AutomationButtonLabelDirection","AutomationButtonPositioning"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCO,IAAK,4CAAAA,6BAAL;AACLA,2BAAA,SAAA,IAAU;AACVA,2BAAA,QAAA,IAAS;AACTA,2BAAA,SAAA,IAAU;AACVA,2BAAA,QAAA,IAAS;AACTA,2BAAA,MAAA,IAAO;AACPA,2BAAA,aAAA,IAAc;AANJ,SAAAA;AAAA,GAAA,2BAAA,CAAA,CAAA;AASL,IAAK,0CAAAC,2BAAL;AACLA,yBAAA,QAAA,IAAS;AACTA,yBAAA,MAAA,IAAO;AAFG,SAAAA;AAAA,GAAA,yBAAA,CAAA,CAAA;AAKL,IAAK,oDAAAC,qCAAL;AACLA,mCAAA,KAAA,IAAM;AACNA,mCAAA,QAAA,IAAS;AACTA,mCAAA,MAAA,IAAO;AACPA,mCAAA,OAAA,IAAQ;AAJE,SAAAA;AAAA,GAAA,mCAAA,CAAA,CAAA;AAOL,IAAK,8CAAAC,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A,gBAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA5Bb,oBA4Be,WAAA,iBAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA7Bb,oBA6Be,WAAA,aAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA/Bb,oBA+Be,WAAA,eAAA,CAAA;AAGC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAlCd,oBAkCgB,WAAA,kBAAA,CAAA;AAlChB,sBAAN,gBAAA;AAAA,EADN,cAAc,uBAAuB;AAAA,GACzB,mBAAA;"}
|
|
1
|
+
{"version":3,"file":"automation-button.js","sources":["../../../src/automation/automation-button/automation-button.ts"],"sourcesContent":["import {HTMLTemplateResult, LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport compentStyle from './automation-button.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport '../../icons/icon-forward.js';\nimport '../../icons/icon-forward-fast.js';\nimport '../../icons/icon-forward-stopped.js';\nimport '../../icons/icon-backward.js';\nimport '../../icons/icon-backward-fast.js';\nimport '../../icons/icon-backward-stopped.js';\nimport '../../icons/icon-standby.js';\nimport '../../icons/icon-arrow-up-google.js';\nimport '../../icons/icon-arrow-down-google.js';\nimport '../../icons/icon-arrow-left-google.js';\nimport '../../icons/icon-arrow-right-google.js';\nimport '../../components/alert-frame/alert-frame.js';\nimport {\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n ObcAlertFrameMode,\n wrapWithAlertFrame,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport {customElement} from '../../decorator.js';\nimport {\n AutomationButtonReadoutStack,\n AutomationButtonReadoutStackSize,\n IdTagOrientation,\n} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport '../../building-blocks/circular-progress/circular-progress.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\n\nexport {CircularProgressMode};\n\nexport enum AutomationButtonVariant {\n regular = 'regular',\n double = 'double',\n forward = 'forward',\n square = 'square',\n flat = 'flat',\n flatForward = 'flat-forward',\n}\n\nexport enum AutomationButtonState {\n closed = 'closed',\n open = 'open',\n}\n\nexport enum AutomationButtonReadoutPosition {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport enum AutomationButtonDirection {\n forward = 'forward',\n forwardFast = 'forward-fast',\n forwardStopped = 'forward-stopped',\n backward = 'backward',\n backwardFast = 'backward-fast',\n backwardStopped = 'backward-stopped',\n standby = 'standby',\n}\n\nexport enum AutomationButtonLabelDirection {\n up = 'up',\n down = 'down',\n left = 'left',\n right = 'right',\n}\n\n/**\n * The positioning of the automation button.\n * - `point`: The button is wrapped in a 0x0 px div, where the center of the symbol is the center of the div.\n * - `symbol`: The button is wrapped in a div containing the symbol but not the readout stack\n * - `button`: The button not wrapped, in is positioned based on the full size of the button.\n */\nexport enum AutomationButtonPositioning {\n point = 'point',\n symbol = 'symbol',\n button = 'button',\n}\n\n@customElement('obc-automation-button')\nexport class ObcAutomationButton extends LitElement {\n @property({type: String}) variant: AutomationButtonVariant =\n AutomationButtonVariant.regular;\n @property({type: String}) state: AutomationButtonState =\n AutomationButtonState.open;\n @property({type: Boolean}) static: boolean = false;\n @property({type: Boolean, attribute: false}) showReadoutStack: boolean = true;\n @property({type: Array, attribute: false})\n readouts: AutomationButtonReadoutStack[] = [];\n @property({type: String})\n tag: string | null = null;\n @property({type: String}) readoutPosition: AutomationButtonReadoutPosition =\n AutomationButtonReadoutPosition.bottom;\n @property({type: String}) readoutSize: AutomationButtonReadoutStackSize =\n AutomationButtonReadoutStackSize.regular;\n @property({type: Boolean}) alert: boolean = false;\n @property({type: String}) alertFrameType: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n @property({type: String}) alertFrameThickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n @property({type: String}) alertFrameStatus: AlertType = AlertType.Alarm;\n @property({type: String}) alertFrameMode: ObcAlertFrameMode =\n ObcAlertFrameMode.ackedActive;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n @property({type: Boolean}) progress: boolean = false;\n @property({type: String}) progressMode: CircularProgressMode =\n CircularProgressMode.indeterminate;\n @property({type: Number}) progressValue: number = 0;\n @property({type: String}) direction: AutomationButtonDirection =\n AutomationButtonDirection.forward;\n @property({type: String}) positioning: AutomationButtonPositioning =\n AutomationButtonPositioning.point;\n /** Badge spacer should be set to true if there is a badge on the same side as the label */\n @property({type: Boolean}) hasBadgeSpacer: boolean = false;\n\n override render() {\n const effectiveVariant = this.effectiveVariant;\n\n const hasLabelContent =\n this.showReadoutStack && (this.readouts.length > 0 || this.tag !== null);\n\n return this.wrapContent(html`\n <button\n class=${classMap({\n wrapper: true,\n ['positioning-' + this.positioning]: true,\n ['variant-' + effectiveVariant]: true,\n ['state-' + this.state]: true,\n 'label-empty': !hasLabelContent,\n ['label-' + this.readoutPosition]: true,\n 'has-badge-spacer': this.hasBadgeSpacer,\n alert: this.alert,\n progress: this.progress,\n static: this.static,\n })}\n >\n <div class=\"icon-touch-target\">\n ${this.renderIconHolder()}\n <div class=\"badge-top-right\">\n <slot name=\"badge-top-right\"></slot>\n </div>\n <div class=\"badge-top-left\">\n <slot name=\"badge-top-left\"></slot>\n </div>\n <div class=\"badge-bottom-left\">\n <slot name=\"badge-bottom-left\"></slot>\n </div>\n <div class=\"badge-bottom-right\">\n <slot name=\"badge-bottom-right\"></slot>\n </div>\n </div>\n ${this.showReadoutStack\n ? html`\n <div class=\"badge-spacer\"></div>\n <obc-automation-button-readout-stack\n .readouts=${this.readouts}\n .tag=${this.tag}\n .size=${this.readoutSize}\n .idTagOrientation=${this.getIdTagOrientation()}\n ></obc-automation-button-readout-stack>\n `\n : nothing}\n ${this.alert && this.positioning === AutomationButtonPositioning.point\n ? html` <obc-alert-frame\n class=\"alert-frame\"\n .type=${this.alertFrameType}\n .thickness=${this.alertFrameThickness}\n .status=${this.alertFrameStatus}\n .mode=${this.alertFrameMode}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showIcon=${this.showAlertIcon}\n >\n <span slot=\"icon\"><slot name=\"alert-icon\"></slot></span>\n <span slot=\"label\"><slot name=\"alert-label\"></slot></span>\n <span slot=\"timer\"><slot name=\"alert-timer\"></slot></span>\n </obc-alert-frame>`\n : nothing}\n </button>\n `);\n }\n\n private wrapContent(content: HTMLTemplateResult): HTMLTemplateResult {\n if (this.positioning === AutomationButtonPositioning.point) {\n return html`<div class=\"point-wrapper\">${content}</div>`;\n }\n const innerContent = wrapWithAlertFrame(\n this.alert\n ? {\n type: this.alertFrameType,\n thickness: this.alertFrameThickness,\n status: this.alertFrameStatus,\n mode: this.alertFrameMode,\n showIcon: this.showAlertIcon,\n showAlertCategoryIcon: this.showAlertCategoryIcon,\n }\n : false,\n content\n );\n if (this.positioning === AutomationButtonPositioning.symbol) {\n return html`<div\n class=${classMap({\n 'symbol-wrapper': true,\n ['label-' + this.readoutPosition]: true,\n })}\n >\n ${innerContent}\n </div> `;\n }\n return innerContent;\n }\n\n static override styles = unsafeCSS(compentStyle);\n\n private get effectiveVariant(): AutomationButtonVariant {\n if (this.progress) {\n return AutomationButtonVariant.regular;\n }\n return this.variant;\n }\n\n private renderIconHolder(): HTMLTemplateResult {\n const effectiveVariant = this.effectiveVariant;\n const progressRing = this.getProgressRing();\n if (this.variant === AutomationButtonVariant.flatForward) {\n return html`<div class=\"icon-holder\">\n ${this.getDirectionIcon(effectiveVariant, 'icon-primary')}\n ${this.getDirectionIcon(effectiveVariant, 'icon-silhouette')}\n ${progressRing}\n </div>`;\n } else if (this.variant === AutomationButtonVariant.forward) {\n return html`<div class=\"icon-holder\">\n ${this.getDirectionIcon(effectiveVariant, 'icon-primary')}\n ${progressRing}\n </div>`;\n }\n\n const direction = this.getDirectionIcon(effectiveVariant);\n const showIcon = [\n AutomationButtonVariant.regular,\n AutomationButtonVariant.double,\n AutomationButtonVariant.flat,\n AutomationButtonVariant.square,\n ].includes(effectiveVariant);\n return html`<div class=\"icon-holder\">\n ${direction}\n ${showIcon\n ? html`<div class=\"icon-primary\">\n <slot name=\"icon\"></slot>\n </div>\n ${effectiveVariant === AutomationButtonVariant.flat\n ? html` <div class=\"icon-silhouette\">\n <slot name=\"icon-silhouette\"></slot>\n </div>`\n : nothing} `\n : nothing}\n ${progressRing}\n </div>`;\n }\n\n private getProgressRing(): null | HTMLTemplateResult {\n if (!this.progress) {\n return null;\n }\n\n return html`<obc-circular-progress\n class=\"progress-ring\"\n .mode=${this.progressMode}\n .value=${this.progressValue}\n ></obc-circular-progress>`;\n }\n\n private getDirectionIcon(\n variant: AutomationButtonVariant,\n className: string = 'icon-direction'\n ): typeof nothing | HTMLTemplateResult {\n if (\n ![\n AutomationButtonVariant.double,\n AutomationButtonVariant.forward,\n AutomationButtonVariant.flatForward,\n ].includes(variant)\n ) {\n return nothing;\n } else if (this.direction === AutomationButtonDirection.forward) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 5 v 14 L 20 12Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.forwardFast) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.5 5 v 14 l 8.5 -7 Z M14.5 5 v 14 l 8.5 -7 Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.forwardStopped) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 5 v 14 L 20 12Z\"\n fill=\"var(--automation-device-tertiary-color)\"\n stroke=\"var(--automation-device-tertiary-inverted-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.backward) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 5 v 14 L 4 12Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg>`;\n } else if (this.direction === AutomationButtonDirection.backwardFast) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M20.5 5 v 14 l -8.5 -7 Z M9.5 5 v 14 l -8.5 -7 Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg>`;\n } else if (this.direction === AutomationButtonDirection.backwardStopped) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 5 v 14 L 4 12Z\"\n fill=\"var(--automation-device-tertiary-color)\"\n stroke=\"var(--automation-device-tertiary-inverted-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.standby) {\n return html`<obi-standby class=\"${className}\" usecsscolor></obi-standby>`;\n }\n throw new Error('Invalid direction');\n }\n\n private getIdTagOrientation(): IdTagOrientation {\n if (this.readoutPosition === AutomationButtonReadoutPosition.top) {\n return IdTagOrientation.top;\n }\n return IdTagOrientation.bottom;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-automation-button': ObcAutomationButton;\n }\n}\n"],"names":["AutomationButtonVariant","AutomationButtonState","AutomationButtonReadoutPosition","AutomationButtonDirection","AutomationButtonLabelDirection","AutomationButtonPositioning"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCO,IAAK,4CAAAA,6BAAL;AACLA,2BAAA,SAAA,IAAU;AACVA,2BAAA,QAAA,IAAS;AACTA,2BAAA,SAAA,IAAU;AACVA,2BAAA,QAAA,IAAS;AACTA,2BAAA,MAAA,IAAO;AACPA,2BAAA,aAAA,IAAc;AANJ,SAAAA;AAAA,GAAA,2BAAA,CAAA,CAAA;AASL,IAAK,0CAAAC,2BAAL;AACLA,yBAAA,QAAA,IAAS;AACTA,yBAAA,MAAA,IAAO;AAFG,SAAAA;AAAA,GAAA,yBAAA,CAAA,CAAA;AAKL,IAAK,oDAAAC,qCAAL;AACLA,mCAAA,KAAA,IAAM;AACNA,mCAAA,QAAA,IAAS;AACTA,mCAAA,MAAA,IAAO;AACPA,mCAAA,OAAA,IAAQ;AAJE,SAAAA;AAAA,GAAA,mCAAA,CAAA,CAAA;AAOL,IAAK,8CAAAC,+BAAL;AACLA,6BAAA,SAAA,IAAU;AACVA,6BAAA,aAAA,IAAc;AACdA,6BAAA,gBAAA,IAAiB;AACjBA,6BAAA,UAAA,IAAW;AACXA,6BAAA,cAAA,IAAe;AACfA,6BAAA,iBAAA,IAAkB;AAClBA,6BAAA,SAAA,IAAU;AAPA,SAAAA;AAAA,GAAA,6BAAA,CAAA,CAAA;AAUL,IAAK,mDAAAC,oCAA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AM,QAAA,CAAQ;AAAA,GA1Bd,oBA0BgB,WAAA,YAAA,CAAA;AACD,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA3Bb,oBA2Be,WAAA,gBAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA7Bb,oBA6Be,WAAA,iBAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA9Bb,oBA8Be,WAAA,aAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAhCb,oBAgCe,WAAA,eAAA,CAAA;AAGC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAnCd,oBAmCgB,WAAA,kBAAA,CAAA;AAnChB,sBAAN,gBAAA;AAAA,EADN,cAAc,uBAAuB;AAAA,GACzB,mBAAA;"}
|
|
@@ -2,7 +2,8 @@ import { HTMLTemplateResult, LitElement, nothing } from 'lit';
|
|
|
2
2
|
import { LineMedium } from '../index.js';
|
|
3
3
|
import { AutomationButtonBadgeAlert, AutomationButtonBadgeCommandLocked, AutomationButtonBadgeControl, AutomationButtonBadgeInterlock } from '../automation-button/abstract-automation-button.js';
|
|
4
4
|
import { Priority } from '../../navigation-instruments/types.js';
|
|
5
|
-
import {
|
|
5
|
+
import { ObcAlertFrameThickness, ObcAlertFrameType } from '../../components/alert-frame/alert-frame.js';
|
|
6
|
+
import { AlertType } from '../../types.js';
|
|
6
7
|
import { ChartLineDataItem } from '../../building-blocks/chart-line/chart-line-base.js';
|
|
7
8
|
import { LinearAdvice } from '../../building-blocks/instrument-linear/advice.js';
|
|
8
9
|
import '../automation-badge/automation-badge.js';
|
|
@@ -172,7 +173,7 @@ export declare class ObcAutomationTank extends LitElement {
|
|
|
172
173
|
alert: boolean;
|
|
173
174
|
alertFrameType: ObcAlertFrameType;
|
|
174
175
|
alertFrameThickness: ObcAlertFrameThickness;
|
|
175
|
-
alertFrameStatus:
|
|
176
|
+
alertFrameStatus: AlertType;
|
|
176
177
|
showAlertCategoryIcon: boolean;
|
|
177
178
|
showAlertIcon: boolean;
|
|
178
179
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-tank.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-tank/automation-tank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,UAAU,EAEV,OAAO,EAGR,MAAM,KAAK,CAAC;AAGb,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AACvC,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,oDAAoD,CAAC;AAE5D,OAAO,8CAA8C,CAAC;AACtD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,gDAAgD,CAAC;AACxD,OAAO,yCAAyC,CAAC;AACjD,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC;AAClC,OAAO,oCAAoC,CAAC;AAC5C,OAAO,yDAAyD,CAAC;AACjE,OAAO,oDAAoD,CAAC;AAC5D,OAAO,6CAA6C,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAC,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"automation-tank.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-tank/automation-tank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,UAAU,EAEV,OAAO,EAGR,MAAM,KAAK,CAAC;AAGb,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AACvC,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,oDAAoD,CAAC;AAE5D,OAAO,8CA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E,4BAA4B,CAChC;IACV,UAAU,EAAE,0BAA0B,CAC9B;IACR,cAAc,EAAE,8BAA8B,CAClC;IAEtC,kBAAkB,EAAE,kCAAkC,CACZ;IAEjC,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,WAAW,CAAK;IACjC;;;;;;OAMG;IACM,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,oBAAoB,CAAC,CAAiB;IAC9C,OAAO,CAAC,aAAa,CAAC,CAAU;IAEhC,OAAO,KAAK,SAAS,GAEpB;IAED,OAAO,CAAC,eAAe;IAyBvB,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,uBAAuB;IAU/B,OAAO,KAAK,eAAe,GAK1B;IAED,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,gBAAgB;IAWf,oBAAoB,IAAI,IAAI;cAOlB,OAAO,CACxB,OAAO,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,GAC9C,IAAI;IAaP,OAAO,CAAC,wBAAwB;IA8BhC,SAAS,IAAI,kBAAkB,GAAG,OAAO,OAAO;IAyBhD;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,oBAAoB;IAmJ5B,OAAO,CAAC,SAAS;IAaR,MAAM;IA2Xf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
|
|
@@ -13,8 +13,9 @@ import "../../icons/icon-tank.js";
|
|
|
13
13
|
import "../../icons/icon-energy-battery.js";
|
|
14
14
|
import "../../navigation-instruments/gauge-trend/gauge-trend.js";
|
|
15
15
|
import "../../building-blocks/bar-vertical/bar-vertical.js";
|
|
16
|
-
import { ObcAlertFrameType, ObcAlertFrameThickness
|
|
16
|
+
import { ObcAlertFrameType, ObcAlertFrameThickness } from "../../components/alert-frame/alert-frame.js";
|
|
17
17
|
import { Priority } from "../../navigation-instruments/types.js";
|
|
18
|
+
import { AlertType } from "../../types.js";
|
|
18
19
|
import { ExternalScaleSide, FillMode, AdvicePosition } from "../../building-blocks/external-scale/external-scale.js";
|
|
19
20
|
import { classMap } from "lit/directives/class-map.js";
|
|
20
21
|
import { customElement } from "../../decorator.js";
|
|
@@ -82,7 +83,7 @@ let ObcAutomationTank = class extends LitElement {
|
|
|
82
83
|
this.alert = false;
|
|
83
84
|
this.alertFrameType = ObcAlertFrameType.SmallSideFlip;
|
|
84
85
|
this.alertFrameThickness = ObcAlertFrameThickness.Small;
|
|
85
|
-
this.alertFrameStatus =
|
|
86
|
+
this.alertFrameStatus = AlertType.Alarm;
|
|
86
87
|
this.showAlertCategoryIcon = true;
|
|
87
88
|
this.showAlertIcon = false;
|
|
88
89
|
this.showTrendSymbol = true;
|
|
@@ -110,6 +111,16 @@ let ObcAutomationTank = class extends LitElement {
|
|
|
110
111
|
return ObcAutomationBadgeType.Warning;
|
|
111
112
|
case AutomationButtonBadgeAlert.Alarm:
|
|
112
113
|
return ObcAutomationBadgeType.Alarm;
|
|
114
|
+
case AutomationButtonBadgeAlert.IsaCritical:
|
|
115
|
+
return ObcAutomationBadgeType.IsaCritical;
|
|
116
|
+
case AutomationButtonBadgeAlert.IsaHigh:
|
|
117
|
+
return ObcAutomationBadgeType.IsaHigh;
|
|
118
|
+
case AutomationButtonBadgeAlert.IsaMedium:
|
|
119
|
+
return ObcAutomationBadgeType.IsaMedium;
|
|
120
|
+
case AutomationButtonBadgeAlert.IsaLow:
|
|
121
|
+
return ObcAutomationBadgeType.IsaLow;
|
|
122
|
+
case AutomationButtonBadgeAlert.IsaDiagnostic:
|
|
123
|
+
return ObcAutomationBadgeType.IsaDiagnostic;
|
|
113
124
|
default:
|
|
114
125
|
return null;
|
|
115
126
|
}
|