[PM-1415] [BEEEP] Angular 15 (#4719)
* Upgrade Angular to 15 * Remove attr.allow for webauthn
This commit is contained in:
parent
4548defc49
commit
23c4d45285
|
@ -87,7 +87,7 @@
|
|||
</ng-container>
|
||||
<ng-container *ngIf="selectedProviderType === providerType.WebAuthn && !webAuthnNewTab">
|
||||
<div id="web-authn-frame">
|
||||
<iframe id="webauthn_iframe" [attr.allow]="webAuthnAllow"></iframe>
|
||||
<iframe id="webauthn_iframe"></iframe>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-content">
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
import "core-js/stable";
|
||||
import "date-input-polyfill";
|
||||
import "zone.js/dist/zone";
|
||||
import "zone.js";
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
"paths": {
|
||||
"@bitwarden/common/*": ["../../libs/common/src/*"],
|
||||
"@bitwarden/angular/*": ["../../libs/angular/src/*"]
|
||||
}
|
||||
},
|
||||
"useDefineForClassFields": false
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"strictTemplates": true,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import "zone.js/dist/zone";
|
||||
import "zone.js";
|
||||
|
||||
// Register the locales for the application
|
||||
import "./locales";
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
</ng-container>
|
||||
<ng-container *ngIf="selectedProviderType === providerType.WebAuthn">
|
||||
<div id="web-authn-frame">
|
||||
<iframe id="webauthn_iframe" [attr.allow]="webAuthnAllow"></iframe>
|
||||
<iframe id="webauthn_iframe"></iframe>
|
||||
</div>
|
||||
<div class="box first">
|
||||
<div class="box-content">
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
"paths": {
|
||||
"@bitwarden/common/*": ["../../libs/common/src/*"],
|
||||
"@bitwarden/angular/*": ["../../libs/angular/src/*"]
|
||||
}
|
||||
},
|
||||
"useDefineForClassFields": false
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"strictTemplates": true,
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
</ng-container>
|
||||
<ng-container *ngIf="selectedProviderType === providerType.WebAuthn">
|
||||
<div id="web-authn-frame" class="mb-3">
|
||||
<iframe id="webauthn_iframe" [attr.allow]="webAuthnAllow"></iframe>
|
||||
<iframe id="webauthn_iframe"></iframe>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container
|
||||
|
|
|
@ -41,10 +41,6 @@ export class TwoFactorComponent extends CaptchaProtectedComponent implements OnI
|
|||
onSuccessfulLogin: () => Promise<any>;
|
||||
onSuccessfulLoginNavigate: () => Promise<any>;
|
||||
|
||||
get webAuthnAllow(): string {
|
||||
return `publickey-credentials-get ${this.environmentService.getWebVaultUrl()}`;
|
||||
}
|
||||
|
||||
protected loginRoute = "login";
|
||||
protected successRoute = "vault";
|
||||
|
||||
|
|
|
@ -1,10 +1,18 @@
|
|||
import { InjectFlags, InjectionToken, Injector, Type } from "@angular/core";
|
||||
import { InjectFlags, InjectOptions, Injector, ProviderToken } from "@angular/core";
|
||||
|
||||
export class ModalInjector implements Injector {
|
||||
constructor(private _parentInjector: Injector, private _additionalTokens: WeakMap<any, any>) {}
|
||||
|
||||
get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
||||
get(token: any, notFoundValue?: any, flags?: any) {
|
||||
get<T>(
|
||||
token: ProviderToken<T>,
|
||||
notFoundValue: undefined,
|
||||
options: InjectOptions & { optional?: false }
|
||||
): T;
|
||||
get<T>(token: ProviderToken<T>, notFoundValue: null, options: InjectOptions): T;
|
||||
get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions | InjectFlags): T;
|
||||
get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
||||
get(token: any, notFoundValue?: any): any;
|
||||
get(token: any, notFoundValue?: any, flags?: any): any {
|
||||
return this._additionalTokens.get(token) ?? this._parentInjector.get<any>(token, notFoundValue);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2901,7 +2901,7 @@ function withPrototypeForArrayMembers<T>(
|
|||
value: function (...args: any[]) {
|
||||
const originalResult: Promise<any[]> = originalMethod.apply(this, args);
|
||||
|
||||
if (!(originalResult instanceof Promise)) {
|
||||
if (!Utils.isPromise(originalResult)) {
|
||||
throw new Error(
|
||||
`Error applying prototype to stored value -- result is not a promise for method ${String(
|
||||
propertyKey
|
||||
|
@ -2949,7 +2949,7 @@ function withPrototypeForObjectValues<T>(
|
|||
value: function (...args: any[]) {
|
||||
const originalResult: Promise<{ [key: string]: T }> = originalMethod.apply(this, args);
|
||||
|
||||
if (!(originalResult instanceof Promise)) {
|
||||
if (!Utils.isPromise(originalResult)) {
|
||||
throw new Error(
|
||||
`Error applying prototype to stored value -- result is not a promise for method ${String(
|
||||
propertyKey
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
|
||||
# For the full list of supported browsers by the Angular framework, please see:
|
||||
# https://angular.io/guide/browser-support
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
last 1 Chrome version
|
||||
last 1 Firefox version
|
||||
last 2 Edge major versions
|
||||
last 2 Safari major versions
|
||||
last 2 iOS major versions
|
||||
Firefox ESR
|
|
@ -3,6 +3,7 @@ import {
|
|||
Component,
|
||||
ContentChildren,
|
||||
EventEmitter,
|
||||
forwardRef,
|
||||
Input,
|
||||
Output,
|
||||
QueryList,
|
||||
|
@ -16,7 +17,7 @@ import { NavItemComponent } from "./nav-item.component";
|
|||
templateUrl: "./nav-group.component.html",
|
||||
})
|
||||
export class NavGroupComponent extends NavBaseComponent implements AfterContentInit {
|
||||
@ContentChildren(NavGroupComponent, {
|
||||
@ContentChildren(forwardRef(() => NavGroupComponent), {
|
||||
descendants: true,
|
||||
})
|
||||
nestedGroups!: QueryList<NavGroupComponent>;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
>
|
||||
<div
|
||||
#slotStart
|
||||
class="[&>*:focus-visible::before]:!tw-ring-text-alt2 [&>*]:!tw-text-alt2 [&>*:hover]:!tw-border-text-alt2"
|
||||
class="[&>*:focus-visible::before]:!tw-ring-text-alt2 [&>*:hover]:!tw-border-text-alt2 [&>*]:!tw-text-alt2"
|
||||
>
|
||||
<ng-content select="[slot-start]"></ng-content>
|
||||
</div>
|
||||
|
@ -73,7 +73,7 @@
|
|||
</ng-template>
|
||||
|
||||
<div
|
||||
class="tw-flex tw-gap-1 [&>*:focus-visible::before]:!tw-ring-text-alt2 [&>*]:!tw-text-alt2 [&>*:hover]:!tw-border-text-alt2"
|
||||
class="tw-flex tw-gap-1 [&>*:focus-visible::before]:!tw-ring-text-alt2 [&>*:hover]:!tw-border-text-alt2 [&>*]:!tw-text-alt2"
|
||||
>
|
||||
<ng-content select="[slot-end]"></ng-content>
|
||||
</div>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
79
package.json
79
package.json
|
@ -33,23 +33,23 @@
|
|||
"libs/*"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^14.0.6",
|
||||
"@angular-eslint/eslint-plugin": "^14.1.2",
|
||||
"@angular-eslint/eslint-plugin-template": "^14.1.2",
|
||||
"@angular-eslint/template-parser": "^14.1.2",
|
||||
"@angular/cli": "^14.0.6",
|
||||
"@angular/compiler-cli": "^14.0.6",
|
||||
"@angular/elements": "^14.0.6",
|
||||
"@angular-devkit/build-angular": "^15.2.2",
|
||||
"@angular-eslint/eslint-plugin": "^15.2.1",
|
||||
"@angular-eslint/eslint-plugin-template": "^15.2.1",
|
||||
"@angular-eslint/template-parser": "^15.2.1",
|
||||
"@angular/cli": "^15.2.2",
|
||||
"@angular/compiler-cli": "^15.2.2",
|
||||
"@angular/elements": "^15.2.2",
|
||||
"@compodoc/compodoc": "^1.1.19",
|
||||
"@fluffy-spoon/substitute": "^1.208.0",
|
||||
"@ngtools/webpack": "^14.0.6",
|
||||
"@storybook/addon-a11y": "^6.5.7",
|
||||
"@storybook/addon-actions": "^6.5.7",
|
||||
"@storybook/addon-essentials": "^6.5.7",
|
||||
"@storybook/addon-links": "^6.5.7",
|
||||
"@storybook/angular": "^6.5.7",
|
||||
"@storybook/builder-webpack5": "^6.5.7",
|
||||
"@storybook/manager-webpack5": "^6.5.7",
|
||||
"@ngtools/webpack": "^15.2.2",
|
||||
"@storybook/addon-a11y": "^6.5.16",
|
||||
"@storybook/addon-actions": "^6.5.16",
|
||||
"@storybook/addon-essentials": "^6.5.16",
|
||||
"@storybook/addon-links": "^6.5.16",
|
||||
"@storybook/angular": "^6.5.16",
|
||||
"@storybook/builder-webpack5": "^6.5.16",
|
||||
"@storybook/manager-webpack5": "^6.5.16",
|
||||
"@types/argon2-browser": "^1.18.1",
|
||||
"@types/chrome": "^0.0.190",
|
||||
"@types/duo_web_sdk": "^2.7.1",
|
||||
|
@ -57,15 +57,15 @@
|
|||
"@types/inquirer": "^8.2.1",
|
||||
"@types/jest": "^27.5.0",
|
||||
"@types/jquery": "^3.5.14",
|
||||
"@types/jsdom": "^16.2.14",
|
||||
"@types/jsdom": "^21.1.0",
|
||||
"@types/koa": "^2.13.4",
|
||||
"@types/koa__multer": "^2.0.4",
|
||||
"@types/koa__router": "^8.0.11",
|
||||
"@types/koa-bodyparser": "^4.3.7",
|
||||
"@types/koa-bodyparser": "4.3.7",
|
||||
"@types/koa-json": "^2.0.20",
|
||||
"@types/lowdb": "^1.0.11",
|
||||
"@types/lunr": "^2.3.4",
|
||||
"@types/node": "^16.11.12",
|
||||
"@types/node": "^16.18.14",
|
||||
"@types/node-fetch": "^2.6.1",
|
||||
"@types/node-forge": "^1.0.2",
|
||||
"@types/node-ipc": "^9.2.0",
|
||||
|
@ -73,8 +73,8 @@
|
|||
"@types/proper-lockfile": "^4.1.2",
|
||||
"@types/retry": "^0.12.2",
|
||||
"@types/zxcvbn": "^4.4.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.22.0",
|
||||
"@typescript-eslint/parser": "^5.22.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.51.0",
|
||||
"@typescript-eslint/parser": "^5.51.0",
|
||||
"autoprefixer": "^10.4.7",
|
||||
"base64-loader": "^1.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
|
@ -96,7 +96,7 @@
|
|||
"eslint": "^8.14.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-import-resolver-typescript": "^2.7.1",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-rxjs": "^5.0.2",
|
||||
"eslint-plugin-rxjs-angular": "^2.0.0",
|
||||
"eslint-plugin-tailwindcss": "^3.8.3",
|
||||
|
@ -112,7 +112,7 @@
|
|||
"husky": "^8.0.1",
|
||||
"jest-junit": "^15.0.0",
|
||||
"jest-mock-extended": "2.0.6",
|
||||
"jest-preset-angular": "^12.1.0",
|
||||
"jest-preset-angular": "^12.2.6",
|
||||
"lint-staged": "^13.0.3",
|
||||
"mini-css-extract-plugin": "^2.4.5",
|
||||
"node-ipc": "9.2.1",
|
||||
|
@ -134,7 +134,7 @@
|
|||
"ts-loader": "^9.2.5",
|
||||
"tsconfig-paths-webpack-plugin": "^3.5.2",
|
||||
"type-fest": "^2.18.0",
|
||||
"typescript": "4.6.4",
|
||||
"typescript": "4.9.5",
|
||||
"url": "^0.11.0",
|
||||
"util": "^0.12.4",
|
||||
"wait-on": "^6.0.1",
|
||||
|
@ -144,20 +144,20 @@
|
|||
"webpack-node-externals": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "^14.0.6",
|
||||
"@angular/cdk": "^14.0.4",
|
||||
"@angular/common": "^14.0.6",
|
||||
"@angular/compiler": "^14.0.6",
|
||||
"@angular/core": "^14.0.6",
|
||||
"@angular/forms": "^14.0.6",
|
||||
"@angular/platform-browser": "^14.0.6",
|
||||
"@angular/platform-browser-dynamic": "^14.0.6",
|
||||
"@angular/router": "^14.0.6",
|
||||
"@angular/animations": "^15.2.2",
|
||||
"@angular/cdk": "^15.2.2",
|
||||
"@angular/common": "^15.2.2",
|
||||
"@angular/compiler": "^15.2.2",
|
||||
"@angular/core": "^15.2.2",
|
||||
"@angular/forms": "^15.2.2",
|
||||
"@angular/platform-browser": "^15.2.2",
|
||||
"@angular/platform-browser-dynamic": "^15.2.2",
|
||||
"@angular/router": "^15.2.2",
|
||||
"@koa/multer": "^3.0.0",
|
||||
"@koa/router": "^10.1.1",
|
||||
"@microsoft/signalr": "^6.0.7",
|
||||
"@microsoft/signalr-protocol-msgpack": "^6.0.7",
|
||||
"@ng-select/ng-select": "^9.0.2",
|
||||
"@ng-select/ng-select": "^10.0.3",
|
||||
"argon2": "^0.30.3",
|
||||
"argon2-browser": "^1.18.0",
|
||||
"big-integer": "^1.6.51",
|
||||
|
@ -181,8 +181,8 @@
|
|||
"lowdb": "^1.0.0",
|
||||
"lunr": "^2.3.9",
|
||||
"multer": "^1.4.5-lts.1",
|
||||
"ngx-infinite-scroll": "^14.0.0",
|
||||
"ngx-toastr": "^15.0.0",
|
||||
"ngx-infinite-scroll": "^15.0.0",
|
||||
"ngx-toastr": "^16.0.2",
|
||||
"node-fetch": "^2.6.7",
|
||||
"node-forge": "^1.3.1",
|
||||
"nord": "0.2.1",
|
||||
|
@ -192,15 +192,18 @@
|
|||
"proper-lockfile": "^4.1.2",
|
||||
"qrious": "4.0.2",
|
||||
"rxjs": "^7.5.5",
|
||||
"sweetalert2": "^10.16.6",
|
||||
"sweetalert2": "10.16.9",
|
||||
"tldts": "^5.7.84",
|
||||
"utf-8-validate": "^5.0.9",
|
||||
"zone.js": "^0.11.4",
|
||||
"zone.js": "0.12.0",
|
||||
"zxcvbn": "^4.4.2"
|
||||
},
|
||||
"overrides": {
|
||||
"tailwindcss": "$tailwindcss",
|
||||
"react": "^18.0.0"
|
||||
"react": "^18.0.0",
|
||||
"@storybook/angular": {
|
||||
"zone.js": "$zone.js"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*": "prettier --cache --ignore-unknown --write",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"pretty": true,
|
||||
"moduleResolution": "node",
|
||||
"noImplicitAny": true,
|
||||
"target": "ES6",
|
||||
"target": "ES2016",
|
||||
"module": "ES2020",
|
||||
"lib": ["es5", "es6", "es7", "dom"],
|
||||
"sourceMap": true,
|
||||
|
@ -25,7 +25,8 @@
|
|||
{
|
||||
"transform": "typescript-transform-paths"
|
||||
}
|
||||
]
|
||||
],
|
||||
"useDefineForClassFields": false
|
||||
},
|
||||
"include": ["apps/web/src/**/*", "libs/*/src/**/*", "bitwarden_license/bit-web/src/**/*"],
|
||||
"exclude": ["apps/web/src/**/*.spec.ts", "libs/*/src/**/*.spec.ts"]
|
||||
|
|
Loading…
Reference in New Issue