@zeedhi/zd-user-info-common 1.3.5 → 3.0.0

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.
@@ -1,134 +1,130 @@
1
- import { ComponentRender, IComponentRender } from '@zeedhi/common';
2
- import { IDictionary } from '@zeedhi/core';
3
- import { IUserInfo } from './interfaces';
4
- export declare class UserInfo extends ComponentRender implements IUserInfo {
5
- /**
6
- * Dropdown activator
7
- */
8
- activator: IComponentRender;
9
- /**
10
- * Props to be passed to the ZdAvatar component
11
- */
12
- avatarProps: IDictionary;
13
- /**
14
- * Components to be rendered on the bottom slot
15
- */
16
- bottomSlot: IComponentRender[];
17
- /**
18
- * Components to be rendered on the center slot
19
- */
20
- centerSlot: IComponentRender[];
21
- /**
22
- * Components to be rendered on the top slot
23
- */
24
- topSlot: IComponentRender[];
25
- /**
26
- * User name
27
- */
28
- user: string;
29
- /**
30
- * User image
31
- */
32
- userImage: string;
33
- /**
34
- * Designates if menu should close on outside-activator click.
35
- */
36
- closeOnClick: boolean;
37
- /**
38
- * Designates if menu should close when its content is clicked.
39
- */
40
- closeOnContentClick: boolean;
41
- /**
42
- * Applies position fixed to the dropdown.
43
- */
44
- fixed: boolean;
45
- /**
46
- * Components to be rendered on the menu header
47
- */
48
- headerSlot?: IComponentRender[];
49
- /**
50
- * Props to be passed to the ZdImage component (rendered inside the avatar)
51
- */
52
- imageProps?: IDictionary;
53
- /**
54
- * Offset the menu on the x-axis.
55
- */
56
- offsetX: boolean;
57
- /**
58
- * Offset the menu on the x-axis.
59
- */
60
- offsetY: boolean;
61
- /**
62
- * Designates whether menu should open on activator click.
63
- */
64
- openOnClick: boolean;
65
- /**
66
- * Designates whether menu should open on activator hover.
67
- */
68
- openOnHover: boolean;
69
- /**
70
- * Controls whether the component is visible or hidden.
71
- */
72
- value: boolean;
73
- visibleItems: IDictionary<boolean>;
74
- /**
75
- * Sets the height for the dropdown.
76
- */
77
- height?: number | string;
78
- /**
79
- * Sets the maximum height for the dropdown.
80
- */
81
- maxHeight?: number | string;
82
- /**
83
- * Sets the maximum width for the dropdown.
84
- */
85
- maxWidth?: number | string;
86
- /**
87
- * Sets the minimum height for the dropdown.
88
- */
89
- minHeight?: number | string;
90
- /**
91
- * Sets the minimum width for the dropdown.
92
- */
93
- minWidth?: number | string;
94
- protected propCenterSlot?: IComponentRender[];
95
- constructor(props: IUserInfo);
96
- protected getActivator(): {
97
- name: string;
98
- component: string;
99
- bottom: boolean;
100
- label: string;
101
- children: {
102
- name: string;
103
- component: string;
104
- avatarSlot: ({
105
- name: string;
106
- component: string;
107
- src: string;
108
- } | {
109
- name: string;
110
- component: string;
111
- src: string;
112
- })[];
113
- }[];
114
- };
115
- protected getCenterSlot(): {
116
- name: string;
117
- component: string;
118
- dense: boolean;
119
- items: {
120
- name: string;
121
- component: string;
122
- title: string;
123
- prependIcon: string;
124
- cssClass: string;
125
- isVisible: string;
126
- events: {
127
- click: ({ event, element }: any) => void;
128
- };
129
- }[];
130
- }[];
131
- onLogoutClick(event: Event, element: HTMLElement): void;
132
- onProfileChange(event: Event, element: HTMLElement): void;
133
- onCreated(): void;
134
- }
1
+ import { ComponentRender, IComponentRender } from '@zeedhi/common';
2
+ import { IDictionary } from '@zeedhi/core';
3
+ import { IUserInfo } from './interfaces';
4
+ export declare class UserInfo extends ComponentRender implements IUserInfo {
5
+ /**
6
+ * Dropdown activator
7
+ */
8
+ activator: IComponentRender;
9
+ /**
10
+ * Props to be passed to the ZdAvatar component
11
+ */
12
+ avatarProps: IDictionary;
13
+ /**
14
+ * Components to be rendered on the bottom slot
15
+ */
16
+ bottomSlot: IComponentRender[];
17
+ /**
18
+ * Components to be rendered on the center slot
19
+ */
20
+ centerSlot: IComponentRender[];
21
+ /**
22
+ * Components to be rendered on the top slot
23
+ */
24
+ topSlot: IComponentRender[];
25
+ /**
26
+ * User name
27
+ */
28
+ user: string;
29
+ /**
30
+ * User image
31
+ */
32
+ userImage: string;
33
+ /**
34
+ * Designates if menu should close on outside-activator click.
35
+ */
36
+ closeOnClick: boolean;
37
+ /**
38
+ * Designates if menu should close when its content is clicked.
39
+ */
40
+ closeOnContentClick: boolean;
41
+ /**
42
+ * Applies position fixed to the dropdown.
43
+ */
44
+ fixed: boolean;
45
+ /**
46
+ * Components to be rendered on the menu header
47
+ */
48
+ headerSlot?: IComponentRender[];
49
+ /**
50
+ * Props to be passed to the ZdImage component (rendered inside the avatar)
51
+ */
52
+ imageProps?: IDictionary;
53
+ /**
54
+ * Offset the menu on the x-axis.
55
+ */
56
+ offsetX: boolean;
57
+ /**
58
+ * Offset the menu on the x-axis.
59
+ */
60
+ offsetY: boolean;
61
+ /**
62
+ * Designates whether menu should open on activator click.
63
+ */
64
+ openOnClick: boolean;
65
+ /**
66
+ * Designates whether menu should open on activator hover.
67
+ */
68
+ openOnHover: boolean;
69
+ /**
70
+ * Controls whether the component is visible or hidden.
71
+ */
72
+ value: boolean;
73
+ visibleItems: IDictionary<boolean>;
74
+ /**
75
+ * Sets the height for the dropdown.
76
+ */
77
+ height?: number | string;
78
+ /**
79
+ * Sets the maximum height for the dropdown.
80
+ */
81
+ maxHeight?: number | string;
82
+ /**
83
+ * Sets the maximum width for the dropdown.
84
+ */
85
+ maxWidth?: number | string;
86
+ /**
87
+ * Sets the minimum height for the dropdown.
88
+ */
89
+ minHeight?: number | string;
90
+ /**
91
+ * Sets the minimum width for the dropdown.
92
+ */
93
+ minWidth?: number | string;
94
+ protected propCenterSlot?: IComponentRender[];
95
+ constructor(props: IUserInfo);
96
+ protected getActivator(): {
97
+ name: string;
98
+ component: string;
99
+ bottom: boolean;
100
+ label: string;
101
+ children: {
102
+ name: string;
103
+ component: string;
104
+ avatarSlot: {
105
+ name: string;
106
+ component: string;
107
+ src: string;
108
+ }[];
109
+ }[];
110
+ };
111
+ protected getCenterSlot(): {
112
+ name: string;
113
+ component: string;
114
+ dense: boolean;
115
+ items: {
116
+ name: string;
117
+ component: string;
118
+ title: string;
119
+ prependIcon: string;
120
+ cssClass: string;
121
+ isVisible: string;
122
+ events: {
123
+ click: ({ event, element }: any) => void;
124
+ };
125
+ }[];
126
+ }[];
127
+ onLogoutClick(event: Event, element: HTMLElement): void;
128
+ onProfileChange(event: Event, element: HTMLElement): void;
129
+ onCreated(): void;
130
+ }