Skip to content

Commit

Permalink
Merge pull request #353 from TAMULib/sprint18-staging
Browse files Browse the repository at this point in the history
Sprint18 staging
  • Loading branch information
wwelling authored May 19, 2021
2 parents 7cae335 + 31a6317 commit 2a7491e
Show file tree
Hide file tree
Showing 58 changed files with 1,134 additions and 384 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:

- name: "Install Chrome Drivers"
run: sudo apt-get install xvfb

- name: "Node Cache"
uses: actions/cache@v2
with:
Expand All @@ -27,7 +26,7 @@ jobs:
- name: "Setup Node"
uses: actions/setup-node@v2
with:
node-version: 10
node-version: 12

- name: "Install Node"
run: npm install
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [1.11.0] - 05-12-21
### Resolves

- The weaver modal bg should be displayed (and NOT flicker). (#328)
- Weaver modal only opens when a single modal is used.. (#346)
- Weaver components should offer a default theme group (modeled after btn). (#347)
- The Card Component should support theming.. (#350)
- Lighthouse build failing for weaver components. (#356)

## [1.10.0] - 04-23-21
### Resolves
- Weaver Modal button should be toggle-able. (#329 )
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![SEO](https://tamulib.github.io/weaver-components/reports/audit/assets/seo.svg)](https://tamulib.github.io/weaver-components/reports/audit/#seo)
[![Progressive Web App](https://tamulib.github.io/weaver-components/reports/audit/assets/pwa.svg)](https://tamulib.github.io/weaver-components/reports/audit/#pwa)

# WeaverComponents
# Weaver Components

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.3.21.

Expand Down
2 changes: 1 addition & 1 deletion lighthouserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"assertions": {
"first-contentful-paint": "off",
"categories:performance": ["error", {"minScore": 0}],
"categories:accessibility": ["error", {"minScore": 0.85}],
"categories:accessibility": ["error", {"minScore": 0.75}],
"categories:best-practices": ["error", {"minScore": 0}],
"categories:seo": ["error", {"minScore": 0}],
"categories:pwa":["error", {"minScore": 0}]
Expand Down
109 changes: 54 additions & 55 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "git",
"url": "git+https://github.com/TAMULib/weaver-components.git"
},
"version": "1.10.0",
"version": "1.11.0",
"private": false,
"license": "MIT",
"config": {
Expand Down Expand Up @@ -49,87 +49,86 @@
"test:watch": "ng test",
"test:report": "cat ./static/weaver-components/reports/coverage/wvr-elements/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"test:coverage": "ng test --no-watch --code-coverage",
"test:ci": "npm run test:coverage && npm run test:audit"
"test:ci": "npm run test:audit && npm run test:coverage"
},
"dependencies": {
"@angular/animations": "^11.0.4",
"@angular/common": "^11.0.4",
"@angular/compiler": "^11.0.4",
"@angular/core": "^11.0.4",
"@angular/elements": "^11.0.4",
"@angular/forms": "^11.0.4",
"@angular/localize": "^11.0.4",
"@angular/platform-browser": "^11.0.4",
"@angular/platform-browser-dynamic": "^11.0.4",
"@angular/router": "^11.0.4",
"@ng-bootstrap/ng-bootstrap": "^8.0.0",
"@ngrx/core": "^1.2.0",
"@ngrx/effects": "^10.1.1",
"@ngrx/entity": "^10.1.1",
"@ngrx/router-store": "^10.1.1",
"@ngrx/store": "^10.1.1",
"@ngrx/store-devtools": "^10.1.1",
"@tinymce/tinymce-angular": "^4.2.1",
"@types/json5": "^0.0.30",
"bootstrap": "^4.5.3",
"@angular/animations": "^11.2.13",
"@angular/common": "^11.2.13",
"@angular/compiler": "^11.2.13",
"@angular/core": "^11.2.13",
"@angular/elements": "^11.2.13",
"@angular/forms": "^11.2.13",
"@angular/localize": "^11.2.13",
"@angular/platform-browser": "^11.2.13",
"@angular/platform-browser-dynamic": "^11.2.13",
"@angular/router": "^11.2.13",
"@ng-bootstrap/ng-bootstrap": "^9.1.0",
"@ngrx/effects": "^11.1.1",
"@ngrx/entity": "^11.1.1",
"@ngrx/router-store": "^11.1.1",
"@ngrx/store": "^11.1.1",
"@ngrx/store-devtools": "^11.1.1",
"@tinymce/tinymce-angular": "^4.2.3",
"@types/json5": "^2.2.0",
"bootstrap": "^4.6.0",
"css-element-queries": "^1.2.3",
"document-register-element": "^1.14.5",
"handlebars": "^4.7.6",
"json5": "^2.1.3",
"ng-inline-svg": "^11.0.1",
"rxjs": "~6.6.3",
"tinymce": "^5.7.0",
"tslib": "^2.0.3",
"handlebars": "^4.7.7",
"json5": "^2.2.0",
"ng-inline-svg": "^12.1.0",
"npm": "^7.12.1",
"rxjs": "~6.6.7",
"tinymce": "^5.8.0",
"tslib": "^2.2.0",
"web-animations-js": "^2.3.2",
"zone.js": "~0.10.3"
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1100.4",
"@angular-devkit/build-angular": "^0.1102.12",
"@angular-devkit/build-ng-packagr": "~0.1002.0",
"@angular-devkit/schematics": "^11.0.4",
"@angular/cli": "^11.0.4",
"@angular/compiler-cli": "^11.0.4",
"@angular/language-service": "^11.0.4",
"@angular/localize": "11.0.4",
"@angular-devkit/schematics": "^11.2.12",
"@angular/cli": "^11.2.12",
"@angular/compiler-cli": "^11.2.13",
"@angular/language-service": "^11.2.13",
"@compodoc/compodoc": "^1.1.11",
"@lhci/cli": "^0.6.1",
"@ngrx/schematics": "^10.1.1",
"@lhci/cli": "^0.7.2",
"@ngrx/schematics": "^11.1.1",
"@pickra/copy-code-block": "^1.2.0",
"@types/jasmine": "~3.6.2",
"@types/jasminewd2": "~2.0.8",
"@types/node": "^14.14.14",
"@types/jasmine": "~3.7.2",
"@types/jasminewd2": "~2.0.9",
"@types/node": "^15.0.2",
"angular-tslint-rules": "^1.20.4",
"chalk": "^4.1.0",
"chalk": "^4.1.1",
"chrome-launcher": "^0.13.4",
"codelyzer": "^6.0.1",
"codelyzer": "^6.0.2",
"concat": "^1.0.3",
"console-stamp": "^3.0.0-rc4.2",
"console-stamp": "^3.0.2",
"coveralls": "^3.1.0",
"dotenv-override": "^5.0.1",
"dotenv-override-true": "^6.2.2",
"glob": "^7.1.6",
"glob": "^7.1.7",
"handlebars-loader": "^1.7.1",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~6.0.0",
"jsdom": "^16.4.0",
"karma": "^5.2.3",
"jasmine-core": "~3.7.1",
"jasmine-spec-reporter": "~7.0.0",
"jsdom": "^16.5.3",
"karma": "^6.3.2",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "^2.0.3",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"karma-jasmine-html-reporter": "^1.6.0",
"karma-ng-html2js-preprocessor": "^1.0.0",
"lighthouse": "^6.5.0",
"lighthouse-badges": "^1.0.37",
"ng-packagr": "^11.0.3",
"ngx-build-plus": "^10.1.1",
"lighthouse": "^7.4.0",
"lighthouse-badges": "^1.1.4",
"ng-packagr": "^11.2.4",
"ngx-build-plus": "^11.0.0",
"protractor": "~7.0.0",
"rimraf": "^3.0.2",
"shelljs": "^0.8.4",
"static-server": "^2.2.1",
"ts-loader": "^8.0.12",
"ts-loader": "^9.1.2",
"ts-node": "~9.1.1",
"tslint": "~6.1.3",
"typescript": "~4.0.5"
"typescript": "~4.0.7"
}
}
2 changes: 1 addition & 1 deletion projects/wvr-elements/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"lib": {
"entryFile": "src/public-api.ts"
},
"whitelistedNonPeerDependencies": [
"allowedNonPeerDependencies": [
"css-element-queries",
"handlebars"
]
Expand Down
2 changes: 1 addition & 1 deletion projects/wvr-elements/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wvr/elements",
"version": "1.10.0",
"version": "1.11.0",
"description": "Collection of angular components for Weaver's Custom Web Component UI",
"author": "Texas A&M University Libraries",
"private": false,
Expand Down
26 changes: 26 additions & 0 deletions projects/wvr-elements/src/lib/core/action-registry.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Injectable } from '@angular/core';
import { actions } from './actions';

/**
* A registry for actions that can be dispatched.
*/
@Injectable({
providedIn: 'root'
})
export class ActionRegistryService {

private actions: any;

constructor() {
this.actions = { ...actions };
}

getActions(key: string): any {
return this.actions[key];
}

putActions(key: string, action: any): any {
this.actions[key] = action ;
}

}
13 changes: 13 additions & 0 deletions projects/wvr-elements/src/lib/core/effects.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { ManifestEffects as Manifest } from './manifest/manifest.effects';
import { ModalEffects as Modal } from './modal/modal.effects';
import { RestEffects as Rest } from './rest/rest.effects';
import { ThemeEffects as Theme } from './theme/theme.effects';
import { WysiwygEffects as Wysiwyg } from './wysiwyg/wysiwyg.effects';

export const effects = {
Manifest,
Modal,
Rest,
Theme,
Wysiwyg
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export interface ManifestEntryRequest {
method?: RequestMethod;
body?: any;
options?: RequestOptions;
decode?: string[];
bodyHttpParams?: 'fromObject' | 'fromString';
onSuccess?: Array<Action>;
onFailure?: Array<Action>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const submitRequestFailure = createAction(
props<{
manifest: Manifest,
request: ManifestEntryRequest,
error: any
response: any
}>()
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ export class ManifestEffects {
url,
method,
options,
body: request.body,
decode: request.decode,
bodyHttpParams: request.bodyHttpParams,
map: entry.map
},
success: response => onSuccess.concat(ManifestActions.submitRequestSuccess({ manifest, request, response })),
failure: error => onFailure.concat(ManifestActions.submitRequestFailure({ manifest, request, error }))
failure: response => onFailure.concat(ManifestActions.submitRequestFailure({ manifest, request, response }))
});
})
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,16 +292,16 @@ describe('Manifest Reducer', () => {

// submit request failure
it('should have submit request failure', () => {
const error = {};
let submitRequestAction = fromManifestActions.submitRequestFailure({manifest, request, error});
const response = {};
let submitRequestAction = fromManifestActions.submitRequestFailure({manifest, request, response});
let submitRequestReducer = fromManifestReducers.reducer(state,submitRequestAction);
expect(JSON.stringify(updateOneAdpater)===JSON.stringify(submitRequestReducer))
.toBe(true);
request = {
manifestName: "Directory App",
entryName: "All Sorted"
};
submitRequestAction = fromManifestActions.submitRequestFailure({manifest, request, error});
submitRequestAction = fromManifestActions.submitRequestFailure({manifest, request, response});
submitRequestReducer = fromManifestReducers.reducer(state,submitRequestAction);
expect(JSON.stringify(updateOneAdpater)===JSON.stringify(submitRequestReducer))
.toBe(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ const manifestReducer = createReducer(
});
}),
// tslint:disable-next-line:arrow-return-shorthand
on(ManifestActions.submitRequestFailure, (state, { request, error, manifest }) => {
on(ManifestActions.submitRequestFailure, (state, { request, response, manifest }) => {
return adapter.updateOne({
id: manifest.name,
changes: {
entries: manifest.entries.map(entry => {
if (entry.name === request.entryName) {
return { ...entry, request, error };
return { ...entry, request, response };
}

return entry;
Expand Down
2 changes: 1 addition & 1 deletion projects/wvr-elements/src/lib/core/mobile.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { fromEvent, Observable } from 'rxjs';
import { delay, map, throttleTime } from 'rxjs/operators';
import { map, throttleTime } from 'rxjs/operators';

/**
* A centralized uitlity for logic conerning mobile layout.
Expand Down
Loading

0 comments on commit 2a7491e

Please sign in to comment.