Skip to content

Commit

Permalink
Merge branch 'main' into select-dynamic-options-HLD
Browse files Browse the repository at this point in the history
  • Loading branch information
atmgrifter00 authored May 31, 2024
2 parents c0f5f5b + aca764d commit ef9438c
Show file tree
Hide file tree
Showing 259 changed files with 4,072 additions and 1,129 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"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",
"storybook": "concurrently -n nimble,spright,storybook \"npm run build-components:watch -w @ni/nimble-components\" \"npm run build-components:watch -w @ni/spright-components\" \"npm run start -w @ni-private/storybook\""
"storybook": "npm run start -w @ni-private/storybook"
},
"repository": {
"type": "git",
Expand Down
60 changes: 60 additions & 0 deletions packages/angular-workspace/nimble-angular/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,66 @@
{
"name": "@ni/nimble-angular",
"entries": [
{
"date": "Tue, 28 May 2024 20:13:14 GMT",
"version": "24.3.3",
"tag": "@ni/nimble-angular_v24.3.3",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v29.1.6",
"commit": "not available"
}
]
}
},
{
"date": "Wed, 22 May 2024 18:32:15 GMT",
"version": "24.3.2",
"tag": "@ni/nimble-angular_v24.3.2",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v29.1.5",
"commit": "not available"
}
]
}
},
{
"date": "Tue, 21 May 2024 22:53:18 GMT",
"version": "24.3.1",
"tag": "@ni/nimble-angular_v24.3.1",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v29.1.4",
"commit": "not available"
}
]
}
},
{
"date": "Tue, 21 May 2024 15:50:01 GMT",
"version": "24.3.0",
"tag": "@ni/nimble-angular_v24.3.0",
"comments": {
"minor": [
{
"author": "[email protected]",
"package": "@ni/nimble-angular",
"commit": "89e3bc88811ac6a6c92c8cacc61031b65a5b901c",
"comment": "Adding clearable API for Select."
}
]
}
},
{
"date": "Mon, 20 May 2024 15:39:22 GMT",
"version": "24.2.6",
Expand Down
34 changes: 33 additions & 1 deletion packages/angular-workspace/nimble-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,41 @@
# Change Log - @ni/nimble-angular

This log was last generated on Mon, 20 May 2024 15:39:22 GMT and should not be manually modified.
This log was last generated on Tue, 28 May 2024 20:13:14 GMT and should not be manually modified.

<!-- Start content -->

## 24.3.3

Tue, 28 May 2024 20:13:14 GMT

### Patches

- Bump @ni/nimble-components to v29.1.6

## 24.3.2

Wed, 22 May 2024 18:32:15 GMT

### Patches

- Bump @ni/nimble-components to v29.1.5

## 24.3.1

Tue, 21 May 2024 22:53:18 GMT

### Patches

- Bump @ni/nimble-components to v29.1.4

## 24.3.0

Tue, 21 May 2024 15:50:01 GMT

### Minor changes

- Adding clearable API for Select. ([ni/nimble@89e3bc8](https://github.com/ni/nimble/commit/89e3bc88811ac6a6c92c8cacc61031b65a5b901c))

## 24.2.6

Mon, 20 May 2024 15:39:22 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": "24.2.6",
"version": "24.3.3",
"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": "^16.2.12",
"@angular/localize": "^16.2.12",
"@angular/router": "^16.2.12",
"@ni/nimble-components": "^29.1.3"
"@ni/nimble-components": "^29.1.6"
},
"dependencies": {
"tslib": "^2.2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ export class NimbleSelectDirective {
this.renderer.setProperty(this.elementRef.nativeElement, 'filterMode', value);
}

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

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

public get disabled(): boolean {
return this.elementRef.nativeElement.disabled;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ describe('Nimble select', () => {
expect(nativeElement.filterMode).toBe(FilterMode.none);
});

it('has expected defaults for clearable', () => {
expect(directive.clearable).toBe(false);
expect(nativeElement.clearable).toBe(false);
});

it('has expected defaults for errorText', () => {
expect(directive.errorText).toBeUndefined();
expect(nativeElement.errorText).toBeUndefined();
Expand Down Expand Up @@ -86,6 +91,7 @@ describe('Nimble select', () => {
disabled
appearance="${DropdownAppearance.block}"
filter-mode="${FilterMode.standard}"
clearable
error-text="error text"
error-visible
>
Expand Down Expand Up @@ -127,6 +133,11 @@ describe('Nimble select', () => {
expect(nativeElement.filterMode).toBe(FilterMode.standard);
});

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

it('will use template string values for errorText', () => {
expect(directive.errorText).toBe('error text');
expect(nativeElement.errorText).toBe('error text');
Expand All @@ -145,6 +156,7 @@ describe('Nimble select', () => {
[disabled] = "disabled"
[appearance]="appearance"
[filter-mode]="filterMode"
[clearable]="clearable"
[error-text]="errorText"
[error-visible]="errorVisible"
>
Expand All @@ -157,6 +169,7 @@ describe('Nimble select', () => {
public disabled = false;
public appearance: DropdownAppearance = DropdownAppearance.block;
public filterMode: FilterMode = FilterMode.standard;
public clearable = false;
public errorText = 'initial value';
public errorVisible = false;
}
Expand Down Expand Up @@ -209,6 +222,17 @@ describe('Nimble select', () => {
expect(nativeElement.filterMode).toBe(FilterMode.none);
});

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

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

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

it('can be configured with property binding for errorText', () => {
expect(directive.errorText).toBe('initial value');
expect(nativeElement.errorText).toBe('initial value');
Expand Down Expand Up @@ -239,6 +263,7 @@ describe('Nimble select', () => {
[attr.disabled]="disabled"
[attr.appearance]="appearance"
[attr.filter-mode]="filterMode"
[attr.clearable]="clearable"
[attr.error-text]="errorText"
[attr.error-visible]="errorVisible"
>
Expand All @@ -251,6 +276,7 @@ describe('Nimble select', () => {
public disabled: BooleanValueOrAttribute = null;
public appearance: DropdownAppearance = DropdownAppearance.block;
public filterMode: FilterMode;
public clearable: BooleanValueOrAttribute = null;
public errorText = 'initial value';
public errorVisible: BooleanValueOrAttribute = null;
}
Expand Down Expand Up @@ -303,6 +329,17 @@ describe('Nimble select', () => {
expect(nativeElement.filterMode).toBe(FilterMode.standard);
});

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

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

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

it('can be configured with attribute binding for errorText', () => {
expect(directive.errorText).toBe('initial value');
expect(nativeElement.errorText).toBe('initial value');
Expand Down
45 changes: 45 additions & 0 deletions packages/angular-workspace/spright-angular/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,51 @@
{
"name": "@ni/spright-angular",
"entries": [
{
"date": "Tue, 28 May 2024 20:13:14 GMT",
"version": "1.0.7",
"tag": "@ni/spright-angular_v1.0.7",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/spright-angular",
"comment": "Bump @ni/spright-components to v1.0.7",
"commit": "not available"
}
]
}
},
{
"date": "Wed, 22 May 2024 18:32:15 GMT",
"version": "1.0.6",
"tag": "@ni/spright-angular_v1.0.6",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/spright-angular",
"comment": "Bump @ni/spright-components to v1.0.6",
"commit": "not available"
}
]
}
},
{
"date": "Tue, 21 May 2024 22:53:18 GMT",
"version": "1.0.5",
"tag": "@ni/spright-angular_v1.0.5",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/spright-angular",
"comment": "Bump @ni/spright-components to v1.0.5",
"commit": "not available"
}
]
}
},
{
"date": "Mon, 20 May 2024 15:39:22 GMT",
"version": "1.0.4",
Expand Down
Loading

0 comments on commit ef9438c

Please sign in to comment.