Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ab#74456 - Integration of document management #2669

Draft
wants to merge 8 commits into
base: beta
Choose a base branch
from
4 changes: 4 additions & 0 deletions apps/back-office/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
ResourceSelectTextComponent,
TestServiceDropdownComponent,
CodeEditorComponent,
CsDocsPropertiesDropdownComponent,
AcceptedValueTypesTextComponent,
} from '@oort-front/shared';

/**
Expand All @@ -32,6 +34,8 @@ export class AppComponent implements OnInit {
ResourceSelectTextComponent,
TestServiceDropdownComponent,
CodeEditorComponent,
CsDocsPropertiesDropdownComponent,
AcceptedValueTypesTextComponent,
];
/** Application title */
title = 'back-office';
Expand Down
1 change: 1 addition & 0 deletions apps/back-office/src/environments/environment.azure.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ export const environment: Environment = {
attributes: ['country', 'region', 'location', 'department'],
},
admin0Url: 'https://ems2-dev.who.int/app-builder/admin0.json',
csApiUrl: 'https://hems-dev.who.int/csapi/api',
};
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ export const environment: Environment = {
user: {
attributes: ['country', 'region', 'location', 'department'],
},
csApiUrl: 'https://hems-dev.who.int/csapi/api',
};
1 change: 1 addition & 0 deletions apps/back-office/src/environments/environment.azure.sit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,5 @@ export const environment: Environment = {
user: {
attributes: ['country', 'region', 'location', 'department'],
},
csApiUrl: 'https://hems-dev.who.int/csapi/api',
};
1 change: 1 addition & 0 deletions apps/back-office/src/environments/environment.azure.uat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ export const environment: Environment = {
attributes: ['country', 'region', 'location', 'department'],
},
admin0Url: 'https://ems2-test.who.int/app-builder/admin0.json',
csApiUrl: 'https://hems-dev.who.int/csapi/api',
};
1 change: 1 addition & 0 deletions apps/back-office/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ export const environment: Environment = {
'tabs',
],
admin0Url: 'https://ems2-dev.who.int/app-builder/admin0.json',
csApiUrl: 'https://hems-dev.who.int/csapi/api',
};
1 change: 1 addition & 0 deletions apps/back-office/src/environments/environment.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ export interface Environment {
maxFileSize?: number;
user?: UserConfiguration;
admin0Url?: string;
csApiUrl?: string;
}
1 change: 1 addition & 0 deletions apps/back-office/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0"
/>
<script type="module" src="https://ems2-dev.who.int/csdocui/Scripts/build/docui.esm.js"></script>
</head>
<body>
<app-root></app-root>
Expand Down
2 changes: 1 addition & 1 deletion apps/front-office/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"esri-leaflet-heatmap",
"esri-leaflet-renderers",
"jsonpath",
"to-json-schema",
"to-json-schema",
"email-validator"
]
},
Expand Down
4 changes: 4 additions & 0 deletions apps/front-office/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import {
ResourceSelectTextComponent,
TestServiceDropdownComponent,
AuthService,
CsDocsPropertiesDropdownComponent,
AcceptedValueTypesTextComponent,
} from '@oort-front/shared';

/**
Expand All @@ -30,6 +32,8 @@ export class AppComponent implements OnInit {
ResourceDropdownComponent,
ResourceSelectTextComponent,
TestServiceDropdownComponent,
CsDocsPropertiesDropdownComponent,
AcceptedValueTypesTextComponent,
];
/** Application title */
title = 'front-office';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ export const environment: Environment = {
attributes: ['country', 'region', 'location', 'department'],
},
admin0Url: 'https://ems2-dev.who.int/app-builder/admin0.json',
csApiUrl: 'https://hems-dev.who.int/csapi/api',
};
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ export const environment: Environment = {
user: {
attributes: ['country', 'region', 'location', 'department'],
},
csApiUrl: 'https://hems-dev.who.int/csapi/api',
};
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ export const environment: Environment = {
user: {
attributes: ['country', 'region', 'location', 'department'],
},
csApiUrl: 'https://hems-dev.who.int/csapi/api',
};
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ export const environment: Environment = {
attributes: ['country', 'region', 'location', 'department'],
},
admin0Url: 'https://ems2-test.who.int/app-builder/admin0.json',
csApiUrl: 'https://hems-dev.who.int/csapi/api',
};
1 change: 1 addition & 0 deletions apps/front-office/src/environments/environment.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ export interface Environment {
maxFileSize?: number;
user?: UserConfiguration;
admin0Url?: string;
csApiUrl?: string;
}
26 changes: 7 additions & 19 deletions apps/web-widgets/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,15 @@
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
"outputs": [
"{options.outputPath}"
],
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/apps/web-widgets",
"index": "apps/web-widgets/src/index.html",
"main": "apps/web-widgets/src/main.ts",
"polyfills": [
"apps/web-widgets/src/polyfills.ts"
],
"polyfills": ["apps/web-widgets/src/polyfills.ts"],
"tsConfig": "apps/web-widgets/tsconfig.app.json",
"inlineStyleLanguage": "scss",
"styles": [
"apps/web-widgets/src/styles.scss"
],
"styles": ["apps/web-widgets/src/styles.scss"],
"scripts": [
"node_modules/tinymce/tinymce.min.js",
"node_modules/tinymce/themes/silver/theme.min.js"
Expand Down Expand Up @@ -249,9 +243,7 @@
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": [
"{options.outputFile}"
],
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
"apps/web-widgets/**/*.ts",
Expand All @@ -261,9 +253,7 @@
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": [
"{workspaceRoot}/coverage/{projectRoot}"
],
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/web-widgets/jest.config.ts",
"passWithNoTests": true
Expand All @@ -278,11 +268,9 @@
"bundle": {
"executor": "nx:run-commands",
"options": {
"commands": [
"node .scripts/build-widgets.js"
]
"commands": ["node .scripts/build-widgets.js"]
}
}
},
"tags": []
}
}
4 changes: 4 additions & 0 deletions apps/web-widgets/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Component } from '@angular/core';
import {
AcceptedValueTypesTextComponent,
ApplicationDropdownComponent,
CsDocsPropertiesDropdownComponent,
GeofieldsListboxComponent,
ReferenceDataDropdownComponent,
ResourceAvailableFieldsComponent,
Expand Down Expand Up @@ -28,6 +30,8 @@ export class AppComponent {
ResourceDropdownComponent,
ResourceSelectTextComponent,
TestServiceDropdownComponent,
CsDocsPropertiesDropdownComponent,
AcceptedValueTypesTextComponent,
];

/** Title of web-widgets app */
Expand Down
1 change: 1 addition & 0 deletions apps/web-widgets/src/environments/environment.azure.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const environment: Environment = {
// tinymceBaseUrl: 'https://ems2-dev.who.int/app-builder/tinymce',
// i18nUrl: 'https://ems2-dev.who.int/app-builder/i18n/',
admin0Url: 'https://ems2-dev.who.int/app-builder/admin0.json',
csApiUrl: 'https://hems-dev.who.int/csapi/api',
user: {
attributes: ['country', 'region', 'location', 'department'],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ export const environment: Environment = {
user: {
attributes: ['country', 'region', 'location', 'department'],
},
csApiUrl: 'https://hems-dev.who.int/csapi/api',
};
1 change: 1 addition & 0 deletions apps/web-widgets/src/environments/environment.azure.uat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ export const environment: Environment = {
attributes: ['country', 'region', 'location', 'department'],
},
admin0Url: 'https://ems2-test.who.int/app-builder/admin0.json',
csApiUrl: 'https://hems-dev.who.int/csapi/api',
};
1 change: 1 addition & 0 deletions apps/web-widgets/src/environments/environment.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ export interface Environment {
tinymceBaseUrl: string;
i18nUrl: string;
admin0Url?: string;
csApiUrl?: string;
}
36 changes: 36 additions & 0 deletions libs/doc-management/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "doc",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "doc",
"style": "kebab-case"
}
]
},
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
]
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"rules": {}
}
]
}
33 changes: 33 additions & 0 deletions libs/doc-management/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import type { StorybookConfig } from '@storybook/angular';

/**
* Storybook configuration
*/
const config: StorybookConfig = {
stories: ['../**/*.stories.@(js|jsx|ts|tsx|mdx)'],
addons: [
'@storybook/addon-mdx-gfm',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
staticDirs: [
{
from: '../../../assets',
to: '/assets',
},
{
from: '../../shared/src/i18n',
to: '/assets/i18n',
},
],
framework: {
name: '@storybook/angular',
options: {},
},
};

export default config;

// To customize your webpack configuration you can use the webpackFinal field.
// Check https://storybook.js.org/docs/react/builders/webpack#extending-storybooks-webpack-config
// and https://nx.dev/packages/storybook/documents/custom-builder-configs
17 changes: 17 additions & 0 deletions libs/doc-management/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0"
/>
</head>
</html>
4 changes: 4 additions & 0 deletions libs/doc-management/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import '@angular/localize/init';
// import { setCompodocJson } from '@storybook/addon-docs/angular';
// import docJson from '../documentation.json';
// setCompodocJson(docJson);
17 changes: 17 additions & 0 deletions libs/doc-management/.storybook/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"emitDecoratorMetadata": true
},

"exclude": ["../**/*.spec.ts"],
"include": [
"../src/**/*.stories.ts",
"../src/**/*.stories.js",
"../src/**/*.stories.jsx",
"../src/**/*.stories.tsx",
"../src/**/*.stories.mdx",
"../src/**/*.component.ts",
"*.js"
]
}
7 changes: 7 additions & 0 deletions libs/doc-management/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# doc-management

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test doc-management` to execute the unit tests.
22 changes: 22 additions & 0 deletions libs/doc-management/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* eslint-disable */
export default {
displayName: 'doc-management',
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
coverageDirectory: '../../coverage/libs/doc-management',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
},
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',
],
};
Loading