Merge branch 'dan' into 'master'
DM-604 bug fix for release See merge request redactmanager/red-ui!211
This commit is contained in:
commit
ee6e4ad50d
@ -1,5 +0,0 @@
|
||||
PMRA Document Number,GAP Active Ingredient,Regulatory Utility,Document Comment,SIC Number,Protocol Number,Protocol Number,Data Evaluation Record,Audience,Original Retirement Date,Regulatory Released,Regulatory Authority,Regulatory Authority (legacy to remove),Source Owner,Legacy Primary OECD Code,Legacy Source Organisation,Regulator Comments,Contains Registered Composition?,File Name,FTP Source Location,Submission Format Needed,Legacy Report Number,Sales Unit,Address,ANVISA Process Number,Source Number,Legacy Migration Path,Review Completion Date,Registration Number,Agency Dossier Registration Type,Submission Version,Media Comments,Literature Citation,Document Language,Notes,Study Location,Materials,Approver,Subtype,Test Facility,Is Latest Version,Consumer,Classification,Guideline,TRP Type,Legacy System Date,Function,Artist,Document Title,PI Number,Legacy Version Description,PI Number,Incoming from,Annotations (Unresolved),Work To Date,Copyright Clearance Obtained?,Summary Type,Annotations (Claim Links),Latest Source Minor Version,Regulatory Category,SYN Letter Number,Work From Date,Product,Version Creation Date,Governance Committee,Test Facility (legacy to remove),Regulatory Finalization Date,Imported file?,Status,Information Tracking Submission Package,Approval Type,Media Description,Duration,Legacy System,Archive Date,Exporting country,Regulatory Tracking Number,Annotations (Anchors),Information Tracking,Document Number,GAP Usage Information,Report Number,Legacy Reg Document Number,Legal Representative 2,Registering Company,File Created By,Legacy EPA Decision Code,Meeting Minutes,Product Safety Finalization Date,Report Type,Archived Date,Legacy Other PMRA Data Codes,Template Document Type,Color Space,Legal Representative 1,Document Author,CrossLink,Annotations (Notes),Suggested Links,Assessment Type,Legacy Species Commodity,TK Number,Legacy Test Facilities,Planned Completion Date,PRF Number,Registration Item Country,Legacy Target Species,Legacy Owning Organisation,Archive Number,Protocol Type,Submission Output Format,Submission Date,Coordinator,Regulatory Reporting Date,Annotations (Lines),Field Trial Number,Batch Number,Legacy Version Number,External ID,Author Names,Sponsor Organisation (legacy to remove),Literature Type,Sponsor Organisation,Legacy Crop Host,Document Edition,Agreement Expiry Date,TRP Usage,Legacy EPA Submission Type,Security Classification,Source Document Name,Syngenta Address,Outgoing to (legacy to remove),Link Status,Legacy System Document ID,Copyright,PMRA Registration Number,Annotations (All),SU,Source Vault Name,Latest Source Major Version,Legacy Other OECD Codes,Version Created By,Subarea,Reviewer,Owning Organisation (legacy to remove),Project,Viewer,Regulatory Territory,Lifecycle,Claims,Bound Source Minor Version,Global ID,Legacy Regulatory Authorities,Outgoing to,Additional Information,Year,Organism,File Last Modified By,Requires Attachment of a Signature Page?,Source Binding Rule,Destination country,Cross-Reference Submission Number,Name,Issue Topic,Pages,Type,Reason for Retiring,Rule,Type of Review,Original Finalization Date,Trade Name,Transmittal Document,Pages OCR'ed (%),Legacy Object ID(s),Protocol Number,Last Modified By,Annotations (Approved Links),Request Type,Binder,Author,Last Modified Date,Non-English Document Title,Media Location,Created By,Editor,Owner,CRO Report Number,Format,Legacy Discipline,Major Version Number,Created From,Active Ingredients,Archive Location,EPA Registration Number,Retirement Date,Annotations (Links),TRP Document,Finalization Date,Legacy Task Number,Legal Details,OCR Requested,Global Version ID,Publicly Published,Document Date,MRID Number,Legacy Reg Topic,Requires Review and Approval?,Annotations (Auto Links),Subareas,Product Safety Reporting Date,Media Title,Minor Version Number,Legacy Primary PMRA Data Code,Requestor,Owning Organisation,Zone,File Last Modified Date,Contact Person,File Created Date,Amendment Justification,CDPR Number,Legacy EPA Submission Date,Supports Agency Dossier,Field Trial Year,Reason for Un-retiring,TRP Topic,Bound Source Major Version,Keywords,Legacy Author Name(s),Export File Name,Size,Source Link,This content is a translation?,Quality Assurance Standard,Legacy Fed Reg Number,Checksum,Created Date,Annotations (Resolved),User Task,Review Start Date,test list,Incoming from (legacy to remove),Rendition Profile,Path,URL
|
||||
,,Country Specific,,,,,No,,,Yes,,,,,Syngenta,,,Lambda-cyhalothrin - EU AIR5 - Document A - Statement of the context in which the dossier is submit.doc,,,,,,,,,,,,,,,English,,,PP321,,Authority Form / Document,,TRUE,"All Internal Users, Syngenta Read Only Restricted, Syngenta Read Only Non Restricted",,,,16/07/2019,,,Lambda-cyhalothrin - EU AIR5 - Document A - Statement of the context in which the dossier is submitted,PI0015818,,,,0,,,,0,,,,,,26/03/2020 14:06 CET,,Syngenta Crop Protection AG (Switzerland),,No,Final,,,,,SmartDoc - EAME,,,,0,IT-624180,VV-731623,,N/A,PP321_12074,,,,,,,,,,,,,B Sochard,No,0,0,,,,,,,,,,,,,,,,0,,,1.0|CURRENT,090100b881afdd91,,Syngenta Crop Protection AG (Switzerland),,Syngenta Crop Protection AG,,Original,,,,Internal Use Only,,,ETL_blank,,090100b881afdd91,,,0,,,,,Berangere Sochard,,,Syngenta Crop Protection AG (Switzerland),,,European Union,General Lifecycle,,,40037_850361,,ETL_blank,,,,,,,,,Lambda-cyhalothrin - EU AIR5 - Document A - Statement of the context in which the dossier is submit,,2,Registration Supporting Documentation,,,,,,No,,090100b881afdd91 (cv),,CP Vault Support,0,,No,,24/02/2021 15:20 CET,,,Vault Migration,"Global Reg Ops, NA Reg Ops, PS Ops, EAME Reg Ops, Syngenta Business Administrator, Berangere Sochard, Simon Baker, Lily Williams, Clive Boxwell, Paul Parsons, Richard MacKenzie, Dan Pickford, Laurence Hand",Vault Migration,,application/msword,Regulatory,2,,PP321,,,,0,No,,PI0015818,,No,40037_850361_1958105,No,01/09/2020,,Regulatory,No,0,,,,0,,,Syngenta Crop Protection AG,,,,,,,,,,,,,,Sochard Berangere,,49152,,No,,,86d75e5da397fdadcd332f92234a4f62,29/11/2019 08:51 CET,0,,,,,,Lambda-cyhalothrin - EU AIR5 - Document A - Statement of the.pdf,
|
||||
,,Country Specific,,,,,No,,,Yes,,,,,Syngenta,,,Lambda-cyhalothrin - EU AIR5 - MCA Section 5 - Toxicology (1).docx,,,,,,,,,,,,,,,English,,,PP321,,Summary / Overview,,TRUE,"All Internal Users, Syngenta Read Only Non Restricted, Syngenta Read Only Restricted",,,,16/07/2019,,,Lambda-cyhalothrin - EU AIR5 - MCA Section 5 - Toxicology,PI0015818,,,,0,,,OECD Tier 2 Summary,0,,,,,,17/02/2021 22:02 CET,,Syngenta Crop Protection AG (Switzerland),,Yes,Draft,,,,,SmartDoc - EAME,,,,0,IT-615930,VV-729845,,N/A,PP321_12086,,,Syngenta,,,,,,,,,,S Lloyd,No,0,0,,,,,,,,,,,,,,,,0,,,1.0|CURRENT,090100b881afde22,,Syngenta Crop Protection AG (Switzerland),,Syngenta Crop Protection AG,,Original,,,,Internal Use Only,,,,,090100b881afde22,,,0,,,,,Sonia Ellis,,,Syngenta Crop Protection AG (Switzerland),,,European Union,General Lifecycle,,,40037_848583,,,,,,Ellis Sonia (ext) GBGU,,,,,Lambda-cyhalothrin - EU AIR5 - MCA Section 5 - Toxicology,,893,Summary / Assessment,,,,,,No,,090100b881afde22 (cv),,CP Vault Support,0,,No,Syngenta,24/02/2021 15:20 CET,,,Vault Migration,"EAME Reg Ops, Syngenta Business Administrator, PS Ops, NA Reg Ops, Global Reg Ops, Berangere Sochard, Simon Baker, Lily Williams, Clive Boxwell, Paul Parsons, Richard MacKenzie, Dan Pickford, Laurence Hand, Claire McCombie, Elaine Buss",Vault Migration,,application/vnd.openxmlformats-officedocument.wordprocessingml.document,Toxicology,3,,PP321,,,,0,No,,PI0015818,,No,40037_848583_2033983,No,01/09/2020,,Tox,No,0,,,,1,,,Syngenta Crop Protection AG,,17/02/2021 21:35 CET,,04/09/2020 14:34 CEST,,,,,,,,,VV-729845,Lloyd Sara,,5089990,,No,,,3b13f57d1244e77844eba73ce0ae9813,29/11/2019 08:47 CET,0,,,,,,Lambda-cyhalothrin - EU AIR5 - MCA Section 5 - Toxicology.pdf,
|
||||
,,Country Specific,,,,,No,,,Yes,,,,,Syngenta,,,Lambda-cyhalothrin - EU AIR5 - LCA Section 5 Reference List (1).doc,,,,,,,,,,,,,,,English,,,PP321,,Summary / Overview,,TRUE,"All Internal Users, Syngenta Read Only Restricted, Syngenta Read Only Non Restricted",,,,16/07/2019,,,Lambda-cyhalothrin - EU AIR5 - LCA Section 5 Reference List,PI0015818,,,,0,,,OECD Tier 1 Summary,0,,,,,,12/09/2020 15:48 CEST,,Syngenta Crop Protection AG (Switzerland),,Yes,Final,,,,,SmartDoc - EAME,,,,0,IT-615436,VV-729844,,N/A,PP321_12084,,,,,,,,,,,,,S Ellis,No,0,0,,,,,,,,,,,,,,,,0,,,1.0|CURRENT,090100b881afde20,,Syngenta Crop Protection AG (Switzerland),,Syngenta Crop Protection AG,,Original,,,,Internal Use Only,,,,,090100b881afde20,,,0,,,,,Sonia Ellis,,,Syngenta Crop Protection AG (Switzerland),,,European Union,General Lifecycle,,,40037_848582,,,,,,,,,,,Lambda-cyhalothrin - EU AIR5 - LCA Section 5 Reference List,,147,Summary / Assessment,,,,,,No,,090100b881afde20 (cv),,CP Vault Support,0,,No,,24/02/2021 15:20 CET,,,Vault Migration,"NA Reg Ops, Global Reg Ops, EAME Reg Ops, PS Ops, Syngenta Business Administrator, Berangere Sochard, Paul Parsons",Vault Migration,,application/msword,Toxicology,2,,PP321,,,,0,No,,PI0015818,,No,40037_848582_2001744,No,01/09/2020,,Tox,No,0,,,,0,,,Syngenta Crop Protection AG,,,,,,,,,,,,,,Ellis Sonia,,651264,,No,,,eb0fdf698b528b67f54635395ec7fb52,29/11/2019 08:47 CET,0,,,,,,Lambda-cyhalothrin - EU AIR5 - LCA Section 5 Reference List.pdf,
|
||||
,,Country Specific,,,,,No,,,Yes,,,,,Syngenta,,,Lambda-cyhalothrin - EU AIR5 - LCA Section 4 Reference List (5).doc,,,,,,,,,,,,,,,English,,,PP321,,Summary / Overview,,TRUE,"All Internal Users, Syngenta Read Only Restricted, Syngenta Read Only Non Restricted",,,,16/07/2019,,,Lambda-cyhalothrin - EU AIR5 - LCA Section 4 Reference List,PI0015818,,,,0,,,OECD Tier 1 Summary,0,,,,,,21/09/2020 15:21 CEST,,Syngenta Crop Protection AG (Switzerland),,Yes,Final,,,,,SmartDoc - EAME,,,,0,IT-618210,VV-729843,,N/A,PP321_12083,,,,,,,,,,,,,S Ellis,No,0,0,,,,,,,,,,,,,,,,0,,,1.0|CURRENT,090100b881afde1f,,Syngenta Crop Protection AG (Switzerland),,Syngenta Crop Protection AG,,Original,,,,Internal Use Only,,,,,090100b881afde1f,,,0,,,,,Sonia Ellis,,,Syngenta Crop Protection AG (Switzerland),,,European Union,General Lifecycle,,,40037_848581,,,,,,,,,,,Lambda-cyhalothrin - EU AIR5 - LCA Section 4 Reference List,,151,Summary / Assessment,,,,,,No,,090100b881afde1f (cv),,CP Vault Support,0,,No,,24/02/2021 15:20 CET,,,Vault Migration,"EAME Reg Ops, Global Reg Ops, PS Ops, Syngenta Business Administrator, NA Reg Ops, Berangere Sochard, Melanie Bottoms, Dan Pickford, Lynda Farrelly",Vault Migration,,application/msword,Chemistry - Regulatory,2,,PP321,,,,0,No,,PI0015818,,No,40037_848581_2003177,No,01/09/2020,,Chem - Analytical Methods,No,0,,,,0,,,Syngenta Crop Protection AG,,,,,,,,,,,,,,Ellis Sonia,,699392,,No,,,2c476f477f6e2b55ecb537683f5d1cee,29/11/2019 08:47 CET,0,,,,,,Lambda-cyhalothrin - EU AIR5 - LCA Section 4 Reference List.pdf,
|
||||
|
@ -1,3 +1,14 @@
|
||||
node_modules/
|
||||
.idea/
|
||||
dist/
|
||||
.angular
|
||||
.husky
|
||||
.editorconfig
|
||||
.dockerignore
|
||||
.eslintignore
|
||||
.eslintrc.json
|
||||
.gitignore
|
||||
.prettierignore
|
||||
.prettierrc
|
||||
renovate.json
|
||||
Running
|
||||
|
||||
@ -5,3 +5,6 @@ dist
|
||||
coverage
|
||||
node_modules
|
||||
bamboo-specs
|
||||
docker
|
||||
paligo-styles
|
||||
paligo-theme
|
||||
|
||||
@ -1,46 +1,10 @@
|
||||
{
|
||||
"root": true,
|
||||
"ignorePatterns": ["**/*"],
|
||||
"plugins": ["@nx"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"rules": {
|
||||
"@nx/enforce-module-boundaries": [
|
||||
"error",
|
||||
{
|
||||
"enforceBuildableLibDependency": true,
|
||||
"allow": [
|
||||
"@services/**",
|
||||
"@components/**",
|
||||
"@guards/**",
|
||||
"@users/**",
|
||||
"@i18n/**",
|
||||
"@utils/**",
|
||||
"@models/**",
|
||||
"@environments/**",
|
||||
"@shared/**",
|
||||
"@upload-download/**",
|
||||
"@translations/**"
|
||||
],
|
||||
"depConstraints": [
|
||||
{
|
||||
"sourceTag": "*",
|
||||
"onlyDependOnLibsWithTags": ["*"]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": ["plugin:@nx/typescript"]
|
||||
},
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": [
|
||||
"plugin:@nx/angular",
|
||||
"eslint:recommended",
|
||||
"plugin:@angular-eslint/recommended",
|
||||
"plugin:@angular-eslint/template/process-inline-templates",
|
||||
@ -73,6 +37,7 @@
|
||||
"@typescript-eslint/indent": "off",
|
||||
"@typescript-eslint/lines-between-class-members": "off",
|
||||
"@typescript-eslint/ban-types": "off",
|
||||
"@typescript-eslint/no-unsafe-argument": "off",
|
||||
"@typescript-eslint/explicit-member-accessibility": [
|
||||
"error",
|
||||
{
|
||||
@ -283,7 +248,7 @@
|
||||
},
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"extends": ["plugin:@nx/angular-template", "plugin:@angular-eslint/template/recommended"]
|
||||
"extends": ["plugin:@angular-eslint/template/recommended"]
|
||||
},
|
||||
{
|
||||
"files": ["*.html"],
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -18,6 +18,7 @@
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
redaction.iml
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
@ -46,5 +47,3 @@ paligo-styles/style.css*
|
||||
|
||||
migrations.json
|
||||
*.iml
|
||||
|
||||
docker-compose.yml
|
||||
|
||||
136
angular.json
Normal file
136
angular.json
Normal file
@ -0,0 +1,136 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"cli": {
|
||||
"packageManager": "yarn",
|
||||
"schematicCollections": ["@angular-eslint/schematics"],
|
||||
"analytics": "2bccdff1-3aff-4f10-b233-211065aa25d9"
|
||||
},
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"red-ui": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss",
|
||||
"skipTests": true
|
||||
},
|
||||
"@schematics/angular:class": {
|
||||
"skipTests": true
|
||||
},
|
||||
"@schematics/angular:directive": {
|
||||
"skipTests": true
|
||||
},
|
||||
"@schematics/angular:guard": {
|
||||
"skipTests": true
|
||||
},
|
||||
"@schematics/angular:pipe": {
|
||||
"skipTests": true
|
||||
},
|
||||
"@schematics/angular:service": {
|
||||
"skipTests": true
|
||||
}
|
||||
},
|
||||
"root": "",
|
||||
"sourceRoot": "apps/red-ui/src",
|
||||
"prefix": "redaction",
|
||||
"targets": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/apps/red-ui",
|
||||
"index": "apps/red-ui/src/index.html",
|
||||
"main": "apps/red-ui/src/main.ts",
|
||||
"polyfills": "apps/red-ui/src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.json",
|
||||
"baseHref": "/ui/",
|
||||
"assets": [
|
||||
"apps/red-ui/src/favicon.ico",
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "node_modules/@pdftron/webviewer/public/",
|
||||
"output": "/assets/wv-resources/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "apps/red-ui/src/assets/",
|
||||
"output": "/assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "libs/common-ui/src/assets/",
|
||||
"output": "/assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "node_modules/monaco-editor",
|
||||
"output": "/assets/monaco-editor/"
|
||||
},
|
||||
"apps/red-ui/src/manifest.webmanifest"
|
||||
],
|
||||
"styles": ["apps/red-ui/src/styles.scss", "libs/common-ui/src/assets/styles/common-styles.scss"],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": ["./apps/red-ui/src/assets/styles", "./libs/common-ui/src/assets/styles"]
|
||||
},
|
||||
"scripts": ["node_modules/@pdftron/webviewer/webviewer.min.js", "node_modules/chart.js/dist/chart.js"],
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"buildOptimizer": false,
|
||||
"sourceMap": true,
|
||||
"optimization": false,
|
||||
"namedChunks": true
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "apps/red-ui/src/environments/environment.ts",
|
||||
"with": "apps/red-ui/src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": {
|
||||
"scripts": true,
|
||||
"styles": {
|
||||
"minify": true,
|
||||
"inlineCritical": false
|
||||
},
|
||||
"fonts": true
|
||||
},
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"namedChunks": false,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb",
|
||||
"maximumError": "20kb"
|
||||
}
|
||||
],
|
||||
"serviceWorker": true,
|
||||
"ngswConfigPath": "ngsw-config.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "red-ui:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "red-ui:build:production"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
{
|
||||
"extends": ["../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["**/*.ts"],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"extends": ["plugin:@typescript-eslint/recommended"],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-unsafe-return": "off",
|
||||
"@typescript-eslint/no-unsafe-assignment": "off",
|
||||
"@typescript-eslint/no-unsafe-argument": "off",
|
||||
"@typescript-eslint/no-unsafe-member-access": "off",
|
||||
"@typescript-eslint/no-unsafe-call": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/unbound-method": "off",
|
||||
"@typescript-eslint/no-misused-promises": "off",
|
||||
"@typescript-eslint/no-floating-promises": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
import type { Config } from 'jest';
|
||||
import { defaults } from 'jest-config';
|
||||
|
||||
export default {
|
||||
...defaults,
|
||||
displayName: 'red-ui',
|
||||
preset: '../../jest.preset.js',
|
||||
setupFilesAfterEnv: ['jest-preset-angular/setup-jest.js', 'jest-extended/all'],
|
||||
coverageDirectory: '../../coverage/apps/angular-jest',
|
||||
transform: {
|
||||
'^.+\\.(ts|mjs|js|html)$': [
|
||||
'jest-preset-angular',
|
||||
{
|
||||
tsconfig: '../../tsconfig.spec.json',
|
||||
stringifyContentPathRegex: '\\.(html|svg)$',
|
||||
},
|
||||
],
|
||||
},
|
||||
testEnvironment: 'jest-environment-jsdom',
|
||||
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
|
||||
snapshotSerializers: [
|
||||
'jest-preset-angular/build/serializers/no-ng-attributes',
|
||||
'jest-preset-angular/build/serializers/ng-snapshot',
|
||||
'jest-preset-angular/build/serializers/html-comment',
|
||||
],
|
||||
} as Config;
|
||||
@ -1,132 +0,0 @@
|
||||
{
|
||||
"name": "red-ui",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"projectType": "application",
|
||||
"generators": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss",
|
||||
"skipTests": true
|
||||
},
|
||||
"@schematics/angular:class": {
|
||||
"skipTests": true
|
||||
},
|
||||
"@schematics/angular:directive": {
|
||||
"skipTests": true
|
||||
},
|
||||
"@schematics/angular:guard": {
|
||||
"skipTests": true
|
||||
},
|
||||
"@schematics/angular:pipe": {
|
||||
"skipTests": true
|
||||
},
|
||||
"@schematics/angular:service": {
|
||||
"skipTests": true
|
||||
}
|
||||
},
|
||||
"sourceRoot": "apps/red-ui/src",
|
||||
"prefix": "redaction",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/apps/red-ui",
|
||||
"index": "apps/red-ui/src/index.html",
|
||||
"main": "apps/red-ui/src/main.ts",
|
||||
"polyfills": "apps/red-ui/src/polyfills.ts",
|
||||
"tsConfig": "apps/red-ui/tsconfig.json",
|
||||
"baseHref": "/ui/",
|
||||
"assets": [
|
||||
"apps/red-ui/src/favicon.ico",
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "node_modules/@pdftron/webviewer/public/",
|
||||
"output": "/assets/wv-resources/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "apps/red-ui/src/assets/",
|
||||
"output": "/assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "libs/common-ui/src/assets/",
|
||||
"output": "/assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "node_modules/monaco-editor",
|
||||
"output": "/assets/monaco-editor/"
|
||||
},
|
||||
"apps/red-ui/src/manifest.webmanifest"
|
||||
],
|
||||
"styles": ["apps/red-ui/src/styles.scss", "libs/common-ui/src/assets/styles/common-styles.scss"],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": ["./apps/red-ui/src/assets/styles", "./libs/common-ui/src/assets/styles"]
|
||||
},
|
||||
"scripts": ["node_modules/@pdftron/webviewer/webviewer.min.js", "node_modules/chart.js/dist/chart.js"],
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"buildOptimizer": false,
|
||||
"sourceMap": true,
|
||||
"optimization": false,
|
||||
"namedChunks": true
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "apps/red-ui/src/environments/environment.ts",
|
||||
"with": "apps/red-ui/src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": {
|
||||
"scripts": true,
|
||||
"styles": {
|
||||
"minify": true,
|
||||
"inlineCritical": false
|
||||
},
|
||||
"fonts": true
|
||||
},
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"namedChunks": false,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb",
|
||||
"maximumError": "20kb"
|
||||
}
|
||||
],
|
||||
"serviceWorker": true,
|
||||
"ngswConfigPath": "apps/red-ui/ngsw-config.json"
|
||||
}
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
},
|
||||
"serve": {
|
||||
"executor": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "red-ui:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "red-ui:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"executor": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "red-ui:build"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -205,18 +205,13 @@ const routes: IqserRoutes = [
|
||||
component: TenantSelectComponent,
|
||||
},
|
||||
{
|
||||
path: ':tenant',
|
||||
redirectTo: ':tenant/main',
|
||||
pathMatch: 'full',
|
||||
},
|
||||
{
|
||||
path: ':tenant/main',
|
||||
path: 'main',
|
||||
canActivate: [orderedAsyncGuards([ifLoggedIn(), hasAnyRole(), mainGuard()])],
|
||||
component: BaseScreenComponent,
|
||||
children: mainRoutes,
|
||||
},
|
||||
{
|
||||
path: ':tenant/auth-error',
|
||||
path: 'auth-error',
|
||||
component: AuthErrorComponent,
|
||||
canActivate: [doesNotHaveAnyRole()],
|
||||
},
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { DatePipe as BaseDatePipe } from '@angular/common';
|
||||
import { APP_BASE_HREF, DatePipe as BaseDatePipe } from '@angular/common';
|
||||
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||
import { ENVIRONMENT_INITIALIZER, ErrorHandler, inject, NgModule } from '@angular/core';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
@ -43,7 +43,7 @@ import {
|
||||
} from '@iqser/common-ui';
|
||||
import { CommonUiModule } from '@iqser/common-ui/lib/common-ui.module';
|
||||
import { LogoComponent, SkeletonComponent, ToastComponent } from '@iqser/common-ui/lib/shared';
|
||||
import { TenantPipe, TenantsModule } from '@iqser/common-ui/lib/tenants';
|
||||
import { TenantsModule } from '@iqser/common-ui/lib/tenants';
|
||||
import { IqserUsersModule } from '@iqser/common-ui/lib/users';
|
||||
import { MonacoEditorModule } from '@materia-ui/ngx-monaco-editor';
|
||||
import { MissingTranslationHandler } from '@ngx-translate/core';
|
||||
@ -61,13 +61,14 @@ import { UserPreferenceService } from '@users/user-preference.service';
|
||||
import { UserService } from '@users/user.service';
|
||||
import { UI_CACHES } from '@utils/constants';
|
||||
import { REDMissingTranslationHandler } from '@utils/missing-translations-handler';
|
||||
import { LoggerModule, NgxLoggerLevel, TOKEN_LOGGER_CONFIG, TOKEN_LOGGER_RULES_SERVICE } from 'ngx-logger';
|
||||
import { LoggerModule, NGXLogger, NgxLoggerLevel, TOKEN_LOGGER_CONFIG, TOKEN_LOGGER_RULES_SERVICE } from 'ngx-logger';
|
||||
import { ToastrModule } from 'ngx-toastr';
|
||||
import * as helpModeKeys from '../assets/help-mode/help-mode-keys.json';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { PdfViewerModule } from './modules/pdf-viewer/pdf-viewer.module';
|
||||
import { ACTIVE_DOSSIERS_SERVICE, ARCHIVED_DOSSIERS_SERVICE } from './tokens';
|
||||
import { UI_ROOT } from '@common-ui/utils';
|
||||
|
||||
export const appModuleFactory = (config: AppConfig) => {
|
||||
@NgModule({
|
||||
@ -183,11 +184,27 @@ export const appModuleFactory = (config: AppConfig) => {
|
||||
IqserDenyDirective,
|
||||
IqserListingModule,
|
||||
IconButtonComponent,
|
||||
TenantPipe,
|
||||
MatDividerModule,
|
||||
ChevronButtonComponent,
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
provide: UI_ROOT,
|
||||
useValue: '/ui',
|
||||
},
|
||||
{
|
||||
provide: APP_BASE_HREF,
|
||||
useFactory: () => {
|
||||
const uiRoot = inject(UI_ROOT);
|
||||
const pathParams = location.pathname.split('/').filter(Boolean);
|
||||
const uiRootPathIndex = pathParams.indexOf(uiRoot.replace('/', ''));
|
||||
const tenant = pathParams[uiRootPathIndex + 1] ?? '';
|
||||
const appBaseHref = uiRoot + '/' + tenant;
|
||||
|
||||
inject(NGXLogger).info('Provide APP_BASE_HREF:', appBaseHref);
|
||||
return appBaseHref;
|
||||
},
|
||||
},
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
multi: true,
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<redaction-breadcrumbs></redaction-breadcrumbs>
|
||||
</div>
|
||||
|
||||
<a [matTooltip]="'top-bar.navigation-items.back-to-dashboard' | translate" [routerLink]="['/'] | tenant" class="logo">
|
||||
<a [matTooltip]="'top-bar.navigation-items.back-to-dashboard' | translate" [routerLink]="['/']" class="logo">
|
||||
<div [attr.help-mode-key]="'home'" class="actions">
|
||||
<iqser-logo (iqserHiddenAction)="userPreferenceService.toggleDevFeatures()" icon="iqser:logo"></iqser-logo>
|
||||
<div class="app-name">{{ titleService.getTitle() }}</div>
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
[id]="first ? 'navigateToActiveDossiers' : ''"
|
||||
[matTooltip]="breadcrumb.options.clamp && (breadcrumb.name$ | async)"
|
||||
[routerLinkActiveOptions]="breadcrumb.options.routerLinkActiveOptions || { exact: false }"
|
||||
[routerLink]="breadcrumb.options.routerLink | tenant"
|
||||
[routerLink]="breadcrumb.options.routerLink"
|
||||
class="breadcrumb"
|
||||
routerLinkActive="active"
|
||||
>
|
||||
@ -32,7 +32,7 @@
|
||||
<div id="breadcrumbs-menu-items">
|
||||
<a
|
||||
*ngFor="let option of breadcrumb.options.options"
|
||||
[routerLink]="option.options.routerLink | tenant"
|
||||
[routerLink]="option.options.routerLink"
|
||||
mat-menu-item
|
||||
routerLinkActive="active"
|
||||
>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div id="user-menu-items">
|
||||
<ng-container *ngFor="let item of userMenuItems; trackBy: trackBy">
|
||||
<a (click)="item.action?.()" *ngIf="item.show" [id]="item.id" [routerLink]="item.routerLink | tenant" mat-menu-item>
|
||||
<a (click)="item.action?.()" *ngIf="item.show" [id]="item.id" [routerLink]="item.routerLink" mat-menu-item>
|
||||
{{ item.name | translate }}
|
||||
</a>
|
||||
</ng-container>
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { Injectable, Injector, ProviderToken } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, CanActivate, Router } from '@angular/router';
|
||||
import { getConfig } from '@iqser/common-ui';
|
||||
import { TenantsService } from '@iqser/common-ui/lib/tenants';
|
||||
import { DOSSIER_ID, DOSSIER_TEMPLATE_ID } from '@red/domain';
|
||||
import { DossiersService } from '@services/dossiers/dossiers.service';
|
||||
import { DictionaryService } from '@services/entity-services/dictionary.service';
|
||||
@ -16,7 +15,6 @@ export class DossierFilesGuard implements CanActivate {
|
||||
|
||||
constructor(
|
||||
private readonly _injector: Injector,
|
||||
private readonly _tenantsService: TenantsService,
|
||||
private readonly _filesMapService: FilesMapService,
|
||||
private readonly _filesService: FilesService,
|
||||
private readonly _dictionaryService: DictionaryService,
|
||||
@ -37,7 +35,7 @@ export class DossierFilesGuard implements CanActivate {
|
||||
}
|
||||
|
||||
if (!dossiersService.has(dossierId)) {
|
||||
await this._router.navigate([`/${this._tenantsService.activeTenantId}/main`, dossierTemplateId]);
|
||||
await this._router.navigate(['/main', dossierTemplateId]);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { inject } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, CanActivateFn, Router } from '@angular/router';
|
||||
import { TenantsService } from '@iqser/common-ui/lib/tenants';
|
||||
import { DOSSIER_TEMPLATE_ID } from '@red/domain';
|
||||
import { DashboardStatsService } from '@services/dossier-templates/dashboard-stats.service';
|
||||
import { DossierTemplatesService } from '@services/dossier-templates/dossier-templates.service';
|
||||
@ -15,7 +14,7 @@ export function templateExistsWhenEnteringAdmin(): CanActivateFn {
|
||||
|
||||
const dossierTemplate = inject(DossierTemplateStatsService).get(dossierTemplateId);
|
||||
if (!dossierTemplate) {
|
||||
await inject(Router).navigate([inject(TenantsService).activeTenantId, 'main', 'admin', 'dossier-templates']);
|
||||
await inject(Router).navigate(['main', 'admin', 'dossier-templates']);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -29,7 +28,6 @@ export function templateExistsWhenEnteringDossierList(): CanActivateFn {
|
||||
const dossierTemplatesService = inject(DossierTemplatesService);
|
||||
const logger = inject(NGXLogger);
|
||||
const router = inject(Router);
|
||||
const tenantsService = inject(TenantsService);
|
||||
const userPreferencesService = inject(UserPreferenceService);
|
||||
|
||||
await firstValueFrom(dashboardStatsService.loadAll());
|
||||
@ -38,7 +36,7 @@ export function templateExistsWhenEnteringDossierList(): CanActivateFn {
|
||||
if (!dossierTemplateStats || dossierTemplateStats.isEmpty) {
|
||||
logger.warn(`[ROUTES] Dossier template ${dossierTemplateId} not found, redirecting to main`);
|
||||
await userPreferencesService.saveLastDossierTemplate(null);
|
||||
await router.navigate([tenantsService.activeTenantId, 'main']);
|
||||
await router.navigate(['main']);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@ -25,19 +25,23 @@ export function ifLoggedIn(): AsyncGuard {
|
||||
const keycloakStatusService = inject(KeycloakStatusService);
|
||||
|
||||
const keycloakInstance = keycloakService.getKeycloakInstance();
|
||||
const tenant = route.paramMap.get('tenant');
|
||||
const pathParams = location.pathname.split('/').filter(Boolean);
|
||||
const uiPathIndex = pathParams.indexOf('ui');
|
||||
const tenant = pathParams[uiPathIndex + 1];
|
||||
const queryParams = new URLSearchParams(window.location.search);
|
||||
const username = queryParams.get('username');
|
||||
const router = inject(Router);
|
||||
|
||||
if (!keycloakInstance) {
|
||||
if (!tenant) {
|
||||
logger.error('[ROUTES] No tenant found, something is wrong...');
|
||||
return inject(Router).navigate(['/']);
|
||||
return router.navigate(['/']);
|
||||
}
|
||||
|
||||
logger.info('[KEYCLOAK] Keycloak init...');
|
||||
await keycloakInitializer(tenant);
|
||||
logger.info('[KEYCLOAK] Keycloak init done!');
|
||||
console.log({ tenant });
|
||||
await tenantsService.selectTenant(tenant);
|
||||
await usersService.initialize();
|
||||
await licenseService.loadLicenses();
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import { ActivatedRouteSnapshot, CanActivateFn, Router } from '@angular/router';
|
||||
import { CanActivateFn, Router } from '@angular/router';
|
||||
import { inject } from '@angular/core';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
import { KeycloakService } from 'keycloak-angular';
|
||||
|
||||
export function ifNotLoggedIn(): CanActivateFn {
|
||||
return async (route: ActivatedRouteSnapshot) => {
|
||||
return async () => {
|
||||
const logger = inject(NGXLogger);
|
||||
const router = inject(Router);
|
||||
const keycloakService = inject(KeycloakService);
|
||||
@ -16,14 +16,14 @@ export function ifNotLoggedIn(): CanActivateFn {
|
||||
return true;
|
||||
}
|
||||
|
||||
const tenant = route.paramMap.get('tenant') || keycloakService.getKeycloakInstance().realm;
|
||||
const tenant = keycloakService.getKeycloakInstance().realm;
|
||||
if (!tenant) {
|
||||
logger.error('[ROUTES] Tenant not found in route or keycloak realm');
|
||||
return false;
|
||||
}
|
||||
|
||||
logger.warn('[ROUTES] Is logged in for ' + tenant + ', redirecting to /' + tenant);
|
||||
await router.navigate([tenant]);
|
||||
await router.navigate(['/main']);
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
@ -55,7 +55,6 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AuditInfoDialogComponent } from './dialogs/audit-info-dialog/audit-info-dialog.component';
|
||||
import { DossierTemplateActionsComponent } from './shared/components/dossier-template-actions/dossier-template-actions.component';
|
||||
import { IqserUsersModule } from '@iqser/common-ui/lib/users';
|
||||
import { TenantPipe } from '@iqser/common-ui/lib/tenants';
|
||||
import { SelectComponent } from '@shared/components/select/select.component';
|
||||
import { PaginationComponent } from '@common-ui/pagination/pagination.component';
|
||||
|
||||
@ -124,7 +123,6 @@ const components = [
|
||||
DetailsRadioComponent,
|
||||
IqserAllowDirective,
|
||||
IqserDenyDirective,
|
||||
TenantPipe,
|
||||
SelectComponent,
|
||||
PaginationComponent,
|
||||
],
|
||||
|
||||
@ -107,7 +107,7 @@
|
||||
|
||||
<iqser-circle-button
|
||||
*ngIf="permissionsService.canEditEntities()"
|
||||
[routerLink]="dict.routerLink | tenant"
|
||||
[routerLink]="dict.routerLink"
|
||||
[tooltip]="'entities-listing.action.edit' | translate"
|
||||
icon="iqser:edit"
|
||||
></iqser-circle-button>
|
||||
|
||||
@ -87,15 +87,15 @@
|
||||
|
||||
<div class="iqser-input-group w-150">
|
||||
<label [translate]="'watermark-screen.form.font-size'" class="all-caps-label"></label>
|
||||
<mat-slider (change)="configChanged()" color="primary" max="50" min="5">
|
||||
<input formControlName="fontSize" matSliderThumb />
|
||||
<mat-slider color="primary" max="50" min="5">
|
||||
<input (change)="configChanged()" formControlName="fontSize" matSliderThumb />
|
||||
</mat-slider>
|
||||
</div>
|
||||
|
||||
<div class="iqser-input-group w-150">
|
||||
<label [translate]="'watermark-screen.form.opacity'" class="all-caps-label"></label>
|
||||
<mat-slider (change)="configChanged()" color="primary" min="1">
|
||||
<input formControlName="opacity" matSliderThumb />
|
||||
<mat-slider color="primary" min="1">
|
||||
<input (change)="configChanged()" formControlName="opacity" matSliderThumb />
|
||||
</mat-slider>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,8 +1,14 @@
|
||||
import { ChangeDetectorRef, Component, ElementRef, inject, OnInit, ViewChild } from '@angular/core';
|
||||
import WebViewer, { WebViewerInstance } from '@pdftron/webviewer';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { ChangeDetectorRef, Component, ElementRef, inject, OnInit, ViewChild } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { environment } from '@environments/environment';
|
||||
import { getConfig, IconButtonTypes, IqserPermissionsService, LoadingService, Toaster } from '@iqser/common-ui';
|
||||
import { TenantsService } from '@iqser/common-ui/lib/tenants';
|
||||
import { getCurrentUser } from '@iqser/common-ui/lib/users';
|
||||
import { AsControl, Debounce, getParam, trackByFactory, UI_ROOT_PATH_FN } from '@iqser/common-ui/lib/utils';
|
||||
import WebViewer, { WebViewerInstance } from '@pdftron/webviewer';
|
||||
import {
|
||||
AppConfig,
|
||||
DOSSIER_TEMPLATE_ID,
|
||||
@ -17,21 +23,15 @@ import {
|
||||
WatermarkOrientations,
|
||||
WatermarkVerticalAlignment,
|
||||
} from '@red/domain';
|
||||
import { stampPDFPage } from '@utils/page-stamper';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { WatermarkService } from '@services/entity-services/watermark.service';
|
||||
import { BehaviorSubject, firstValueFrom, Observable, of } from 'rxjs';
|
||||
import { LicenseService } from '@services/license.service';
|
||||
import { UserPreferenceService } from '@users/user-preference.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { WatermarksMapService } from '@services/entity-services/watermarks-map.service';
|
||||
import { Roles } from '@users/roles';
|
||||
import { environment } from '@environments/environment';
|
||||
import { tap } from 'rxjs/operators';
|
||||
import { LicenseService } from '@services/license.service';
|
||||
import { watermarkTranslations } from '@translations/watermark-translations';
|
||||
import { getCurrentUser } from '@iqser/common-ui/lib/users';
|
||||
import { AsControl, BASE_HREF_FN, Debounce, getParam, trackByFactory } from '@iqser/common-ui/lib/utils';
|
||||
import { TenantsService } from '@iqser/common-ui/lib/tenants';
|
||||
import { Roles } from '@users/roles';
|
||||
import { UserPreferenceService } from '@users/user-preference.service';
|
||||
import { stampPDFPage } from '@utils/page-stamper';
|
||||
import { BehaviorSubject, firstValueFrom, Observable, of } from 'rxjs';
|
||||
import { tap } from 'rxjs/operators';
|
||||
|
||||
export const DEFAULT_WATERMARK: Partial<IWatermark> = {
|
||||
text: 'Watermark',
|
||||
@ -63,12 +63,12 @@ interface WatermarkForm {
|
||||
})
|
||||
export class WatermarkScreenComponent implements OnInit {
|
||||
@ViewChild('viewer', { static: true }) private readonly _viewer: ElementRef<HTMLDivElement>;
|
||||
private readonly _convertPath = inject(BASE_HREF_FN);
|
||||
readonly #loaded$ = new BehaviorSubject(false);
|
||||
readonly #dossierTemplateId = getParam(DOSSIER_TEMPLATE_ID);
|
||||
readonly #watermarkId = Number(getParam(WATERMARK_ID));
|
||||
readonly #config = getConfig<AppConfig>();
|
||||
#watermark: Partial<IWatermark> = {};
|
||||
readonly #convertPath = inject(UI_ROOT_PATH_FN);
|
||||
readonly iconButtonTypes = IconButtonTypes;
|
||||
readonly translations = watermarkTranslations;
|
||||
readonly trackBy = trackByFactory();
|
||||
@ -145,6 +145,7 @@ export class WatermarkScreenComponent implements OnInit {
|
||||
|
||||
@Debounce()
|
||||
async configChanged() {
|
||||
console.log('configChanged');
|
||||
await this.#drawWatermark();
|
||||
}
|
||||
|
||||
@ -222,8 +223,8 @@ export class WatermarkScreenComponent implements OnInit {
|
||||
this.instance = await WebViewer(
|
||||
{
|
||||
licenseKey: this._licenseService.activeLicenseKey,
|
||||
path: this._convertPath('/assets/wv-resources'),
|
||||
css: this._convertPath('/assets/pdftron/stylesheet.css'),
|
||||
path: this.#convertPath('/assets/wv-resources'),
|
||||
css: this.#convertPath('/assets/pdftron/stylesheet.css'),
|
||||
fullAPI: true,
|
||||
isReadOnly: true,
|
||||
backendType: 'ems',
|
||||
@ -242,7 +243,7 @@ export class WatermarkScreenComponent implements OnInit {
|
||||
});
|
||||
|
||||
if (environment.production) {
|
||||
this.instance.Core.setCustomFontURL('https://' + window.location.host + this._convertPath('/assets/pdftron'));
|
||||
this.instance.Core.setCustomFontURL('https://' + window.location.host + this.#convertPath('/assets/pdftron'));
|
||||
}
|
||||
|
||||
this.#disableElements();
|
||||
|
||||
@ -25,7 +25,6 @@ import { ColorPickerModule } from 'ngx-color-picker';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||
import { IqserAuthGuard, IqserUsersModule } from '@iqser/common-ui/lib/users';
|
||||
import { TenantPipe } from '@iqser/common-ui/lib/tenants';
|
||||
|
||||
const routes: IqserRoutes = [
|
||||
{
|
||||
@ -72,7 +71,6 @@ const routes: IqserRoutes = [
|
||||
CircleButtonComponent,
|
||||
HasScrollbarDirective,
|
||||
IqserAllowDirective,
|
||||
TenantPipe,
|
||||
MatTooltipModule,
|
||||
],
|
||||
})
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
*allow="roles.watermarks.write; if: currentUser.isAdmin"
|
||||
[attr.help-mode-key]="'create_new_watermark'"
|
||||
[label]="'watermarks-listing.add-new' | translate"
|
||||
[routerLink]="getRouterLink() | tenant"
|
||||
[routerLink]="getRouterLink()"
|
||||
[type]="iconButtonTypes.primary"
|
||||
icon="iqser:plus"
|
||||
></iqser-icon-button>
|
||||
@ -44,13 +44,13 @@
|
||||
|
||||
<div class="cell">
|
||||
<div class="small-label">
|
||||
{{ entity.dateAdded | date : 'd MMM yyyy' }}
|
||||
{{ entity.dateAdded | date: 'd MMM yyyy' }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cell">
|
||||
<div class="small-label">
|
||||
{{ entity.dateModified | date : 'd MMM yyyy' }}
|
||||
{{ entity.dateModified | date: 'd MMM yyyy' }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
<div class="action-buttons">
|
||||
<div [attr.help-mode-key]="'edit_delete_watermark'">
|
||||
<iqser-circle-button
|
||||
[routerLink]="getRouterLink(entity) | tenant"
|
||||
[routerLink]="getRouterLink(entity)"
|
||||
[tooltip]="'watermarks-listing.action.edit' | translate"
|
||||
icon="iqser:edit"
|
||||
></iqser-circle-button>
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
<ng-container *ngFor="let item of items[type]">
|
||||
<a
|
||||
*ngIf="item.show"
|
||||
[attr.help-mode-key]="item.helpModeKey"
|
||||
[class.disabled]="isDisabled(item.screen)"
|
||||
[routerLinkActiveOptions]="{ exact: false }"
|
||||
[routerLink]="prefix + item.screen | tenant"
|
||||
[attr.help-mode-key]="item.helpModeKey"
|
||||
[routerLink]="prefix + item.screen"
|
||||
class="item"
|
||||
routerLinkActive="active"
|
||||
>
|
||||
|
||||
@ -4,7 +4,6 @@ import { ActivatedRoute, RouterLink, RouterLinkActive } from '@angular/router';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { getConfig, IqserHelpModeModule, IqserPermissionsService, isIqserDevMode } from '@iqser/common-ui';
|
||||
import { SideNavComponent } from '@iqser/common-ui/lib/shared';
|
||||
import { TenantPipe } from '@iqser/common-ui/lib/tenants';
|
||||
import { getCurrentUser } from '@iqser/common-ui/lib/users';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AdminSideNavType, AdminSideNavTypes, AppConfig, DOSSIER_TEMPLATE_ID, ENTITY_TYPE, User, WATERMARK_ID } from '@red/domain';
|
||||
@ -23,10 +22,9 @@ interface NavItem {
|
||||
templateUrl: './admin-side-nav.component.html',
|
||||
styleUrls: ['./admin-side-nav.component.scss'],
|
||||
standalone: true,
|
||||
imports: [TranslateModule, NgIf, IqserHelpModeModule, RouterLink, RouterLinkActive, NgForOf, SideNavComponent, TenantPipe],
|
||||
imports: [TranslateModule, NgIf, IqserHelpModeModule, RouterLink, RouterLinkActive, NgForOf, SideNavComponent],
|
||||
})
|
||||
export class AdminSideNavComponent implements OnInit {
|
||||
readonly #config = getConfig<AppConfig>();
|
||||
readonly isIqserDevMode = isIqserDevMode();
|
||||
@Input() type: AdminSideNavType;
|
||||
@Input() disabledItems: string[] = [];
|
||||
@ -34,6 +32,7 @@ export class AdminSideNavComponent implements OnInit {
|
||||
readonly currentUser = getCurrentUser<User>();
|
||||
readonly roles = Roles;
|
||||
prefix: string;
|
||||
readonly #config = getConfig<AppConfig>();
|
||||
readonly isDocumine = this.#config.IS_DOCUMINE;
|
||||
readonly canAccessRulesInDocumine = this.isDocumine && !this.#config.RULE_EDITOR_DEV_ONLY;
|
||||
readonly items: { readonly [key in AdminSideNavType]: NavItem[] } = {
|
||||
@ -102,7 +101,10 @@ export class AdminSideNavComponent implements OnInit {
|
||||
{
|
||||
screen: 'component-rules',
|
||||
label: _('admin-side-nav.component-rule-editor'),
|
||||
show: this.isDocumine && (this.isIqserDevMode || this.canAccessRulesInDocumine) && this._permissionsService.has(Roles.rules.read),
|
||||
show:
|
||||
this.isDocumine &&
|
||||
(this.isIqserDevMode || this.canAccessRulesInDocumine) &&
|
||||
this._permissionsService.has(Roles.rules.read),
|
||||
},
|
||||
{
|
||||
screen: 'default-colors',
|
||||
|
||||
@ -2,29 +2,25 @@
|
||||
<ng-container *ngIf="dossierTemplate$ | async as dossierTemplate">
|
||||
<a
|
||||
*ngIf="root || dossierTemplate"
|
||||
[routerLink]="'/main/admin/dossier-templates' | tenant"
|
||||
[routerLink]="'/main/admin/dossier-templates'"
|
||||
class="breadcrumb"
|
||||
translate="dossier-templates.label"
|
||||
></a>
|
||||
|
||||
<mat-icon svgIcon="iqser:arrow-right"></mat-icon>
|
||||
|
||||
<a
|
||||
[class.active]="(activeDictionary$ | async) === undefined"
|
||||
[routerLink]="dossierTemplate.routerLink | tenant"
|
||||
class="breadcrumb ml-0"
|
||||
>
|
||||
<a [class.active]="(activeDictionary$ | async) === undefined" [routerLink]="dossierTemplate.routerLink" class="breadcrumb ml-0">
|
||||
{{ dossierTemplate.name }}
|
||||
</a>
|
||||
|
||||
<ng-container *ngIf="activeDictionary$ | async as activeDictionary">
|
||||
<mat-icon svgIcon="iqser:arrow-right"></mat-icon>
|
||||
<a [routerLink]="dossierTemplate.routerLink + '/entities' | tenant" class="breadcrumb ml-0">
|
||||
<a [routerLink]="dossierTemplate.routerLink + '/entities'" class="breadcrumb ml-0">
|
||||
{{ 'admin-side-nav.entities' | translate }}
|
||||
</a>
|
||||
|
||||
<mat-icon svgIcon="iqser:arrow-right"></mat-icon>
|
||||
<a [routerLink]="activeDictionary.routerLink | tenant" class="breadcrumb ml-0" routerLinkActive="active">
|
||||
<a [routerLink]="activeDictionary.routerLink" class="breadcrumb ml-0" routerLinkActive="active">
|
||||
{{ activeDictionary.label }}
|
||||
</a>
|
||||
</ng-container>
|
||||
|
||||
@ -8,14 +8,13 @@ import { DictionariesMapService } from '@services/entity-services/dictionaries-m
|
||||
import { AsyncPipe, NgIf } from '@angular/common';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { TenantPipe } from '@iqser/common-ui/lib/tenants';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-dossier-template-breadcrumbs',
|
||||
templateUrl: './dossier-template-breadcrumbs.component.html',
|
||||
styleUrls: ['./dossier-template-breadcrumbs.component.scss'],
|
||||
standalone: true,
|
||||
imports: [NgIf, AsyncPipe, RouterLink, MatIconModule, TranslateModule, RouterLinkActive, TenantPipe],
|
||||
imports: [NgIf, AsyncPipe, RouterLink, MatIconModule, TranslateModule, RouterLinkActive],
|
||||
})
|
||||
export class DossierTemplateBreadcrumbsComponent {
|
||||
@Input() root = false;
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
<div
|
||||
(mousedown)="fileAttributesService.resetEdit()"
|
||||
[class.help-mode-active]="helpModeService?.isHelpModeActive$ | async"
|
||||
class="workflow-item"
|
||||
(mousedown)="fileAttributesService.resetEdit()"
|
||||
>
|
||||
<div class="details-wrapper">
|
||||
<div class="details">
|
||||
<div
|
||||
[attr.help-mode-key]="'workflow_view'"
|
||||
[matTooltip]="file.filename"
|
||||
[routerLink]="file.routerLink | tenant"
|
||||
[routerLink]="file.routerLink"
|
||||
class="filename pointer"
|
||||
matTooltipPosition="above"
|
||||
>
|
||||
|
||||
@ -28,7 +28,6 @@ import { FileAttributeComponent } from './components/file-attribute/file-attribu
|
||||
import { SharedModule } from '@shared/shared.module';
|
||||
import { IqserUsersModule } from '@iqser/common-ui/lib/users';
|
||||
import { StatusBarComponent } from '@iqser/common-ui/lib/shared';
|
||||
import { TenantPipe } from '@iqser/common-ui/lib/tenants';
|
||||
|
||||
const routes: IqserRoutes = [
|
||||
{
|
||||
@ -69,7 +68,6 @@ const routes: IqserRoutes = [
|
||||
HasScrollbarDirective,
|
||||
DynamicInputComponent,
|
||||
IqserAllowDirective,
|
||||
TenantPipe,
|
||||
DisableStopPropagationDirective,
|
||||
FileAttributeComponent,
|
||||
],
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { Component, computed, Inject } from '@angular/core';
|
||||
import { BASE_HREF } from '@iqser/common-ui/lib/utils';
|
||||
import { Component, computed } from '@angular/core';
|
||||
import { ViewMode, ViewModes } from '@red/domain';
|
||||
import { Roles } from '@users/roles';
|
||||
import { FileDataService } from '../../services/file-data.service';
|
||||
@ -30,7 +29,6 @@ export class ViewSwitchComponent {
|
||||
});
|
||||
|
||||
constructor(
|
||||
@Inject(BASE_HREF) private readonly _baseHref: string,
|
||||
readonly viewModeService: ViewModeService,
|
||||
private readonly _state: FilePreviewStateService,
|
||||
private readonly _fileDataService: FileDataService,
|
||||
|
||||
@ -26,17 +26,17 @@
|
||||
<iqser-circle-button
|
||||
(action)="openComponentLogView()"
|
||||
*allow="roles.getRss"
|
||||
[attr.help-mode-key]="'editor_scm'"
|
||||
[tooltip]="'file-preview.open-rss-view' | translate"
|
||||
class="ml-8"
|
||||
icon="red:extract"
|
||||
tooltipPosition="below"
|
||||
[attr.help-mode-key]="'editor_scm'"
|
||||
></iqser-circle-button>
|
||||
|
||||
<redaction-file-actions
|
||||
[dossier]="state.dossier()"
|
||||
[helpModeKeyPrefix]="'editor'"
|
||||
[file]="file"
|
||||
[helpModeKeyPrefix]="'editor'"
|
||||
[minWidth]="width"
|
||||
type="file-preview"
|
||||
></redaction-file-actions>
|
||||
@ -51,10 +51,10 @@
|
||||
|
||||
<iqser-circle-button
|
||||
(action)="toggleFullScreen()"
|
||||
[attr.help-mode-key]="'editor_full_screen'"
|
||||
[icon]="fullScreen ? 'red:exit-fullscreen' : 'red:fullscreen'"
|
||||
[tooltip]="'file-preview.fullscreen' | translate"
|
||||
class="ml-2"
|
||||
[attr.help-mode-key]="'editor_full_screen'"
|
||||
></iqser-circle-button>
|
||||
|
||||
<!-- Dev Mode Features-->
|
||||
@ -71,11 +71,11 @@
|
||||
|
||||
<iqser-circle-button
|
||||
*ngIf="!fullScreen"
|
||||
[routerLink]="state.dossier().routerLink | tenant"
|
||||
[attr.help-mode-key]="'editor_close'"
|
||||
[routerLink]="state.dossier().routerLink"
|
||||
[tooltip]="'common.close' | translate"
|
||||
class="ml-8"
|
||||
icon="iqser:close"
|
||||
[attr.help-mode-key]="'editor_close'"
|
||||
></iqser-circle-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -26,7 +26,6 @@ import {
|
||||
} from '@iqser/common-ui';
|
||||
import { IqserFiltersModule } from '@iqser/common-ui/lib/filtering';
|
||||
import { StatusBarComponent } from '@iqser/common-ui/lib/shared';
|
||||
import { TenantPipe } from '@iqser/common-ui/lib/tenants';
|
||||
import { IqserUsersModule } from '@iqser/common-ui/lib/users';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { SharedModule } from '@shared/shared.module';
|
||||
@ -151,7 +150,6 @@ const components = [
|
||||
RoundCheckboxComponent,
|
||||
IqserAllowDirective,
|
||||
IqserDenyDirective,
|
||||
TenantPipe,
|
||||
LogPipe,
|
||||
ReplaceNbspPipe,
|
||||
],
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { inject, Injectable, NgZone } from '@angular/core';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { getConfig, IqserPermissionsService } from '@iqser/common-ui';
|
||||
import { BASE_HREF_FN } from '@iqser/common-ui/lib/utils';
|
||||
import { AnnotationPermissions } from '@models/file/annotation.permissions';
|
||||
import { AnnotationWrapper } from '@models/file/annotation.wrapper';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
@ -17,7 +16,6 @@ export class PdfAnnotationActionsService {
|
||||
readonly #state = inject(FilePreviewStateService);
|
||||
readonly #translateService = inject(TranslateService);
|
||||
readonly #ngZone = inject(NgZone);
|
||||
readonly #convertPath = inject(BASE_HREF_FN);
|
||||
readonly #annotationActionsService = inject(AnnotationActionsService);
|
||||
readonly #iqserPermissionsService = inject(IqserPermissionsService);
|
||||
readonly #annotationManager = inject(REDAnnotationManager);
|
||||
@ -107,7 +105,7 @@ export class PdfAnnotationActionsService {
|
||||
#getButton(icon: string, title: string, action: () => void | Promise<void>): IHeaderElement {
|
||||
return {
|
||||
type: 'actionButton',
|
||||
img: this.#convertPath(`/assets/icons/general/${icon}.svg`),
|
||||
img: `ui/assets/icons/general/${icon}.svg`,
|
||||
title: this.#translateService.instant(title),
|
||||
onClick: () => this.#ngZone.run(async () => action()),
|
||||
};
|
||||
@ -121,7 +119,7 @@ export class PdfAnnotationActionsService {
|
||||
button.className = 'Button';
|
||||
button.style.setProperty('pointer-events', 'none');
|
||||
const img = document.createElement('img');
|
||||
img.src = this.#convertPath('/assets/icons/general/disabled-check.svg');
|
||||
img.src = 'ui/assets/icons/general/disabled-check.svg';
|
||||
button.appendChild(img);
|
||||
|
||||
return button;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { computed, effect, inject, Injectable, NgZone } from '@angular/core';
|
||||
import { getConfig, IqserPermissionsService } from '@iqser/common-ui';
|
||||
import { getCurrentUser } from '@iqser/common-ui/lib/users';
|
||||
import { BASE_HREF_FN, isJustOne, shareDistinctLast } from '@iqser/common-ui/lib/utils';
|
||||
import { isJustOne, shareDistinctLast, UI_ROOT_PATH_FN } from '@iqser/common-ui/lib/utils';
|
||||
import {
|
||||
ManualRedactionEntryType,
|
||||
ManualRedactionEntryTypes,
|
||||
@ -43,15 +43,6 @@ import Quad = Core.Math.Quad;
|
||||
|
||||
@Injectable()
|
||||
export class PdfProxyService {
|
||||
readonly #convertPath = inject(BASE_HREF_FN);
|
||||
readonly #visibilityOffIcon = this.#convertPath('/assets/icons/general/visibility-off.svg');
|
||||
readonly #visibilityIcon = this.#convertPath('/assets/icons/general/visibility.svg');
|
||||
readonly #falsePositiveIcon = this.#convertPath('/assets/icons/general/pdftron-action-false-positive.svg');
|
||||
readonly #addRedactionIcon = this._iqserPermissionsService.has(Roles.getRss)
|
||||
? this.#convertPath('/assets/icons/general/pdftron-action-add-annotation.svg')
|
||||
: this.#convertPath('/assets/icons/general/pdftron-action-add-redaction.svg');
|
||||
readonly #isDocumine = getConfig().IS_DOCUMINE;
|
||||
readonly #addHintIcon = this.#convertPath('/assets/icons/general/pdftron-action-add-hint.svg');
|
||||
readonly annotationSelected$ = this.#annotationSelected$;
|
||||
readonly manualAnnotationRequested$ = new Subject<ManualRedactionEntryWrapper>();
|
||||
readonly redactTextRequested$ = new Subject<ManualRedactionEntryWrapper>();
|
||||
@ -70,6 +61,15 @@ export class PdfProxyService {
|
||||
const isAllowed = this._permissionsService.canPerformAnnotationActions(this._state.file(), this._state.dossier());
|
||||
return isAllowed && isStandard;
|
||||
});
|
||||
readonly #convertPath = inject(UI_ROOT_PATH_FN);
|
||||
readonly #visibilityOffIcon = this.#convertPath('/assets/icons/general/visibility-off.svg');
|
||||
readonly #visibilityIcon = this.#convertPath('/assets/icons/general/visibility.svg');
|
||||
readonly #falsePositiveIcon = this.#convertPath('/assets/icons/general/pdftron-action-false-positive.svg');
|
||||
readonly #addRedactionIcon = this._iqserPermissionsService.has(Roles.getRss)
|
||||
? this.#convertPath('/assets/icons/general/pdftron-action-add-annotation.svg')
|
||||
: this.#convertPath('/assets/icons/general/pdftron-action-add-redaction.svg');
|
||||
readonly #isDocumine = getConfig().IS_DOCUMINE;
|
||||
readonly #addHintIcon = this.#convertPath('/assets/icons/general/pdftron-action-add-hint.svg');
|
||||
|
||||
constructor(
|
||||
private readonly _translateService: TranslateService,
|
||||
|
||||
@ -5,13 +5,13 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { PdfViewer } from './pdf-viewer.service';
|
||||
import { REDDocumentViewer } from './document-viewer.service';
|
||||
import { BASE_HREF_FN } from '@iqser/common-ui/lib/utils';
|
||||
import { UI_ROOT_PATH_FN } from '@common-ui/utils';
|
||||
|
||||
@Injectable()
|
||||
export class LayersService {
|
||||
private readonly _convertPath = inject(BASE_HREF_FN);
|
||||
readonly #enableIcon = this._convertPath('/assets/icons/general/pdftron-action-disable-layers.svg');
|
||||
readonly #disableIcon = this._convertPath('/assets/icons/general/pdftron-action-enable-layers.svg');
|
||||
readonly #convertPath = inject(UI_ROOT_PATH_FN);
|
||||
readonly #enableIcon = this.#convertPath('/assets/icons/general/pdftron-action-disable-layers.svg');
|
||||
readonly #disableIcon = this.#convertPath('/assets/icons/general/pdftron-action-enable-layers.svg');
|
||||
|
||||
private _active = false;
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import { ActivatedRoute } from '@angular/router';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { environment } from '@environments/environment';
|
||||
import { ErrorService, getConfig } from '@iqser/common-ui';
|
||||
import { BASE_HREF_FN, shareDistinctLast } from '@iqser/common-ui/lib/utils';
|
||||
import { shareDistinctLast, UI_ROOT_PATH_FN } from '@iqser/common-ui/lib/utils';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import WebViewer, { Core, WebViewerInstance, WebViewerOptions } from '@pdftron/webviewer';
|
||||
import { AppConfig, File, IHeaderElement } from '@red/domain';
|
||||
@ -16,17 +16,37 @@ import { map, startWith } from 'rxjs/operators';
|
||||
import { DISABLED_HOTKEYS, DOCUMENT_LOADING_ERROR, USELESS_ELEMENTS } from '../utils/constants';
|
||||
import { asList } from '../utils/functions';
|
||||
import { Rgb } from '../utils/types';
|
||||
import { REDAnnotationManager } from './annotation-manager.service';
|
||||
import Annotation = Core.Annotations.Annotation;
|
||||
import TextHighlightAnnotation = Core.Annotations.TextHighlightAnnotation;
|
||||
import DocumentViewer = Core.DocumentViewer;
|
||||
import Quad = Core.Math.Quad;
|
||||
import TextTool = Core.Tools.TextTool;
|
||||
import { REDAnnotationManager } from './annotation-manager.service';
|
||||
|
||||
@Injectable()
|
||||
export class PdfViewer {
|
||||
readonly #convertPath = inject(BASE_HREF_FN);
|
||||
readonly currentPage$ = inject(ActivatedRoute).queryParamMap.pipe(
|
||||
map(params => Number(params.get('page') ?? '1')),
|
||||
shareDistinctLast(),
|
||||
);
|
||||
readonly currentPage = toSignal(this.currentPage$);
|
||||
documentViewer: DocumentViewer;
|
||||
fileId: string;
|
||||
dossierId: string;
|
||||
pageChanged$: Observable<number>;
|
||||
readonly isCompareMode: Signal<boolean>;
|
||||
readonly totalPages: Signal<number>;
|
||||
searchOptions = {
|
||||
caseSensitive: false, // match case
|
||||
wholeWord: false, // match whole words only
|
||||
wildcard: false, // allow using '*' as a wildcard value
|
||||
regex: false, // string is treated as a regular expression
|
||||
searchUp: false, // search from the end of the document upwards
|
||||
ambientString: true, // return ambient string as part of the result
|
||||
};
|
||||
selectedText = '';
|
||||
#instance: WebViewerInstance;
|
||||
readonly #convertPath = inject(UI_ROOT_PATH_FN);
|
||||
readonly #licenseKey = inject(LicenseService).activeLicenseKey;
|
||||
readonly #config = getConfig<AppConfig>();
|
||||
readonly #isCompareMode = signal(false);
|
||||
@ -44,27 +64,6 @@ export class PdfViewer {
|
||||
};
|
||||
readonly #destroyRef = inject(DestroyRef);
|
||||
readonly #totalPages = signal<number>(0);
|
||||
readonly currentPage$ = inject(ActivatedRoute).queryParamMap.pipe(
|
||||
map(params => Number(params.get('page') ?? '1')),
|
||||
shareDistinctLast(),
|
||||
);
|
||||
readonly currentPage = toSignal(this.currentPage$);
|
||||
documentViewer: DocumentViewer;
|
||||
fileId: string;
|
||||
dossierId: string;
|
||||
pageChanged$: Observable<number>;
|
||||
readonly isCompareMode: Signal<boolean>;
|
||||
readonly totalPages: Signal<number>;
|
||||
|
||||
searchOptions = {
|
||||
caseSensitive: false, // match case
|
||||
wholeWord: false, // match whole words only
|
||||
wildcard: false, // allow using '*' as a wildcard value
|
||||
regex: false, // string is treated as a regular expression
|
||||
searchUp: false, // search from the end of the document upwards
|
||||
ambientString: true, // return ambient string as part of the result
|
||||
};
|
||||
selectedText = '';
|
||||
|
||||
constructor(
|
||||
private readonly _logger: NGXLogger,
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { BASE_HREF_FN } from '@iqser/common-ui/lib/utils';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { Core } from '@pdftron/webviewer';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { HeaderElements } from '../../file-preview/utils/constants';
|
||||
import { AnnotationDrawService } from './annotation-draw.service';
|
||||
import { PdfViewer } from './pdf-viewer.service';
|
||||
import { UI_ROOT_PATH_FN } from '@common-ui/utils';
|
||||
import Annotation = Core.Annotations.Annotation;
|
||||
|
||||
@Injectable()
|
||||
export class ReadableRedactionsService {
|
||||
private readonly _convertPath = inject(BASE_HREF_FN);
|
||||
readonly #enableIcon = this._convertPath('/assets/icons/general/redaction-preview.svg');
|
||||
readonly #disableIcon = this._convertPath('/assets/icons/general/redaction-final.svg');
|
||||
readonly #active$ = new BehaviorSubject<boolean>(true);
|
||||
readonly active$: Observable<boolean>;
|
||||
readonly #convertPath = inject(UI_ROOT_PATH_FN);
|
||||
readonly #enableIcon = this.#convertPath('/assets/icons/general/redaction-preview.svg');
|
||||
readonly #disableIcon = this.#convertPath('/assets/icons/general/redaction-final.svg');
|
||||
readonly #active$ = new BehaviorSubject<boolean>(true);
|
||||
|
||||
constructor(
|
||||
private readonly _pdf: PdfViewer,
|
||||
|
||||
@ -5,13 +5,13 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { PdfViewer } from './pdf-viewer.service';
|
||||
import { REDDocumentViewer } from './document-viewer.service';
|
||||
import { BASE_HREF_FN } from '@iqser/common-ui/lib/utils';
|
||||
import { UI_ROOT_PATH_FN } from '@common-ui/utils';
|
||||
|
||||
@Injectable()
|
||||
export class TooltipsService {
|
||||
private readonly _convertPath = inject(BASE_HREF_FN);
|
||||
readonly #enableIcon = this._convertPath('/assets/icons/general/pdftron-action-enable-tooltips.svg');
|
||||
readonly #disableIcon = this._convertPath('/assets/icons/general/pdftron-action-disable-tooltips.svg');
|
||||
readonly #convertPath = inject(UI_ROOT_PATH_FN);
|
||||
readonly #enableIcon = this.#convertPath('/assets/icons/general/pdftron-action-enable-tooltips.svg');
|
||||
readonly #disableIcon = this.#convertPath('/assets/icons/general/pdftron-action-disable-tooltips.svg');
|
||||
|
||||
constructor(
|
||||
private readonly _pdf: PdfViewer,
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { inject, Injectable, NgZone } from '@angular/core';
|
||||
import { getConfig, HelpModeService, IqserPermissionsService, isIqserDevMode } from '@iqser/common-ui';
|
||||
import { BASE_HREF_FN } from '@iqser/common-ui/lib/utils';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { IHeaderElement, RotationTypes } from '@red/domain';
|
||||
import { FilesMapService } from '@services/files/files-map.service';
|
||||
@ -16,6 +15,7 @@ import { PageRotationService } from './page-rotation.service';
|
||||
import { PdfViewer } from './pdf-viewer.service';
|
||||
import { ReadableRedactionsService } from './readable-redactions.service';
|
||||
import { TooltipsService } from './tooltips.service';
|
||||
import { UI_ROOT_PATH_FN } from '@common-ui/utils';
|
||||
|
||||
const divider: IHeaderElement = {
|
||||
type: 'divider',
|
||||
@ -23,7 +23,9 @@ const divider: IHeaderElement = {
|
||||
|
||||
@Injectable()
|
||||
export class ViewerHeaderService {
|
||||
readonly #convertPath = inject(BASE_HREF_FN);
|
||||
readonly events$: Observable<ViewerEvent>;
|
||||
toggleLoadAnnotations$: Observable<boolean>;
|
||||
#convertPath = inject(UI_ROOT_PATH_FN);
|
||||
readonly #iqserPermissionService = inject(IqserPermissionsService);
|
||||
readonly #isDocumine = getConfig().IS_DOCUMINE;
|
||||
#buttons: Map<HeaderElementType, IHeaderElement>;
|
||||
@ -43,8 +45,6 @@ export class ViewerHeaderService {
|
||||
[HeaderElements.APPLY_ROTATION, false],
|
||||
[HeaderElements.DISCARD_ROTATION, false],
|
||||
]);
|
||||
readonly events$: Observable<ViewerEvent>;
|
||||
toggleLoadAnnotations$: Observable<boolean>;
|
||||
|
||||
constructor(
|
||||
private readonly _filesMapService: FilesMapService,
|
||||
@ -329,6 +329,10 @@ export class ViewerHeaderService {
|
||||
this.enable([HeaderElements.COMPARE_BUTTON]);
|
||||
}
|
||||
|
||||
resetLayers() {
|
||||
this._layersService.resetLayers();
|
||||
}
|
||||
|
||||
#closeCompareMode() {
|
||||
this._pdf.closeCompareMode();
|
||||
const { dossierId, fileId } = this._pdf;
|
||||
@ -377,8 +381,4 @@ export class ViewerHeaderService {
|
||||
this.disable(ROTATION_ACTION_BUTTONS);
|
||||
}
|
||||
}
|
||||
|
||||
resetLayers() {
|
||||
this._layersService.resetLayers();
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<div class="cell small-label full-opacity stats-subtitle">
|
||||
<div>
|
||||
<mat-icon *ngIf="item.archived" svgIcon="red:archive"></mat-icon>
|
||||
<a [routerLink]="routerLink | tenant" iqserStopPropagation> {{ item.dossierName }}</a>
|
||||
<a [routerLink]="routerLink" iqserStopPropagation> {{ item.dossierName }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -8,7 +8,6 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
import { SearchItemTemplateComponent } from './search-item-template/search-item-template.component';
|
||||
import { IqserUsersModule } from '@iqser/common-ui/lib/users';
|
||||
import { StatusBarComponent } from '@iqser/common-ui/lib/shared';
|
||||
import { TenantPipe } from '@iqser/common-ui/lib/tenants';
|
||||
|
||||
const routes = [{ path: '', component: SearchScreenComponent }];
|
||||
|
||||
@ -23,7 +22,6 @@ const routes = [{ path: '', component: SearchScreenComponent }];
|
||||
IqserListingModule,
|
||||
StatusBarComponent,
|
||||
StopPropagationDirective,
|
||||
TenantPipe,
|
||||
],
|
||||
})
|
||||
export class SearchModule {}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
||||
import { List } from '@iqser/common-ui/lib/utils';
|
||||
import { DossierStats, IDossier } from '@red/domain';
|
||||
import { DossierTemplatesService } from '@services/dossier-templates/dossier-templates.service';
|
||||
import dayjs from 'dayjs';
|
||||
import { dateWithoutTime } from '@utils/functions';
|
||||
import { List } from '@iqser/common-ui/lib/utils';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const DUE_DATE_WARN_DAYS = 14;
|
||||
|
||||
interface PartialDossier extends Partial<IDossier> {
|
||||
export interface PartialDossier extends Partial<IDossier> {
|
||||
readonly dossierName: string;
|
||||
readonly dossierTemplateId: string;
|
||||
readonly dueDate?: string;
|
||||
|
||||
@ -20,11 +20,7 @@
|
||||
</div>
|
||||
|
||||
<div class="cell">
|
||||
<a
|
||||
*ngIf="item.isFile && fileDossier$ | async as fileDossier"
|
||||
[routerLink]="fileDossier.routerLink | tenant"
|
||||
class="small-label link-action"
|
||||
>
|
||||
<a *ngIf="item.isFile && fileDossier$ | async as fileDossier" [routerLink]="fileDossier.routerLink" class="small-label link-action">
|
||||
{{ fileDossier.dossierName }}
|
||||
</a>
|
||||
|
||||
@ -33,13 +29,13 @@
|
||||
|
||||
<div class="cell">
|
||||
<span class="small-label">
|
||||
{{ item.softDeletedTime | date : 'exactDate' }}
|
||||
{{ item.softDeletedTime | date: 'exactDate' }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="cell">
|
||||
<div class="small-label">
|
||||
{{ item.restoreDate | date : 'timeFromNow' }}
|
||||
{{ item.restoreDate | date: 'timeFromNow' }}
|
||||
</div>
|
||||
<div class="action-buttons">
|
||||
<iqser-circle-button
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output } from '@angular/core';
|
||||
import { Dossier, DossierStats, TrashDossier, TrashFile, TrashItem } from '@red/domain';
|
||||
import { Dossier, DossierStats, TrashFile, TrashItem } from '@red/domain';
|
||||
import { ActiveDossiersService } from '@services/dossiers/active-dossiers.service';
|
||||
import { DossierStatsService } from '@services/dossiers/dossier-stats.service';
|
||||
import { PartialDossier } from '@shared/components/dossier-name-column/dossier-name-column.component';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
@ -17,14 +18,17 @@ export class TrashTableItemComponent implements OnChanges {
|
||||
fileDossier$: Observable<Dossier>;
|
||||
dossierStats$: Observable<DossierStats>;
|
||||
|
||||
constructor(private readonly _activeDossiersService: ActiveDossiersService, readonly dossierStatsService: DossierStatsService) {}
|
||||
constructor(
|
||||
private readonly _activeDossiersService: ActiveDossiersService,
|
||||
readonly dossierStatsService: DossierStatsService,
|
||||
) {}
|
||||
|
||||
file(item: TrashItem): TrashFile {
|
||||
return item as TrashFile;
|
||||
}
|
||||
|
||||
dossier(item: TrashItem): TrashDossier {
|
||||
return item as TrashDossier;
|
||||
dossier(item: TrashItem): PartialDossier {
|
||||
return item as unknown as PartialDossier;
|
||||
}
|
||||
|
||||
ngOnChanges(): void {
|
||||
@ -32,7 +36,7 @@ export class TrashTableItemComponent implements OnChanges {
|
||||
this.fileDossier$ = this._activeDossiersService.getEntityChanged$(this.file(this.item).dossierId);
|
||||
}
|
||||
if (this.item.isDossier) {
|
||||
this.dossierStats$ = this.dossierStatsService.watch$(this.dossier(this.item).id);
|
||||
this.dossierStats$ = this.dossierStatsService.watch$(this.item.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,6 @@ import { SharedModule } from '@shared/shared.module';
|
||||
import { TrashDialogService } from './services/trash-dialog.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { IqserUsersModule } from '@iqser/common-ui/lib/users';
|
||||
import { TenantPipe } from '@iqser/common-ui/lib/tenants';
|
||||
|
||||
const routes = [{ path: '', component: TrashScreenComponent }];
|
||||
|
||||
@ -22,7 +21,6 @@ const routes = [{ path: '', component: TrashScreenComponent }];
|
||||
TranslateModule,
|
||||
IqserListingModule,
|
||||
CircleButtonComponent,
|
||||
TenantPipe,
|
||||
],
|
||||
providers: [TrashDialogService],
|
||||
})
|
||||
|
||||
@ -10,8 +10,9 @@ import { UserService } from '@users/user.service';
|
||||
import { CHANGED_CHECK_INTERVAL } from '@utils/constants';
|
||||
import { DossiersCacheService } from './dossiers/dossiers-cache.service';
|
||||
import dayjs from 'dayjs';
|
||||
import { BASE_HREF, List, mapEach } from '@iqser/common-ui/lib/utils';
|
||||
import { List, mapEach } from '@iqser/common-ui/lib/utils';
|
||||
import { TenantsService } from '@iqser/common-ui/lib/tenants';
|
||||
import { APP_BASE_HREF } from '@angular/common';
|
||||
|
||||
const INCLUDE_SEEN = false;
|
||||
|
||||
@ -23,13 +24,13 @@ const NOTIFICATIONS_THRESHOLD = 1000;
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class NotificationsService extends EntitiesService<INotification, Notification> implements OnDestroy {
|
||||
readonly #config = getConfig<AppConfig>();
|
||||
readonly #subscription = new Subscription();
|
||||
protected readonly _defaultModelPath = 'notification';
|
||||
protected readonly _entityClass = Notification;
|
||||
readonly #config = getConfig<AppConfig>();
|
||||
readonly #subscription = new Subscription();
|
||||
|
||||
constructor(
|
||||
@Inject(BASE_HREF) private readonly _baseHref: string,
|
||||
@Inject(APP_BASE_HREF) private readonly _baseHref: string,
|
||||
private readonly _translateService: TranslateService,
|
||||
private readonly _tenantsService: TenantsService,
|
||||
private readonly _userService: UserService,
|
||||
@ -96,7 +97,7 @@ export class NotificationsService extends EntitiesService<INotification, Notific
|
||||
}
|
||||
|
||||
private _getDossierHref(dossier: Dossier): string {
|
||||
return dossier ? `${this._baseHref}/${this._tenantsService.activeTenantId}${dossier.routerLink}` : null;
|
||||
return dossier ? `${this._baseHref}/${dossier.routerLink}` : null;
|
||||
}
|
||||
|
||||
private _getUsername(userId: string | undefined) {
|
||||
|
||||
@ -18,7 +18,7 @@ export class RedRoleGuard extends IqserRoleGuard {
|
||||
|
||||
if (!currentUser?.hasAnyRole) {
|
||||
this._logger.warn('[GUARD] User has no roles, redirect to auth-error');
|
||||
await this._router.navigate([`/${this._tenantsService.activeTenantId}/auth-error`]);
|
||||
await this._router.navigate(['/auth-error']);
|
||||
this._loadingService.stop();
|
||||
return false;
|
||||
}
|
||||
@ -26,7 +26,7 @@ export class RedRoleGuard extends IqserRoleGuard {
|
||||
// we have at least 1 RED Role -> if it's not user he must be an admin
|
||||
if (currentUser.isUserAdmin && !currentUser.isAdmin && state.url.includes('admin') && !state.url.includes('users')) {
|
||||
this._logger.warn('[GUARD] Redirect to users page');
|
||||
await this._router.navigate([`/${this._tenantsService.activeTenantId}/main/admin/users`]);
|
||||
await this._router.navigate(['/main/admin/users']);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ export class RedRoleGuard extends IqserRoleGuard {
|
||||
!currentUser.isUser &&
|
||||
!(state.url.includes('/main/admin/users') || state.url.includes('/main/account'))
|
||||
) {
|
||||
await this._router.navigate([`/${this._tenantsService.activeTenantId}/main/admin/users`]);
|
||||
await this._router.navigate(['/main/admin/users']);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -45,10 +45,10 @@ export class RedRoleGuard extends IqserRoleGuard {
|
||||
return true;
|
||||
}
|
||||
if (!currentUser.isUser) {
|
||||
await this._router.navigate([`/${this._tenantsService.activeTenantId}/main/admin`]);
|
||||
await this._router.navigate(['/main/admin']);
|
||||
} else {
|
||||
this._logger.warn('[GUARD] Redirect to tenant route');
|
||||
await this._router.navigate([`/${this._tenantsService.activeTenantId}`]);
|
||||
await this._router.navigate(['']);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ import { inject } from '@angular/core';
|
||||
import { Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { AsyncGuard, IqserPermissionsService, LoadingService } from '@iqser/common-ui';
|
||||
import { TenantsService } from '@iqser/common-ui/lib/tenants';
|
||||
import { BASE_HREF } from '@iqser/common-ui/lib/utils';
|
||||
import { ConfigService } from '@services/config.service';
|
||||
import { DossiersChangesService } from '@services/dossiers/dossier-changes.service';
|
||||
import { FeaturesService } from '@services/features.service';
|
||||
@ -13,6 +12,7 @@ import { UserPreferenceService } from '@users/user-preference.service';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
import { firstValueFrom } from 'rxjs';
|
||||
import { tap } from 'rxjs/operators';
|
||||
import { APP_BASE_HREF } from '@angular/common';
|
||||
|
||||
async function redirectToLastDossierTemplate(
|
||||
router: Router,
|
||||
@ -45,7 +45,7 @@ export function mainGuard(): AsyncGuard {
|
||||
const tenantsService = inject(TenantsService);
|
||||
const loadingService = inject(LoadingService);
|
||||
const configService = inject(ConfigService);
|
||||
const baseHref = inject(BASE_HREF);
|
||||
const baseHref = inject(APP_BASE_HREF);
|
||||
|
||||
const generalConfig$ = inject(GeneralSettingsService).getGeneralConfigurations();
|
||||
const updatedDisplayName$ = generalConfig$.pipe(tap(config => configService.updateDisplayName(config.displayName)));
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"ADMIN_CONTACT_NAME": null,
|
||||
"ADMIN_CONTACT_URL": null,
|
||||
"API_URL": "https://dan1.iqser.cloud",
|
||||
"API_URL": "https://dan.iqser.cloud",
|
||||
"APP_NAME": "RedactManager",
|
||||
"IS_DOCUMINE": false,
|
||||
"RULE_EDITOR_DEV_ONLY": false,
|
||||
@ -13,7 +13,7 @@
|
||||
"MAX_RETRIES_ON_SERVER_ERROR": 3,
|
||||
"OAUTH_CLIENT_ID": "redaction",
|
||||
"OAUTH_IDP_HINT": null,
|
||||
"OAUTH_URL": "https://dan1.iqser.cloud/auth",
|
||||
"OAUTH_URL": "https://dan.iqser.cloud/auth",
|
||||
"RECENT_PERIOD_IN_HOURS": 24,
|
||||
"SELECTION_MODE": "structural",
|
||||
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview",
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"target": "ES2022",
|
||||
"useDefineForClassFields": false
|
||||
},
|
||||
"files": ["src/main.ts", "src/polyfills.ts"],
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
@ -10,15 +10,7 @@ RUN yarn install
|
||||
ARG bamboo_sonarqube_api_token_secret
|
||||
ENV bamboo_sonarqube_api_token_secret=$bamboo_sonarqube_api_token_secret
|
||||
|
||||
COPY apps apps
|
||||
COPY libs libs
|
||||
COPY tools tools
|
||||
COPY yarn.lock yarn.lock
|
||||
COPY nx.json nx.json
|
||||
COPY .eslintrc.json .eslintrc.json
|
||||
COPY tsconfig.json tsconfig.json
|
||||
COPY paligo-styles paligo-styles
|
||||
COPY sonar.js sonar.js
|
||||
COPY . .
|
||||
## Build the angular app in production mode and store the artifacts in dist folder
|
||||
|
||||
# Fix auth issue then uncomment
|
||||
|
||||
7
docker/red-ui/docker-compose.yml
Normal file
7
docker/red-ui/docker-compose.yml
Normal file
@ -0,0 +1,7 @@
|
||||
services:
|
||||
red-ui:
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: ./docker/red-ui/Dockerfile
|
||||
ports:
|
||||
- '80:3000'
|
||||
@ -1,8 +0,0 @@
|
||||
const { gitDescribeSync } = require('git-describe');
|
||||
const { writeFileSync } = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const info = gitDescribeSync();
|
||||
const infoJson = JSON.stringify(info, null, 2);
|
||||
|
||||
writeFileSync(path.join(__dirname, '/.git-version.json'), infoJson);
|
||||
@ -1,5 +1,26 @@
|
||||
import { getJestProjects } from '@nx/jest';
|
||||
import type { Config } from 'jest';
|
||||
import { defaults } from 'jest-config';
|
||||
|
||||
export default {
|
||||
projects: getJestProjects(),
|
||||
};
|
||||
...defaults,
|
||||
displayName: 'red-ui',
|
||||
preset: 'jest-preset-angular',
|
||||
setupFilesAfterEnv: ['jest-preset-angular/setup-jest.js', 'jest-extended/all'],
|
||||
coverageDirectory: '../../coverage/apps/angular-jest',
|
||||
transform: {
|
||||
'^.+\\.(ts|mjs|js|html)$': [
|
||||
'jest-preset-angular',
|
||||
{
|
||||
tsconfig: '../../tsconfig.spec.json',
|
||||
stringifyContentPathRegex: '\\.(html|svg)$',
|
||||
},
|
||||
],
|
||||
},
|
||||
testEnvironment: 'jest-environment-jsdom',
|
||||
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
|
||||
snapshotSerializers: [
|
||||
'jest-preset-angular/build/serializers/no-ng-attributes',
|
||||
'jest-preset-angular/build/serializers/ng-snapshot',
|
||||
'jest-preset-angular/build/serializers/html-comment',
|
||||
],
|
||||
} as Config;
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
const nxPreset = require('@nx/jest/preset').default;
|
||||
|
||||
module.exports = { ...nxPreset };
|
||||
@ -1 +1 @@
|
||||
Subproject commit 2bb459961af80944c5cd56bac8bff1fc786dbebc
|
||||
Subproject commit fa574115aa9074c0bf0856780d4ec79c525a0989
|
||||
@ -4,6 +4,7 @@
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": ["plugin:@typescript-eslint/recommended"],
|
||||
"rules": {
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
"name": "red-domain",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"projectType": "library",
|
||||
"sourceRoot": "libs/red-domain/src",
|
||||
"prefix": "red"
|
||||
}
|
||||
@ -6,7 +6,6 @@ export class TrashDossier extends TrashItem implements Partial<IDossier> {
|
||||
readonly type = 'dossier';
|
||||
readonly icon = 'red:folder';
|
||||
|
||||
readonly isSoftDeleted = true;
|
||||
readonly fileDossierName = '-';
|
||||
|
||||
readonly dossierId: string;
|
||||
@ -16,7 +15,6 @@ export class TrashDossier extends TrashItem implements Partial<IDossier> {
|
||||
readonly date: string;
|
||||
readonly dueDate?: string;
|
||||
readonly ownerId: string;
|
||||
readonly softDeletedTime: string;
|
||||
readonly id: string;
|
||||
|
||||
constructor(
|
||||
@ -26,7 +24,7 @@ export class TrashDossier extends TrashItem implements Partial<IDossier> {
|
||||
readonly hasHardDeleteRights: boolean,
|
||||
readonly ownerName: string,
|
||||
) {
|
||||
super(_retentionHours, dossier.softDeletedTime, hasRestoreRights, hasHardDeleteRights);
|
||||
super(_retentionHours, dossier.softDeletedTime || '-', hasRestoreRights, hasHardDeleteRights);
|
||||
this.dossierId = dossier.dossierId;
|
||||
this.dossierTemplateId = dossier.dossierTemplateId;
|
||||
this.date = dossier.date;
|
||||
@ -34,10 +32,6 @@ export class TrashDossier extends TrashItem implements Partial<IDossier> {
|
||||
this.dueDate = dossier.dueDate;
|
||||
this.memberIds = dossier.memberIds;
|
||||
this.ownerId = dossier.ownerId;
|
||||
|
||||
// Because of migrations, for some this is not set
|
||||
this.softDeletedTime = dossier.softDeletedTime || '-';
|
||||
|
||||
this.id = this.dossierId;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../node_modules/@angular/service-worker/config/schema.json",
|
||||
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
|
||||
"index": "/index.html",
|
||||
"assetGroups": [
|
||||
{
|
||||
56
nx.json
56
nx.json
@ -1,56 +0,0 @@
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "master"
|
||||
},
|
||||
"npmScope": "redaction",
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"runner": "nx-cloud",
|
||||
"options": {
|
||||
"cacheableOperations": ["build", "lint", "test", "e2e"],
|
||||
"parallel": 1,
|
||||
"accessToken": "MTQ2MmM5NDQtZjcyNS00YzUwLTkwYjEtMmZkNDg5MzAzMGE4fHJlYWQtd3JpdGU="
|
||||
}
|
||||
}
|
||||
},
|
||||
"cli": {
|
||||
"analytics": false,
|
||||
"packageManager": "yarn",
|
||||
"schematicCollections": ["@angular-eslint/schematics"]
|
||||
},
|
||||
"defaultProject": "red-ui",
|
||||
"generators": {
|
||||
"@nx/angular:application": {
|
||||
"linter": "eslint",
|
||||
"unitTestRunner": "jest"
|
||||
},
|
||||
"@nx/angular:library": {
|
||||
"linter": "eslint",
|
||||
"unitTestRunner": "jest"
|
||||
},
|
||||
"@nx/angular:component": {}
|
||||
},
|
||||
"$schema": "./node_modules/nx/schemas/nx-schema.json",
|
||||
"targetDefaults": {
|
||||
"build": {
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": ["production", "^production"]
|
||||
},
|
||||
"lint": {
|
||||
"inputs": ["default", "{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/.eslintignore"]
|
||||
},
|
||||
"test": {
|
||||
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
|
||||
}
|
||||
},
|
||||
"namedInputs": {
|
||||
"default": ["{projectRoot}/**/*", "sharedGlobals"],
|
||||
"sharedGlobals": [
|
||||
"{workspaceRoot}/workspace.json",
|
||||
"{workspaceRoot}/tsconfig.json",
|
||||
"{workspaceRoot}/tslint.json",
|
||||
"{workspaceRoot}/nx.json"
|
||||
],
|
||||
"production": ["default", "!{projectRoot}/.eslintrc.json", "!{projectRoot}/src/test-setup.[jt]s"]
|
||||
}
|
||||
}
|
||||
28
package.json
28
package.json
@ -4,19 +4,15 @@
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "nx build",
|
||||
"build-lint-all": "nx build --project=red-ui --configuration production --base-href /ui/ --output-hashing all",
|
||||
"build": "ng build",
|
||||
"build-lint-all": "ng build --project=red-ui --configuration production --base-href /ui/ --output-hashing all",
|
||||
"build-paligo-styles": "mkdir -p dist/paligo-styles && sass --load-path=. paligo-styles/style.scss > dist/paligo-styles/redacto-theme.css",
|
||||
"i18n:extract": "ngx-translate-extract --input ./apps/red-ui/src ./libs/common-ui/src --output apps/red-ui/src/assets/i18n/{redact,scm}/{en,de}.json --clean --sort --format namespaced-json && prettier apps/red-ui/src/assets/i18n/*/*.json --write",
|
||||
"nx": "nx",
|
||||
"start": "nx serve",
|
||||
"update": "nx migrate latest",
|
||||
"start": "ng serve",
|
||||
"localazy": "ts-node tools/localazy/src/index.ts",
|
||||
"migrate": "nx migrate --run-migrations",
|
||||
"workspace-generator": "nx workspace-generator",
|
||||
"analyze": "nx build --stats-json && webpack-bundle-analyzer dist/apps/red-ui/stats.json",
|
||||
"analyze": "ng build --stats-json && webpack-bundle-analyzer dist/apps/red-ui/stats.json",
|
||||
"prepare": "husky install",
|
||||
"lint": "nx lint"
|
||||
"lint": "ng lint"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*": "prettier --ignore-unknown --write",
|
||||
@ -38,7 +34,6 @@
|
||||
"@messageformat/core": "^3.1.0",
|
||||
"@ngx-translate/core": "15.0.0",
|
||||
"@ngx-translate/http-loader": "8.0.0",
|
||||
"@nx/angular": "16.10.0",
|
||||
"@pdftron/webviewer": "10.5.0",
|
||||
"chart.js": "4.4.0",
|
||||
"dayjs": "1.11.10",
|
||||
@ -77,10 +72,6 @@
|
||||
"@angular/language-service": "16.2.9",
|
||||
"@bartholomej/ngx-translate-extract": "^8.0.2",
|
||||
"@localazy/ts-api": "^1.0.0",
|
||||
"@nx/eslint-plugin": "16.10.0",
|
||||
"@nx/jest": "16.10.0",
|
||||
"@nx/linter": "16.10.0",
|
||||
"@nx/workspace": "16.10.0",
|
||||
"@schematics/angular": "16.2.6",
|
||||
"@types/file-saver": "^2.0.5",
|
||||
"@types/jest": "29.5.5",
|
||||
@ -89,7 +80,6 @@
|
||||
"@typescript-eslint/eslint-plugin": "6.8.0",
|
||||
"@typescript-eslint/parser": "6.8.0",
|
||||
"axios": "1.5.1",
|
||||
"dotenv": "16.3.1",
|
||||
"eslint": "8.51.0",
|
||||
"eslint-config-prettier": "9.0.0",
|
||||
"eslint-plugin-prettier": "5.0.1",
|
||||
@ -101,16 +91,8 @@
|
||||
"jest-extended": "4.0.2",
|
||||
"jest-preset-angular": "13.1.2",
|
||||
"lint-staged": "15.0.1",
|
||||
"nx": "16.10.0",
|
||||
"nx-cloud": "16.5.2",
|
||||
"postcss": "8.4.31",
|
||||
"postcss-import": "15.1.0",
|
||||
"postcss-preset-env": "9.2.0",
|
||||
"postcss-url": "10.1.3",
|
||||
"prettier": "3.0.3",
|
||||
"sonarqube-scanner": "3.1.0",
|
||||
"superagent": "8.1.2",
|
||||
"superagent-promise": "^1.1.0",
|
||||
"ts-node": "10.9.1",
|
||||
"typescript": "5.1.6",
|
||||
"webpack": "5.89.0",
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/dist" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@ -8,8 +8,11 @@
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"useDefineForClassFields": false,
|
||||
"strictPropertyInitialization": false,
|
||||
"importHelpers": true,
|
||||
"target": "es2021",
|
||||
"target": "ES2022",
|
||||
"module": "es2020",
|
||||
"typeRoots": ["node_modules/@types"],
|
||||
"lib": ["es2021", "dom"],
|
||||
@ -35,7 +38,7 @@
|
||||
"@utils/*": ["apps/red-ui/src/app/utils/*"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules", "tmp"],
|
||||
"include": ["apps/red-ui/src/**/*.ts"],
|
||||
"angularCompilerOptions": {
|
||||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true,
|
||||
|
||||
@ -6,6 +6,5 @@
|
||||
"types": ["jest", "node"],
|
||||
"esModuleInterop": true
|
||||
},
|
||||
"files": ["src/test-setup.ts"],
|
||||
"include": ["jest.config.ts", "./libs/**/*.spec.ts", "./libs/**/*.d.ts"]
|
||||
}
|
||||
|
||||
@ -1 +0,0 @@
|
||||
APP_VERSION=4.0.0
|
||||
Loading…
x
Reference in New Issue
Block a user