From b6f60697200ea6a03cbae11e5d20fdbf4ff524fa Mon Sep 17 00:00:00 2001 From: dcaslin Date: Sun, 5 Apr 2026 10:53:58 -0400 Subject: [PATCH 1/2] Migrate to standalone components, remove all NgModules (#609) Run Angular standalone migration schematic (convert, prune, bootstrap), then manually delete all 15 remaining NgModule files (SharedModule, MilestoneCheckModule, 12 feature modules, AppRoutingModule). Move MAT_TOOLTIP_DEFAULT_OPTIONS to MilestoneCheckComponent providers. Convert bootstrapApplication to use provideRouter/provideServiceWorker. Delete Destroyable base class; simplify LoggedInGuard. Update CLAUDE.md and modernization plan. Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 17 +- docs/modernization-plan.md | 8 +- package.json | 2 +- src/app/about/about.module.ts | 14 - src/app/about/about/about.component.ts | 13 +- src/app/about/index.ts | 1 - src/app/app-routing.module.ts | 510 ------------------ src/app/app-status/app-status.component.ts | 11 +- src/app/app.component.ts | 71 ++- src/app/app.module.ts | 97 ---- src/app/app.routes.ts | 504 +++++++++++++++++ src/app/auth/auth.module.ts | 13 - src/app/auth/auth/auth.component.ts | 12 +- src/app/auth/index.ts | 1 - src/app/bungie-search/bungie-search.module.ts | 11 - .../bungie-search/bungie-search.component.ts | 20 +- src/app/bungie-search/index.ts | 1 - src/app/clan-search/clan-search.module.ts | 11 - .../clan-search/clan-search.component.ts | 19 +- src/app/clan-search/index.ts | 1 - .../clan-badges/clan-badges.component.ts | 12 +- .../clan-collection-badge-dialog.component.ts | 18 +- .../clan-collection-item-dialog.component.ts | 17 +- .../clan-collection-item.component.ts | 13 +- .../clan-collection-search.component.ts | 15 +- .../clan-collections.component.ts | 14 +- src/app/clan/clan-info/clan-info.component.ts | 16 +- .../clan-lifetime-dialog.component.ts | 19 +- .../clan-lifetime-graph.component.ts | 11 +- .../clan-lifetime/clan-lifetime.component.ts | 19 +- .../clan-members/clan-members.component.ts | 17 +- .../clan-milestones.component.ts | 17 +- .../clan-settings/clan-settings.component.ts | 17 +- .../clan-user-list-dialog.component.ts | 16 +- .../clan-seals/clan-seals.component.ts | 14 +- .../clan-triumph-graph.component.ts | 11 +- .../clan-triumph-item-dialog.component.ts | 18 +- .../clan-triumph-item.component.ts | 14 +- .../clan-triumph-seal-dialog.component.ts | 18 +- .../clan-triumph-search.component.ts | 15 +- .../clan-triumph-tracked.component.ts | 12 +- .../clan-triumphs/clan-triumphs.component.ts | 14 +- src/app/clan/clan.component.ts | 18 +- src/app/clan/clan.module.ts | 36 -- src/app/clan/index.ts | 1 - .../armor-compare-dialog.component.ts | 16 +- .../armor-deals/armor-deals.component.ts | 14 +- .../collection-deals.component.ts | 13 +- .../deals-container.component.ts | 14 +- src/app/deals/deals/deals.component.ts | 14 +- .../weapon-compare-dialog.component.ts | 18 +- .../weapon-deals/weapon-deals.component.ts | 12 +- src/app/friends/friends.module.ts | 11 - src/app/friends/friends/friends.component.ts | 19 +- src/app/friends/index.ts | 1 - .../gamer-tag-search.component.ts | 13 +- src/app/gear/gear.module.ts | 29 - .../armor-perks-dialog.component.ts | 15 +- .../bulk-operations-help-dialog.component.ts | 13 +- .../gear-compare-dialog.component.ts | 34 +- .../horizontal-sort.component.ts | 12 +- .../gear-help-dialog.component.ts | 13 +- .../gear/gear-toggle/gear-toggle.component.ts | 14 +- .../gear-utilities-dialog.component.ts | 27 +- src/app/gear/gear/gear.component.ts | 35 +- .../mod-helper-dialog.component.ts | 36 +- .../optimize-gun-perks-dialog.component.ts | 28 +- .../season-breakdown-dialog.component.ts | 18 +- .../select-mod-dialog.component.ts | 14 +- .../shard-mode-dialog.component.ts | 19 +- .../upgrade-mode-dialog.component.ts | 19 +- .../god-roll-item/god-roll-item.component.ts | 13 +- .../gear/god-roll-mw/god-roll-mw.component.ts | 14 +- .../god-roll-plug/god-roll-plug.component.ts | 14 +- src/app/gear/index.ts | 1 - .../possible-rolls-dialog.component.ts | 16 +- .../target-armor-stats-dialog.component.ts | 19 +- .../writable-plug/writable-plug.component.ts | 10 +- .../writable-sockets.component.ts | 10 +- src/app/guards/logged-in.guard.ts | 7 +- src/app/history/history.module.ts | 14 - src/app/history/history/history.component.ts | 26 +- src/app/history/index.ts | 1 - .../home/burn-dialog/burn-dialog.component.ts | 14 +- src/app/home/home.component.ts | 35 +- .../home/robot-home/robot-home.component.ts | 9 +- src/app/party/party.component.ts | 18 +- .../perk-bench-dialog.component.ts | 18 +- src/app/perkbench/perkbench.component.ts | 39 +- src/app/pgcr/index.ts | 1 - .../pgcr-entry-dialog.component.ts | 16 +- src/app/pgcr/pgcr.module.ts | 13 - src/app/pgcr/pgcr2/pgcr2.component.ts | 11 +- .../player-currencies.component.ts | 13 +- src/app/player/chars/chars.component.ts | 15 +- .../player/checklist/checklist.component.ts | 15 +- .../collection-badge.component.ts | 18 +- .../collection-badges.component.ts | 15 +- .../collection-search.component.ts | 16 +- .../collection-tree.component.ts | 20 +- .../collections/collections.component.ts | 14 +- src/app/player/index.ts | 1 - src/app/player/lifetime/lifetime.component.ts | 16 +- .../player-efficiency-graph.component.ts | 11 +- .../player/milestones/milestones.component.ts | 17 +- .../reward-desc/reward-desc.component.ts | 12 +- src/app/player/more/more.component.ts | 13 +- .../pl-bucket-dialog.component.ts | 14 +- src/app/player/player.component.ts | 21 +- src/app/player/player.module.ts | 46 -- .../progress-step-dialog.component.ts | 14 +- src/app/player/progress/progress.component.ts | 15 +- .../pursuit-list/pursuit-list.component.ts | 22 +- .../quest-dialog/quest-dialog.component.ts | 14 +- src/app/player/pursuits/pursuits.component.ts | 15 +- .../special-triumph-list.component.ts | 22 +- .../triumph-closest.component.ts | 20 +- .../triumph-objectives.component.ts | 13 +- .../triumph-seals/triumph-seals.component.ts | 19 +- .../triumph-search.component.ts | 18 +- .../triumph-seasons.component.ts | 19 +- .../triumph-tracked.component.ts | 16 +- .../triumph-tree/triumph-tree.component.ts | 22 +- src/app/player/triumphs/triumphs.component.ts | 15 +- src/app/privacy/privacy.component.ts | 9 +- src/app/recent-players/index.ts | 1 - .../recent-players/recent-players.module.ts | 12 - .../recent-players.component.ts | 22 +- src/app/settings/index.ts | 1 - src/app/settings/settings.module.ts | 13 - .../settings/settings/settings.component.ts | 18 +- src/app/shared/ad-slot/ad-slot.component.ts | 12 +- .../nitro-unit/nitro-unit.component.ts | 9 +- .../character-pursuit-dialog.component.ts | 7 +- src/app/shared/child.component.ts | 3 +- .../friend-star/friend-star.component.ts | 13 +- src/app/shared/index.ts | 1 - .../item-energy-indicator.component.ts | 14 +- .../shared/item-icon/item-icon.component.ts | 13 +- .../legendary-lost-sector.component.ts | 22 +- .../lost-sector-next-days.component.ts | 14 +- .../manifest-item-icon.component.ts | 11 +- .../milestone-check.component.ts | 22 +- .../milestone-check/milestone-check.module.ts | 28 - src/app/shared/pipe/index.ts | 2 +- src/app/shared/pipe/pipe.module.ts | 14 - src/app/shared/pipe/timing.pipe.ts | 20 +- .../season-indicator.component.ts | 13 +- src/app/shared/shared.module.ts | 174 ------ .../sign-in-required.component.ts | 14 +- .../sign-in-required.module.ts | 19 - .../signed-on-loading-icon.component.ts | 12 +- .../sort-indicator.component.ts | 12 +- .../triumph-name/triumph-name.component.ts | 13 +- src/app/testbed/testbed.component.ts | 9 +- .../uber-list-builder.component.ts | 26 +- .../uber-list-parent.component.ts | 16 +- .../uber-list-toggle.component.ts | 14 +- .../uber-list-view.component.ts | 21 +- .../uber-pursuit-check.component.ts | 16 +- .../uber-row-dialog.component.ts | 18 +- src/app/util/destroyable.ts | 15 - .../vendors-container.component.ts | 14 +- src/app/vendors/vendors/vendors.component.ts | 25 +- src/main.ts | 22 +- 165 files changed, 2108 insertions(+), 1666 deletions(-) delete mode 100644 src/app/about/about.module.ts delete mode 100644 src/app/app-routing.module.ts delete mode 100644 src/app/app.module.ts create mode 100644 src/app/app.routes.ts delete mode 100644 src/app/auth/auth.module.ts delete mode 100644 src/app/bungie-search/bungie-search.module.ts delete mode 100644 src/app/clan-search/clan-search.module.ts delete mode 100644 src/app/clan/clan.module.ts delete mode 100644 src/app/friends/friends.module.ts delete mode 100644 src/app/gear/gear.module.ts delete mode 100644 src/app/history/history.module.ts delete mode 100644 src/app/pgcr/index.ts delete mode 100644 src/app/pgcr/pgcr.module.ts delete mode 100644 src/app/player/player.module.ts delete mode 100644 src/app/recent-players/recent-players.module.ts delete mode 100644 src/app/settings/settings.module.ts delete mode 100644 src/app/shared/index.ts delete mode 100644 src/app/shared/milestone-check/milestone-check.module.ts delete mode 100644 src/app/shared/pipe/pipe.module.ts delete mode 100644 src/app/shared/shared.module.ts delete mode 100644 src/app/shared/sign-in-required/sign-in-required.module.ts delete mode 100644 src/app/util/destroyable.ts diff --git a/CLAUDE.md b/CLAUDE.md index 4a93cbd24..1d9855bd5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,7 +2,7 @@ ## Project overview -d2-checklist is the Angular front end for [d2checklist.com](https://www.d2checklist.com), a Destiny 2 companion app. It uses Angular 14, Angular Material, and the Bungie API. +d2-checklist is the Angular front end for [d2checklist.com](https://www.d2checklist.com), a Destiny 2 companion app. It uses Angular 18, Angular Material, and the Bungie API. ## Build and run @@ -22,20 +22,19 @@ ALWAYS bump the version in package.json for each new PR. If the bungie manifest - `src/app/` - Angular application source - `service/` - Core services (bungie.service, parse.service, gear.service, etc.) - - `shared/` - Shared module with reusable components, pipes, and utilities - - `player/`, `clan/`, `gear/`, `friends/`, `history/`, `vendors/`, `pgcr/` - Feature modules - - `app-routing.module.ts` - All routes - - `app.module.ts` - Root module declarations and providers + - `shared/` - Reusable standalone components, pipes, and utilities + - `player/`, `clan/`, `gear/`, `friends/`, `history/`, `vendors/`, `pgcr/` - Feature directories + - `app.routes.ts` - All routes and route guards + - `main.ts` - Bootstrap entry point (`bootstrapApplication`) - `src/environments/` - Environment configs; `keys.ts` (gitignored) holds Bungie API credentials - `src/assets/` - Static assets (JSON files tracked via git LFS) - `.github/workflows/` - CI/CD (deploy.yml, beta-deploy.yml) ## Key patterns -- Module-based Angular architecture (not standalone components) -- Many components extend `ChildComponent` (abstract base) for shared state/lifecycle -- Services are provided in `app.module.ts`, not `providedIn: 'root'` -- `SharedModule` re-exports Angular Material modules and common components +- Standalone component architecture (no NgModules) — each component imports its own dependencies +- Many components extend `ChildComponent` for shared state (delegates to `AppStateService`) +- Services use `providedIn: 'root'`; route guards provided in `main.ts` bootstrap - `parse.service.ts` is the largest file (~4k lines) - handles Bungie API response parsing ## Git LFS diff --git a/docs/modernization-plan.md b/docs/modernization-plan.md index 8f7b94792..a90df8fd8 100644 --- a/docs/modernization-plan.md +++ b/docs/modernization-plan.md @@ -129,7 +129,13 @@ Angular migrations must go one major version at a time: - [x] Angular 17 → 18 (`ng update @angular/core@18 @angular/cli@18`) ### 7c: Post-migration modernization -- [ ] Migrate key components to standalone (remove NgModule boilerplate) +- [x] Migrate key components to standalone (remove NgModule boilerplate) + - Ran Angular standalone migration schematic (3 steps: convert, prune, bootstrap) + - All 129 components now `standalone: true` with per-component imports + - Deleted all 15 NgModule files (SharedModule, MilestoneCheckModule, 12 feature modules, AppRoutingModule) + - `main.ts` uses `bootstrapApplication()` with `provideRouter()`, `provideServiceWorker()`, `provideHttpClient()`, `provideAnimations()` + - Moved `MAT_TOOLTIP_DEFAULT_OPTIONS` from MilestoneCheckModule to MilestoneCheckComponent providers + - Deleted `Destroyable` base class (replaced with direct subscription in LoggedInGuard) - [x] Replace `ChildComponent` base class with `DestroyRef` + `takeUntilDestroyed` - Created `AppStateService` for shared state (debugmode, disableAds, favorites, hiddenMilestones) - `ChildComponent` now uses `inject()` — no constructor params, delegates to `AppStateService` diff --git a/package.json b/package.json index b6fe4f3ba..6b7ad9c6f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "d2-checklist", - "version": "29.1.0", + "version": "29.2.0", "manifest": "242999.26.03.25.2000-1-bnet.64463", "license": "MIT", "scripts": { diff --git a/src/app/about/about.module.ts b/src/app/about/about.module.ts deleted file mode 100644 index 0ea763cda..000000000 --- a/src/app/about/about.module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { SharedModule } from '../shared'; - - -import { AboutComponent } from './about/about.component'; - -@NgModule({ - imports: [ - SharedModule - ], - declarations: [AboutComponent] -}) -export class AboutModule { } diff --git a/src/app/about/about/about.component.ts b/src/app/about/about/about.component.ts index 11ab5a2e6..8181be1a4 100644 --- a/src/app/about/about/about.component.ts +++ b/src/app/about/about/about.component.ts @@ -1,12 +1,17 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '../../shared/child.component'; +import { MatAnchor } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { RouterLink } from '@angular/router'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-about', - templateUrl: './about.component.html', - styleUrls: ['./about.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-about', + templateUrl: './about.component.html', + styleUrls: ['./about.component.scss'], + standalone: true, + imports: [MatAnchor, FaIconComponent, RouterLink] }) export class AboutComponent extends ChildComponent { constructor(public iconService: IconService) { diff --git a/src/app/about/index.ts b/src/app/about/index.ts index a43f24a9e..979a72ba0 100644 --- a/src/app/about/index.ts +++ b/src/app/about/index.ts @@ -1,2 +1 @@ -export * from './about.module'; export * from './about/about.component'; diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts deleted file mode 100644 index 1d805d803..000000000 --- a/src/app/app-routing.module.ts +++ /dev/null @@ -1,510 +0,0 @@ -import { Injectable, NgModule } from '@angular/core'; -import { Router, RouterModule } from '@angular/router'; -import { combineLatest, Observable, of, Subject } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { AboutComponent } from './about'; -import { AuthComponent } from './auth'; -import { BungieSearchComponent } from './bungie-search'; -import { ClanComponent } from './clan'; -import { ClanSearchComponent } from './clan-search'; -import { ClanBadgesComponent } from './clan/clan-collections/clan-badges/clan-badges.component'; -import { - ClanCollectionSearchComponent -} from './clan/clan-collections/clan-collection-search/clan-collection-search.component'; -import { ClanCollectionsComponent } from './clan/clan-collections/clan-collections.component'; -import { ClanInfoComponent } from './clan/clan-info/clan-info.component'; -import { ClanLifetimeComponent } from './clan/clan-lifetime/clan-lifetime.component'; -import { ClanMembersComponent } from './clan/clan-members/clan-members.component'; -import { ClanMilestonesComponent } from './clan/clan-milestones/clan-milestones.component'; -import { ClanSettingsComponent } from './clan/clan-settings/clan-settings.component'; -import { ClanSealsComponent } from './clan/clan-triumphs/clan-seals/clan-seals.component'; -import { ClanTriumphSearchComponent } from './clan/clan-triumphs/clan-triumph-search/clan-triumph-search.component'; -import { ClanTriumphTrackedComponent } from './clan/clan-triumphs/clan-triumph-tracked/clan-triumph-tracked.component'; -import { ClanTriumphsComponent } from './clan/clan-triumphs/clan-triumphs.component'; -import { FriendsComponent } from './friends'; -import { GamerTagSearchComponent } from './gamer-tag-search/gamer-tag-search.component'; -import { GearComponent } from './gear'; -import { HistoryComponent } from './history'; -import { HomeComponent } from './home/home.component'; -import { RobotHomeComponent } from './home/robot-home/robot-home.component'; -import { PartyComponent } from './party/party.component'; -import { PerkbenchComponent } from './perkbench/perkbench.component'; -import { Pgcr2Component } from './pgcr/pgcr2/pgcr2.component'; -import { PlayerComponent } from './player'; -import { CharsComponent } from './player/chars/chars.component'; -import { ChecklistComponent } from './player/checklist/checklist.component'; -import { CollectionBadgeComponent } from './player/collections/collection-badge/collection-badge.component'; -import { CollectionBadgesComponent } from './player/collections/collection-badges/collection-badges.component'; -import { CollectionSearchComponent } from './player/collections/collection-search/collection-search.component'; -import { CollectionTreeComponent } from './player/collections/collection-tree/collection-tree.component'; -import { CollectionsComponent } from './player/collections/collections.component'; -import { LifetimeComponent } from './player/lifetime/lifetime.component'; -import { MilestonesComponent } from './player/milestones/milestones.component'; -import { MoreComponent } from './player/more/more.component'; -import { ProgressComponent } from './player/progress/progress.component'; -import { PursuitListComponent } from './player/pursuits/pursuit-list/pursuit-list.component'; -import { PursuitsComponent } from './player/pursuits/pursuits.component'; -import { SpecialTriumphListComponent } from './player/triumphs/special-triumph-list/special-triumph-list.component'; -import { TriumphClosestComponent } from './player/triumphs/triumph-closest/triumph-closest.component'; -import { TriumphSealsComponent } from './player/triumphs/triumph-seals/triumph-seals.component'; -import { TriumphSearchComponent } from './player/triumphs/triumph-search/triumph-search.component'; -import { TriumphSeasonsComponent } from './player/triumphs/triumph-seasons/triumph-seasons.component'; -import { TriumphTrackedComponent } from './player/triumphs/triumph-tracked/triumph-tracked.component'; -import { TriumphTreeComponent } from './player/triumphs/triumph-tree/triumph-tree.component'; -import { TriumphsComponent } from './player/triumphs/triumphs.component'; -import { PrivacyComponent } from './privacy/privacy.component'; -import { RecentPlayersComponent } from './recent-players'; -import { DestinyCacheService } from './service/destiny-cache.service'; -import { SignedOnUserService } from './service/signed-on-user.service'; -import { SettingsComponent } from './settings'; -import { SignInRequiredComponent } from './shared/sign-in-required/sign-in-required.component'; -import { isSearchBot } from './shared/utilities'; -import { TestbedComponent } from './testbed/testbed.component'; -import { UberListBuilderComponent } from './uber-list/uber-list-builder/uber-list-builder.component'; -import { UberListParentComponent } from './uber-list/uber-list-parent/uber-list-parent.component'; -import { UberListViewComponent } from './uber-list/uber-list-view/uber-list-view.component'; -import { VendorsContainerComponent } from './vendors/vendors-container/vendors-container.component'; - - -const searchBot = isSearchBot(); - -@Injectable() -export class ManifestLoadedGuard { - public loader$ = new Subject(); - - constructor(private destinyCacheService: DestinyCacheService) { - } - - canActivate(): Observable { - return this.destinyCacheService.ready$.asObservable().pipe(filter(x => x === true)); - } -} - -@Injectable() -export class MyInfoGuard { - public loader$ = new Subject(); - - constructor(private router: Router, private signedOnUserService: SignedOnUserService) { - } - - canActivate(): Observable { - return combineLatest([this.signedOnUserService.authorizing$, this.signedOnUserService.playerLoading$, - this.signedOnUserService.signedOnUser$]).pipe( - filter(([auth, loading, user]) => !auth && !loading), - map(([auth, loading, user]) => { - if (!user) { - return true; - } else { - this.router.navigate([user.userInfo.membershipType, user.userInfo.membershipId]); - return false; - } - }) - ); - } -} - -@NgModule({ - imports: [RouterModule.forRoot( - [{ - path: '', - redirectTo: 'home', - pathMatch: 'full' - } - , { - path: 'home', - pathMatch: 'full', - canActivate: searchBot ? undefined : [ManifestLoadedGuard], - component: searchBot ? RobotHomeComponent : HomeComponent - }, - { - path: 'auth', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: AuthComponent - }, - { - path: 'my-info', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard, MyInfoGuard], - component: SignInRequiredComponent - }, - { - path: 'test', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: TestbedComponent - }, - { - path: 'settings', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: SettingsComponent - }, - { - path: 'perkbench', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: PerkbenchComponent - }, - { - path: 'perkbench/:hash', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: PerkbenchComponent - }, - { - path: 'about', - pathMatch: 'full', - component: AboutComponent - }, { - path: 'privacy', - pathMatch: 'full', - component: PrivacyComponent - }, { - path: 'friends', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: FriendsComponent - }, - { - path: 'gear', - redirectTo: 'gear/weapons', - pathMatch: 'full' - }, - { - path: 'gear/:tab', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: GearComponent - }, - { - path: 'search', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: BungieSearchComponent - }, { - path: 'searchClans', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: ClanSearchComponent - }, { - path: 'search/:name', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: BungieSearchComponent - }, { - path: 'todo', - pathMatch: 'prefix', - canActivate: [ManifestLoadedGuard], - component: UberListParentComponent, - children: [ - { - path: '', - redirectTo: 'builder', - pathMatch: 'full' - }, - { - path: 'builder', - component: UberListBuilderComponent, - }, - { - path: 'list', - component: UberListViewComponent, - } - ] - }, { - path: 'clan/:id', - pathMatch: 'prefix', - canActivate: [ManifestLoadedGuard], - component: ClanComponent, - children: [ - { - path: '', - redirectTo: 'members', - pathMatch: 'full' - }, - { - path: 'members', - component: ClanMembersComponent, - }, - { - path: 'info', - component: ClanInfoComponent, - }, - { - path: 'milestones', - component: ClanMilestonesComponent, - }, - - { - path: 'lifetime', - component: ClanLifetimeComponent, - }, - { - path: 'settings', - component: ClanSettingsComponent, - }, - { - path: 'triumphs', - pathMatch: 'prefix', - component: ClanTriumphsComponent, - children: [ - { - path: '', - redirectTo: 'seals', - pathMatch: 'full' - }, - { - path: 'seals', - component: ClanSealsComponent - }, { - path: 'search', - component: ClanTriumphSearchComponent - }, { - path: 'tracked', - component: ClanTriumphTrackedComponent - } - ] - }, - { - path: 'collections', - pathMatch: 'prefix', - component: ClanCollectionsComponent, - children: [ - { - path: '', - redirectTo: 'badges', - pathMatch: 'full' - }, - { - path: 'badges', - component: ClanBadgesComponent - }, { - path: 'search', - component: ClanCollectionSearchComponent - } - ] - } - ] - }, - { - path: 'pgcr/:instanceId', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: Pgcr2Component - }, - { - path: 'pgcr2/:instanceId', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: Pgcr2Component - }, - { - path: 'vendors/:characterId/:tab', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: VendorsContainerComponent - }, - { - path: 'vendors/:characterId', - pathMatch: 'full', - redirectTo: 'vendors/:characterId/Bounties' - }, - { - path: 'vendors', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: VendorsContainerComponent - }, - { - path: 'history/:platform/:memberId/:characterId', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: HistoryComponent - }, - { - path: 'recent-players/:platform/:memberId/:characterId', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: RecentPlayersComponent - }, - { - path: 'party/:platform/:memberId', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: PartyComponent - }, - { - path: 'gt/:platform/:gamertag', - pathMatch: 'full', - canActivate: [ManifestLoadedGuard], - component: GamerTagSearchComponent - }, - { - path: ':platform/:memberId', - pathMatch: 'prefix', - canActivate: [ManifestLoadedGuard], - component: PlayerComponent, - children: [ - { - path: '', - redirectTo: 'milestones', - pathMatch: 'full' - }, - { - path: 'milestones', - component: MilestonesComponent, - }, - { - path: 'pursuits', - component: PursuitsComponent, - children: [ - { - path: '', - redirectTo: 'bounties', - pathMatch: 'full' - }, - { - path: 'bounties', - component: PursuitListComponent, - }, - { - path: 'quests', - component: PursuitListComponent, - }, - { - path: 'gear', - component: PursuitListComponent, - }, - { - path: 'seasons', - component: TriumphSeasonsComponent, - }, - { - path: 'tracked', - component: PursuitListComponent, - } - ] - }, - { - path: 'checklist', - component: ChecklistComponent, - }, - { - path: 'triumphs', - component: TriumphsComponent, - children: [ - { - path: '', - redirectTo: 'seasons', - pathMatch: 'full' - }, - { - path: 'tree/:node', - component: TriumphTreeComponent, - }, - { - path: 'tree', - component: TriumphTreeComponent, - }, - { - path: 'seasons', - component: TriumphSeasonsComponent, - }, - { - path: 'patterns', - component: SpecialTriumphListComponent, - data: { - flavor: 'patterns' - } - }, - { - path: 'catalysts', - component: SpecialTriumphListComponent, - data: { - flavor: 'catalysts' - } - }, - { - path: 'seals', - component: TriumphSealsComponent, - }, - { - path: 'closest', - component: TriumphClosestComponent, - }, - { - path: 'search', - component: TriumphSearchComponent, - }, - { - path: 'tracked', - component: TriumphTrackedComponent, - } - ] - }, - { - path: 'collections', - component: CollectionsComponent, - children: [ - { - path: '', - redirectTo: 'tree', - pathMatch: 'full' - }, - { - path: 'tree/:node', - component: CollectionTreeComponent, - }, - { - path: 'tree', - component: CollectionTreeComponent, - }, - { - path: 'search', - component: CollectionSearchComponent, - }, - { - path: 'badges', - component: CollectionBadgesComponent, - }, - { - path: 'badges/:node', - component: CollectionBadgeComponent, - }, - ] - }, - { - path: 'lifetime', - component: LifetimeComponent - }, - { - path: 'more', - component: MoreComponent, - children: [ - { - path: '', - redirectTo: 'progress', - pathMatch: 'full' - }, - { - path: 'chars', - component: CharsComponent, - }, - { - path: 'progress', - component: ProgressComponent, - } - ] - } - ] - }, - { - path: '**', - redirectTo: 'home' - } - ], { useHash: false })], - exports: [RouterModule], - providers: [ManifestLoadedGuard, MyInfoGuard] -}) -export class AppRoutingModule { } diff --git a/src/app/app-status/app-status.component.ts b/src/app/app-status/app-status.component.ts index be981a609..dafe16d04 100644 --- a/src/app/app-status/app-status.component.ts +++ b/src/app/app-status/app-status.component.ts @@ -1,11 +1,16 @@ import { Component } from '@angular/core'; import { BungieService } from '@app/service/bungie.service'; import { DestinyCacheService } from '@app/service/destiny-cache.service'; +import { NgIf, AsyncPipe, DecimalPipe } from '@angular/common'; +import { MatCard, MatCardContent } from '@angular/material/card'; +import { MatProgressBar } from '@angular/material/progress-bar'; @Component({ - selector: 'd2c-app-status', - templateUrl: './app-status.component.html', - styleUrls: ['./app-status.component.scss'] + selector: 'd2c-app-status', + templateUrl: './app-status.component.html', + styleUrls: ['./app-status.component.scss'], + standalone: true, + imports: [NgIf, MatCard, MatCardContent, MatProgressBar, AsyncPipe, DecimalPipe] }) export class AppStatusComponent { diff --git a/src/app/app.component.ts b/src/app/app.component.ts index a4ab8b374..2df35d28b 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,9 +1,9 @@ import { OverlayContainer } from '@angular/cdk/overlay'; import { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, HostBinding, HostListener, Inject, inject, OnInit } from '@angular/core'; -import { MatDialog, MatDialogConfig, MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialog, MatDialogConfig, MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogClose } from '@angular/material/dialog'; import { MatSnackBar, MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar'; -import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; +import { ActivatedRoute, NavigationEnd, Router, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; import { environment as env } from '@env/environment'; import { BehaviorSubject } from 'rxjs'; import { filter } from 'rxjs/operators'; @@ -16,15 +16,31 @@ import { PwaService } from './service/pwa.service'; import { SignedOnUserService } from './service/signed-on-user.service'; import { StorageService } from './service/storage.service'; import { getDefaultTheme } from './shared/utilities'; -import { Location } from '@angular/common'; +import { Location, NgFor, NgIf, AsyncPipe } from '@angular/common'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { MatIcon } from '@angular/material/icon'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { MatButton, MatIconButton, MatAnchor } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatSidenavContainer, MatSidenav } from '@angular/material/sidenav'; +import { MatNavList, MatListItem } from '@angular/material/list'; +import { MatDivider } from '@angular/material/divider'; +import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; +import { MatToolbar, MatToolbarRow } from '@angular/material/toolbar'; +import { SignedOnLoadingIconComponent } from './shared/signed-on-loading-icon/signed-on-loading-icon.component'; +import { MatTooltip } from '@angular/material/tooltip'; +import { PlayerCurrenciesComponent } from './player-currencies/player-currencies.component'; +import { AdSlotComponent } from './shared/ad-slot/ad-slot.component'; +import { AppStatusComponent } from './app-status/app-status.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.scss'], + standalone: true, + imports: [MatSidenavContainer, MatSidenav, RouterLink, MatNavList, NgIf, MatListItem, MatIcon, NgFor, MatDivider, RouterLinkActive, FaIconComponent, MatMenuTrigger, MatMenu, MatMenuItem, MatToolbar, MatToolbarRow, MatIconButton, SignedOnLoadingIconComponent, MatAnchor, MatButton, MatTooltip, PlayerCurrenciesComponent, AdSlotComponent, AppStatusComponent, RouterOutlet, AsyncPipe] }) export class AppComponent implements OnInit, AfterViewInit { private destroyRef = inject(DestroyRef); @@ -262,9 +278,11 @@ export class AppComponent implements OnInit, AfterViewInit { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-success-snack', - templateUrl: 'snackbars/success.html' + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-success-snack', + templateUrl: 'snackbars/success.html', + standalone: true, + imports: [MatIcon] }) export class SuccessSnackbarComponent { message: string; @@ -274,9 +292,11 @@ export class SuccessSnackbarComponent { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-info-snack', - templateUrl: 'snackbars/info.html' + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-info-snack', + templateUrl: 'snackbars/info.html', + standalone: true, + imports: [MatIcon] }) export class InfoSnackbarComponent { message: string; @@ -286,9 +306,11 @@ export class InfoSnackbarComponent { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-warn-snack', - templateUrl: 'snackbars/warn.html' + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-warn-snack', + templateUrl: 'snackbars/warn.html', + standalone: true, + imports: [MatIcon] }) export class WarnSnackbarComponent { message: string; @@ -298,9 +320,20 @@ export class WarnSnackbarComponent { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-select-platform-dialog', - templateUrl: './select-platform-dialog.component.html', + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-select-platform-dialog', + templateUrl: './select-platform-dialog.component.html', + standalone: true, + imports: [ + MatDialogTitle, + CdkScrollable, + MatDialogContent, + NgFor, + MatButton, + MatDialogClose, + FaIconComponent, + MatIcon, + ], }) export class SelectPlatformDialogComponent { public const: Const = Const; diff --git a/src/app/app.module.ts b/src/app/app.module.ts deleted file mode 100644 index 836c1cdbe..000000000 --- a/src/app/app.module.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { ServiceWorkerModule } from '@angular/service-worker'; -import { BurnDialogComponent } from '@app/home/burn-dialog/burn-dialog.component'; -import { HomeComponent } from '@app/home/home.component'; -import { SharedModule } from '@app/shared'; -import { environment } from '../environments/environment'; -import { AboutModule } from './about'; -import { AppRoutingModule } from './app-routing.module'; -import { - AppComponent, - InfoSnackbarComponent, - SelectPlatformDialogComponent, - SuccessSnackbarComponent, - WarnSnackbarComponent -} from './app.component'; -import { AuthModule } from './auth'; -import { BungieSearchModule } from './bungie-search'; -import { ClanModule } from './clan'; -import { ClanSearchModule } from './clan-search'; - -import { FriendsModule } from './friends'; -import { GamerTagSearchComponent } from './gamer-tag-search/gamer-tag-search.component'; -import { GearModule } from './gear'; -import { LoggedInGuard } from './guards/logged-in.guard'; -import { HistoryModule } from './history'; -import { PartyComponent } from './party/party.component'; -import { PGCRModule } from './pgcr'; -import { PlayerModule } from './player'; - -import { PrivacyComponent } from './privacy/privacy.component'; -import { RecentPlayersModule } from './recent-players'; - -import { SettingsModule } from './settings'; -import { ChildComponent } from './shared/child.component'; -import { TestbedComponent } from './testbed/testbed.component'; -import { VendorsContainerComponent } from './vendors/vendors-container/vendors-container.component'; -import { VendorsComponent } from './vendors/vendors/vendors.component'; -import { DealsContainerComponent } from './deals/deals-container/deals-container.component'; -import { DealsComponent } from './deals/deals/deals.component'; -import { CollectionDealsComponent } from './deals/collection-deals/collection-deals.component'; -import { ArmorDealsComponent } from './deals/armor-deals/armor-deals.component'; -import { ArmorCompareDialogComponent } from './deals/armor-compare-dialog/armor-compare-dialog.component'; -import { WeaponDealsComponent } from './deals/weapon-deals/weapon-deals.component'; -import { WeaponCompareDialogComponent } from './deals/weapon-compare-dialog/weapon-compare-dialog.component'; -import { PlayerCurrenciesComponent } from './player-currencies/player-currencies.component'; -import { RobotHomeComponent } from './home/robot-home/robot-home.component'; -import { AppStatusComponent } from './app-status/app-status.component'; -import { UberPursuitCheckComponent } from './uber-list/uber-pursuit-check/uber-pursuit-check.component'; - -import { PerkbenchComponent } from './perkbench/perkbench.component'; -import { PerkBenchDialogComponent } from './perkbench/perk-bench-dialog/perk-bench-dialog.component'; -import { UberListToggleComponent } from './uber-list/uber-list-toggle/uber-list-toggle.component'; -import { UberListParentComponent } from './uber-list/uber-list-parent/uber-list-parent.component'; -import { UberListBuilderComponent } from './uber-list/uber-list-builder/uber-list-builder.component'; -import { UberListViewComponent } from './uber-list/uber-list-view/uber-list-view.component'; -import { UberRowDialogComponent } from './uber-list/uber-row-dialog/uber-row-dialog.component'; - - - - -@NgModule({ declarations: [ - AppComponent, - ChildComponent, - SuccessSnackbarComponent, InfoSnackbarComponent, WarnSnackbarComponent, - SelectPlatformDialogComponent, GamerTagSearchComponent, PartyComponent, PrivacyComponent, TestbedComponent, VendorsComponent, VendorsContainerComponent, - HomeComponent, BurnDialogComponent, - DealsContainerComponent, DealsComponent, CollectionDealsComponent, ArmorDealsComponent, - ArmorCompareDialogComponent, WeaponDealsComponent, WeaponCompareDialogComponent, - PlayerCurrenciesComponent, RobotHomeComponent, AppStatusComponent, UberPursuitCheckComponent, PerkbenchComponent, PerkBenchDialogComponent, UberListToggleComponent, UberListParentComponent, UberListBuilderComponent, UberListViewComponent, UberRowDialogComponent - ], - bootstrap: [AppComponent], imports: [ - // angular - BrowserAnimationsModule, - BrowserModule, - SharedModule, - AboutModule, - FriendsModule, - GearModule, - SettingsModule, - PlayerModule, - HistoryModule, - RecentPlayersModule, - BungieSearchModule, - ClanSearchModule, - ClanModule, - PGCRModule, - AuthModule, - // app - AppRoutingModule, - ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })], providers: [ - LoggedInGuard, - provideHttpClient(withInterceptorsFromDi()) - ] }) -export class AppModule { } diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts new file mode 100644 index 000000000..78ad4603c --- /dev/null +++ b/src/app/app.routes.ts @@ -0,0 +1,504 @@ +import { Injectable } from '@angular/core'; +import { Router, Routes } from '@angular/router'; +import { combineLatest, Observable, Subject } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { AboutComponent } from './about'; +import { AuthComponent } from './auth'; +import { BungieSearchComponent } from './bungie-search'; +import { ClanComponent } from './clan'; +import { ClanSearchComponent } from './clan-search'; +import { ClanBadgesComponent } from './clan/clan-collections/clan-badges/clan-badges.component'; +import { + ClanCollectionSearchComponent +} from './clan/clan-collections/clan-collection-search/clan-collection-search.component'; +import { ClanCollectionsComponent } from './clan/clan-collections/clan-collections.component'; +import { ClanInfoComponent } from './clan/clan-info/clan-info.component'; +import { ClanLifetimeComponent } from './clan/clan-lifetime/clan-lifetime.component'; +import { ClanMembersComponent } from './clan/clan-members/clan-members.component'; +import { ClanMilestonesComponent } from './clan/clan-milestones/clan-milestones.component'; +import { ClanSettingsComponent } from './clan/clan-settings/clan-settings.component'; +import { ClanSealsComponent } from './clan/clan-triumphs/clan-seals/clan-seals.component'; +import { ClanTriumphSearchComponent } from './clan/clan-triumphs/clan-triumph-search/clan-triumph-search.component'; +import { ClanTriumphTrackedComponent } from './clan/clan-triumphs/clan-triumph-tracked/clan-triumph-tracked.component'; +import { ClanTriumphsComponent } from './clan/clan-triumphs/clan-triumphs.component'; +import { FriendsComponent } from './friends'; +import { GamerTagSearchComponent } from './gamer-tag-search/gamer-tag-search.component'; +import { GearComponent } from './gear'; +import { HistoryComponent } from './history'; +import { HomeComponent } from './home/home.component'; +import { RobotHomeComponent } from './home/robot-home/robot-home.component'; +import { PartyComponent } from './party/party.component'; +import { PerkbenchComponent } from './perkbench/perkbench.component'; +import { Pgcr2Component } from './pgcr/pgcr2/pgcr2.component'; +import { PlayerComponent } from './player'; +import { CharsComponent } from './player/chars/chars.component'; +import { ChecklistComponent } from './player/checklist/checklist.component'; +import { CollectionBadgeComponent } from './player/collections/collection-badge/collection-badge.component'; +import { CollectionBadgesComponent } from './player/collections/collection-badges/collection-badges.component'; +import { CollectionSearchComponent } from './player/collections/collection-search/collection-search.component'; +import { CollectionTreeComponent } from './player/collections/collection-tree/collection-tree.component'; +import { CollectionsComponent } from './player/collections/collections.component'; +import { LifetimeComponent } from './player/lifetime/lifetime.component'; +import { MilestonesComponent } from './player/milestones/milestones.component'; +import { MoreComponent } from './player/more/more.component'; +import { ProgressComponent } from './player/progress/progress.component'; +import { PursuitListComponent } from './player/pursuits/pursuit-list/pursuit-list.component'; +import { PursuitsComponent } from './player/pursuits/pursuits.component'; +import { SpecialTriumphListComponent } from './player/triumphs/special-triumph-list/special-triumph-list.component'; +import { TriumphClosestComponent } from './player/triumphs/triumph-closest/triumph-closest.component'; +import { TriumphSealsComponent } from './player/triumphs/triumph-seals/triumph-seals.component'; +import { TriumphSearchComponent } from './player/triumphs/triumph-search/triumph-search.component'; +import { TriumphSeasonsComponent } from './player/triumphs/triumph-seasons/triumph-seasons.component'; +import { TriumphTrackedComponent } from './player/triumphs/triumph-tracked/triumph-tracked.component'; +import { TriumphTreeComponent } from './player/triumphs/triumph-tree/triumph-tree.component'; +import { TriumphsComponent } from './player/triumphs/triumphs.component'; +import { PrivacyComponent } from './privacy/privacy.component'; +import { RecentPlayersComponent } from './recent-players'; +import { DestinyCacheService } from './service/destiny-cache.service'; +import { SignedOnUserService } from './service/signed-on-user.service'; +import { SettingsComponent } from './settings'; +import { SignInRequiredComponent } from './shared/sign-in-required/sign-in-required.component'; +import { isSearchBot } from './shared/utilities'; +import { TestbedComponent } from './testbed/testbed.component'; +import { UberListBuilderComponent } from './uber-list/uber-list-builder/uber-list-builder.component'; +import { UberListParentComponent } from './uber-list/uber-list-parent/uber-list-parent.component'; +import { UberListViewComponent } from './uber-list/uber-list-view/uber-list-view.component'; +import { VendorsContainerComponent } from './vendors/vendors-container/vendors-container.component'; + + +const searchBot = isSearchBot(); + +@Injectable() +export class ManifestLoadedGuard { + public loader$ = new Subject(); + + constructor(private destinyCacheService: DestinyCacheService) { + } + + canActivate(): Observable { + return this.destinyCacheService.ready$.asObservable().pipe(filter(x => x === true)); + } +} + +@Injectable() +export class MyInfoGuard { + public loader$ = new Subject(); + + constructor(private router: Router, private signedOnUserService: SignedOnUserService) { + } + + canActivate(): Observable { + return combineLatest([this.signedOnUserService.authorizing$, this.signedOnUserService.playerLoading$, + this.signedOnUserService.signedOnUser$]).pipe( + filter(([auth, loading, user]) => !auth && !loading), + map(([auth, loading, user]) => { + if (!user) { + return true; + } else { + this.router.navigate([user.userInfo.membershipType, user.userInfo.membershipId]); + return false; + } + }) + ); + } +} + +export const appRoutes: Routes = [{ + path: '', + redirectTo: 'home', + pathMatch: 'full' +} + , { + path: 'home', + pathMatch: 'full', + canActivate: searchBot ? undefined : [ManifestLoadedGuard], + component: searchBot ? RobotHomeComponent : HomeComponent +}, +{ + path: 'auth', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: AuthComponent +}, +{ + path: 'my-info', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard, MyInfoGuard], + component: SignInRequiredComponent +}, +{ + path: 'test', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: TestbedComponent +}, +{ + path: 'settings', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: SettingsComponent +}, +{ + path: 'perkbench', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: PerkbenchComponent +}, + { + path: 'perkbench/:hash', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: PerkbenchComponent +}, +{ + path: 'about', + pathMatch: 'full', + component: AboutComponent +}, { + path: 'privacy', + pathMatch: 'full', + component: PrivacyComponent +}, { + path: 'friends', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: FriendsComponent +}, +{ + path: 'gear', + redirectTo: 'gear/weapons', + pathMatch: 'full' +}, +{ + path: 'gear/:tab', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: GearComponent +}, +{ + path: 'search', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: BungieSearchComponent +}, { + path: 'searchClans', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: ClanSearchComponent +}, { + path: 'search/:name', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: BungieSearchComponent +}, { + path: 'todo', + pathMatch: 'prefix', + canActivate: [ManifestLoadedGuard], + component: UberListParentComponent, + children: [ + { + path: '', + redirectTo: 'builder', + pathMatch: 'full' + }, + { + path: 'builder', + component: UberListBuilderComponent, + }, + { + path: 'list', + component: UberListViewComponent, + } + ] +}, { + path: 'clan/:id', + pathMatch: 'prefix', + canActivate: [ManifestLoadedGuard], + component: ClanComponent, + children: [ + { + path: '', + redirectTo: 'members', + pathMatch: 'full' + }, + { + path: 'members', + component: ClanMembersComponent, + }, + { + path: 'info', + component: ClanInfoComponent, + }, + { + path: 'milestones', + component: ClanMilestonesComponent, + }, + + { + path: 'lifetime', + component: ClanLifetimeComponent, + }, + { + path: 'settings', + component: ClanSettingsComponent, + }, + { + path: 'triumphs', + pathMatch: 'prefix', + component: ClanTriumphsComponent, + children: [ + { + path: '', + redirectTo: 'seals', + pathMatch: 'full' + }, + { + path: 'seals', + component: ClanSealsComponent + }, { + path: 'search', + component: ClanTriumphSearchComponent + }, { + path: 'tracked', + component: ClanTriumphTrackedComponent + } + ] + }, + { + path: 'collections', + pathMatch: 'prefix', + component: ClanCollectionsComponent, + children: [ + { + path: '', + redirectTo: 'badges', + pathMatch: 'full' + }, + { + path: 'badges', + component: ClanBadgesComponent + }, { + path: 'search', + component: ClanCollectionSearchComponent + } + ] + } + ] +}, +{ + path: 'pgcr/:instanceId', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: Pgcr2Component +}, +{ + path: 'pgcr2/:instanceId', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: Pgcr2Component +}, +{ + path: 'vendors/:characterId/:tab', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: VendorsContainerComponent +}, +{ + path: 'vendors/:characterId', + pathMatch: 'full', + redirectTo: 'vendors/:characterId/Bounties' +}, +{ + path: 'vendors', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: VendorsContainerComponent +}, +{ + path: 'history/:platform/:memberId/:characterId', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: HistoryComponent +}, +{ + path: 'recent-players/:platform/:memberId/:characterId', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: RecentPlayersComponent +}, +{ + path: 'party/:platform/:memberId', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: PartyComponent +}, +{ + path: 'gt/:platform/:gamertag', + pathMatch: 'full', + canActivate: [ManifestLoadedGuard], + component: GamerTagSearchComponent +}, +{ + path: ':platform/:memberId', + pathMatch: 'prefix', + canActivate: [ManifestLoadedGuard], + component: PlayerComponent, + children: [ + { + path: '', + redirectTo: 'milestones', + pathMatch: 'full' + }, + { + path: 'milestones', + component: MilestonesComponent, + }, + { + path: 'pursuits', + component: PursuitsComponent, + children: [ + { + path: '', + redirectTo: 'bounties', + pathMatch: 'full' + }, + { + path: 'bounties', + component: PursuitListComponent, + }, + { + path: 'quests', + component: PursuitListComponent, + }, + { + path: 'gear', + component: PursuitListComponent, + }, + { + path: 'seasons', + component: TriumphSeasonsComponent, + }, + { + path: 'tracked', + component: PursuitListComponent, + } + ] + }, + { + path: 'checklist', + component: ChecklistComponent, + }, + { + path: 'triumphs', + component: TriumphsComponent, + children: [ + { + path: '', + redirectTo: 'seasons', + pathMatch: 'full' + }, + { + path: 'tree/:node', + component: TriumphTreeComponent, + }, + { + path: 'tree', + component: TriumphTreeComponent, + }, + { + path: 'seasons', + component: TriumphSeasonsComponent, + }, + { + path: 'patterns', + component: SpecialTriumphListComponent, + data: { + flavor: 'patterns' + } + }, + { + path: 'catalysts', + component: SpecialTriumphListComponent, + data: { + flavor: 'catalysts' + } + }, + { + path: 'seals', + component: TriumphSealsComponent, + }, + { + path: 'closest', + component: TriumphClosestComponent, + }, + { + path: 'search', + component: TriumphSearchComponent, + }, + { + path: 'tracked', + component: TriumphTrackedComponent, + } + ] + }, + { + path: 'collections', + component: CollectionsComponent, + children: [ + { + path: '', + redirectTo: 'tree', + pathMatch: 'full' + }, + { + path: 'tree/:node', + component: CollectionTreeComponent, + }, + { + path: 'tree', + component: CollectionTreeComponent, + }, + { + path: 'search', + component: CollectionSearchComponent, + }, + { + path: 'badges', + component: CollectionBadgesComponent, + }, + { + path: 'badges/:node', + component: CollectionBadgeComponent, + }, + ] + }, + { + path: 'lifetime', + component: LifetimeComponent + }, + { + path: 'more', + component: MoreComponent, + children: [ + { + path: '', + redirectTo: 'progress', + pathMatch: 'full' + }, + { + path: 'chars', + component: CharsComponent, + }, + { + path: 'progress', + component: ProgressComponent, + } + ] + } + ] +}, +{ + path: '**', + redirectTo: 'home' +} +]; diff --git a/src/app/auth/auth.module.ts b/src/app/auth/auth.module.ts deleted file mode 100644 index 7009fac7b..000000000 --- a/src/app/auth/auth.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { SharedModule } from '../shared'; - -import { AuthComponent } from './auth/auth.component'; - -@NgModule({ - imports: [ - SharedModule - ], - declarations: [AuthComponent] -}) -export class AuthModule { } diff --git a/src/app/auth/auth/auth.component.ts b/src/app/auth/auth/auth.component.ts index 6b1ce198a..ddcb97fea 100644 --- a/src/app/auth/auth/auth.component.ts +++ b/src/app/auth/auth/auth.component.ts @@ -5,13 +5,17 @@ import { takeUntil } from 'rxjs/operators'; import { AuthService } from '../../service/auth.service'; import { ChildComponent } from '../../shared/child.component'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-auth', - templateUrl: './auth.component.html', - styleUrls: ['./auth.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-auth', + templateUrl: './auth.component.html', + styleUrls: ['./auth.component.scss'], + standalone: true, + imports: [NgIf, MatProgressSpinner, AsyncPipe] }) export class AuthComponent extends ChildComponent implements OnInit { statusMsg = 'Authorizing'; diff --git a/src/app/auth/index.ts b/src/app/auth/index.ts index bf4f422b0..a65b5d92a 100644 --- a/src/app/auth/index.ts +++ b/src/app/auth/index.ts @@ -1,2 +1 @@ -export * from './auth.module'; export * from './auth/auth.component'; diff --git a/src/app/bungie-search/bungie-search.module.ts b/src/app/bungie-search/bungie-search.module.ts deleted file mode 100644 index a206dec16..000000000 --- a/src/app/bungie-search/bungie-search.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { NgModule } from '@angular/core'; -import { SharedModule } from '../shared'; -import { BungieSearchComponent } from './bungie-search/bungie-search.component'; - -@NgModule({ - imports: [ - SharedModule - ], - declarations: [BungieSearchComponent] -}) -export class BungieSearchModule { } diff --git a/src/app/bungie-search/bungie-search/bungie-search.component.ts b/src/app/bungie-search/bungie-search/bungie-search.component.ts index 3154f9814..0fac13cd1 100644 --- a/src/app/bungie-search/bungie-search/bungie-search.component.ts +++ b/src/app/bungie-search/bungie-search/bungie-search.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { BehaviorSubject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { BungieService } from '../../service/bungie.service'; @@ -8,13 +8,23 @@ import { BungieMemberPlatform, BungieGlobalSearchResult, Const } from '../../ser import { ChildComponent } from '../../shared/child.component'; import { IconService } from '@app/service/icon.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatFormField, MatLabel } from '@angular/material/form-field'; +import { MatInput } from '@angular/material/input'; +import { FormsModule } from '@angular/forms'; +import { MatMiniFabButton } from '@angular/material/button'; +import { MatIcon } from '@angular/material/icon'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-bungie-search', - templateUrl: './bungie-search.component.html', - styleUrls: ['./bungie-search.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-bungie-search', + templateUrl: './bungie-search.component.html', + styleUrls: ['./bungie-search.component.scss'], + standalone: true, + imports: [NgIf, MatProgressSpinner, MatFormField, MatLabel, MatInput, FormsModule, MatMiniFabButton, MatIcon, NgFor, RouterLink, FaIconComponent, AsyncPipe] }) export class BungieSearchComponent extends ChildComponent implements OnInit { Const = Const; diff --git a/src/app/bungie-search/index.ts b/src/app/bungie-search/index.ts index bbcc04dc8..65d4e4b04 100644 --- a/src/app/bungie-search/index.ts +++ b/src/app/bungie-search/index.ts @@ -1,2 +1 @@ -export * from './bungie-search.module'; export * from './bungie-search/bungie-search.component'; diff --git a/src/app/clan-search/clan-search.module.ts b/src/app/clan-search/clan-search.module.ts deleted file mode 100644 index 0f18d69ba..000000000 --- a/src/app/clan-search/clan-search.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { NgModule } from '@angular/core'; -import { SharedModule } from '../shared'; -import { ClanSearchComponent } from './clan-search/clan-search.component'; - -@NgModule({ - imports: [ - SharedModule - ], - declarations: [ClanSearchComponent] -}) -export class ClanSearchModule { } diff --git a/src/app/clan-search/clan-search/clan-search.component.ts b/src/app/clan-search/clan-search/clan-search.component.ts index 844b5cc21..f41e912cd 100644 --- a/src/app/clan-search/clan-search/clan-search.component.ts +++ b/src/app/clan-search/clan-search/clan-search.component.ts @@ -4,13 +4,24 @@ import { BehaviorSubject } from 'rxjs'; import { BungieService } from '../../service/bungie.service'; import { ClanInfo } from '../../service/model'; import { ChildComponent } from '../../shared/child.component'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatFormField, MatLabel } from '@angular/material/form-field'; +import { MatInput } from '@angular/material/input'; +import { FormsModule } from '@angular/forms'; +import { MatMiniFabButton, MatAnchor } from '@angular/material/button'; +import { MatIcon } from '@angular/material/icon'; +import { RouterLink } from '@angular/router'; +import { MatCard, MatCardHeader, MatCardAvatar, MatCardTitle, MatCardSubtitle, MatCardContent, MatCardActions } from '@angular/material/card'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-search', - templateUrl: './clan-search.component.html', - styleUrls: ['./clan-search.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-search', + templateUrl: './clan-search.component.html', + styleUrls: ['./clan-search.component.scss'], + standalone: true, + imports: [NgIf, MatProgressSpinner, MatFormField, MatLabel, MatInput, FormsModule, MatMiniFabButton, MatIcon, RouterLink, MatCard, MatCardHeader, MatCardAvatar, MatCardTitle, MatCardSubtitle, MatCardContent, MatCardActions, MatAnchor, AsyncPipe] }) export class ClanSearchComponent extends ChildComponent implements OnInit { name!: string; diff --git a/src/app/clan-search/index.ts b/src/app/clan-search/index.ts index c1dc19862..85dfde1ff 100644 --- a/src/app/clan-search/index.ts +++ b/src/app/clan-search/index.ts @@ -1,2 +1 @@ -export * from './clan-search.module'; export * from './clan-search/clan-search.component'; diff --git a/src/app/clan/clan-collections/clan-badges/clan-badges.component.ts b/src/app/clan/clan-collections/clan-badges/clan-badges.component.ts index 26338e742..9c1b149b7 100644 --- a/src/app/clan/clan-collections/clan-badges/clan-badges.component.ts +++ b/src/app/clan/clan-collections/clan-badges/clan-badges.component.ts @@ -3,12 +3,16 @@ import { MatDialog, MatDialogConfig } from '@angular/material/dialog'; import { ClanBadge, ClanStateService } from '@app/clan/clan-state.service'; import { ChildComponent } from '@app/shared/child.component'; import { ClanCollectionBadgeDialogComponent } from '../clan-collection-badge-dialog/clan-collection-badge-dialog.component'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatButton } from '@angular/material/button'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-badges', - templateUrl: './clan-badges.component.html', - styleUrls: ['./clan-badges.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-badges', + templateUrl: './clan-badges.component.html', + styleUrls: ['./clan-badges.component.scss'], + standalone: true, + imports: [NgIf, NgFor, MatButton, AsyncPipe] }) export class ClanBadgesComponent extends ChildComponent { diff --git a/src/app/clan/clan-collections/clan-collection-badge-dialog/clan-collection-badge-dialog.component.ts b/src/app/clan/clan-collections/clan-collection-badge-dialog/clan-collection-badge-dialog.component.ts index c569d7edb..478b07532 100644 --- a/src/app/clan/clan-collections/clan-collection-badge-dialog/clan-collection-badge-dialog.component.ts +++ b/src/app/clan/clan-collections/clan-collection-badge-dialog/clan-collection-badge-dialog.component.ts @@ -1,16 +1,24 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogContent } from '@angular/material/dialog'; import { ClanBadge, ClanStateService } from '@app/clan/clan-state.service'; import { IconService } from '@app/service/icon.service'; import { Sort } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { MatTabGroup, MatTab, MatTabLabel } from '@angular/material/tabs'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { ClanTriumphGraphComponent } from '../../clan-triumphs/clan-triumph-graph/clan-triumph-graph.component'; +import { NgTemplateOutlet, NgIf, NgFor, AsyncPipe, DecimalPipe } from '@angular/common'; +import { RouterLink } from '@angular/router'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-collection-badge-dialog', - templateUrl: './clan-collection-badge-dialog.component.html', - styleUrls: ['./clan-collection-badge-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-collection-badge-dialog', + templateUrl: './clan-collection-badge-dialog.component.html', + styleUrls: ['./clan-collection-badge-dialog.component.scss'], + standalone: true, + imports: [CdkScrollable, MatDialogContent, MatTabGroup, MatTab, MatTabLabel, FaIconComponent, ClanTriumphGraphComponent, NgTemplateOutlet, NgIf, NgFor, RouterLink, AsyncPipe, DecimalPipe] }) export class ClanCollectionBadgeDialogComponent extends ChildComponent { sort: Sort = { diff --git a/src/app/clan/clan-collections/clan-collection-item-dialog/clan-collection-item-dialog.component.ts b/src/app/clan/clan-collections/clan-collection-item-dialog/clan-collection-item-dialog.component.ts index 14df71b00..0c9bc5d0d 100644 --- a/src/app/clan/clan-collections/clan-collection-item-dialog/clan-collection-item-dialog.component.ts +++ b/src/app/clan/clan-collections/clan-collection-item-dialog/clan-collection-item-dialog.component.ts @@ -1,14 +1,21 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogContent } from '@angular/material/dialog'; import { ClanSearchableCollection, ClanStateService } from '@app/clan/clan-state.service'; import { IconService } from '@app/service/icon.service'; import { Sort } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { MatTabGroup, MatTab, MatTabLabel } from '@angular/material/tabs'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { NgTemplateOutlet, NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { RouterLink } from '@angular/router'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-collection-item-dialog', - templateUrl: './clan-collection-item-dialog.component.html', - styleUrls: ['./clan-collection-item-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-collection-item-dialog', + templateUrl: './clan-collection-item-dialog.component.html', + styleUrls: ['./clan-collection-item-dialog.component.scss'], + standalone: true, + imports: [CdkScrollable, MatDialogContent, MatTabGroup, MatTab, MatTabLabel, FaIconComponent, NgTemplateOutlet, NgIf, NgFor, RouterLink, AsyncPipe] }) export class ClanCollectionItemDialogComponent extends ChildComponent { sort: Sort = { diff --git a/src/app/clan/clan-collections/clan-collection-item/clan-collection-item.component.ts b/src/app/clan/clan-collections/clan-collection-item/clan-collection-item.component.ts index 442c7ee96..801377116 100644 --- a/src/app/clan/clan-collections/clan-collection-item/clan-collection-item.component.ts +++ b/src/app/clan/clan-collections/clan-collection-item/clan-collection-item.component.ts @@ -3,13 +3,18 @@ import { MatDialog, MatDialogConfig } from '@angular/material/dialog'; import { ClanSearchableCollection, ClanStateService } from '@app/clan/clan-state.service'; import { ChildComponent } from '@app/shared/child.component'; import { ClanCollectionItemDialogComponent } from '../clan-collection-item-dialog/clan-collection-item-dialog.component'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { MatButton } from '@angular/material/button'; +import { MatProgressBar } from '@angular/material/progress-bar'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-collection-item', - templateUrl: './clan-collection-item.component.html', - styleUrls: ['./clan-collection-item.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-collection-item', + templateUrl: './clan-collection-item.component.html', + styleUrls: ['./clan-collection-item.component.scss'], + standalone: true, + imports: [NgIf, MatButton, MatProgressBar, AsyncPipe] }) export class ClanCollectionItemComponent extends ChildComponent { diff --git a/src/app/clan/clan-collections/clan-collection-search/clan-collection-search.component.ts b/src/app/clan/clan-collections/clan-collection-search/clan-collection-search.component.ts index 9674794c3..13b00c13e 100644 --- a/src/app/clan/clan-collections/clan-collection-search/clan-collection-search.component.ts +++ b/src/app/clan/clan-collections/clan-collection-search/clan-collection-search.component.ts @@ -4,12 +4,19 @@ import { ChildComponent } from '@app/shared/child.component'; import { BehaviorSubject, Subject } from 'rxjs'; import { debounceTime, takeUntil } from 'rxjs/operators'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatFormField, MatLabel } from '@angular/material/form-field'; +import { MatInput } from '@angular/material/input'; +import { FormsModule } from '@angular/forms'; +import { ClanCollectionItemComponent } from '../clan-collection-item/clan-collection-item.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-collection-search', - templateUrl: './clan-collection-search.component.html', - styleUrls: ['./clan-collection-search.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-collection-search', + templateUrl: './clan-collection-search.component.html', + styleUrls: ['./clan-collection-search.component.scss'], + standalone: true, + imports: [NgIf, MatFormField, MatLabel, MatInput, FormsModule, NgFor, ClanCollectionItemComponent, AsyncPipe] }) export class ClanCollectionSearchComponent extends ChildComponent implements OnInit { private collectionSearchSubject: Subject = new Subject(); diff --git a/src/app/clan/clan-collections/clan-collections.component.ts b/src/app/clan/clan-collections/clan-collections.component.ts index b054b53a6..13b3ac37b 100644 --- a/src/app/clan/clan-collections/clan-collections.component.ts +++ b/src/app/clan/clan-collections/clan-collections.component.ts @@ -2,12 +2,18 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '@app/shared/child.component'; import { ClanStateService } from '../clan-state.service'; +import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; +import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-collections', - templateUrl: './clan-collections.component.html', - styleUrls: ['./clan-collections.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-collections', + templateUrl: './clan-collections.component.html', + styleUrls: ['./clan-collections.component.scss'], + standalone: true, + imports: [MatTabNav, MatTabLink, RouterLink, RouterLinkActive, FaIconComponent, MatTabNavPanel, NgIf, RouterOutlet, AsyncPipe] }) export class ClanCollectionsComponent extends ChildComponent { diff --git a/src/app/clan/clan-info/clan-info.component.ts b/src/app/clan/clan-info/clan-info.component.ts index 5eff4d0cb..6e62a9df9 100644 --- a/src/app/clan/clan-info/clan-info.component.ts +++ b/src/app/clan/clan-info/clan-info.component.ts @@ -6,12 +6,20 @@ import { BehaviorSubject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { ClanStateService } from '../clan-state.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe, DecimalPipe, DatePipe } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatButton } from '@angular/material/button'; +import { RouterLink } from '@angular/router'; +import { MatTooltip } from '@angular/material/tooltip'; +import { AgoHumanizedPipe, DateFormatPipe } from '../../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-info', - templateUrl: './clan-info.component.html', - styleUrls: ['./clan-info.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-info', + templateUrl: './clan-info.component.html', + styleUrls: ['./clan-info.component.scss'], + standalone: true, + imports: [NgIf, NgFor, FaIconComponent, MatButton, RouterLink, MatTooltip, AgoHumanizedPipe, DateFormatPipe, AsyncPipe, DecimalPipe, DatePipe] }) export class ClanInfoComponent extends ChildComponent { sort: Sort = { diff --git a/src/app/clan/clan-lifetime/clan-lifetime-dialog/clan-lifetime-dialog.component.ts b/src/app/clan/clan-lifetime/clan-lifetime-dialog/clan-lifetime-dialog.component.ts index a6ffb7c19..84d1eb3c1 100644 --- a/src/app/clan/clan-lifetime/clan-lifetime-dialog/clan-lifetime-dialog.component.ts +++ b/src/app/clan/clan-lifetime/clan-lifetime-dialog/clan-lifetime-dialog.component.ts @@ -1,15 +1,24 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogContent } from '@angular/material/dialog'; import { ClanAggHistoryEntry, ClanStateService } from '@app/clan/clan-state.service'; import { IconService } from '@app/service/icon.service'; import { Sort } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { MatTabGroup, MatTab, MatTabLabel } from '@angular/material/tabs'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { ClanLifetimeGraphComponent } from '../clan-lifetime-graph/clan-lifetime-graph.component'; +import { NgIf, NgFor, DecimalPipe } from '@angular/common'; +import { RouterLink } from '@angular/router'; +import { TimingPipe } from '../../../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-lifetime-dialog', - templateUrl: './clan-lifetime-dialog.component.html', - styleUrls: ['./clan-lifetime-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-lifetime-dialog', + templateUrl: './clan-lifetime-dialog.component.html', + styleUrls: ['./clan-lifetime-dialog.component.scss'], + standalone: true, + imports: [CdkScrollable, MatDialogContent, MatTabGroup, MatTab, MatTabLabel, FaIconComponent, ClanLifetimeGraphComponent, NgIf, NgFor, RouterLink, TimingPipe, DecimalPipe] }) export class ClanLifetimeDialogComponent extends ChildComponent { sort: Sort = { diff --git a/src/app/clan/clan-lifetime/clan-lifetime-graph/clan-lifetime-graph.component.ts b/src/app/clan/clan-lifetime/clan-lifetime-graph/clan-lifetime-graph.component.ts index 81782de55..d8218ab68 100644 --- a/src/app/clan/clan-lifetime/clan-lifetime-graph/clan-lifetime-graph.component.ts +++ b/src/app/clan/clan-lifetime/clan-lifetime-graph/clan-lifetime-graph.component.ts @@ -1,13 +1,16 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { PlayerAggHistoryEntry } from '@app/clan/clan-state.service'; import { ChartConfiguration, ChartData, ChartType, ScatterDataPoint } from 'chart.js'; +import { NgChartsModule } from 'ng2-charts'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-lifetime-graph', - templateUrl: './clan-lifetime-graph.component.html', - styleUrls: ['./clan-lifetime-graph.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-lifetime-graph', + templateUrl: './clan-lifetime-graph.component.html', + styleUrls: ['./clan-lifetime-graph.component.scss'], + standalone: true, + imports: [NgChartsModule] }) export class ClanLifetimeGraphComponent { public scatterChartType: ChartType = 'scatter'; diff --git a/src/app/clan/clan-lifetime/clan-lifetime.component.ts b/src/app/clan/clan-lifetime/clan-lifetime.component.ts index 88356119e..c66f2fa55 100644 --- a/src/app/clan/clan-lifetime/clan-lifetime.component.ts +++ b/src/app/clan/clan-lifetime/clan-lifetime.component.ts @@ -7,12 +7,23 @@ import { ClanLifetimeDialogComponent } from './clan-lifetime-dialog/clan-lifetim import { ClanUserListDialogComponent } from '../clan-settings/clan-user-list-dialog/clan-user-list-dialog.component'; import { IconService } from '@app/service/icon.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgTemplateOutlet, NgFor, AsyncPipe, DecimalPipe } from '@angular/common'; +import { MatProgressBar } from '@angular/material/progress-bar'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatTabGroup, MatTab } from '@angular/material/tabs'; +import { MatButton } from '@angular/material/button'; +import { MatTooltip } from '@angular/material/tooltip'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { RouterLink } from '@angular/router'; +import { TimingPipe } from '../../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-lifetime', - templateUrl: './clan-lifetime.component.html', - styleUrls: ['./clan-lifetime.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-lifetime', + templateUrl: './clan-lifetime.component.html', + styleUrls: ['./clan-lifetime.component.scss'], + standalone: true, + imports: [NgIf, MatProgressBar, MatProgressSpinner, MatTabGroup, MatTab, NgTemplateOutlet, NgFor, MatButton, MatTooltip, FaIconComponent, RouterLink, TimingPipe, AsyncPipe, DecimalPipe] }) export class ClanLifetimeComponent extends ChildComponent implements OnInit { diff --git a/src/app/clan/clan-members/clan-members.component.ts b/src/app/clan/clan-members/clan-members.component.ts index d5be0f34c..5ee4ea802 100644 --- a/src/app/clan/clan-members/clan-members.component.ts +++ b/src/app/clan/clan-members/clan-members.component.ts @@ -2,12 +2,21 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '@app/shared/child.component'; import { ClanStateService } from '../clan-state.service'; +import { NgIf, NgTemplateOutlet, NgFor, AsyncPipe, DecimalPipe } from '@angular/common'; +import { RouterLink } from '@angular/router'; +import { FriendStarComponent } from '../../shared/friend-star/friend-star.component'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatAnchor } from '@angular/material/button'; +import { MatTooltip } from '@angular/material/tooltip'; +import { AgoHumanizedPipe, MinsHumanizedPipe } from '../../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-members', - templateUrl: './clan-members.component.html', - styleUrls: ['./clan-members.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-members', + templateUrl: './clan-members.component.html', + styleUrls: ['./clan-members.component.scss'], + standalone: true, + imports: [NgIf, RouterLink, NgTemplateOutlet, NgFor, FriendStarComponent, FaIconComponent, MatAnchor, MatTooltip, AgoHumanizedPipe, MinsHumanizedPipe, AsyncPipe, DecimalPipe] }) export class ClanMembersComponent extends ChildComponent { constructor( diff --git a/src/app/clan/clan-milestones/clan-milestones.component.ts b/src/app/clan/clan-milestones/clan-milestones.component.ts index c063c2ce6..d3625b8dc 100644 --- a/src/app/clan/clan-milestones/clan-milestones.component.ts +++ b/src/app/clan/clan-milestones/clan-milestones.component.ts @@ -7,12 +7,21 @@ import { BehaviorSubject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { ClanStateService } from '../clan-state.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgTemplateOutlet, NgFor, AsyncPipe } from '@angular/common'; +import { MatButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatTooltip } from '@angular/material/tooltip'; +import { RouterLink } from '@angular/router'; +import { FriendStarComponent } from '../../shared/friend-star/friend-star.component'; +import { MilestoneCheckComponent } from '../../shared/milestone-check/milestone-check.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-milestones', - templateUrl: './clan-milestones.component.html', - styleUrls: ['./clan-milestones.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-milestones', + templateUrl: './clan-milestones.component.html', + styleUrls: ['./clan-milestones.component.scss'], + standalone: true, + imports: [NgIf, MatButton, FaIconComponent, NgTemplateOutlet, NgFor, MatTooltip, RouterLink, FriendStarComponent, MilestoneCheckComponent, AsyncPipe] }) export class ClanMilestonesComponent extends ChildComponent { public filteredMembers: BehaviorSubject = new BehaviorSubject([]); diff --git a/src/app/clan/clan-settings/clan-settings.component.ts b/src/app/clan/clan-settings/clan-settings.component.ts index 6b275f794..4e64d5149 100644 --- a/src/app/clan/clan-settings/clan-settings.component.ts +++ b/src/app/clan/clan-settings/clan-settings.component.ts @@ -4,12 +4,21 @@ import { BungieGroupMember } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; import { ClanStateService } from '../clan-state.service'; import { ClanUserListDialogComponent } from './clan-user-list-dialog/clan-user-list-dialog.component'; +import { MatButton } from '@angular/material/button'; +import { MatFormField } from '@angular/material/form-field'; +import { MatSelect, MatSelectTrigger } from '@angular/material/select'; +import { FormsModule } from '@angular/forms'; +import { NgFor, AsyncPipe } from '@angular/common'; +import { MatOption } from '@angular/material/core'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-settings', - templateUrl: './clan-settings.component.html', - styleUrls: ['./clan-settings.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-settings', + templateUrl: './clan-settings.component.html', + styleUrls: ['./clan-settings.component.scss'], + standalone: true, + imports: [MatButton, MatFormField, MatSelect, FormsModule, NgFor, MatOption, MatSelectTrigger, FaIconComponent, AsyncPipe] }) export class ClanSettingsComponent extends ChildComponent { diff --git a/src/app/clan/clan-settings/clan-user-list-dialog/clan-user-list-dialog.component.ts b/src/app/clan/clan-settings/clan-user-list-dialog/clan-user-list-dialog.component.ts index 4b8935055..ef4249cba 100644 --- a/src/app/clan/clan-settings/clan-user-list-dialog/clan-user-list-dialog.component.ts +++ b/src/app/clan/clan-settings/clan-user-list-dialog/clan-user-list-dialog.component.ts @@ -1,14 +1,20 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogContent } from '@angular/material/dialog'; import { ClanUserList } from '@app/clan/clan-state.service'; import { BungieGroupMember } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { NgFor } from '@angular/common'; +import { RouterLink } from '@angular/router'; +import { AgoHumanizedPipe } from '../../../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-user-list-dialog', - templateUrl: './clan-user-list-dialog.component.html', - styleUrls: ['./clan-user-list-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-user-list-dialog', + templateUrl: './clan-user-list-dialog.component.html', + styleUrls: ['./clan-user-list-dialog.component.scss'], + standalone: true, + imports: [CdkScrollable, MatDialogContent, NgFor, RouterLink, AgoHumanizedPipe] }) export class ClanUserListDialogComponent extends ChildComponent { public title: string; diff --git a/src/app/clan/clan-triumphs/clan-seals/clan-seals.component.ts b/src/app/clan/clan-triumphs/clan-seals/clan-seals.component.ts index 2c685239a..a13128259 100644 --- a/src/app/clan/clan-triumphs/clan-seals/clan-seals.component.ts +++ b/src/app/clan/clan-triumphs/clan-seals/clan-seals.component.ts @@ -4,12 +4,18 @@ import { ClanSeal, ClanStateService } from '@app/clan/clan-state.service'; import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '@app/shared/child.component'; import { ClanTriumphSealDialogComponent } from '../clan-triumph-seal-dialog/clan-triumph-seal-dialog.component'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatAccordion, MatExpansionPanel, MatExpansionPanelHeader, MatExpansionPanelTitle, MatExpansionPanelDescription } from '@angular/material/expansion'; +import { MatButton } from '@angular/material/button'; +import { ClanTriumphItemComponent } from '../clan-triumph-item/clan-triumph-item.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-seals', - templateUrl: './clan-seals.component.html', - styleUrls: ['./clan-seals.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-seals', + templateUrl: './clan-seals.component.html', + styleUrls: ['./clan-seals.component.scss'], + standalone: true, + imports: [NgIf, MatAccordion, NgFor, MatExpansionPanel, MatExpansionPanelHeader, MatExpansionPanelTitle, MatExpansionPanelDescription, MatButton, ClanTriumphItemComponent, AsyncPipe] }) export class ClanSealsComponent extends ChildComponent { openEntryId: string|null = null; diff --git a/src/app/clan/clan-triumphs/clan-triumph-graph/clan-triumph-graph.component.ts b/src/app/clan/clan-triumphs/clan-triumph-graph/clan-triumph-graph.component.ts index 6c5a92ac2..81ed2c3dd 100644 --- a/src/app/clan/clan-triumphs/clan-triumph-graph/clan-triumph-graph.component.ts +++ b/src/app/clan/clan-triumphs/clan-triumph-graph/clan-triumph-graph.component.ts @@ -1,12 +1,15 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { PlayerTriumph } from '@app/clan/clan-state.service'; import { ChartConfiguration, ChartType } from 'chart.js'; +import { NgChartsModule } from 'ng2-charts'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-triumph-graph', - templateUrl: './clan-triumph-graph.component.html', - styleUrls: ['./clan-triumph-graph.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-triumph-graph', + templateUrl: './clan-triumph-graph.component.html', + styleUrls: ['./clan-triumph-graph.component.scss'], + standalone: true, + imports: [NgChartsModule] }) export class ClanTriumphGraphComponent { public chartType: ChartType = 'bar'; diff --git a/src/app/clan/clan-triumphs/clan-triumph-item-dialog/clan-triumph-item-dialog.component.ts b/src/app/clan/clan-triumphs/clan-triumph-item-dialog/clan-triumph-item-dialog.component.ts index 1f3dc1b17..ecc6194a1 100644 --- a/src/app/clan/clan-triumphs/clan-triumph-item-dialog/clan-triumph-item-dialog.component.ts +++ b/src/app/clan/clan-triumphs/clan-triumph-item-dialog/clan-triumph-item-dialog.component.ts @@ -1,15 +1,23 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogContent } from '@angular/material/dialog'; import { ClanSearchableTriumph, ClanStateService } from '@app/clan/clan-state.service'; import { IconService } from '@app/service/icon.service'; import { Sort } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { MatTabGroup, MatTab, MatTabLabel } from '@angular/material/tabs'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { ClanTriumphGraphComponent } from '../clan-triumph-graph/clan-triumph-graph.component'; +import { NgTemplateOutlet, NgIf, NgFor, AsyncPipe, DecimalPipe } from '@angular/common'; +import { RouterLink } from '@angular/router'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-triumph-item-dialog', - templateUrl: './clan-triumph-item-dialog.component.html', - styleUrls: ['./clan-triumph-item-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-triumph-item-dialog', + templateUrl: './clan-triumph-item-dialog.component.html', + styleUrls: ['./clan-triumph-item-dialog.component.scss'], + standalone: true, + imports: [CdkScrollable, MatDialogContent, MatTabGroup, MatTab, MatTabLabel, FaIconComponent, ClanTriumphGraphComponent, NgTemplateOutlet, NgIf, NgFor, RouterLink, AsyncPipe, DecimalPipe] }) export class ClanTriumphItemDialogComponent extends ChildComponent { sort: Sort = { diff --git a/src/app/clan/clan-triumphs/clan-triumph-item/clan-triumph-item.component.ts b/src/app/clan/clan-triumphs/clan-triumph-item/clan-triumph-item.component.ts index 433e8654e..78608b37e 100644 --- a/src/app/clan/clan-triumphs/clan-triumph-item/clan-triumph-item.component.ts +++ b/src/app/clan/clan-triumphs/clan-triumph-item/clan-triumph-item.component.ts @@ -4,12 +4,18 @@ import { ClanSearchableTriumph, ClanStateService } from '@app/clan/clan-state.se import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '@app/shared/child.component'; import { ClanTriumphItemDialogComponent } from '../clan-triumph-item-dialog/clan-triumph-item-dialog.component'; +import { NgIf } from '@angular/common'; +import { MatIconButton, MatButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatProgressBar } from '@angular/material/progress-bar'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-triumph-item', - templateUrl: './clan-triumph-item.component.html', - styleUrls: ['./clan-triumph-item.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-triumph-item', + templateUrl: './clan-triumph-item.component.html', + styleUrls: ['./clan-triumph-item.component.scss'], + standalone: true, + imports: [NgIf, MatIconButton, FaIconComponent, MatButton, MatProgressBar] }) export class ClanTriumphItemComponent extends ChildComponent { diff --git a/src/app/clan/clan-triumphs/clan-triumph-seal-dialog/clan-triumph-seal-dialog.component.ts b/src/app/clan/clan-triumphs/clan-triumph-seal-dialog/clan-triumph-seal-dialog.component.ts index 19fefbed0..abea8295b 100644 --- a/src/app/clan/clan-triumphs/clan-triumph-seal-dialog/clan-triumph-seal-dialog.component.ts +++ b/src/app/clan/clan-triumphs/clan-triumph-seal-dialog/clan-triumph-seal-dialog.component.ts @@ -1,15 +1,23 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogContent } from '@angular/material/dialog'; import { ClanSeal, ClanStateService } from '@app/clan/clan-state.service'; import { IconService } from '@app/service/icon.service'; import { Sort } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { MatTabGroup, MatTab, MatTabLabel } from '@angular/material/tabs'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { ClanTriumphGraphComponent } from '../clan-triumph-graph/clan-triumph-graph.component'; +import { NgTemplateOutlet, NgIf, NgFor, AsyncPipe, DecimalPipe } from '@angular/common'; +import { RouterLink } from '@angular/router'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-triumph-seal-dialog', - templateUrl: './clan-triumph-seal-dialog.component.html', - styleUrls: ['./clan-triumph-seal-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-triumph-seal-dialog', + templateUrl: './clan-triumph-seal-dialog.component.html', + styleUrls: ['./clan-triumph-seal-dialog.component.scss'], + standalone: true, + imports: [CdkScrollable, MatDialogContent, MatTabGroup, MatTab, MatTabLabel, FaIconComponent, ClanTriumphGraphComponent, NgTemplateOutlet, NgIf, NgFor, RouterLink, AsyncPipe, DecimalPipe] }) export class ClanTriumphSealDialogComponent extends ChildComponent { sort: Sort = { diff --git a/src/app/clan/clan-triumphs/clan-triumph-search/clan-triumph-search.component.ts b/src/app/clan/clan-triumphs/clan-triumph-search/clan-triumph-search.component.ts index 5c60a0809..606cd766b 100644 --- a/src/app/clan/clan-triumphs/clan-triumph-search/clan-triumph-search.component.ts +++ b/src/app/clan/clan-triumphs/clan-triumph-search/clan-triumph-search.component.ts @@ -5,12 +5,19 @@ import { BehaviorSubject, Subject } from 'rxjs'; import { debounceTime, takeUntil } from 'rxjs/operators'; import { IconService } from '@app/service/icon.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatFormField, MatLabel } from '@angular/material/form-field'; +import { MatInput } from '@angular/material/input'; +import { FormsModule } from '@angular/forms'; +import { ClanTriumphItemComponent } from '../clan-triumph-item/clan-triumph-item.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-triumph-search', - templateUrl: './clan-triumph-search.component.html', - styleUrls: ['./clan-triumph-search.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-triumph-search', + templateUrl: './clan-triumph-search.component.html', + styleUrls: ['./clan-triumph-search.component.scss'], + standalone: true, + imports: [NgIf, MatFormField, MatLabel, MatInput, FormsModule, NgFor, ClanTriumphItemComponent, AsyncPipe] }) export class ClanTriumphSearchComponent extends ChildComponent implements OnInit { private triumphSearchSubject: Subject = new Subject(); diff --git a/src/app/clan/clan-triumphs/clan-triumph-tracked/clan-triumph-tracked.component.ts b/src/app/clan/clan-triumphs/clan-triumph-tracked/clan-triumph-tracked.component.ts index 4bdd3128c..f4faec70b 100644 --- a/src/app/clan/clan-triumphs/clan-triumph-tracked/clan-triumph-tracked.component.ts +++ b/src/app/clan/clan-triumphs/clan-triumph-tracked/clan-triumph-tracked.component.ts @@ -1,12 +1,16 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ClanStateService } from '@app/clan/clan-state.service'; import { ChildComponent } from '@app/shared/child.component'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { ClanTriumphItemComponent } from '../clan-triumph-item/clan-triumph-item.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-triumph-tracked', - templateUrl: './clan-triumph-tracked.component.html', - styleUrls: ['./clan-triumph-tracked.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-triumph-tracked', + templateUrl: './clan-triumph-tracked.component.html', + styleUrls: ['./clan-triumph-tracked.component.scss'], + standalone: true, + imports: [NgIf, NgFor, ClanTriumphItemComponent, AsyncPipe] }) export class ClanTriumphTrackedComponent extends ChildComponent { diff --git a/src/app/clan/clan-triumphs/clan-triumphs.component.ts b/src/app/clan/clan-triumphs/clan-triumphs.component.ts index ccea594f5..f90cd2e69 100644 --- a/src/app/clan/clan-triumphs/clan-triumphs.component.ts +++ b/src/app/clan/clan-triumphs/clan-triumphs.component.ts @@ -2,12 +2,18 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '@app/shared/child.component'; import { ClanStateService } from '../clan-state.service'; +import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; +import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-triumphs', - templateUrl: './clan-triumphs.component.html', - styleUrls: ['./clan-triumphs.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-triumphs', + templateUrl: './clan-triumphs.component.html', + styleUrls: ['./clan-triumphs.component.scss'], + standalone: true, + imports: [MatTabNav, MatTabLink, RouterLink, RouterLinkActive, FaIconComponent, MatTabNavPanel, NgIf, RouterOutlet, AsyncPipe] }) export class ClanTriumphsComponent extends ChildComponent { diff --git a/src/app/clan/clan.component.ts b/src/app/clan/clan.component.ts index 0157e8921..aad36016d 100644 --- a/src/app/clan/clan.component.ts +++ b/src/app/clan/clan.component.ts @@ -1,18 +1,26 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; import { takeUntil } from 'rxjs/operators'; import { ChildComponent } from '../shared/child.component'; import { ClanStateService } from './clan-state.service'; import { IconService } from '@app/service/icon.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatProgressBar } from '@angular/material/progress-bar'; +import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatAnchor } from '@angular/material/button'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-clan-history', - templateUrl: './clan.component.html', - styleUrls: ['./clan.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-clan-history', + templateUrl: './clan.component.html', + styleUrls: ['./clan.component.scss'], + standalone: true, + imports: [NgIf, FaIconComponent, MatProgressBar, MatTabNav, MatTabLink, RouterLink, RouterLinkActive, MatTabNavPanel, MatProgressSpinner, RouterOutlet, MatAnchor, AsyncPipe] }) export class ClanComponent extends ChildComponent implements OnInit { constructor( diff --git a/src/app/clan/clan.module.ts b/src/app/clan/clan.module.ts deleted file mode 100644 index 121e00820..000000000 --- a/src/app/clan/clan.module.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { NgModule } from '@angular/core'; -import { NgChartsModule } from 'ng2-charts'; -import { SharedModule } from '../shared'; -import { ClanBadgesComponent } from './clan-collections/clan-badges/clan-badges.component'; -import { ClanCollectionSearchComponent } from './clan-collections/clan-collection-search/clan-collection-search.component'; -import { ClanCollectionsComponent } from './clan-collections/clan-collections.component'; -import { ClanInfoComponent } from './clan-info/clan-info.component'; -import { ClanLifetimeDialogComponent } from './clan-lifetime/clan-lifetime-dialog/clan-lifetime-dialog.component'; -import { ClanLifetimeGraphComponent } from './clan-lifetime/clan-lifetime-graph/clan-lifetime-graph.component'; -import { ClanLifetimeComponent } from './clan-lifetime/clan-lifetime.component'; -import { ClanMembersComponent } from './clan-members/clan-members.component'; -import { ClanMilestonesComponent } from './clan-milestones/clan-milestones.component'; -import { ClanSettingsComponent } from './clan-settings/clan-settings.component'; -import { ClanUserListDialogComponent } from './clan-settings/clan-user-list-dialog/clan-user-list-dialog.component'; -import { ClanSealsComponent } from './clan-triumphs/clan-seals/clan-seals.component'; -import { ClanTriumphGraphComponent } from './clan-triumphs/clan-triumph-graph/clan-triumph-graph.component'; -import { ClanTriumphItemDialogComponent } from './clan-triumphs/clan-triumph-item-dialog/clan-triumph-item-dialog.component'; -import { ClanTriumphItemComponent } from './clan-triumphs/clan-triumph-item/clan-triumph-item.component'; -import { ClanTriumphSealDialogComponent } from './clan-triumphs/clan-triumph-seal-dialog/clan-triumph-seal-dialog.component'; -import { ClanTriumphSearchComponent } from './clan-triumphs/clan-triumph-search/clan-triumph-search.component'; -import { ClanTriumphTrackedComponent } from './clan-triumphs/clan-triumph-tracked/clan-triumph-tracked.component'; -import { ClanTriumphsComponent } from './clan-triumphs/clan-triumphs.component'; -import { ClanComponent } from './clan.component'; -import { ClanCollectionBadgeDialogComponent } from './clan-collections/clan-collection-badge-dialog/clan-collection-badge-dialog.component'; -import { ClanCollectionItemComponent } from './clan-collections/clan-collection-item/clan-collection-item.component'; -import { ClanCollectionItemDialogComponent } from './clan-collections/clan-collection-item-dialog/clan-collection-item-dialog.component'; - -@NgModule({ - imports: [ - SharedModule, - NgChartsModule - ], - declarations: [ClanComponent, ClanMilestonesComponent, ClanInfoComponent, - ClanLifetimeComponent, ClanTriumphsComponent, ClanMembersComponent, ClanSealsComponent, ClanTriumphSearchComponent, ClanTriumphTrackedComponent, ClanTriumphItemComponent, ClanTriumphItemDialogComponent, ClanTriumphSealDialogComponent, ClanTriumphGraphComponent, ClanSettingsComponent, ClanUserListDialogComponent, ClanLifetimeDialogComponent, ClanLifetimeGraphComponent, ClanCollectionsComponent, ClanBadgesComponent, ClanCollectionSearchComponent, ClanCollectionBadgeDialogComponent, ClanCollectionItemComponent, ClanCollectionItemDialogComponent] -}) -export class ClanModule { } diff --git a/src/app/clan/index.ts b/src/app/clan/index.ts index 3d212fb12..691584aeb 100644 --- a/src/app/clan/index.ts +++ b/src/app/clan/index.ts @@ -1,2 +1 @@ -export * from './clan.module'; export * from './clan.component'; diff --git a/src/app/deals/armor-compare-dialog/armor-compare-dialog.component.ts b/src/app/deals/armor-compare-dialog/armor-compare-dialog.component.ts index ba6b6746d..e5d0c34dc 100644 --- a/src/app/deals/armor-compare-dialog/armor-compare-dialog.component.ts +++ b/src/app/deals/armor-compare-dialog/armor-compare-dialog.component.ts @@ -1,5 +1,5 @@ import { Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { GearCompareDialogComponent } from '@app/gear/gear/gear-compare-dialog/gear-compare-dialog.component'; import { SortEvent } from '@app/gear/gear/gear-compare-dialog/horizontal-sort/horizontal-sort.component'; import { GearService } from '@app/service/gear.service'; @@ -7,11 +7,19 @@ import { IconService } from '@app/service/icon.service'; import { DamageType, InventoryItem, InventoryStat, ItemType } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; import { BehaviorSubject } from 'rxjs'; +import { NgIf, NgFor, NgClass, AsyncPipe } from '@angular/common'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { HorizontalSortComponent } from '../../gear/gear/gear-compare-dialog/horizontal-sort/horizontal-sort.component'; +import { SeasonIndicatorComponent } from '../../shared/season-indicator/season-indicator.component'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { ItemIconComponent } from '../../shared/item-icon/item-icon.component'; @Component({ - selector: 'd2c-armor-compare-dialog', - templateUrl: './armor-compare-dialog.component.html', - styleUrls: ['./armor-compare-dialog.component.scss'] + selector: 'd2c-armor-compare-dialog', + templateUrl: './armor-compare-dialog.component.html', + styleUrls: ['./armor-compare-dialog.component.scss'], + standalone: true, + imports: [NgIf, MatDialogTitle, CdkScrollable, MatDialogContent, HorizontalSortComponent, NgFor, SeasonIndicatorComponent, FaIconComponent, ItemIconComponent, NgClass, AsyncPipe] }) export class ArmorCompareDialogComponent extends ChildComponent { sortBy = 'preferredStatPoints'; diff --git a/src/app/deals/armor-deals/armor-deals.component.ts b/src/app/deals/armor-deals/armor-deals.component.ts index 1f4c00c37..cc233c2a5 100644 --- a/src/app/deals/armor-deals/armor-deals.component.ts +++ b/src/app/deals/armor-deals/armor-deals.component.ts @@ -7,12 +7,18 @@ import { ParseService } from '@app/service/parse.service'; import { SignedOnUserService } from '@app/service/signed-on-user.service'; import { ClassInventoryBucket, ExoticInventoryBucket, VendorDeals } from '@app/service/vendor.service'; import { ArmorCompareDialogComponent } from '../armor-compare-dialog/armor-compare-dialog.component'; +import { MatTooltip } from '@angular/material/tooltip'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { NgIf, NgFor, DecimalPipe } from '@angular/common'; +import { ItemIconComponent } from '../../shared/item-icon/item-icon.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-armor-deals', - templateUrl: './armor-deals.component.html', - styleUrls: ['./armor-deals.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-armor-deals', + templateUrl: './armor-deals.component.html', + styleUrls: ['./armor-deals.component.scss'], + standalone: true, + imports: [MatTooltip, FaIconComponent, NgIf, NgFor, ItemIconComponent, DecimalPipe] }) export class ArmorDealsComponent { @Input() vendorDeals!: VendorDeals; diff --git a/src/app/deals/collection-deals/collection-deals.component.ts b/src/app/deals/collection-deals/collection-deals.component.ts index 20bce7682..8a5db36bd 100644 --- a/src/app/deals/collection-deals/collection-deals.component.ts +++ b/src/app/deals/collection-deals/collection-deals.component.ts @@ -1,12 +1,17 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { VendorDeals } from '@app/service/vendor.service'; import { DestinyClasses } from '@app/service/model'; +import { MatTooltip } from '@angular/material/tooltip'; +import { NgIf, NgFor } from '@angular/common'; +import { ItemIconComponent } from '../../shared/item-icon/item-icon.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-collection-deals', - templateUrl: './collection-deals.component.html', - styleUrls: ['./collection-deals.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-collection-deals', + templateUrl: './collection-deals.component.html', + styleUrls: ['./collection-deals.component.scss'], + standalone: true, + imports: [MatTooltip, NgIf, NgFor, ItemIconComponent] }) export class CollectionDealsComponent { @Input() vendorDeals!: VendorDeals; diff --git a/src/app/deals/deals-container/deals-container.component.ts b/src/app/deals/deals-container/deals-container.component.ts index ffffed2f6..2dd69a32c 100644 --- a/src/app/deals/deals-container/deals-container.component.ts +++ b/src/app/deals/deals-container/deals-container.component.ts @@ -4,12 +4,18 @@ import { Router } from '@angular/router'; import { IconService } from '@app/service/icon.service'; import { SignedOnUserService } from '@app/service/signed-on-user.service'; import { ChildComponent } from '@app/shared/child.component'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { DealsComponent } from '../deals/deals.component'; +import { SignInRequiredComponent } from '../../shared/sign-in-required/sign-in-required.component'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-deals-container', - templateUrl: './deals-container.component.html', - styleUrls: ['./deals-container.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-deals-container', + templateUrl: './deals-container.component.html', + styleUrls: ['./deals-container.component.scss'], + standalone: true, + imports: [NgIf, DealsComponent, SignInRequiredComponent, FaIconComponent, AsyncPipe] }) export class DealsContainerComponent extends ChildComponent implements OnInit { diff --git a/src/app/deals/deals/deals.component.ts b/src/app/deals/deals/deals.component.ts index edb75c25c..acef635c0 100644 --- a/src/app/deals/deals/deals.component.ts +++ b/src/app/deals/deals/deals.component.ts @@ -1,11 +1,17 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core'; import { VendorDeals } from '@app/service/vendor.service'; +import { NgIf } from '@angular/common'; +import { CollectionDealsComponent } from '../collection-deals/collection-deals.component'; +import { WeaponDealsComponent } from '../weapon-deals/weapon-deals.component'; +import { ArmorDealsComponent } from '../armor-deals/armor-deals.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-deals', - templateUrl: './deals.component.html', - styleUrls: ['./deals.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-deals', + templateUrl: './deals.component.html', + styleUrls: ['./deals.component.scss'], + standalone: true, + imports: [NgIf, CollectionDealsComponent, WeaponDealsComponent, ArmorDealsComponent] }) export class DealsComponent { diff --git a/src/app/deals/weapon-compare-dialog/weapon-compare-dialog.component.ts b/src/app/deals/weapon-compare-dialog/weapon-compare-dialog.component.ts index 40e024e07..6277daa4d 100644 --- a/src/app/deals/weapon-compare-dialog/weapon-compare-dialog.component.ts +++ b/src/app/deals/weapon-compare-dialog/weapon-compare-dialog.component.ts @@ -1,5 +1,5 @@ import { Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { GearCompareDialogComponent } from '@app/gear/gear/gear-compare-dialog/gear-compare-dialog.component'; import { SortEvent } from '@app/gear/gear/gear-compare-dialog/horizontal-sort/horizontal-sort.component'; import { GearService } from '@app/service/gear.service'; @@ -7,11 +7,21 @@ import { IconService } from '@app/service/icon.service'; import { DamageType, InventoryItem, InventoryStat, ItemType } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; import { BehaviorSubject } from 'rxjs'; +import { NgIf, NgFor, NgClass, AsyncPipe } from '@angular/common'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { HorizontalSortComponent } from '../../gear/gear/gear-compare-dialog/horizontal-sort/horizontal-sort.component'; +import { SeasonIndicatorComponent } from '../../shared/season-indicator/season-indicator.component'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { ItemIconComponent } from '../../shared/item-icon/item-icon.component'; +import { GodRollMwComponent } from '../../gear/god-roll-mw/god-roll-mw.component'; +import { GodRollPlugComponent } from '../../gear/god-roll-plug/god-roll-plug.component'; @Component({ - selector: 'd2c-weapon-compare-dialog', - templateUrl: './weapon-compare-dialog.component.html', - styleUrls: ['./weapon-compare-dialog.component.scss'] + selector: 'd2c-weapon-compare-dialog', + templateUrl: './weapon-compare-dialog.component.html', + styleUrls: ['./weapon-compare-dialog.component.scss'], + standalone: true, + imports: [NgIf, MatDialogTitle, CdkScrollable, MatDialogContent, HorizontalSortComponent, NgFor, SeasonIndicatorComponent, FaIconComponent, ItemIconComponent, NgClass, GodRollMwComponent, GodRollPlugComponent, AsyncPipe] }) export class WeaponCompareDialogComponent extends ChildComponent { sortBy = 'preferredStatPoints'; diff --git a/src/app/deals/weapon-deals/weapon-deals.component.ts b/src/app/deals/weapon-deals/weapon-deals.component.ts index 77d71401f..38871bb40 100644 --- a/src/app/deals/weapon-deals/weapon-deals.component.ts +++ b/src/app/deals/weapon-deals/weapon-deals.component.ts @@ -5,11 +5,17 @@ import { InventoryItem } from '@app/service/model'; import { SignedOnUserService } from '@app/service/signed-on-user.service'; import { VendorDeals } from '@app/service/vendor.service'; import { WeaponCompareDialogComponent } from '../weapon-compare-dialog/weapon-compare-dialog.component'; +import { MatTooltip } from '@angular/material/tooltip'; +import { NgIf, NgFor } from '@angular/common'; +import { ItemIconComponent } from '../../shared/item-icon/item-icon.component'; +import { GodRollItemComponent } from '../../gear/god-roll-item/god-roll-item.component'; @Component({ - selector: 'd2c-weapon-deals', - templateUrl: './weapon-deals.component.html', - styleUrls: ['./weapon-deals.component.scss'] + selector: 'd2c-weapon-deals', + templateUrl: './weapon-deals.component.html', + styleUrls: ['./weapon-deals.component.scss'], + standalone: true, + imports: [MatTooltip, NgIf, NgFor, ItemIconComponent, GodRollItemComponent] }) export class WeaponDealsComponent { @Input() vendorDeals!: VendorDeals; diff --git a/src/app/friends/friends.module.ts b/src/app/friends/friends.module.ts deleted file mode 100644 index dc2b139d3..000000000 --- a/src/app/friends/friends.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { NgModule } from '@angular/core'; -import { SharedModule } from '../shared'; -import { FriendsComponent } from './friends/friends.component'; - -@NgModule({ - imports: [ - SharedModule - ], - declarations: [FriendsComponent] -}) -export class FriendsModule { } diff --git a/src/app/friends/friends/friends.component.ts b/src/app/friends/friends/friends.component.ts index 8220b604d..d23a71be8 100644 --- a/src/app/friends/friends/friends.component.ts +++ b/src/app/friends/friends/friends.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; import { BungieService } from '@app/service/bungie.service'; import { IconService } from '@app/service/icon.service'; import { FriendListEntry, Player, UserInfo } from '@app/service/model'; @@ -8,13 +8,22 @@ import { takeUntil } from 'rxjs/operators'; import { StorageService } from '../../service/storage.service'; import { ChildComponent } from '../../shared/child.component'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatAnchor } from '@angular/material/button'; +import { NgIf, NgFor, AsyncPipe, DecimalPipe } from '@angular/common'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatTooltip } from '@angular/material/tooltip'; +import { MilestoneCheckComponent } from '../../shared/milestone-check/milestone-check.component'; +import { AgoHumanizedPipe } from '../../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-friends', - templateUrl: './friends.component.html', - styleUrls: ['./friends.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-friends', + templateUrl: './friends.component.html', + styleUrls: ['./friends.component.scss'], + standalone: true, + imports: [FaIconComponent, MatAnchor, NgIf, MatProgressSpinner, NgFor, MatTooltip, RouterLink, MilestoneCheckComponent, AgoHumanizedPipe, AsyncPipe, DecimalPipe] }) export class FriendsComponent extends ChildComponent { public members: BehaviorSubject = new BehaviorSubject([]); diff --git a/src/app/friends/index.ts b/src/app/friends/index.ts index 0eec9789f..dfb8419d3 100644 --- a/src/app/friends/index.ts +++ b/src/app/friends/index.ts @@ -1,2 +1 @@ -export * from './friends.module'; export * from './friends/friends.component'; diff --git a/src/app/gamer-tag-search/gamer-tag-search.component.ts b/src/app/gamer-tag-search/gamer-tag-search.component.ts index df850e023..0c62b0576 100644 --- a/src/app/gamer-tag-search/gamer-tag-search.component.ts +++ b/src/app/gamer-tag-search/gamer-tag-search.component.ts @@ -6,13 +6,18 @@ import { takeUntil } from 'rxjs/operators'; import { BehaviorSubject } from 'rxjs'; import { Platform, Const } from '@app/service/model'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatButton } from '@angular/material/button'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-gamer-tag-search', - templateUrl: './gamer-tag-search.component.html', - styleUrls: ['./gamer-tag-search.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-gamer-tag-search', + templateUrl: './gamer-tag-search.component.html', + styleUrls: ['./gamer-tag-search.component.scss'], + standalone: true, + imports: [NgIf, NgFor, MatButton, MatProgressSpinner, AsyncPipe] }) export class GamerTagSearchComponent extends ChildComponent implements OnInit { diff --git a/src/app/gear/gear.module.ts b/src/app/gear/gear.module.ts deleted file mode 100644 index 6997535c0..000000000 --- a/src/app/gear/gear.module.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { NgModule } from '@angular/core'; -import { SharedModule } from '../shared'; -import { ClipboardModule } from 'ngx-clipboard'; -import { GearComponent} from './gear/gear.component'; -import { PossibleRollsDialogComponent } from './possible-rolls-dialog/possible-rolls-dialog.component'; -import { TargetArmorStatsDialogComponent } from './target-armor-stats-dialog/target-armor-stats-dialog.component'; -import { GearCompareDialogComponent } from './gear/gear-compare-dialog/gear-compare-dialog.component'; -import { GearHelpDialogComponent } from './gear/gear-help-dialog/gear-help-dialog.component'; -import { BulkOperationsHelpDialogComponent } from './gear/bulk-operations-help-dialog/bulk-operations-help-dialog.component'; -import { GearUtilitiesDialogComponent } from './gear/gear-utilities-dialog/gear-utilities-dialog.component'; -import { ArmorPerksDialogComponent } from './gear/armor-perks-dialog/armor-perks-dialog.component'; -import { GearToggleComponent } from './gear/gear-toggle/gear-toggle.component'; -import { SeasonBreakdownDialogComponent } from './gear/season-breakdown-dialog/season-breakdown-dialog.component'; -import { WritablePlugComponent } from './writable-plug/writable-plug.component'; -import { ModHelperDialogComponent } from './gear/mod-helper-dialog/mod-helper-dialog.component'; -import { WritableSocketsComponent } from './writable-sockets/writable-sockets.component'; -import { SelectModDialogComponent } from './gear/select-mod-dialog/select-mod-dialog.component'; -import { OptimizeGunPerksDialogComponent } from './gear/optimize-gun-perks-dialog/optimize-gun-perks-dialog.component'; -import { ShardModeDialogComponent } from './gear/shard-mode-dialog/shard-mode-dialog.component'; -import { UpgradeModeDialogComponent } from './gear/upgrade-mode-dialog/upgrade-mode-dialog.component'; - -@NgModule({ - imports: [ - SharedModule, ClipboardModule - ], - declarations: [GearComponent, GearToggleComponent, GearCompareDialogComponent, GearHelpDialogComponent, BulkOperationsHelpDialogComponent, GearUtilitiesDialogComponent, - ArmorPerksDialogComponent, TargetArmorStatsDialogComponent, PossibleRollsDialogComponent, TargetArmorStatsDialogComponent, GearCompareDialogComponent, SeasonBreakdownDialogComponent, WritablePlugComponent, ModHelperDialogComponent, WritableSocketsComponent, SelectModDialogComponent, OptimizeGunPerksDialogComponent, ShardModeDialogComponent, UpgradeModeDialogComponent] -}) -export class GearModule { } diff --git a/src/app/gear/gear/armor-perks-dialog/armor-perks-dialog.component.ts b/src/app/gear/gear/armor-perks-dialog/armor-perks-dialog.component.ts index 41c5cfa1c..f52be27d4 100644 --- a/src/app/gear/gear/armor-perks-dialog/armor-perks-dialog.component.ts +++ b/src/app/gear/gear/armor-perks-dialog/armor-perks-dialog.component.ts @@ -1,15 +1,20 @@ import { Component, Inject, ChangeDetectionStrategy } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { IconService } from '@app/service/icon.service'; import { GearComponent } from '../gear.component'; import { Character, InventoryPlug, Player } from '@app/service/model'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { MatTabGroup, MatTab } from '@angular/material/tabs'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-armor-perks-dialog', - templateUrl: './armor-perks-dialog.component.html', - styleUrls: ['./armor-perks-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-armor-perks-dialog', + templateUrl: './armor-perks-dialog.component.html', + styleUrls: ['./armor-perks-dialog.component.scss'], + standalone: true, + imports: [MatDialogTitle, NgIf, CdkScrollable, MatDialogContent, MatTabGroup, NgFor, MatTab, AsyncPipe] }) export class ArmorPerksDialogComponent { parent: GearComponent; diff --git a/src/app/gear/gear/bulk-operations-help-dialog/bulk-operations-help-dialog.component.ts b/src/app/gear/gear/bulk-operations-help-dialog/bulk-operations-help-dialog.component.ts index ea4384e46..b133d81fc 100644 --- a/src/app/gear/gear/bulk-operations-help-dialog/bulk-operations-help-dialog.component.ts +++ b/src/app/gear/gear/bulk-operations-help-dialog/bulk-operations-help-dialog.component.ts @@ -1,12 +1,15 @@ import { Component, Inject, ChangeDetectionStrategy } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { IconService } from '@app/service/icon.service'; +import { CdkScrollable } from '@angular/cdk/scrolling'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-bulk-operations-help-dialog', - templateUrl: './bulk-operations-help-dialog.component.html', - styleUrls: ['./bulk-operations-help-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-bulk-operations-help-dialog', + templateUrl: './bulk-operations-help-dialog.component.html', + styleUrls: ['./bulk-operations-help-dialog.component.scss'], + standalone: true, + imports: [MatDialogTitle, CdkScrollable, MatDialogContent] }) export class BulkOperationsHelpDialogComponent { constructor( diff --git a/src/app/gear/gear/gear-compare-dialog/gear-compare-dialog.component.ts b/src/app/gear/gear/gear-compare-dialog/gear-compare-dialog.component.ts index fbdd2960e..1b9e059bc 100644 --- a/src/app/gear/gear/gear-compare-dialog/gear-compare-dialog.component.ts +++ b/src/app/gear/gear/gear-compare-dialog/gear-compare-dialog.component.ts @@ -1,18 +1,40 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogClose, MatDialogContent } from '@angular/material/dialog'; import { GearService } from '@app/service/gear.service'; import { IconService } from '@app/service/icon.service'; import { DamageType, InventoryItem, InventoryStat, ItemType } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; import { BehaviorSubject } from 'rxjs'; import { GearComponent } from '../gear.component'; -import { SortEvent } from './horizontal-sort/horizontal-sort.component'; +import { SortEvent, HorizontalSortComponent } from './horizontal-sort/horizontal-sort.component'; +import { NgIf, NgFor, NgClass, AsyncPipe, DecimalPipe, DatePipe } from '@angular/common'; +import { SeasonIndicatorComponent } from '../../../shared/season-indicator/season-indicator.component'; +import { MatIconButton, MatButton } from '@angular/material/button'; +import { MatIcon } from '@angular/material/icon'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { FormsModule } from '@angular/forms'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { MatTooltip } from '@angular/material/tooltip'; +import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { GodRollItemComponent } from '../../god-roll-item/god-roll-item.component'; +import { ItemIconComponent } from '../../../shared/item-icon/item-icon.component'; +import { MatFormField, MatLabel } from '@angular/material/form-field'; +import { MatInput } from '@angular/material/input'; +import { MatAutocompleteTrigger, MatAutocomplete } from '@angular/material/autocomplete'; +import { MatProgressBar } from '@angular/material/progress-bar'; +import { RouterLink } from '@angular/router'; +import { GodRollMwComponent } from '../../god-roll-mw/god-roll-mw.component'; +import { WritablePlugComponent } from '../../writable-plug/writable-plug.component'; +import { MatOption } from '@angular/material/core'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-gear-compare-dialog', - templateUrl: './gear-compare-dialog.component.html', - styleUrls: ['../gear.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-gear-compare-dialog', + templateUrl: './gear-compare-dialog.component.html', + styleUrls: ['../gear.component.scss'], + standalone: true, + imports: [NgIf, MatDialogTitle, SeasonIndicatorComponent, MatIconButton, MatDialogClose, MatIcon, MatCheckbox, FormsModule, CdkScrollable, MatDialogContent, HorizontalSortComponent, NgFor, MatButton, MatTooltip, MatMenuTrigger, MatMenu, MatMenuItem, FaIconComponent, NgClass, GodRollItemComponent, ItemIconComponent, MatFormField, MatLabel, MatInput, MatAutocompleteTrigger, MatProgressBar, RouterLink, GodRollMwComponent, WritablePlugComponent, MatAutocomplete, MatOption, AsyncPipe, DecimalPipe, DatePipe] }) export class GearCompareDialogComponent extends ChildComponent { sortBy = 'power'; diff --git a/src/app/gear/gear/gear-compare-dialog/horizontal-sort/horizontal-sort.component.ts b/src/app/gear/gear/gear-compare-dialog/horizontal-sort/horizontal-sort.component.ts index 9a5438ddf..9245833c0 100644 --- a/src/app/gear/gear/gear-compare-dialog/horizontal-sort/horizontal-sort.component.ts +++ b/src/app/gear/gear/gear-compare-dialog/horizontal-sort/horizontal-sort.component.ts @@ -1,5 +1,7 @@ import { Component, OnInit, ChangeDetectionStrategy, Input, Output, EventEmitter } from '@angular/core'; import { IconService } from '@app/service/icon.service'; +import { NgIf } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; export interface SortEvent { field: string; @@ -7,10 +9,12 @@ export interface SortEvent { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-horizontal-sort', - templateUrl: './horizontal-sort.component.html', - styleUrls: ['./horizontal-sort.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-horizontal-sort', + templateUrl: './horizontal-sort.component.html', + styleUrls: ['./horizontal-sort.component.scss'], + standalone: true, + imports: [NgIf, FaIconComponent] }) export class HorizontalSortComponent { diff --git a/src/app/gear/gear/gear-help-dialog/gear-help-dialog.component.ts b/src/app/gear/gear/gear-help-dialog/gear-help-dialog.component.ts index 31cc9851f..05f992ee3 100644 --- a/src/app/gear/gear/gear-help-dialog/gear-help-dialog.component.ts +++ b/src/app/gear/gear/gear-help-dialog/gear-help-dialog.component.ts @@ -1,12 +1,15 @@ import { Component, Inject, ChangeDetectionStrategy } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { IconService } from '@app/service/icon.service'; +import { CdkScrollable } from '@angular/cdk/scrolling'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-gear-help-dialog', - templateUrl: './gear-help-dialog.component.html', - styleUrls: ['../gear.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-gear-help-dialog', + templateUrl: './gear-help-dialog.component.html', + styleUrls: ['../gear.component.scss'], + standalone: true, + imports: [MatDialogTitle, CdkScrollable, MatDialogContent] }) export class GearHelpDialogComponent { diff --git a/src/app/gear/gear/gear-toggle/gear-toggle.component.ts b/src/app/gear/gear/gear-toggle/gear-toggle.component.ts index c4fe60035..2f39bb940 100644 --- a/src/app/gear/gear/gear-toggle/gear-toggle.component.ts +++ b/src/app/gear/gear/gear-toggle/gear-toggle.component.ts @@ -2,13 +2,19 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { BehaviorSubject } from 'rxjs'; import { generateState, ToggleState } from '../gear-filter-state.service'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatButton, MatIconButton } from '@angular/material/button'; +import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-gear-toggle', - templateUrl: './gear-toggle.component.html', - styleUrls: ['../gear.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-gear-toggle', + templateUrl: './gear-toggle.component.html', + styleUrls: ['../gear.component.scss'], + standalone: true, + imports: [NgIf, MatButton, MatMenuTrigger, FaIconComponent, MatMenu, MatMenuItem, NgFor, MatIconButton, AsyncPipe] }) export class GearToggleComponent { diff --git a/src/app/gear/gear/gear-utilities-dialog/gear-utilities-dialog.component.ts b/src/app/gear/gear/gear-utilities-dialog/gear-utilities-dialog.component.ts index 12f7c5638..1f920f103 100644 --- a/src/app/gear/gear/gear-utilities-dialog/gear-utilities-dialog.component.ts +++ b/src/app/gear/gear/gear-utilities-dialog/gear-utilities-dialog.component.ts @@ -1,11 +1,20 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { UntypedFormControl, FormGroupDirective, NgForm, Validators } from '@angular/forms'; -import { ErrorStateMatcher } from '@angular/material/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { MatSelectChange } from '@angular/material/select'; +import { UntypedFormControl, FormGroupDirective, NgForm, Validators, FormsModule } from '@angular/forms'; +import { ErrorStateMatcher, MatOption } from '@angular/material/core'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogContent } from '@angular/material/dialog'; +import { MatSelectChange, MatSelect } from '@angular/material/select'; import { IconService } from '@app/service/icon.service'; import { DimSyncChoice, MarkService } from '@app/service/mark.service'; import { GearComponent } from '../gear.component'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { NgIf, NgFor, AsyncPipe, DatePipe } from '@angular/common'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatTabGroup, MatTab } from '@angular/material/tabs'; +import { MatFormField, MatError } from '@angular/material/form-field'; +import { MatButton, MatAnchor } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { RouterLink } from '@angular/router'; +import { MatRadioGroup, MatRadioButton } from '@angular/material/radio'; interface DimSyncOption { text: string; @@ -20,10 +29,12 @@ export class InstantMatcher implements ErrorStateMatcher { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-gear-utilities-dialog', - templateUrl: './gear-utilities-dialog.component.html', - styleUrls: ['./gear-utilities-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-gear-utilities-dialog', + templateUrl: './gear-utilities-dialog.component.html', + styleUrls: ['./gear-utilities-dialog.component.scss'], + standalone: true, + imports: [CdkScrollable, MatDialogContent, NgIf, MatProgressSpinner, MatTabGroup, MatTab, FormsModule, MatFormField, MatSelect, NgFor, MatOption, MatError, MatButton, FaIconComponent, MatAnchor, RouterLink, MatRadioGroup, MatRadioButton, AsyncPipe, DatePipe] }) export class GearUtilitiesDialogComponent { parent: GearComponent; diff --git a/src/app/gear/gear/gear.component.ts b/src/app/gear/gear/gear.component.ts index 9212cbb45..fc674b525 100644 --- a/src/app/gear/gear/gear.component.ts +++ b/src/app/gear/gear/gear.component.ts @@ -1,8 +1,8 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit, ViewChild } from '@angular/core'; -import { MatButtonToggleGroup } from '@angular/material/button-toggle'; +import { MatButtonToggleGroup, MatButtonToggle } from '@angular/material/button-toggle'; import { MatDialog, MatDialogConfig, MatDialogRef } from '@angular/material/dialog'; import { MatPaginator, PageEvent } from '@angular/material/paginator'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { PlBucketDialogComponent } from '@app/player/pl-bucket-dialog/pl-bucket-dialog.component'; import { PlayerStateService } from '@app/player/player-state.service'; import { GearService } from '@app/service/gear.service'; @@ -31,12 +31,35 @@ import { SeasonBreakdownDialogComponent } from './season-breakdown-dialog/season import { ShardModeDialogComponent } from './shard-mode-dialog/shard-mode-dialog.component'; import { UpgradeModeDialogComponent } from './upgrade-mode-dialog/upgrade-mode-dialog.component'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, NgTemplateOutlet, NgClass, AsyncPipe, DecimalPipe, DatePipe } from '@angular/common'; +import { FaIconComponent, FaStackComponent, FaStackItemSizeDirective } from '@fortawesome/angular-fontawesome'; +import { SignInRequiredComponent } from '../../shared/sign-in-required/sign-in-required.component'; +import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; +import { MatTooltip } from '@angular/material/tooltip'; +import { GearToggleComponent } from './gear-toggle/gear-toggle.component'; +import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field'; +import { MatInput } from '@angular/material/input'; +import { MatAutocompleteTrigger, MatAutocomplete } from '@angular/material/autocomplete'; +import { FormsModule } from '@angular/forms'; +import { MatIconButton, MatButton } from '@angular/material/button'; +import { MatIcon } from '@angular/material/icon'; +import { MatOption } from '@angular/material/core'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { SortIndicatorComponent } from '../../shared/sort-indicator/sort-indicator.component'; +import { ItemIconComponent } from '../../shared/item-icon/item-icon.component'; +import { GodRollItemComponent } from '../god-roll-item/god-roll-item.component'; +import { MatProgressBar } from '@angular/material/progress-bar'; +import { SeasonIndicatorComponent } from '../../shared/season-indicator/season-indicator.component'; +import { WritableSocketsComponent } from '../writable-sockets/writable-sockets.component'; +import { GodRollMwComponent } from '../god-roll-mw/god-roll-mw.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-gear', - templateUrl: './gear.component.html', - styleUrls: ['./gear.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-gear', + templateUrl: './gear.component.html', + styleUrls: ['./gear.component.scss'], + standalone: true, + imports: [NgIf, FaIconComponent, SignInRequiredComponent, MatMenuTrigger, MatTooltip, MatButtonToggleGroup, MatButtonToggle, NgFor, MatMenu, MatMenuItem, GearToggleComponent, MatFormField, MatLabel, MatInput, MatAutocompleteTrigger, FormsModule, MatIconButton, MatSuffix, MatIcon, MatAutocomplete, MatOption, MatButton, MatCheckbox, FaStackComponent, FaStackItemSizeDirective, SortIndicatorComponent, NgTemplateOutlet, NgClass, ItemIconComponent, GodRollItemComponent, MatProgressBar, RouterLink, SeasonIndicatorComponent, WritableSocketsComponent, GodRollMwComponent, MatPaginator, AsyncPipe, DecimalPipe, DatePipe] }) export class GearComponent extends ChildComponent implements OnInit { diff --git a/src/app/gear/gear/mod-helper-dialog/mod-helper-dialog.component.ts b/src/app/gear/gear/mod-helper-dialog/mod-helper-dialog.component.ts index 032365630..24a8d06eb 100644 --- a/src/app/gear/gear/mod-helper-dialog/mod-helper-dialog.component.ts +++ b/src/app/gear/gear/mod-helper-dialog/mod-helper-dialog.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose } from '@angular/material/dialog'; import { GearComponent } from '@app/gear'; import { GearService } from '@app/service/gear.service'; import { IconService } from '@app/service/icon.service'; @@ -9,12 +9,38 @@ import { ChildComponent } from '@app/shared/child.component'; import { BehaviorSubject } from 'rxjs'; import { applyMods, clearMods, getEnergyApproachArray, getEnergyApproachString, ModChoices, PreferredStat, PreferredStats } from './mod-wizard-logic'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { MatIconButton, MatButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatButtonToggleGroup, MatButtonToggle } from '@angular/material/button-toggle'; +import { MatRadioGroup, MatRadioButton } from '@angular/material/radio'; +import { FormsModule } from '@angular/forms'; @Component({ - selector: 'd2c-mod-helper-dialog', - templateUrl: './mod-helper-dialog.component.html', - styleUrls: ['./mod-helper-dialog.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-mod-helper-dialog', + templateUrl: './mod-helper-dialog.component.html', + styleUrls: ['./mod-helper-dialog.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatDialogTitle, + MatIconButton, + FaIconComponent, + CdkScrollable, + MatDialogContent, + NgIf, + MatButtonToggleGroup, + NgFor, + MatButtonToggle, + MatRadioGroup, + FormsModule, + MatRadioButton, + MatDialogActions, + MatButton, + MatDialogClose, + AsyncPipe, + ], }) export class ModHelperDialogComponent extends ChildComponent { diff --git a/src/app/gear/gear/optimize-gun-perks-dialog/optimize-gun-perks-dialog.component.ts b/src/app/gear/gear/optimize-gun-perks-dialog/optimize-gun-perks-dialog.component.ts index fb0422a69..989dccc2f 100644 --- a/src/app/gear/gear/optimize-gun-perks-dialog/optimize-gun-perks-dialog.component.ts +++ b/src/app/gear/gear/optimize-gun-perks-dialog/optimize-gun-perks-dialog.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose } from '@angular/material/dialog'; import { GearComponent } from '@app/gear'; import { GearService } from '@app/service/gear.service'; import { IconService } from '@app/service/icon.service'; @@ -8,12 +8,30 @@ import { NotificationService } from '@app/service/notification.service'; import { ChildComponent } from '@app/shared/child.component'; import { BehaviorSubject } from 'rxjs'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { MatIconButton, MatButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; @Component({ - selector: 'd2c-optimize-gun-perks-dialog', - templateUrl: './optimize-gun-perks-dialog.component.html', - styleUrls: ['./optimize-gun-perks-dialog.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-optimize-gun-perks-dialog', + templateUrl: './optimize-gun-perks-dialog.component.html', + styleUrls: ['./optimize-gun-perks-dialog.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ + MatDialogTitle, + MatIconButton, + FaIconComponent, + CdkScrollable, + MatDialogContent, + NgIf, + NgFor, + MatDialogActions, + MatButton, + MatDialogClose, + AsyncPipe, + ], }) export class OptimizeGunPerksDialogComponent extends ChildComponent { parent: GearComponent; diff --git a/src/app/gear/gear/season-breakdown-dialog/season-breakdown-dialog.component.ts b/src/app/gear/gear/season-breakdown-dialog/season-breakdown-dialog.component.ts index e77c74f64..3067983ff 100644 --- a/src/app/gear/gear/season-breakdown-dialog/season-breakdown-dialog.component.ts +++ b/src/app/gear/gear/season-breakdown-dialog/season-breakdown-dialog.component.ts @@ -1,14 +1,22 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogContent } from '@angular/material/dialog'; import { IconService } from '@app/service/icon.service'; import { Character, InventoryItem, Player } from '@app/service/model'; import { BehaviorSubject } from 'rxjs'; import { GearComponent } from '../gear.component'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { MatTabGroup, MatTab } from '@angular/material/tabs'; +import { NgFor, NgIf, AsyncPipe } from '@angular/common'; +import { MatTooltip } from '@angular/material/tooltip'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { SeasonIndicatorComponent } from '../../../shared/season-indicator/season-indicator.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-season-breakdown-dialog', - templateUrl: './season-breakdown-dialog.component.html', - styleUrls: ['./season-breakdown-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-season-breakdown-dialog', + templateUrl: './season-breakdown-dialog.component.html', + styleUrls: ['./season-breakdown-dialog.component.scss'], + standalone: true, + imports: [CdkScrollable, MatDialogContent, MatTabGroup, NgFor, MatTab, MatTooltip, FaIconComponent, NgIf, SeasonIndicatorComponent, AsyncPipe] }) export class SeasonBreakdownDialogComponent { parent: GearComponent; diff --git a/src/app/gear/gear/select-mod-dialog/select-mod-dialog.component.ts b/src/app/gear/gear/select-mod-dialog/select-mod-dialog.component.ts index c7da7cbc2..83b80d120 100644 --- a/src/app/gear/gear/select-mod-dialog/select-mod-dialog.component.ts +++ b/src/app/gear/gear/select-mod-dialog/select-mod-dialog.component.ts @@ -1,14 +1,20 @@ import { Component, Inject } from '@angular/core'; -import { MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { ManifestInventoryItem } from '@app/service/destiny-cache.service'; import { GearService } from '@app/service/gear.service'; import { IconService } from '@app/service/icon.service'; import { InventoryItem, InventorySocket } from '@app/service/model'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { ManifestItemIconComponent } from '../../../shared/manifest-item-icon/manifest-item-icon.component'; @Component({ - selector: 'd2c-select-mod-dialog', - templateUrl: './select-mod-dialog.component.html', - styleUrls: ['./select-mod-dialog.component.scss'] + selector: 'd2c-select-mod-dialog', + templateUrl: './select-mod-dialog.component.html', + styleUrls: ['./select-mod-dialog.component.scss'], + standalone: true, + imports: [MatDialogTitle, CdkScrollable, MatDialogContent, NgIf, FaIconComponent, NgFor, ManifestItemIconComponent, AsyncPipe] }) export class SelectModDialogComponent { public item: InventoryItem; diff --git a/src/app/gear/gear/shard-mode-dialog/shard-mode-dialog.component.ts b/src/app/gear/gear/shard-mode-dialog/shard-mode-dialog.component.ts index 9c927feb4..87b0496fb 100644 --- a/src/app/gear/gear/shard-mode-dialog/shard-mode-dialog.component.ts +++ b/src/app/gear/gear/shard-mode-dialog/shard-mode-dialog.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, Component, Inject, OnInit } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose } from '@angular/material/dialog'; import { GearService } from '@app/service/gear.service'; import { IconService } from '@app/service/icon.service'; import { GearMetaData, InventoryItem, ItemType, Player } from '@app/service/model'; @@ -9,6 +9,13 @@ import { BehaviorSubject, Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { GearComponent } from '../gear.component'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { MatButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { MatTooltip } from '@angular/material/tooltip'; +import { ManifestItemIconComponent } from '../../../shared/manifest-item-icon/manifest-item-icon.component'; +import { MatProgressBar } from '@angular/material/progress-bar'; interface Tuple { held: number; @@ -38,10 +45,12 @@ function buildEmptyData(): ShardModeDialogData { @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-shard-mode-dialog', - templateUrl: './shard-mode-dialog.component.html', - styleUrls: ['./shard-mode-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-shard-mode-dialog', + templateUrl: './shard-mode-dialog.component.html', + styleUrls: ['./shard-mode-dialog.component.scss'], + standalone: true, + imports: [MatDialogTitle, MatButton, FaIconComponent, CdkScrollable, MatDialogContent, NgIf, MatTooltip, ManifestItemIconComponent, MatProgressBar, MatDialogActions, MatDialogClose, AsyncPipe] }) export class ShardModeDialogComponent extends ChildComponent { parent: GearComponent; diff --git a/src/app/gear/gear/upgrade-mode-dialog/upgrade-mode-dialog.component.ts b/src/app/gear/gear/upgrade-mode-dialog/upgrade-mode-dialog.component.ts index 9a5b6b9e6..1ba43ee0e 100644 --- a/src/app/gear/gear/upgrade-mode-dialog/upgrade-mode-dialog.component.ts +++ b/src/app/gear/gear/upgrade-mode-dialog/upgrade-mode-dialog.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, Component, Inject, OnInit } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose } from '@angular/material/dialog'; import { SimpleInventoryItem } from '@app/service/destiny-cache.service'; import { GearService } from '@app/service/gear.service'; import { IconService } from '@app/service/icon.service'; @@ -10,6 +10,13 @@ import { BehaviorSubject, Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { GearComponent } from '../gear.component'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { MatButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatTooltip } from '@angular/material/tooltip'; +import { ManifestItemIconComponent } from '../../../shared/manifest-item-icon/manifest-item-icon.component'; +import { MatProgressBar } from '@angular/material/progress-bar'; @@ -34,10 +41,12 @@ function buildEmptyData(): UpgradeModeDialogData { }; } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-upgrade-mode-dialog', - templateUrl: './upgrade-mode-dialog.component.html', - styleUrls: ['./upgrade-mode-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-upgrade-mode-dialog', + templateUrl: './upgrade-mode-dialog.component.html', + styleUrls: ['./upgrade-mode-dialog.component.scss'], + standalone: true, + imports: [MatDialogTitle, MatButton, FaIconComponent, CdkScrollable, MatDialogContent, NgIf, MatTooltip, NgFor, ManifestItemIconComponent, MatProgressBar, MatDialogActions, MatDialogClose, AsyncPipe] }) export class UpgradeModeDialogComponent extends ChildComponent { parent: GearComponent; diff --git a/src/app/gear/god-roll-item/god-roll-item.component.ts b/src/app/gear/god-roll-item/god-roll-item.component.ts index 77fff7736..decddbda2 100644 --- a/src/app/gear/god-roll-item/god-roll-item.component.ts +++ b/src/app/gear/god-roll-item/god-roll-item.component.ts @@ -1,12 +1,17 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { InventoryItem } from '@app/service/model'; +import { NgIf, NgStyle } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatTooltip } from '@angular/material/tooltip'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-god-roll-item', - templateUrl: './god-roll-item.component.html', - styleUrls: ['./god-roll-item.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-god-roll-item', + templateUrl: './god-roll-item.component.html', + styleUrls: ['./god-roll-item.component.scss'], + standalone: true, + imports: [NgIf, NgStyle, FaIconComponent, MatTooltip] }) export class GodRollItemComponent { diff --git a/src/app/gear/god-roll-mw/god-roll-mw.component.ts b/src/app/gear/god-roll-mw/god-roll-mw.component.ts index 88171a7d6..47f770c59 100644 --- a/src/app/gear/god-roll-mw/god-roll-mw.component.ts +++ b/src/app/gear/god-roll-mw/god-roll-mw.component.ts @@ -1,12 +1,18 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { InventoryItem, ItemType } from '@app/service/model'; +import { NgIf } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatTooltip } from '@angular/material/tooltip'; +import { MatProgressBar } from '@angular/material/progress-bar'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-god-roll-mw', - templateUrl: './god-roll-mw.component.html', - styleUrls: ['./god-roll-mw.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-god-roll-mw', + templateUrl: './god-roll-mw.component.html', + styleUrls: ['./god-roll-mw.component.scss'], + standalone: true, + imports: [NgIf, FaIconComponent, MatTooltip, MatProgressBar] }) export class GodRollMwComponent { ItemType = ItemType; diff --git a/src/app/gear/god-roll-plug/god-roll-plug.component.ts b/src/app/gear/god-roll-plug/god-roll-plug.component.ts index 3e60a1861..1d893f306 100644 --- a/src/app/gear/god-roll-plug/god-roll-plug.component.ts +++ b/src/app/gear/god-roll-plug/god-roll-plug.component.ts @@ -3,12 +3,18 @@ import { IconService } from '@app/service/icon.service'; import { InventoryPlug } from '@app/service/model'; import { NotificationService } from '@app/service/notification.service'; import { ClipboardService } from 'ngx-clipboard'; +import { NgIf } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatTooltip } from '@angular/material/tooltip'; +import { MatIconButton } from '@angular/material/button'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-god-roll-plug', - templateUrl: './god-roll-plug.component.html', - styleUrls: ['./god-roll-plug.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-god-roll-plug', + templateUrl: './god-roll-plug.component.html', + styleUrls: ['./god-roll-plug.component.scss'], + standalone: true, + imports: [NgIf, FaIconComponent, MatTooltip, MatIconButton] }) export class GodRollPlugComponent { diff --git a/src/app/gear/index.ts b/src/app/gear/index.ts index 39b89d104..a29b5cde2 100644 --- a/src/app/gear/index.ts +++ b/src/app/gear/index.ts @@ -1,2 +1 @@ -export * from './gear.module'; export * from './gear/gear.component'; diff --git a/src/app/gear/possible-rolls-dialog/possible-rolls-dialog.component.ts b/src/app/gear/possible-rolls-dialog/possible-rolls-dialog.component.ts index 6318ecb0d..ba52a03d1 100644 --- a/src/app/gear/possible-rolls-dialog/possible-rolls-dialog.component.ts +++ b/src/app/gear/possible-rolls-dialog/possible-rolls-dialog.component.ts @@ -1,17 +1,21 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { IconService } from '@app/service/icon.service'; import { InventoryItem } from '@app/service/model'; import { NotificationService } from '@app/service/notification.service'; import { ClipboardService } from 'ngx-clipboard'; import { GearComponent } from '../gear/gear.component'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { GodRollPlugComponent } from '../god-roll-plug/god-roll-plug.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-possible-rolls-dialog', - templateUrl: './possible-rolls-dialog.component.html', - styleUrls: ['../gear/gear.component.scss'] - + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-possible-rolls-dialog', + templateUrl: './possible-rolls-dialog.component.html', + styleUrls: ['../gear/gear.component.scss'], + standalone: true, + imports: [MatDialogTitle, NgIf, CdkScrollable, MatDialogContent, NgFor, GodRollPlugComponent, AsyncPipe] }) export class PossibleRollsDialogComponent { diff --git a/src/app/gear/target-armor-stats-dialog/target-armor-stats-dialog.component.ts b/src/app/gear/target-armor-stats-dialog/target-armor-stats-dialog.component.ts index 2a5e26c22..661213e62 100644 --- a/src/app/gear/target-armor-stats-dialog/target-armor-stats-dialog.component.ts +++ b/src/app/gear/target-armor-stats-dialog/target-armor-stats-dialog.component.ts @@ -1,14 +1,23 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions } from '@angular/material/dialog'; import { MatSlideToggleChange } from '@angular/material/slide-toggle'; import { DestinyClasses } from '@app/service/model'; import { DetailedPreferredStats, PreferredStatService } from '@app/service/preferred-stat.service'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { MatTabGroup, MatTab } from '@angular/material/tabs'; +import { NgFor } from '@angular/common'; +import { MatSlider, MatSliderThumb } from '@angular/material/slider'; +import { FormsModule } from '@angular/forms'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { MatButton } from '@angular/material/button'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-target-armor-stats-dialog', - templateUrl: './target-armor-stats-dialog.component.html', - styleUrls: ['./target-armor-stats-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-target-armor-stats-dialog', + templateUrl: './target-armor-stats-dialog.component.html', + styleUrls: ['./target-armor-stats-dialog.component.scss'], + standalone: true, + imports: [MatDialogTitle, CdkScrollable, MatDialogContent, MatTabGroup, NgFor, MatTab, MatSlider, MatSliderThumb, FormsModule, MatCheckbox, MatDialogActions, MatButton] }) export class TargetArmorStatsDialogComponent { preferred: DetailedPreferredStats; diff --git a/src/app/gear/writable-plug/writable-plug.component.ts b/src/app/gear/writable-plug/writable-plug.component.ts index 2eb6150d1..09b15a177 100644 --- a/src/app/gear/writable-plug/writable-plug.component.ts +++ b/src/app/gear/writable-plug/writable-plug.component.ts @@ -1,11 +1,15 @@ import { Component, Input } from '@angular/core'; import { GearService } from '@app/service/gear.service'; import { InventoryItem, InventoryPlug, InventorySocket } from '@app/service/model'; +import { NgIf } from '@angular/common'; +import { GodRollPlugComponent } from '../god-roll-plug/god-roll-plug.component'; @Component({ - selector: 'd2c-writable-plug', - templateUrl: './writable-plug.component.html', - styleUrls: ['./writable-plug.component.scss'] + selector: 'd2c-writable-plug', + templateUrl: './writable-plug.component.html', + styleUrls: ['./writable-plug.component.scss'], + standalone: true, + imports: [NgIf, GodRollPlugComponent] }) export class WritablePlugComponent { diff --git a/src/app/gear/writable-sockets/writable-sockets.component.ts b/src/app/gear/writable-sockets/writable-sockets.component.ts index 149452d51..0b602a188 100644 --- a/src/app/gear/writable-sockets/writable-sockets.component.ts +++ b/src/app/gear/writable-sockets/writable-sockets.component.ts @@ -3,11 +3,15 @@ import { MatDialog, MatDialogConfig } from '@angular/material/dialog'; import { InventoryItem, InventorySocket } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; import { SelectModDialogComponent } from '../gear/select-mod-dialog/select-mod-dialog.component'; +import { NgFor, NgIf, AsyncPipe } from '@angular/common'; +import { WritablePlugComponent } from '../writable-plug/writable-plug.component'; @Component({ - selector: 'd2c-writable-sockets', - templateUrl: './writable-sockets.component.html', - styleUrls: ['./writable-sockets.component.scss'] + selector: 'd2c-writable-sockets', + templateUrl: './writable-sockets.component.html', + styleUrls: ['./writable-sockets.component.scss'], + standalone: true, + imports: [NgFor, NgIf, WritablePlugComponent, AsyncPipe] }) export class WritableSocketsComponent extends ChildComponent { @Input() item!: InventoryItem; diff --git a/src/app/guards/logged-in.guard.ts b/src/app/guards/logged-in.guard.ts index 0261a933a..10edf7c8d 100644 --- a/src/app/guards/logged-in.guard.ts +++ b/src/app/guards/logged-in.guard.ts @@ -2,13 +2,11 @@ import { Injectable } from '@angular/core'; import { AuthService } from '@app/service/auth.service'; import { NotificationService } from '@app/service/notification.service'; -import { Destroyable } from '@app/util/destroyable'; import { Observable } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; @Injectable() -export class LoggedInGuard extends Destroyable { +export class LoggedInGuard { // eslint-disable-next-line @typescript-eslint/no-inferrable-types public loggedIn: boolean = false; @@ -16,8 +14,7 @@ export class LoggedInGuard extends Destroyable { private auth: AuthService, private notifications: NotificationService ) { - super(); - this.auth.authFeed.pipe(takeUntil(this.destroy$)).subscribe(x => this.loggedIn = !!x ); + this.auth.authFeed.subscribe(x => this.loggedIn = !!x ); } canActivate(): Observable | Promise | boolean { diff --git a/src/app/history/history.module.ts b/src/app/history/history.module.ts deleted file mode 100644 index 5601e61c7..000000000 --- a/src/app/history/history.module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { SharedModule } from '../shared'; - - -import { HistoryComponent } from './history/history.component'; - -@NgModule({ - imports: [ - SharedModule - ], - declarations: [HistoryComponent] -}) -export class HistoryModule { } diff --git a/src/app/history/history/history.component.ts b/src/app/history/history/history.component.ts index 26ddbd169..bb7eb7d6e 100644 --- a/src/app/history/history/history.component.ts +++ b/src/app/history/history/history.component.ts @@ -1,8 +1,8 @@ import { ChangeDetectionStrategy, Component, OnInit, ViewChild } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; -import { MatSort } from '@angular/material/sort'; -import { ActivatedRoute, Router } from '@angular/router'; +import { MatSort, MatSortHeader } from '@angular/material/sort'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { takeUntil } from 'rxjs/operators'; import { BungieService } from '../../service/bungie.service'; import { ActivityMode, Const, Player } from '@app/service/model'; @@ -11,13 +11,27 @@ import { SortFilterDatabase, SortFilterDataSource } from '../../shared/sort-filt import { IconService } from '@app/service/icon.service'; import { BehaviorSubject } from 'rxjs'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe, DecimalPipe, DatePipe } from '@angular/common'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatAnchor, MatButton } from '@angular/material/button'; +import { MatFormField } from '@angular/material/form-field'; +import { MatSelect } from '@angular/material/select'; +import { FormsModule } from '@angular/forms'; +import { MatOption } from '@angular/material/core'; +import { MatIcon } from '@angular/material/icon'; +import { MatTable, MatHeaderCell, MatCell, MatHeaderRow, MatRow } from '@angular/material/table'; +import { CdkColumnDef, CdkHeaderCellDef, CdkCellDef, CdkHeaderRowDef, CdkRowDef } from '@angular/cdk/table'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { TimingPipe } from '../../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-history', - templateUrl: './history.component.html', - styleUrls: ['./history.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-history', + templateUrl: './history.component.html', + styleUrls: ['./history.component.scss'], + standalone: true, + imports: [NgIf, MatProgressSpinner, RouterLink, NgFor, MatAnchor, MatFormField, MatSelect, FormsModule, MatOption, MatButton, MatIcon, MatTable, MatSort, CdkColumnDef, CdkHeaderCellDef, MatHeaderCell, MatSortHeader, CdkCellDef, MatCell, FaIconComponent, CdkHeaderRowDef, MatHeaderRow, CdkRowDef, MatRow, MatPaginator, TimingPipe, AsyncPipe, DecimalPipe, DatePipe] }) export class HistoryComponent extends ChildComponent implements OnInit { diff --git a/src/app/history/index.ts b/src/app/history/index.ts index f2ea67342..b129fac91 100644 --- a/src/app/history/index.ts +++ b/src/app/history/index.ts @@ -1,2 +1 @@ -export * from './history.module'; export * from './history/history.component'; diff --git a/src/app/home/burn-dialog/burn-dialog.component.ts b/src/app/home/burn-dialog/burn-dialog.component.ts index 5696f7db1..97aa42f44 100644 --- a/src/app/home/burn-dialog/burn-dialog.component.ts +++ b/src/app/home/burn-dialog/burn-dialog.component.ts @@ -1,13 +1,17 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { IconService } from '@app/service/icon.service'; import { MilestoneActivity } from '@app/service/model'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { NgFor, NgIf } from '@angular/common'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-burn-dialog', - templateUrl: './burn-dialog.component.html', - styleUrls: ['./burn-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-burn-dialog', + templateUrl: './burn-dialog.component.html', + styleUrls: ['./burn-dialog.component.scss'], + standalone: true, + imports: [MatDialogTitle, CdkScrollable, MatDialogContent, NgFor, NgIf] }) export class BurnDialogComponent { constructor( diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index fd661a64b..5cd13edc4 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -1,9 +1,9 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core'; -import { UntypedFormControl } from '@angular/forms'; -import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete'; +import { UntypedFormControl, FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatAutocompleteSelectedEvent, MatAutocompleteTrigger, MatAutocomplete } from '@angular/material/autocomplete'; import { MatDialog, MatDialogConfig } from '@angular/material/dialog'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; import { AuthService } from '@app/service/auth.service'; import { BungieService } from '@app/service/bungie.service'; import { ElasticSearchResult, ElasticSearchService } from '@app/service/elastic-search.service'; @@ -19,12 +19,33 @@ import { BehaviorSubject } from 'rxjs'; import { startWith, takeUntil } from 'rxjs/operators'; import { BurnDialogComponent } from './burn-dialog/burn-dialog.component'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field'; +import { MatIcon } from '@angular/material/icon'; +import { MatInput } from '@angular/material/input'; +import { MatAnchor, MatButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; +import { MatBadge } from '@angular/material/badge'; +import { MatTooltip } from '@angular/material/tooltip'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatCard, MatCardContent, MatCardHeader, MatCardTitle, MatCardSubtitle } from '@angular/material/card'; +import { MatExpansionPanel, MatExpansionPanelHeader, MatExpansionPanelTitle, MatExpansionPanelDescription } from '@angular/material/expansion'; +import { SignedOnLoadingIconComponent } from '../shared/signed-on-loading-icon/signed-on-loading-icon.component'; +import { DealsContainerComponent } from '../deals/deals-container/deals-container.component'; +import { MatList, MatListItem, MatListItemIcon, MatListItemLine } from '@angular/material/list'; +import { LegendaryLostSectorComponent } from '../shared/legendary-lost-sector/legendary-lost-sector.component'; +import { RobotHomeComponent } from './robot-home/robot-home.component'; +import { MatOption } from '@angular/material/core'; +import { AgoHumanizedPipe } from '../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-home', - templateUrl: './home.component.html', - styleUrls: ['./home.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-home', + templateUrl: './home.component.html', + styleUrls: ['./home.component.scss'], + standalone: true, + imports: [NgIf, MatFormField, MatLabel, MatIcon, MatSuffix, MatInput, FormsModule, MatAutocompleteTrigger, ReactiveFormsModule, MatAnchor, FaIconComponent, MatMenuTrigger, MatBadge, MatMenu, MatMenuItem, RouterLink, NgFor, MatButton, MatTooltip, MatProgressSpinner, MatCard, MatExpansionPanel, MatExpansionPanelHeader, MatExpansionPanelTitle, SignedOnLoadingIconComponent, MatExpansionPanelDescription, MatCardContent, DealsContainerComponent, MatCardHeader, MatCardTitle, MatCardSubtitle, MatList, MatListItem, LegendaryLostSectorComponent, MatListItemIcon, MatListItemLine, RobotHomeComponent, MatAutocomplete, MatOption, AsyncPipe, AgoHumanizedPipe] }) export class HomeComponent extends ChildComponent implements OnInit { readonly isSignedOn$: BehaviorSubject = new BehaviorSubject(false); diff --git a/src/app/home/robot-home/robot-home.component.ts b/src/app/home/robot-home/robot-home.component.ts index 216408347..7252b0fe7 100644 --- a/src/app/home/robot-home/robot-home.component.ts +++ b/src/app/home/robot-home/robot-home.component.ts @@ -1,10 +1,13 @@ import { Component } from '@angular/core'; import { isSearchBot } from '@app/shared/utilities'; +import { RouterLink } from '@angular/router'; @Component({ - selector: 'd2c-robot-home', - templateUrl: './robot-home.component.html', - styleUrls: ['./robot-home.component.scss'] + selector: 'd2c-robot-home', + templateUrl: './robot-home.component.html', + styleUrls: ['./robot-home.component.scss'], + standalone: true, + imports: [RouterLink] }) export class RobotHomeComponent { diff --git a/src/app/party/party.component.ts b/src/app/party/party.component.ts index 6d7a780b3..c9bb2599e 100644 --- a/src/app/party/party.component.ts +++ b/src/app/party/party.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; -import { ActivatedRoute, Params, Router } from '@angular/router'; +import { ActivatedRoute, Params, Router, RouterLink } from '@angular/router'; import { ArmorPerksDialogComponent, PlayerMods } from '@app/gear/gear/armor-perks-dialog/armor-perks-dialog.component'; import { PlayerComponent } from '@app/player'; import { IconService } from '@app/service/icon.service'; @@ -11,12 +11,20 @@ import { BungieService } from '../service/bungie.service'; import { Character, DamageType, InventoryItem, ItemType, Player, SearchResult } from '../service/model'; import { ChildComponent } from '../shared/child.component'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, NgTemplateOutlet, AsyncPipe, DecimalPipe } from '@angular/common'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatAnchor } from '@angular/material/button'; +import { MatTooltip } from '@angular/material/tooltip'; +import { AgoHumanizedPipe } from '../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-party', - templateUrl: './party.component.html', - styleUrls: ['./party.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-party', + templateUrl: './party.component.html', + styleUrls: ['./party.component.scss'], + standalone: true, + imports: [NgIf, MatProgressSpinner, RouterLink, NgFor, FaIconComponent, MatAnchor, NgTemplateOutlet, MatTooltip, AsyncPipe, DecimalPipe, AgoHumanizedPipe] }) export class PartyComponent extends ChildComponent implements OnInit { DamageType = DamageType; diff --git a/src/app/perkbench/perk-bench-dialog/perk-bench-dialog.component.ts b/src/app/perkbench/perk-bench-dialog/perk-bench-dialog.component.ts index 1ebc14f35..eaec7f022 100644 --- a/src/app/perkbench/perk-bench-dialog/perk-bench-dialog.component.ts +++ b/src/app/perkbench/perk-bench-dialog/perk-bench-dialog.component.ts @@ -1,10 +1,18 @@ import { Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { IconService } from '@app/service/icon.service'; import { GunRoll, GunRolls } from '@app/service/panda-godrolls.service'; import { ChildComponent } from '@app/shared/child.component'; import { BehaviorSubject } from 'rxjs'; import { GunInfo, MappedRoll, PerkbenchComponent } from '../perkbench.component'; +import { MatButtonToggleGroup, MatButtonToggle } from '@angular/material/button-toggle'; +import { FormsModule } from '@angular/forms'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatButton } from '@angular/material/button'; +import { MatTooltip } from '@angular/material/tooltip'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { MatCheckbox } from '@angular/material/checkbox'; const NORMAL_MW = ['Handling', 'Range', 'Reload Speed', 'Stability']; const BOW_MW = ['Handling', 'Reload Speed', 'Stability', 'Accuracy', 'Draw Time']; @@ -50,9 +58,11 @@ function buildEmptyGunRolls(name: string, mnk: boolean, controller: boolean): Gu @Component({ - selector: 'd2c-perk-bench-dialog', - templateUrl: './perk-bench-dialog.component.html', - styleUrls: ['./perk-bench-dialog.component.scss'] + selector: 'd2c-perk-bench-dialog', + templateUrl: './perk-bench-dialog.component.html', + styleUrls: ['./perk-bench-dialog.component.scss'], + standalone: true, + imports: [MatDialogTitle, MatButtonToggleGroup, FormsModule, MatButtonToggle, NgIf, FaIconComponent, NgFor, MatButton, MatTooltip, CdkScrollable, MatDialogContent, MatCheckbox, AsyncPipe] }) export class PerkBenchDialogComponent extends ChildComponent { clickOptions = [ diff --git a/src/app/perkbench/perkbench.component.ts b/src/app/perkbench/perkbench.component.ts index 010872e52..666f4880a 100644 --- a/src/app/perkbench/perkbench.component.ts +++ b/src/app/perkbench/perkbench.component.ts @@ -25,6 +25,16 @@ import { debounceTime, takeUntil } from 'rxjs/operators'; import { PerkBenchDialogComponent } from './perk-bench-dialog/perk-bench-dialog.component'; import { ActivatedRoute, Router } from '@angular/router'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { MatCard, MatCardHeader, MatCardTitle, MatCardContent, MatCardSubtitle } from '@angular/material/card'; +import { MatFormField, MatLabel } from '@angular/material/form-field'; +import { MatInput } from '@angular/material/input'; +import { FormsModule } from '@angular/forms'; +import { MatButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { NgIf, NgFor, AsyncPipe, TitleCasePipe, DatePipe } from '@angular/common'; +import { MatButtonToggleGroup, MatButtonToggle } from '@angular/material/button-toggle'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { SortIndicatorComponent } from '../shared/sort-indicator/sort-indicator.component'; // TODO show guns with unrollable perks // x offer option to apply god rolls to local storage @@ -174,9 +184,32 @@ function isIncomplete(isController: boolean, roll: MappedRoll): boolean { @Component({ - selector: 'd2c-perkbench', - templateUrl: './perkbench.component.html', - styleUrls: ['./perkbench.component.scss'], + selector: 'd2c-perkbench', + templateUrl: './perkbench.component.html', + styleUrls: ['./perkbench.component.scss'], + standalone: true, + imports: [ + MatCard, + MatCardHeader, + MatCardTitle, + MatFormField, + MatLabel, + MatInput, + FormsModule, + MatCardContent, + MatButton, + FaIconComponent, + NgIf, + MatCardSubtitle, + MatButtonToggleGroup, + MatButtonToggle, + MatCheckbox, + SortIndicatorComponent, + NgFor, + AsyncPipe, + TitleCasePipe, + DatePipe, + ], }) export class PerkbenchComponent extends ChildComponent implements OnInit { public isController = true; diff --git a/src/app/pgcr/index.ts b/src/app/pgcr/index.ts deleted file mode 100644 index f81cfff96..000000000 --- a/src/app/pgcr/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './pgcr.module'; diff --git a/src/app/pgcr/pgcr-entry-dialog/pgcr-entry-dialog.component.ts b/src/app/pgcr/pgcr-entry-dialog/pgcr-entry-dialog.component.ts index a5186cbf5..ae3ae91e1 100644 --- a/src/app/pgcr/pgcr-entry-dialog/pgcr-entry-dialog.component.ts +++ b/src/app/pgcr/pgcr-entry-dialog/pgcr-entry-dialog.component.ts @@ -1,13 +1,21 @@ import { Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { IconService } from '@app/service/icon.service'; import { Entry } from '@app/service/pgcr.service'; import { ChildComponent } from '@app/shared/child.component'; +import { NgIf, NgFor, AsyncPipe, DecimalPipe } from '@angular/common'; +import { RouterLink } from '@angular/router'; +import { FriendStarComponent } from '../../shared/friend-star/friend-star.component'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { MatTabGroup, MatTab, MatTabLabel } from '@angular/material/tabs'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - selector: 'd2c-pgcr-entry-dialog', - templateUrl: './pgcr-entry-dialog.component.html', - styleUrls: ['./pgcr-entry-dialog.component.scss'] + selector: 'd2c-pgcr-entry-dialog', + templateUrl: './pgcr-entry-dialog.component.html', + styleUrls: ['./pgcr-entry-dialog.component.scss'], + standalone: true, + imports: [NgIf, MatDialogTitle, RouterLink, FriendStarComponent, CdkScrollable, MatDialogContent, MatTabGroup, MatTab, MatTabLabel, FaIconComponent, NgFor, AsyncPipe, DecimalPipe] }) export class PgcrEntryDialogComponent extends ChildComponent { constructor( diff --git a/src/app/pgcr/pgcr.module.ts b/src/app/pgcr/pgcr.module.ts deleted file mode 100644 index 8cb242596..000000000 --- a/src/app/pgcr/pgcr.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { SharedModule } from '../shared'; -import { Pgcr2Component } from './pgcr2/pgcr2.component'; -import { PgcrEntryDialogComponent } from './pgcr-entry-dialog/pgcr-entry-dialog.component'; - -@NgModule({ - imports: [ - SharedModule - ], - declarations: [Pgcr2Component, PgcrEntryDialogComponent] -}) -export class PGCRModule { } diff --git a/src/app/pgcr/pgcr2/pgcr2.component.ts b/src/app/pgcr/pgcr2/pgcr2.component.ts index 2fc7236e7..ce028bdc3 100644 --- a/src/app/pgcr/pgcr2/pgcr2.component.ts +++ b/src/app/pgcr/pgcr2/pgcr2.component.ts @@ -9,6 +9,9 @@ import { BehaviorSubject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { PgcrEntryDialogComponent } from '../pgcr-entry-dialog/pgcr-entry-dialog.component'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, NgTemplateOutlet, AsyncPipe, JsonPipe, DecimalPipe, DatePipe } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatTooltip } from '@angular/material/tooltip'; @@ -31,9 +34,11 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; // Invader: Guardians Defeated, Motes Denied (not Primeval Healing, oddly includes Invader Deaths // Sentry: Primeval Damage (nothing on blockers) @Component({ - selector: 'd2c-pgcr2', - templateUrl: './pgcr2.component.html', - styleUrls: ['./pgcr2.component.scss'] + selector: 'd2c-pgcr2', + templateUrl: './pgcr2.component.html', + styleUrls: ['./pgcr2.component.scss'], + standalone: true, + imports: [NgIf, FaIconComponent, NgFor, NgTemplateOutlet, MatTooltip, AsyncPipe, JsonPipe, DecimalPipe, DatePipe] }) export class Pgcr2Component extends ChildComponent implements OnInit { public instanceId$: BehaviorSubject = new BehaviorSubject(null); diff --git a/src/app/player-currencies/player-currencies.component.ts b/src/app/player-currencies/player-currencies.component.ts index fbd3ad6e4..0178b4710 100644 --- a/src/app/player-currencies/player-currencies.component.ts +++ b/src/app/player-currencies/player-currencies.component.ts @@ -3,11 +3,18 @@ import { IconService } from '@app/service/icon.service'; import { CurrencyType } from '@app/service/model'; import { SignedOnUserService } from '@app/service/signed-on-user.service'; import { DamageType } from 'bungie-api-ts/destiny2'; +import { NgIf, NgFor, NgTemplateOutlet, AsyncPipe, DecimalPipe } from '@angular/common'; +import { MatTooltip } from '@angular/material/tooltip'; +import { MatAnchor } from '@angular/material/button'; +import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - selector: 'd2c-player-currencies', - templateUrl: './player-currencies.component.html', - styleUrls: ['./player-currencies.component.scss'] + selector: 'd2c-player-currencies', + templateUrl: './player-currencies.component.html', + styleUrls: ['./player-currencies.component.scss'], + standalone: true, + imports: [NgIf, NgFor, MatTooltip, MatAnchor, MatMenuTrigger, FaIconComponent, MatMenu, NgTemplateOutlet, MatMenuItem, AsyncPipe, DecimalPipe] }) export class PlayerCurrenciesComponent { CurrencyType = CurrencyType; diff --git a/src/app/player/chars/chars.component.ts b/src/app/player/chars/chars.component.ts index 570d22ba4..8c94e5b11 100644 --- a/src/app/player/chars/chars.component.ts +++ b/src/app/player/chars/chars.component.ts @@ -2,12 +2,19 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '@app/shared/child.component'; import { PlayerStateService } from '../player-state.service'; +import { NgIf, NgFor, AsyncPipe, DecimalPipe } from '@angular/common'; +import { MatCard, MatCardHeader, MatCardAvatar, MatCardTitle, MatCardSubtitle, MatCardContent } from '@angular/material/card'; +import { MatTooltip } from '@angular/material/tooltip'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { AgoHumanizedPipe, MinsHumanizedPipe } from '../../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-chars', - templateUrl: './chars.component.html', - styleUrls: ['./chars.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-chars', + templateUrl: './chars.component.html', + styleUrls: ['./chars.component.scss'], + standalone: true, + imports: [NgIf, NgFor, MatCard, MatCardHeader, MatCardAvatar, MatCardTitle, MatTooltip, FaIconComponent, MatCardSubtitle, MatCardContent, AgoHumanizedPipe, MinsHumanizedPipe, AsyncPipe, DecimalPipe] }) export class CharsComponent extends ChildComponent { diff --git a/src/app/player/checklist/checklist.component.ts b/src/app/player/checklist/checklist.component.ts index bda3259a1..3c9ab55d1 100644 --- a/src/app/player/checklist/checklist.component.ts +++ b/src/app/player/checklist/checklist.component.ts @@ -2,12 +2,19 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '@app/shared/child.component'; import { PlayerStateService } from '../player-state.service'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatAccordion, MatExpansionPanel, MatExpansionPanelHeader, MatExpansionPanelTitle, MatExpansionPanelDescription } from '@angular/material/expansion'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { FormsModule } from '@angular/forms'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-checklist', - templateUrl: './checklist.component.html', - styleUrls: ['./checklist.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-checklist', + templateUrl: './checklist.component.html', + styleUrls: ['./checklist.component.scss'], + standalone: true, + imports: [NgIf, MatAccordion, NgFor, MatExpansionPanel, MatExpansionPanelHeader, MatExpansionPanelTitle, FaIconComponent, MatExpansionPanelDescription, MatCheckbox, FormsModule, AsyncPipe] }) export class ChecklistComponent extends ChildComponent { hideComplete: boolean; diff --git a/src/app/player/collections/collection-badge/collection-badge.component.ts b/src/app/player/collections/collection-badge/collection-badge.component.ts index b772df229..5b4ee472e 100644 --- a/src/app/player/collections/collection-badge/collection-badge.component.ts +++ b/src/app/player/collections/collection-badge/collection-badge.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, RouterLink } from '@angular/router'; import { Badge, Player } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; import { BehaviorSubject } from 'rxjs'; @@ -7,12 +7,20 @@ import { takeUntil } from 'rxjs/operators'; import { PlayerStateService } from '../../player-state.service'; import { IconService } from '@app/service/icon.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { FormsModule } from '@angular/forms'; +import { MatTabGroup, MatTab } from '@angular/material/tabs'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-collection-badge', - templateUrl: './collection-badge.component.html', - styleUrls: ['./collection-badge.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-collection-badge', + templateUrl: './collection-badge.component.html', + styleUrls: ['./collection-badge.component.scss'], + standalone: true, + imports: [NgIf, MatButton, RouterLink, FaIconComponent, MatCheckbox, FormsModule, MatTabGroup, NgFor, MatTab, AsyncPipe] }) export class CollectionBadgeComponent extends ChildComponent implements OnInit { private selectedBadge: string | null = null; diff --git a/src/app/player/collections/collection-badges/collection-badges.component.ts b/src/app/player/collections/collection-badges/collection-badges.component.ts index 0fa352a65..62ffcf497 100644 --- a/src/app/player/collections/collection-badges/collection-badges.component.ts +++ b/src/app/player/collections/collection-badges/collection-badges.component.ts @@ -2,12 +2,19 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '@app/shared/child.component'; import { PlayerStateService } from '../../player-state.service'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { FormsModule } from '@angular/forms'; +import { RouterLink } from '@angular/router'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-collection-badges', - templateUrl: './collection-badges.component.html', - styleUrls: ['./collection-badges.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-collection-badges', + templateUrl: './collection-badges.component.html', + styleUrls: ['./collection-badges.component.scss'], + standalone: true, + imports: [NgIf, MatCheckbox, FormsModule, NgFor, RouterLink, FaIconComponent, AsyncPipe] }) export class CollectionBadgesComponent extends ChildComponent { diff --git a/src/app/player/collections/collection-search/collection-search.component.ts b/src/app/player/collections/collection-search/collection-search.component.ts index 9b181898c..8e26f1f2b 100644 --- a/src/app/player/collections/collection-search/collection-search.component.ts +++ b/src/app/player/collections/collection-search/collection-search.component.ts @@ -6,12 +6,20 @@ import { BehaviorSubject, Subject } from 'rxjs'; import { debounceTime, takeUntil } from 'rxjs/operators'; import { PlayerStateService } from '../../player-state.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatFormField, MatLabel } from '@angular/material/form-field'; +import { MatInput } from '@angular/material/input'; +import { FormsModule } from '@angular/forms'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { RouterLink } from '@angular/router'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-collection-search', - templateUrl: './collection-search.component.html', - styleUrls: ['./collection-search.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-collection-search', + templateUrl: './collection-search.component.html', + styleUrls: ['./collection-search.component.scss'], + standalone: true, + imports: [NgIf, MatFormField, MatLabel, MatInput, FormsModule, NgFor, FaIconComponent, RouterLink, AsyncPipe] }) export class CollectionSearchComponent extends ChildComponent implements OnInit { public searchSubject: Subject = new Subject(); diff --git a/src/app/player/collections/collection-tree/collection-tree.component.ts b/src/app/player/collections/collection-tree/collection-tree.component.ts index a488144bd..b16628da0 100644 --- a/src/app/player/collections/collection-tree/collection-tree.component.ts +++ b/src/app/player/collections/collection-tree/collection-tree.component.ts @@ -1,7 +1,7 @@ import { FlatTreeControl } from '@angular/cdk/tree'; -import { Location } from '@angular/common'; +import { Location, NgIf, AsyncPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; -import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'; +import { MatTreeFlatDataSource, MatTreeFlattener, MatTree, MatTreeNodeDef, MatTreeNode, MatTreeNodeToggle, MatTreeNodePadding } from '@angular/material/tree'; import { ActivatedRoute } from '@angular/router'; import { IconService } from '@app/service/icon.service'; import { TriumphNode } from '@app/service/model'; @@ -10,6 +10,12 @@ import { Observable, of as observableOf } from 'rxjs'; import { first, takeUntil } from 'rxjs/operators'; import { PlayerStateService } from '../../player-state.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { FormsModule } from '@angular/forms'; +import { MatIconButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatIcon } from '@angular/material/icon'; +import { MatProgressBar } from '@angular/material/progress-bar'; export class TriumphFlatNode { @@ -18,10 +24,12 @@ export class TriumphFlatNode { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-collection-tree', - templateUrl: './collection-tree.component.html', - styleUrls: ['./collection-tree.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-collection-tree', + templateUrl: './collection-tree.component.html', + styleUrls: ['./collection-tree.component.scss'], + standalone: true, + imports: [NgIf, MatCheckbox, FormsModule, MatTree, MatTreeNodeDef, MatTreeNode, MatTreeNodeToggle, MatTreeNodePadding, MatIconButton, FaIconComponent, MatIcon, MatProgressBar, AsyncPipe] }) export class CollectionTreeComponent extends ChildComponent implements OnInit { selectedTreeNodeHash!: string; diff --git a/src/app/player/collections/collections.component.ts b/src/app/player/collections/collections.component.ts index 1447c7700..d27e44649 100644 --- a/src/app/player/collections/collections.component.ts +++ b/src/app/player/collections/collections.component.ts @@ -1,12 +1,18 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { IconService } from '@app/service/icon.service'; +import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; +import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatAnchor } from '@angular/material/button'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-collections', - templateUrl: './collections.component.html', - styleUrls: ['./collections.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-collections', + templateUrl: './collections.component.html', + styleUrls: ['./collections.component.scss'], + standalone: true, + imports: [MatTabNav, MatTabLink, RouterLink, RouterLinkActive, FaIconComponent, MatTabNavPanel, RouterOutlet, MatAnchor] }) export class CollectionsComponent { constructor(public iconService: IconService) { diff --git a/src/app/player/index.ts b/src/app/player/index.ts index 0100cb888..a8f65c30a 100644 --- a/src/app/player/index.ts +++ b/src/app/player/index.ts @@ -1,2 +1 @@ -export * from './player.module'; export * from './player.component'; diff --git a/src/app/player/lifetime/lifetime.component.ts b/src/app/player/lifetime/lifetime.component.ts index 0b976f3d4..ddf8aca1d 100644 --- a/src/app/player/lifetime/lifetime.component.ts +++ b/src/app/player/lifetime/lifetime.component.ts @@ -4,12 +4,20 @@ import { IconService } from '@app/service/icon.service'; import { WeekService } from '@app/service/week.service'; import { ChildComponent } from '@app/shared/child.component'; import { PlayerStateService } from '../player-state.service'; +import { NgIf, NgTemplateOutlet, NgFor, AsyncPipe, DecimalPipe } from '@angular/common'; +import { MatTabGroup, MatTab } from '@angular/material/tabs'; +import { PlayerEfficiencyGraphComponent } from './player-efficiency-graph/player-efficiency-graph.component'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatTooltip } from '@angular/material/tooltip'; +import { TimingPipe } from '../../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-lifetime', - templateUrl: './lifetime.component.html', - styleUrls: ['./lifetime.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-lifetime', + templateUrl: './lifetime.component.html', + styleUrls: ['./lifetime.component.scss'], + standalone: true, + imports: [NgIf, MatTabGroup, MatTab, PlayerEfficiencyGraphComponent, NgTemplateOutlet, FaIconComponent, NgFor, MatTooltip, TimingPipe, AsyncPipe, DecimalPipe] }) export class LifetimeComponent extends ChildComponent { diff --git a/src/app/player/lifetime/player-efficiency-graph/player-efficiency-graph.component.ts b/src/app/player/lifetime/player-efficiency-graph/player-efficiency-graph.component.ts index deff3524b..879c69469 100644 --- a/src/app/player/lifetime/player-efficiency-graph/player-efficiency-graph.component.ts +++ b/src/app/player/lifetime/player-efficiency-graph/player-efficiency-graph.component.ts @@ -2,12 +2,15 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { PlayerStateService } from '@app/player/player-state.service'; import { AggHistoryEntry } from '@app/service/model'; import { ChartConfiguration, ChartData, ChartType, ScatterDataPoint } from 'chart.js'; +import { NgChartsModule } from 'ng2-charts'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-player-efficiency-graph', - templateUrl: './player-efficiency-graph.component.html', - styleUrls: ['./player-efficiency-graph.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-player-efficiency-graph', + templateUrl: './player-efficiency-graph.component.html', + styleUrls: ['./player-efficiency-graph.component.scss'], + standalone: true, + imports: [NgChartsModule] }) export class PlayerEfficiencyGraphComponent { public scatterChartType: ChartType = 'scatter'; diff --git a/src/app/player/milestones/milestones.component.ts b/src/app/player/milestones/milestones.component.ts index fff976c5d..d615dfd1e 100644 --- a/src/app/player/milestones/milestones.component.ts +++ b/src/app/player/milestones/milestones.component.ts @@ -8,12 +8,21 @@ import { takeUntil } from 'rxjs/operators'; import { PlBucketDialogComponent } from '../pl-bucket-dialog/pl-bucket-dialog.component'; import { PlayerStateService } from '../player-state.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe, DatePipe } from '@angular/common'; +import { MatButton } from '@angular/material/button'; +import { MatTooltip } from '@angular/material/tooltip'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { RewardDescComponent } from './reward-desc/reward-desc.component'; +import { MilestoneCheckComponent } from '../../shared/milestone-check/milestone-check.component'; +import { AgoHumanizedPipe } from '../../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-milestones', - templateUrl: './milestones.component.html', - styleUrls: ['./milestones.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-milestones', + templateUrl: './milestones.component.html', + styleUrls: ['./milestones.component.scss'], + standalone: true, + imports: [NgIf, MatButton, NgFor, MatTooltip, FaIconComponent, RewardDescComponent, MilestoneCheckComponent, AgoHumanizedPipe, AsyncPipe, DatePipe] }) export class MilestonesComponent extends ChildComponent implements OnInit { hideCompleteChars: string | null = null; diff --git a/src/app/player/milestones/reward-desc/reward-desc.component.ts b/src/app/player/milestones/reward-desc/reward-desc.component.ts index 8fb903f3b..9d69843c4 100644 --- a/src/app/player/milestones/reward-desc/reward-desc.component.ts +++ b/src/app/player/milestones/reward-desc/reward-desc.component.ts @@ -1,12 +1,16 @@ import { Component, OnInit, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core'; import { BoostInfo, Const } from '@app/service/model'; import { IconService } from '@app/service/icon.service'; +import { NgIf, NgTemplateOutlet } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-reward-desc', - templateUrl: './reward-desc.component.html', - styleUrls: ['./reward-desc.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-reward-desc', + templateUrl: './reward-desc.component.html', + styleUrls: ['./reward-desc.component.scss'], + standalone: true, + imports: [NgIf, NgTemplateOutlet, FaIconComponent] }) export class RewardDescComponent implements OnInit { public Const = Const; diff --git a/src/app/player/more/more.component.ts b/src/app/player/more/more.component.ts index da9421459..dc9ceea40 100644 --- a/src/app/player/more/more.component.ts +++ b/src/app/player/more/more.component.ts @@ -1,11 +1,16 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { IconService } from '@app/service/icon.service'; +import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; +import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-more', - templateUrl: './more.component.html', - styleUrls: ['./more.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-more', + templateUrl: './more.component.html', + styleUrls: ['./more.component.scss'], + standalone: true, + imports: [MatTabNav, MatTabLink, RouterLink, RouterLinkActive, FaIconComponent, MatTabNavPanel, RouterOutlet] }) export class MoreComponent { diff --git a/src/app/player/pl-bucket-dialog/pl-bucket-dialog.component.ts b/src/app/player/pl-bucket-dialog/pl-bucket-dialog.component.ts index 59ca00461..c121c1ef6 100644 --- a/src/app/player/pl-bucket-dialog/pl-bucket-dialog.component.ts +++ b/src/app/player/pl-bucket-dialog/pl-bucket-dialog.component.ts @@ -1,5 +1,5 @@ import { Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { IconService } from '@app/service/icon.service'; import { Bonus, BoostInfo, BUCKETS_ALL_POWER, Character, Const } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; @@ -8,11 +8,17 @@ import { BehaviorSubject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { PlayerStateService } from '../player-state.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; @Component({ - selector: 'd2c-pl-bucket-dialog', - templateUrl: './pl-bucket-dialog.component.html', - styleUrls: ['./pl-bucket-dialog.component.scss'] + selector: 'd2c-pl-bucket-dialog', + templateUrl: './pl-bucket-dialog.component.html', + styleUrls: ['./pl-bucket-dialog.component.scss'], + standalone: true, + imports: [NgIf, MatDialogTitle, FaIconComponent, CdkScrollable, MatDialogContent, NgFor, MatProgressSpinner, AsyncPipe] }) export class PlBucketDialogComponent extends ChildComponent { public character$: BehaviorSubject = new BehaviorSubject(null!); diff --git a/src/app/player/player.component.ts b/src/app/player/player.component.ts index de186dcdd..e57ed8798 100644 --- a/src/app/player/player.component.ts +++ b/src/app/player/player.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; -import { ActivatedRoute, Params, Router } from '@angular/router'; +import { ActivatedRoute, Params, Router, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; import { IconService } from '@app/service/icon.service'; import { BehaviorSubject } from 'rxjs'; import { BungieService } from '../service/bungie.service'; @@ -9,12 +9,23 @@ import { Character, Const, Player, PublicMilestonesAndActivities } from '../serv import { ChildComponent } from '../shared/child.component'; import { PlayerStateService } from './player-state.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { FriendStarComponent } from '../shared/friend-star/friend-star.component'; +import { MatIconButton, MatAnchor, MatButton } from '@angular/material/button'; +import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; +import { MatIcon } from '@angular/material/icon'; +import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; +import { AgoHumanizedPipe } from '../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-player', - templateUrl: './player.component.html', - styleUrls: ['./player.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-player', + templateUrl: './player.component.html', + styleUrls: ['./player.component.scss'], + standalone: true, + imports: [NgIf, MatProgressSpinner, FaIconComponent, FriendStarComponent, MatIconButton, NgFor, RouterLink, MatAnchor, MatButton, MatMenuTrigger, MatMenu, MatMenuItem, MatIcon, MatTabNav, MatTabLink, RouterLinkActive, MatTabNavPanel, RouterOutlet, AgoHumanizedPipe, AsyncPipe] }) export class PlayerComponent extends ChildComponent implements OnInit { public const: Const = Const; diff --git a/src/app/player/player.module.ts b/src/app/player/player.module.ts deleted file mode 100644 index 65ee24aab..000000000 --- a/src/app/player/player.module.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { NgModule } from '@angular/core'; -import { NgChartsModule } from 'ng2-charts'; -import { SharedModule } from '../shared'; -import { CharsComponent } from './chars/chars.component'; -import { ChecklistComponent } from './checklist/checklist.component'; -import { CollectionBadgeComponent } from './collections/collection-badge/collection-badge.component'; -import { CollectionBadgesComponent } from './collections/collection-badges/collection-badges.component'; -import { CollectionSearchComponent } from './collections/collection-search/collection-search.component'; -import { CollectionTreeComponent } from './collections/collection-tree/collection-tree.component'; -import { CollectionsComponent } from './collections/collections.component'; -import { LifetimeComponent } from './lifetime/lifetime.component'; -import { PlayerEfficiencyGraphComponent } from './lifetime/player-efficiency-graph/player-efficiency-graph.component'; -import { MilestonesComponent } from './milestones/milestones.component'; -import { RewardDescComponent } from './milestones/reward-desc/reward-desc.component'; -import { MoreComponent } from './more/more.component'; -import { PlayerComponent } from './player.component'; -import { ProgressStepDialogComponent } from './progress/progress-step-dialog/progress-step-dialog.component'; -import { ProgressComponent } from './progress/progress.component'; -import { PursuitListComponent } from './pursuits/pursuit-list/pursuit-list.component'; -import { QuestDialogComponent } from './pursuits/pursuit-list/quest-dialog/quest-dialog.component'; -import { PursuitsComponent } from './pursuits/pursuits.component'; -import { TriumphClosestComponent } from './triumphs/triumph-closest/triumph-closest.component'; -import { TriumphObjectivesComponent } from './triumphs/triumph-objectives/triumph-objectives.component'; -import { TriumphSealsComponent } from './triumphs/triumph-seals/triumph-seals.component'; -import { TriumphSearchComponent } from './triumphs/triumph-search/triumph-search.component'; -import { TriumphSeasonsComponent } from './triumphs/triumph-seasons/triumph-seasons.component'; -import { TriumphTrackedComponent } from './triumphs/triumph-tracked/triumph-tracked.component'; -import { TriumphTreeComponent } from './triumphs/triumph-tree/triumph-tree.component'; -import { TriumphsComponent } from './triumphs/triumphs.component'; -import { PlBucketDialogComponent } from './pl-bucket-dialog/pl-bucket-dialog.component'; -import { SpecialTriumphListComponent } from './triumphs/special-triumph-list/special-triumph-list.component'; - - - -@NgModule({ - imports: [ - SharedModule, - NgChartsModule - ], - declarations: [PlayerComponent, QuestDialogComponent, ProgressStepDialogComponent, CollectionsComponent, TriumphsComponent, - CharsComponent, ChecklistComponent, ProgressComponent, MilestonesComponent, TriumphTreeComponent, TriumphSeasonsComponent, TriumphSealsComponent, - TriumphClosestComponent, TriumphSearchComponent, TriumphTrackedComponent, CollectionTreeComponent, CollectionSearchComponent, CollectionBadgesComponent, - CollectionBadgeComponent, RewardDescComponent, PursuitsComponent, ProgressStepDialogComponent, LifetimeComponent, MoreComponent, - PlayerEfficiencyGraphComponent, PursuitListComponent, TriumphObjectivesComponent, PlBucketDialogComponent, SpecialTriumphListComponent] -}) -export class PlayerModule { } diff --git a/src/app/player/progress/progress-step-dialog/progress-step-dialog.component.ts b/src/app/player/progress/progress-step-dialog/progress-step-dialog.component.ts index a29ab53dc..4568cb5a9 100644 --- a/src/app/player/progress/progress-step-dialog/progress-step-dialog.component.ts +++ b/src/app/player/progress/progress-step-dialog/progress-step-dialog.component.ts @@ -1,11 +1,15 @@ import { Component, Inject, AfterViewInit, ChangeDetectionStrategy } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { NgFor, NgIf, DecimalPipe } from '@angular/common'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-progress-step-dialog', - templateUrl: './progress-step-dialog.component.html', - styleUrls: ['./progress-step-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-progress-step-dialog', + templateUrl: './progress-step-dialog.component.html', + styleUrls: ['./progress-step-dialog.component.scss'], + standalone: true, + imports: [MatDialogTitle, CdkScrollable, MatDialogContent, NgFor, NgIf, DecimalPipe] }) export class ProgressStepDialogComponent implements AfterViewInit { diff --git a/src/app/player/progress/progress.component.ts b/src/app/player/progress/progress.component.ts index c741e1807..c754a7a42 100644 --- a/src/app/player/progress/progress.component.ts +++ b/src/app/player/progress/progress.component.ts @@ -4,12 +4,19 @@ import { Progression } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; import { PlayerStateService } from '../player-state.service'; import { ProgressStepDialogComponent } from './progress-step-dialog/progress-step-dialog.component'; +import { NgIf, NgFor, AsyncPipe, DecimalPipe, PercentPipe } from '@angular/common'; +import { MatTooltip } from '@angular/material/tooltip'; +import { MatButton } from '@angular/material/button'; +import { MatProgressBar } from '@angular/material/progress-bar'; +import { MatTabGroup, MatTab } from '@angular/material/tabs'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-progress', - templateUrl: './progress.component.html', - styleUrls: ['./progress.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-progress', + templateUrl: './progress.component.html', + styleUrls: ['./progress.component.scss'], + standalone: true, + imports: [NgIf, NgFor, MatTooltip, MatButton, MatProgressBar, MatTabGroup, MatTab, AsyncPipe, DecimalPipe, PercentPipe] }) export class ProgressComponent extends ChildComponent { constructor( diff --git a/src/app/player/pursuits/pursuit-list/pursuit-list.component.ts b/src/app/player/pursuits/pursuit-list/pursuit-list.component.ts index c65a46202..5756285d3 100644 --- a/src/app/player/pursuits/pursuit-list/pursuit-list.component.ts +++ b/src/app/player/pursuits/pursuit-list/pursuit-list.component.ts @@ -9,13 +9,27 @@ import { BehaviorSubject, Subject } from 'rxjs'; import { debounceTime, takeUntil } from 'rxjs/operators'; import { QuestDialogComponent } from './quest-dialog/quest-dialog.component'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe, DecimalPipe } from '@angular/common'; +import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field'; +import { MatSelect } from '@angular/material/select'; +import { FormsModule } from '@angular/forms'; +import { MatOption } from '@angular/material/core'; +import { MatInput } from '@angular/material/input'; +import { MatIconButton, MatAnchor } from '@angular/material/button'; +import { MatIcon } from '@angular/material/icon'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatProgressBar } from '@angular/material/progress-bar'; +import { AgoHumanizedPipe } from '../../../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-pursuit-list', - templateUrl: './pursuit-list.component.html', - styleUrls: ['./pursuit-list.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-pursuit-list', + templateUrl: './pursuit-list.component.html', + styleUrls: ['./pursuit-list.component.scss'], + standalone: true, + imports: [NgIf, MatFormField, MatSelect, FormsModule, NgFor, MatOption, MatLabel, MatInput, MatIconButton, MatSuffix, MatIcon, MatCheckbox, FaIconComponent, MatAnchor, MatProgressBar, AgoHumanizedPipe, AsyncPipe, DecimalPipe] }) export class PursuitListComponent extends ChildComponent { public displayFilterText: string | null = null; diff --git a/src/app/player/pursuits/pursuit-list/quest-dialog/quest-dialog.component.ts b/src/app/player/pursuits/pursuit-list/quest-dialog/quest-dialog.component.ts index 33952efca..3b54fb001 100644 --- a/src/app/player/pursuits/pursuit-list/quest-dialog/quest-dialog.component.ts +++ b/src/app/player/pursuits/pursuit-list/quest-dialog/quest-dialog.component.ts @@ -1,13 +1,17 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { Questline } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { NgFor, NgIf, AsyncPipe } from '@angular/common'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-quest-dialog', - templateUrl: './quest-dialog.component.html', - styleUrls: ['./quest-dialog.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-quest-dialog', + templateUrl: './quest-dialog.component.html', + styleUrls: ['./quest-dialog.component.scss'], + standalone: true, + imports: [MatDialogTitle, CdkScrollable, MatDialogContent, NgFor, NgIf, AsyncPipe] }) export class QuestDialogComponent extends ChildComponent { diff --git a/src/app/player/pursuits/pursuits.component.ts b/src/app/player/pursuits/pursuits.component.ts index 7f5966d2e..471a748d4 100644 --- a/src/app/player/pursuits/pursuits.component.ts +++ b/src/app/player/pursuits/pursuits.component.ts @@ -3,12 +3,19 @@ import { MatDialog } from '@angular/material/dialog'; import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '@app/shared/child.component'; import { PlayerStateService } from '../player-state.service'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { SignInRequiredComponent } from '../../shared/sign-in-required/sign-in-required.component'; +import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; +import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-pursuits', - templateUrl: './pursuits.component.html', - styleUrls: ['./pursuits.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-pursuits', + templateUrl: './pursuits.component.html', + styleUrls: ['./pursuits.component.scss'], + standalone: true, + imports: [NgIf, SignInRequiredComponent, MatTabNav, MatTabLink, RouterLink, RouterLinkActive, FaIconComponent, MatTabNavPanel, RouterOutlet, AsyncPipe] }) export class PursuitsComponent extends ChildComponent { diff --git a/src/app/player/triumphs/special-triumph-list/special-triumph-list.component.ts b/src/app/player/triumphs/special-triumph-list/special-triumph-list.component.ts index b31ab7ef1..cc8c50c67 100644 --- a/src/app/player/triumphs/special-triumph-list/special-triumph-list.component.ts +++ b/src/app/player/triumphs/special-triumph-list/special-triumph-list.component.ts @@ -9,6 +9,20 @@ import { title } from 'process'; import { BehaviorSubject, combineLatest } from 'rxjs'; import { debounceTime, takeUntil } from 'rxjs/operators'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe, DecimalPipe, DatePipe } from '@angular/common'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { FormsModule } from '@angular/forms'; +import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field'; +import { MatSelect } from '@angular/material/select'; +import { MatOption } from '@angular/material/core'; +import { MatInput } from '@angular/material/input'; +import { MatAutocompleteTrigger, MatAutocomplete } from '@angular/material/autocomplete'; +import { MatIconButton } from '@angular/material/button'; +import { MatIcon } from '@angular/material/icon'; +import { SortIndicatorComponent } from '../../../shared/sort-indicator/sort-indicator.component'; +import { TriumphNameComponent } from '../../../shared/triumph-name/triumph-name.component'; +import { MatProgressBar } from '@angular/material/progress-bar'; +import { TriumphObjectivesComponent } from '../triumph-objectives/triumph-objectives.component'; function sortByName(x: TriumphRecordNode, y: TriumphRecordNode): number { @@ -36,9 +50,11 @@ function sortByProgress(x: TriumphRecordNode, y: TriumphRecordNode): number { } @Component({ - selector: 'd2c-special-triumph-list', - templateUrl: './special-triumph-list.component.html', - styleUrls: ['./special-triumph-list.component.scss'] + selector: 'd2c-special-triumph-list', + templateUrl: './special-triumph-list.component.html', + styleUrls: ['./special-triumph-list.component.scss'], + standalone: true, + imports: [NgIf, MatCheckbox, FormsModule, MatFormField, MatLabel, MatSelect, NgFor, MatOption, MatInput, MatAutocompleteTrigger, MatIconButton, MatSuffix, MatIcon, MatAutocomplete, SortIndicatorComponent, TriumphNameComponent, MatProgressBar, TriumphObjectivesComponent, AsyncPipe, DecimalPipe, DatePipe] }) export class SpecialTriumphListComponent extends ChildComponent { diff --git a/src/app/player/triumphs/triumph-closest/triumph-closest.component.ts b/src/app/player/triumphs/triumph-closest/triumph-closest.component.ts index 1d4b9f475..bb0c6e112 100644 --- a/src/app/player/triumphs/triumph-closest/triumph-closest.component.ts +++ b/src/app/player/triumphs/triumph-closest/triumph-closest.component.ts @@ -3,12 +3,24 @@ import { ActivatedRoute, Router } from '@angular/router'; import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '@app/shared/child.component'; import { PlayerStateService } from '../../player-state.service'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatSelect } from '@angular/material/select'; +import { FormsModule } from '@angular/forms'; +import { MatOption } from '@angular/material/core'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { MatButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { TriumphNameComponent } from '../../../shared/triumph-name/triumph-name.component'; +import { MatProgressBar } from '@angular/material/progress-bar'; +import { TriumphObjectivesComponent } from '../triumph-objectives/triumph-objectives.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-triumph-closest', - templateUrl: './triumph-closest.component.html', - styleUrls: ['./triumph-closest.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-triumph-closest', + templateUrl: './triumph-closest.component.html', + styleUrls: ['./triumph-closest.component.scss'], + standalone: true, + imports: [NgIf, MatSelect, FormsModule, NgFor, MatOption, MatCheckbox, MatButton, FaIconComponent, TriumphNameComponent, MatProgressBar, TriumphObjectivesComponent, AsyncPipe] }) export class TriumphClosestComponent extends ChildComponent { maxResults: number[] = [10, 25, 50]; diff --git a/src/app/player/triumphs/triumph-objectives/triumph-objectives.component.ts b/src/app/player/triumphs/triumph-objectives/triumph-objectives.component.ts index ab80e4962..f77b19ffc 100644 --- a/src/app/player/triumphs/triumph-objectives/triumph-objectives.component.ts +++ b/src/app/player/triumphs/triumph-objectives/triumph-objectives.component.ts @@ -1,12 +1,17 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { TriumphRecordNode } from '@app/service/model'; +import { NgIf, NgFor, DecimalPipe } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatProgressBar } from '@angular/material/progress-bar'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-triumph-objectives', - templateUrl: './triumph-objectives.component.html', - styleUrls: ['./triumph-objectives.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-triumph-objectives', + templateUrl: './triumph-objectives.component.html', + styleUrls: ['./triumph-objectives.component.scss'], + standalone: true, + imports: [NgIf, NgFor, FaIconComponent, MatProgressBar, DecimalPipe] }) export class TriumphObjectivesComponent { @Input() triumph!: TriumphRecordNode; diff --git a/src/app/player/triumphs/triumph-seals/triumph-seals.component.ts b/src/app/player/triumphs/triumph-seals/triumph-seals.component.ts index 4bb3775ad..b6f613736 100644 --- a/src/app/player/triumphs/triumph-seals/triumph-seals.component.ts +++ b/src/app/player/triumphs/triumph-seals/triumph-seals.component.ts @@ -2,12 +2,23 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '@app/shared/child.component'; import { PlayerStateService } from '../../player-state.service'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { FormsModule } from '@angular/forms'; +import { MatAccordion, MatExpansionPanel, MatExpansionPanelHeader, MatExpansionPanelTitle, MatExpansionPanelDescription } from '@angular/material/expansion'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatTooltip } from '@angular/material/tooltip'; +import { MatAnchor } from '@angular/material/button'; +import { RouterLink } from '@angular/router'; +import { MatProgressBar } from '@angular/material/progress-bar'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-triumph-seals', - templateUrl: './triumph-seals.component.html', - styleUrls: ['./triumph-seals.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-triumph-seals', + templateUrl: './triumph-seals.component.html', + styleUrls: ['./triumph-seals.component.scss'], + standalone: true, + imports: [NgIf, MatCheckbox, FormsModule, MatAccordion, NgFor, MatExpansionPanel, MatExpansionPanelHeader, MatExpansionPanelTitle, FaIconComponent, MatTooltip, MatExpansionPanelDescription, MatAnchor, RouterLink, MatProgressBar, AsyncPipe] }) export class TriumphSealsComponent extends ChildComponent { openEntryId: string|null = null; diff --git a/src/app/player/triumphs/triumph-search/triumph-search.component.ts b/src/app/player/triumphs/triumph-search/triumph-search.component.ts index f2c1dab79..c3b960466 100644 --- a/src/app/player/triumphs/triumph-search/triumph-search.component.ts +++ b/src/app/player/triumphs/triumph-search/triumph-search.component.ts @@ -7,13 +7,23 @@ import { BehaviorSubject, Subject } from 'rxjs'; import { debounceTime, takeUntil } from 'rxjs/operators'; import { PlayerStateService } from '../../player-state.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatFormField, MatLabel } from '@angular/material/form-field'; +import { MatInput } from '@angular/material/input'; +import { FormsModule } from '@angular/forms'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { TriumphNameComponent } from '../../../shared/triumph-name/triumph-name.component'; +import { MatProgressBar } from '@angular/material/progress-bar'; +import { TriumphObjectivesComponent } from '../triumph-objectives/triumph-objectives.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-triumph-search', - templateUrl: './triumph-search.component.html', - styleUrls: ['./triumph-search.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-triumph-search', + templateUrl: './triumph-search.component.html', + styleUrls: ['./triumph-search.component.scss'], + standalone: true, + imports: [NgIf, MatFormField, MatLabel, MatInput, FormsModule, MatCheckbox, NgFor, TriumphNameComponent, MatProgressBar, TriumphObjectivesComponent, AsyncPipe] }) export class TriumphSearchComponent extends ChildComponent implements OnInit { public MAX_RESULTS = 30; diff --git a/src/app/player/triumphs/triumph-seasons/triumph-seasons.component.ts b/src/app/player/triumphs/triumph-seasons/triumph-seasons.component.ts index 4fc675f62..80bc09d77 100644 --- a/src/app/player/triumphs/triumph-seasons/triumph-seasons.component.ts +++ b/src/app/player/triumphs/triumph-seasons/triumph-seasons.component.ts @@ -4,12 +4,23 @@ import { IconService } from '@app/service/icon.service'; import { WeekService } from '@app/service/week.service'; import { ChildComponent } from '@app/shared/child.component'; import { PlayerStateService } from '../../player-state.service'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { FormsModule } from '@angular/forms'; +import { MatFormField, MatLabel } from '@angular/material/form-field'; +import { MatSelect } from '@angular/material/select'; +import { MatOption } from '@angular/material/core'; +import { TriumphNameComponent } from '../../../shared/triumph-name/triumph-name.component'; +import { MatProgressBar } from '@angular/material/progress-bar'; +import { TriumphObjectivesComponent } from '../triumph-objectives/triumph-objectives.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-triumph-seasons', - templateUrl: './triumph-seasons.component.html', - styleUrls: ['./triumph-seasons.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-triumph-seasons', + templateUrl: './triumph-seasons.component.html', + styleUrls: ['./triumph-seasons.component.scss'], + standalone: true, + imports: [NgIf, MatCheckbox, FormsModule, MatFormField, MatLabel, MatSelect, NgFor, MatOption, TriumphNameComponent, MatProgressBar, TriumphObjectivesComponent, AsyncPipe] }) export class TriumphSeasonsComponent extends ChildComponent { public seasonIndex = 0; diff --git a/src/app/player/triumphs/triumph-tracked/triumph-tracked.component.ts b/src/app/player/triumphs/triumph-tracked/triumph-tracked.component.ts index e0a9c8d4d..7481c5686 100644 --- a/src/app/player/triumphs/triumph-tracked/triumph-tracked.component.ts +++ b/src/app/player/triumphs/triumph-tracked/triumph-tracked.component.ts @@ -3,12 +3,20 @@ import { ActivatedRoute, Router } from '@angular/router'; import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '@app/shared/child.component'; import { PlayerStateService } from '../../player-state.service'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { FormsModule } from '@angular/forms'; +import { TriumphNameComponent } from '../../../shared/triumph-name/triumph-name.component'; +import { MatProgressBar } from '@angular/material/progress-bar'; +import { TriumphObjectivesComponent } from '../triumph-objectives/triumph-objectives.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-triumph-tracked', - templateUrl: './triumph-tracked.component.html', - styleUrls: ['./triumph-tracked.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-triumph-tracked', + templateUrl: './triumph-tracked.component.html', + styleUrls: ['./triumph-tracked.component.scss'], + standalone: true, + imports: [NgIf, MatCheckbox, FormsModule, NgFor, TriumphNameComponent, MatProgressBar, TriumphObjectivesComponent, AsyncPipe] }) export class TriumphTrackedComponent extends ChildComponent { diff --git a/src/app/player/triumphs/triumph-tree/triumph-tree.component.ts b/src/app/player/triumphs/triumph-tree/triumph-tree.component.ts index 27f9170fa..08946f32c 100644 --- a/src/app/player/triumphs/triumph-tree/triumph-tree.component.ts +++ b/src/app/player/triumphs/triumph-tree/triumph-tree.component.ts @@ -1,7 +1,7 @@ import { FlatTreeControl } from '@angular/cdk/tree'; -import { Location } from '@angular/common'; +import { Location, NgIf, AsyncPipe, DecimalPipe } from '@angular/common'; import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; -import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'; +import { MatTreeFlatDataSource, MatTreeFlattener, MatTree, MatTreeNodeDef, MatTreeNode, MatTreeNodeToggle, MatTreeNodePadding } from '@angular/material/tree'; import { ActivatedRoute } from '@angular/router'; import { CollectionTreeComponent, TriumphFlatNode } from '@app/player/collections/collection-tree/collection-tree.component'; import { TriumphNode, TriumphRecordNode } from '@app/service/model'; @@ -11,12 +11,22 @@ import { takeUntil } from 'rxjs/operators'; import { PlayerStateService } from '../../player-state.service'; import { IconService } from '@app/service/icon.service'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { MatButton, MatIconButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { FormsModule } from '@angular/forms'; +import { TriumphObjectivesComponent } from '../triumph-objectives/triumph-objectives.component'; +import { MatIcon } from '@angular/material/icon'; +import { MatTooltip } from '@angular/material/tooltip'; +import { MatProgressBar } from '@angular/material/progress-bar'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-triumph-tree', - templateUrl: './triumph-tree.component.html', - styleUrls: ['./triumph-tree.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-triumph-tree', + templateUrl: './triumph-tree.component.html', + styleUrls: ['./triumph-tree.component.scss'], + standalone: true, + imports: [NgIf, MatButton, FaIconComponent, MatCheckbox, FormsModule, MatTree, MatTreeNodeDef, MatTreeNode, MatTreeNodeToggle, MatTreeNodePadding, MatIconButton, TriumphObjectivesComponent, MatIcon, MatTooltip, MatProgressBar, AsyncPipe, DecimalPipe] }) export class TriumphTreeComponent extends ChildComponent implements OnInit { selectedTreeNodeHash!: string; diff --git a/src/app/player/triumphs/triumphs.component.ts b/src/app/player/triumphs/triumphs.component.ts index e6cf14ccb..e148fd72d 100644 --- a/src/app/player/triumphs/triumphs.component.ts +++ b/src/app/player/triumphs/triumphs.component.ts @@ -1,14 +1,19 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '@app/shared/child.component'; import { PlayerStateService } from '../player-state.service'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-triumphs', - templateUrl: './triumphs.component.html', - styleUrls: ['./triumphs.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-triumphs', + templateUrl: './triumphs.component.html', + styleUrls: ['./triumphs.component.scss'], + standalone: true, + imports: [NgIf, MatTabNav, MatTabLink, RouterLink, RouterLinkActive, FaIconComponent, MatTabNavPanel, RouterOutlet, AsyncPipe] }) export class TriumphsComponent extends ChildComponent { diff --git a/src/app/privacy/privacy.component.ts b/src/app/privacy/privacy.component.ts index 0cd0728c9..a218f6f8b 100644 --- a/src/app/privacy/privacy.component.ts +++ b/src/app/privacy/privacy.component.ts @@ -1,10 +1,11 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-privacy', - templateUrl: './privacy.component.html', - styleUrls: ['./privacy.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-privacy', + templateUrl: './privacy.component.html', + styleUrls: ['./privacy.component.scss'], + standalone: true }) export class PrivacyComponent { diff --git a/src/app/recent-players/index.ts b/src/app/recent-players/index.ts index c660f4fcc..04df6e590 100644 --- a/src/app/recent-players/index.ts +++ b/src/app/recent-players/index.ts @@ -1,2 +1 @@ -export * from './recent-players.module'; export * from './recent-players/recent-players.component'; diff --git a/src/app/recent-players/recent-players.module.ts b/src/app/recent-players/recent-players.module.ts deleted file mode 100644 index 3239ef216..000000000 --- a/src/app/recent-players/recent-players.module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { SharedModule } from '../shared'; -import { RecentPlayersComponent } from './recent-players/recent-players.component'; - -@NgModule({ - imports: [ - SharedModule - ], - declarations: [RecentPlayersComponent] -}) -export class RecentPlayersModule { } diff --git a/src/app/recent-players/recent-players/recent-players.component.ts b/src/app/recent-players/recent-players/recent-players.component.ts index f2ddbe505..d42f82b2d 100644 --- a/src/app/recent-players/recent-players/recent-players.component.ts +++ b/src/app/recent-players/recent-players/recent-players.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { IconService } from '@app/service/icon.service'; import { Entry, Game, PgcrService } from '@app/service/pgcr.service'; import { takeUntil } from 'rxjs/operators'; @@ -8,12 +8,24 @@ import { BungieService } from '../../service/bungie.service'; import { Activity, ActivityMode, Const, Player, UserInfo } from '../../service/model'; import { ChildComponent } from '../../shared/child.component'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, NgFor, AsyncPipe, DatePipe } from '@angular/common'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatAnchor, MatButton } from '@angular/material/button'; +import { MatFormField } from '@angular/material/form-field'; +import { MatSelect } from '@angular/material/select'; +import { FormsModule } from '@angular/forms'; +import { MatOption } from '@angular/material/core'; +import { MatIcon } from '@angular/material/icon'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { FriendStarComponent } from '../../shared/friend-star/friend-star.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-history', - templateUrl: './recent-players.component.html', - styleUrls: ['./recent-players.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-history', + templateUrl: './recent-players.component.html', + styleUrls: ['./recent-players.component.scss'], + standalone: true, + imports: [NgIf, MatProgressSpinner, RouterLink, NgFor, MatAnchor, MatFormField, MatSelect, FormsModule, MatOption, MatButton, MatIcon, FaIconComponent, FriendStarComponent, AsyncPipe, DatePipe] }) export class RecentPlayersComponent extends ChildComponent implements OnInit { activityModes: ActivityMode[]; diff --git a/src/app/settings/index.ts b/src/app/settings/index.ts index 24eebcd74..a554fcd74 100644 --- a/src/app/settings/index.ts +++ b/src/app/settings/index.ts @@ -1,2 +1 @@ -export * from './settings.module'; export * from './settings/settings.component'; diff --git a/src/app/settings/settings.module.ts b/src/app/settings/settings.module.ts deleted file mode 100644 index 2611e0368..000000000 --- a/src/app/settings/settings.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { SharedModule } from '../shared'; - -import { SettingsComponent } from './settings/settings.component'; - -@NgModule({ - imports: [ - SharedModule - ], - declarations: [SettingsComponent] -}) -export class SettingsModule { } diff --git a/src/app/settings/settings/settings.component.ts b/src/app/settings/settings/settings.component.ts index d0f8d3976..065465a6f 100644 --- a/src/app/settings/settings/settings.component.ts +++ b/src/app/settings/settings/settings.component.ts @@ -8,12 +8,22 @@ import { takeUntil } from 'rxjs/operators'; import { StorageService } from '../../service/storage.service'; import { ChildComponent } from '../../shared/child.component'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { MatFormField } from '@angular/material/form-field'; +import { MatSelect } from '@angular/material/select'; +import { FormsModule } from '@angular/forms'; +import { NgFor, NgIf, AsyncPipe } from '@angular/common'; +import { MatOption } from '@angular/material/core'; +import { MatIcon } from '@angular/material/icon'; +import { MatAnchor, MatButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-settings', - templateUrl: './settings.component.html', - styleUrls: ['./settings.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-settings', + templateUrl: './settings.component.html', + styleUrls: ['./settings.component.scss'], + standalone: true, + imports: [MatFormField, MatSelect, FormsModule, NgFor, MatOption, NgIf, MatIcon, MatAnchor, FaIconComponent, MatButton, AsyncPipe] }) export class SettingsComponent extends ChildComponent { diff --git a/src/app/shared/ad-slot/ad-slot.component.ts b/src/app/shared/ad-slot/ad-slot.component.ts index a5978ba0e..dc04da981 100644 --- a/src/app/shared/ad-slot/ad-slot.component.ts +++ b/src/app/shared/ad-slot/ad-slot.component.ts @@ -3,12 +3,16 @@ import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; import { ChildComponent } from '@app/shared/child.component'; import { BehaviorSubject } from 'rxjs'; import { filter } from 'rxjs/operators'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { NitroUnitComponent } from './nitro-unit/nitro-unit.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-ad-slot', - templateUrl: './ad-slot.component.html', - styleUrls: ['./ad-slot.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-ad-slot', + templateUrl: './ad-slot.component.html', + styleUrls: ['./ad-slot.component.scss'], + standalone: true, + imports: [NgIf, NitroUnitComponent, AsyncPipe] }) export class AdSlotComponent extends ChildComponent implements OnInit { @Input() adType = 'unknown'; diff --git a/src/app/shared/ad-slot/nitro-unit/nitro-unit.component.ts b/src/app/shared/ad-slot/nitro-unit/nitro-unit.component.ts index 0c698c588..6c7f9b0a7 100644 --- a/src/app/shared/ad-slot/nitro-unit/nitro-unit.component.ts +++ b/src/app/shared/ad-slot/nitro-unit/nitro-unit.component.ts @@ -2,10 +2,11 @@ import { AfterViewInit, ChangeDetectionStrategy, Component, Input } from '@angul import { environment } from '@env/environment'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-nitro-unit', - templateUrl: './nitro-unit.component.html', - styleUrls: ['./nitro-unit.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-nitro-unit', + templateUrl: './nitro-unit.component.html', + styleUrls: ['./nitro-unit.component.scss'], + standalone: true }) export class NitroUnitComponent implements AfterViewInit { @Input() title!: string; diff --git a/src/app/shared/character-pursuit-dialog/character-pursuit-dialog.component.ts b/src/app/shared/character-pursuit-dialog/character-pursuit-dialog.component.ts index 0b6eaf518..6cdb01fb0 100644 --- a/src/app/shared/character-pursuit-dialog/character-pursuit-dialog.component.ts +++ b/src/app/shared/character-pursuit-dialog/character-pursuit-dialog.component.ts @@ -1,9 +1,10 @@ import { Component } from '@angular/core'; @Component({ - selector: 'd2c-character-pursuit-dialog', - templateUrl: './character-pursuit-dialog.component.html', - styleUrls: ['./character-pursuit-dialog.component.scss'] + selector: 'd2c-character-pursuit-dialog', + templateUrl: './character-pursuit-dialog.component.html', + styleUrls: ['./character-pursuit-dialog.component.scss'], + standalone: true }) export class CharacterPursuitDialogComponent { diff --git a/src/app/shared/child.component.ts b/src/app/shared/child.component.ts index 2342d76af..b47a2a463 100644 --- a/src/app/shared/child.component.ts +++ b/src/app/shared/child.component.ts @@ -5,7 +5,8 @@ import { StorageService } from '../service/storage.service'; @Component({ selector: 'd2c-child', - template: `
Abstract
` + template: `
Abstract
`, + standalone: true }) export class ChildComponent { storageService = inject(StorageService); diff --git a/src/app/shared/friend-star/friend-star.component.ts b/src/app/shared/friend-star/friend-star.component.ts index 80e6b77b9..bf31ea16c 100644 --- a/src/app/shared/friend-star/friend-star.component.ts +++ b/src/app/shared/friend-star/friend-star.component.ts @@ -3,12 +3,17 @@ import { IconService } from '@app/service/icon.service'; import { UserInfo } from '@app/service/model'; import { StorageService } from '@app/service/storage.service'; import { BehaviorSubject } from 'rxjs'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { MatIconButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-friend-star', - templateUrl: './friend-star.component.html', - styleUrls: ['./friend-star.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-friend-star', + templateUrl: './friend-star.component.html', + styleUrls: ['./friend-star.component.scss'], + standalone: true, + imports: [NgIf, MatIconButton, FaIconComponent, AsyncPipe] }) export class FriendStarComponent { public loading: BehaviorSubject = new BehaviorSubject(false); diff --git a/src/app/shared/index.ts b/src/app/shared/index.ts deleted file mode 100644 index bc349d6c0..000000000 --- a/src/app/shared/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './shared.module'; diff --git a/src/app/shared/item-energy-indicator/item-energy-indicator.component.ts b/src/app/shared/item-energy-indicator/item-energy-indicator.component.ts index 0b2ce1bf7..acf51f167 100644 --- a/src/app/shared/item-energy-indicator/item-energy-indicator.component.ts +++ b/src/app/shared/item-energy-indicator/item-energy-indicator.component.ts @@ -1,13 +1,17 @@ import { Component, ChangeDetectionStrategy, Input } from '@angular/core'; import { ItemType, DamageType, InventoryItem } from '@app/service/model'; import { IconService } from '@app/service/icon.service'; +import { NgIf } from '@angular/common'; +import { MatTooltip } from '@angular/material/tooltip'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-item-energy-indicator', - templateUrl: './item-energy-indicator.component.html', - styleUrls: ['./item-energy-indicator.component.scss'] - + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-item-energy-indicator', + templateUrl: './item-energy-indicator.component.html', + styleUrls: ['./item-energy-indicator.component.scss'], + standalone: true, + imports: [NgIf, MatTooltip, FaIconComponent] }) export class ItemEnergyIndicatorComponent{ ItemType = ItemType; diff --git a/src/app/shared/item-icon/item-icon.component.ts b/src/app/shared/item-icon/item-icon.component.ts index 4965d5198..2820029f4 100644 --- a/src/app/shared/item-icon/item-icon.component.ts +++ b/src/app/shared/item-icon/item-icon.component.ts @@ -2,12 +2,17 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from import { IconService } from '@app/service/icon.service'; import { MarkService } from '@app/service/mark.service'; import { DamageType, InventoryItem, ItemType, Target } from '@app/service/model'; +import { NgIf, NgTemplateOutlet, NgClass, NgFor, AsyncPipe } from '@angular/common'; +import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-item-icon', - templateUrl: './item-icon.component.html', - styleUrls: ['./item-icon.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-item-icon', + templateUrl: './item-icon.component.html', + styleUrls: ['./item-icon.component.scss'], + standalone: true, + imports: [NgIf, NgTemplateOutlet, MatMenuTrigger, FaIconComponent, NgClass, MatMenu, MatMenuItem, NgFor, AsyncPipe] }) export class ItemIconComponent { ItemType = ItemType; diff --git a/src/app/shared/legendary-lost-sector/legendary-lost-sector.component.ts b/src/app/shared/legendary-lost-sector/legendary-lost-sector.component.ts index 4d26e92a5..60a9550fc 100644 --- a/src/app/shared/legendary-lost-sector/legendary-lost-sector.component.ts +++ b/src/app/shared/legendary-lost-sector/legendary-lost-sector.component.ts @@ -4,13 +4,25 @@ import { BurnDialogComponent } from '@app/home/burn-dialog/burn-dialog.component import { IconService } from '@app/service/icon.service'; import { LostSector, MilestoneActivity } from '@app/service/model'; import { ChildComponent } from '@app/shared/child.component'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatListItem, MatListItemIcon, MatListItemLine } from '@angular/material/list'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-legendary-lost-sector', - templateUrl: './legendary-lost-sector.component.html', - styleUrls: ['./legendary-lost-sector.component.scss'], - + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-legendary-lost-sector', + templateUrl: './legendary-lost-sector.component.html', + styleUrls: ['./legendary-lost-sector.component.scss'], + standalone: true, + imports: [ + NgIf, + MatListItem, + MatListItemIcon, + MatListItemLine, + FaIconComponent, + NgFor, + AsyncPipe, + ], }) export class LegendaryLostSectorComponent extends ChildComponent { diff --git a/src/app/shared/lost-sector-next-days/lost-sector-next-days.component.ts b/src/app/shared/lost-sector-next-days/lost-sector-next-days.component.ts index 849f0650d..f6c40f612 100644 --- a/src/app/shared/lost-sector-next-days/lost-sector-next-days.component.ts +++ b/src/app/shared/lost-sector-next-days/lost-sector-next-days.component.ts @@ -2,12 +2,18 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { LostSectors, WeekService } from '@app/service/week.service'; import { BehaviorSubject } from 'rxjs'; +import { MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; +import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; +import { NgFor, NgIf, AsyncPipe, DatePipe } from '@angular/common'; +import { CdkScrollable } from '@angular/cdk/scrolling'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-lost-sector-next-days', - templateUrl: './lost-sector-next-days.component.html', - styleUrls: ['./lost-sector-next-days.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-lost-sector-next-days', + templateUrl: './lost-sector-next-days.component.html', + styleUrls: ['./lost-sector-next-days.component.scss'], + standalone: true, + imports: [MatDialogTitle, MatTabNav, NgFor, MatTabLink, MatTabNavPanel, CdkScrollable, MatDialogContent, NgIf, AsyncPipe, DatePipe] }) export class LostSectorNextDaysComponent { public days$: BehaviorSubject = new BehaviorSubject([]); diff --git a/src/app/shared/manifest-item-icon/manifest-item-icon.component.ts b/src/app/shared/manifest-item-icon/manifest-item-icon.component.ts index 6c315271c..dcbe11976 100644 --- a/src/app/shared/manifest-item-icon/manifest-item-icon.component.ts +++ b/src/app/shared/manifest-item-icon/manifest-item-icon.component.ts @@ -1,12 +1,15 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { ManifestInventoryItem, SimpleInventoryItem } from '@app/service/destiny-cache.service'; +import { NgIf, NgClass } from '@angular/common'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-manifest-item-icon', - templateUrl: './manifest-item-icon.component.html', - styleUrls: ['./manifest-item-icon.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-manifest-item-icon', + templateUrl: './manifest-item-icon.component.html', + styleUrls: ['./manifest-item-icon.component.scss'], + standalone: true, + imports: [NgIf, NgClass] }) export class ManifestItemIconComponent { @Input() desc!: SimpleInventoryItem; diff --git a/src/app/shared/milestone-check/milestone-check.component.ts b/src/app/shared/milestone-check/milestone-check.component.ts index 55206b4c5..a120f1699 100644 --- a/src/app/shared/milestone-check/milestone-check.component.ts +++ b/src/app/shared/milestone-check/milestone-check.component.ts @@ -1,14 +1,28 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { Const, MilestoneStatus } from '@app/service/model'; +import { NgIf, NgFor } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatTooltip, MAT_TOOLTIP_DEFAULT_OPTIONS } from '@angular/material/tooltip'; +import { MatProgressBar } from '@angular/material/progress-bar'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-milestone-check', - templateUrl: './milestone-check.component.html', - styleUrls: ['./milestone-check.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-milestone-check', + templateUrl: './milestone-check.component.html', + styleUrls: ['./milestone-check.component.scss'], + standalone: true, + imports: [NgIf, NgFor, FaIconComponent, MatTooltip, MatProgressBar], + providers: [ + { + provide: MAT_TOOLTIP_DEFAULT_OPTIONS, + useValue: { + disableTooltipInteractivity: true + }, + } + ] }) export class MilestoneCheckComponent { public Const = Const; diff --git a/src/app/shared/milestone-check/milestone-check.module.ts b/src/app/shared/milestone-check/milestone-check.module.ts deleted file mode 100644 index a218001a0..000000000 --- a/src/app/shared/milestone-check/milestone-check.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { MatTooltipModule, MAT_TOOLTIP_DEFAULT_OPTIONS } from '@angular/material/tooltip'; -import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; - -import { MilestoneCheckComponent } from './milestone-check.component'; -import { MatProgressBarModule as MatProgressBarModule } from '@angular/material/progress-bar'; - - -@NgModule({ - imports: [ - CommonModule, - FontAwesomeModule, - MatTooltipModule, - MatProgressBarModule - ], - declarations: [MilestoneCheckComponent], - exports: [MilestoneCheckComponent], - providers: [ - { - provide: MAT_TOOLTIP_DEFAULT_OPTIONS, - useValue: { - disableTooltipInteractivity: true - }, - } - ], -}) -export class MilestoneCheckModule { } diff --git a/src/app/shared/pipe/index.ts b/src/app/shared/pipe/index.ts index 3065b743f..8ead0f10d 100644 --- a/src/app/shared/pipe/index.ts +++ b/src/app/shared/pipe/index.ts @@ -1,2 +1,2 @@ -export * from './pipe.module'; + export * from './timing.pipe'; diff --git a/src/app/shared/pipe/pipe.module.ts b/src/app/shared/pipe/pipe.module.ts deleted file mode 100644 index e02c4aabc..000000000 --- a/src/app/shared/pipe/pipe.module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NgModule } from '@angular/core'; -import { AgoHumanizedPipe, TimingPipe, MinsHumanizedPipe, DateFormatPipe } from './timing.pipe'; - -@NgModule({ - imports: [ - ], - declarations: [ - AgoHumanizedPipe, TimingPipe, MinsHumanizedPipe, DateFormatPipe - ], - exports: [ - AgoHumanizedPipe, TimingPipe, MinsHumanizedPipe, DateFormatPipe - ] -}) -export class PipeModule { } diff --git a/src/app/shared/pipe/timing.pipe.ts b/src/app/shared/pipe/timing.pipe.ts index cba6e8cc6..274ef96ab 100644 --- a/src/app/shared/pipe/timing.pipe.ts +++ b/src/app/shared/pipe/timing.pipe.ts @@ -2,7 +2,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { format, formatDuration, intervalToDuration, parseISO } from 'date-fns'; import { formatDistanceStrict } from 'date-fns/esm'; -@Pipe({ name: 'd2cTiming' }) +@Pipe({ + name: 'd2cTiming', + standalone: true +}) export class TimingPipe implements PipeTransform { // format ms into a duration transform(value: number, unit: string): string { @@ -30,7 +33,10 @@ export class TimingPipe implements PipeTransform { } } -@Pipe({ name: 'd2cDateFormat' }) +@Pipe({ + name: 'd2cDateFormat', + standalone: true +}) export class DateFormatPipe implements PipeTransform { transform(value: Date | string, formatLayout: string): string { if (!value) { @@ -48,7 +54,10 @@ export class DateFormatPipe implements PipeTransform { -@Pipe({ name: 'd2cMinsHumanized' }) +@Pipe({ + name: 'd2cMinsHumanized', + standalone: true +}) export class MinsHumanizedPipe implements PipeTransform { transform(mins: number): string { const duration = intervalToDuration({ start: 0, end: mins * 60 * 1000 }); @@ -58,7 +67,10 @@ export class MinsHumanizedPipe implements PipeTransform { -@Pipe({ name: 'd2cAgoHumanized' }) +@Pipe({ + name: 'd2cAgoHumanized', + standalone: true +}) export class AgoHumanizedPipe implements PipeTransform { transform( value: string, skipSuffix?: boolean): string { const today = new Date(); diff --git a/src/app/shared/season-indicator/season-indicator.component.ts b/src/app/shared/season-indicator/season-indicator.component.ts index 57d1570e2..0ceaf9de0 100644 --- a/src/app/shared/season-indicator/season-indicator.component.ts +++ b/src/app/shared/season-indicator/season-indicator.component.ts @@ -1,11 +1,16 @@ import { Component, OnInit, Input, ChangeDetectionStrategy } from '@angular/core'; import { IconService } from '@app/service/icon.service'; +import { NgIf } from '@angular/common'; +import { MatTooltip } from '@angular/material/tooltip'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-season-indicator', - templateUrl: './season-indicator.component.html', - styleUrls: ['./season-indicator.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-season-indicator', + templateUrl: './season-indicator.component.html', + styleUrls: ['./season-indicator.component.scss'], + standalone: true, + imports: [NgIf, MatTooltip, FaIconComponent] }) export class SeasonIndicatorComponent { @Input() season!: number|null; diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts deleted file mode 100644 index e3a767c12..000000000 --- a/src/app/shared/shared.module.ts +++ /dev/null @@ -1,174 +0,0 @@ -import { NgOptimizedImage } from '@angular/common'; -import { ScrollingModule } from '@angular/cdk/scrolling'; -import { CdkTableModule } from '@angular/cdk/table'; -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatAutocompleteModule as MatAutocompleteModule } from '@angular/material/autocomplete'; -import { MatBadgeModule } from '@angular/material/badge'; -import { MatButtonModule as MatButtonModule } from '@angular/material/button'; -import { MatButtonToggleModule } from '@angular/material/button-toggle'; -import { MatCardModule as MatCardModule } from '@angular/material/card'; -import { MatCheckboxModule as MatCheckboxModule } from '@angular/material/checkbox'; -import { MatChipsModule as MatChipsModule } from '@angular/material/chips'; -import { MatDialogModule as MatDialogModule } from '@angular/material/dialog'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { MatIconModule } from '@angular/material/icon'; -import { MatInputModule as MatInputModule } from '@angular/material/input'; -import { MatListModule as MatListModule } from '@angular/material/list'; -import {MatDividerModule} from '@angular/material/divider'; -import { MatMenuModule as MatMenuModule } from '@angular/material/menu'; -import { MatPaginatorModule as MatPaginatorModule } from '@angular/material/paginator'; -import { MatProgressBarModule as MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatProgressSpinnerModule as MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatRadioModule as MatRadioModule } from '@angular/material/radio'; -import { MatSelectModule as MatSelectModule } from '@angular/material/select'; -import { MatSidenavModule } from '@angular/material/sidenav'; -import { MatSlideToggleModule as MatSlideToggleModule } from '@angular/material/slide-toggle'; -import {MatSliderModule as MatSliderModule} from '@angular/material/slider'; -import { MatSnackBarModule as MatSnackBarModule } from '@angular/material/snack-bar'; -import { MatSortModule } from '@angular/material/sort'; -import { MatTableModule as MatTableModule } from '@angular/material/table'; -import { MatTabsModule as MatTabsModule } from '@angular/material/tabs'; -import { MatToolbarModule } from '@angular/material/toolbar'; -import { MatTooltipModule, MAT_TOOLTIP_DEFAULT_OPTIONS } from '@angular/material/tooltip'; -import { MatTreeModule } from '@angular/material/tree'; -import { RouterModule } from '@angular/router'; -import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; - -import { ItemEnergyIndicatorComponent } from './item-energy-indicator/item-energy-indicator.component'; -import { ItemIconComponent } from './item-icon/item-icon.component'; -import { GodRollItemComponent } from '../gear/god-roll-item/god-roll-item.component'; -import { GodRollMwComponent } from '../gear/god-roll-mw/god-roll-mw.component'; -import { MilestoneCheckModule } from './milestone-check/milestone-check.module'; -import { PipeModule } from './pipe'; -import { SeasonIndicatorComponent } from './season-indicator/season-indicator.component'; -import { SignInRequiredModule } from './sign-in-required/sign-in-required.module'; -import { SortIndicatorComponent } from './sort-indicator/sort-indicator.component'; -import { FriendStarComponent } from './friend-star/friend-star.component'; -import { TriumphNameComponent } from './triumph-name/triumph-name.component'; -import { AdSlotComponent } from './ad-slot/ad-slot.component'; -import { NitroUnitComponent } from './ad-slot/nitro-unit/nitro-unit.component'; -import { SignedOnLoadingIconComponent } from './signed-on-loading-icon/signed-on-loading-icon.component'; -import { ManifestItemIconComponent } from './manifest-item-icon/manifest-item-icon.component'; -import { HorizontalSortComponent } from '@app/gear/gear/gear-compare-dialog/horizontal-sort/horizontal-sort.component'; -import { LegendaryLostSectorComponent } from './legendary-lost-sector/legendary-lost-sector.component'; -import { LostSectorNextDaysComponent } from './lost-sector-next-days/lost-sector-next-days.component'; -import { GodRollPlugComponent } from '../gear/god-roll-plug/god-roll-plug.component'; -import { CharacterPursuitDialogComponent } from './character-pursuit-dialog/character-pursuit-dialog.component'; - -@NgModule({ - imports: [ - NgOptimizedImage, - PipeModule, - CommonModule, - FormsModule, - FontAwesomeModule, - MatButtonModule, - MatToolbarModule, - MatSelectModule, - MatTabsModule, - MatInputModule, - MatProgressSpinnerModule, - MatChipsModule, - MatRadioModule, - MatCardModule, - MatDialogModule, - MatSidenavModule, - MatSlideToggleModule, - MatSliderModule, - MatCheckboxModule, - MatAutocompleteModule, - MatListModule, - MatDividerModule, - MatMenuModule, - MatTreeModule, - MatIconModule, - MatTooltipModule, - MatSnackBarModule, - MatProgressBarModule, - MatExpansionModule, - MatSortModule, - MatPaginatorModule, - MatTableModule, - CdkTableModule, - ScrollingModule, - SignInRequiredModule, - MilestoneCheckModule - ], - declarations: [ - SortIndicatorComponent, - SeasonIndicatorComponent, - ItemEnergyIndicatorComponent, - ItemIconComponent, - GodRollItemComponent, - GodRollMwComponent, - HorizontalSortComponent, - FriendStarComponent, - TriumphNameComponent, - AdSlotComponent, - GodRollPlugComponent, - NitroUnitComponent, - SignedOnLoadingIconComponent, - ManifestItemIconComponent, - LegendaryLostSectorComponent, - LostSectorNextDaysComponent, - CharacterPursuitDialogComponent], - exports: [ - SortIndicatorComponent, - HorizontalSortComponent, - ManifestItemIconComponent, - TriumphNameComponent, - ItemIconComponent, - GodRollItemComponent, - GodRollMwComponent, - FriendStarComponent, - GodRollPlugComponent, - SeasonIndicatorComponent, - AdSlotComponent, - ItemEnergyIndicatorComponent, - SignedOnLoadingIconComponent, - LegendaryLostSectorComponent, - RouterModule, - PipeModule, - CommonModule, - FormsModule, - ReactiveFormsModule, - FontAwesomeModule, - MatButtonModule, - MatButtonToggleModule, - MatMenuModule, - MatTreeModule, - MatTabsModule, - MatChipsModule, - MatRadioModule, - MatInputModule, - MatProgressSpinnerModule, - MatCheckboxModule, - MatAutocompleteModule, - MatSlideToggleModule, - MatSliderModule, - MatCardModule, - MatDialogModule, - MatSidenavModule, - MatListModule, - MatDividerModule, - MatBadgeModule, - MatSelectModule, - MatToolbarModule, - MatIconModule, - MatTooltipModule, - MatProgressBarModule, - MatExpansionModule, - MatSortModule, - MatPaginatorModule, - MatTableModule, - CdkTableModule, - ScrollingModule, - SignInRequiredModule, - MilestoneCheckModule - ], - providers: [] -}) -export class SharedModule { -} diff --git a/src/app/shared/sign-in-required/sign-in-required.component.ts b/src/app/shared/sign-in-required/sign-in-required.component.ts index 2c165d966..e86530f77 100644 --- a/src/app/shared/sign-in-required/sign-in-required.component.ts +++ b/src/app/shared/sign-in-required/sign-in-required.component.ts @@ -2,12 +2,18 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { AuthService } from '@app/service/auth.service'; import { IconService } from '@app/service/icon.service'; import { SignedOnUserService } from '@app/service/signed-on-user.service'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { MatCard, MatCardHeader, MatCardAvatar, MatCardTitle, MatCardSubtitle, MatCardContent, MatCardActions } from '@angular/material/card'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatButton } from '@angular/material/button'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-sign-in-required', - templateUrl: './sign-in-required.component.html', - styleUrls: ['./sign-in-required.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-sign-in-required', + templateUrl: './sign-in-required.component.html', + styleUrls: ['./sign-in-required.component.scss'], + standalone: true, + imports: [NgIf, MatCard, MatCardHeader, MatCardAvatar, FaIconComponent, MatCardTitle, MatCardSubtitle, MatCardContent, MatCardActions, MatButton, AsyncPipe] }) export class SignInRequiredComponent { diff --git a/src/app/shared/sign-in-required/sign-in-required.module.ts b/src/app/shared/sign-in-required/sign-in-required.module.ts deleted file mode 100644 index 785a3314c..000000000 --- a/src/app/shared/sign-in-required/sign-in-required.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { MatCardModule as MatCardModule } from '@angular/material/card'; -import { MatButtonModule as MatButtonModule } from '@angular/material/button'; -import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; - -import { SignInRequiredComponent } from './sign-in-required.component'; - -@NgModule({ - imports: [ - CommonModule, - MatButtonModule, - MatCardModule, - FontAwesomeModule - ], - declarations: [SignInRequiredComponent], - exports: [SignInRequiredComponent] -}) -export class SignInRequiredModule { } diff --git a/src/app/shared/signed-on-loading-icon/signed-on-loading-icon.component.ts b/src/app/shared/signed-on-loading-icon/signed-on-loading-icon.component.ts index 8aa43d816..a775c4414 100644 --- a/src/app/shared/signed-on-loading-icon/signed-on-loading-icon.component.ts +++ b/src/app/shared/signed-on-loading-icon/signed-on-loading-icon.component.ts @@ -1,12 +1,16 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { SignedOnUserService } from '@app/service/signed-on-user.service'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { FaStackComponent, FaIconComponent, FaStackItemSizeDirective } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-signed-on-loading-icon', - templateUrl: './signed-on-loading-icon.component.html', - styleUrls: ['./signed-on-loading-icon.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-signed-on-loading-icon', + templateUrl: './signed-on-loading-icon.component.html', + styleUrls: ['./signed-on-loading-icon.component.scss'], + standalone: true, + imports: [NgIf, FaStackComponent, FaIconComponent, FaStackItemSizeDirective, AsyncPipe] }) export class SignedOnLoadingIconComponent { diff --git a/src/app/shared/sort-indicator/sort-indicator.component.ts b/src/app/shared/sort-indicator/sort-indicator.component.ts index 166db8149..d273feece 100644 --- a/src/app/shared/sort-indicator/sort-indicator.component.ts +++ b/src/app/shared/sort-indicator/sort-indicator.component.ts @@ -1,11 +1,15 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { IconService } from '@app/service/icon.service'; +import { NgIf } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-sort-indicator', - templateUrl: './sort-indicator.component.html', - styleUrls: ['./sort-indicator.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-sort-indicator', + templateUrl: './sort-indicator.component.html', + styleUrls: ['./sort-indicator.component.scss'], + standalone: true, + imports: [NgIf, FaIconComponent] }) export class SortIndicatorComponent { diff --git a/src/app/shared/triumph-name/triumph-name.component.ts b/src/app/shared/triumph-name/triumph-name.component.ts index 4ccaf26c6..5d803f0f2 100644 --- a/src/app/shared/triumph-name/triumph-name.component.ts +++ b/src/app/shared/triumph-name/triumph-name.component.ts @@ -2,12 +2,17 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from import { PlayerStateService } from '@app/player/player-state.service'; import { IconService } from '@app/service/icon.service'; import { TriumphRecordNode } from '@app/service/model'; +import { NgIf, NgFor } from '@angular/common'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatTooltip } from '@angular/material/tooltip'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-triumph-name', - templateUrl: './triumph-name.component.html', - styleUrls: ['./triumph-name.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-triumph-name', + templateUrl: './triumph-name.component.html', + styleUrls: ['./triumph-name.component.scss'], + standalone: true, + imports: [NgIf, FaIconComponent, MatTooltip, NgFor] }) export class TriumphNameComponent { @Input() cntr!: number|null; diff --git a/src/app/testbed/testbed.component.ts b/src/app/testbed/testbed.component.ts index 899cb7fd5..e5c4e3f02 100644 --- a/src/app/testbed/testbed.component.ts +++ b/src/app/testbed/testbed.component.ts @@ -3,10 +3,11 @@ import { IconService } from '@app/service/icon.service'; import { ChildComponent } from '@app/shared/child.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-testbed', - templateUrl: './testbed.component.html', - styleUrls: ['./testbed.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-testbed', + templateUrl: './testbed.component.html', + styleUrls: ['./testbed.component.scss'], + standalone: true }) export class TestbedComponent extends ChildComponent { diff --git a/src/app/uber-list/uber-list-builder/uber-list-builder.component.ts b/src/app/uber-list/uber-list-builder/uber-list-builder.component.ts index ad0770c9d..2887f47da 100644 --- a/src/app/uber-list/uber-list-builder/uber-list-builder.component.ts +++ b/src/app/uber-list/uber-list-builder/uber-list-builder.component.ts @@ -5,12 +5,30 @@ import { SignedOnUserService } from '@app/service/signed-on-user.service'; import { ChildComponent } from '@app/shared/child.component'; import { MilestoneRow, PursuitRow, UberListStateService } from '../uber-list-state.service'; import { UberRowDialogComponent } from '../uber-row-dialog/uber-row-dialog.component'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { UberListToggleComponent } from '../uber-list-toggle/uber-list-toggle.component'; +import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field'; +import { MatInput } from '@angular/material/input'; +import { FormsModule } from '@angular/forms'; +import { MatIconButton, MatButton } from '@angular/material/button'; +import { MatIcon } from '@angular/material/icon'; +import { FaIconComponent, FaStackComponent, FaStackItemSizeDirective } from '@fortawesome/angular-fontawesome'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { SignedOnLoadingIconComponent } from '../../shared/signed-on-loading-icon/signed-on-loading-icon.component'; +import { SortIndicatorComponent } from '../../shared/sort-indicator/sort-indicator.component'; +import { MatTooltip } from '@angular/material/tooltip'; +import { UberPursuitCheckComponent } from '../uber-pursuit-check/uber-pursuit-check.component'; +import { MilestoneCheckComponent } from '../../shared/milestone-check/milestone-check.component'; +import { SignInRequiredComponent } from '../../shared/sign-in-required/sign-in-required.component'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-uber-list-builder', - templateUrl: './uber-list-builder.component.html', - styleUrls: ['./uber-list-builder.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-uber-list-builder', + templateUrl: './uber-list-builder.component.html', + styleUrls: ['./uber-list-builder.component.scss'], + standalone: true, + imports: [NgIf, UberListToggleComponent, MatFormField, MatLabel, MatInput, FormsModule, MatIconButton, MatSuffix, MatIcon, MatButton, FaIconComponent, MatCheckbox, FaStackComponent, FaStackItemSizeDirective, SignedOnLoadingIconComponent, SortIndicatorComponent, NgFor, MatTooltip, UberPursuitCheckComponent, MilestoneCheckComponent, SignInRequiredComponent, MatProgressSpinner, AsyncPipe] }) export class UberListBuilderComponent extends ChildComponent { diff --git a/src/app/uber-list/uber-list-parent/uber-list-parent.component.ts b/src/app/uber-list/uber-list-parent/uber-list-parent.component.ts index 381e22659..3fb66eb19 100644 --- a/src/app/uber-list/uber-list-parent/uber-list-parent.component.ts +++ b/src/app/uber-list/uber-list-parent/uber-list-parent.component.ts @@ -2,12 +2,20 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { SignedOnUserService } from '@app/service/signed-on-user.service'; import { UberListStateService } from '../uber-list-state.service'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs'; +import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { SignInRequiredComponent } from '../../shared/sign-in-required/sign-in-required.component'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-uber-list-parent', - templateUrl: './uber-list-parent.component.html', - styleUrls: ['./uber-list-parent.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-uber-list-parent', + templateUrl: './uber-list-parent.component.html', + styleUrls: ['./uber-list-parent.component.scss'], + standalone: true, + imports: [NgIf, MatTabNav, MatTabLink, RouterLink, RouterLinkActive, FaIconComponent, MatTabNavPanel, RouterOutlet, SignInRequiredComponent, MatProgressSpinner, AsyncPipe] }) export class UberListParentComponent implements OnInit { diff --git a/src/app/uber-list/uber-list-toggle/uber-list-toggle.component.ts b/src/app/uber-list/uber-list-toggle/uber-list-toggle.component.ts index 257f19eb6..a4a30d42e 100644 --- a/src/app/uber-list/uber-list-toggle/uber-list-toggle.component.ts +++ b/src/app/uber-list/uber-list-toggle/uber-list-toggle.component.ts @@ -3,6 +3,10 @@ import { IconService } from '@app/service/icon.service'; import { IconDefinition } from '@fortawesome/free-brands-svg-icons'; import { BehaviorSubject } from 'rxjs'; import { MilestoneRow, PursuitRow } from '../uber-list-state.service'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatButton, MatIconButton } from '@angular/material/button'; +import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; export function generateUberState(config: UberToggleConfig, choices: UberChoice[]): UberToggleState { @@ -16,10 +20,12 @@ export function generateUberState(config: UberToggleConfig, choices: UberChoice[ @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-uber-list-toggle', - templateUrl: './uber-list-toggle.component.html', - styleUrls: ['./uber-list-toggle.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-uber-list-toggle', + templateUrl: './uber-list-toggle.component.html', + styleUrls: ['./uber-list-toggle.component.scss'], + standalone: true, + imports: [NgIf, MatButton, MatMenuTrigger, FaIconComponent, MatMenu, MatMenuItem, NgFor, MatIconButton, AsyncPipe] }) export class UberListToggleComponent { @Input() state$!: BehaviorSubject; diff --git a/src/app/uber-list/uber-list-view/uber-list-view.component.ts b/src/app/uber-list/uber-list-view/uber-list-view.component.ts index c16289cd0..3976fdf11 100644 --- a/src/app/uber-list/uber-list-view/uber-list-view.component.ts +++ b/src/app/uber-list/uber-list-view/uber-list-view.component.ts @@ -5,13 +5,26 @@ import { SignedOnUserService } from '@app/service/signed-on-user.service'; import { ChildComponent } from '@app/shared/child.component'; import { MilestoneRow, PursuitRow, UberListStateService } from '../uber-list-state.service'; import { UberRowDialogComponent } from '../uber-row-dialog/uber-row-dialog.component'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatButtonToggleGroup, MatButtonToggle } from '@angular/material/button-toggle'; +import { MatButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { FormsModule } from '@angular/forms'; +import { SignedOnLoadingIconComponent } from '../../shared/signed-on-loading-icon/signed-on-loading-icon.component'; +import { SortIndicatorComponent } from '../../shared/sort-indicator/sort-indicator.component'; +import { MatTooltip } from '@angular/material/tooltip'; +import { UberPursuitCheckComponent } from '../uber-pursuit-check/uber-pursuit-check.component'; +import { MilestoneCheckComponent } from '../../shared/milestone-check/milestone-check.component'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-uber-list-view', - templateUrl: './uber-list-view.component.html', - styleUrls: ['./uber-list-view.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-uber-list-view', + templateUrl: './uber-list-view.component.html', + styleUrls: ['./uber-list-view.component.scss'], + standalone: true, + imports: [NgIf, MatButtonToggleGroup, NgFor, MatButtonToggle, MatButton, FaIconComponent, MatCheckbox, FormsModule, SignedOnLoadingIconComponent, SortIndicatorComponent, MatTooltip, UberPursuitCheckComponent, MilestoneCheckComponent, AsyncPipe] }) export class UberListViewComponent extends ChildComponent { diff --git a/src/app/uber-list/uber-pursuit-check/uber-pursuit-check.component.ts b/src/app/uber-list/uber-pursuit-check/uber-pursuit-check.component.ts index ba9095b43..860bedd13 100644 --- a/src/app/uber-list/uber-pursuit-check/uber-pursuit-check.component.ts +++ b/src/app/uber-list/uber-pursuit-check/uber-pursuit-check.component.ts @@ -1,12 +1,20 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { IconService } from '@app/service/icon.service'; import { PursuitTuple } from '@app/service/model'; +import { NgIf, DecimalPipe } from '@angular/common'; +import { MatIcon } from '@angular/material/icon'; +import { MatProgressBar } from '@angular/material/progress-bar'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatTooltip } from '@angular/material/tooltip'; +import { AgoHumanizedPipe } from '../../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-uber-pursuit-check', - templateUrl: './uber-pursuit-check.component.html', - styleUrls: ['./uber-pursuit-check.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-uber-pursuit-check', + templateUrl: './uber-pursuit-check.component.html', + styleUrls: ['./uber-pursuit-check.component.scss'], + standalone: true, + imports: [NgIf, MatIcon, MatProgressBar, FaIconComponent, MatTooltip, DecimalPipe, AgoHumanizedPipe] }) export class UberPursuitCheckComponent { @Input() pursuit!: PursuitTuple; diff --git a/src/app/uber-list/uber-row-dialog/uber-row-dialog.component.ts b/src/app/uber-list/uber-row-dialog/uber-row-dialog.component.ts index 1dc24cca4..439043859 100644 --- a/src/app/uber-list/uber-row-dialog/uber-row-dialog.component.ts +++ b/src/app/uber-list/uber-row-dialog/uber-row-dialog.component.ts @@ -1,17 +1,27 @@ import { Component, Inject } from '@angular/core'; -import { MatDialog, MatDialogConfig, MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatDialog, MatDialogConfig, MatDialogRef, MAT_DIALOG_DATA as MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog'; import { QuestDialogComponent } from '@app/player/pursuits/pursuit-list/quest-dialog/quest-dialog.component'; import { IconService } from '@app/service/icon.service'; import { Questline } from '@app/service/model'; import { SignedOnUserService } from '@app/service/signed-on-user.service'; import { ChildComponent } from '@app/shared/child.component'; import { MilestoneRow, PursuitRow, UberListStateService } from '../uber-list-state.service'; +import { NgIf, NgFor, AsyncPipe, DecimalPipe } from '@angular/common'; +import { CdkScrollable } from '@angular/cdk/scrolling'; +import { MatTabGroup, MatTab } from '@angular/material/tabs'; +import { MilestoneCheckComponent } from '../../shared/milestone-check/milestone-check.component'; +import { MatProgressBar } from '@angular/material/progress-bar'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { MatAnchor } from '@angular/material/button'; +import { AgoHumanizedPipe } from '../../shared/pipe/timing.pipe'; @Component({ - selector: 'd2c-uber-row-dialog', - templateUrl: './uber-row-dialog.component.html', - styleUrls: ['./uber-row-dialog.component.scss'] + selector: 'd2c-uber-row-dialog', + templateUrl: './uber-row-dialog.component.html', + styleUrls: ['./uber-row-dialog.component.scss'], + standalone: true, + imports: [NgIf, MatDialogTitle, CdkScrollable, MatDialogContent, NgFor, MatTabGroup, MatTab, MilestoneCheckComponent, MatProgressBar, FaIconComponent, MatAnchor, AsyncPipe, DecimalPipe, AgoHumanizedPipe] }) export class UberRowDialogComponent extends ChildComponent { diff --git a/src/app/util/destroyable.ts b/src/app/util/destroyable.ts deleted file mode 100644 index a558ebf59..000000000 --- a/src/app/util/destroyable.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Directive, OnDestroy } from '@angular/core'; -import { Subject } from 'rxjs'; - -@Directive() - -export abstract class Destroyable implements OnDestroy { - - protected readonly destroy$: Subject = new Subject(); - - ngOnDestroy() { - this.destroy$.next(); - this.destroy$.complete(); - } - -} diff --git a/src/app/vendors/vendors-container/vendors-container.component.ts b/src/app/vendors/vendors-container/vendors-container.component.ts index 314c57d2c..16c52c463 100644 --- a/src/app/vendors/vendors-container/vendors-container.component.ts +++ b/src/app/vendors/vendors-container/vendors-container.component.ts @@ -6,12 +6,18 @@ import { ChildComponent } from '@app/shared/child.component'; import { BehaviorSubject, combineLatest } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { VendorsComponent } from '../vendors/vendors.component'; +import { SignInRequiredComponent } from '../../shared/sign-in-required/sign-in-required.component'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-vendors-container', - templateUrl: './vendors-container.component.html', - styleUrls: ['./vendors-container.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-vendors-container', + templateUrl: './vendors-container.component.html', + styleUrls: ['./vendors-container.component.scss'], + standalone: true, + imports: [NgIf, VendorsComponent, SignInRequiredComponent, MatProgressSpinner, AsyncPipe] }) export class VendorsContainerComponent extends ChildComponent implements OnInit { public charId$ = new BehaviorSubject(null); diff --git a/src/app/vendors/vendors/vendors.component.ts b/src/app/vendors/vendors/vendors.component.ts index 14cee82e1..b8fac3a8e 100644 --- a/src/app/vendors/vendors/vendors.component.ts +++ b/src/app/vendors/vendors/vendors.component.ts @@ -6,12 +6,29 @@ import { IconDefinition } from '@fortawesome/pro-solid-svg-icons'; import { BehaviorSubject, combineLatest, fromEvent } from 'rxjs'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { MatIconButton } from '@angular/material/button'; +import { FaIconComponent } from '@fortawesome/angular-fontawesome'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { MatButtonToggleGroup, MatButtonToggle } from '@angular/material/button-toggle'; +import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field'; +import { MatInput } from '@angular/material/input'; +import { FormsModule } from '@angular/forms'; +import { MatIcon } from '@angular/material/icon'; +import { MatCheckbox } from '@angular/material/checkbox'; +import { SignedOnLoadingIconComponent } from '../../shared/signed-on-loading-icon/signed-on-loading-icon.component'; +import { MatTooltip } from '@angular/material/tooltip'; +import { ItemIconComponent } from '../../shared/item-icon/item-icon.component'; +import { GodRollItemComponent } from '../../gear/god-roll-item/god-roll-item.component'; +import { GodRollPlugComponent } from '../../gear/god-roll-plug/god-roll-plug.component'; +import { AgoHumanizedPipe } from '../../shared/pipe/timing.pipe'; @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, - selector: 'd2c-vendors', - templateUrl: './vendors.component.html', - styleUrls: ['./vendors.component.scss'] + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'd2c-vendors', + templateUrl: './vendors.component.html', + styleUrls: ['./vendors.component.scss'], + standalone: true, + imports: [MatIconButton, FaIconComponent, NgIf, MatButtonToggleGroup, NgFor, MatButtonToggle, MatFormField, MatLabel, MatInput, FormsModule, MatSuffix, MatIcon, MatCheckbox, SignedOnLoadingIconComponent, MatTooltip, ItemIconComponent, GodRollItemComponent, GodRollPlugComponent, AsyncPipe, AgoHumanizedPipe] }) export class VendorsComponent implements OnInit { private destroyRef = inject(DestroyRef); diff --git a/src/main.ts b/src/main.ts index a9ca1caf8..5df354718 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,11 +1,27 @@ import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app/app.module'; import { environment } from './environments/environment'; +import { LoggedInGuard } from './app/guards/logged-in.guard'; +import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; +import { provideAnimations } from '@angular/platform-browser/animations'; +import { bootstrapApplication } from '@angular/platform-browser'; +import { provideRouter } from '@angular/router'; +import { provideServiceWorker } from '@angular/service-worker'; +import { AppComponent } from './app/app.component'; +import { appRoutes, ManifestLoadedGuard, MyInfoGuard } from './app/app.routes'; if (environment.production) { enableProdMode(); } -platformBrowserDynamic().bootstrapModule(AppModule); +bootstrapApplication(AppComponent, { + providers: [ + provideRouter(appRoutes), + provideServiceWorker('ngsw-worker.js', { enabled: environment.production }), + LoggedInGuard, + ManifestLoadedGuard, + MyInfoGuard, + provideHttpClient(withInterceptorsFromDi()), + provideAnimations() + ] +}); From 983cb44c8bf35a1397335f5d3a3c035e08ddd3ad Mon Sep 17 00:00:00 2001 From: dcaslin Date: Sun, 5 Apr 2026 10:56:51 -0400 Subject: [PATCH 2/2] Bump package lock --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9d42f0e4e..c1ceb9e2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "d2-checklist", - "version": "29.1.0", + "version": "29.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "d2-checklist", - "version": "29.1.0", + "version": "29.2.0", "license": "MIT", "dependencies": { "@angular/animations": "^18.2.14",