@skysoftware-co/bayan-core-widgets-ui 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -23,13 +23,13 @@ npm install @skysoftware-co/bayan-core-widgets-ui
23
23
  ```html
24
24
  <bayan-core-top-menu-widget
25
25
  [baseUrl]="appBaseUrl"
26
+ [systemModule]="systemModule"
26
27
  [sidebarCollapsed]="sidebarCollapsed"
27
28
  [homeUrl]="homeUrl"
28
29
  [logoUrl]="logoUrl"
29
30
  [collapsedLogoUrl]="collapsedLogoUrl"
30
31
  [menuItems]="menuItems"
31
32
  [searchItems]="searchItems"
32
- [userPanel]="userPanel"
33
33
  [nameModeItems]="nameModeItems"
34
34
  [showGlobalSearch]="true"
35
35
  [showUserPanel]="true"
@@ -42,7 +42,7 @@ npm install @skysoftware-co/bayan-core-widgets-ui
42
42
  (menuItemClick)="onMenuItemClick($event)"
43
43
  (searchSubmit)="onSearchSubmit($event)"
44
44
  (searchItemNavigate)="onSearchItemNavigate($event)"
45
- (propertyChange)="onPropertyChange($event)"
45
+ (propertyChanged)="onPropertyChange($event)"
46
46
  (signOutClick)="onSignOut()"
47
47
  (submitPasswordChange)="onSubmitPasswordChange($event)">
48
48
  </bayan-core-top-menu-widget>
@@ -67,21 +67,6 @@ interface TopMenuWidgetSearchItem {
67
67
  isTranslatable?: boolean;
68
68
  }
69
69
 
70
- interface TopMenuWidgetPropertyOption {
71
- propertyId: number;
72
- propertyName: string;
73
- }
74
-
75
- interface TopMenuWidgetUserPanel {
76
- userDisplayName: string;
77
- activePropertyId: number | null;
78
- activePropertyName: string;
79
- properties: TopMenuWidgetPropertyOption[];
80
- isSsoLogin?: boolean;
81
- photoPath?: string | null;
82
- nameInitials?: string | null;
83
- }
84
-
85
70
  interface TopMenuWidgetNameModeItem {
86
71
  id: string;
87
72
  text: string;
@@ -125,6 +110,7 @@ Selector: `bayan-core-top-menu-widget`
125
110
  | Name | Type | Default | Description |
126
111
  |---|---|---|---|
127
112
  | `baseUrl` | `string` | `''` | Base URL used to resolve internal and external navigation targets. |
113
+ | `systemModule` | `SystemModule \| null` | `null` | Current system module context. |
128
114
  | `sidebarCollapsed` | `boolean` | `false` | Switches the brand area to the collapsed logo state. |
129
115
  | `homeUrl` | `string \| null` | `null` | Brand navigation target. |
130
116
  | `logoUrl` | `string` | Bayan CDN URL | Expanded logo source. |
@@ -132,7 +118,6 @@ Selector: `bayan-core-top-menu-widget`
132
118
  | `searchPlaceholder` | `string` | `'TopMenu.SearchPlaceholder'` | Search placeholder text or translation key. |
133
119
  | `menuItems` | `TopMenuWidgetItem[]` | `[]` | Top-level navigation items. |
134
120
  | `searchItems` | `TopMenuWidgetSearchItem[]` | `[]` | Autocomplete items for global search. |
135
- | `userPanel` | `TopMenuWidgetUserPanel \| null` | `null` | Current user data and available properties. |
136
121
  | `isSsoLogin` | `boolean` | `false` | Fallback SSO flag when the user panel does not provide one. |
137
122
  | `useAlternateNames` | `boolean` | `false` | Enables alternate-names behavior in settings. |
138
123
  | `displayAlternateNames` | `boolean` | `false` | Marks alternate names as active. |
@@ -167,7 +152,7 @@ Selector: `bayan-core-top-menu-widget`
167
152
  | `menuItemClick` | `EventEmitter<TopMenuWidgetItem>` | Fired when a leaf menu item is activated. |
168
153
  | `searchSubmit` | `EventEmitter<string>` | Fired when free-text search is submitted. |
169
154
  | `searchItemNavigate` | `EventEmitter<TopMenuWidgetSearchItem>` | Fired when an autocomplete result is chosen. |
170
- | `propertyChange` | `EventEmitter<TopMenuWidgetPropertyOption>` | Fired when the active property changes. |
155
+ | `propertyChanged` | `EventEmitter<PropertyOption>` | Fired when the active property changes. |
171
156
  | `signOutClick` | `EventEmitter<void>` | Fired when sign out is requested. |
172
157
  | `alternateNamesChange` | `EventEmitter<void>` | Fired when alternate names are toggled. |
173
158
  | `nameModeChange` | `EventEmitter<number>` | Fired when a name mode item is selected. |
@@ -195,6 +180,7 @@ Inputs:
195
180
  | Name | Type | Default | Description |
196
181
  |---|---|---|---|
197
182
  | `baseUrl` | `string` | `''` | Base URL used to resolve selected item URLs. |
183
+ | `ActivePropertyChanged` | `boolean` | `false` | Boolean change token used to reset the search input after a property switch. |
198
184
  | `placeholder` | `string` | `'TopMenu.SearchPlaceholder'` | Placeholder text or translation key. |
199
185
  | `dataSource` | `TopMenuWidgetSearchItem[]` | `[]` | Search results shown in the autocomplete. |
200
186
 
@@ -214,6 +200,7 @@ Inputs:
214
200
  | Name | Type | Default | Description |
215
201
  |---|---|---|---|
216
202
  | `baseUrl` | `string` | `''` | Base URL used to resolve item URLs. |
203
+ | `ActivePropertyChanged` | `boolean` | `false` | Boolean change token used to close open menu branches after a property switch. |
217
204
  | `item` | `TopMenuWidgetItem` | required | Menu item to render. |
218
205
 
219
206
  Outputs:
@@ -247,6 +234,7 @@ Inputs:
247
234
 
248
235
  | Name | Type | Default | Description |
249
236
  |---|---|---|---|
237
+ | `ActivePropertyChanged` | `boolean` | `false` | Boolean change token used to close the settings menu after a property switch. |
250
238
  | `useAlternateNames` | `boolean` | `false` | Enables alternate names behavior. |
251
239
  | `displayAlternateNames` | `boolean` | `false` | Marks alternate names as active. |
252
240
  | `hrBlocked` | `boolean` | `false` | Current HR block state. |
@@ -277,15 +265,30 @@ Inputs:
277
265
 
278
266
  | Name | Type | Default | Description |
279
267
  |---|---|---|---|
280
- | `baseUrl` | `string` | `''` | Reserved for consistency with the top-menu contract. |
281
- | `userPanel` | `TopMenuWidgetUserPanel \| null` | `null` | Current user and property data. |
282
- | `isSsoLogin` | `boolean` | `false` | Fallback SSO flag when `userPanel.isSsoLogin` is not present. |
268
+ | `baseUrl` | `string` | `''` | Base URL used to load the current user panel and to switch the active property. |
269
+ | `wrapperClass` | `string` | `'menu-dropdown-host'` | Wrapper CSS classes. |
270
+ | `dropdownOpenClass` | `string` | `'open'` | CSS class added while the dropdown is open. |
271
+ | `toggleButtonClass` | `string` | `'employee-toggle'` | Toggle button CSS classes. |
272
+ | `employeeInfoClass` | `string` | `'employee-info'` | Employee info wrapper CSS classes. |
273
+ | `userNameClass` | `string` | `'user-name'` | User name text CSS classes. |
274
+ | `propertyNameClass` | `string` | `'property-name'` | Active property text CSS classes. |
275
+ | `caretClass` | `string` | `'employee-caret'` | Caret CSS classes. |
276
+ | `menuClass` | `string` | `'employee-menu menu-dropdown-panel'` | Dropdown menu CSS classes. |
277
+ | `sectionLabelClass` | `string` | `'menu-section-label'` | Section label CSS classes. |
278
+ | `menuItemClass` | `string` | `'menu-item'` | Property row CSS classes. |
279
+ | `menuItemActiveClass` | `string` | `'menu-item-active'` | Active property CSS class. |
280
+ | `indicatorClass` | `string` | `'menu-indicator'` | Selection indicator CSS classes. |
281
+ | `invisibleIndicatorClass` | `string` | `'invisible'` | Hidden indicator CSS class. |
282
+ | `dividerClass` | `string` | `'menu-divider'` | Divider CSS classes. |
283
+ | `signOutButtonClass` | `string` | `'menu-item menu-item-signout'` | Sign-out button CSS classes. |
284
+ | `showSignOutIcon` | `boolean` | `true` | Shows or hides the sign-out icon. |
285
+ | `signOutIconClass` | `string` | `'mx-2'` | Sign-out icon CSS classes. |
283
286
 
284
287
  Outputs:
285
288
 
286
289
  | Name | Type | Description |
287
290
  |---|---|---|
288
- | `propertyChange` | `EventEmitter<TopMenuWidgetPropertyOption>` | Fired when the active property changes. |
291
+ | `propertyChanged` | `EventEmitter<PropertyOption>` | Fired after `switchProperty` succeeds and the widget refetches the user panel. |
289
292
  | `signOutClick` | `EventEmitter<void>` | Fired when sign out is requested. |
290
293
 
291
294
  ### Change Password Widget