Skip to content
This repository has been archived by the owner on May 16, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:hmcts/rpx-xui-test
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestman28 committed Apr 28, 2021
2 parents e6ac0f4 + d07a2a0 commit dca24a9
Show file tree
Hide file tree
Showing 5,596 changed files with 184,286 additions and 241 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
57 changes: 0 additions & 57 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,58 +1 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages
dist/*
tmp/*

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# IntelliJ IDEA files
.idea/
*.iml

# Visual Studio Code
.history/

# docs
docs/

# demo
demo/dist/
demo/node_modules

# package-lock
package-lock.json

.DS_Store
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"git.ignoreLimitWarning": true
}
185 changes: 1 addition & 184 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,185 +1,2 @@
# rpx-xui-test
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://travis-ci.org/hmcts/rpx-xui-test.svg?branch=master)](https://travis-ci.org/hmcts/rpx-xui-test)
[![codecov](https://codecov.io/gh/hmcts/rpx-xui-test/branch/master/graph/badge.svg)](https://codecov.io/gh/hmcts/rpx-xui-test)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/93a438c61ff54973bc09a4387497e282)](https://www.codacy.com/app/adr1ancho/rpx-xui-test?utm_source=github.com&utm_medium=referral&utm_content=hmcts/rpx-xui-test&utm_campaign=Badge_Grade)
[![Known Vulnerabilities](https://snyk.io/test/github/hmcts/rpx-xui-test/badge.svg)](https://snyk.io/test/github/hmcts/rpx-xui-test)
[![HitCount](http://hits.dwyl.io/hmcts/rpx-xui-test.svg)](#rpx-xui-test)
[![Issue Stats](http://issuestats.com/github/hmcts/rpx-xui-test/badge/pr)](http://issuestats.com/github/hmcts/rpx-xui-test)

# Quick Start (for local development and testing)

```bash
# Install all dependencies
yarn install

# Create symbolic link
yarn link

# Build library in watch mode
yarn build:watch
```

In your project folder that should consume the library:

```bash
# Go to consumer repository folder
cd case-management-web

# Link you library to the project
yarn link "@hmcts/rpx-xui-test"

yarn start

```

*Note: The linking might be broken so if your encounter problems please follow this process:*

```bash
# Install all dependencies
yarn install

# Build library in watch mode
yarn build:watch
```

In you project folder that should consume the library:

```bash
# Go to consumer repository folder
cd case-management-web

# Remove existing toolkit dist
rm -rf node_modules/\@hmcts/rpx-xui-test/dist

# Link you library to the project
cp <location of rpx-xui-test>/dist node_modules/\@hmcts/rpx-xui-test

yarn start

```

You can also have a quick look at an example usage of the UI Toolkit demo project (after both folders had `yarn install` ran on them) by:
```bash
# build UI Toolkit
yarn build:esm

# copy UI Toolkit dist folder to demo/node_modules/@hmcts/rpx-xui-test/dist
yarn build:demo

# start demo app and stub server in same process
yarn start
# Go to http://localhost:8080
```

# File Structure

```
case-ui-toolkit
|
├─ demo - Self documenting application consuming components from src/shared/components
| ├─ src - Application sources folder
| | ├─ app - Components and modules implementing application
| | ├─ public - Fonts and images for application
| | ├─ style - Styles for application
| | ├─ index.html - Index page of application
| | ├─ main.ts - Application initialisation logic
| | └─ tsconfig.app.js - Src folder typescript options to compile with
| ├─ stubs - Back end stubs the application starts off
| ├─ angular.js - Angular options to configure the application
| ├─ gulpfile.js - Gulp tasks to copy the built ui toolkit library to demo application
| ├─ heroku-publish.js - Script that deploys demo application latest master to Heroku
| ├─ package.json - yarn dependencies, scripts and package configuration for demo application
| ├─ README.md - README for the demo app
| ├─ server.js - Demo application startup script.
| ├─ tsconfig.js - Typescript base options that different config files derive from
| └─ yarn.lock - File storing locked down dependencies for consistent installs
|
├─ src - Library sources home folder
| ├─ scripts - Contains CI/Release related scripts
| ├─ components - Basic building blocks components with tests for CCD
| ├─ shared - Folder containing exportable components and directives that are shared with library consumers
| | ├─ components - Components that are meant to be shared with library consumers (e.g. ExUI)
| | | ├─<component> - Example component
| | | | ├─ domain - Component specific domain structures
| | | | ├─ services - Component specific services
| | | | └─ <component files> - Template, Component, Module and index files
| | ├─ directives - Directives that are meant to be shared with library consumers (e.g. ExUI)
| | | ├─<directive> - Example directive
| | | | ├─ domain - Directive specific domain structures
| | | | ├─ services - Directive specific services
| | | | └─ <directive files> - Template, Component, Module and index files
| | ├─ domain - Domain structures that are used by shared components and directives
| | ├─ fixture - Test domain builders and fixtures for shared components and directives
| | ├─ pipes - Pipes for shared components and directives
| | ├─ services - Common services for shared components and directives
| | └─ test - Other test helpers
| └─ index.ts - Library entry point that is used by builders
|
├─ .editorconfig - Common IDE configuration
├─ .gitignore - List of files that are ignored while publishing to git repo
├─ .npmignore - List of files that are ignored while publishing to npmjs
├─ .travis.yml - Travis CI configuration
├─ LICENSE.md - License details
├─ README.md - README for the library
├─ gulpfile.js - Gulp helper scripts
├─ karma-test-entry.ts - Entry script for Karma tests
├─ karma.conf.ts - Karma configuration for our unit tests
├─ package.json - yarn dependencies, scripts and package configuration
├─ tsconfig-aot.json - TypeScript configuration for AOT build
├─ tsconfig.json - TypeScript configuration for UMD and Test builds
├─ tslint.json - TypeScript linting configuration
├─ webpack-test.config.ts - Webpack configuration for building test version of the library
├─ webpack-umd.config.ts - Webpack configuration for building UMD bundle
└─ yarn.lock - yarn lock file that locks dependency versions
```

# Getting Started

## Build the library
- `yarn build` for building the library once (both ESM and AOT versions).
- `yarn build:watch` for building the library (both ESM and AOT versions) and watch for file changes.

You may also build UMD bundle and ESM files separately:
- `yarn build:esm` - for building AOT/JIT compatible versions of files.
- `yarn build:esm:watch` - the same as previous command but in watch-mode.
- `yarn build:umd` - for building UMD bundle only.
- `yarn build:umd:watch` - the same as previous command but in watch-mode.

## Build the library (for CCD devs working on ccd-case-management-web)
For CCD developers it should be noted the library should be built with just the `yarn build:esm` which is much faster. That will build the JIT version that is currently used by case management web.

## Other commands

#### Test the library
- `yarn test` for running all your `*.spec.ts` tests once. Generated code coverage report may be found in `coverage` folder.
- `yarn test:watch` for running all you `*.spec.ts` and watch for file changes.

# Library development workflow

In order to debug your library in browser you need to have Angular project that will consume your library, build the application and display it. For your convenience all of that should happen automatically in background so once you change library source code you should instantly see the changes in browser.

There are several ways to go here:
- Use your **real library-consumer project** and link your library to it via `yarn link` command (see below).
- Use [Angular-CLI](https://cli.angular.io/) to generate library-consumer project for you and then use `yarn link` to link your library to it.

### Using consumer applications

You may take advantage of watch-modes for library build in order to see changes to your library's source code immediately in your browser.

To do so you need to:
1. Open two console instances.
2. Launch library build in watch mode in first console instance by running `yarn build:watch` (assuming that you're in `case-ui-toolkit` root folder).
3. Launch your consumer project build (JIT version) in watch-mode by running `yarn start` in second console instance (for instance assuming that you're in `case-management-web` folder).

As a result once you change library source code it will be automatically re-compiled and in turn your JIT consuming project (e.g. case-management-web) will be automatically re-built and you will be able to see that changes in your browser instantly.

### Library Release

Travis build system automatically publish NPM packages including GitHub releases whenever there is a version change in package.json

Prerelease version from PR branch should follow the format as `x.y.z-RDM-xxx-prerelease`

## LICENSE

This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details.
test repo for github action workflow
62 changes: 62 additions & 0 deletions dist/app.config.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
export declare abstract class AbstractAppConfig {
abstract load(): Promise<void>;
abstract getLoginUrl(): string;
abstract getApiUrl(): string;
abstract getCaseDataUrl(): string;
abstract getDocumentManagementUrl(): string;
abstract getRemoteDocumentManagementUrl(): string;
abstract getAnnotationApiUrl(): string;
abstract getPostcodeLookupUrl(): string;
abstract getOAuth2ClientId(): string;
abstract getPaymentsUrl(): string;
abstract getPayBulkScanBaseUrl(): string;
abstract getCreateOrUpdateDraftsUrl(ctid: string): string;
abstract getViewOrDeleteDraftsUrl(did: string): string;
abstract getActivityUrl(): string;
abstract getActivityNexPollRequestMs(): number;
abstract getActivityRetry(): number;
abstract getActivityBatchCollectionDelayMs(): number;
abstract getActivityMaxRequestPerBatch(): number;
abstract getCaseHistoryUrl(caseId: string, eventId: string): string;
abstract getPrintServiceUrl(): string;
/**
* Dummy version replacing deprecated `getRemotePrintServiceUrl()`, to be removed in next major release
* @deprecated
* @returns `undefined`
*/
getRemotePrintServiceUrl(): string;
abstract getPaginationPageSize(): number;
abstract getBannersUrl(): string;
abstract getPrdUrl(): string;
abstract getCacheTimeOut(): number;
abstract getWorkAllocationApiUrl(): string;
getUserInfoApiUrl(): string;
}
export declare class CaseEditorConfig {
api_url: string;
case_data_url: string;
document_management_url: string;
login_url: string;
oauth2_client_id: string;
postcode_lookup_url: string;
remote_document_management_url: string;
annotation_api_url: string;
payments_url: string;
pay_bulk_scan_url: string;
activity_batch_collection_delay_ms: number;
activity_next_poll_request_ms: number;
activity_retry: number;
activity_url: string;
activity_max_request_per_batch: number;
print_service_url: string;
/**
* remote_print_service_url marked as optional since deprecation, ahead of removal in next major release
* @deprecated
*/
remote_print_service_url?: string;
pagination_page_size: number;
prd_url: string;
cache_time_out: number;
work_allocation_api_url: string;
user_info_api_url: string;
}
26 changes: 26 additions & 0 deletions dist/app.config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/app.config.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/app.config.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"__symbolic":"module","version":4,"metadata":{"AbstractAppConfig":{"__symbolic":"class","members":{"load":[{"__symbolic":"method"}],"getLoginUrl":[{"__symbolic":"method"}],"getApiUrl":[{"__symbolic":"method"}],"getCaseDataUrl":[{"__symbolic":"method"}],"getDocumentManagementUrl":[{"__symbolic":"method"}],"getRemoteDocumentManagementUrl":[{"__symbolic":"method"}],"getAnnotationApiUrl":[{"__symbolic":"method"}],"getPostcodeLookupUrl":[{"__symbolic":"method"}],"getOAuth2ClientId":[{"__symbolic":"method"}],"getPaymentsUrl":[{"__symbolic":"method"}],"getPayBulkScanBaseUrl":[{"__symbolic":"method"}],"getCreateOrUpdateDraftsUrl":[{"__symbolic":"method"}],"getViewOrDeleteDraftsUrl":[{"__symbolic":"method"}],"getActivityUrl":[{"__symbolic":"method"}],"getActivityNexPollRequestMs":[{"__symbolic":"method"}],"getActivityRetry":[{"__symbolic":"method"}],"getActivityBatchCollectionDelayMs":[{"__symbolic":"method"}],"getActivityMaxRequestPerBatch":[{"__symbolic":"method"}],"getCaseHistoryUrl":[{"__symbolic":"method"}],"getPrintServiceUrl":[{"__symbolic":"method"}],"getRemotePrintServiceUrl":[{"__symbolic":"method"}],"getPaginationPageSize":[{"__symbolic":"method"}],"getBannersUrl":[{"__symbolic":"method"}],"getPrdUrl":[{"__symbolic":"method"}],"getCacheTimeOut":[{"__symbolic":"method"}],"getWorkAllocationApiUrl":[{"__symbolic":"method"}],"getUserInfoApiUrl":[{"__symbolic":"method"}]}},"CaseEditorConfig":{"__symbolic":"class"}}}]
2 changes: 2 additions & 0 deletions dist/case-ui-toolkit.module.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export declare class CaseUIToolkitModule {
}
Loading

0 comments on commit dca24a9

Please sign in to comment.