Skip to content

Commit

Permalink
Merge branch 'users/fvisser/fix-storybook-build' into users/fvisser/e…
Browse files Browse the repository at this point in the history
…ditable-table-ixd-spec
  • Loading branch information
fredvisser committed Dec 17, 2024
2 parents c135d02 + 9d64014 commit e7118e0
Show file tree
Hide file tree
Showing 171 changed files with 4,689 additions and 3,097 deletions.
1,663 changes: 924 additions & 739 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion packages/angular-workspace/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,11 @@
}
],
"buildOptimizer": true,
"optimization": true,
"optimization": {
"styles": {
"inlineCritical": false
}
},
"sourceMap": true
},
"development": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<div class="content container">
<p>Explore the components below to see the Nimble components in action. See the <a
href="https://ni.github.io/nimble/storybook/">Nimble
component docs</a> for additional usage details.</p>
<p>
Explore the components below to see the Nimble components in action. See the <a
href="https://ni.github.io/nimble/storybook/">Nimble
component docs</a> for additional usage details.
Navigate to the <a href="../index.html">parent page</a>.
</p>
<div class="container">
<div class="sub-container">
<div class="container-label">Anchor</div>
Expand Down
90 changes: 90 additions & 0 deletions packages/angular-workspace/nimble-angular/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,96 @@
{
"name": "@ni/nimble-angular",
"entries": [
{
"date": "Tue, 10 Dec 2024 20:15:57 GMT",
"version": "28.7.1",
"tag": "@ni/nimble-angular_v28.7.1",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v32.9.1",
"commit": "not available"
}
]
}
},
{
"date": "Mon, 09 Dec 2024 15:59:16 GMT",
"version": "28.7.0",
"tag": "@ni/nimble-angular_v28.7.0",
"comments": {
"minor": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v32.9.0",
"commit": "not available"
}
]
}
},
{
"date": "Wed, 04 Dec 2024 21:21:27 GMT",
"version": "28.6.2",
"tag": "@ni/nimble-angular_v28.6.2",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v32.8.2",
"commit": "not available"
}
]
}
},
{
"date": "Wed, 04 Dec 2024 19:53:29 GMT",
"version": "28.6.1",
"tag": "@ni/nimble-angular_v28.6.1",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v32.8.1",
"commit": "not available"
}
]
}
},
{
"date": "Mon, 02 Dec 2024 19:38:59 GMT",
"version": "28.6.0",
"tag": "@ni/nimble-angular_v28.6.0",
"comments": {
"minor": [
{
"author": "20542556+mollykreis@users.noreply.github.com",
"package": "@ni/nimble-angular",
"commit": "939a9e5dec1258a36a493369c02628e4fff26900",
"comment": "Angular support for checkbox errors"
}
]
}
},
{
"date": "Fri, 22 Nov 2024 22:50:22 GMT",
"version": "28.5.3",
"tag": "@ni/nimble-angular_v28.5.3",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v32.8.0",
"commit": "not available"
}
]
}
},
{
"date": "Tue, 19 Nov 2024 03:20:18 GMT",
"version": "28.5.2",
Expand Down
50 changes: 49 additions & 1 deletion packages/angular-workspace/nimble-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,57 @@
# Change Log - @ni/nimble-angular

<!-- This log was last generated on Tue, 19 Nov 2024 03:20:18 GMT and should not be manually modified. -->
<!-- This log was last generated on Tue, 10 Dec 2024 20:15:57 GMT and should not be manually modified. -->

<!-- Start content -->

## 28.7.1

Tue, 10 Dec 2024 20:15:57 GMT

### Patches

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

## 28.7.0

Mon, 09 Dec 2024 15:59:16 GMT

### Minor changes

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

## 28.6.2

Wed, 04 Dec 2024 21:21:27 GMT

### Patches

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

## 28.6.1

Wed, 04 Dec 2024 19:53:29 GMT

### Patches

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

## 28.6.0

Mon, 02 Dec 2024 19:38:59 GMT

### Minor changes

- Angular support for checkbox errors ([ni/nimble@939a9e5](https://github.com/ni/nimble/commit/939a9e5dec1258a36a493369c02628e4fff26900))

## 28.5.3

Fri, 22 Nov 2024 22:50:22 GMT

### Patches

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

## 28.5.2

Tue, 19 Nov 2024 03:20:18 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.5.2",
"version": "28.7.1",
"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.7.2"
"@ni/nimble-components": "^32.9.1"
},
"dependencies": {
"tslib": "^2.2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,21 @@ export class NimbleCheckboxDirective {
this.renderer.setProperty(this.elementRef.nativeElement, 'indeterminate', toBooleanProperty(value));
}

public get errorText(): string | undefined {
return this.elementRef.nativeElement.errorText;
}

@Input('error-text') public set errorText(value: string | undefined) {
this.renderer.setProperty(this.elementRef.nativeElement, 'errorText', value);
}

public get errorVisible(): boolean {
return this.elementRef.nativeElement.errorVisible;
}

@Input('error-visible') public set errorVisible(value: BooleanValueOrAttribute) {
this.renderer.setProperty(this.elementRef.nativeElement, 'errorVisible', toBooleanProperty(value));
}

public constructor(private readonly renderer: Renderer2, private readonly elementRef: ElementRef<Checkbox>) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ describe('Nimble checkbox', () => {
expect(directive.indeterminate).toBeFalse();
expect(nativeElement.indeterminate).toBeFalse();
});

it('has expected defaults for errorVisible', () => {
expect(directive.errorVisible).toBeFalse();
expect(nativeElement.errorVisible).toBeFalse();
});

it('has expected defaults for errorText', () => {
expect(directive.errorText).toBeUndefined();
expect(nativeElement.errorText).toBeUndefined();
});
});

describe('with template string values', () => {
Expand All @@ -65,7 +75,9 @@ describe('Nimble checkbox', () => {
<nimble-checkbox #checkbox
disabled
checked
indeterminate>
indeterminate
error-visible
error-text="Error message">
</nimble-checkbox>`
})
class TestHostComponent {
Expand Down Expand Up @@ -102,6 +114,16 @@ describe('Nimble checkbox', () => {
expect(directive.indeterminate).toBeTrue();
expect(nativeElement.indeterminate).toBeTrue();
});

it('will use template string values for errorVisible', () => {
expect(directive.errorVisible).toBeTrue();
expect(nativeElement.errorVisible).toBeTrue();
});

it('will use template string values for errorText', () => {
expect(directive.errorText).toBe('Error message');
expect(nativeElement.errorText).toBe('Error message');
});
});

describe('with property bound values', () => {
Expand All @@ -110,7 +132,9 @@ describe('Nimble checkbox', () => {
<nimble-checkbox #checkbox
[disabled]="disabled"
[checked]="checked"
[indeterminate]="indeterminate">
[indeterminate]="indeterminate"
[error-text]="errorText"
[error-visible]="errorVisible">
</nimble-checkbox>
`
})
Expand All @@ -120,6 +144,8 @@ describe('Nimble checkbox', () => {
public disabled = false;
public checked = false;
public indeterminate = false;
public errorText = 'initial value';
public errorVisible = false;
}

let fixture: ComponentFixture<TestHostComponent>;
Expand Down Expand Up @@ -169,14 +195,38 @@ describe('Nimble checkbox', () => {
expect(directive.indeterminate).toBeTrue();
expect(nativeElement.indeterminate).toBeTrue();
});

it('can be configured with property binding for errorText', () => {
expect(directive.errorText).toBe('initial value');
expect(nativeElement.errorText).toBe('initial value');

fixture.componentInstance.errorText = 'new value';
fixture.detectChanges();

expect(directive.errorText).toBe('new value');
expect(nativeElement.errorText).toBe('new value');
});

it('can be configured with property binding for errorVisible', () => {
expect(directive.errorVisible).toBeFalse();
expect(nativeElement.errorVisible).toBeFalse();

fixture.componentInstance.errorVisible = true;
fixture.detectChanges();

expect(directive.errorVisible).toBeTrue();
expect(nativeElement.errorVisible).toBeTrue();
});
});

describe('with attribute bound values', () => {
@Component({
template: `
<nimble-checkbox #checkbox
[attr.disabled]="disabled"
[attr.checked]="checked">
[attr.checked]="checked"
[attr.error-text]="errorText"
[attr.error-visible]="errorVisible">
</nimble-checkbox>
`
})
Expand All @@ -185,6 +235,8 @@ describe('Nimble checkbox', () => {
@ViewChild('checkbox', { read: ElementRef }) public elementRef: ElementRef<Checkbox>;
public disabled: BooleanValueOrAttribute = null;
public checked: BooleanValueOrAttribute = null;
public errorText = 'initial value';
public errorVisible: BooleanValueOrAttribute = null;
}

let fixture: ComponentFixture<TestHostComponent>;
Expand Down Expand Up @@ -224,6 +276,28 @@ describe('Nimble checkbox', () => {
expect(nativeElement.checked).toBeTrue();
});

it('can be configured with attribute binding for errorText', () => {
expect(directive.errorText).toBe('initial value');
expect(nativeElement.errorText).toBe('initial value');

fixture.componentInstance.errorText = 'new value';
fixture.detectChanges();

expect(directive.errorText).toBe('new value');
expect(nativeElement.errorText).toBe('new value');
});

it('can be configured with attribute binding for errorVisible', () => {
expect(directive.errorVisible).toBeFalse();
expect(nativeElement.errorVisible).toBeFalse();

fixture.componentInstance.errorVisible = '';
fixture.detectChanges();

expect(directive.errorVisible).toBeTrue();
expect(nativeElement.errorVisible).toBeTrue();
});

// indeterminate property does not have a matching attribute
});
});
Loading

0 comments on commit e7118e0

Please sign in to comment.