@coolon/angular-ui-powerups 16.1.0-alpha.286 → 16.1.0-alpha.288
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/esm2022/lib/components/tables/paginator/paginator.component.mjs +24 -5
- package/esm2022/lib/place/components/side-place-navigation/side-place-navigation.component.mjs +255 -23
- package/esm2022/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.mjs +7 -6
- package/esm2022/lib/place/place-definition.mjs +4 -2
- package/esm2022/lib/place/place.decorator.mjs +2 -2
- package/fesm2022/coolon-angular-ui-powerups.mjs +282 -25
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/tables/paginator/paginator.component.d.ts +12 -0
- package/lib/place/components/side-place-navigation/side-place-navigation.component.d.ts +116 -13
- package/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.d.ts +4 -3
- package/lib/place/place-definition.d.ts +4 -1
- package/lib/place/place.decorator.d.ts +11 -0
- package/package.json +2 -2
|
@@ -5306,13 +5306,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
5306
5306
|
type: Input
|
|
5307
5307
|
}] } });
|
|
5308
5308
|
|
|
5309
|
+
/**
|
|
5310
|
+
* Page controls for a collection read a window at a time, showing which window is on screen and how
|
|
5311
|
+
* big the whole collection is.
|
|
5312
|
+
*
|
|
5313
|
+
* It binds to any {@link PageController}, so it works over a client-side slice of an already-loaded
|
|
5314
|
+
* list and over a server-paged data source alike — the difference between them is not the pager's
|
|
5315
|
+
* business.
|
|
5316
|
+
*/
|
|
5309
5317
|
class PaginatorComponent extends DisposableComponent {
|
|
5310
5318
|
#pageController_accessor_storage = proxify(PageController);
|
|
5311
5319
|
get pageController() { return this.#pageController_accessor_storage; }
|
|
5312
5320
|
set pageController(value) { this.#pageController_accessor_storage = value; }
|
|
5313
5321
|
constructor() {
|
|
5314
5322
|
super();
|
|
5315
|
-
|
|
5323
|
+
// These getters read model values directly, so nothing would repaint on its own. Inside an
|
|
5324
|
+
// ON_PUSH parent — a table footer, say — the counts would show whatever they were on first paint
|
|
5325
|
+
// and never move again.
|
|
5326
|
+
this.viewStateDependsOn(this.pageController.totalItems$, this.pageController.pageNumber$, this.pageController.totalPages$, this.pageController.pageSize$);
|
|
5316
5327
|
}
|
|
5317
5328
|
get totalItems() {
|
|
5318
5329
|
return this.pageController.totalItems$.value;
|
|
@@ -5323,6 +5334,14 @@ class PaginatorComponent extends DisposableComponent {
|
|
|
5323
5334
|
get pageNumber() {
|
|
5324
5335
|
return this.pageController.pageNumber$.value;
|
|
5325
5336
|
}
|
|
5337
|
+
/** The position of the first row on screen, counting from one. Zero when there are no rows at all. */
|
|
5338
|
+
get firstItem() {
|
|
5339
|
+
return this.totalItems < 1 ? 0 : ((this.pageNumber - 1) * (this.pageController.pageSize$.value ?? 0)) + 1;
|
|
5340
|
+
}
|
|
5341
|
+
/** The position of the last row on screen, which on a short final page is the end of the collection. */
|
|
5342
|
+
get lastItem() {
|
|
5343
|
+
return Math.min(this.pageNumber * (this.pageController.pageSize$.value ?? 0), this.totalItems);
|
|
5344
|
+
}
|
|
5326
5345
|
get previousCommand() {
|
|
5327
5346
|
return this.pageController.previousCommand;
|
|
5328
5347
|
}
|
|
@@ -5330,7 +5349,7 @@ class PaginatorComponent extends DisposableComponent {
|
|
|
5330
5349
|
return this.pageController.nextCommand;
|
|
5331
5350
|
}
|
|
5332
5351
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5333
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: PaginatorComponent, selector: "aup-paginator", inputs: { pageController: "pageController" }, usesInheritance: true, ngImport: i0, template: "<p>
|
|
5352
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: PaginatorComponent, selector: "aup-paginator", inputs: { pageController: "pageController" }, usesInheritance: true, ngImport: i0, template: "<p>Showing {{firstItem}}\u2013{{lastItem}} of {{totalItems}}<span class=\"spacer\"></span>Page {{pageNumber}} of {{totalPages}}</p>\n<button mat-icon-button [pectinCommand]=\"previousCommand\"><aup-icon icon=\"mat:keyboard_arrow_left\"></aup-icon></button>\n<button mat-icon-button [pectinCommand]=\"nextCommand\"><aup-icon icon=\"mat:keyboard_arrow_right\"></aup-icon></button>\n", styles: [":host{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;font-size:12px;padding:0 8px;color:#0009}:host p{color:inherit;margin:0 8px 0 0}:host span.spacer{padding:0 calc(var(--default-padding) / 2)}:host span.spacer:before{content:\"|\";opacity:.35}:host button.md-button.md-icon-button{padding:0;margin:0;width:30px;height:30px}\n"], dependencies: [{ kind: "directive", type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter", "preventDefault"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
5334
5353
|
}
|
|
5335
5354
|
__decorate([
|
|
5336
5355
|
Proxify(),
|
|
@@ -5338,7 +5357,7 @@ __decorate([
|
|
|
5338
5357
|
], PaginatorComponent.prototype, "pageController", null);
|
|
5339
5358
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
5340
5359
|
type: Component,
|
|
5341
|
-
args: [{ selector: 'aup-paginator', template: "<p>
|
|
5360
|
+
args: [{ selector: 'aup-paginator', template: "<p>Showing {{firstItem}}\u2013{{lastItem}} of {{totalItems}}<span class=\"spacer\"></span>Page {{pageNumber}} of {{totalPages}}</p>\n<button mat-icon-button [pectinCommand]=\"previousCommand\"><aup-icon icon=\"mat:keyboard_arrow_left\"></aup-icon></button>\n<button mat-icon-button [pectinCommand]=\"nextCommand\"><aup-icon icon=\"mat:keyboard_arrow_right\"></aup-icon></button>\n", styles: [":host{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;font-size:12px;padding:0 8px;color:#0009}:host p{color:inherit;margin:0 8px 0 0}:host span.spacer{padding:0 calc(var(--default-padding) / 2)}:host span.spacer:before{content:\"|\";opacity:.35}:host button.md-button.md-icon-button{padding:0;margin:0;width:30px;height:30px}\n"] }]
|
|
5342
5361
|
}], ctorParameters: function () { return []; }, propDecorators: { pageController: [{
|
|
5343
5362
|
type: Input
|
|
5344
5363
|
}] } });
|
|
@@ -9382,9 +9401,10 @@ class PlaceDefinition {
|
|
|
9382
9401
|
children;
|
|
9383
9402
|
redirectToFirstChild;
|
|
9384
9403
|
rememberLastChild;
|
|
9404
|
+
navDepth;
|
|
9385
9405
|
_parent;
|
|
9386
9406
|
name;
|
|
9387
|
-
constructor(component, path, authenticate, role, data, routeParameters, children, redirectToFirstChild, rememberLastChild) {
|
|
9407
|
+
constructor(component, path, authenticate, role, data, routeParameters, children, redirectToFirstChild, rememberLastChild, navDepth = 2) {
|
|
9388
9408
|
this.component = component;
|
|
9389
9409
|
this.path = path;
|
|
9390
9410
|
this.authenticate = authenticate;
|
|
@@ -9394,6 +9414,7 @@ class PlaceDefinition {
|
|
|
9394
9414
|
this.children = children;
|
|
9395
9415
|
this.redirectToFirstChild = redirectToFirstChild;
|
|
9396
9416
|
this.rememberLastChild = rememberLastChild;
|
|
9417
|
+
this.navDepth = navDepth;
|
|
9397
9418
|
const s = component.name.replace(/Component$/, '');
|
|
9398
9419
|
this.name = s.charAt(0).toLowerCase() + s.slice(1);
|
|
9399
9420
|
this.children.forEach(it => it.setParent(this));
|
|
@@ -14509,25 +14530,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
14509
14530
|
args: [{ selector: 'aup-list-place-nav', template: "<mat-nav-list fxFlex>\n <a mat-list-item *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n aup-gc #gc=\"aup-gc\"\n [pectinCommand]=\"commandFactory.create(item.place, {disposedWith: gc})\"\n [class.active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\"\n [attr.data-cy]=\"item.place.path\"\n >\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n</mat-nav-list>\n", styles: [":host{display:flex;flex-direction:column;--selected-border-color: #838383;--selected-color: inherit;--selected-background: #f1f1f1}mat-nav-list{padding-top:0}a{border-right:2px solid transparent}a.active{border-right:2px solid var(--selected-border-color);background:var(--selected-background);color:var(--selected-color)}\n"] }]
|
|
14510
14531
|
}], ctorParameters: function () { return [{ type: PlaceRouter }]; } });
|
|
14511
14532
|
|
|
14533
|
+
/** Every transition in the rail runs at this pace; the scss's `$motion` must match it. */
|
|
14534
|
+
const MOTION = '220ms ease';
|
|
14535
|
+
/** How long the hover-expanded rail waits after the pointer leaves before collapsing again. */
|
|
14536
|
+
const HOVER_COLLAPSE_DELAY = 120;
|
|
14537
|
+
let nextInstanceId = 0;
|
|
14512
14538
|
/**
|
|
14539
|
+
* A place with children is listed as a group header with its children beneath it, when:
|
|
14540
|
+
* - it has `redirectToFirstChild` (it has no page of its own, so its header never navigates while
|
|
14541
|
+
* the rail is open);
|
|
14542
|
+
* - it hasn't opted out with `navDepth: 1` (see {@link Place.Options.navDepth});
|
|
14543
|
+
* - at least two of its children are authorised: one child isn't a choice, so a parent with one
|
|
14544
|
+
* authorised child is a single entry that navigates to it.
|
|
14545
|
+
* Anything else is a leaf that navigates to its place. A `redirectToFirstChild` parent with no
|
|
14546
|
+
* authorised child is dropped, as it has nowhere to land. Only two levels are shown; deeper places
|
|
14547
|
+
* stay as tabs in their pages.
|
|
14548
|
+
*
|
|
14549
|
+
* The rail collapses to an icon strip from the Menu row, and expands over the content when the
|
|
14550
|
+
* pointer rests on it. The pinned state is kept in localStorage under {@link persistKey}.
|
|
14551
|
+
*
|
|
14513
14552
|
* @example
|
|
14514
14553
|
* // Usage
|
|
14515
|
-
* <aup-
|
|
14516
|
-
*
|
|
14517
|
-
* </aup-
|
|
14554
|
+
* <aup-side-place-navigation [places]="placeConstructorArray"
|
|
14555
|
+
* [placeOutlet]="placeOutletComponent">
|
|
14556
|
+
* </aup-side-place-navigation>
|
|
14518
14557
|
* <aup-place-outlet #placeOutletComponent></aup-place-outlet>
|
|
14519
14558
|
*
|
|
14520
|
-
* //
|
|
14559
|
+
* // Layout: the host is the rail's slot, so give it a height (it stretches in a flex row or a
|
|
14560
|
+
* // grid) and put the content beside it. The content is offset by the pinned width; the
|
|
14561
|
+
* // hover-expanded rail overlays it.
|
|
14562
|
+
*
|
|
14563
|
+
* // CSS overrides (set on the element or any ancestor; defaults shown):
|
|
14521
14564
|
* aup-side-place-navigation {
|
|
14522
|
-
* --nav-width: 56px
|
|
14523
|
-
* --nav-expanded-width:
|
|
14524
|
-
* --nav-item-height: var(--nav-width)
|
|
14565
|
+
* --nav-width: 56px; // the collapsed rail
|
|
14566
|
+
* --nav-expanded-width: 232px;
|
|
14525
14567
|
* --nav-background-color: #555;
|
|
14526
|
-
* --nav-color:
|
|
14568
|
+
* --nav-color: #fff; // the Menu row, and the current place's labels
|
|
14569
|
+
* --nav-item-color: #eee; // top-level labels
|
|
14570
|
+
* --nav-child-color: #d0d0d0; // child labels
|
|
14571
|
+
* --nav-current-background: #3a3a3a; // the current place's row
|
|
14572
|
+
* --nav-hover-background: #4c4c4c;
|
|
14573
|
+
* --nav-chevron-color: #bdbdbd;
|
|
14574
|
+
* --nav-current-chevron-color: #757575; // the current group's chevron: it can't be collapsed
|
|
14575
|
+
* --nav-focus-color: rgba(255, 255, 255, 0.6);
|
|
14576
|
+
* --nav-overlay-shadow: 6px 0 18px rgba(0, 0, 0, 0.28); // the hover-expanded rail
|
|
14577
|
+
* --nav-z-index: 100; // lifts the hover-expanded rail over the content
|
|
14527
14578
|
* }
|
|
14528
14579
|
*
|
|
14529
14580
|
* // Content Templates:
|
|
14530
|
-
* #navEndTemplate
|
|
14581
|
+
* #navEndTemplate, rendered below the items
|
|
14531
14582
|
* <ng-template #navEndTemplate>
|
|
14532
14583
|
* <a mat-list-item (click)="logout()" matTooltip="Logout">
|
|
14533
14584
|
* <mat-icon>exit_to_app</mat-icon>
|
|
@@ -14556,24 +14607,223 @@ class SidePlaceNavigationComponent extends AbstractPlaceNavigationComponent {
|
|
|
14556
14607
|
get expanded$() { return this.#expanded$_accessor_storage; }
|
|
14557
14608
|
set expanded$(value) { this.#expanded$_accessor_storage = value; }
|
|
14558
14609
|
#expanded_accessor_storage = false;
|
|
14610
|
+
/**
|
|
14611
|
+
* Whether the rail is pinned expanded (true) or collapsed to icons. The binding is the initial
|
|
14612
|
+
* state: once the user has pinned the rail from the Menu row, the state they chose is restored
|
|
14613
|
+
* from {@link persistKey} instead.
|
|
14614
|
+
*/
|
|
14559
14615
|
get expanded() { return this.#expanded_accessor_storage; }
|
|
14560
14616
|
set expanded(value) { this.#expanded_accessor_storage = value; }
|
|
14617
|
+
/** Show the Menu row, so the user can pin the rail expanded or collapsed. */
|
|
14618
|
+
collapsible = true;
|
|
14619
|
+
/** How long, in ms, the pointer must rest on the collapsed rail before it expands. */
|
|
14620
|
+
hoverExpandDelay = 150;
|
|
14621
|
+
/**
|
|
14622
|
+
* The localStorage key the pinned state is kept under; `null` turns persistence off. The default
|
|
14623
|
+
* is shared by everyone using the browser, so include the user in the key for a per-user state.
|
|
14624
|
+
*/
|
|
14625
|
+
persistKey = 'aup-side-place-navigation.expanded';
|
|
14561
14626
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TemplateRef<any> is the Angular convention for ng-template refs
|
|
14562
14627
|
navEndTemplate;
|
|
14628
|
+
/** The pointer has rested on the collapsed rail, so it is expanded over the content. */
|
|
14629
|
+
hovering$ = new MutableValueModel(false);
|
|
14630
|
+
/** Labels and children are shown: pinned expanded, or hover-expanded. */
|
|
14631
|
+
open$;
|
|
14632
|
+
/** Hover-expanded over the content, as opposed to pinned expanded beside it. */
|
|
14633
|
+
overlay$;
|
|
14634
|
+
navItems$;
|
|
14635
|
+
/** Groups the user has opened. The current place's group joins on arrival and stays. */
|
|
14636
|
+
openGroups$ = new MutableValueModel(new Set());
|
|
14637
|
+
childListAnimation = { value: '', params: { duration: MOTION } };
|
|
14638
|
+
trackByNavItem = (index, item) => item.place;
|
|
14639
|
+
trackByNavChild = (index, child) => child.place;
|
|
14640
|
+
/**
|
|
14641
|
+
* Animations are suppressed while a navigation is in flight, and for a frame after it settles, so
|
|
14642
|
+
* the current group doesn't visibly slide open on every page load. What should animate is a group
|
|
14643
|
+
* the user opens or closes, and the children leaving as the rail collapses. Same arrangement as
|
|
14644
|
+
* TabbedPlaceNavigationComponent.
|
|
14645
|
+
*/
|
|
14646
|
+
animationsDisabled = true;
|
|
14647
|
+
idPrefix = `aup-side-nav-${nextInstanceId++}`;
|
|
14648
|
+
hoverTimer;
|
|
14649
|
+
resetHandle = null;
|
|
14563
14650
|
constructor(router) {
|
|
14564
14651
|
super(router);
|
|
14652
|
+
const { chain, when } = Dsl.disposeWith(this);
|
|
14653
|
+
const { accessGuard$ } = router.authService;
|
|
14654
|
+
const activeVisit$ = router.activeVisit$;
|
|
14655
|
+
this.open$ = chain.booleanValue(this.expanded$).or(this.hovering$);
|
|
14656
|
+
this.overlay$ = chain.booleanValue(this.hovering$).andNot(this.expanded$);
|
|
14657
|
+
// Where the user is, and what they may see, postponed like the top-level list it extends: child
|
|
14658
|
+
// authorisation settles during a navigation, and reading it mid-flight would flicker.
|
|
14659
|
+
const entries$ = chain(this.menuItems).mapAll(items => {
|
|
14660
|
+
const guard = accessGuard$.value;
|
|
14661
|
+
const visit = activeVisit$.value;
|
|
14662
|
+
const visible = (place) => guard.isAuthorised(place) || !!visit?.isPlaceActive(place);
|
|
14663
|
+
return items
|
|
14664
|
+
.map(({ place, active }) => {
|
|
14665
|
+
const children = place.redirectToFirstChild ? place.children.filter(visible) : [];
|
|
14666
|
+
const currentChild = active ? children.find(child => visit?.isPlaceActive(child)) : undefined;
|
|
14667
|
+
return { place, current: active, children, currentChild };
|
|
14668
|
+
})
|
|
14669
|
+
// A redirectToFirstChild parent with no authorised child has nowhere to land, so it goes -
|
|
14670
|
+
// unless it's current, so the rail never loses the place the user is on.
|
|
14671
|
+
.filter(({ place, current, children }) => current || !place.redirectToFirstChild || !place.hasChildren() || children.length > 0);
|
|
14672
|
+
}, {
|
|
14673
|
+
dependsOn: [accessGuard$, activeVisit$],
|
|
14674
|
+
postponeWhile: router.navigationInProgress$
|
|
14675
|
+
});
|
|
14676
|
+
this.navItems$ = chain(entries$).mapAll(entries => {
|
|
14677
|
+
const railOpen = this.open$.value;
|
|
14678
|
+
const openGroups = this.openGroups$.value;
|
|
14679
|
+
return entries.map(({ place, current, children, currentChild }) => {
|
|
14680
|
+
const group = place.navDepth > 1 && children.length > 1;
|
|
14681
|
+
const showChildren = group && railOpen && (current || openGroups.has(place));
|
|
14682
|
+
return {
|
|
14683
|
+
place,
|
|
14684
|
+
face: this.getNavigationFace(place),
|
|
14685
|
+
group,
|
|
14686
|
+
current,
|
|
14687
|
+
showChildren,
|
|
14688
|
+
highlighted: current && !showChildren,
|
|
14689
|
+
children: group ? children.map(child => ({
|
|
14690
|
+
place: child,
|
|
14691
|
+
face: this.getNavigationFace(child),
|
|
14692
|
+
current: child === currentChild
|
|
14693
|
+
})) : [],
|
|
14694
|
+
childListId: `${this.idPrefix}-${place.placeId}`
|
|
14695
|
+
};
|
|
14696
|
+
});
|
|
14697
|
+
}, {
|
|
14698
|
+
dependsOn: [this.openGroups$, this.open$]
|
|
14699
|
+
});
|
|
14700
|
+
// Navigating into a group opens it, by child, deep link or redirect alike.
|
|
14701
|
+
const currentPlace$ = chain(this._activePlaceComponent).pluck('placeDefinition');
|
|
14702
|
+
when(currentPlace$).changes(place => this.openGroup(place), { initialValue: "triggerChange" });
|
|
14703
|
+
when(router.navigationInProgress$).changes(inProgress => {
|
|
14704
|
+
if (this.resetHandle !== null) {
|
|
14705
|
+
cancelAnimationFrame(this.resetHandle);
|
|
14706
|
+
this.resetHandle = null;
|
|
14707
|
+
}
|
|
14708
|
+
if (inProgress) {
|
|
14709
|
+
this.animationsDisabled = true;
|
|
14710
|
+
return;
|
|
14711
|
+
}
|
|
14712
|
+
// The trailing frame matters: the list is often rendered in the same turn the navigation
|
|
14713
|
+
// completes, and re-enabling immediately would let that first render animate anyway.
|
|
14714
|
+
this.resetHandle = requestAnimationFrame(() => {
|
|
14715
|
+
this.resetHandle = null;
|
|
14716
|
+
this.animationsDisabled = false;
|
|
14717
|
+
this.markForCheck();
|
|
14718
|
+
});
|
|
14719
|
+
}, { initialValue: "triggerChange" });
|
|
14720
|
+
this.onInit(() => this.restorePinnedState());
|
|
14721
|
+
this.onDispose(() => {
|
|
14722
|
+
this.clearHoverTimer();
|
|
14723
|
+
if (this.resetHandle !== null) {
|
|
14724
|
+
cancelAnimationFrame(this.resetHandle);
|
|
14725
|
+
}
|
|
14726
|
+
});
|
|
14727
|
+
this.viewStateDependsOn(this.navItems$, this.open$, this.overlay$, this.expanded$);
|
|
14728
|
+
}
|
|
14729
|
+
/** A group header toggles while the rail is open; anything else navigates. */
|
|
14730
|
+
activate(item) {
|
|
14731
|
+
if (item.group && this.open$.value) {
|
|
14732
|
+
this.toggleGroup(item);
|
|
14733
|
+
}
|
|
14734
|
+
else {
|
|
14735
|
+
// A group on the collapsed rail navigates to its own place, and the router's
|
|
14736
|
+
// redirectToFirstChild lands on the child visited last (rememberLastChild), or else the first
|
|
14737
|
+
// authorised one.
|
|
14738
|
+
this.navigateTo(item.place);
|
|
14739
|
+
}
|
|
14740
|
+
}
|
|
14741
|
+
navigateTo(place) {
|
|
14742
|
+
this.placeRouter.navigate(place.component);
|
|
14743
|
+
}
|
|
14744
|
+
toggleMenu() {
|
|
14745
|
+
this.pin(!this.expanded);
|
|
14565
14746
|
}
|
|
14566
14747
|
expandMenu() {
|
|
14567
|
-
this.
|
|
14748
|
+
this.pin(true);
|
|
14568
14749
|
}
|
|
14569
14750
|
collapseMenu() {
|
|
14570
|
-
this.
|
|
14751
|
+
this.pin(false);
|
|
14571
14752
|
}
|
|
14572
|
-
|
|
14573
|
-
|
|
14753
|
+
onRailEnter(event) {
|
|
14754
|
+
// A touch has no hover: a tap on the collapsed rail navigates, and expanding over the content
|
|
14755
|
+
// afterwards would leave the rail covering whatever the next tap was meant for.
|
|
14756
|
+
if (this.expanded || event?.pointerType === 'touch') {
|
|
14757
|
+
return;
|
|
14758
|
+
}
|
|
14759
|
+
this.clearHoverTimer();
|
|
14760
|
+
this.hoverTimer = setTimeout(() => this.hovering$.value = true, this.hoverExpandDelay);
|
|
14761
|
+
}
|
|
14762
|
+
onRailLeave() {
|
|
14763
|
+
this.clearHoverTimer();
|
|
14764
|
+
if (this.hovering$.value) {
|
|
14765
|
+
this.hoverTimer = setTimeout(() => this.hovering$.value = false, HOVER_COLLAPSE_DELAY);
|
|
14766
|
+
}
|
|
14767
|
+
}
|
|
14768
|
+
toggleGroup(item) {
|
|
14769
|
+
// The group holding the current place is always open.
|
|
14770
|
+
if (item.current) {
|
|
14771
|
+
return;
|
|
14772
|
+
}
|
|
14773
|
+
const openGroups = new Set(this.openGroups$.value);
|
|
14774
|
+
if (!openGroups.delete(item.place)) {
|
|
14775
|
+
openGroups.add(item.place);
|
|
14776
|
+
}
|
|
14777
|
+
this.openGroups$.value = openGroups;
|
|
14778
|
+
}
|
|
14779
|
+
openGroup(place) {
|
|
14780
|
+
if (place && !this.openGroups$.value.has(place)) {
|
|
14781
|
+
this.openGroups$.value = new Set(this.openGroups$.value).add(place);
|
|
14782
|
+
}
|
|
14783
|
+
}
|
|
14784
|
+
pin(expanded) {
|
|
14785
|
+
this.clearHoverTimer();
|
|
14786
|
+
this.hovering$.value = false;
|
|
14787
|
+
this.expanded = expanded;
|
|
14788
|
+
this.writePinnedState(expanded);
|
|
14789
|
+
}
|
|
14790
|
+
clearHoverTimer() {
|
|
14791
|
+
if (this.hoverTimer !== undefined) {
|
|
14792
|
+
clearTimeout(this.hoverTimer);
|
|
14793
|
+
this.hoverTimer = undefined;
|
|
14794
|
+
}
|
|
14795
|
+
}
|
|
14796
|
+
restorePinnedState() {
|
|
14797
|
+
// Without the Menu row the user can't have chosen, so there is nothing to restore.
|
|
14798
|
+
if (!this.collapsible || !this.persistKey) {
|
|
14799
|
+
return;
|
|
14800
|
+
}
|
|
14801
|
+
const stored = this.readStorage(this.persistKey);
|
|
14802
|
+
if (stored === 'true' || stored === 'false') {
|
|
14803
|
+
this.expanded = stored === 'true';
|
|
14804
|
+
}
|
|
14805
|
+
}
|
|
14806
|
+
writePinnedState(expanded) {
|
|
14807
|
+
if (this.persistKey) {
|
|
14808
|
+
try {
|
|
14809
|
+
localStorage.setItem(this.persistKey, String(expanded));
|
|
14810
|
+
}
|
|
14811
|
+
catch {
|
|
14812
|
+
// Storage is unavailable (private mode, blocked site data): the rail still works, it just
|
|
14813
|
+
// won't remember.
|
|
14814
|
+
}
|
|
14815
|
+
}
|
|
14816
|
+
}
|
|
14817
|
+
readStorage(key) {
|
|
14818
|
+
try {
|
|
14819
|
+
return localStorage.getItem(key);
|
|
14820
|
+
}
|
|
14821
|
+
catch {
|
|
14822
|
+
return null;
|
|
14823
|
+
}
|
|
14574
14824
|
}
|
|
14575
14825
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SidePlaceNavigationComponent, deps: [{ token: PlaceRouter }], target: i0.ɵɵFactoryTarget.Component });
|
|
14576
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SidePlaceNavigationComponent, selector: "aup-side-place-navigation", inputs: { expanded$: "expanded$", expanded: "expanded" }, host: { properties: { "class.expanded": "this.expanded" } }, queries: [{ propertyName: "navEndTemplate", first: true, predicate: ["navEndTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<
|
|
14826
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SidePlaceNavigationComponent, selector: "aup-side-place-navigation", inputs: { expanded$: "expanded$", expanded: "expanded", collapsible: "collapsible", hoverExpandDelay: "hoverExpandDelay", persistKey: "persistKey" }, host: { properties: { "class.expanded": "this.expanded" } }, queries: [{ propertyName: "navEndTemplate", first: true, predicate: ["navEndTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<nav class=\"rail\"\n [class.open]=\"open$.value\"\n [class.overlay]=\"overlay$.value\"\n (pointerenter)=\"onRailEnter($event)\"\n (pointerleave)=\"onRailLeave()\">\n\n <button *ngIf=\"collapsible\" type=\"button\" class=\"menu-toggle\"\n [attr.aria-expanded]=\"expanded\"\n (click)=\"toggleMenu()\">\n <span class=\"icon\"><aup-icon [icon]=\"expanded ? 'mat:menu_open' : 'mat:menu'\"></aup-icon></span>\n <span class=\"label\">Menu</span>\n </button>\n\n <ul class=\"items\" [@.disabled]=\"animationsDisabled\">\n <li *ngFor=\"let item of navItems$.value; trackBy: trackByNavItem\">\n <!-- A group standing in for its hidden current child is the current item, not the page. -->\n <button type=\"button\" class=\"item\"\n [class.current]=\"item.current\"\n [class.highlighted]=\"item.highlighted\"\n [title]=\"item.face.text()\"\n [attr.aria-expanded]=\"item.group ? item.showChildren : null\"\n [attr.aria-controls]=\"item.group ? item.childListId : null\"\n [attr.aria-current]=\"item.highlighted ? (item.group ? 'true' : 'page') : null\"\n (click)=\"activate(item)\">\n <span class=\"icon\"><aup-icon *ngIf=\"item.face.icon()\" [icon]=\"item.face.icon()\"></aup-icon></span>\n <span class=\"label\">{{item.face.text()}}</span>\n <aup-icon *ngIf=\"item.group\" class=\"chevron\" [class.open]=\"item.showChildren\" icon=\"mat:expand_more\"></aup-icon>\n </button>\n\n <!-- Always present, so the header's aria-controls names a real element while it's closed. -->\n <div *ngIf=\"item.group\" [id]=\"item.childListId\">\n <ul *ngIf=\"item.showChildren\" class=\"children\" [@slideDownOnEnter]=\"childListAnimation\">\n <li *ngFor=\"let child of item.children; trackBy: trackByNavChild\">\n <button type=\"button\" class=\"child\"\n [class.current]=\"child.current\"\n [attr.aria-current]=\"child.current ? 'page' : null\"\n (click)=\"navigateTo(child.place)\">{{child.face.text()}}</button>\n </li>\n </ul>\n </div>\n </li>\n </ul>\n\n <div *ngIf=\"navEndTemplate\" class=\"nav-end\">\n <ng-container [ngTemplateOutlet]=\"navEndTemplate\"></ng-container>\n </div>\n</nav>\n", styles: [":host{--resolved-width: var(--nav-width, 56px);--resolved-expanded-width: var(--nav-expanded-width, 232px);--resolved-background-color: var(--nav-background-color, #555);--resolved-color: var(--nav-color, #fff);--resolved-item-color: var(--nav-item-color, #eee);--resolved-child-color: var(--nav-child-color, #d0d0d0);--resolved-current-background: var(--nav-current-background, #3a3a3a);--resolved-hover-background: var(--nav-hover-background, #4c4c4c);--resolved-chevron-color: var(--nav-chevron-color, #bdbdbd);--resolved-current-chevron-color: var(--nav-current-chevron-color, #757575);--resolved-focus-color: var(--nav-focus-color, rgba(255, 255, 255, .6));display:block;position:relative;z-index:var(--nav-z-index, 100);flex:none;width:var(--resolved-width);transition:width .22s ease}:host.expanded{width:var(--resolved-expanded-width)}.rail{position:absolute;inset:0 auto 0 0;width:var(--resolved-width);display:flex;flex-direction:column;overflow:hidden;color:var(--resolved-color);background-color:var(--resolved-background-color);box-shadow:none;transition:width .22s ease,box-shadow .22s ease}.rail.open{width:var(--resolved-expanded-width)}.rail.overlay{box-shadow:var(--nav-overlay-shadow, 6px 0 18px rgba(0, 0, 0, .28))}ul{list-style:none;margin:0;padding:0}.items{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto}.menu-toggle,.item,.child{appearance:none;box-sizing:border-box;width:100%;margin:0;border:0;border-radius:0;color:inherit;background:transparent;font:inherit;text-align:left;white-space:nowrap;cursor:pointer}.menu-toggle:hover,.item:hover,.child:hover{background-color:var(--resolved-hover-background)}.menu-toggle:focus-visible,.item:focus-visible,.child:focus-visible{outline:2px solid var(--resolved-focus-color);outline-offset:-2px}.menu-toggle,.item{display:flex;align-items:center;gap:16px;padding:0 18px;font-size:14px}.menu-toggle{flex:none;height:48px}.item{height:40px;color:var(--resolved-item-color);font-weight:400}.item.current{color:var(--resolved-color);font-weight:500}.item.highlighted:not(:hover){background-color:var(--resolved-current-background)}.icon{flex:none;display:inline-flex;width:20px;height:20px;--aup-icon-size: 20px}.label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;opacity:0;transition:opacity .22s ease}.chevron{--aup-icon-size: 18px;flex:none;color:var(--resolved-chevron-color);opacity:0;transform:rotate(-90deg);transition:transform .22s ease,opacity .22s ease}.chevron.open{transform:none}.item.current .chevron{color:var(--resolved-current-chevron-color)}.rail.open .label,.rail.open .chevron{opacity:1}.children{overflow:hidden}.child{display:block;height:34px;line-height:34px;padding:0 16px 0 54px;overflow:hidden;text-overflow:ellipsis;color:var(--resolved-child-color);font-size:13px;font-weight:400}.child.current{color:var(--resolved-color);font-weight:500}.child.current:not(:hover){background-color:var(--resolved-current-background)}.nav-end{flex:none}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "aup-icon", inputs: ["icon"] }], animations: [slideDownOnEnterAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14577
14827
|
}
|
|
14578
14828
|
__decorate([
|
|
14579
14829
|
Proxify(),
|
|
@@ -14585,7 +14835,7 @@ __decorate([
|
|
|
14585
14835
|
], SidePlaceNavigationComponent.prototype, "expanded", null);
|
|
14586
14836
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SidePlaceNavigationComponent, decorators: [{
|
|
14587
14837
|
type: Component,
|
|
14588
|
-
args: [{ selector: 'aup-side-place-navigation', template: "<
|
|
14838
|
+
args: [{ selector: 'aup-side-place-navigation', changeDetection: ChangeDetectionStrategy.OnPush, animations: [slideDownOnEnterAnimation], template: "<nav class=\"rail\"\n [class.open]=\"open$.value\"\n [class.overlay]=\"overlay$.value\"\n (pointerenter)=\"onRailEnter($event)\"\n (pointerleave)=\"onRailLeave()\">\n\n <button *ngIf=\"collapsible\" type=\"button\" class=\"menu-toggle\"\n [attr.aria-expanded]=\"expanded\"\n (click)=\"toggleMenu()\">\n <span class=\"icon\"><aup-icon [icon]=\"expanded ? 'mat:menu_open' : 'mat:menu'\"></aup-icon></span>\n <span class=\"label\">Menu</span>\n </button>\n\n <ul class=\"items\" [@.disabled]=\"animationsDisabled\">\n <li *ngFor=\"let item of navItems$.value; trackBy: trackByNavItem\">\n <!-- A group standing in for its hidden current child is the current item, not the page. -->\n <button type=\"button\" class=\"item\"\n [class.current]=\"item.current\"\n [class.highlighted]=\"item.highlighted\"\n [title]=\"item.face.text()\"\n [attr.aria-expanded]=\"item.group ? item.showChildren : null\"\n [attr.aria-controls]=\"item.group ? item.childListId : null\"\n [attr.aria-current]=\"item.highlighted ? (item.group ? 'true' : 'page') : null\"\n (click)=\"activate(item)\">\n <span class=\"icon\"><aup-icon *ngIf=\"item.face.icon()\" [icon]=\"item.face.icon()\"></aup-icon></span>\n <span class=\"label\">{{item.face.text()}}</span>\n <aup-icon *ngIf=\"item.group\" class=\"chevron\" [class.open]=\"item.showChildren\" icon=\"mat:expand_more\"></aup-icon>\n </button>\n\n <!-- Always present, so the header's aria-controls names a real element while it's closed. -->\n <div *ngIf=\"item.group\" [id]=\"item.childListId\">\n <ul *ngIf=\"item.showChildren\" class=\"children\" [@slideDownOnEnter]=\"childListAnimation\">\n <li *ngFor=\"let child of item.children; trackBy: trackByNavChild\">\n <button type=\"button\" class=\"child\"\n [class.current]=\"child.current\"\n [attr.aria-current]=\"child.current ? 'page' : null\"\n (click)=\"navigateTo(child.place)\">{{child.face.text()}}</button>\n </li>\n </ul>\n </div>\n </li>\n </ul>\n\n <div *ngIf=\"navEndTemplate\" class=\"nav-end\">\n <ng-container [ngTemplateOutlet]=\"navEndTemplate\"></ng-container>\n </div>\n</nav>\n", styles: [":host{--resolved-width: var(--nav-width, 56px);--resolved-expanded-width: var(--nav-expanded-width, 232px);--resolved-background-color: var(--nav-background-color, #555);--resolved-color: var(--nav-color, #fff);--resolved-item-color: var(--nav-item-color, #eee);--resolved-child-color: var(--nav-child-color, #d0d0d0);--resolved-current-background: var(--nav-current-background, #3a3a3a);--resolved-hover-background: var(--nav-hover-background, #4c4c4c);--resolved-chevron-color: var(--nav-chevron-color, #bdbdbd);--resolved-current-chevron-color: var(--nav-current-chevron-color, #757575);--resolved-focus-color: var(--nav-focus-color, rgba(255, 255, 255, .6));display:block;position:relative;z-index:var(--nav-z-index, 100);flex:none;width:var(--resolved-width);transition:width .22s ease}:host.expanded{width:var(--resolved-expanded-width)}.rail{position:absolute;inset:0 auto 0 0;width:var(--resolved-width);display:flex;flex-direction:column;overflow:hidden;color:var(--resolved-color);background-color:var(--resolved-background-color);box-shadow:none;transition:width .22s ease,box-shadow .22s ease}.rail.open{width:var(--resolved-expanded-width)}.rail.overlay{box-shadow:var(--nav-overlay-shadow, 6px 0 18px rgba(0, 0, 0, .28))}ul{list-style:none;margin:0;padding:0}.items{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto}.menu-toggle,.item,.child{appearance:none;box-sizing:border-box;width:100%;margin:0;border:0;border-radius:0;color:inherit;background:transparent;font:inherit;text-align:left;white-space:nowrap;cursor:pointer}.menu-toggle:hover,.item:hover,.child:hover{background-color:var(--resolved-hover-background)}.menu-toggle:focus-visible,.item:focus-visible,.child:focus-visible{outline:2px solid var(--resolved-focus-color);outline-offset:-2px}.menu-toggle,.item{display:flex;align-items:center;gap:16px;padding:0 18px;font-size:14px}.menu-toggle{flex:none;height:48px}.item{height:40px;color:var(--resolved-item-color);font-weight:400}.item.current{color:var(--resolved-color);font-weight:500}.item.highlighted:not(:hover){background-color:var(--resolved-current-background)}.icon{flex:none;display:inline-flex;width:20px;height:20px;--aup-icon-size: 20px}.label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;opacity:0;transition:opacity .22s ease}.chevron{--aup-icon-size: 18px;flex:none;color:var(--resolved-chevron-color);opacity:0;transform:rotate(-90deg);transition:transform .22s ease,opacity .22s ease}.chevron.open{transform:none}.item.current .chevron{color:var(--resolved-current-chevron-color)}.rail.open .label,.rail.open .chevron{opacity:1}.children{overflow:hidden}.child{display:block;height:34px;line-height:34px;padding:0 16px 0 54px;overflow:hidden;text-overflow:ellipsis;color:var(--resolved-child-color);font-size:13px;font-weight:400}.child.current{color:var(--resolved-color);font-weight:500}.child.current:not(:hover){background-color:var(--resolved-current-background)}.nav-end{flex:none}\n"] }]
|
|
14589
14839
|
}], ctorParameters: function () { return [{ type: PlaceRouter }]; }, propDecorators: { expanded$: [{
|
|
14590
14840
|
type: Input
|
|
14591
14841
|
}], expanded: [{
|
|
@@ -14593,6 +14843,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
14593
14843
|
}, {
|
|
14594
14844
|
type: HostBinding,
|
|
14595
14845
|
args: ['class.expanded']
|
|
14846
|
+
}], collapsible: [{
|
|
14847
|
+
type: Input
|
|
14848
|
+
}], hoverExpandDelay: [{
|
|
14849
|
+
type: Input
|
|
14850
|
+
}], persistKey: [{
|
|
14851
|
+
type: Input
|
|
14596
14852
|
}],
|
|
14597
14853
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TemplateRef<any> is the Angular convention for ng-template refs
|
|
14598
14854
|
navEndTemplate: [{
|
|
@@ -14617,15 +14873,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
14617
14873
|
* --aup-tab-nav-selected-color: <accent>; // selected label
|
|
14618
14874
|
* --aup-tab-nav-hover-color: #212121; // unselected label on hover
|
|
14619
14875
|
* --aup-tab-nav-hover-background: rgba(63, 81, 181, 0.07);
|
|
14620
|
-
* --aup-tab-nav-bar-background: #
|
|
14876
|
+
* --aup-tab-nav-bar-background: #fff; // folder: the strip behind the tabs
|
|
14621
14877
|
* --aup-tab-nav-inset: 8px; // folder: space before the first tab
|
|
14622
14878
|
* --aup-tab-nav-page-background: var(--aup-default-background, #fff); // folder: the page colour;
|
|
14623
14879
|
* // the selected tab takes it so the two join up
|
|
14624
|
-
* --aup-tab-nav-edge-color:
|
|
14880
|
+
* --aup-tab-nav-edge-color: <--pinstripe-border-color, else rgba(0,0,0,.2)>; // folder: selected
|
|
14881
|
+
* // tab outline and join line
|
|
14625
14882
|
* --aup-tab-nav-top-line-width: 2px; // folder: accent line on the selected tab
|
|
14626
14883
|
* --aup-tab-nav-label-padding-bottom: 0 | 8px; // folder: room under the label (8px when the
|
|
14627
14884
|
* // tab has an icon, so it balances the top line)
|
|
14628
|
-
* --aup-tab-nav-segment-track-background: <bar-background>; // segmented:
|
|
14885
|
+
* --aup-tab-nav-segment-track-background: <bar-background if set, else #f0f2f5>; // segmented: track
|
|
14629
14886
|
* --aup-tab-nav-segment-border-color: #d9dce2; // segmented: the track outline
|
|
14630
14887
|
* --aup-tab-nav-segment-selected-background: #fff; // segmented: the sliding highlight
|
|
14631
14888
|
* --aup-tab-nav-segmented-padding: 12px 12px 4px; // segmented: space around the control
|
|
@@ -14675,11 +14932,11 @@ class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {
|
|
|
14675
14932
|
}, { initialValue: "triggerChange" });
|
|
14676
14933
|
}
|
|
14677
14934
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TabbedPlaceNavigationComponent, deps: [{ token: PlaceRouter }], target: i0.ɵɵFactoryTarget.Component });
|
|
14678
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: TabbedPlaceNavigationComponent, selector: "aup-tabbed-place-navigation", inputs: { appearance: "appearance" }, host: { properties: { "attr.appearance": "this.appearance", "@.disabled": "this.animationsDisabled" } }, usesInheritance: true, ngImport: i0, template: "<!-- Declared BEFORE the nav that references it: the nav lives in an *ngIf embedded view, and a\n template ref declared after it can be unresolved on that view's first render. -->\n<mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>\n<!-- Tabs keep their natural width, packed to the left; Material stretches them to fill by default. -->\n<nav mat-tab-nav-bar [mat-stretch-tabs]=\"false\" [tabPanel]=\"tabPanel\"\n *ngIf=\"!hidden$.value\" [@slideDownOnEnter]>\n <ng-content select=\"[nav-start]\"></ng-content>\n <a mat-tab-link *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n aup-gc #gc=\"aup-gc\"\n [pectinCommand]=\"commandFactory.create(item.place, {disposedWith: gc})\"\n [active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n <ng-content select=\"[nav-end]\"></ng-content>\n</nav>\n", styles: [":host{display:block}nav{overflow:hidden}:host([appearance=folder]) nav.mat-mdc-tab-nav-bar{--mat-tab-header-label-text-tracking: normal;--mat-tab-header-inactive-label-text-color: var(--aup-tab-nav-color, #6b6f76);--mat-tab-header-inactive-hover-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-inactive-focus-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-active-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-hover-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-focus-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mdc-secondary-navigation-tab-container-height: 38px;background:var(--aup-tab-nav-bar-background, #
|
|
14935
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: TabbedPlaceNavigationComponent, selector: "aup-tabbed-place-navigation", inputs: { appearance: "appearance" }, host: { properties: { "attr.appearance": "this.appearance", "@.disabled": "this.animationsDisabled" } }, usesInheritance: true, ngImport: i0, template: "<!-- Declared BEFORE the nav that references it: the nav lives in an *ngIf embedded view, and a\n template ref declared after it can be unresolved on that view's first render. -->\n<mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>\n<!-- Tabs keep their natural width, packed to the left; Material stretches them to fill by default. -->\n<nav mat-tab-nav-bar [mat-stretch-tabs]=\"false\" [tabPanel]=\"tabPanel\"\n *ngIf=\"!hidden$.value\" [@slideDownOnEnter]>\n <ng-content select=\"[nav-start]\"></ng-content>\n <a mat-tab-link *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n aup-gc #gc=\"aup-gc\"\n [pectinCommand]=\"commandFactory.create(item.place, {disposedWith: gc})\"\n [active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n <ng-content select=\"[nav-end]\"></ng-content>\n</nav>\n", styles: [":host{display:block}nav{overflow:hidden}:host([appearance=folder]) nav.mat-mdc-tab-nav-bar{--mat-tab-header-label-text-tracking: normal;--mat-tab-header-inactive-label-text-color: var(--aup-tab-nav-color, #6b6f76);--mat-tab-header-inactive-hover-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-inactive-focus-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-active-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-hover-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-focus-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mdc-secondary-navigation-tab-container-height: 38px;background:var(--aup-tab-nav-bar-background, #fff);padding-top:6px;padding-left:var(--aup-tab-nav-inset, 8px);box-shadow:inset 0 -1px 0 var(--aup-tab-nav-edge-color, var(--pinstripe-border-color, rgba(0, 0, 0, .2)))}:host([appearance=folder]) .mat-mdc-tab-link{position:relative;min-width:0;padding:0 12px var(--aup-tab-nav-label-padding-bottom, 0);margin-right:2px;border:1px solid transparent;border-bottom:0;border-radius:10px 10px 0 0;transition:background-color .12s linear}:host([appearance=folder]) .mat-mdc-tab-link:has(aup-icon){padding-bottom:var(--aup-tab-nav-label-padding-bottom, 8px)}:host([appearance=folder]) .mat-mdc-tab-link:hover:not(.mdc-tab--active){background-color:var(--aup-tab-nav-hover-background, rgba(63, 81, 181, .07))}:host([appearance=folder]) .mat-mdc-tab-link.mdc-tab--active{background-color:var(--aup-tab-nav-page-background, var(--aup-default-background, #fff));border-color:var(--aup-tab-nav-edge-color, var(--pinstripe-border-color, rgba(0, 0, 0, .2)));font-weight:700}:host([appearance=folder]) .mat-mdc-tab-link.mdc-tab--active:after{content:\"\";position:absolute;inset:-1px -1px 0;border-radius:10px 10px 0 0;background:linear-gradient(var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)) 0 var(--aup-tab-nav-top-line-width, 2px),transparent 0);pointer-events:none}:host([appearance=folder]) ::ng-deep .mdc-tab-indicator{display:none}:host([appearance=folder]) ::ng-deep .mdc-tab__content{height:100%}:host([appearance=folder]) ::ng-deep .mdc-tab__ripple,:host([appearance=folder]) ::ng-deep .mat-mdc-tab-ripple{display:none}:host([appearance=segmented]) nav.mat-mdc-tab-nav-bar{--mat-tab-header-label-text-tracking: normal;--mat-tab-header-inactive-label-text-color: var(--aup-tab-nav-color, #6b6f76);--mat-tab-header-inactive-hover-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-inactive-focus-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-active-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-hover-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-focus-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));margin:var(--aup-tab-nav-segmented-padding, 12px 12px 4px);--mdc-secondary-navigation-tab-container-height: 26px;display:inline-flex;max-width:100%;padding:3px;border:1px solid var(--aup-tab-nav-segment-border-color, #d9dce2);border-radius:9px;background:var(--aup-tab-nav-segment-track-background, var(--aup-tab-nav-bar-background, #f0f2f5))}:host([appearance=segmented]) .mat-mdc-tab-link{min-width:0;padding:0 12px;border-radius:6px;font-size:13px}:host([appearance=segmented]) .mat-mdc-tab-link+.mat-mdc-tab-link{margin-left:2px}:host([appearance=segmented]) .mat-mdc-tab-link.mdc-tab--active{font-weight:700}:host([appearance=segmented]) ::ng-deep .mdc-tab-indicator__content--underline{align-self:stretch;height:100%;border:0;border-radius:6px;background:var(--aup-tab-nav-segment-selected-background, #fff);box-shadow:0 1px 2px #00000024,0 1px 4px #0000000f}:host([appearance=segmented]) ::ng-deep .mdc-tab__ripple,:host([appearance=segmented]) ::ng-deep .mat-mdc-tab-ripple{display:none}:host([appearance=tonal]) nav.mat-mdc-tab-nav-bar{--mat-tab-header-label-text-tracking: normal;--mat-tab-header-inactive-label-text-color: var(--aup-tab-nav-color, #6b6f76);--mat-tab-header-inactive-hover-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-inactive-focus-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-active-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-hover-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-focus-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));padding:var(--aup-tab-nav-tonal-padding, 8px 12px);background:var(--aup-tab-nav-page-background, var(--aup-default-background, #fff));border-bottom:1px solid var(--aup-tab-nav-underline-color, #d9dce2);--mdc-secondary-navigation-tab-container-height: 30px}:host([appearance=tonal]) .mat-mdc-tab-link{min-width:0;padding:0 12px;border-radius:6px;font-size:13px;transition:background-color .12s linear}:host([appearance=tonal]) .mat-mdc-tab-link+.mat-mdc-tab-link{margin-left:2px}:host([appearance=tonal]) .mat-mdc-tab-link:hover:not(.mdc-tab--active){background-color:var(--aup-tab-nav-hover-background, rgba(63, 81, 181, .07))}:host([appearance=tonal]) .mat-mdc-tab-link.mdc-tab--active{font-weight:700}:host([appearance=tonal]) ::ng-deep .mdc-tab-indicator__content--underline{align-self:stretch;height:100%;border:0;border-radius:6px;background:var(--aup-tab-nav-tonal-selected-background, var(--aup-tab-nav-theme-accent-soft, #e8eaf6))}:host([appearance=tonal]) ::ng-deep .mdc-tab__ripple,:host([appearance=tonal]) ::ng-deep .mat-mdc-tab-ripple{display:none}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "animationDuration"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "component", type: i3$2.MatTabNavPanel, selector: "mat-tab-nav-panel", inputs: ["id"], exportAs: ["matTabNavPanel"] }, { kind: "component", type: i3$2.MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["disabled", "disableRipple", "tabIndex", "active", "id"], exportAs: ["matTabLink"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter", "preventDefault"] }, { kind: "directive", type: GarbageCollectorDirective, selector: "[aup-gc]", exportAs: ["aup-gc"] }, { kind: "component", type: CommandFaceComponent, selector: "aup-command-face", inputs: ["faces", "face", "ignoreIcon", "ignoreText", "includeMissingIconInLayout"] }], animations: [slideDownOnEnterAnimation] });
|
|
14679
14936
|
}
|
|
14680
14937
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TabbedPlaceNavigationComponent, decorators: [{
|
|
14681
14938
|
type: Component,
|
|
14682
|
-
args: [{ selector: 'aup-tabbed-place-navigation', animations: [slideDownOnEnterAnimation], template: "<!-- Declared BEFORE the nav that references it: the nav lives in an *ngIf embedded view, and a\n template ref declared after it can be unresolved on that view's first render. -->\n<mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>\n<!-- Tabs keep their natural width, packed to the left; Material stretches them to fill by default. -->\n<nav mat-tab-nav-bar [mat-stretch-tabs]=\"false\" [tabPanel]=\"tabPanel\"\n *ngIf=\"!hidden$.value\" [@slideDownOnEnter]>\n <ng-content select=\"[nav-start]\"></ng-content>\n <a mat-tab-link *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n aup-gc #gc=\"aup-gc\"\n [pectinCommand]=\"commandFactory.create(item.place, {disposedWith: gc})\"\n [active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n <ng-content select=\"[nav-end]\"></ng-content>\n</nav>\n", styles: [":host{display:block}nav{overflow:hidden}:host([appearance=folder]) nav.mat-mdc-tab-nav-bar{--mat-tab-header-label-text-tracking: normal;--mat-tab-header-inactive-label-text-color: var(--aup-tab-nav-color, #6b6f76);--mat-tab-header-inactive-hover-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-inactive-focus-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-active-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-hover-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-focus-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mdc-secondary-navigation-tab-container-height: 38px;background:var(--aup-tab-nav-bar-background, #
|
|
14939
|
+
args: [{ selector: 'aup-tabbed-place-navigation', animations: [slideDownOnEnterAnimation], template: "<!-- Declared BEFORE the nav that references it: the nav lives in an *ngIf embedded view, and a\n template ref declared after it can be unresolved on that view's first render. -->\n<mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>\n<!-- Tabs keep their natural width, packed to the left; Material stretches them to fill by default. -->\n<nav mat-tab-nav-bar [mat-stretch-tabs]=\"false\" [tabPanel]=\"tabPanel\"\n *ngIf=\"!hidden$.value\" [@slideDownOnEnter]>\n <ng-content select=\"[nav-start]\"></ng-content>\n <a mat-tab-link *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n aup-gc #gc=\"aup-gc\"\n [pectinCommand]=\"commandFactory.create(item.place, {disposedWith: gc})\"\n [active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n <ng-content select=\"[nav-end]\"></ng-content>\n</nav>\n", styles: [":host{display:block}nav{overflow:hidden}:host([appearance=folder]) nav.mat-mdc-tab-nav-bar{--mat-tab-header-label-text-tracking: normal;--mat-tab-header-inactive-label-text-color: var(--aup-tab-nav-color, #6b6f76);--mat-tab-header-inactive-hover-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-inactive-focus-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-active-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-hover-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-focus-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mdc-secondary-navigation-tab-container-height: 38px;background:var(--aup-tab-nav-bar-background, #fff);padding-top:6px;padding-left:var(--aup-tab-nav-inset, 8px);box-shadow:inset 0 -1px 0 var(--aup-tab-nav-edge-color, var(--pinstripe-border-color, rgba(0, 0, 0, .2)))}:host([appearance=folder]) .mat-mdc-tab-link{position:relative;min-width:0;padding:0 12px var(--aup-tab-nav-label-padding-bottom, 0);margin-right:2px;border:1px solid transparent;border-bottom:0;border-radius:10px 10px 0 0;transition:background-color .12s linear}:host([appearance=folder]) .mat-mdc-tab-link:has(aup-icon){padding-bottom:var(--aup-tab-nav-label-padding-bottom, 8px)}:host([appearance=folder]) .mat-mdc-tab-link:hover:not(.mdc-tab--active){background-color:var(--aup-tab-nav-hover-background, rgba(63, 81, 181, .07))}:host([appearance=folder]) .mat-mdc-tab-link.mdc-tab--active{background-color:var(--aup-tab-nav-page-background, var(--aup-default-background, #fff));border-color:var(--aup-tab-nav-edge-color, var(--pinstripe-border-color, rgba(0, 0, 0, .2)));font-weight:700}:host([appearance=folder]) .mat-mdc-tab-link.mdc-tab--active:after{content:\"\";position:absolute;inset:-1px -1px 0;border-radius:10px 10px 0 0;background:linear-gradient(var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)) 0 var(--aup-tab-nav-top-line-width, 2px),transparent 0);pointer-events:none}:host([appearance=folder]) ::ng-deep .mdc-tab-indicator{display:none}:host([appearance=folder]) ::ng-deep .mdc-tab__content{height:100%}:host([appearance=folder]) ::ng-deep .mdc-tab__ripple,:host([appearance=folder]) ::ng-deep .mat-mdc-tab-ripple{display:none}:host([appearance=segmented]) nav.mat-mdc-tab-nav-bar{--mat-tab-header-label-text-tracking: normal;--mat-tab-header-inactive-label-text-color: var(--aup-tab-nav-color, #6b6f76);--mat-tab-header-inactive-hover-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-inactive-focus-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-active-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-hover-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-focus-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));margin:var(--aup-tab-nav-segmented-padding, 12px 12px 4px);--mdc-secondary-navigation-tab-container-height: 26px;display:inline-flex;max-width:100%;padding:3px;border:1px solid var(--aup-tab-nav-segment-border-color, #d9dce2);border-radius:9px;background:var(--aup-tab-nav-segment-track-background, var(--aup-tab-nav-bar-background, #f0f2f5))}:host([appearance=segmented]) .mat-mdc-tab-link{min-width:0;padding:0 12px;border-radius:6px;font-size:13px}:host([appearance=segmented]) .mat-mdc-tab-link+.mat-mdc-tab-link{margin-left:2px}:host([appearance=segmented]) .mat-mdc-tab-link.mdc-tab--active{font-weight:700}:host([appearance=segmented]) ::ng-deep .mdc-tab-indicator__content--underline{align-self:stretch;height:100%;border:0;border-radius:6px;background:var(--aup-tab-nav-segment-selected-background, #fff);box-shadow:0 1px 2px #00000024,0 1px 4px #0000000f}:host([appearance=segmented]) ::ng-deep .mdc-tab__ripple,:host([appearance=segmented]) ::ng-deep .mat-mdc-tab-ripple{display:none}:host([appearance=tonal]) nav.mat-mdc-tab-nav-bar{--mat-tab-header-label-text-tracking: normal;--mat-tab-header-inactive-label-text-color: var(--aup-tab-nav-color, #6b6f76);--mat-tab-header-inactive-hover-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-inactive-focus-label-text-color: var(--aup-tab-nav-hover-color, #212121);--mat-tab-header-active-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-hover-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));--mat-tab-header-active-focus-label-text-color: var(--aup-tab-nav-selected-color, var(--aup-tab-nav-accent, var(--aup-tab-nav-theme-accent, #3f51b5)));padding:var(--aup-tab-nav-tonal-padding, 8px 12px);background:var(--aup-tab-nav-page-background, var(--aup-default-background, #fff));border-bottom:1px solid var(--aup-tab-nav-underline-color, #d9dce2);--mdc-secondary-navigation-tab-container-height: 30px}:host([appearance=tonal]) .mat-mdc-tab-link{min-width:0;padding:0 12px;border-radius:6px;font-size:13px;transition:background-color .12s linear}:host([appearance=tonal]) .mat-mdc-tab-link+.mat-mdc-tab-link{margin-left:2px}:host([appearance=tonal]) .mat-mdc-tab-link:hover:not(.mdc-tab--active){background-color:var(--aup-tab-nav-hover-background, rgba(63, 81, 181, .07))}:host([appearance=tonal]) .mat-mdc-tab-link.mdc-tab--active{font-weight:700}:host([appearance=tonal]) ::ng-deep .mdc-tab-indicator__content--underline{align-self:stretch;height:100%;border:0;border-radius:6px;background:var(--aup-tab-nav-tonal-selected-background, var(--aup-tab-nav-theme-accent-soft, #e8eaf6))}:host([appearance=tonal]) ::ng-deep .mdc-tab__ripple,:host([appearance=tonal]) ::ng-deep .mat-mdc-tab-ripple{display:none}\n"] }]
|
|
14683
14940
|
}], ctorParameters: function () { return [{ type: PlaceRouter }]; }, propDecorators: { appearance: [{
|
|
14684
14941
|
type: Input
|
|
14685
14942
|
}, {
|
|
@@ -15041,7 +15298,7 @@ var PlaceAccessGuard;
|
|
|
15041
15298
|
function Place(options) {
|
|
15042
15299
|
return (target) => {
|
|
15043
15300
|
if (PlaceComponent.isPlaceComponentConstructor(target)) {
|
|
15044
|
-
PlaceComponent.injectDefinition(target, new PlaceDefinition(target, options.path, isNil(options.authenticate) ? true : options.authenticate, options.role ?? options.roles, options.data, PlaceComponent.getRouteParameters(target), (options.children || []).map(c => PlaceComponent.getDefinition(c)), options.redirectToFirstChild ?? false, options.rememberLastChild ?? true));
|
|
15301
|
+
PlaceComponent.injectDefinition(target, new PlaceDefinition(target, options.path, isNil(options.authenticate) ? true : options.authenticate, options.role ?? options.roles, options.data, PlaceComponent.getRouteParameters(target), (options.children || []).map(c => PlaceComponent.getDefinition(c)), options.redirectToFirstChild ?? false, options.rememberLastChild ?? true, options.navDepth ?? 2));
|
|
15045
15302
|
if (options.roles) {
|
|
15046
15303
|
console.warn(`${target.name} @Place({roles: string[]}) is deprecated. Use @Place({role:any}) instead`);
|
|
15047
15304
|
}
|