Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • dad/cines-vitamui
1 result
Show changes
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"pastis": {
"root": "projects/pastis/",
"sourceRoot": "projects/pastis/src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "./extra-webpack.config.js"
},
"outputPath": "../ui-pastis/src/main/resources/public",
"index": "projects/pastis/src/index.html",
"main": "projects/pastis/src/main.ts",
"polyfills": "projects/pastis/src/polyfills.ts",
"tsConfig": "projects/pastis/tsconfig.app.json",
"rebaseRootRelativeCssUrls": true,
"assets": [
"projects/pastis/src/assets",
"projects/pastis/src/favicon.ico",
{
"glob": "**/*",
"input": "node_modules/ui-frontend-common/assets",
"output": "/assets"
}
],
"styles": [
"projects/pastis/src/sass/styles.scss",
"projects/pastis/src/assets/css/_colors.scss"
],
"stylePreprocessorOptions": {
"includePaths": [
"projects/commons/src/sass"
]
},
"scripts": []
},
"configurations": {
"standalone": {
"fileReplacements": [
{
"replace": "projects/pastis/src/environments/environment.ts",
"with": "projects/pastis/src/environments/environment.standalone.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "17mb"
}
]
}
}
},
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"browserTarget": "pastis:build",
"host": "dev.vitamui.com",
"port": 4251
},
"configurations": {
"production": {
"browserTarget": "pastis:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "pastis:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/pastis/src/test.ts",
"polyfills": "projects/pastis/src/polyfills.ts",
"tsConfig": "projects/pastis/tsconfig.spec.json",
"karmaConfig": "projects/pastis/karma.conf.js",
"assets": [
"projects/pastis/src/favicon.ico",
"projects/pastis/src/assets"
],
"styles": [
"projects/pastis/src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/pastis/tsconfig.app.json",
"projects/pastis/tsconfig.spec.json",
"projects/pastis/e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "projects/pastis/e2e/protractor.conf.js",
"devServerTarget": "pastis:serve"
},
"configurations": {
"production": {
"devServerTarget": "pastis:serve:production"
}
}
}
}
}
},
"defaultProject": "pastis",
"cli": {
"analytics": false
}
}
/*
* Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2019-2020)
* and the signatories of the "VITAM - Accord du Contributeur" agreement.
*
* contact@programmevitam.fr
*
* This software is a computer program whose purpose is to implement
* implement a digital archiving front-office system for the secure and
* efficient high volumetry VITAM solution.
*
* This software is governed by the CeCILL-C license under French law and
* abiding by the rules of distribution of free software. You can use,
* modify and/ or redistribute the software under the terms of the CeCILL-C
* license as circulated by CEA, CNRS and INRIA at the following URL
* "http://www.cecill.info".
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
* liability.
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* software by the user in light of its specific status of free software,
* that may mean that it is complicated to manipulate, and that also
* therefore means that it is reserved for developers and experienced
* professionals having in-depth computer knowledge. Users are therefore
* encouraged to load and test the software's suitability as regards their
* requirements in conditions enabling the security of their systems and/or
* data to be ensured and, more generally, to use and operate it in the
* same conditions as regards security.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
export interface AppConfiguration {
THEME_COLORS: any;
}
{
"name": "vitamui-ui",
"version": "1.1.0-SNAPSHOT",
"license": "MIT",
"pki": {
"path": "../../dev-deployment/environments/certs/server/hosts/localhost",
"asset": "reverse"
},
"scripts": {
"ng": "ng",
"ng-high-memory": "node --max_old_space_size=4000 ./node_modules/@angular/cli/bin/ng",
"start": "ng serve --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:en": "ng serve --proxy-config proxy.conf.json --configuration=en --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:demo": "ng serve demo --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:portal": "ng serve portal --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:starter-kit": "ng serve --proxy-config proxy.conf.json starter-kit --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:identity": "ng serve identity --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:pastis": "ng serve pastis --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:referential": "ng serve referential --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:ingest": "ng serve ingest --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"start:archive-search": "ng serve archive-search --proxy-config proxy.conf.json --disable-host-check --ssl --ssl-key $npm_package_pki_path/$npm_package_pki_asset.key --ssl-cert $npm_package_pki_path/$npm_package_pki_asset.crt",
"build": "ng build --configuration=standalone --i18n-locale fr --build-optimizer=false --optimization=false",
"build:prod": "export NODE_OPTIONS=--max_old_space_size=4096; ng build --prod --i18n-locale fr --output-path ../../../target/www",
"build:dev": "ng build --prod --i18n-locale fr --build-optimizer=false --optimization=false",
"build:fr": "ng build --prod --i18n-locale fr --output-path ../../../target/www/fr",
"build:en": "ng build --prod --i18n-file src/locale/messages.en.xlf --i18n-format xlf --i18n-locale en --output-path ../../../target/www/en",
"build:all": "npm run build:fr && npm run build:en",
"build:demo": "ng build demo --prod --i18n-locale fr",
"build:portal": "export NODE_OPTIONS=--max_old_space_size=4096; ng build portal --prod",
"build:identity": "export NODE_OPTIONS=--max_old_space_size=4096; ng build identity --prod --i18n-locale fr",
"build:ingest": "export NODE_OPTIONS=--max_old_space_size=4096; ng build ingest --prod --i18n-locale fr",
"build:archive-search": "export NODE_OPTIONS=--max_old_space_size=4096; ng build archive-search --prod --i18n-locale fr",
"build:referential": "export NODE_OPTIONS=--max_old_space_size=4096; ng build referential --prod --i18n-locale fr",
"build:pastis": "export NODE_OPTIONS=--max_old_space_size=4096; ng build pastis --prod --i18n-locale fr",
"analyze-portal": "ng build portal --stats-json --prod ; webpack-bundle-analyzer dist/portal/stats-es2015.json",
"analyze-identity": "ng build identity --stats-json --prod --i18n-locale fr ; webpack-bundle-analyzer dist/identity/stats-es2015.json",
"analyze-referential": "ng build referential --stats-json --prod --i18n-locale fr ; webpack-bundle-analyzer dist/referential/stats-es2015.json",
"analyze-ingest": "ng build ingest --stats-json --prod --i18n-locale fr ; webpack-bundle-analyzer dist/ingest/stats-es2015.json",
"analyze-archive-search": "ng build archive-search --stats-json --prod --i18n-locale fr ; webpack-bundle-analyzer dist/archive-search/stats-es2015.json",
"test": "ng test --watch=false",
"test:demo": "ng test demo --watch=false",
"test:portal": "ng test portal --watch=false",
"test:identity": "ng test identity --watch=false",
"test:ingest": "ng test ingest --watch=false",
"test:referential": "ng test referential --watch=false",
"test:archive-search": "ng test archive-search --watch=false",
"test:vitamui-library": "ng test vitamui-library --watch=false",
"test:conf-ci": "ng test --watch=false --karma-config=karma.conf.ci.js",
"test:sonar": "ng test --code-coverage --watch=false",
"lint": "ng lint --format=stylish",
"lint:demo": "ng lint demo --format=stylish",
"lint:identity": "ng lint identity --format=stylish",
"lint:ingest": "ng lint ingest --format=stylish",
"lint:portal": "ng lint portal --format=stylish",
"lint:archive-search": "ng lint archive-search --format=stylish",
"lint:referential": "ng lint referential --format=stylish",
"lint:vitamui-library": "ng lint vitamui-library --format=stylish",
"e2e": "ng e2e",
"i18n-extract": "ng xi18n --outputPath=locale --i18n-locale=fr",
"i18n-merge": "xliffmerge --profile xliffmerge.json fr en",
"i18n:identity": "ng xi18n identity --outputPath=src/locale --i18n-locale=fr && xliffmerge --profile projects/identity/xliffmerge.json fr en",
"i18n:ingest": "ng xi18n ingest --outputPath=src/locale --i18n-locale=fr && xliffmerge --profile projects/ingest/xliffmerge.json fr en",
"i18n:archive-search": "ng xi18n archive-search --outputPath=src/locale --i18n-locale=fr && xliffmerge --profile projects/archive-search/xliffmerge.json fr en",
"i18n:referential": "ng xi18n referential --outputPath=src/locale --i18n-locale=fr && xliffmerge --profile projects/referential/xliffmerge.json fr en",
"check:demo": "npm run lint:demo && npm run build:demo",
"check:portal": "npm run lint:portal && npm run test:portal && npm run build:portal",
"check:identity": "npm run lint:identity && npm run test:identity && npm run build:identity",
"extract-translations": "ngx-translate-extract --input ./projects/portal/src --output ./projects/portal/src/assets/i18n/*.json --sort --format namespaced-json --key-as-default-value",
"check:referential": "npm run lint:referential && npm run test:referential && npm run build:referential",
"check:archive-search": "npm run lint:archive-search && npm run test:archive-search && npm run build:archive-search",
"copy-scss:vitamui-library": "cp-cli ./projects/vitamui-library/src/sass ./dist/sass",
"build:vitamui-library": "ng build vitamui-library",
"watch:vitamui-library": "ng build vitamui-library --watch"
},
"private": true,
"dependencies": {
"@angular/animations": "10.1.3",
"@angular/cdk": "^10.1.3",
"@angular/common": "10.1.3",
"@angular/compiler": "10.1.3",
"@angular/core": "10.1.3",
"@angular/forms": "10.1.3",
"@angular/localize": "^10.1.6",
"@angular/material": "^10.1.3",
"@angular/platform-browser": "10.1.3",
"@angular/platform-browser-dynamic": "10.1.3",
"@angular/pwa": "^0.1001.3",
"@angular/router": "10.1.3",
"@angular/service-worker": "10.1.3",
"@babel/compat-data": "^7.8.0",
"@ngx-translate/core": "^12.1.2",
"@ngx-translate/http-loader": "^6.0.0",
"@types/d3": "^3.5.43",
"@types/uuid": "^7.0.0",
"autoprefixer": "^9.7.5",
"bootstrap": "^4.5.0",
"bufferutil": "^4.0.1",
"classlist.js": "^1.1.20150312",
"core-js": "^2.6.11",
"d3": "^3.5.17",
"d3-svg-legend": "^1.13.0",
"flag-icon-css": "^3.5.0",
"generate-schema": "^2.6.0",
"hammerjs": "^2.0.8",
"jquery": "^3.5.1",
"lodash": "^4.17.15",
"material-design-icons": "^3.0.1",
"ng2-date-picker": "^8.0.0",
"ng2-file-upload": "^1.4.0",
"ng2-nvd3": "^2.0.0",
"ng2-tooltip-directive": "^2.9.22",
"ngx-color-picker": "^9.0.0",
"ngx-filesize": "^2.0.2",
"ngx-quicklink": "^0.2.1",
"ngx-toastr": "^11.3.3",
"ngx-translate-multi-http-loader": "^3.0.0",
"ngx-ui-loader": "^10.0.0",
"popper.js": "^1.16.1",
"remove": "^0.1.5",
"rxjs": "^6.5.5",
"serialize-javascript": "^5.0.1",
"tslib": "^2.0.3",
"ui-frontend-common": "file:../ui-frontend-common/ui-frontend-common-2.1.0.tgz",
"underscore": "^1.10.2",
"utf-8-validate": "^5.0.2",
"uuid": "^7.0.2",
"web-animations-js": "^2.3.2",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^8.4.1",
"@angular-devkit/build-angular": "^0.1001.3",
"@angular-devkit/build-ng-packagr": "^0.1001.3",
"@angular/cli": "^10.1.3",
"@angular/compiler-cli": "10.1.3",
"@angular/language-service": "10.1.3",
"@angular/localize": "^10.2.3",
"@biesbjerg/ngx-translate-extract": "^7.0.2",
"@types/jasmine": "~3.3.0",
"@types/jasminewd2": "^2.0.8",
"@types/lodash": "^4.14.156",
"@types/node": "~8.9.1",
"@types/underscore": "^1.10.0",
"codelyzer": "^5.2.2",
"cp-cli": "^2.0.0",
"jasmine-core": "^3.5.0",
"jasmine-marbles": "^0.4.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^5.0.9",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage-istanbul-reporter": "~2.1.1",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"moment-locales-webpack-plugin": "^1.2.0",
"ng-packagr": "^10.1.2",
"ngx-i18nsupport": "^0.17.1",
"ngx-markdown": "8.2.2",
"node-sass": "^4.14.1",
"protractor": "^7.0.0",
"puppeteer": "^1.2.0",
"ts-node": "~7.0.1",
"tsickle": "^0.39.1",
"tslint": "~5.11.0",
"typescript": "~4.0.5",
"webpack-bundle-analyzer": "^3.8.0"
}
}
/*
* Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2019-2020)
* and the signatories of the "VITAM - Accord du Contributeur" agreement.
*
* contact@programmevitam.fr
*
* This software is a computer program whose purpose is to implement
* implement a digital archiving front-office system for the secure and
* efficient high volumetry VITAM solution.
*
* This software is governed by the CeCILL-C license under French law and
* abiding by the rules of distribution of free software. You can use,
* modify and/ or redistribute the software under the terms of the CeCILL-C
* license as circulated by CEA, CNRS and INRIA at the following URL
* "http://www.cecill.info".
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
* liability.
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* software by the user in light of its specific status of free software,
* that may mean that it is complicated to manipulate, and that also
* therefore means that it is reserved for developers and experienced
* professionals having in-depth computer knowledge. Users are therefore
* encouraged to load and test the software's suitability as regards their
* requirements in conditions enabling the security of their systems and/or
* data to be ensured and, more generally, to use and operate it in the
* same conditions as regards security.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
import { Inject, Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { tap } from 'rxjs/operators';
import { ApplicationService } from './application.service';
import { ApplicationApiService } from './api/application-api.service';
import { SecurityApiService } from './api/security-api.service';
import { ApplicationId } from './application-id.enum';
import { AuthService } from './auth.service';
import { WINDOW_LOCATION } from './injection-tokens';
import { Logger } from './logger/logger';
import { AppConfiguration, AttachmentType, AuthUser, Color } from './models';
import {ThemeService} from './theme.service';
const WARNING_DURATION = 2000;
const CUSTOMER_TECHNICAL_REFERENT_KEY = 'technical-referent-email';
const CUSTOMER_WEBSITE_URL_KEY = 'website-url';
@Injectable({
providedIn: 'root'
})
export class StartupService {
private configurationData: AppConfiguration;
userRefresh = new Subject<any>();
CURRENT_APP_ID: ApplicationId = ApplicationId.PORTAL_APP;
private CURRENT_TENANT_IDENTIFIER: string;
constructor(
private logger: Logger,
private authService: AuthService,
private securityApi: SecurityApiService,
private themeService: ThemeService,
@Inject(WINDOW_LOCATION) private location: any
) { }
load(): any {
this.configurationData = null;
let appConf: AppConfiguration = {
THEME_COLORS: {
"vitamui-background" : "#F5F7FC",
"vitamui-header-footer" : "#ffffff",
"vitamui-primary" : "#702382",
"vitamui-secondary" : "#2563A9",
"vitamui-tertiary" : "#C22A40"
}
};
this.configurationData = appConf;
this.themeService.init(this.configurationData, this.configurationData.THEME_COLORS);
return appConf;
}
setTenantIdentifier(tenantIdentifier?: string) {
this.CURRENT_TENANT_IDENTIFIER = tenantIdentifier;
}
getTenantIdentifier() {
let tenantIdentifier = this.CURRENT_TENANT_IDENTIFIER;
if (!tenantIdentifier && this.authService.user) {
tenantIdentifier = this.authService.user.proofTenantIdentifier;
}
return tenantIdentifier;
}
/**
* No catchError should be set here, the security api must be called and verified before anything else.
*/
refreshUser(): Observable<AuthUser> {
return this.securityApi.getAuthenticated().pipe(
tap((data) => {
this.authService.user = data;
this.userRefresh.next(data);
})
);
}
configurationLoaded(): boolean {
return null;
}
printConfiguration(): void {
if (this.configurationLoaded()) {
this.logger.log(this, 'startup data exists.', this.configurationData);
} else {
this.logger.log(this, 'startup data does not exists');
}
}
getLogo(): string {
return null;
}
getAppLogoURL(): string {
let trustedAppLogoUrl = null;
const base64Logo = this.getLogo();
if (base64Logo) {
trustedAppLogoUrl = base64Logo;
}
return trustedAppLogoUrl;
}
getCustomerLogoURL(): string {
let trustedInlineLogoUrl = null;
if (this.authService.user) {
const currentUser = this.authService.user;
if (currentUser.basicCustomer) {
trustedInlineLogoUrl = currentUser.basicCustomer.graphicIdentity.portalDataBase64;
}
}
return trustedInlineLogoUrl;
}
getPortalUrl(): string {
return null;
}
getLoginUrl(): string {
return null;
}
getLogoutUrl(): string {
return null;
}
getCasUrl(): string {
return null;
}
getSearchUrl(): string {
return null;
}
getConfigStringValue(key: string): string {
return null;
}
getConfigNumberValue(key: string): number {
return +this.getConfigStringValue(key);
}
/**
* Navigate to given url or to the portal otherwise.
* @param url URL to be redirected to.
*/
redirect(url?: string) {
setTimeout(() => this.location.href = url ? url : this.getPortalUrl(), WARNING_DURATION);
}
getPlatformName(): string {
return null;
}
public getCustomer(): string {
return null;
}
public getCustomerTechnicalReferentEmail(): string {
const customer = this.getCustomer();
if (customer) {
return customer[CUSTOMER_TECHNICAL_REFERENT_KEY];
}
}
public getCustomerWebsiteUrl(): string {
const customer = this.getCustomer();
if (customer) {
return customer[CUSTOMER_WEBSITE_URL_KEY];
}
}
}
This diff is collapsed.