Skip to content

Commit

Permalink
Merge branch 'main' into users/munteannatan/experimental-computations
Browse files Browse the repository at this point in the history
  • Loading branch information
munteannatan committed Mar 25, 2024
2 parents 42cb95f + 7bfc34b commit 02adccf
Show file tree
Hide file tree
Showing 17 changed files with 180 additions and 153 deletions.
15 changes: 15 additions & 0 deletions angular-workspace/projects/ni/nimble-angular/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@ni/nimble-angular",
"entries": [
{
"date": "Mon, 25 Mar 2024 17:03:11 GMT",
"version": "20.5.3",
"tag": "@ni/nimble-angular_v20.5.3",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v23.0.1",
"commit": "not available"
}
]
}
},
{
"date": "Thu, 21 Mar 2024 17:13:38 GMT",
"version": "20.5.2",
Expand Down
10 changes: 9 additions & 1 deletion angular-workspace/projects/ni/nimble-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Change Log - @ni/nimble-angular

This log was last generated on Thu, 21 Mar 2024 17:13:38 GMT and should not be manually modified.
This log was last generated on Mon, 25 Mar 2024 17:03:11 GMT and should not be manually modified.

<!-- Start content -->

## 20.5.3

Mon, 25 Mar 2024 17:03:11 GMT

### Patches

- Bump @ni/nimble-components to v23.0.1

## 20.5.2

Thu, 21 Mar 2024 17:13:38 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": "20.5.2",
"version": "20.5.3",
"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 @@ -31,7 +31,7 @@
"@angular/forms": "^15.2.10",
"@angular/localize": "^15.2.10",
"@angular/router": "^15.2.10",
"@ni/nimble-components": "^23.0.0"
"@ni/nimble-components": "^23.0.1"
},
"dependencies": {
"tslib": "^2.2.0"
Expand Down
8 changes: 4 additions & 4 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 packages/nimble-blazor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ni/nimble-blazor",
"version": "14.5.2",
"version": "14.5.3",
"description": "Blazor components for the NI Nimble Design System",
"scripts": {
"postinstall": "node build/generate-playwright-version-properties/source/index.js",
Expand Down
15 changes: 15 additions & 0 deletions packages/nimble-components/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@ni/nimble-components",
"entries": [
{
"date": "Mon, 25 Mar 2024 17:03:11 GMT",
"version": "23.0.1",
"tag": "@ni/nimble-components_v23.0.1",
"comments": {
"patch": [
{
"author": "[email protected]",
"package": "@ni/nimble-components",
"commit": "f56b73b45161a55b967dc03bbdd094a6527c814c",
"comment": "Created new hover event for the new diesTable api and changed the zoom event"
}
]
}
},
{
"date": "Fri, 22 Mar 2024 16:18:25 GMT",
"version": "23.0.0",
Expand Down
10 changes: 9 additions & 1 deletion packages/nimble-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Change Log - @ni/nimble-components

This log was last generated on Thu, 21 Mar 2024 17:13:38 GMT and should not be manually modified.
This log was last generated on Mon, 25 Mar 2024 17:03:11 GMT and should not be manually modified.

<!-- Start content -->

## 23.0.1

Mon, 25 Mar 2024 17:03:11 GMT

### Patches

- Created new hover event for the new diesTable api and changed the zoom event ([ni/nimble@f56b73b](https://github.com/ni/nimble/commit/f56b73b45161a55b967dc03bbdd094a6527c814c))

## 23.0.0

Thu, 21 Mar 2024 17:13:38 GMT
Expand Down
2 changes: 1 addition & 1 deletion packages/nimble-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ni/nimble-components",
"version": "23.0.0",
"version": "23.0.1",
"description": "Styled web components for the NI Nimble Design System",
"scripts": {
"build": "npm run generate-icons && npm run generate-workers && npm run build-components && npm run bundle-components && npm run generate-scss && npm run build-storybook",
Expand Down
37 changes: 20 additions & 17 deletions packages/nimble-components/src/wafer-map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class WaferMap<
* @internal
* needs to be initialized before the properties trigger changes
*/
public readonly waferMapUpdateTracker: WaferMapUpdateTracker = new WaferMapUpdateTracker(this as WaferMap);
public readonly waferMapUpdateTracker: WaferMapUpdateTracker = new WaferMapUpdateTracker(this.asRequiredFieldsWaferMap);

@attr({ attribute: 'origin-location' })
public originLocation: WaferMapOriginLocation = WaferMapOriginLocation.bottomLeft;
Expand Down Expand Up @@ -96,31 +96,30 @@ export class WaferMap<
* @internal
*/
public readonly stableDataManager: DataManager = new DataManager(
this as WaferMap
this.asRequiredFieldsWaferMap
);

/**
* @internal
*/
public readonly experimentalDataManager: ExperimentalDataManager = new ExperimentalDataManager(this as WaferMap);
public readonly experimentalDataManager: ExperimentalDataManager = new ExperimentalDataManager(
this.asRequiredFieldsWaferMap
);

/**
* @internal
*/
public dataManager: DataManager | ExperimentalDataManager = this.stableDataManager;

/**
* @internal
*/
public readonly mainRenderer: RenderingModule = new RenderingModule(
this as WaferMap
public readonly mainRenderer = new RenderingModule(
this.asRequiredFieldsWaferMap
);

/**
* @internal
*/
public readonly workerRenderer: WorkerRenderer = new WorkerRenderer(
this as WaferMap
public readonly workerRenderer = new WorkerRenderer(
this.asRequiredFieldsWaferMap
);

@observable
Expand Down Expand Up @@ -181,17 +180,17 @@ export class WaferMap<
};

private readonly hoverHandler: HoverHandler = new HoverHandler(
this as WaferMap
this.asRequiredFieldsWaferMap
);

private readonly experimentalHoverHandler: ExperimentalHoverHandler = new ExperimentalHoverHandler(this as WaferMap);
private readonly experimentalHoverHandler: ExperimentalHoverHandler = new ExperimentalHoverHandler(this.asRequiredFieldsWaferMap);

private readonly zoomHandler: ZoomHandler = new ZoomHandler(
this as WaferMap
this.asRequiredFieldsWaferMap
);

private readonly resizeObserver = this.createResizeObserver();
private readonly waferMapValidator: WaferMapValidator = new WaferMapValidator(this as WaferMap);
private readonly waferMapValidator: WaferMapValidator = new WaferMapValidator(this.asRequiredFieldsWaferMap);

public get validity(): WaferMapValidity {
return this.waferMapValidator.getValidity();
Expand Down Expand Up @@ -237,9 +236,9 @@ export class WaferMap<
if (this.waferMapUpdateTracker.requiresEventsUpdate) {
// zoom translateExtent needs to be recalculated when canvas size changes
this.zoomHandler.disconnect();
this.dataManager = this.diesTable === undefined
? this.stableDataManager
: this.experimentalDataManager;
this.dataManager = this.isExperimentalRenderer()
? this.experimentalDataManager
: this.stableDataManager;
if (this.waferMapUpdateTracker.requiresContainerDimensionsUpdate) {
this.dataManager.updateContainerDimensions();
this.renderer.updateSortedDiesAndDrawWafer();
Expand Down Expand Up @@ -379,6 +378,10 @@ export class WaferMap<
this.waferMapUpdateTracker.track('hoverDie');
this.waferMapUpdateTracker.queueUpdate();
}

private get asRequiredFieldsWaferMap(): WaferMap {
return this as WaferMap;
}
}

const nimbleWaferMap = WaferMap.compose({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DataType, Float, Int, Precision } from 'apache-arrow';
import { DataType, Precision } from 'apache-arrow';
import type { WaferMap } from '..';
import type { WaferMapValidity } from '../types';

Expand All @@ -25,10 +25,10 @@ export class WaferMapValidator {
public validateGridDimensions(): boolean {
this.invalidGridDimensions = false;
if (
typeof this.wafermap.gridMinX === 'undefined'
&& typeof this.wafermap.gridMaxX === 'undefined'
&& typeof this.wafermap.gridMinY === 'undefined'
&& typeof this.wafermap.gridMaxY === 'undefined'
this.wafermap.gridMinX === undefined
&& this.wafermap.gridMaxX === undefined
&& this.wafermap.gridMinY === undefined
&& this.wafermap.gridMaxY === undefined
) {
this.invalidGridDimensions = false;
} else if (
Expand All @@ -49,41 +49,20 @@ export class WaferMapValidator {
if (this.wafermap.diesTable === undefined) {
this.invalidDiesTableSchema = false;
} else {
const colIndexField = this.wafermap.diesTable.schema.fields.findIndex(
f => f.name === 'colIndex'
);
const rowIndexField = this.wafermap.diesTable.schema.fields.findIndex(
f => f.name === 'rowIndex'
);
const valueField = this.wafermap.diesTable.schema.fields.findIndex(
f => f.name === 'value'
);
const fields = this.wafermap.diesTable.schema.fields;
const colField = fields.find(field => field.name === 'colIndex');
const rowField = fields.find(field => field.name === 'rowIndex');
const valueField = fields.find(field => field.name === 'value');
if (
this.wafermap.diesTable.numCols < 3
|| colIndexField === -1
|| rowIndexField === -1
|| valueField === -1
|| !DataType.isInt(
this.wafermap.diesTable.schema.fields[colIndexField]!.type
)
|| (
this.wafermap.diesTable.schema.fields[colIndexField]!
.type as Int
).bitWidth !== 32
|| !DataType.isInt(
this.wafermap.diesTable.schema.fields[rowIndexField]!.type
)
|| (
this.wafermap.diesTable.schema.fields[rowIndexField]!
.type as Int
).bitWidth !== 32
|| !DataType.isFloat(
this.wafermap.diesTable.schema.fields[valueField]!.type
)
|| (
this.wafermap.diesTable.schema.fields[valueField]!
.type as Float
).precision !== Precision.DOUBLE
!colField
|| !rowField
|| !valueField
|| !DataType.isInt(colField.type)
|| colField.type.bitWidth !== 32
|| !DataType.isInt(rowField.type)
|| rowField.type.bitWidth !== 32
|| !DataType.isFloat(valueField.type)
|| valueField.type.precision !== Precision.DOUBLE
) {
this.invalidDiesTableSchema = true;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { WaferMap } from '..';
import { Computations } from '../modules/computations';
import { Margin, WaferMapOriginLocation } from '../types';
import { getWaferMapMockComputations, getWaferMapDies } from './utilities';
Expand All @@ -20,7 +19,7 @@ describe('Wafermap Computations module', () => {
100,
100
);
computationsModule = new Computations(waferMock as WaferMap);
computationsModule = new Computations(waferMock);
computationsModule.updateContainerDimensions();
});

Expand Down Expand Up @@ -70,7 +69,7 @@ describe('Wafermap Computations module', () => {
200,
100
);
computationsModule = new Computations(waferMock as WaferMap);
computationsModule = new Computations(waferMock);
computationsModule.updateContainerDimensions();
});

Expand Down Expand Up @@ -114,7 +113,7 @@ describe('Wafermap Computations module', () => {
100,
100
);
computationsModule = new Computations(waferMock as WaferMap);
computationsModule = new Computations(waferMock);
computationsModule.updateContainerDimensions();
});

Expand All @@ -136,7 +135,7 @@ describe('Wafermap Computations module', () => {
100,
100
);
computationsModule = new Computations(waferMock as WaferMap);
computationsModule = new Computations(waferMock);
computationsModule.updateContainerDimensions();
});

Expand All @@ -158,7 +157,7 @@ describe('Wafermap Computations module', () => {
100,
100
);
computationsModule = new Computations(waferMock as WaferMap);
computationsModule = new Computations(waferMock);
computationsModule.updateContainerDimensions();
});

Expand All @@ -180,7 +179,7 @@ describe('Wafermap Computations module', () => {
100,
100
);
computationsModule = new Computations(waferMock as WaferMap);
computationsModule = new Computations(waferMock);
computationsModule.updateContainerDimensions();
});

Expand Down
Loading

0 comments on commit 02adccf

Please sign in to comment.