@oicl/openbridge-webcomponents-svelte 2.2.0-next.1 → 2.2.0-next.3
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/components/alert-button/ObcAlertButton.svelte +8 -0
- package/dist/components/alert-button/ObcAlertButton.svelte.d.ts +8 -0
- package/dist/components/alert-button-item/ObcAlertButtonItem.svelte +8 -0
- package/dist/components/alert-button-item/ObcAlertButtonItem.svelte.d.ts +8 -0
- package/dist/components/alert-counter-item/ObcAlertCounterItem.svelte +1 -1
- package/dist/components/alert-counter-item/ObcAlertCounterItem.svelte.d.ts +1 -1
- package/dist/components/top-bar/ObcTopBar.svelte +6 -4
- package/dist/components/top-bar/ObcTopBar.svelte.d.ts +4 -2
- package/package.json +2 -2
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
export type {AlertType, AlertCounts, FlashingSpeed} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
4
4
|
export type {ObcAlertButtonType} from '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
5
|
+
export type {ObcAlertCounterItemType} from '@oicl/openbridge-webcomponents/dist/components/alert-counter-item/alert-counter-item.js';
|
|
5
6
|
import '@oicl/openbridge-webcomponents/dist/components/alert-button/alert-button.js';
|
|
6
7
|
import { setProperties, forwardEvents } from "../../util.js";
|
|
7
8
|
import type {AlertType, AlertCounts, FlashingSpeed} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
8
9
|
import type {ObcAlertButtonType} from '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
10
|
+
import type {ObcAlertCounterItemType} from '@oicl/openbridge-webcomponents/dist/components/alert-counter-item/alert-counter-item.js';
|
|
9
11
|
import type { Snippet } from 'svelte';
|
|
10
12
|
|
|
11
13
|
export interface Props {
|
|
@@ -31,6 +33,12 @@ import type {ObcAlertButtonType} from '@oicl/openbridge-webcomponents/dist/compo
|
|
|
31
33
|
counter?: boolean;
|
|
32
34
|
/** Shows the per-severity counts and the shelved count before the bell and the total (the item's global counter); a flat button shows the plain bell. */
|
|
33
35
|
globalCounter?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* How the global counter draws each count: `badges` (filled severity badges, default) or `alert-level` (the severity shape beside the count).
|
|
38
|
+
*
|
|
39
|
+
* Available when `globalCounter==true`.
|
|
40
|
+
*/
|
|
41
|
+
globalCounterType?: ObcAlertCounterItemType;
|
|
34
42
|
/**
|
|
35
43
|
* Alert count per severity for the global counter badges (`countAlarm`, `countWarning`, `countCaution` and the `level-*` counts).
|
|
36
44
|
*
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '@oicl/openbridge-webcomponents/dist/components/alert-button/alert-button.js';
|
|
2
2
|
import type { AlertType, AlertCounts, FlashingSpeed } from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
3
3
|
import type { ObcAlertButtonType } from '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
4
|
+
import type { ObcAlertCounterItemType } from '@oicl/openbridge-webcomponents/dist/components/alert-counter-item/alert-counter-item.js';
|
|
4
5
|
import type { Snippet } from 'svelte';
|
|
5
6
|
export interface Props {
|
|
6
7
|
class?: string;
|
|
@@ -25,6 +26,12 @@ export interface Props {
|
|
|
25
26
|
counter?: boolean;
|
|
26
27
|
/** Shows the per-severity counts and the shelved count before the bell and the total (the item's global counter); a flat button shows the plain bell. */
|
|
27
28
|
globalCounter?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* How the global counter draws each count: `badges` (filled severity badges, default) or `alert-level` (the severity shape beside the count).
|
|
31
|
+
*
|
|
32
|
+
* Available when `globalCounter==true`.
|
|
33
|
+
*/
|
|
34
|
+
globalCounterType?: ObcAlertCounterItemType;
|
|
28
35
|
/**
|
|
29
36
|
* Alert count per severity for the global counter badges (`countAlarm`, `countWarning`, `countCaution` and the `level-*` counts).
|
|
30
37
|
*
|
|
@@ -71,6 +78,7 @@ declare const ObcAlertButton: import("svelte").Component<$$ComponentProps, {
|
|
|
71
78
|
AlertCounts: typeof AlertCounts;
|
|
72
79
|
FlashingSpeed: typeof FlashingSpeed;
|
|
73
80
|
ObcAlertButtonType: typeof ObcAlertButtonType;
|
|
81
|
+
ObcAlertCounterItemType: typeof ObcAlertCounterItemType;
|
|
74
82
|
}, "">;
|
|
75
83
|
type ObcAlertButton = ReturnType<typeof ObcAlertButton>;
|
|
76
84
|
export default ObcAlertButton;
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
export type {ObcAlertButtonType} from '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
4
4
|
export type {AlertType, AlertCounts, FlashingSpeed} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
5
|
+
export type {ObcAlertCounterItemType} from '@oicl/openbridge-webcomponents/dist/components/alert-counter-item/alert-counter-item.js';
|
|
5
6
|
import '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
6
7
|
import { setProperties, forwardEvents } from "../../util.js";
|
|
7
8
|
import type {ObcAlertButtonType} from '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
8
9
|
import type {AlertType, AlertCounts, FlashingSpeed} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
10
|
+
import type {ObcAlertCounterItemType} from '@oicl/openbridge-webcomponents/dist/components/alert-counter-item/alert-counter-item.js';
|
|
9
11
|
import type { Snippet } from 'svelte';
|
|
10
12
|
|
|
11
13
|
export interface Props {
|
|
@@ -33,6 +35,12 @@ import type {AlertType, AlertCounts, FlashingSpeed} from '@oicl/openbridge-webco
|
|
|
33
35
|
counter?: boolean;
|
|
34
36
|
/** Shows the per-severity counts, the bell and the total instead of a single alert status. */
|
|
35
37
|
globalCounter?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* How the global counter draws each count: `badges` (filled severity badges, default) or `alert-level` (the severity shape beside the count).
|
|
40
|
+
*
|
|
41
|
+
* Available when `globalCounter==true`.
|
|
42
|
+
*/
|
|
43
|
+
globalCounterType?: ObcAlertCounterItemType;
|
|
36
44
|
/**
|
|
37
45
|
* Alert count per severity for the global counter badges.
|
|
38
46
|
*
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
2
2
|
import type { ObcAlertButtonType } from '@oicl/openbridge-webcomponents/dist/components/alert-button-item/alert-button-item.js';
|
|
3
3
|
import type { AlertType, AlertCounts, FlashingSpeed } from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
4
|
+
import type { ObcAlertCounterItemType } from '@oicl/openbridge-webcomponents/dist/components/alert-counter-item/alert-counter-item.js';
|
|
4
5
|
import type { Snippet } from 'svelte';
|
|
5
6
|
export interface Props {
|
|
6
7
|
class?: string;
|
|
@@ -27,6 +28,12 @@ export interface Props {
|
|
|
27
28
|
counter?: boolean;
|
|
28
29
|
/** Shows the per-severity counts, the bell and the total instead of a single alert status. */
|
|
29
30
|
globalCounter?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* How the global counter draws each count: `badges` (filled severity badges, default) or `alert-level` (the severity shape beside the count).
|
|
33
|
+
*
|
|
34
|
+
* Available when `globalCounter==true`.
|
|
35
|
+
*/
|
|
36
|
+
globalCounterType?: ObcAlertCounterItemType;
|
|
30
37
|
/**
|
|
31
38
|
* Alert count per severity for the global counter badges.
|
|
32
39
|
*
|
|
@@ -68,6 +75,7 @@ declare const ObcAlertButtonItem: import("svelte").Component<$$ComponentProps, {
|
|
|
68
75
|
AlertType: typeof AlertType;
|
|
69
76
|
AlertCounts: typeof AlertCounts;
|
|
70
77
|
FlashingSpeed: typeof FlashingSpeed;
|
|
78
|
+
ObcAlertCounterItemType: typeof ObcAlertCounterItemType;
|
|
71
79
|
}, "">;
|
|
72
80
|
type ObcAlertButtonItem = ReturnType<typeof ObcAlertButtonItem>;
|
|
73
81
|
export default ObcAlertButtonItem;
|
|
@@ -15,7 +15,7 @@ import type {AlertCounts} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
|
15
15
|
type?: ObcAlertCounterItemType;
|
|
16
16
|
/** Alert count per severity (`countAlarm`, `countWarning`, `countCaution` and the `level-*` counts); counts of zero or less are not shown. */
|
|
17
17
|
counts?: AlertCounts;
|
|
18
|
-
/** Number of shelved alerts, shown as a neutral badge after the severities; hidden at zero. */
|
|
18
|
+
/** Number of shelved alerts, shown as a neutral badge with the shelf icon after the severities; hidden at zero. */
|
|
19
19
|
shelvedCount?: number
|
|
20
20
|
}
|
|
21
21
|
export interface Events {
|
|
@@ -9,7 +9,7 @@ export interface Props {
|
|
|
9
9
|
type?: ObcAlertCounterItemType;
|
|
10
10
|
/** Alert count per severity (`countAlarm`, `countWarning`, `countCaution` and the `level-*` counts); counts of zero or less are not shown. */
|
|
11
11
|
counts?: AlertCounts;
|
|
12
|
-
/** Number of shelved alerts, shown as a neutral badge after the severities; hidden at zero. */
|
|
12
|
+
/** Number of shelved alerts, shown as a neutral badge with the shelf icon after the severities; hidden at zero. */
|
|
13
13
|
shelvedCount?: number;
|
|
14
14
|
}
|
|
15
15
|
export interface Events {
|
|
@@ -41,11 +41,12 @@ import type {ObcTopBarMenuButtonIcon} from '@oicl/openbridge-webcomponents/dist/
|
|
|
41
41
|
*/
|
|
42
42
|
appsButtonActivated?: boolean;
|
|
43
43
|
/**
|
|
44
|
-
* Highlights the
|
|
44
|
+
* Highlights the more button as active.
|
|
45
45
|
*
|
|
46
46
|
* Available when `inactive==false`.
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
moreButtonActivated?: boolean;
|
|
49
|
+
leftMoreButtonActivated?: boolean | undefined;
|
|
49
50
|
/**
|
|
50
51
|
* Highlights the user/profile button as active.
|
|
51
52
|
*
|
|
@@ -103,6 +104,7 @@ import type {ObcTopBarMenuButtonIcon} from '@oicl/openbridge-webcomponents/dist/
|
|
|
103
104
|
onMenuButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
104
105
|
onDimmingButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
105
106
|
onAppsButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
107
|
+
onMoreButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
106
108
|
onLeftMoreButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
107
109
|
onUserButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
108
110
|
onClose?: (event: CustomEvent<unknown>) => void;
|
|
@@ -117,7 +119,7 @@ import type {ObcTopBarMenuButtonIcon} from '@oicl/openbridge-webcomponents/dist/
|
|
|
117
119
|
alerts?: Snippet;
|
|
118
120
|
clock?: Snippet
|
|
119
121
|
}
|
|
120
|
-
const {onMenuButtonClicked, onDimmingButtonClicked, onAppsButtonClicked, onLeftMoreButtonClicked, onUserButtonClicked, onClose, onBack, onEmergencyBrightnessStart, onEmergencyBrightnessStop, onBreadcrumbClick, class: className, style, appIcon, commandButton, alerts, clock, ...props} = $props<Props & Events & Slots>();
|
|
122
|
+
const {onMenuButtonClicked, onDimmingButtonClicked, onAppsButtonClicked, onMoreButtonClicked, onLeftMoreButtonClicked, onUserButtonClicked, onClose, onBack, onEmergencyBrightnessStart, onEmergencyBrightnessStop, onBreadcrumbClick, class: className, style, appIcon, commandButton, alerts, clock, ...props} = $props<Props & Events & Slots>();
|
|
121
123
|
|
|
122
124
|
|
|
123
125
|
</script>
|
|
@@ -126,7 +128,7 @@ import type {ObcTopBarMenuButtonIcon} from '@oicl/openbridge-webcomponents/dist/
|
|
|
126
128
|
|
|
127
129
|
class={className}
|
|
128
130
|
style={style}
|
|
129
|
-
use:forwardEvents={{'menu-button-clicked': onMenuButtonClicked, 'dimming-button-clicked': onDimmingButtonClicked, 'apps-button-clicked': onAppsButtonClicked, 'left-more-button-clicked': onLeftMoreButtonClicked, 'user-button-clicked': onUserButtonClicked, 'close': onClose, 'back': onBack, 'emergency-brightness-start': onEmergencyBrightnessStart, 'emergency-brightness-stop': onEmergencyBrightnessStop, 'breadcrumb-click': onBreadcrumbClick}} >
|
|
131
|
+
use:forwardEvents={{'menu-button-clicked': onMenuButtonClicked, 'dimming-button-clicked': onDimmingButtonClicked, 'apps-button-clicked': onAppsButtonClicked, 'more-button-clicked': onMoreButtonClicked, 'left-more-button-clicked': onLeftMoreButtonClicked, 'user-button-clicked': onUserButtonClicked, 'close': onClose, 'back': onBack, 'emergency-brightness-start': onEmergencyBrightnessStart, 'emergency-brightness-stop': onEmergencyBrightnessStop, 'breadcrumb-click': onBreadcrumbClick}} >
|
|
130
132
|
|
|
131
133
|
{#if appIcon}
|
|
132
134
|
<NamedSlot name="app-icon" content={appIcon} />
|
|
@@ -34,11 +34,12 @@ export interface Props {
|
|
|
34
34
|
*/
|
|
35
35
|
appsButtonActivated?: boolean;
|
|
36
36
|
/**
|
|
37
|
-
* Highlights the
|
|
37
|
+
* Highlights the more button as active.
|
|
38
38
|
*
|
|
39
39
|
* Available when `inactive==false`.
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
moreButtonActivated?: boolean;
|
|
42
|
+
leftMoreButtonActivated?: boolean | undefined;
|
|
42
43
|
/**
|
|
43
44
|
* Highlights the user/profile button as active.
|
|
44
45
|
*
|
|
@@ -96,6 +97,7 @@ export interface Events {
|
|
|
96
97
|
onMenuButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
97
98
|
onDimmingButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
98
99
|
onAppsButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
100
|
+
onMoreButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
99
101
|
onLeftMoreButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
100
102
|
onUserButtonClicked?: (event: CustomEvent<unknown>) => void;
|
|
101
103
|
onClose?: (event: CustomEvent<unknown>) => void;
|
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.3",
|
|
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.3"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"svelte": "^5.0.0"
|