1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-05 23:53:21 +00:00

Angular 15 (#326)

* Install Angular CLI

* Core setup and cleanup

* TypeScript and webpack updates

* Angular 13

* Add JS lib to Angular workspace

* Do not use JS library with workspace

* Angular 14

* Angular 15

* Code fixes

* Couple package bumps

* Restore angularCompilerOptions

* Remove property reference to users inside group that didn't exist
This commit is contained in:
Matt Bishop
2023-06-02 11:42:01 -04:00
committed by GitHub
parent 83d527a83e
commit 0ddf81f644
8 changed files with 5259 additions and 1339 deletions

46
.gitignore vendored
View File

@@ -1,17 +1,39 @@
.vs
.idea
# General
.DS_Store
Thumbs.db
# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# Node
node_modules
npm-debug.log
vwd.webinfo
dist/
dist-cli/
css/
# Build directories
dist
build
.angular/cache
# Testing
coverage
junit.xml
# Misc
*.crx
*.pem
build-cli/
build/
yarn-error.log
.DS_Store
*.nupkg
*.zip
*.provisionprofile
*.env

35
angular.json Normal file
View File

@@ -0,0 +1,35 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "apps",
"cli": {
"analytics": false
},
"projects": {
"app": {
"projectType": "application",
"schematics": {
"@schematics/angular:application": {
"strict": true
}
},
"root": ".",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "tsconfig.json",
"assets": [],
"styles": [],
"scripts": []
}
}
}
}
}
}

View File

@@ -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);
}
}

6436
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -64,9 +64,9 @@
"prepare": "husky install"
},
"devDependencies": {
"@angular/compiler-cli": "12.2.16",
"@angular/compiler-cli": "15.2.9",
"@microsoft/microsoft-graph-types": "1.41.0",
"@ngtools/webpack": "12.2.17",
"@ngtools/webpack": "15.2.8",
"@types/inquirer": "8.2.1",
"@types/ldapjs": "1.0.11",
"@types/lowdb": "1.0.11",
@@ -82,7 +82,7 @@
"@typescript-eslint/parser": "5.21.0",
"clean-webpack-plugin": "4.0.0",
"concurrently": "6.5.1",
"copy-webpack-plugin": "10.2.4",
"copy-webpack-plugin": "11.0.0",
"cross-env": "7.0.3",
"css-loader": "6.7.1",
"electron": "18.3.7",
@@ -111,23 +111,24 @@
"sass-loader": "12.6.0",
"tapable": "1.1.3",
"ts-loader": "9.3.0",
"tsconfig-paths-webpack-plugin": "3.5.2",
"typescript": "4.3.5",
"webpack": "5.76.0",
"webpack-cli": "4.9.2",
"tsconfig-paths-webpack-plugin": "4.0.1",
"typescript": "4.9.5",
"webpack": "5.83.1",
"webpack-cli": "5.1.1",
"webpack-merge": "5.8.0",
"webpack-node-externals": "3.0.0"
},
"dependencies": {
"@angular/animations": "12.2.16",
"@angular/cdk": "12.2.13",
"@angular/common": "12.2.16",
"@angular/compiler": "12.2.16",
"@angular/core": "12.2.16",
"@angular/forms": "12.2.16",
"@angular/platform-browser": "12.2.16",
"@angular/platform-browser-dynamic": "12.2.16",
"@angular/router": "12.2.16",
"@angular/animations": "15.2.9",
"@angular/cdk": "15.2.9",
"@angular/cli": "15.2.8",
"@angular/common": "15.2.9",
"@angular/compiler": "15.2.9",
"@angular/core": "15.2.9",
"@angular/forms": "15.2.9",
"@angular/platform-browser": "15.2.9",
"@angular/platform-browser-dynamic": "15.2.9",
"@angular/router": "15.2.9",
"@bitwarden/jslib-angular": "file:jslib/angular",
"@microsoft/microsoft-graph-client": "2.2.1",
"@microsoft/signalr": "5.0.10",
@@ -147,8 +148,8 @@
"ldapjs": "2.3.1",
"lowdb": "1.0.0",
"lunr": "2.3.9",
"ngx-toastr": "14.1.4",
"node-fetch": "2.6.7",
"ngx-toastr": "16.2.0",
"node-fetch": "2.6.11",
"node-forge": "1.3.1",
"open": "8.4.0",
"papaparse": "5.3.2",

View File

@@ -1,5 +1,5 @@
import "core-js/stable";
import "zone.js/dist/zone";
import "zone.js";
import { NgModule } from "@angular/core";
import { FormsModule } from "@angular/forms";

View File

@@ -95,11 +95,6 @@
<li *ngFor="let g of simGroups" title="{{ g.referenceId }}">
<i class="bwi bwi-li bwi-sitemap"></i>
{{ g.displayName }}
<ul class="small" *ngIf="g.users && g.users.length">
<li *ngFor="let u of g.users" title="{{ u.referenceId }}">
{{ u.displayName }}
</li>
</ul>
</li>
</ul>
<p *ngIf="!simGroups || !simGroups.length">{{ "noGroups" | i18n }}</p>

View File

@@ -1,26 +1,31 @@
{
"angularCompilerOptions": {
"strictTemplates": true,
"preserveWhitespaces": true
},
"compilerOptions": {
"pretty": true,
"moduleResolution": "node",
"noImplicitAny": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "es6",
"target": "ES2016",
"allowJs": true,
"module": "ES2020",
"lib": ["es5", "es6", "es7", "dom"],
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"types": [],
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"declaration": false,
"outDir": "dist",
"baseUrl": ".",
"resolveJsonModule": true,
"paths": {
"tldjs": ["jslib/src/misc/tldjs.noop"],
"jslib-common/*": ["jslib/common/src/*"],
"jslib-angular/*": ["jslib/angular/src/*"],
"jslib-electron/*": ["jslib/electron/src/*"],
"jslib-node/*": ["jslib/node/src/*"]
}
},
"angularCompilerOptions": {
"preserveWhitespaces": true
},
"useDefineForClassFields": false
},
"include": ["src", "src-cli"]
}