@oicl/openbridge-webcomponents-svelte 2.0.0-next.154 → 2.0.0-next.155
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.
|
@@ -37,7 +37,13 @@ initials?: string;
|
|
|
37
37
|
*
|
|
38
38
|
* Available when `static==false`.
|
|
39
39
|
*/
|
|
40
|
-
label?: string | undefined
|
|
40
|
+
label?: string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Optional second line under the label, for a secondary detail such as a role (not shown in static mode).
|
|
43
|
+
*
|
|
44
|
+
* Available when `static==false`.
|
|
45
|
+
*/
|
|
46
|
+
sublabel?: string | undefined
|
|
41
47
|
}
|
|
42
48
|
export interface Events {
|
|
43
49
|
|
|
@@ -32,6 +32,12 @@ export interface Props {
|
|
|
32
32
|
* Available when `static==false`.
|
|
33
33
|
*/
|
|
34
34
|
label?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Optional second line under the label, for a secondary detail such as a role (not shown in static mode).
|
|
37
|
+
*
|
|
38
|
+
* Available when `static==false`.
|
|
39
|
+
*/
|
|
40
|
+
sublabel?: string | undefined;
|
|
35
41
|
}
|
|
36
42
|
export interface Events {
|
|
37
43
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
<script lang="ts">
|
|
3
|
-
export type {ObcUserMenuType, ObcUserMenuSize, ObcUserMenuUser, ObcUserMenuSignedInAction} from '@oicl/openbridge-webcomponents/dist/components/user-menu/user-menu.js';
|
|
3
|
+
export type {ObcUserMenuRecentUserClickEvent, ObcUserMenuType, ObcUserMenuSize, ObcUserMenuUser, ObcUserMenuSignedInAction} from '@oicl/openbridge-webcomponents/dist/components/user-menu/user-menu.js';
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/components/user-menu/user-menu.js';
|
|
5
5
|
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
6
|
import NamedSlot from "../../NamedSlot.svelte";
|
|
7
|
-
import type {ObcUserMenuType, ObcUserMenuSize, ObcUserMenuUser, ObcUserMenuSignedInAction} from '@oicl/openbridge-webcomponents/dist/components/user-menu/user-menu.js';
|
|
7
|
+
import type {ObcUserMenuRecentUserClickEvent, ObcUserMenuType, ObcUserMenuSize, ObcUserMenuUser, ObcUserMenuSignedInAction} from '@oicl/openbridge-webcomponents/dist/components/user-menu/user-menu.js';
|
|
8
8
|
import type { Snippet } from 'svelte';
|
|
9
9
|
|
|
10
10
|
export interface Props {
|
|
@@ -68,6 +68,12 @@
|
|
|
68
68
|
* Available when `type!=signIn`.
|
|
69
69
|
*/
|
|
70
70
|
userLabel?: string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Role shown under the primary user's label; omit it to show no role.
|
|
73
|
+
*
|
|
74
|
+
* Available when `type!=signIn && size==regular`.
|
|
75
|
+
*/
|
|
76
|
+
userRole?: string | undefined;
|
|
71
77
|
/** Recent users for the "Recently signed in" section. */
|
|
72
78
|
recentUsers?: ObcUserMenuUser[];
|
|
73
79
|
/**
|
|
@@ -81,18 +87,25 @@
|
|
|
81
87
|
*
|
|
82
88
|
* Available when `type==signedIn && size==small`.
|
|
83
89
|
*/
|
|
84
|
-
primaryActionId?: string | undefined
|
|
90
|
+
primaryActionId?: string | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Controls the visibility of the "Use another account" button.
|
|
93
|
+
*
|
|
94
|
+
* Available when `type==userSignIn`.
|
|
95
|
+
*/
|
|
96
|
+
showUseAnotherAccount?: boolean
|
|
85
97
|
}
|
|
86
98
|
export interface Events {
|
|
87
99
|
onSignInClick?: (event: CustomEvent<{username?: string, password?: string}>) => void;
|
|
88
100
|
onSignOutClick?: (event: CustomEvent<void>) => void;
|
|
101
|
+
onUseAnotherAccountClick?: (event: CustomEvent<void>) => void;
|
|
89
102
|
onSignedInActionClick?: (event: CustomEvent<{id: string, label: string}>) => void;
|
|
90
|
-
onRecentUserClick?: (event:
|
|
103
|
+
onRecentUserClick?: (event: ObcUserMenuRecentUserClickEvent) => void
|
|
91
104
|
}
|
|
92
105
|
export interface Slots {
|
|
93
106
|
signedInActionIcon?: Snippet<[any]>
|
|
94
107
|
}
|
|
95
|
-
const {onSignInClick, onSignOutClick, onSignedInActionClick, onRecentUserClick, class: className, style, signedInActionIcon, ...props} = $props<Props & Events & Slots>();
|
|
108
|
+
const {onSignInClick, onSignOutClick, onUseAnotherAccountClick, onSignedInActionClick, onRecentUserClick, class: className, style, signedInActionIcon, ...props} = $props<Props & Events & Slots>();
|
|
96
109
|
|
|
97
110
|
|
|
98
111
|
</script>
|
|
@@ -101,7 +114,7 @@
|
|
|
101
114
|
|
|
102
115
|
class={className}
|
|
103
116
|
style={style}
|
|
104
|
-
use:forwardEvents={{'sign-in-click': onSignInClick, 'sign-out-click': onSignOutClick, 'signed-in-action-click': onSignedInActionClick, 'recent-user-click': onRecentUserClick}} >
|
|
117
|
+
use:forwardEvents={{'sign-in-click': onSignInClick, 'sign-out-click': onSignOutClick, 'use-another-account-click': onUseAnotherAccountClick, 'signed-in-action-click': onSignedInActionClick, 'recent-user-click': onRecentUserClick}} >
|
|
105
118
|
|
|
106
119
|
{#if signedInActionIcon}
|
|
107
120
|
<NamedSlot name="signed-in-action-icon-<id>" content={signedInActionIcon} />
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@oicl/openbridge-webcomponents/dist/components/user-menu/user-menu.js';
|
|
2
|
-
import type { ObcUserMenuType, ObcUserMenuSize, ObcUserMenuUser, ObcUserMenuSignedInAction } from '@oicl/openbridge-webcomponents/dist/components/user-menu/user-menu.js';
|
|
2
|
+
import type { ObcUserMenuRecentUserClickEvent, ObcUserMenuType, ObcUserMenuSize, ObcUserMenuUser, ObcUserMenuSignedInAction } from '@oicl/openbridge-webcomponents/dist/components/user-menu/user-menu.js';
|
|
3
3
|
import type { Snippet } from 'svelte';
|
|
4
4
|
export interface Props {
|
|
5
5
|
class?: string;
|
|
@@ -62,6 +62,12 @@ export interface Props {
|
|
|
62
62
|
* Available when `type!=signIn`.
|
|
63
63
|
*/
|
|
64
64
|
userLabel?: string | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Role shown under the primary user's label; omit it to show no role.
|
|
67
|
+
*
|
|
68
|
+
* Available when `type!=signIn && size==regular`.
|
|
69
|
+
*/
|
|
70
|
+
userRole?: string | undefined;
|
|
65
71
|
/** Recent users for the "Recently signed in" section. */
|
|
66
72
|
recentUsers?: ObcUserMenuUser[];
|
|
67
73
|
/**
|
|
@@ -76,6 +82,12 @@ export interface Props {
|
|
|
76
82
|
* Available when `type==signedIn && size==small`.
|
|
77
83
|
*/
|
|
78
84
|
primaryActionId?: string | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Controls the visibility of the "Use another account" button.
|
|
87
|
+
*
|
|
88
|
+
* Available when `type==userSignIn`.
|
|
89
|
+
*/
|
|
90
|
+
showUseAnotherAccount?: boolean;
|
|
79
91
|
}
|
|
80
92
|
export interface Events {
|
|
81
93
|
onSignInClick?: (event: CustomEvent<{
|
|
@@ -83,20 +95,19 @@ export interface Events {
|
|
|
83
95
|
password?: string;
|
|
84
96
|
}>) => void;
|
|
85
97
|
onSignOutClick?: (event: CustomEvent<void>) => void;
|
|
98
|
+
onUseAnotherAccountClick?: (event: CustomEvent<void>) => void;
|
|
86
99
|
onSignedInActionClick?: (event: CustomEvent<{
|
|
87
100
|
id: string;
|
|
88
101
|
label: string;
|
|
89
102
|
}>) => void;
|
|
90
|
-
onRecentUserClick?: (event:
|
|
91
|
-
initials: string;
|
|
92
|
-
label: string;
|
|
93
|
-
}>) => void;
|
|
103
|
+
onRecentUserClick?: (event: ObcUserMenuRecentUserClickEvent) => void;
|
|
94
104
|
}
|
|
95
105
|
export interface Slots {
|
|
96
106
|
signedInActionIcon?: Snippet<[any]>;
|
|
97
107
|
}
|
|
98
108
|
type $$ComponentProps = Props & Events & Slots;
|
|
99
109
|
declare const ObcUserMenu: import("svelte").Component<$$ComponentProps, {
|
|
110
|
+
ObcUserMenuRecentUserClickEvent: typeof ObcUserMenuRecentUserClickEvent;
|
|
100
111
|
ObcUserMenuType: typeof ObcUserMenuType;
|
|
101
112
|
ObcUserMenuSize: typeof ObcUserMenuSize;
|
|
102
113
|
ObcUserMenuUser: typeof ObcUserMenuUser;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oicl/openbridge-webcomponents-svelte",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.155",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && npm run prepack",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@oicl/openbridge-webcomponents": "^2.0.0-next.
|
|
34
|
+
"@oicl/openbridge-webcomponents": "^2.0.0-next.155"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"svelte": "^5.0.0"
|