Skip to content

Commit

Permalink
Merge branch 'main' into users/munteannatan/wafer-map-test-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
munteannatan committed Feb 7, 2024
2 parents 7dc89ea + 24bb081 commit 8fdd9fa
Show file tree
Hide file tree
Showing 175 changed files with 29,978 additions and 5,026 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This repository uses the following tooling. See below for more info.
First step in development is to build the monorepo which requires the following to be installed:

- Node.js version 20+ (run `node --version`) and npm version 10+ (run `npm --version`) which can be downloaded from https://nodejs.org/en/download/
- .NET 6 SDK (`6.0.202 <= version < 7`) which can be downloaded from https://dotnet.microsoft.com/en-us/download
- .NET 6 SDK (`6.0.418 <= version < 7`) which can be downloaded from https://dotnet.microsoft.com/en-us/download
- Run `dotnet --info` to verify the required version of the SDK is installed. A `v6` install is required, but it's fine if later versions are installed too.

From the `nimble` directory:
Expand Down
22 changes: 22 additions & 0 deletions angular-workspace/lighthouserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
ci: {
collect: {
staticDistDir: './dist/example-client-app',
url: [
'http://localhost:58452/#/customapp'
],
numberOfRuns: 3,
},
assert: {
assertions: {
'categories:performance': ['warn', { minScore: 0.9 }],
// TODO: reset to 0.9 as part of https://github.com/ni/nimble/issues/1090
// TODO: reset to error as part of https://github.com/ni/nimble/issues/1650
'categories:accessibility': ['warn', { minScore: 0.88 }]
}
},
upload: {
target: 'temporary-public-storage',
},
},
};
7 changes: 5 additions & 2 deletions angular-workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"pack": "npm run pack:library && npm run pack:application",
"pack:library": "cd dist/ni/nimble-angular && npm pack",
"pack:application": "cd dist/example-client-app && npm pack",
"performance": "lhci autorun",
"watch": "ng build --watch --configuration development",
"test": "ng test --watch=false",
"lint": "ng lint",
Expand All @@ -39,10 +40,12 @@
"@angular/cli": "^15.2.10",
"@angular/compiler-cli": "^15.2.10",
"@angular/localize": "^15.2.10",
"@lhci/cli": "^0.13.0",
"@microsoft/fast-web-utilities": "^6.0.0",
"@ni/eslint-config-angular": "^5.0.3",
"@ni/eslint-config-angular": "^6.0.0",
"@ni/eslint-config-javascript": "^4.2.0",
"@ni/eslint-config-typescript": "^4.2.0",
"@ni/jasmine-parameterized": "*",
"@ni/nimble-tokens": "*",
"@rollup/plugin-node-resolve": "^15.0.1",
"@types/jasmine": "^4.3.1",
Expand All @@ -59,4 +62,4 @@
"rollup": "^3.10.1",
"typescript": "~4.8.2"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
</div>
<div class="sub-container">
<div class="container-label">Table</div>
<nimble-table [data$]="tableData$" id-field-name="id" selection-mode="multiple">
<nimble-table [data$]="tableData$" id-field-name="id" parent-id-field-name="parentId" selection-mode="multiple">
<nimble-table-column-text
field-name="stringValue1"
action-menu-slot="action-menu"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ interface ComboboxItem {

interface SimpleTableRecord extends TableRecord {
id: string;
parentId?: string;
stringValue1: string;
stringValue2: string;
href?: string;
Expand Down Expand Up @@ -120,6 +121,7 @@ export class CustomAppComponent {
for (let i = 0; i < numberOfRowsToAdd; i++) {
tableData.push({
id: tableData.length.toString(),
parentId: (tableData.length >= 4 ? (tableData.length % 4).toString() : undefined),
stringValue1: `new string ${tableData.length}`,
stringValue2: `bar ${tableData.length}`,
href: '/customapp',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { DurationPipe, NumberTextPipe, byteUnitScale, byte1024UnitScale, voltUnitScale } from '@ni/nimble-angular/pipes';

describe('Pipes', () => {
it('exports DurationPipe', () => {
expect(new DurationPipe('en')).toBeTruthy();
});

it('exports NumberTextPipe', () => {
expect(new NumberTextPipe('en')).toBeTruthy();
});

it('exports byteUnitScale', () => {
expect(byteUnitScale).toBeTruthy();
});

it('exports byte1024UnitScale', () => {
expect(byte1024UnitScale).toBeTruthy();
});

it('exports voltUnitScale', () => {
expect(voltUnitScale).toBeTruthy();
});
});
87 changes: 87 additions & 0 deletions angular-workspace/projects/ni/nimble-angular/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,93 @@
{
"name": "@ni/nimble-angular",
"entries": [
{
"date": "Fri, 02 Feb 2024 21:51:03 GMT",
"version": "20.0.1",
"tag": "@ni/nimble-angular_v20.0.1",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v21.2.0",
"commit": "not available"
}
]
}
},
{
"date": "Wed, 31 Jan 2024 20:22:58 GMT",
"version": "20.0.0",
"tag": "@ni/nimble-angular_v20.0.0",
"comments": {
"major": [
{
"author": "[email protected]",
"package": "@ni/nimble-angular",
"commit": "bf9013d5cb92106ddd1fcf6fd84e6684930462b8",
"comment": "Create new NumberTextPipe and change existing DurationPipe to be a standalone pipe (removing NimblePipesModule)"
},
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v21.1.0",
"commit": "not available"
}
]
}
},
{
"date": "Wed, 31 Jan 2024 17:51:55 GMT",
"version": "19.4.0",
"tag": "@ni/nimble-angular_v19.4.0",
"comments": {
"minor": [
{
"author": "[email protected]",
"package": "@ni/nimble-angular",
"commit": "147777aaf8332d80a89aecec247a95ee31233965",
"comment": "Include href in NavigationGuard"
}
]
}
},
{
"date": "Mon, 29 Jan 2024 11:31:46 GMT",
"version": "19.3.1",
"tag": "@ni/nimble-angular_v19.3.1",
"comments": {
"patch": [
{
"author": "[email protected]",
"package": "@ni/nimble-angular",
"commit": "ec2e0ddef1d910d44097ccb2a976ad2343dbac63",
"comment": "Add validator APIs to rich text editor and viewer components"
},
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v21.0.5",
"commit": "not available"
}
]
}
},
{
"date": "Sat, 27 Jan 2024 17:56:18 GMT",
"version": "19.3.0",
"tag": "@ni/nimble-angular_v19.3.0",
"comments": {
"minor": [
{
"author": "[email protected]",
"package": "@ni/nimble-angular",
"commit": "39bd1f821cd5394c75187abbcf3c3dcc9b3a1572",
"comment": "Adding Angular support for table data hierarchy"
}
]
}
},
{
"date": "Thu, 25 Jan 2024 02:58:12 GMT",
"version": "19.2.4",
Expand Down
44 changes: 43 additions & 1 deletion angular-workspace/projects/ni/nimble-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,51 @@
# Change Log - @ni/nimble-angular

This log was last generated on Thu, 25 Jan 2024 02:58:12 GMT and should not be manually modified.
This log was last generated on Fri, 02 Feb 2024 21:51:03 GMT and should not be manually modified.

<!-- Start content -->

## 20.0.1

Fri, 02 Feb 2024 21:51:03 GMT

### Patches

- Bump @ni/nimble-components to v21.2.0

## 20.0.0

Wed, 31 Jan 2024 20:22:58 GMT

### Major changes

- Create new NumberTextPipe and change existing DurationPipe to be a standalone pipe (removing NimblePipesModule) ([ni/nimble@bf9013d](https://github.com/ni/nimble/commit/bf9013d5cb92106ddd1fcf6fd84e6684930462b8))
- Bump @ni/nimble-components to v21.1.0

## 19.4.0

Wed, 31 Jan 2024 17:51:55 GMT

### Minor changes

- Include href in NavigationGuard ([ni/nimble@147777a](https://github.com/ni/nimble/commit/147777aaf8332d80a89aecec247a95ee31233965))

## 19.3.1

Mon, 29 Jan 2024 11:31:46 GMT

### Patches

- Add validator APIs to rich text editor and viewer components ([ni/nimble@ec2e0dd](https://github.com/ni/nimble/commit/ec2e0ddef1d910d44097ccb2a976ad2343dbac63))
- Bump @ni/nimble-components to v21.0.5

## 19.3.0

Sat, 27 Jan 2024 17:56:18 GMT

### Minor changes

- Adding Angular support for table data hierarchy ([ni/nimble@39bd1f8](https://github.com/ni/nimble/commit/39bd1f821cd5394c75187abbcf3c3dcc9b3a1572))

## 19.2.4

Thu, 25 Jan 2024 02:58:12 GMT
Expand Down
4 changes: 2 additions & 2 deletions angular-workspace/projects/ni/nimble-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ni/nimble-angular",
"version": "19.2.4",
"version": "20.0.1",
"description": "Angular components for the NI Nimble Design System",
"scripts": {
"invoke-publish": "cd ../../../ && npm run build:library && cd dist/ni/nimble-angular && npm publish"
Expand Down Expand Up @@ -28,7 +28,7 @@
"@angular/forms": "^15.2.10",
"@angular/localize": "^15.2.10",
"@angular/router": "^15.2.10",
"@ni/nimble-components": "^21.0.4"
"@ni/nimble-components": "^21.2.0"
},
"dependencies": {
"tslib": "^2.2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { DurationFormatter } from '@ni/nimble-components/dist/esm/table-column/d
* A pipe that transforms a number of milliseconds (string/number) into a string formatted like "1 day, 2 hr, 3 min, 4.567 sec"
*/
@Pipe({
name: 'duration'
name: 'duration',
standalone: true
})
export class DurationPipe implements PipeTransform {
private readonly durationFormatter;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Inject, LOCALE_ID, Pipe, PipeTransform } from '@angular/core';
import { NumberTextUnitFormat, NumberTextUnitFormatOptions } from '@ni/nimble-components/dist/esm/table-column/number-text/models/number-text-unit-format';

/**
* A pipe that transforms a number into a string with optional unit
*/
@Pipe({
name: 'numberText',
standalone: true
})
export class NumberTextPipe implements PipeTransform {
/**
* @internal
*/
public numberTextUnitFormat?: NumberTextUnitFormat;

public constructor(@Inject(LOCALE_ID) private readonly locale: string) {}

public transform(value: number, options?: NumberTextUnitFormatOptions): string {
if (!this.numberTextUnitFormat?.optionsMatch(options)) {
this.numberTextUnitFormat = new NumberTextUnitFormat(this.locale, options);
}
return this.numberTextUnitFormat.format(value);
}
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
export * from './duration.pipe';
export * from './nimble-pipes.module';
export * from './number-text.pipe';
export { byteUnitScale } from '@ni/nimble-components/dist/esm/utilities/unit-format/unit-scale/byte-unit-scale';
export { byte1024UnitScale } from '@ni/nimble-components/dist/esm/utilities/unit-format/unit-scale/byte-1024-unit-scale';
export { voltUnitScale } from '@ni/nimble-components/dist/esm/utilities/unit-format/unit-scale/volt-unit-scale';
Loading

0 comments on commit 8fdd9fa

Please sign in to comment.