Update to angular 19

This commit is contained in:
2026-08-05 07:46:07 +02:00
parent 8bd323db91
commit 5e44c88cd3
133 changed files with 4671 additions and 2456 deletions
@@ -10,6 +10,7 @@ import { last } from '../../../common/utils';
import { faCog } from '../../../client/icons';
@Component({
standalone: false,
selector: 'action-bar',
templateUrl: 'action-bar.pug',
styleUrls: ['action-bar.scss'],
@@ -5,6 +5,7 @@ import { drawAction } from '../../../client/buttonActions';
import { removeItem } from '../../../common/utils';
@Component({
standalone: false,
selector: 'action-button',
templateUrl: 'action-button.pug',
styleUrls: ['action-button.scss'],
@@ -23,6 +23,7 @@ function eyeSprite(e: PonyEye | undefined) {
}
@Component({
standalone: false,
selector: 'actions-modal',
templateUrl: 'actions-modal.pug',
styleUrls: ['actions-modal.scss'],
@@ -2,6 +2,7 @@ import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from
import { parseColor, colorToCSS } from '../../../common/color';
@Component({
standalone: false,
selector: 'bitmap-box',
templateUrl: 'bitmap-box.pug',
styleUrls: ['bitmap-box.scss'],
@@ -10,6 +10,7 @@ export interface ButtMarkEditorState {
}
@Component({
standalone: false,
selector: 'butt-mark-editor',
templateUrl: 'butt-mark-editor.pug',
})
@@ -43,6 +43,7 @@ function comparePonies(a: PonyObject, b: PonyObject) {
}
@Component({
standalone: false,
selector: 'character-list',
templateUrl: 'character-list.pug',
styleUrls: ['character-list.scss'],
@@ -21,6 +21,7 @@ const DEFAULT_STATE = defaultPonyState();
const DEFAULT_OPTIONS = defaultDrawPonyOptions();
@Component({
standalone: false,
selector: 'character-preview',
template: '<canvas class="rounded" #canvas></canvas>',
styles: [`:host { display: block; } canvas { width: 100%; height: 100%; }`],
@@ -12,6 +12,7 @@ import { delay } from '../../../common/utils';
import { isMobile } from '../../../client/data';
@Component({
standalone: false,
selector: 'character-select',
templateUrl: 'character-select.pug',
styleUrls: ['character-select.scss'],
@@ -39,6 +39,7 @@ function isActionCommand(message: string) {
}
@Component({
standalone: false,
selector: 'chat-box',
templateUrl: 'chat-box.pug',
styleUrls: ['chat-box.scss'],
@@ -208,6 +208,7 @@ function findUserIndex(users: IndexEntryUser[], id: number, crc: number | undefi
}
@Component({
standalone: false,
selector: 'chat-log',
templateUrl: 'chat-log.pug',
styleUrls: ['chat-log.scss'],
@@ -2,6 +2,7 @@ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from
import { faCheck } from '../../../client/icons';
@Component({
standalone: false,
selector: 'check-box',
templateUrl: 'check-box.pug',
styleUrls: ['check-box.scss'],
@@ -7,6 +7,7 @@ import { faChevronDown } from '../../../client/icons';
const SIZE = 175;
@Component({
standalone: false,
selector: 'color-picker',
templateUrl: 'color-picker.pug',
styleUrls: ['color-picker.scss'],
@@ -2,6 +2,7 @@ import { Component, ChangeDetectionStrategy, Output, Input, EventEmitter } from
import { uniqueId } from 'lodash';
@Component({
standalone: false,
selector: 'custom-checkbox',
templateUrl: 'custom-checkbox.pug',
styleUrls: ['custom-checkbox.scss'],
@@ -4,6 +4,7 @@ import { MONTH_NAMES_EN } from '../../../common/constants';
import { getLocale } from '../../../client/clientUtils';
@Component({
standalone: false,
selector: 'date-picker',
templateUrl: 'date-picker.pug',
})
@@ -1,6 +1,7 @@
import { Directive, AfterViewInit, ElementRef } from '@angular/core';
@Directive({
standalone: false,
selector: '[agAutoFocus]'
})
export class AgAutoFocus implements AfterViewInit {
@@ -123,7 +123,7 @@ export function handleDrag(element: HTMLElement, emit: (event: AgDragEvent) => v
return () => handlers.forEach(f => f());
}
@Directive({ selector: '[agDrag]' })
@Directive({ standalone: false, selector: '[agDrag]' })
export class AgDrag implements OnInit, OnDestroy {
@Input('agDragRelative') relative: 'self' | 'parent' | undefined = undefined;
@Input('agDragPrevent') prevent = false;
@@ -1,6 +1,7 @@
import { Directive, OnInit, ElementRef } from '@angular/core';
@Directive({
standalone: false,
selector: 'a[href]'
})
export class Anchor implements OnInit {
@@ -2,6 +2,7 @@ import { Directive, Input, Optional } from '@angular/core';
import { NgModel } from '@angular/forms';
@Directive({
standalone: false,
selector: '[btnHighlight]',
host: {
'[class.btn-default]': '!on',
@@ -19,6 +20,7 @@ export class BtnHighlight {
}
@Directive({
standalone: false,
selector: '[btnHighlightDanger]',
host: {
'[class.btn-default]': '!btnHighlightDanger',
@@ -76,6 +76,7 @@ export class DraggableService {
}
@Component({
standalone: false,
selector: 'draggable-outlet',
template: `<div></div>`,
styles: [`:host { position: fixed; top: 0; left: 0; z-index: 10000; }`],
@@ -86,7 +87,7 @@ export class DraggableOutlet {
}
}
@Directive({ selector: '[draggableDrop]' })
@Directive({ standalone: false, selector: '[draggableDrop]' })
export class DraggableDrop<T> implements OnInit, OnDestroy {
@Input('draggablePad') pad = 0;
@Output('draggableDrop') drop = new EventEmitter<T>();
@@ -119,6 +120,7 @@ export class DraggableDrop<T> implements OnInit, OnDestroy {
}
@Directive({
standalone: false,
selector: '[draggableItem]',
host: {
'[style.touch-action]': `touchAction`,
@@ -12,6 +12,7 @@ export class DropdownOutletService {
}
@Component({
standalone: false,
selector: 'dropdown-outlet',
template: `<ng-template></ng-template>`,
})
@@ -23,6 +24,7 @@ export class DropdownOutlet {
}
@Directive({
standalone: false,
selector: '[dropdownMenu]',
})
export class DropdownMenu {
@@ -108,6 +110,7 @@ export class DropdownMenu {
}
@Directive({
standalone: false,
selector: '[dropdown]',
exportAs: 'ag-dropdown',
host: {
@@ -201,6 +204,7 @@ export class Dropdown {
}
@Directive({
standalone: false,
selector: '[dropdownToggle]',
host: {
'aria-haspopup': 'true',
@@ -1,6 +1,7 @@
import { Directive, ElementRef, Input, HostListener, HostBinding, Output, EventEmitter } from '@angular/core';
@Directive({
standalone: false,
selector: '[fixToTop]',
})
export class FixToTop {
@@ -1,6 +1,7 @@
import { Directive, AfterViewInit, ElementRef } from '@angular/core';
@Directive({
standalone: false,
selector: '[focusTitle]',
host: {
'tabindex': '-1',
@@ -3,6 +3,7 @@ import { isParentOf, focusFirstElement, findFocusableElements } from '../../../c
import { isMobile } from '../../../client/data';
@Directive({
standalone: false,
selector: '[focusTrap]',
})
export class FocusTrap implements OnInit, OnDestroy {
@@ -4,6 +4,7 @@ import { hasFeatureFlag, featureFlagsChanged } from '../../../client/clientUtils
import { Model } from '../../services/model';
@Directive({
standalone: false,
selector: '[hasFeature]',
})
export class HasFeature implements AfterViewInit, OnDestroy {
@@ -3,6 +3,7 @@ import { uniqueId } from 'lodash';
import { findParentElement } from '../../../client/htmlUtils';
@Directive({
standalone: false,
selector: '[labelledBy]',
})
export class LabelledBy implements OnInit {
@@ -2,6 +2,7 @@ import { Directive, HostBinding } from '@angular/core';
import { RouterLinkActive } from '@angular/router';
@Directive({
standalone: false,
selector: '[linkCurrent]',
})
export class LinkCurrent {
@@ -2,6 +2,7 @@ import { Directive, Input, HostBinding } from '@angular/core';
import { getUrl } from '../../../client/rev';
@Directive({
standalone: false,
selector: '[revSrc]',
})
export class RevSrc {
@@ -4,6 +4,7 @@ import { Tabset } from '../tabset/tabset';
import { StorageService } from '../../services/storageService';
@Directive({
standalone: false,
selector: '[saveActiveTab]',
})
export class SaveActiveTab implements OnInit, OnDestroy {
@@ -2,6 +2,7 @@ import { Component } from '@angular/core';
import { discordLink } from '../../../client/data';
@Component({
standalone: false,
selector: 'discord-button',
templateUrl: 'discord-button.pug',
styleUrls: ['discord-button.scss'],
@@ -25,6 +25,7 @@ const DERP: Expression = {
};
@Component({
standalone: false,
selector: 'discord-pony',
templateUrl: 'discord-pony.pug',
})
@@ -5,6 +5,7 @@ import { getCharacterSprite } from '../../../graphics/spriteFont';
import { loadAndInitSpriteSheets } from '../../../client/loadSprites';
@Component({
standalone: false,
selector: 'emote-box',
template: '<img #image class="emote-box pixelart" />',
styles: ['.emote-box { pointer-events: none; }'],
@@ -2,6 +2,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
import { faLock } from '../../../client/icons';
@Component({
standalone: false,
selector: 'fill-outline',
templateUrl: 'fill-outline.pug',
styleUrls: ['fill-outline.scss'],
@@ -7,6 +7,7 @@ import { removeItem } from '../../../common/utils';
import { SettingsService } from '../../services/settingsService';
@Component({
standalone: false,
selector: 'friends-box',
templateUrl: 'friends-box.pug',
styleUrls: ['friends-box.scss'],
@@ -4,6 +4,7 @@ import { InstallService } from '../../services/installService';
import { isMobile } from '../../../client/data';
@Component({
standalone: false,
selector: 'install-button',
templateUrl: 'install-button.pug',
styleUrls: ['install-button.scss'],
@@ -7,6 +7,7 @@ import { removeItem } from '../../../common/utils';
import { Model } from '../../services/model';
@Component({
standalone: false,
selector: 'invites-modal',
templateUrl: 'invites-modal.pug',
})
@@ -1,6 +1,7 @@
import { Component, Input } from '@angular/core';
@Component({
standalone: false,
selector: 'kbd-key',
templateUrl: 'kbd-key.pug',
})
@@ -9,6 +9,7 @@ import { SettingsService } from '../../services/settingsService';
import { REQUEST_DATE_OF_BIRTH } from '../../../common/constants';
@Component({
standalone: false,
selector: 'menu-bar',
templateUrl: 'menu-bar.pug',
styleUrls: ['menu-bar.scss'],
@@ -2,6 +2,7 @@ import { Component, Input } from '@angular/core';
import { emptyIcon } from '../../../client/icons';
@Component({
standalone: false,
selector: 'menu-item',
templateUrl: 'menu-item.pug',
styleUrls: ['menu-item.scss'],
@@ -9,6 +9,7 @@ const ageLabels = ['', 'M', 'A', '', '', '[M]', '[A]'];
const ageTitles = ['Not set', 'Minor', 'Adult', '', '', 'Minor (locked)', 'Adult (locked)'];
@Component({
standalone: false,
selector: 'mod-box',
templateUrl: 'mod-box.pug',
styleUrls: ['mod-box.scss'],
@@ -6,6 +6,7 @@ import { faBan } from '../../../client/icons';
import { getPaletteInfo } from '../../../client/pony';
@Component({
standalone: false,
selector: 'notification-item',
templateUrl: 'notification-item.pug',
styleUrls: ['notification-item.scss'],
@@ -5,6 +5,7 @@ import { faEllipsisV } from '../../../client/icons';
const LIMIT = 8;
@Component({
standalone: false,
selector: 'notification-list',
templateUrl: 'notification-list.pug',
styleUrls: ['notification-list.scss'],
@@ -4,6 +4,7 @@ import { Model } from '../../services/model';
import { hardReload } from '../../../client/clientUtils';
@Component({
standalone: false,
selector: 'page-loader',
templateUrl: 'page-loader.pug',
styleUrls: ['page-loader.scss'],
@@ -5,6 +5,7 @@ import { partyLeaderIcon, offlineIcon } from '../../../client/icons';
import { getPaletteInfo } from '../../../client/pony';
@Component({
standalone: false,
selector: 'party-box',
templateUrl: 'party-box.pug',
styleUrls: ['party-box.scss'],
@@ -12,6 +12,7 @@ function visibleMembers(members: PartyMember[], max: number, start: number) {
}
@Component({
standalone: false,
selector: 'party-list',
templateUrl: 'party-list.pug',
styleUrls: ['party-list.scss'],
@@ -1,6 +1,7 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
standalone: false,
name: 'siteName',
})
export class SiteNamePipe implements PipeTransform {
@@ -29,6 +29,7 @@ const ignoredErrors = [
];
@Component({
standalone: false,
selector: 'play-box',
templateUrl: 'play-box.pug',
styleUrls: ['play-box.scss'],
@@ -3,6 +3,7 @@ import { discordLink } from '../../../client/data';
import { GENERAL_RULES } from '../../../common/constants';
@Component({
standalone: false,
selector: 'play-notice',
templateUrl: 'play-notice.pug',
})
@@ -14,6 +14,7 @@ import { isIgnored, isHidden, isFriend } from '../../../common/entityUtils';
import { setFlag } from '../../../common/utils';
@Component({
standalone: false,
selector: 'pony-box',
templateUrl: 'pony-box.pug',
styleUrls: ['pony-box.scss'],
@@ -26,6 +26,7 @@ const options = defaultDrawPonyOptions();
const state = defaultPonyState();
@Component({
standalone: false,
selector: 'portrait-box',
templateUrl: 'portrait-box.pug',
styleUrls: ['portrait-box.scss'],
@@ -2,6 +2,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
import { times } from 'lodash';
@Component({
standalone: false,
selector: 'scale-picker',
templateUrl: 'scale-picker.pug',
})
@@ -7,6 +7,7 @@ const FILLS = ['Orange', 'DodgerBlue', 'LimeGreen', 'Orchid', 'crimson', 'Aquama
const OUTLINES = ['Chocolate', 'SteelBlue', 'ForestGreen', 'DarkOrchid', 'darkred', 'DarkTurquoise'];
@Directive({
standalone: false,
selector: '[setOutlineHidden]',
})
export class SetOutlineHidden {
@@ -14,6 +15,7 @@ export class SetOutlineHidden {
}
@Component({
standalone: false,
selector: 'set-selection',
templateUrl: 'set-selection.pug',
styleUrls: ['set-selection.scss'],
@@ -14,6 +14,7 @@ import { SettingsService } from '../../services/settingsService';
import { Audio } from '../../services/audio';
@Component({
standalone: false,
selector: 'settings-box',
templateUrl: 'settings-box.pug',
styleUrls: ['settings-box.scss'],
@@ -13,6 +13,7 @@ import { faSlidersH, faCommentSlash, faGamepad, faImage, faDownload, faUpload, f
import { saveAs } from 'file-saver';
@Component({
standalone: false,
selector: 'settings-modal',
templateUrl: 'settings-modal.pug',
styleUrls: ['settings-modal.scss'],
@@ -11,6 +11,7 @@ export function getProviderIcon(id: string) {
}
@Component({
standalone: false,
selector: 'sign-in-box',
templateUrl: 'sign-in-box.pug',
styleUrls: ['sign-in-box.scss'],
@@ -4,6 +4,7 @@ import { toSocialSiteInfo } from '../../../client/clientUtils';
import { getProviderIcon } from '../sign-in-box/sign-in-box';
@Component({
standalone: false,
selector: 'site-info',
templateUrl: 'site-info.pug',
styleUrls: ['site-info.scss'],
@@ -1,6 +1,7 @@
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
@Component({
standalone: false,
selector: 'site-links',
templateUrl: 'site-links.pug',
changeDetection: ChangeDetectionStrategy.OnPush,
@@ -6,6 +6,7 @@ import { AgDragEvent } from '../directives/agDrag';
import { Key } from '../../../client/input/input';
@Component({
standalone: false,
selector: 'slider-bar',
templateUrl: 'slider-bar.pug',
styleUrls: ['slider-bar.scss'],
@@ -22,6 +22,7 @@ function drawAll() {
}
@Component({
standalone: false,
selector: 'sprite-box',
templateUrl: 'sprite-box.pug',
styleUrls: ['sprite-box.scss'],
@@ -7,6 +7,7 @@ import { focusElementAfterTimeout } from '../../../client/htmlUtils';
const MAX = 999999;
@Component({
standalone: false,
selector: 'sprite-selection',
templateUrl: 'sprite-selection.pug',
styleUrls: ['sprite-selection.scss'],
@@ -8,6 +8,7 @@ import { Model } from '../../services/model';
// import { SWAP_TIMEOUT, SECOND } from '../../../common/constants';
@Component({
standalone: false,
selector: 'swap-box',
templateUrl: 'swap-box.pug',
styleUrls: ['swap-box.scss'],
@@ -5,6 +5,7 @@ import { uniqueId } from 'lodash';
import { Key } from '../../../client/input/input';
@Directive({
standalone: false,
selector: '[tabTitle]'
})
export class TabTitle {
@@ -13,6 +14,7 @@ export class TabTitle {
}
@Directive({
standalone: false,
selector: '[tabContent]',
})
export class TabContent {
@@ -21,6 +23,7 @@ export class TabContent {
}
@Directive({
standalone: false,
selector: 'tab',
})
export class Tab {
@@ -33,6 +36,7 @@ export class Tab {
}
@Component({
standalone: false,
selector: 'tabset',
templateUrl: 'tabset.pug',
})
@@ -11,6 +11,7 @@ interface Context<T> {
}
@Component({
standalone: false,
selector: 'virtual-list',
template: '<div #padStart></div><ng-content></ng-content><div #padEnd></div>',
styleUrls: ['virtual-list.scss'],
@@ -27,6 +28,7 @@ export class VirtualList {
}
@Directive({
standalone: false,
selector: '[virtualFor][virtualForOf]',
})
export class VirtualFor<T> implements DoCheck, OnDestroy, AfterViewInit {
@@ -1,6 +1,7 @@
import { Component } from '@angular/core';
@Component({
standalone: false,
selector: 'visit-pt-button',
templateUrl: 'visit-pt-button.pug',
styleUrls: ['visit-pt-button.scss'],
@@ -24,6 +24,7 @@ const EXCITED: Expression = {
const MENO = 'DBWIzP8imd08//D19fVazSjcwf1GhLNEiMxENSovLy/NsIdJQDnGqYBiSztWQTM6LychEnE/KRX///9WPeE1HbSpBUEIIASwgEIAAAAAbIAgCFMY34AHAAjwgCMRQCVLY38IDhAAwmFBz4fAIxjKM6SjGlaxjWtYgjGI';
@Component({
standalone: false,
selector: 'visit-pt-pony',
templateUrl: 'visit-pt-pony.pug',
})