@rxap/layout 18.0.3-dev.1 → 18.1.0-dev.1
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/CHANGELOG.md +18 -0
- package/README.md +267 -1
- package/compodoc/changelog.html +16 -0
- package/compodoc/components/AppsButtonComponent.html +197 -153
- package/compodoc/components/BaseLayoutComponent.html +351 -0
- package/compodoc/components/DefaultHeaderComponent.html +545 -0
- package/compodoc/components/FooterComponent.html +58 -79
- package/compodoc/components/HeaderComponent.html +49 -294
- package/compodoc/components/LanguageSelectorComponent.html +6 -54
- package/compodoc/components/LayoutComponent.html +69 -464
- package/compodoc/components/MinimalLayoutComponent.html +349 -0
- package/compodoc/components/NavigationComponent.html +116 -312
- package/compodoc/components/NavigationItemComponent.html +130 -361
- package/compodoc/components/NavigationProgressBarComponent.html +41 -107
- package/compodoc/components/ReleaseInfoComponent.html +536 -0
- package/compodoc/components/SettingsButtonComponent.html +186 -225
- package/compodoc/components/SidenavComponent.html +566 -142
- package/compodoc/components/SidenavToggleButtonComponent.html +71 -91
- package/compodoc/components/SignOutComponent.html +7 -60
- package/compodoc/components/UserProfileIconComponent.html +97 -161
- package/compodoc/dependencies.html +9 -25
- package/compodoc/directives/FooterDirective-1.html +293 -0
- package/compodoc/directives/FooterDirective.html +8 -86
- package/compodoc/directives/HeaderDirective.html +293 -0
- package/compodoc/index.html +177 -2
- package/compodoc/injectables/ExternalAppsService.html +1311 -0
- package/compodoc/injectables/FooterService.html +573 -0
- package/compodoc/injectables/HeaderService.html +576 -0
- package/compodoc/injectables/LayoutService.html +899 -0
- package/compodoc/injectables/LogoService.html +411 -0
- package/compodoc/injectables/NavigationService.html +46 -57
- package/compodoc/interfaces/ReleaseInfoModule.html +385 -0
- package/compodoc/interfaces/SettingsMenuItem.html +385 -0
- package/compodoc/js/menu-wc.js +24 -40
- package/compodoc/js/menu-wc_es5.js +1 -1
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/miscellaneous/functions.html +532 -0
- package/compodoc/miscellaneous/typealiases.html +40 -2
- package/compodoc/miscellaneous/variables.html +123 -9
- package/compodoc/overview.html +2 -10
- package/compodoc/properties.html +1 -1
- package/docs/assets/highlight.css +42 -0
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/AppsButtonComponent.html +8 -8
- package/docs/classes/BaseLayoutComponent.html +2 -0
- package/docs/classes/DefaultHeaderComponent.html +7 -0
- package/docs/classes/ExternalAppsService.html +19 -0
- package/docs/classes/FooterComponent.html +5 -3
- package/docs/classes/FooterDirective.html +2 -2
- package/docs/classes/FooterService.html +14 -0
- package/docs/classes/HeaderComponent.html +6 -8
- package/docs/classes/HeaderDirective.html +8 -0
- package/docs/classes/HeaderService.html +14 -0
- package/docs/classes/LayoutComponent.html +4 -12
- package/docs/classes/LayoutService.html +20 -0
- package/docs/classes/LogoService.html +7 -0
- package/docs/classes/MinimalLayoutComponent.html +2 -0
- package/docs/classes/NavigationComponent.html +7 -8
- package/docs/classes/NavigationItemComponent.html +6 -9
- package/docs/classes/NavigationProgressBarComponent.html +3 -3
- package/docs/classes/NavigationService.html +3 -3
- package/docs/classes/ReleaseInfoComponent.html +6 -0
- package/docs/classes/SettingsButtonComponent.html +6 -11
- package/docs/classes/SidenavComponent.html +17 -5
- package/docs/classes/SidenavFooterDirective.html +2 -2
- package/docs/classes/SidenavHeaderDirective.html +2 -2
- package/docs/classes/SidenavToggleButtonComponent.html +4 -3
- package/docs/classes/UserProfileIconComponent.html +5 -4
- package/docs/documentation.json +9635 -9292
- package/docs/functions/IsNavigationDividerItem.html +1 -1
- package/docs/functions/IsNavigationInsertItem.html +1 -1
- package/docs/functions/IsNavigationItem.html +1 -1
- package/docs/functions/provideLayout.html +1 -0
- package/docs/functions/widthDefaultHeaderComponent.html +1 -0
- package/docs/functions/withExternalApps.html +1 -0
- package/docs/functions/withFooterComponents.html +1 -0
- package/docs/functions/withHeaderComponents.html +1 -0
- package/docs/functions/withNavigationConfig.html +1 -0
- package/docs/functions/withNavigationInserts.html +1 -0
- package/docs/functions/withReleaseInfoModules.html +1 -0
- package/docs/functions/withSettingsMenuItems.html +1 -0
- package/docs/index.html +65 -2
- package/docs/interfaces/NavigationDividerItem.html +2 -2
- package/docs/interfaces/NavigationInsertItem.html +2 -2
- package/docs/interfaces/NavigationItem.html +2 -2
- package/docs/interfaces/NavigationStatus.html +2 -2
- package/docs/interfaces/ReleaseInfoModule.html +4 -0
- package/docs/interfaces/SettingsMenuItem.html +4 -0
- package/docs/modules.html +31 -17
- package/docs/types/ExternalApp.html +1 -0
- package/docs/types/ExtractUsernameFromProfileFn.html +1 -1
- package/docs/types/Navigation.html +1 -1
- package/docs/types/NavigationWithInserts.html +1 -1
- package/docs/types/SettingsMenuItemComponent.html +1 -0
- package/docs/variables/EXTRACT_USERNAME_FROM_PROFILE.html +1 -1
- package/docs/variables/RXAP_EXTERNAL_APP.html +1 -0
- package/docs/variables/RXAP_EXTERNAL_APP_FILTER.html +1 -0
- package/docs/variables/RXAP_FOOTER_COMPONENT.html +1 -1
- package/docs/variables/RXAP_HEADER_COMPONENT.html +1 -1
- package/docs/variables/RXAP_LAYOUT_APPS_GRID.html +1 -1
- package/docs/variables/RXAP_LOGO_CONFIG.html +1 -1
- package/docs/variables/RXAP_NAVIGATION_CONFIG.html +1 -1
- package/docs/variables/RXAP_NAVIGATION_CONFIG_INSERTS.html +1 -1
- package/docs/variables/RXAP_RELEASE_INFO_MODULE.html +1 -0
- package/docs/variables/RXAP_SETTINGS_MENU_ITEM.html +1 -0
- package/docs/variables/RXAP_SETTINGS_MENU_ITEM_COMPONENT.html +1 -0
- package/esm2022/index.mjs +35 -40
- package/esm2022/lib/base-layout/base-layout.component.mjs +16 -0
- package/esm2022/lib/default-header/apps-button/apps-button.component.mjs +40 -0
- package/esm2022/lib/default-header/default-header.component.mjs +32 -0
- package/esm2022/lib/default-header/settings-button/settings-button.component.mjs +73 -0
- package/esm2022/lib/default-header/sidenav-toggle-button/sidenav-toggle-button.component.mjs +24 -0
- package/esm2022/lib/default-header/user-profile-icon/user-profile-icon.component.mjs +35 -0
- package/esm2022/lib/external-apps.service.mjs +99 -0
- package/esm2022/lib/footer/footer.component.mjs +13 -13
- package/esm2022/lib/footer/footer.directive.mjs +30 -0
- package/esm2022/lib/footer.service.mjs +58 -0
- package/esm2022/lib/header/header.component.mjs +17 -65
- package/esm2022/lib/header/header.directive.mjs +30 -0
- package/esm2022/lib/header.service.mjs +60 -0
- package/esm2022/lib/layout/layout.component.mjs +33 -47
- package/esm2022/lib/layout.service.mjs +93 -0
- package/esm2022/lib/logo.service.mjs +23 -0
- package/esm2022/lib/minimal-layout/minimal-layout.component.mjs +14 -0
- package/esm2022/lib/navigation/navigation-item/navigation-item.component.mjs +30 -64
- package/esm2022/lib/navigation/navigation.component.mjs +22 -48
- package/esm2022/lib/navigation-progress-bar/navigation-progress-bar.component.mjs +23 -0
- package/esm2022/lib/navigation.service.mjs +141 -0
- package/esm2022/lib/provide.mjs +80 -0
- package/esm2022/lib/release-info/release-info.component.mjs +28 -0
- package/esm2022/lib/sidenav/sidenav.component.mjs +50 -33
- package/esm2022/lib/tokens.mjs +10 -1
- package/esm2022/lib/types.mjs +1 -1
- package/fesm2022/rxap-layout.mjs +856 -833
- package/fesm2022/rxap-layout.mjs.map +1 -1
- package/index.d.ts +18 -19
- package/lib/base-layout/base-layout.component.d.ts +5 -0
- package/lib/default-header/apps-button/apps-button.component.d.ts +15 -0
- package/lib/default-header/default-header.component.d.ts +11 -0
- package/lib/{header → default-header}/settings-button/settings-button.component.d.ts +6 -14
- package/lib/{header → default-header}/sidenav-toggle-button/sidenav-toggle-button.component.d.ts +3 -5
- package/lib/default-header/user-profile-icon/user-profile-icon.component.d.ts +10 -0
- package/lib/external-apps.service.d.ts +26 -0
- package/lib/footer/footer.component.d.ts +3 -3
- package/lib/{footer.directive.d.ts → footer/footer.directive.d.ts} +2 -4
- package/lib/footer.service.d.ts +32 -0
- package/lib/header/header.component.d.ts +6 -12
- package/lib/header/header.directive.d.ts +12 -0
- package/lib/header.service.d.ts +34 -0
- package/lib/layout/layout.component.d.ts +4 -17
- package/lib/layout.service.d.ts +26 -0
- package/lib/logo.service.d.ts +10 -0
- package/lib/minimal-layout/minimal-layout.component.d.ts +5 -0
- package/lib/navigation/navigation-item/navigation-item.component.d.ts +10 -18
- package/lib/navigation/navigation.component.d.ts +10 -15
- package/lib/{header/navigation-progress-bar → navigation-progress-bar}/navigation-progress-bar.component.d.ts +1 -3
- package/lib/{navigation/navigation.service.d.ts → navigation.service.d.ts} +4 -5
- package/lib/provide.d.ts +13 -0
- package/lib/release-info/release-info.component.d.ts +9 -0
- package/lib/sidenav/sidenav.component.d.ts +18 -6
- package/lib/tokens.d.ts +12 -3
- package/lib/types.d.ts +15 -4
- package/package.json +30 -66
- package/theme.css +1 -1
- package/docs/classes/AppUrlService.html +0 -13
- package/docs/classes/AuthenticationServiceMock.html +0 -3
- package/docs/classes/LanguageSelectorComponent.html +0 -3
- package/docs/classes/LayoutComponentService.html +0 -15
- package/docs/classes/ReplaceRouterPathsPipe.html +0 -4
- package/docs/classes/ReplaceRouterPathsService.html +0 -3
- package/docs/classes/ResetButtonComponent.html +0 -3
- package/docs/classes/SidenavComponentService.html +0 -5
- package/docs/classes/SignOutComponent.html +0 -4
- package/docs/classes/ToggleWindowSidenavButtonComponent.html +0 -5
- package/docs/classes/VersionComponent.html +0 -7
- package/docs/classes/WindowContainerSidenavComponent.html +0 -10
- package/docs/interfaces/ExternalApps.html +0 -8
- package/docs/interfaces/LogoConfig.html +0 -4
- package/esm2022/lib/app-url.service.mjs +0 -78
- package/esm2022/lib/authentication.service.mock.mjs +0 -13
- package/esm2022/lib/footer.directive.mjs +0 -40
- package/esm2022/lib/header/apps-button/apps-button.component.mjs +0 -46
- package/esm2022/lib/header/language-selector/language-selector.component.mjs +0 -35
- package/esm2022/lib/header/navigation-progress-bar/navigation-progress-bar.component.mjs +0 -30
- package/esm2022/lib/header/reset-button/reset-button.component.mjs +0 -23
- package/esm2022/lib/header/settings-button/settings-button.component.mjs +0 -87
- package/esm2022/lib/header/sidenav-toggle-button/sidenav-toggle-button.component.mjs +0 -26
- package/esm2022/lib/header/sign-out/sign-out.component.mjs +0 -23
- package/esm2022/lib/header/user-profile-icon/user-profile-icon.component.mjs +0 -45
- package/esm2022/lib/layout/layout.component.service.mjs +0 -77
- package/esm2022/lib/navigation/navigation.service.mjs +0 -145
- package/esm2022/lib/navigation/replace-router-paths.pipe.mjs +0 -22
- package/esm2022/lib/navigation/replace-router-paths.service.mjs +0 -15
- package/esm2022/lib/sidenav/sidenav.component.service.mjs +0 -22
- package/esm2022/lib/sidenav/version/version.component.mjs +0 -28
- package/esm2022/lib/toggle-window-sidenav-button/toggle-window-sidenav-button.component.mjs +0 -30
- package/esm2022/lib/window-container-sidenav/window-container-sidenav.component.mjs +0 -54
- package/lib/app-url.service.d.ts +0 -29
- package/lib/authentication.service.mock.d.ts +0 -6
- package/lib/header/apps-button/apps-button.component.d.ts +0 -16
- package/lib/header/language-selector/language-selector.component.d.ts +0 -8
- package/lib/header/reset-button/reset-button.component.d.ts +0 -8
- package/lib/header/sign-out/sign-out.component.d.ts +0 -9
- package/lib/header/user-profile-icon/user-profile-icon.component.d.ts +0 -15
- package/lib/layout/layout.component.service.d.ts +0 -25
- package/lib/navigation/replace-router-paths.pipe.d.ts +0 -11
- package/lib/navigation/replace-router-paths.service.d.ts +0 -7
- package/lib/sidenav/sidenav.component.service.d.ts +0 -11
- package/lib/sidenav/version/version.component.d.ts +0 -14
- package/lib/toggle-window-sidenav-button/toggle-window-sidenav-button.component.d.ts +0 -9
- package/lib/window-container-sidenav/window-container-sidenav.component.d.ts +0 -17
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
<h3>File</h3>
|
|
121
121
|
</p>
|
|
122
122
|
<p class="comment">
|
|
123
|
-
<code>src/lib/header/user-profile-icon/user-profile-icon.component.ts</code>
|
|
123
|
+
<code>src/lib/default-header/user-profile-icon/user-profile-icon.component.ts</code>
|
|
124
124
|
</p>
|
|
125
125
|
|
|
126
126
|
|
|
@@ -163,8 +163,6 @@
|
|
|
163
163
|
<td class="col-md-9">
|
|
164
164
|
<code>MatMenuModule</code>
|
|
165
165
|
<code>MatIconModule</code>
|
|
166
|
-
<code>NgIf</code>
|
|
167
|
-
<code>AsyncPipe</code>
|
|
168
166
|
</td>
|
|
169
167
|
</tr>
|
|
170
168
|
|
|
@@ -205,6 +203,12 @@
|
|
|
205
203
|
<ul class="index-list">
|
|
206
204
|
<li>
|
|
207
205
|
<span class="modifier">Public</span>
|
|
206
|
+
<span class="modifier">Readonly</span>
|
|
207
|
+
<a href="#profile" >profile</a>
|
|
208
|
+
</li>
|
|
209
|
+
<li>
|
|
210
|
+
<span class="modifier">Public</span>
|
|
211
|
+
<span class="modifier">Readonly</span>
|
|
208
212
|
<a href="#username" >username</a>
|
|
209
213
|
</li>
|
|
210
214
|
</ul>
|
|
@@ -221,13 +225,26 @@
|
|
|
221
225
|
<ul class="index-list">
|
|
222
226
|
<li>
|
|
223
227
|
<span class="modifier">Public</span>
|
|
224
|
-
<span class="modifier">Async</span>
|
|
225
228
|
<a href="#logout" >logout</a>
|
|
226
229
|
</li>
|
|
227
230
|
</ul>
|
|
228
231
|
</td>
|
|
229
232
|
</tr>
|
|
230
233
|
|
|
234
|
+
<tr>
|
|
235
|
+
<td class="col-md-4">
|
|
236
|
+
<h6><b>Inputs</b></h6>
|
|
237
|
+
</td>
|
|
238
|
+
</tr>
|
|
239
|
+
<tr>
|
|
240
|
+
<td class="col-md-4">
|
|
241
|
+
<ul class="index-list">
|
|
242
|
+
<li>
|
|
243
|
+
<a href="#profile" >profile</a>
|
|
244
|
+
</li>
|
|
245
|
+
</ul>
|
|
246
|
+
</td>
|
|
247
|
+
</tr>
|
|
231
248
|
|
|
232
249
|
|
|
233
250
|
|
|
@@ -236,83 +253,33 @@
|
|
|
236
253
|
</table>
|
|
237
254
|
</section>
|
|
238
255
|
|
|
239
|
-
|
|
240
|
-
<
|
|
256
|
+
|
|
257
|
+
<section data-compodoc="block-inputs">
|
|
258
|
+
<h3 id="inputs">Inputs</h3>
|
|
241
259
|
<table class="table table-sm table-bordered">
|
|
242
260
|
<tbody>
|
|
243
261
|
<tr>
|
|
244
262
|
<td class="col-md-4">
|
|
245
|
-
<
|
|
263
|
+
<a name="profile"></a>
|
|
264
|
+
<b>profile</b>
|
|
246
265
|
</td>
|
|
247
266
|
</tr>
|
|
248
|
-
<tr>
|
|
249
|
-
<td class="col-md-4">
|
|
250
|
-
<div class="io-line">Defined in <a href="" data-line="52" class="link-to-prism">src/lib/header/user-profile-icon/user-profile-icon.component.ts:52</a></div>
|
|
251
|
-
</td>
|
|
252
|
-
</tr>
|
|
253
|
-
|
|
254
267
|
<tr>
|
|
255
268
|
<td class="col-md-4">
|
|
256
|
-
|
|
257
|
-
<b>Parameters :</b>
|
|
258
|
-
<table class="params">
|
|
259
|
-
<thead>
|
|
260
|
-
<tr>
|
|
261
|
-
<td>Name</td>
|
|
262
|
-
<td>Type</td>
|
|
263
|
-
<td>Optional</td>
|
|
264
|
-
</tr>
|
|
265
|
-
</thead>
|
|
266
|
-
<tbody>
|
|
267
|
-
<tr>
|
|
268
|
-
<td>userProfileService</td>
|
|
269
|
-
|
|
270
|
-
<td>
|
|
271
|
-
<code>UserProfileDataSource<T></code>
|
|
272
|
-
</td>
|
|
273
|
-
|
|
274
|
-
<td>
|
|
275
|
-
No
|
|
276
|
-
</td>
|
|
277
|
-
|
|
278
|
-
</tr>
|
|
279
|
-
<tr>
|
|
280
|
-
<td>authenticationService</td>
|
|
281
|
-
|
|
282
|
-
<td>
|
|
283
|
-
<code>RxapAuthenticationService</code>
|
|
284
|
-
</td>
|
|
285
|
-
|
|
286
|
-
<td>
|
|
287
|
-
No
|
|
288
|
-
</td>
|
|
289
|
-
|
|
290
|
-
</tr>
|
|
291
|
-
<tr>
|
|
292
|
-
<td>extractUsernameFromProfile</td>
|
|
293
|
-
|
|
294
|
-
<td>
|
|
295
|
-
<code><a href="../miscellaneous/typealiases.html#ExtractUsernameFromProfileFn" target="_self" >ExtractUsernameFromProfileFn<T></a></code>
|
|
296
|
-
</td>
|
|
297
|
-
|
|
298
|
-
<td>
|
|
299
|
-
No
|
|
300
|
-
</td>
|
|
301
|
-
|
|
302
|
-
</tr>
|
|
303
|
-
</tbody>
|
|
304
|
-
</table>
|
|
305
|
-
</div>
|
|
269
|
+
<i>Required : </i> <b>true</b>
|
|
306
270
|
</td>
|
|
307
271
|
</tr>
|
|
272
|
+
<tr>
|
|
273
|
+
<td class="col-md-2" colspan="2">
|
|
274
|
+
<div class="io-line">Defined in <a href="" data-line="30" class="link-to-prism">src/lib/default-header/user-profile-icon/user-profile-icon.component.ts:30</a></div>
|
|
275
|
+
</td>
|
|
276
|
+
</tr>
|
|
308
277
|
</tbody>
|
|
309
278
|
</table>
|
|
310
279
|
</section>
|
|
311
280
|
|
|
312
281
|
|
|
313
282
|
|
|
314
|
-
|
|
315
|
-
|
|
316
283
|
<section data-compodoc="block-methods">
|
|
317
284
|
|
|
318
285
|
<h3 id="methods">
|
|
@@ -325,7 +292,6 @@
|
|
|
325
292
|
<a name="logout"></a>
|
|
326
293
|
<span class="name">
|
|
327
294
|
<span class="modifier">Public</span>
|
|
328
|
-
<span class="modifier">Async</span>
|
|
329
295
|
<span ><b>logout</b></span>
|
|
330
296
|
<a href="#logout"><span class="icon ion-ios-link"></span></a>
|
|
331
297
|
</span>
|
|
@@ -341,8 +307,8 @@
|
|
|
341
307
|
|
|
342
308
|
<tr>
|
|
343
309
|
<td class="col-md-4">
|
|
344
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
345
|
-
class="link-to-prism">src/lib/header/user-profile-icon/user-profile-icon.component.ts:
|
|
310
|
+
<div class="io-line">Defined in <a href="" data-line="40"
|
|
311
|
+
class="link-to-prism">src/lib/default-header/user-profile-icon/user-profile-icon.component.ts:40</a></div>
|
|
346
312
|
</td>
|
|
347
313
|
</tr>
|
|
348
314
|
|
|
@@ -351,7 +317,7 @@
|
|
|
351
317
|
<td class="col-md-4">
|
|
352
318
|
|
|
353
319
|
<div class="io-description">
|
|
354
|
-
<b>Returns : </b> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >
|
|
320
|
+
<b>Returns : </b> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code>
|
|
355
321
|
|
|
356
322
|
</div>
|
|
357
323
|
</td>
|
|
@@ -364,6 +330,28 @@
|
|
|
364
330
|
<h3 id="inputs">
|
|
365
331
|
Properties
|
|
366
332
|
</h3>
|
|
333
|
+
<table class="table table-sm table-bordered">
|
|
334
|
+
<tbody>
|
|
335
|
+
<tr>
|
|
336
|
+
<td class="col-md-4">
|
|
337
|
+
<a name="profile"></a>
|
|
338
|
+
<span class="name">
|
|
339
|
+
<span class="modifier">Public</span>
|
|
340
|
+
<span class="modifier">Readonly</span>
|
|
341
|
+
<span ><b>profile</b></span>
|
|
342
|
+
<a href="#profile"><span class="icon ion-ios-link"></span></a>
|
|
343
|
+
</span>
|
|
344
|
+
</td>
|
|
345
|
+
</tr>
|
|
346
|
+
<tr>
|
|
347
|
+
<td class="col-md-4">
|
|
348
|
+
<div class="io-line">Defined in <a href="" data-line="30" class="link-to-prism">src/lib/default-header/user-profile-icon/user-profile-icon.component.ts:30</a></div>
|
|
349
|
+
</td>
|
|
350
|
+
</tr>
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
</tbody>
|
|
354
|
+
</table>
|
|
367
355
|
<table class="table table-sm table-bordered">
|
|
368
356
|
<tbody>
|
|
369
357
|
<tr>
|
|
@@ -371,6 +359,7 @@
|
|
|
371
359
|
<a name="username"></a>
|
|
372
360
|
<span class="name">
|
|
373
361
|
<span class="modifier">Public</span>
|
|
362
|
+
<span class="modifier">Readonly</span>
|
|
374
363
|
<span ><b>username</b></span>
|
|
375
364
|
<a href="#username"><span class="icon ion-ios-link"></span></a>
|
|
376
365
|
</span>
|
|
@@ -378,13 +367,18 @@
|
|
|
378
367
|
</tr>
|
|
379
368
|
<tr>
|
|
380
369
|
<td class="col-md-4">
|
|
381
|
-
<i>
|
|
382
|
-
|
|
370
|
+
<i>Default value : </i><code>computed(() => {
|
|
371
|
+
const profile = this.profile();
|
|
372
|
+
if (profile) {
|
|
373
|
+
return this.extractUsernameFromProfile(profile);
|
|
374
|
+
}
|
|
375
|
+
return null;
|
|
376
|
+
})</code>
|
|
383
377
|
</td>
|
|
384
378
|
</tr>
|
|
385
379
|
<tr>
|
|
386
380
|
<td class="col-md-4">
|
|
387
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
381
|
+
<div class="io-line">Defined in <a href="" data-line="32" class="link-to-prism">src/lib/default-header/user-profile-icon/user-profile-icon.component.ts:32</a></div>
|
|
388
382
|
</td>
|
|
389
383
|
</tr>
|
|
390
384
|
|
|
@@ -398,40 +392,17 @@
|
|
|
398
392
|
|
|
399
393
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
400
394
|
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
401
|
-
AsyncPipe,
|
|
402
|
-
NgIf,
|
|
403
|
-
} from '@angular/common';
|
|
404
|
-
import {
|
|
405
395
|
ChangeDetectionStrategy,
|
|
406
396
|
Component,
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
397
|
+
computed,
|
|
398
|
+
inject,
|
|
399
|
+
input,
|
|
410
400
|
} from '@angular/core';
|
|
411
|
-
import { toSignal } from '@angular/core/rxjs-interop';
|
|
412
401
|
import { MatIconModule } from '@angular/material/icon';
|
|
413
402
|
import { MatMenuModule } from '@angular/material/menu';
|
|
414
|
-
import {
|
|
415
|
-
import {
|
|
416
|
-
import {
|
|
417
|
-
distinctUntilChanged,
|
|
418
|
-
filter,
|
|
419
|
-
skip,
|
|
420
|
-
} from 'rxjs';
|
|
421
|
-
import {
|
|
422
|
-
map,
|
|
423
|
-
switchMap,
|
|
424
|
-
} from 'rxjs/operators';
|
|
425
|
-
|
|
426
|
-
export type ExtractUsernameFromProfileFn<T = unknown> = (profile: T) => string | null;
|
|
427
|
-
|
|
428
|
-
export const EXTRACT_USERNAME_FROM_PROFILE = new InjectionToken<ExtractUsernameFromProfileFn>(
|
|
429
|
-
'extract-username-from-profile',
|
|
430
|
-
{
|
|
431
|
-
providedIn: 'root',
|
|
432
|
-
factory: () => (profile: any) => (profile ? profile.username ?? profile.email ?? profile.name : null) ?? null,
|
|
433
|
-
},
|
|
434
|
-
);
|
|
403
|
+
import { PubSubService } from '@rxap/ngx-pub-sub';
|
|
404
|
+
import { EXTRACT_USERNAME_FROM_PROFILE } from '../../tokens';
|
|
405
|
+
import { ExtractUsernameFromProfileFn } from '../../types';
|
|
435
406
|
|
|
436
407
|
@Component({
|
|
437
408
|
selector: 'rxap-user-profile-icon',
|
|
@@ -442,36 +413,25 @@ export const EXTRACT_USERNAME_FROM_PROFILE = new InjectionToken<ExtractU
|
|
|
442
413
|
imports: [
|
|
443
414
|
MatMenuModule,
|
|
444
415
|
MatIconModule,
|
|
445
|
-
NgIf,
|
|
446
|
-
AsyncPipe,
|
|
447
416
|
],
|
|
448
417
|
})
|
|
449
|
-
export class UserProfileIconComponent
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
private readonly authenticationService: RxapAuthenticationService,
|
|
456
|
-
@Inject(EXTRACT_USERNAME_FROM_PROFILE)
|
|
457
|
-
extractUsernameFromProfile: ExtractUsernameFromProfileFn<T>,
|
|
458
|
-
) {
|
|
459
|
-
this.username = toSignal(this.authenticationService.isAuthenticated$.pipe(
|
|
460
|
-
filter(Boolean),
|
|
461
|
-
switchMap(() => this.userProfileService.connect({
|
|
462
|
-
viewChange: this.authenticationService.isAuthenticated$.pipe(
|
|
463
|
-
skip(1),
|
|
464
|
-
filter(Boolean),
|
|
465
|
-
distinctUntilChanged(),
|
|
466
|
-
),
|
|
467
|
-
})),
|
|
468
|
-
filter(Boolean),
|
|
469
|
-
map(extractUsernameFromProfile),
|
|
470
|
-
), { initialValue: null });
|
|
471
|
-
}
|
|
418
|
+
export class UserProfileIconComponent {
|
|
419
|
+
|
|
420
|
+
private readonly extractUsernameFromProfile: ExtractUsernameFromProfileFn = inject(EXTRACT_USERNAME_FROM_PROFILE);
|
|
421
|
+
private readonly pubSubService = inject(PubSubService);
|
|
422
|
+
|
|
423
|
+
public readonly profile = input.required();
|
|
472
424
|
|
|
473
|
-
public
|
|
474
|
-
|
|
425
|
+
public readonly username = computed(() => {
|
|
426
|
+
const profile = this.profile();
|
|
427
|
+
if (profile) {
|
|
428
|
+
return this.extractUsernameFromProfile(profile);
|
|
429
|
+
}
|
|
430
|
+
return null;
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
public logout() {
|
|
434
|
+
this.pubSubService.publish('authentication.logout');
|
|
475
435
|
}
|
|
476
436
|
|
|
477
437
|
|
|
@@ -481,18 +441,19 @@ export class UserProfileIconComponent<T = unknown> {
|
|
|
481
441
|
|
|
482
442
|
<div class="tab-pane fade " id="templateData">
|
|
483
443
|
<pre class="line-numbers"><code class="language-html"><button [matMenuTriggerFor]="menu"
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
<mat-icon class="avatar-icon" svgIcon="account-circle"></mat-icon>
|
|
444
|
+
class="rounded-full cursor-pointer outline-none overflow-hidden h-8 w-8 bg-center bg-no-repeat bg-cover flex flex-row justify-center items-center">
|
|
445
|
+
<mat-icon class="h-8 w-8 text-[32px]" svgIcon="account-circle"></mat-icon>
|
|
487
446
|
</button>
|
|
488
447
|
|
|
489
448
|
<mat-menu #menu="matMenu" [yPosition]="'below'" class="!max-w-none">
|
|
449
|
+
@if (this.username(); as username) {
|
|
490
450
|
<button mat-menu-item>
|
|
491
451
|
<span class="flex flex-row gap-2">
|
|
492
452
|
<mat-icon svgIcon="account"></mat-icon>
|
|
493
|
-
<span>{{username
|
|
453
|
+
<span>{{username}}</span>
|
|
494
454
|
</span>
|
|
495
455
|
</button>
|
|
456
|
+
}
|
|
496
457
|
<button (click)="logout()" mat-menu-item>
|
|
497
458
|
<span class="flex flex-row gap-2">
|
|
498
459
|
<mat-icon svgIcon="logout"></mat-icon>
|
|
@@ -507,32 +468,7 @@ export class UserProfileIconComponent<T = unknown> {
|
|
|
507
468
|
<p class="comment">
|
|
508
469
|
<code>./user-profile-icon.component.scss</code>
|
|
509
470
|
</p>
|
|
510
|
-
<pre class="line-numbers"><code class="language-scss"
|
|
511
|
-
border-radius: 100%;
|
|
512
|
-
border: none;
|
|
513
|
-
height: 32px;
|
|
514
|
-
width: 32px;
|
|
515
|
-
overflow: hidden;
|
|
516
|
-
background-position: center center;
|
|
517
|
-
background-repeat: no-repeat;
|
|
518
|
-
background-size: cover;
|
|
519
|
-
|
|
520
|
-
.avatar-icon {
|
|
521
|
-
width: 32px;
|
|
522
|
-
height: 32px;
|
|
523
|
-
font-size: 32px;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
&:hover {
|
|
527
|
-
cursor: pointer;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
&:focus {
|
|
531
|
-
outline: none;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
}
|
|
535
|
-
</code></pre>
|
|
471
|
+
<pre class="line-numbers"><code class="language-scss"></code></pre>
|
|
536
472
|
</div>
|
|
537
473
|
|
|
538
474
|
<div class="tab-pane fade " id="tree">
|
|
@@ -560,9 +496,9 @@ export class UserProfileIconComponent<T = unknown> {
|
|
|
560
496
|
<script src="../js/libs/htmlparser.js"></script>
|
|
561
497
|
<script src="../js/libs/deep-iterator.js"></script>
|
|
562
498
|
<script>
|
|
563
|
-
var COMPONENT_TEMPLATE = '<div><button [matMenuTriggerFor]="menu"
|
|
564
|
-
var COMPONENTS = [{'name': 'AppsButtonComponent', 'selector': 'rxap-apps-button'},{'name': '
|
|
565
|
-
var DIRECTIVES = [{'name': 'FooterDirective', 'selector': '[rxapFooter]'},{'name': 'SidenavFooterDirective', 'selector': '[rxapSidenavFooter]'},{'name': 'SidenavHeaderDirective', 'selector': '[rxapSidenavHeader]'}];
|
|
499
|
+
var COMPONENT_TEMPLATE = '<div><button [matMenuTriggerFor]="menu" class="rounded-full cursor-pointer outline-none overflow-hidden h-8 w-8 bg-center bg-no-repeat bg-cover flex flex-row justify-center items-center"> <mat-icon class="h-8 w-8 text-[32px]" svgIcon="account-circle"></mat-icon></button><mat-menu #menu="matMenu" [yPosition]="\'below\'" class="!max-w-none"> @if (this.username(); as username) { <button mat-menu-item> <span class="flex flex-row gap-2"> <mat-icon svgIcon="account"></mat-icon> <span>{{username}}</span> </span> </button> } <button (click)="logout()" mat-menu-item> <span class="flex flex-row gap-2"> <mat-icon svgIcon="logout"></mat-icon> <span i18n>Logout</span> </span> </button></mat-menu></div>'
|
|
500
|
+
var COMPONENTS = [{'name': 'AppsButtonComponent', 'selector': 'rxap-apps-button'},{'name': 'BaseLayoutComponent', 'selector': 'rxap-base-layout'},{'name': 'DefaultHeaderComponent', 'selector': 'rxap-default-header'},{'name': 'FooterComponent', 'selector': 'rxap-footer'},{'name': 'HeaderComponent', 'selector': 'rxap-header'},{'name': 'LayoutComponent', 'selector': 'rxap-layout'},{'name': 'MinimalLayoutComponent', 'selector': 'rxap-minimal-layout'},{'name': 'NavigationComponent', 'selector': 'ul[rxap-navigation]'},{'name': 'NavigationItemComponent', 'selector': 'li[rxap-navigation-item]'},{'name': 'NavigationProgressBarComponent', 'selector': 'rxap-navigation-progress-bar'},{'name': 'ReleaseInfoComponent', 'selector': 'rxap-release-info'},{'name': 'SettingsButtonComponent', 'selector': 'rxap-settings-button'},{'name': 'SidenavComponent', 'selector': 'rxap-sidenav'},{'name': 'SidenavToggleButtonComponent', 'selector': 'rxap-sidenav-toggle-button'},{'name': 'UserProfileIconComponent', 'selector': 'rxap-user-profile-icon'}];
|
|
501
|
+
var DIRECTIVES = [{'name': 'FooterDirective', 'selector': '[rxapFooter]'},{'name': 'HeaderDirective', 'selector': '[rxapHeader]'},{'name': 'SidenavFooterDirective', 'selector': '[rxapSidenavFooter]'},{'name': 'SidenavHeaderDirective', 'selector': '[rxapSidenavHeader]'}];
|
|
566
502
|
var ACTUAL_COMPONENT = {'name': 'UserProfileIconComponent'};
|
|
567
503
|
</script>
|
|
568
504
|
<script src="../js/tree.js"></script>
|
|
@@ -120,44 +120,28 @@
|
|
|
120
120
|
<b>@angular/common</b> : ^18.0.1</li>
|
|
121
121
|
<li>
|
|
122
122
|
<b>@angular/core</b> : ^18.0.1</li>
|
|
123
|
-
<li>
|
|
124
|
-
<b>@angular/forms</b> : ^18.0.1</li>
|
|
125
123
|
<li>
|
|
126
124
|
<b>@angular/material</b> : ^18.0.0</li>
|
|
127
125
|
<li>
|
|
128
126
|
<b>@angular/router</b> : ^18.0.1</li>
|
|
129
127
|
<li>
|
|
130
|
-
<b>@rxap/
|
|
131
|
-
<li>
|
|
132
|
-
<b>@rxap/authorization</b> : ^18.0.3-dev.0</li>
|
|
133
|
-
<li>
|
|
134
|
-
<b>@rxap/browser-utilities</b> : ^1.1.4-dev.0</li>
|
|
135
|
-
<li>
|
|
136
|
-
<b>@rxap/config</b> : ^18.1.1-dev.0</li>
|
|
137
|
-
<li>
|
|
138
|
-
<b>@rxap/data-source</b> : ^18.1.1-dev.0</li>
|
|
139
|
-
<li>
|
|
140
|
-
<b>@rxap/directives</b> : ^18.0.3-dev.0</li>
|
|
141
|
-
<li>
|
|
142
|
-
<b>@rxap/environment</b> : ^18.0.3-dev.0</li>
|
|
143
|
-
<li>
|
|
144
|
-
<b>@rxap/icon</b> : ^18.0.3-dev.0</li>
|
|
128
|
+
<b>@rxap/browser-utilities</b> : ^1.1.4-dev.1</li>
|
|
145
129
|
<li>
|
|
146
|
-
<b>@rxap/
|
|
130
|
+
<b>@rxap/config</b> : ^18.1.1-dev.2</li>
|
|
147
131
|
<li>
|
|
148
|
-
<b>@rxap/
|
|
132
|
+
<b>@rxap/environment</b> : ^18.0.3-dev.2</li>
|
|
149
133
|
<li>
|
|
150
|
-
<b>@rxap/
|
|
134
|
+
<b>@rxap/material-directives</b> : ^18.0.3-dev.1</li>
|
|
151
135
|
<li>
|
|
152
|
-
<b>@rxap/ngx-
|
|
136
|
+
<b>@rxap/ngx-pub-sub</b> : ^18.0.3-dev.1</li>
|
|
153
137
|
<li>
|
|
154
|
-
<b>@rxap/ngx-theme</b> : ^18.0.3-dev.
|
|
138
|
+
<b>@rxap/ngx-theme</b> : ^18.0.3-dev.1</li>
|
|
155
139
|
<li>
|
|
156
|
-
<b>@rxap/ngx-user</b> : ^18.0.3-dev.
|
|
140
|
+
<b>@rxap/ngx-user</b> : ^18.0.3-dev.1</li>
|
|
157
141
|
<li>
|
|
158
|
-
<b>@rxap/
|
|
142
|
+
<b>@rxap/pattern</b> : ^1.1.5-dev.1</li>
|
|
159
143
|
<li>
|
|
160
|
-
<b>@rxap/utilities</b> : ^16.2.4-dev.
|
|
144
|
+
<b>@rxap/utilities</b> : ^16.2.4-dev.1</li>
|
|
161
145
|
<li>
|
|
162
146
|
<b>rxjs</b> : ^7.8.1</li>
|
|
163
147
|
</ul>
|