Skip to content

Commit

Permalink
Pull request #1536: Release/patch 12.0.2
Browse files Browse the repository at this point in the history
Merge in OUI/oblique from release/patch_12.0.2 to master

* commit 'db02c3b1306be10b4972213291b0ddf6d0bd9ac5':
  chore(toolchain): release version 12.0.2
  chore(toolchain): update dependencies and refactor accordingly
  fix(oblique/service-navigation): increase the padding around the profile & authentication widgets
  fix(oblique/master-layout): removes the padding around the service navigation in collapsed mode
  fix(oblique/master-layout): don't process fragments if none is provided
  test(oblique/master-layout): add route test cases on component initialization
  test(oblique/master-layout): remove deprecated `RouterTestingModule`
  test(oblique/master-layout): fix typo in `describe`
  fix(toolchain): ensure that peerDependencies are not modified
  fix(sandbox/service-navigation): avoid `undefined` error when started without PAMS
  fix(service-navigation/web-component): only import needed styles
  fix(toolchain): don't run `install-dependencies` script on windows
  • Loading branch information
nina-egger committed Nov 15, 2024
2 parents 7be37c8 + db02c3b commit d4d820c
Show file tree
Hide file tree
Showing 34 changed files with 563 additions and 415 deletions.
737 changes: 386 additions & 351 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Oblique",
"name": "oblique",
"version": "12.0.1",
"version": "12.0.2",
"license": "MIT",
"organization": {
"name": "Federal Office of Information Technology, Systems and Telecommunication FOITT",
Expand Down Expand Up @@ -47,12 +47,12 @@
"@angular/common": "^18.2.4",
"@angular/compiler": "^18.2.4",
"@angular/core": "^18.2.4",
"@angular/forms": "^18.2.10",
"@angular/forms": "^18.2.12",
"@angular/material": "^18.2.4",
"@angular/material-moment-adapter": "^18.2.11",
"@angular/material-moment-adapter": "^18.2.13",
"@angular/platform-browser": "^18.2.4",
"@angular/platform-browser-dynamic": "^18.2.10",
"@angular/router": "^18.2.10",
"@angular/platform-browser-dynamic": "^18.2.12",
"@angular/router": "^18.2.12",
"@ngx-translate/core": "^15.0.0",
"@popperjs/core": "^2.11.8",
"ajv": "^8.17.1",
Expand All @@ -66,16 +66,16 @@
},
"devDependencies": {
"@angular-builders/jest": "^18.0.0",
"@angular-devkit/build-angular": "^18.2.11",
"@angular-devkit/build-angular": "^18.2.12",
"@angular-devkit/core": "^18.2.4",
"@angular-eslint/eslint-plugin": "^18.3.1",
"@angular-eslint/eslint-plugin-template": "^18.3.1",
"@angular-eslint/template-parser": "^18.4.0",
"@angular/cli": "^18.2.11",
"@angular/compiler-cli": "^18.2.10",
"@angular/cli": "^18.2.12",
"@angular/compiler-cli": "^18.2.12",
"@types/jest": "^29.5.14",
"@types/js-cookie": "^3.0.6",
"@types/node": "^20.17.5",
"@types/node": "^20.17.6",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"chalk": "^4.1.2",
Expand All @@ -89,7 +89,7 @@
"stylelint": "^16.10.0",
"stylelint-config-prettier-scss": "^1.0.0",
"stylelint-config-standard-scss": "^13.1.0",
"stylelint-scss": "^6.8.1",
"stylelint-scss": "^6.9.0",
"ts-node": "^10.9.2",
"typescript": "~5.5.4"
}
Expand Down
2 changes: 1 addition & 1 deletion projects/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oblique/cli",
"version": "12.0.1",
"version": "12.0.2",
"description": "Command Line Interface to manage Oblique projects",
"keywords": [
"ob",
Expand Down
2 changes: 1 addition & 1 deletion projects/cli/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sonar.projectName=@oblique/cli
sonar.projectKey=oblique_cli
sonar.projectVersion=12.0.1-rc.1
sonar.projectVersion=12.0.2
sonar.typescript.lcov.reportPaths=coverage/cli/lcov.info
sonar.testExecutionReportPaths=coverage/cli/sqr.xml
sonar.tests=projects/cli/src
Expand Down
2 changes: 1 addition & 1 deletion projects/design-system/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oblique/design-system",
"version": "12.0.1",
"version": "12.0.2",
"scripts": {
"lint": "ts-node scripts/lint.ts",
"format": "ts-node scripts/lint.ts --fix",
Expand Down
2 changes: 1 addition & 1 deletion projects/design-system/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sonar.projectName=@oblique/design-system
sonar.projectKey=oblique_design-system
sonar.projectVersion=12.0.1-rc.1
sonar.projectVersion=12.0.2
sonar.typescript.lcov.reportPaths=coverage/design-system/lcov.info
sonar.testExecutionReportPaths=coverage/design-system/sqr.xml
sonar.tests=projects/design-system/src/lib
Expand Down
8 changes: 8 additions & 0 deletions projects/oblique/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# [12.0.2](https://github.com/oblique-bit/oblique/compare/12.0.1...12.0.2) (2024-11-15)

## Bug Fixes

- **master-layout:** removes the padding around the service navigation in collapsed mode ([5e140b33](https://github.com/oblique-bit/oblique/commit/5e140b3356982c722f203ca303f8af8a00020234))
- **master-layout:** don't process fragments if none is provided ([ddaf7028](https://github.com/oblique-bit/oblique/commit/ddaf7028f18b62d7222c31b593cfe69cdc723a2f))
- **service-navigation:** increase the padding around the profile & authentication widgets ([1853ee4e](https://github.com/oblique-bit/oblique/commit/1853ee4e279688567e1936f60f261af2a7665abc))

# [12.0.1](https://github.com/oblique-bit/oblique/compare/12.0.0...12.0.1) (2024-11-01)

## Bug Fixes
Expand Down
8 changes: 4 additions & 4 deletions projects/oblique/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ module.exports.coverageThreshold = {
lines: 91
},
'projects/oblique/src/lib/master-layout/master-layout/*.ts': {
statements: 87,
branches: 56,
functions: 74,
lines: 86
statements: 97,
branches: 92,
functions: 94,
lines: 97
},
'projects/oblique/src/lib/master-layout/master-layout-header/*.ts': {
statements: 82,
Expand Down
2 changes: 1 addition & 1 deletion projects/oblique/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oblique/oblique",
"version": "12.0.1",
"version": "12.0.2",
"publishConfig": {
"registry": "https://registry.npmjs.com/"
},
Expand Down
2 changes: 1 addition & 1 deletion projects/oblique/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sonar.projectName=@oblique/oblique
sonar.projectKey=oblique_oblique
sonar.projectVersion=12.0.1-rc.1
sonar.projectVersion=12.0.2
sonar.typescript.lcov.reportPaths=coverage/oblique/lcov.info
sonar.testExecutionReportPaths=coverage/oblique/sqr.xml
sonar.tests=projects/oblique/src/lib
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
@at-root .ob-master-layout:not(.ob-header-expanded) & {
height: 0;
overflow: hidden; // hides controls in collapsed mode
padding-top: 0;
padding-bottom: 0;
}
justify-content: stretch;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import {RouterTestingModule} from '@angular/router/testing';
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
import {CUSTOM_ELEMENTS_SCHEMA, Component} from '@angular/core';
import {Router, provideRouter} from '@angular/router';
import {TranslateService} from '@ngx-translate/core';
import {Subject} from 'rxjs';
import {WINDOW} from '../../utilities';
Expand All @@ -19,6 +19,9 @@ import {ObMockTranslateService} from '../../_mocks/mock-translate.service';
import {ObEMasterLayoutEventValues, ObIMasterLayoutEvent} from '../master-layout.model';
import {appVersion} from '../../version';

@Component({template: ''})
export class MockComponent {}

describe('ObMasterLayoutComponent', () => {
let component: ObMasterLayoutComponent;
let fixture: ComponentFixture<ObMasterLayoutComponent>;
Expand All @@ -38,9 +41,10 @@ describe('ObMasterLayoutComponent', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [ObMockTranslatePipe, RouterTestingModule],
imports: [ObMockTranslatePipe],
declarations: [ObMasterLayoutComponent],
providers: [
provideRouter([{path: 'some/path', component: MockComponent}]),
{provide: TranslateService, useClass: ObMockTranslateService},
{provide: ObMasterLayoutService, useValue: mockMasterLayoutService},
{provide: ObMasterLayoutConfig, useClass: ObMockMasterLayoutConfig},
Expand Down Expand Up @@ -71,6 +75,50 @@ describe('ObMasterLayoutComponent', () => {
expect(fixture.debugElement.nativeElement.getAttribute('ob-version')).toBe(appVersion);
});

describe('initialization', () => {
describe('with a fragment', () => {
beforeEach(async () => {
jest.spyOn(component, 'focusElement');
const router = TestBed.inject(Router);
router.initialNavigation();
await router.navigate(['some/path'], {fragment: 'someFragment', queryParams: {param: 'someParam'}});
});

it('should store the current route', () => {
expect(component.route.path).toBe('/some/path');
});

it('should store the current parameters', () => {
expect(component.route.params).toEqual({param: 'someParam'});
});

it('should call focusElement with "someFragment"', () => {
expect(component.focusElement).toHaveBeenCalledWith('someFragment');
});
});

describe('without fragment', () => {
beforeEach(async () => {
jest.spyOn(component, 'focusElement');
const router = TestBed.inject(Router);
router.initialNavigation();
await router.navigate(['some/path'], {queryParams: {param: 'someParam'}});
});

it('should store the current route', () => {
expect(component.route.path).toBe('/some/path');
});

it('should store the current parameters', () => {
expect(component.route.params).toEqual({param: 'someParam'});
});

it('should not call focusElement', () => {
expect(component.focusElement).not.toHaveBeenCalled();
});
});
});

describe('properties', () => {
it('should have a home property', () => {
expect(component.home).toBe('/home');
Expand Down Expand Up @@ -248,7 +296,7 @@ describe('ObMasterLayoutComponent', () => {
let element: HTMLElement;
let content: HTMLElement;

describe('targetting the id "content" when there is no h1 in the page', () => {
describe('targeting the id "content" when there is no h1 in the page', () => {
beforeEach(() => {
element = document.getElementById('content');
jest.spyOn(element, 'scrollIntoView');
Expand All @@ -263,7 +311,7 @@ describe('ObMasterLayoutComponent', () => {
});
});

describe('targetting the id "content" when there is a h1 in the page', () => {
describe('targeting the id "content" when there is a h1 in the page', () => {
beforeEach(() => {
content = document.getElementById('content');
content.prepend(document.createElement('h1'));
Expand All @@ -281,7 +329,7 @@ describe('ObMasterLayoutComponent', () => {
});
});

describe('targetting an id is not in the whitelist of ids of fragments that are allowed to be focused. (in ObMasterLayoutConfig.focusableFragments)', () => {
describe('targeting an id is not in the whitelist of ids of fragments that are allowed to be focused. (in ObMasterLayoutConfig.focusableFragments)', () => {
beforeEach(() => {
content = document.getElementById('content');
const config = TestBed.inject(ObMasterLayoutConfig);
Expand Down Expand Up @@ -309,7 +357,7 @@ describe('ObMasterLayoutComponent', () => {
});
});

describe('targetting an id that is corresponding to an non-existing dom element', () => {
describe('targeting an id that is corresponding to an non-existing dom element', () => {
beforeEach(() => {
content = document.getElementById('content');
content.innerHTML = '<div></div>';
Expand All @@ -334,7 +382,7 @@ describe('ObMasterLayoutComponent', () => {
jest.clearAllMocks();
});
});
describe('targetting an id that is corresponding to an existing dom element that is not focusable', () => {
describe('targeting an id that is corresponding to an existing dom element that is not focusable', () => {
beforeEach(() => {
content = document.getElementById('content');
content.innerHTML = '<input id="not_focusable_element" disabled />';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ export class ObMasterLayoutComponent implements OnInit, DoCheck, AfterViewInit,
map((evt: NavigationEnd) => evt.url),
tap(url => (this.route.path = (/^[^?&#]*/.exec(url) || [])[0])),
tap(url => (this.route.params = this.formatQueryParameters(this.extractUrlPart(url, /[?&][^#]*/)))),
map(url => this.extractUrlPart(url, /#[^?&]*/))
map(url => this.extractUrlPart(url, /#[^?&]*/)),
filter(fragment => !!fragment)
)
.subscribe(fragment => {
this.focusElement(fragment);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
@use "../../../styles/scss/core/variables";

.ob-service-navigation-authentication {
padding-right: variables.$ob-spacing-sm;
padding-left: variables.$ob-spacing-sm;

a.ob-button[id*="login"] {
display: flex;
flex-direction: row-reverse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
@use "../../../styles/scss/core/variables";

.ob-service-navigation-profile {
padding-right: variables.$ob-spacing-sm;
padding-left: variables.$ob-spacing-sm;

.ob-user {
font-size: 1.261em; // empiric value
border-radius: 50%;
Expand Down
2 changes: 1 addition & 1 deletion projects/oblique/src/lib/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const appVersion = '12.0.1';
export const appVersion = '12.0.2';
11 changes: 3 additions & 8 deletions projects/oblique/src/styles/scss/material/_mat-datepicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,9 @@ mat-datepicker-content.mat-datepicker-content {
background-color: variables.$ob-secondary-100;
}

/* oblique chevron left/right for the next/previous buttons */
.mat-calendar-previous-button::after,
.mat-calendar-next-button::after {
width: variables.$ob-spacing-default;
color: variables.$ob-default;
margin: unset;
border: unset;
transform: unset;
.mat-calendar-previous-button svg,
.mat-calendar-next-button svg {
display: none;
}

.mat-calendar-previous-button::after {
Expand Down
6 changes: 3 additions & 3 deletions projects/sandbox-ssr/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sandbox-ssr",
"version": "12.0.1",
"version": "12.0.2",
"scripts": {
"start": "ng serve",
"start-ssr": "node ../../dist/sandbox-ssr/server/server.mjs",
Expand All @@ -12,8 +12,8 @@
"release": "ts-node scripts/release.ts"
},
"dependencies": {
"@angular/platform-server": "^18.2.10",
"@angular/ssr": "^18.2.11",
"@angular/platform-server": "^18.2.12",
"@angular/ssr": "^18.2.12",
"express": "^4.21.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion projects/sandbox-ssr/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sonar.projectName=@oblique/sandbox-ssr
sonar.projectKey=oblique_sandbox-ssr
sonar.projectVersion=12.0.1-rc.1
sonar.projectVersion=12.0.2
sonar.typescript.lcov.reportPaths=coverage/sandbox-ssr/lcov.info
sonar.testExecutionReportPaths=coverage/sandbox-ssr/sqr.xml
sonar.tests=projects/sandbox-ssr/src/app
Expand Down
6 changes: 6 additions & 0 deletions projects/sandbox/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# [12.0.2](https://github.com/oblique-bit/oblique/compare/12.0.1...12.0.2) (2024-11-15)

## Bug Fixes

- **service-navigation:** avoid `undefined` error when started without PAMS ([8e111b63](https://github.com/oblique-bit/oblique/commit/8e111b63d187d4b86b5997601065a31048b85b5b))

# [12.0.0](https://github.com/oblique-bit/oblique/compare/11.3.4...12.0.0) (2024-10-08)

## Features
Expand Down
2 changes: 1 addition & 1 deletion projects/sandbox/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sandbox",
"version": "12.0.1",
"version": "12.0.2",
"scripts": {
"start": "ng serve",
"start-pams": "ng serve --configuration pams",
Expand Down
2 changes: 1 addition & 1 deletion projects/sandbox/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sonar.projectName=@oblique/sandbox
sonar.projectKey=oblique_sandbox
sonar.projectVersion=12.0.1-rc.1
sonar.projectVersion=12.0.2
sonar.typescript.lcov.reportPaths=coverage/sandbox/lcov.info
sonar.testExecutionReportPaths=coverage/sandbox/sqr.xml
sonar.tests=projects/sandbox/src/app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export class ServiceNavigationSampleComponent implements OnInit, AfterViewInit {
tel: '+41 58 461 61 11'
};
hasCustomWidgets = true;
readonly rootUrl = environment.pams.rootUrl;
readonly environment = environment.pams.environment;
readonly rootUrl = environment.pams?.rootUrl;
readonly environment = environment.pams?.environment;

private readonly contactInfo: ObIServiceNavigationContact = {
email: '[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion projects/sds/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swiss-design-system",
"version": "12.0.1",
"version": "12.0.2",
"scripts": {
"start": "ng serve",
"lint": "ts-node scripts/lint.ts",
Expand Down
2 changes: 1 addition & 1 deletion projects/sds/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sonar.projectName=@oblique/sds
sonar.projectKey=oblique_sds
sonar.projectVersion=12.0.1-rc.1
sonar.projectVersion=12.0.2
sonar.typescript.lcov.reportPaths=coverage/sds/lcov.info
sonar.testExecutionReportPaths=coverage/sds/sqr.xml
sonar.tests=projects/sds/src/app
Expand Down
2 changes: 1 addition & 1 deletion projects/sds/src/obliqueVersion.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const latest = '12.0.1';
export const latest = '12.0.2';
Loading

0 comments on commit d4d820c

Please sign in to comment.