@oicl/openbridge-webcomponents-svelte 2.2.0-next.5 → 2.2.0-next.7
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/dist/automation/analog-threeway-valve/ObcAnalogThreewayValve.svelte +4 -1
- package/dist/automation/analog-threeway-valve/ObcAnalogThreewayValve.svelte.d.ts +4 -1
- package/dist/automation/analog-valve/ObcAnalogValve.svelte +4 -1
- package/dist/automation/analog-valve/ObcAnalogValve.svelte.d.ts +4 -1
- package/dist/automation/automation-button/ObcAbstractAutomationButton.svelte +4 -1
- package/dist/automation/automation-button/ObcAbstractAutomationButton.svelte.d.ts +4 -1
- package/dist/automation/automation-button/ObcAbstractAutomationButtonMotorized.svelte +4 -1
- package/dist/automation/automation-button/ObcAbstractAutomationButtonMotorized.svelte.d.ts +4 -1
- package/dist/automation/automation-button/ObcAbstractAutomationButtonSquared.svelte +4 -1
- package/dist/automation/automation-button/ObcAbstractAutomationButtonSquared.svelte.d.ts +4 -1
- package/dist/automation/automation-button/ObcAutomationButton.svelte +25 -4
- package/dist/automation/automation-button/ObcAutomationButton.svelte.d.ts +21 -1
- package/dist/automation/bipolar-transistor/ObcBipolarTransistor.svelte +4 -1
- package/dist/automation/bipolar-transistor/ObcBipolarTransistor.svelte.d.ts +4 -1
- package/dist/automation/capacitor/ObcCapacitor.svelte +4 -1
- package/dist/automation/capacitor/ObcCapacitor.svelte.d.ts +4 -1
- package/dist/automation/converter/ObcConverter.svelte +4 -1
- package/dist/automation/converter/ObcConverter.svelte.d.ts +4 -1
- package/dist/automation/damper/ObcDamper.svelte +4 -1
- package/dist/automation/damper/ObcDamper.svelte.d.ts +4 -1
- package/dist/automation/digital-threeway-valve/ObcDigitalThreewayValve.svelte +4 -1
- package/dist/automation/digital-threeway-valve/ObcDigitalThreewayValve.svelte.d.ts +4 -1
- package/dist/automation/digital-valve/ObcDigitalValve.svelte +28 -6
- package/dist/automation/digital-valve/ObcDigitalValve.svelte.d.ts +27 -3
- package/dist/automation/diodes/ObcDiodes.svelte +4 -1
- package/dist/automation/diodes/ObcDiodes.svelte.d.ts +4 -1
- package/dist/automation/direction-valve-shared/ObcDirectionValveBase.svelte +87 -0
- package/dist/automation/direction-valve-shared/ObcDirectionValveBase.svelte.d.ts +79 -0
- package/dist/automation/direction-valve-shared/ObcPressureValveBase.svelte +91 -0
- package/dist/automation/direction-valve-shared/ObcPressureValveBase.svelte.d.ts +84 -0
- package/dist/automation/direction-valve-shared/direction-valve-shared.d.ts +2 -0
- package/dist/automation/direction-valve-shared/direction-valve-shared.js +2 -0
- package/dist/automation/fan/ObcFan.svelte +4 -1
- package/dist/automation/fan/ObcFan.svelte.d.ts +4 -1
- package/dist/automation/filter/ObcFilter.svelte +4 -1
- package/dist/automation/filter/ObcFilter.svelte.d.ts +4 -1
- package/dist/automation/ground/ObcGround.svelte +4 -1
- package/dist/automation/ground/ObcGround.svelte.d.ts +4 -1
- package/dist/automation/logic/ObcLogic.svelte +4 -1
- package/dist/automation/logic/ObcLogic.svelte.d.ts +4 -1
- package/dist/automation/mosfet/ObcMosfet.svelte +4 -1
- package/dist/automation/mosfet/ObcMosfet.svelte.d.ts +4 -1
- package/dist/automation/motor/ObcMotor.svelte +4 -1
- package/dist/automation/motor/ObcMotor.svelte.d.ts +4 -1
- package/dist/automation/non-return-valve/ObcNonReturnValve.svelte +87 -0
- package/dist/automation/non-return-valve/ObcNonReturnValve.svelte.d.ts +79 -0
- package/dist/automation/pressure-reduction-valve/ObcPressureReductionValve.svelte +91 -0
- package/dist/automation/pressure-reduction-valve/ObcPressureReductionValve.svelte.d.ts +84 -0
- package/dist/automation/pressure-sustain-valve/ObcPressureSustainValve.svelte +91 -0
- package/dist/automation/pressure-sustain-valve/ObcPressureSustainValve.svelte.d.ts +84 -0
- package/dist/automation/pump/ObcPump.svelte +4 -1
- package/dist/automation/pump/ObcPump.svelte.d.ts +4 -1
- package/dist/automation/resistor/ObcResistor.svelte +4 -1
- package/dist/automation/resistor/ObcResistor.svelte.d.ts +4 -1
- package/dist/automation/router/ObcRouter.svelte +4 -1
- package/dist/automation/router/ObcRouter.svelte.d.ts +4 -1
- package/dist/automation/source/ObcSource.svelte +4 -1
- package/dist/automation/source/ObcSource.svelte.d.ts +4 -1
- package/dist/automation/switch/ObcSwitch.svelte +4 -1
- package/dist/automation/switch/ObcSwitch.svelte.d.ts +4 -1
- package/dist/automation/transformer/ObcTransformer.svelte +4 -1
- package/dist/automation/transformer/ObcTransformer.svelte.d.ts +4 -1
- package/dist/components/alert-button-item/ObcAlertButtonItem.svelte +11 -6
- package/dist/components/alert-button-item/ObcAlertButtonItem.svelte.d.ts +5 -1
- package/dist/components/alert-subsystem-button/ObcAlertSubsystemButton.svelte +62 -0
- package/dist/components/alert-subsystem-button/ObcAlertSubsystemButton.svelte.d.ts +43 -0
- package/dist/components/diagnostic-button/ObcDiagnosticButton.svelte +41 -0
- package/dist/components/diagnostic-button/ObcDiagnosticButton.svelte.d.ts +24 -0
- package/dist/components/diagnostic-menu/ObcDiagnosticMenu.svelte +71 -0
- package/dist/components/diagnostic-menu/ObcDiagnosticMenu.svelte.d.ts +44 -0
- package/dist/components/top-bar/ObcTopBar.svelte +6 -1
- package/dist/components/top-bar/ObcTopBar.svelte.d.ts +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ export type {AlertType, AlertCounts, FlashingSpeed} from '@oicl/openbridge-webco
|
|
|
5
5
|
export type {ObcAlertCounterItemType} from '@oicl/openbridge-webcomponents/dist/components/alert-counter-item/alert-counter-item.js';
|
|
6
6
|
import '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
7
7
|
import { setProperties, forwardEvents } from "../../util.js";
|
|
8
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
8
9
|
import type {ObcAlertButtonType} from '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
9
10
|
import type {AlertType, AlertCounts, FlashingSpeed} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
10
11
|
import type {ObcAlertCounterItemType} from '@oicl/openbridge-webcomponents/dist/components/alert-counter-item/alert-counter-item.js';
|
|
@@ -67,16 +68,20 @@ import type {ObcAlertCounterItemType} from '@oicl/openbridge-webcomponents/dist/
|
|
|
67
68
|
flashingSpeed?: FlashingSpeed;
|
|
68
69
|
/** Stretches the visible button to the host height instead of the 32 px visual target. */
|
|
69
70
|
fillHeight?: boolean;
|
|
71
|
+
/** Draws the button in the selected style, for a button whose panel is showing. */
|
|
72
|
+
activated?: boolean;
|
|
70
73
|
/** Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute; replaces the generated label. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
|
|
71
|
-
ariaLabel?: string | null
|
|
74
|
+
ariaLabel?: string | null;
|
|
75
|
+
/** Whether the panel the button opens is showing, forwarded to the inner `<button>` as `aria-expanded`; mapped to the `aria-expanded` attribute. Set it with `activated` from the flag that drives the panel; left unset, the button announces no panel. */
|
|
76
|
+
ariaExpanded?: string | null
|
|
72
77
|
}
|
|
73
78
|
export interface Events {
|
|
74
79
|
onClick?: (event: CustomEvent<unknown>) => void
|
|
75
80
|
}
|
|
76
81
|
export interface Slots {
|
|
77
|
-
|
|
82
|
+
icon?: Snippet
|
|
78
83
|
}
|
|
79
|
-
const {onClick, class: className, style,
|
|
84
|
+
const {onClick, class: className, style, icon, ...props} = $props<Props & Events & Slots>();
|
|
80
85
|
|
|
81
86
|
|
|
82
87
|
</script>
|
|
@@ -87,7 +92,7 @@ import type {ObcAlertCounterItemType} from '@oicl/openbridge-webcomponents/dist/
|
|
|
87
92
|
style={style}
|
|
88
93
|
use:forwardEvents={{'click': onClick}} >
|
|
89
94
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
{#if icon}
|
|
96
|
+
<NamedSlot name="icon" content={icon} />
|
|
97
|
+
{/if}
|
|
93
98
|
</obc-alert-button-item>
|
|
@@ -60,14 +60,18 @@ export interface Props {
|
|
|
60
60
|
flashingSpeed?: FlashingSpeed;
|
|
61
61
|
/** Stretches the visible button to the host height instead of the 32 px visual target. */
|
|
62
62
|
fillHeight?: boolean;
|
|
63
|
+
/** Draws the button in the selected style, for a button whose panel is showing. */
|
|
64
|
+
activated?: boolean;
|
|
63
65
|
/** Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute; replaces the generated label. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
|
|
64
66
|
ariaLabel?: string | null;
|
|
67
|
+
/** Whether the panel the button opens is showing, forwarded to the inner `<button>` as `aria-expanded`; mapped to the `aria-expanded` attribute. Set it with `activated` from the flag that drives the panel; left unset, the button announces no panel. */
|
|
68
|
+
ariaExpanded?: string | null;
|
|
65
69
|
}
|
|
66
70
|
export interface Events {
|
|
67
71
|
onClick?: (event: CustomEvent<unknown>) => void;
|
|
68
72
|
}
|
|
69
73
|
export interface Slots {
|
|
70
|
-
|
|
74
|
+
icon?: Snippet;
|
|
71
75
|
}
|
|
72
76
|
type $$ComponentProps = Props & Events & Slots;
|
|
73
77
|
declare const ObcAlertButtonItem: import("svelte").Component<$$ComponentProps, {
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
export type {AlertCounts} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
4
|
+
import '@oicl/openbridge-webcomponents/dist/components/alert-subsystem-button/alert-subsystem-button.js';
|
|
5
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
7
|
+
import type {AlertCounts} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
8
|
+
import type { Snippet } from 'svelte';
|
|
9
|
+
|
|
10
|
+
export interface Props {
|
|
11
|
+
class?: string;
|
|
12
|
+
style?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Alert count per severity, drawn as badges in the counter half.
|
|
15
|
+
*
|
|
16
|
+
* Available when `hasAlert==true`.
|
|
17
|
+
*/
|
|
18
|
+
counts?: AlertCounts;
|
|
19
|
+
/** Whether the subsystem has active alerts: `true` draws the badges, `false` the `emptyText`; `true` with nothing counted shows the `emptyText` as well. */
|
|
20
|
+
hasAlert?: boolean;
|
|
21
|
+
/** The subsystem label, before the badges. */
|
|
22
|
+
label?: string;
|
|
23
|
+
/** Text shown instead of the badges when `hasAlert` is `false` or nothing is counted. */
|
|
24
|
+
emptyText?: string;
|
|
25
|
+
/** Disables both halves. */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Disables the counter half alone. */
|
|
28
|
+
counterDisabled?: boolean;
|
|
29
|
+
/** Disables the list half alone. */
|
|
30
|
+
listDisabled?: boolean;
|
|
31
|
+
/** Accessible name of the list half; "Alert list" when left empty. */
|
|
32
|
+
listButtonLabel?: string;
|
|
33
|
+
/** Accessible name of the counter half, mapped to the `aria-label` attribute; replaces the generated "HVAC, 2 Caution", or "Alerts" when the half has neither a label nor text. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
|
|
34
|
+
ariaLabel?: string | null
|
|
35
|
+
}
|
|
36
|
+
export interface Events {
|
|
37
|
+
onCounterClick?: (event: CustomEvent<void>) => void;
|
|
38
|
+
onAlertListClick?: (event: CustomEvent<void>) => void
|
|
39
|
+
}
|
|
40
|
+
export interface Slots {
|
|
41
|
+
icon?: Snippet;
|
|
42
|
+
listIcon?: Snippet
|
|
43
|
+
}
|
|
44
|
+
const {onCounterClick, onAlertListClick, class: className, style, icon, listIcon, ...props} = $props<Props & Events & Slots>();
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
</script>
|
|
48
|
+
<obc-alert-subsystem-button
|
|
49
|
+
use:setProperties={props}
|
|
50
|
+
|
|
51
|
+
class={className}
|
|
52
|
+
style={style}
|
|
53
|
+
use:forwardEvents={{'counter-click': onCounterClick, 'alert-list-click': onAlertListClick}} >
|
|
54
|
+
|
|
55
|
+
{#if icon}
|
|
56
|
+
<NamedSlot name="icon" content={icon} />
|
|
57
|
+
{/if}
|
|
58
|
+
|
|
59
|
+
{#if listIcon}
|
|
60
|
+
<NamedSlot name="list-icon" content={listIcon} />
|
|
61
|
+
{/if}
|
|
62
|
+
</obc-alert-subsystem-button>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import '@oicl/openbridge-webcomponents/dist/components/alert-subsystem-button/alert-subsystem-button.js';
|
|
2
|
+
import type { AlertCounts } from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
export interface Props {
|
|
5
|
+
class?: string;
|
|
6
|
+
style?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Alert count per severity, drawn as badges in the counter half.
|
|
9
|
+
*
|
|
10
|
+
* Available when `hasAlert==true`.
|
|
11
|
+
*/
|
|
12
|
+
counts?: AlertCounts;
|
|
13
|
+
/** Whether the subsystem has active alerts: `true` draws the badges, `false` the `emptyText`; `true` with nothing counted shows the `emptyText` as well. */
|
|
14
|
+
hasAlert?: boolean;
|
|
15
|
+
/** The subsystem label, before the badges. */
|
|
16
|
+
label?: string;
|
|
17
|
+
/** Text shown instead of the badges when `hasAlert` is `false` or nothing is counted. */
|
|
18
|
+
emptyText?: string;
|
|
19
|
+
/** Disables both halves. */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Disables the counter half alone. */
|
|
22
|
+
counterDisabled?: boolean;
|
|
23
|
+
/** Disables the list half alone. */
|
|
24
|
+
listDisabled?: boolean;
|
|
25
|
+
/** Accessible name of the list half; "Alert list" when left empty. */
|
|
26
|
+
listButtonLabel?: string;
|
|
27
|
+
/** Accessible name of the counter half, mapped to the `aria-label` attribute; replaces the generated "HVAC, 2 Caution", or "Alerts" when the half has neither a label nor text. `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
|
|
28
|
+
ariaLabel?: string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface Events {
|
|
31
|
+
onCounterClick?: (event: CustomEvent<void>) => void;
|
|
32
|
+
onAlertListClick?: (event: CustomEvent<void>) => void;
|
|
33
|
+
}
|
|
34
|
+
export interface Slots {
|
|
35
|
+
icon?: Snippet;
|
|
36
|
+
listIcon?: Snippet;
|
|
37
|
+
}
|
|
38
|
+
type $$ComponentProps = Props & Events & Slots;
|
|
39
|
+
declare const ObcAlertSubsystemButton: import("svelte").Component<$$ComponentProps, {
|
|
40
|
+
AlertCounts: typeof AlertCounts;
|
|
41
|
+
}, "">;
|
|
42
|
+
type ObcAlertSubsystemButton = ReturnType<typeof ObcAlertSubsystemButton>;
|
|
43
|
+
export default ObcAlertSubsystemButton;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
|
|
4
|
+
import '@oicl/openbridge-webcomponents/dist/components/diagnostic-button/diagnostic-button.js';
|
|
5
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
|
+
|
|
7
|
+
import type { Snippet } from 'svelte';
|
|
8
|
+
|
|
9
|
+
export interface Props {
|
|
10
|
+
class?: string;
|
|
11
|
+
style?: string;
|
|
12
|
+
/** Number of diagnostics, drawn as the counter; 0 shows the asterisk alone. */
|
|
13
|
+
nAlerts?: number;
|
|
14
|
+
/** Draws the selected style while the diagnostic menu is showing; bind it to the flag that drives the menu's `open`. */
|
|
15
|
+
activated?: boolean;
|
|
16
|
+
/** Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute; replaces the generated "Diagnostics, 3". `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
|
|
17
|
+
ariaLabel?: string | null;
|
|
18
|
+
/** Whether the diagnostic menu is showing, forwarded to the inner `<button>` as `aria-expanded`; mapped to the `aria-expanded` attribute. Bind it with `activated`; left unset, the button announces no menu. */
|
|
19
|
+
ariaExpanded?: string | null
|
|
20
|
+
}
|
|
21
|
+
export interface Events {
|
|
22
|
+
onClick?: (event: CustomEvent<unknown>) => void
|
|
23
|
+
}
|
|
24
|
+
export interface Slots {
|
|
25
|
+
children?: Snippet
|
|
26
|
+
}
|
|
27
|
+
const {onClick, class: className, style, children, ...props} = $props<Props & Events & Slots>();
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
</script>
|
|
31
|
+
<obc-diagnostic-button
|
|
32
|
+
use:setProperties={props}
|
|
33
|
+
|
|
34
|
+
class={className}
|
|
35
|
+
style={style}
|
|
36
|
+
use:forwardEvents={{'click': onClick}} >
|
|
37
|
+
|
|
38
|
+
{#if children}
|
|
39
|
+
{@render children()}
|
|
40
|
+
{/if}
|
|
41
|
+
</obc-diagnostic-button>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import '@oicl/openbridge-webcomponents/dist/components/diagnostic-button/diagnostic-button.js';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
export interface Props {
|
|
4
|
+
class?: string;
|
|
5
|
+
style?: string;
|
|
6
|
+
/** Number of diagnostics, drawn as the counter; 0 shows the asterisk alone. */
|
|
7
|
+
nAlerts?: number;
|
|
8
|
+
/** Draws the selected style while the diagnostic menu is showing; bind it to the flag that drives the menu's `open`. */
|
|
9
|
+
activated?: boolean;
|
|
10
|
+
/** Accessible name forwarded to the inner `<button>`, mapped to the `aria-label` attribute; replaces the generated "Diagnostics, 3". `aria-labelledby` is not supported: ID references cannot cross the shadow boundary. */
|
|
11
|
+
ariaLabel?: string | null;
|
|
12
|
+
/** Whether the diagnostic menu is showing, forwarded to the inner `<button>` as `aria-expanded`; mapped to the `aria-expanded` attribute. Bind it with `activated`; left unset, the button announces no menu. */
|
|
13
|
+
ariaExpanded?: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface Events {
|
|
16
|
+
onClick?: (event: CustomEvent<unknown>) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface Slots {
|
|
19
|
+
children?: Snippet;
|
|
20
|
+
}
|
|
21
|
+
type $$ComponentProps = Props & Events & Slots;
|
|
22
|
+
declare const ObcDiagnosticButton: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
23
|
+
type ObcDiagnosticButton = ReturnType<typeof ObcDiagnosticButton>;
|
|
24
|
+
export default ObcDiagnosticButton;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
export type {ObcDiagnosticMenuAckAllVisibleClickEvent} from '@oicl/openbridge-webcomponents/dist/components/diagnostic-menu/diagnostic-menu.js';
|
|
4
|
+
import '@oicl/openbridge-webcomponents/dist/components/diagnostic-menu/diagnostic-menu.js';
|
|
5
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
7
|
+
import type {ObcDiagnosticMenuAckAllVisibleClickEvent} from '@oicl/openbridge-webcomponents/dist/components/diagnostic-menu/diagnostic-menu.js';
|
|
8
|
+
import type { Snippet } from 'svelte';
|
|
9
|
+
|
|
10
|
+
export interface Props {
|
|
11
|
+
class?: string;
|
|
12
|
+
style?: string;
|
|
13
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click. Leave it off to show and hide the menu yourself. */
|
|
14
|
+
softDismiss?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
17
|
+
*
|
|
18
|
+
* Available when `softDismiss==true`.
|
|
19
|
+
*/
|
|
20
|
+
open?: boolean;
|
|
21
|
+
/** Title of the menu; "Diagnostics" when left empty. */
|
|
22
|
+
menuTitle?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Enables the "ACK all visible" button; set it while a row in view can be acknowledged.
|
|
25
|
+
*
|
|
26
|
+
* Available when `showAckAllButton==true`.
|
|
27
|
+
*/
|
|
28
|
+
canAckAll?: boolean;
|
|
29
|
+
/** Shows the "ACK all visible" button in the footer. */
|
|
30
|
+
showAckAllButton?: boolean;
|
|
31
|
+
/** Shows the "Diagnostics list" button in the footer. */
|
|
32
|
+
showDiagnosticListButton?: boolean
|
|
33
|
+
}
|
|
34
|
+
export interface Events {
|
|
35
|
+
onAckAllVisibleClick?: (event: ObcDiagnosticMenuAckAllVisibleClickEvent) => void;
|
|
36
|
+
onGoToDiagnosticListClick?: (event: CustomEvent<void>) => void;
|
|
37
|
+
onClose?: (event: CustomEvent<void>) => void
|
|
38
|
+
}
|
|
39
|
+
export interface Slots {
|
|
40
|
+
children?: Snippet;
|
|
41
|
+
emptyTitle?: Snippet;
|
|
42
|
+
emptyDescription?: Snippet;
|
|
43
|
+
emptyIcon?: Snippet
|
|
44
|
+
}
|
|
45
|
+
const {onAckAllVisibleClick, onGoToDiagnosticListClick, onClose, class: className, style, children, emptyTitle, emptyDescription, emptyIcon, ...props} = $props<Props & Events & Slots>();
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</script>
|
|
49
|
+
<obc-diagnostic-menu
|
|
50
|
+
use:setProperties={props}
|
|
51
|
+
|
|
52
|
+
class={className}
|
|
53
|
+
style={style}
|
|
54
|
+
use:forwardEvents={{'ack-all-visible-click': onAckAllVisibleClick, 'go-to-diagnostic-list-click': onGoToDiagnosticListClick, 'close': onClose}} >
|
|
55
|
+
|
|
56
|
+
{#if children}
|
|
57
|
+
{@render children()}
|
|
58
|
+
{/if}
|
|
59
|
+
|
|
60
|
+
{#if emptyTitle}
|
|
61
|
+
<NamedSlot name="empty-title" content={emptyTitle} />
|
|
62
|
+
{/if}
|
|
63
|
+
|
|
64
|
+
{#if emptyDescription}
|
|
65
|
+
<NamedSlot name="empty-description" content={emptyDescription} />
|
|
66
|
+
{/if}
|
|
67
|
+
|
|
68
|
+
{#if emptyIcon}
|
|
69
|
+
<NamedSlot name="empty-icon" content={emptyIcon} />
|
|
70
|
+
{/if}
|
|
71
|
+
</obc-diagnostic-menu>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import '@oicl/openbridge-webcomponents/dist/components/diagnostic-menu/diagnostic-menu.js';
|
|
2
|
+
import type { ObcDiagnosticMenuAckAllVisibleClickEvent } from '@oicl/openbridge-webcomponents/dist/components/diagnostic-menu/diagnostic-menu.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
export interface Props {
|
|
5
|
+
class?: string;
|
|
6
|
+
style?: string;
|
|
7
|
+
/** Lets the menu close itself on a click outside it, on `Escape`, or when another menu opens. The page is covered while the menu is open, so the closing click reaches nothing there; only the top bar's strip stays clickable, which is how its buttons switch or close menus in one click. Wire it with three bindings: set `softDismiss`, bind `open` to a flag you keep, and reset that flag on `close`. The button that opens the menu needs no wiring of its own: flip the flag from its click. Leave it off to show and hide the menu yourself. */
|
|
8
|
+
softDismiss?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the menu is showing. Bind it to a flag you keep rather than toggling it from the menu's own value: when the menu closes itself, `open` is written back to `false` before the button's click reaches your handler, so `menu.open = !menu.open` gets out of step. Reset the flag on `close`.
|
|
11
|
+
*
|
|
12
|
+
* Available when `softDismiss==true`.
|
|
13
|
+
*/
|
|
14
|
+
open?: boolean;
|
|
15
|
+
/** Title of the menu; "Diagnostics" when left empty. */
|
|
16
|
+
menuTitle?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Enables the "ACK all visible" button; set it while a row in view can be acknowledged.
|
|
19
|
+
*
|
|
20
|
+
* Available when `showAckAllButton==true`.
|
|
21
|
+
*/
|
|
22
|
+
canAckAll?: boolean;
|
|
23
|
+
/** Shows the "ACK all visible" button in the footer. */
|
|
24
|
+
showAckAllButton?: boolean;
|
|
25
|
+
/** Shows the "Diagnostics list" button in the footer. */
|
|
26
|
+
showDiagnosticListButton?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface Events {
|
|
29
|
+
onAckAllVisibleClick?: (event: ObcDiagnosticMenuAckAllVisibleClickEvent) => void;
|
|
30
|
+
onGoToDiagnosticListClick?: (event: CustomEvent<void>) => void;
|
|
31
|
+
onClose?: (event: CustomEvent<void>) => void;
|
|
32
|
+
}
|
|
33
|
+
export interface Slots {
|
|
34
|
+
children?: Snippet;
|
|
35
|
+
emptyTitle?: Snippet;
|
|
36
|
+
emptyDescription?: Snippet;
|
|
37
|
+
emptyIcon?: Snippet;
|
|
38
|
+
}
|
|
39
|
+
type $$ComponentProps = Props & Events & Slots;
|
|
40
|
+
declare const ObcDiagnosticMenu: import("svelte").Component<$$ComponentProps, {
|
|
41
|
+
ObcDiagnosticMenuAckAllVisibleClickEvent: typeof ObcDiagnosticMenuAckAllVisibleClickEvent;
|
|
42
|
+
}, "">;
|
|
43
|
+
type ObcDiagnosticMenu = ReturnType<typeof ObcDiagnosticMenu>;
|
|
44
|
+
export default ObcDiagnosticMenu;
|
|
@@ -118,9 +118,10 @@ import type {ObcTopBarMenuButtonIcon} from '@oicl/openbridge-webcomponents/dist/
|
|
|
118
118
|
commandButton?: Snippet;
|
|
119
119
|
assetPicker?: Snippet;
|
|
120
120
|
alerts?: Snippet;
|
|
121
|
+
diagnostics?: Snippet;
|
|
121
122
|
clock?: Snippet
|
|
122
123
|
}
|
|
123
|
-
const {onMenuButtonClicked, onDimmingButtonClicked, onAppsButtonClicked, onMoreButtonClicked, onLeftMoreButtonClicked, onUserButtonClicked, onClose, onBack, onEmergencyBrightnessStart, onEmergencyBrightnessStop, onBreadcrumbClick, class: className, style, appIcon, commandButton, assetPicker, alerts, clock, ...props} = $props<Props & Events & Slots>();
|
|
124
|
+
const {onMenuButtonClicked, onDimmingButtonClicked, onAppsButtonClicked, onMoreButtonClicked, onLeftMoreButtonClicked, onUserButtonClicked, onClose, onBack, onEmergencyBrightnessStart, onEmergencyBrightnessStop, onBreadcrumbClick, class: className, style, appIcon, commandButton, assetPicker, alerts, diagnostics, clock, ...props} = $props<Props & Events & Slots>();
|
|
124
125
|
|
|
125
126
|
|
|
126
127
|
</script>
|
|
@@ -147,6 +148,10 @@ import type {ObcTopBarMenuButtonIcon} from '@oicl/openbridge-webcomponents/dist/
|
|
|
147
148
|
<NamedSlot name="alerts" content={alerts} />
|
|
148
149
|
{/if}
|
|
149
150
|
|
|
151
|
+
{#if diagnostics}
|
|
152
|
+
<NamedSlot name="diagnostics" content={diagnostics} />
|
|
153
|
+
{/if}
|
|
154
|
+
|
|
150
155
|
{#if clock}
|
|
151
156
|
<NamedSlot name="clock" content={clock} />
|
|
152
157
|
{/if}
|
package/dist/index.d.ts
CHANGED
|
@@ -45,6 +45,8 @@ export { default as ObcDigitalThreewayValve } from './automation/digital-threewa
|
|
|
45
45
|
export { default as ObcDigitalValve } from './automation/digital-valve/ObcDigitalValve.svelte';
|
|
46
46
|
export { default as ObcDiodes } from './automation/diodes/ObcDiodes.svelte';
|
|
47
47
|
export { default as ObcDirectionLine } from './automation/direction-line/ObcDirectionLine.svelte';
|
|
48
|
+
export { default as ObcDirectionValveBase } from './automation/direction-valve-shared/ObcDirectionValveBase.svelte';
|
|
49
|
+
export { default as ObcPressureValveBase } from './automation/direction-valve-shared/ObcPressureValveBase.svelte';
|
|
48
50
|
export { default as ObcEndPointLine } from './automation/end-point-line/ObcEndPointLine.svelte';
|
|
49
51
|
export { default as ObcFan } from './automation/fan/ObcFan.svelte';
|
|
50
52
|
export { default as ObcFilter } from './automation/filter/ObcFilter.svelte';
|
|
@@ -68,6 +70,9 @@ export { default as ObcLineOverlap } from './automation/line-overlap/ObcLineOver
|
|
|
68
70
|
export { default as ObcLogic } from './automation/logic/ObcLogic.svelte';
|
|
69
71
|
export { default as ObcMosfet } from './automation/mosfet/ObcMosfet.svelte';
|
|
70
72
|
export { default as ObcMotor } from './automation/motor/ObcMotor.svelte';
|
|
73
|
+
export { default as ObcNonReturnValve } from './automation/non-return-valve/ObcNonReturnValve.svelte';
|
|
74
|
+
export { default as ObcPressureReductionValve } from './automation/pressure-reduction-valve/ObcPressureReductionValve.svelte';
|
|
75
|
+
export { default as ObcPressureSustainValve } from './automation/pressure-sustain-valve/ObcPressureSustainValve.svelte';
|
|
71
76
|
export { default as ObcPump } from './automation/pump/ObcPump.svelte';
|
|
72
77
|
export { default as ObcResistor } from './automation/resistor/ObcResistor.svelte';
|
|
73
78
|
export { default as ObcRouter } from './automation/router/ObcRouter.svelte';
|
|
@@ -115,6 +120,7 @@ export { default as ObcAlertListDetails } from './components/alert-list-details/
|
|
|
115
120
|
export { default as ObcAlertListDetailsExperimental } from './components/alert-list-details-experimental/ObcAlertListDetailsExperimental.svelte';
|
|
116
121
|
export { default as ObcAlertMenu } from './components/alert-menu/ObcAlertMenu.svelte';
|
|
117
122
|
export { default as ObcAlertMenuItem } from './components/alert-menu-item/ObcAlertMenuItem.svelte';
|
|
123
|
+
export { default as ObcAlertSubsystemButton } from './components/alert-subsystem-button/ObcAlertSubsystemButton.svelte';
|
|
118
124
|
export { default as ObcAlertSubsystemCounter } from './components/alert-subsystem-counter/ObcAlertSubsystemCounter.svelte';
|
|
119
125
|
export { default as ObcAppButton } from './components/app-button/ObcAppButton.svelte';
|
|
120
126
|
export { default as ObcAppMenu } from './components/app-menu/ObcAppMenu.svelte';
|
|
@@ -140,6 +146,8 @@ export { default as ObcCommandMenu } from './components/command-menu/ObcCommandM
|
|
|
140
146
|
export { default as ObcCommunicationTable } from './components/communication-table/ObcCommunicationTable.svelte';
|
|
141
147
|
export { default as ObcContextMenuInput } from './components/context-menu-input/ObcContextMenuInput.svelte';
|
|
142
148
|
export { default as ObcDateItem } from './components/date-item/ObcDateItem.svelte';
|
|
149
|
+
export { default as ObcDiagnosticButton } from './components/diagnostic-button/ObcDiagnosticButton.svelte';
|
|
150
|
+
export { default as ObcDiagnosticMenu } from './components/diagnostic-menu/ObcDiagnosticMenu.svelte';
|
|
143
151
|
export { default as ObcDivider } from './components/divider/ObcDivider.svelte';
|
|
144
152
|
export { default as ObcDropdownButton } from './components/dropdown-button/ObcDropdownButton.svelte';
|
|
145
153
|
export { default as ObcElevatedCard } from './components/elevated-card/ObcElevatedCard.svelte';
|
package/dist/index.js
CHANGED
|
@@ -45,6 +45,8 @@ export { default as ObcDigitalThreewayValve } from './automation/digital-threewa
|
|
|
45
45
|
export { default as ObcDigitalValve } from './automation/digital-valve/ObcDigitalValve.svelte';
|
|
46
46
|
export { default as ObcDiodes } from './automation/diodes/ObcDiodes.svelte';
|
|
47
47
|
export { default as ObcDirectionLine } from './automation/direction-line/ObcDirectionLine.svelte';
|
|
48
|
+
export { default as ObcDirectionValveBase } from './automation/direction-valve-shared/ObcDirectionValveBase.svelte';
|
|
49
|
+
export { default as ObcPressureValveBase } from './automation/direction-valve-shared/ObcPressureValveBase.svelte';
|
|
48
50
|
export { default as ObcEndPointLine } from './automation/end-point-line/ObcEndPointLine.svelte';
|
|
49
51
|
export { default as ObcFan } from './automation/fan/ObcFan.svelte';
|
|
50
52
|
export { default as ObcFilter } from './automation/filter/ObcFilter.svelte';
|
|
@@ -68,6 +70,9 @@ export { default as ObcLineOverlap } from './automation/line-overlap/ObcLineOver
|
|
|
68
70
|
export { default as ObcLogic } from './automation/logic/ObcLogic.svelte';
|
|
69
71
|
export { default as ObcMosfet } from './automation/mosfet/ObcMosfet.svelte';
|
|
70
72
|
export { default as ObcMotor } from './automation/motor/ObcMotor.svelte';
|
|
73
|
+
export { default as ObcNonReturnValve } from './automation/non-return-valve/ObcNonReturnValve.svelte';
|
|
74
|
+
export { default as ObcPressureReductionValve } from './automation/pressure-reduction-valve/ObcPressureReductionValve.svelte';
|
|
75
|
+
export { default as ObcPressureSustainValve } from './automation/pressure-sustain-valve/ObcPressureSustainValve.svelte';
|
|
71
76
|
export { default as ObcPump } from './automation/pump/ObcPump.svelte';
|
|
72
77
|
export { default as ObcResistor } from './automation/resistor/ObcResistor.svelte';
|
|
73
78
|
export { default as ObcRouter } from './automation/router/ObcRouter.svelte';
|
|
@@ -115,6 +120,7 @@ export { default as ObcAlertListDetails } from './components/alert-list-details/
|
|
|
115
120
|
export { default as ObcAlertListDetailsExperimental } from './components/alert-list-details-experimental/ObcAlertListDetailsExperimental.svelte';
|
|
116
121
|
export { default as ObcAlertMenu } from './components/alert-menu/ObcAlertMenu.svelte';
|
|
117
122
|
export { default as ObcAlertMenuItem } from './components/alert-menu-item/ObcAlertMenuItem.svelte';
|
|
123
|
+
export { default as ObcAlertSubsystemButton } from './components/alert-subsystem-button/ObcAlertSubsystemButton.svelte';
|
|
118
124
|
export { default as ObcAlertSubsystemCounter } from './components/alert-subsystem-counter/ObcAlertSubsystemCounter.svelte';
|
|
119
125
|
export { default as ObcAppButton } from './components/app-button/ObcAppButton.svelte';
|
|
120
126
|
export { default as ObcAppMenu } from './components/app-menu/ObcAppMenu.svelte';
|
|
@@ -140,6 +146,8 @@ export { default as ObcCommandMenu } from './components/command-menu/ObcCommandM
|
|
|
140
146
|
export { default as ObcCommunicationTable } from './components/communication-table/ObcCommunicationTable.svelte';
|
|
141
147
|
export { default as ObcContextMenuInput } from './components/context-menu-input/ObcContextMenuInput.svelte';
|
|
142
148
|
export { default as ObcDateItem } from './components/date-item/ObcDateItem.svelte';
|
|
149
|
+
export { default as ObcDiagnosticButton } from './components/diagnostic-button/ObcDiagnosticButton.svelte';
|
|
150
|
+
export { default as ObcDiagnosticMenu } from './components/diagnostic-menu/ObcDiagnosticMenu.svelte';
|
|
143
151
|
export { default as ObcDivider } from './components/divider/ObcDivider.svelte';
|
|
144
152
|
export { default as ObcDropdownButton } from './components/dropdown-button/ObcDropdownButton.svelte';
|
|
145
153
|
export { default as ObcElevatedCard } from './components/elevated-card/ObcElevatedCard.svelte';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oicl/openbridge-webcomponents-svelte",
|
|
3
|
-
"version": "2.2.0-next.
|
|
3
|
+
"version": "2.2.0-next.7",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && npm run prepack",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@oicl/openbridge-webcomponents": "^2.2.0-next.
|
|
37
|
+
"@oicl/openbridge-webcomponents": "^2.2.0-next.7"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"svelte": "^5.0.0"
|