Skip to content

Commit

Permalink
Merge branch 'main' into users/aagash/loop-mention-test
Browse files Browse the repository at this point in the history
  • Loading branch information
vivinkrishna-ni authored Oct 14, 2024
2 parents f9fbd95 + 29b790b commit 7ac4e82
Show file tree
Hide file tree
Showing 194 changed files with 5,868 additions and 4,813 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ This repository uses the following tooling. See below for more info.

### Adding a new component

1. Write a spec describing the API and behavior of the component. See instructions for [component specs](/specs/README.md).
2. Ensure UX specs are up to date and tokens are generated. See instructions for [contributing to Nimble Tokens](/packages/nimble-tokens/CONTRIBUTING.md).
3. Expose any tokens in the token provider and add web component logic. See instructions for [contributing to Nimble Components](/packages/nimble-components/CONTRIBUTING.md).
1. Follow the instructions in [component specs](/specs/README.md) to approve the direction and create specs for interaction design, visual design, and implementation.
2. Ensure base tokens and icons are available. See instructions for [contributing to Nimble Tokens](/packages/nimble-tokens/CONTRIBUTING.md).
3. Build the web component, including adding theme-aware tokens, documentation, and component logic. See instructions for [contributing to Nimble Components](/packages/nimble-components/CONTRIBUTING.md).
4. Add wrappers for each framework. See instructions for [adding Angular wrappers](/packages/angular-workspace/nimble-angular/CONTRIBUTING.md). See instructions for [adding Blazor wrappers](/packages/blazor-workspace/NimbleBlazor/CONTRIBUTING.md).
5. Publish and use! 🎉

Expand Down
7,200 changes: 2,885 additions & 4,315 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"sync": "beachball sync",
"invoke-publish": "cross-env-shell beachball publish --yes --access public --message \\\"applying package updates [skip ci]\\\" -n $NPM_SECRET_TOKEN",
"performance": "npm run performance --workspaces --if-present",
"validate": "concurrently --timings --group \"npm:validate:*\"",
"validate": "concurrently --pad-prefix --timings --group \"npm:validate:*\"",
"validate:lint:sequential": "npm run lint --workspaces --if-present",
"validate:test:sequential": "npm run test --workspaces --if-present",
"validate:lint-concurrent:nimble-components": "npm run lint-concurrent -w packages/nimble-components",
"validate:test-concurrent:nimble-components": "npm run test-concurrent -w packages/nimble-components",
"test": "concurrently --timings --group \"npm:validate:test*\"",
"lint": "concurrently --timings --group \"npm:validate:lint*\"",
"test": "concurrently --pad-prefix --timings --group \"npm:validate:test*\"",
"lint": "concurrently --pad-prefix --timings --group \"npm:validate:lint*\"",
"storybook": "npm run start -w @ni-private/storybook"
},
"repository": {
Expand Down Expand Up @@ -57,7 +57,7 @@
],
"devDependencies": {
"beachball": "^2.45.0",
"concurrently": "^8.2.2",
"concurrently": "^9.0.0",
"cross-env": "^7.0.3",
"patch-package": "^8.0.0",
"playwright": "1.44.0"
Expand Down
156 changes: 156 additions & 0 deletions packages/angular-workspace/nimble-angular/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,162 @@
{
"name": "@ni/nimble-angular",
"entries": [
{
"date": "Wed, 09 Oct 2024 22:13:53 GMT",
"version": "28.2.10",
"tag": "@ni/nimble-angular_v28.2.10",
"comments": {
"none": [
{
"author": "jattasNI@users.noreply.github.com",
"package": "@ni/nimble-angular",
"commit": "943ce38c3a94ac7e58c7d7c35e43a579be80547a",
"comment": "Angular router link test improvements"
}
]
}
},
{
"date": "Wed, 09 Oct 2024 19:24:18 GMT",
"version": "28.2.10",
"tag": "@ni/nimble-angular_v28.2.10",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v32.3.0",
"commit": "not available"
}
]
}
},
{
"date": "Thu, 26 Sep 2024 18:24:50 GMT",
"version": "28.2.9",
"tag": "@ni/nimble-angular_v28.2.9",
"comments": {
"patch": [
{
"author": "rajsite@users.noreply.github.com",
"package": "@ni/nimble-angular",
"commit": "7ab95a37c760071310a52e0ac233978470168f44",
"comment": "Updates for async eslint rule change"
},
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v32.2.10",
"commit": "not available"
}
]
}
},
{
"date": "Thu, 26 Sep 2024 17:20:39 GMT",
"version": "28.2.8",
"tag": "@ni/nimble-angular_v28.2.8",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v32.2.9",
"commit": "not available"
}
]
}
},
{
"date": "Thu, 26 Sep 2024 15:22:45 GMT",
"version": "28.2.7",
"tag": "@ni/nimble-angular_v28.2.7",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v32.2.8",
"commit": "not available"
}
]
}
},
{
"date": "Wed, 25 Sep 2024 22:17:40 GMT",
"version": "28.2.6",
"tag": "@ni/nimble-angular_v28.2.6",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v32.2.7",
"commit": "not available"
}
]
}
},
{
"date": "Wed, 18 Sep 2024 20:24:09 GMT",
"version": "28.2.5",
"tag": "@ni/nimble-angular_v28.2.5",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v32.2.6",
"commit": "not available"
}
]
}
},
{
"date": "Wed, 11 Sep 2024 21:31:24 GMT",
"version": "28.2.4",
"tag": "@ni/nimble-angular_v28.2.4",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v32.2.5",
"commit": "not available"
}
]
}
},
{
"date": "Wed, 11 Sep 2024 20:57:36 GMT",
"version": "28.2.3",
"tag": "@ni/nimble-angular_v28.2.3",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v32.2.4",
"commit": "not available"
}
]
}
},
{
"date": "Wed, 11 Sep 2024 11:58:13 GMT",
"version": "28.2.2",
"tag": "@ni/nimble-angular_v28.2.2",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v32.2.3",
"commit": "not available"
}
]
}
},
{
"date": "Tue, 10 Sep 2024 23:42:07 GMT",
"version": "28.2.1",
Expand Down
75 changes: 74 additions & 1 deletion packages/angular-workspace/nimble-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,82 @@
# Change Log - @ni/nimble-angular

This log was last generated on Tue, 10 Sep 2024 23:42:07 GMT and should not be manually modified.
<!-- This log was last generated on Wed, 09 Oct 2024 19:24:18 GMT and should not be manually modified. -->

<!-- Start content -->

## 28.2.10

Wed, 09 Oct 2024 19:24:18 GMT

### Patches

- Bump @ni/nimble-components to v32.3.0

## 28.2.9

Thu, 26 Sep 2024 18:24:50 GMT

### Patches

- Updates for async eslint rule change ([ni/nimble@7ab95a3](https://github.com/ni/nimble/commit/7ab95a37c760071310a52e0ac233978470168f44))
- Bump @ni/nimble-components to v32.2.10

## 28.2.8

Thu, 26 Sep 2024 17:20:39 GMT

### Patches

- Bump @ni/nimble-components to v32.2.9

## 28.2.7

Thu, 26 Sep 2024 15:22:45 GMT

### Patches

- Bump @ni/nimble-components to v32.2.8

## 28.2.6

Wed, 25 Sep 2024 22:17:40 GMT

### Patches

- Bump @ni/nimble-components to v32.2.7

## 28.2.5

Wed, 18 Sep 2024 20:24:09 GMT

### Patches

- Bump @ni/nimble-components to v32.2.6

## 28.2.4

Wed, 11 Sep 2024 21:31:24 GMT

### Patches

- Bump @ni/nimble-components to v32.2.5

## 28.2.3

Wed, 11 Sep 2024 20:57:36 GMT

### Patches

- Bump @ni/nimble-components to v32.2.4

## 28.2.2

Wed, 11 Sep 2024 11:58:13 GMT

### Patches

- Bump @ni/nimble-components to v32.2.3

## 28.2.1

Tue, 10 Sep 2024 23:42:07 GMT
Expand Down
4 changes: 2 additions & 2 deletions packages/angular-workspace/nimble-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ni/nimble-angular",
"version": "28.2.1",
"version": "28.2.10",
"description": "Angular components for the NI Nimble Design System",
"scripts": {
"invoke-publish": "npm run invoke-publish:setup && cd ../dist/nimble-angular && npm publish",
Expand Down Expand Up @@ -32,7 +32,7 @@
"@angular/forms": "^17.3.12",
"@angular/localize": "^17.3.12",
"@angular/router": "^17.3.12",
"@ni/nimble-components": "^32.2.2"
"@ni/nimble-components": "^32.3.0"
},
"dependencies": {
"tslib": "^2.2.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Component, ElementRef, Sanitizer, SecurityContext, ViewChild } from '@angular/core';
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { Router } from '@angular/router';
import { fakeAsync, TestBed, tick } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { provideRouter, Router } from '@angular/router';
import { CommonModule, Location } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing';
import { RouterTestingHarness } from '@angular/router/testing';
import { parameterizeSpec } from '@ni/jasmine-parameterized';
import { processUpdates } from '../../../testing/async-helpers';
import { NimbleAnchorButtonModule } from '../nimble-anchor-button.module';
Expand All @@ -14,7 +15,6 @@ describe('Nimble anchor button RouterLinkWithHrefDirective', () => {
<nimble-anchor-button #anchor nimbleRouterLink="page1" [queryParams]="{param1: true}" [state]="{stateProperty: 123}">
Anchor text
</nimble-anchor-button>
<router-outlet></router-outlet>
`
})
class TestHostComponent {
Expand All @@ -25,49 +25,47 @@ describe('Nimble anchor button RouterLinkWithHrefDirective', () => {
class BlankComponent { }

let anchorButton: AnchorButton;
let fixture: ComponentFixture<TestHostComponent>;
let testHostComponent: TestHostComponent;
let router: Router;
let location: Location;
let innerAnchor: HTMLAnchorElement;
let routerNavigateByUrlSpy: jasmine.Spy;
let anchorClickHandlerSpy: jasmine.Spy;
let sanitizer: jasmine.SpyObj<Sanitizer>;
let harness: RouterTestingHarness;

beforeEach(() => {
beforeEach(async () => {
sanitizer = jasmine.createSpyObj<Sanitizer>('Sanitizer', ['sanitize']);
sanitizer.sanitize.and.callFake((_, value: string) => value);

TestBed.configureTestingModule({
declarations: [TestHostComponent, BlankComponent],
imports: [NimbleAnchorButtonModule,
imports: [
NimbleAnchorButtonModule,
CommonModule,
RouterTestingModule.withRoutes([
{ path: '', redirectTo: '/start', pathMatch: 'full' },
{ path: 'page1', component: BlankComponent },
{ path: 'start', component: TestHostComponent }
], { useHash: true })
],
providers: [
{ provide: Sanitizer, useValue: sanitizer }
{ provide: Sanitizer, useValue: sanitizer },
provideRouter([
{ path: 'page1', component: BlankComponent },
{ path: '', component: TestHostComponent }
]),
]
});
harness = await RouterTestingHarness.create('');
});

beforeEach(fakeAsync(() => {
beforeEach(() => {
router = TestBed.inject(Router);
location = TestBed.inject(Location);
fixture = TestBed.createComponent(TestHostComponent);
testHostComponent = fixture.componentInstance;
testHostComponent = harness.fixture.debugElement.query(By.directive(TestHostComponent)).componentInstance as TestHostComponent;
anchorButton = testHostComponent.anchor.nativeElement;
fixture.detectChanges();
tick();
processUpdates();
innerAnchor = anchorButton!.shadowRoot!.querySelector('a')!;
routerNavigateByUrlSpy = spyOn(router, 'navigateByUrl').and.callThrough();
anchorClickHandlerSpy = jasmine.createSpy('click');
anchorClickHandlerSpy = jasmine.createSpy('click').and.callFake((event: Event) => event.preventDefault());
innerAnchor!.addEventListener('click', anchorClickHandlerSpy);
}));
});

afterEach(() => {
processUpdates();
Expand Down
Loading

0 comments on commit 7ac4e82

Please sign in to comment.