@ni/nimble-components 18.5.4 → 18.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-components-bundle.js +118 -42
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +550 -534
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/tabs/styles.js +1 -0
- package/dist/esm/tabs/styles.js.map +1 -1
- package/dist/esm/wafer-map/modules/computations.d.ts +8 -7
- package/dist/esm/wafer-map/modules/computations.js +38 -37
- package/dist/esm/wafer-map/modules/computations.js.map +1 -1
- package/dist/esm/wafer-map/modules/data-manager.d.ts +5 -3
- package/dist/esm/wafer-map/modules/data-manager.js +6 -0
- package/dist/esm/wafer-map/modules/data-manager.js.map +1 -1
- package/dist/esm/wafer-map/modules/hover-handler.js +2 -2
- package/dist/esm/wafer-map/modules/hover-handler.js.map +1 -1
- package/dist/esm/wafer-map/modules/prerendering.d.ts +2 -2
- package/dist/esm/wafer-map/modules/prerendering.js +4 -2
- package/dist/esm/wafer-map/modules/prerendering.js.map +1 -1
- package/dist/esm/wafer-map/modules/rendering.js.map +1 -1
- package/package.json +4 -2
|
@@ -28418,6 +28418,7 @@
|
|
|
28418
28418
|
grid-row: 2;
|
|
28419
28419
|
grid-column-start: 1;
|
|
28420
28420
|
grid-column-end: 4;
|
|
28421
|
+
overflow: auto;
|
|
28421
28422
|
}
|
|
28422
28423
|
`;
|
|
28423
28424
|
|
|
@@ -33172,6 +33173,18 @@ Instead styling against the role which is more general and likely a better appro
|
|
|
33172
33173
|
return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
|
|
33173
33174
|
}
|
|
33174
33175
|
|
|
33176
|
+
function quantileSorted(values, p, valueof = number$1) {
|
|
33177
|
+
if (!(n = values.length) || isNaN(p = +p)) return;
|
|
33178
|
+
if (p <= 0 || n < 2) return +valueof(values[0], 0, values);
|
|
33179
|
+
if (p >= 1) return +valueof(values[n - 1], n - 1, values);
|
|
33180
|
+
var n,
|
|
33181
|
+
i = (n - 1) * p,
|
|
33182
|
+
i0 = Math.floor(i),
|
|
33183
|
+
value0 = +valueof(values[i0], i0, values),
|
|
33184
|
+
value1 = +valueof(values[i0 + 1], i0 + 1, values);
|
|
33185
|
+
return value0 + (value1 - value0) * (i - i0);
|
|
33186
|
+
}
|
|
33187
|
+
|
|
33175
33188
|
function range(start, stop, step) {
|
|
33176
33189
|
start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
|
|
33177
33190
|
|
|
@@ -33870,6 +33883,61 @@ Instead styling against the role which is more general and likely a better appro
|
|
|
33870
33883
|
return linearish(scale);
|
|
33871
33884
|
}
|
|
33872
33885
|
|
|
33886
|
+
function quantile() {
|
|
33887
|
+
var domain = [],
|
|
33888
|
+
range = [],
|
|
33889
|
+
thresholds = [],
|
|
33890
|
+
unknown;
|
|
33891
|
+
|
|
33892
|
+
function rescale() {
|
|
33893
|
+
var i = 0, n = Math.max(1, range.length);
|
|
33894
|
+
thresholds = new Array(n - 1);
|
|
33895
|
+
while (++i < n) thresholds[i - 1] = quantileSorted(domain, i / n);
|
|
33896
|
+
return scale;
|
|
33897
|
+
}
|
|
33898
|
+
|
|
33899
|
+
function scale(x) {
|
|
33900
|
+
return x == null || isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];
|
|
33901
|
+
}
|
|
33902
|
+
|
|
33903
|
+
scale.invertExtent = function(y) {
|
|
33904
|
+
var i = range.indexOf(y);
|
|
33905
|
+
return i < 0 ? [NaN, NaN] : [
|
|
33906
|
+
i > 0 ? thresholds[i - 1] : domain[0],
|
|
33907
|
+
i < thresholds.length ? thresholds[i] : domain[domain.length - 1]
|
|
33908
|
+
];
|
|
33909
|
+
};
|
|
33910
|
+
|
|
33911
|
+
scale.domain = function(_) {
|
|
33912
|
+
if (!arguments.length) return domain.slice();
|
|
33913
|
+
domain = [];
|
|
33914
|
+
for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);
|
|
33915
|
+
domain.sort(ascending);
|
|
33916
|
+
return rescale();
|
|
33917
|
+
};
|
|
33918
|
+
|
|
33919
|
+
scale.range = function(_) {
|
|
33920
|
+
return arguments.length ? (range = Array.from(_), rescale()) : range.slice();
|
|
33921
|
+
};
|
|
33922
|
+
|
|
33923
|
+
scale.unknown = function(_) {
|
|
33924
|
+
return arguments.length ? (unknown = _, scale) : unknown;
|
|
33925
|
+
};
|
|
33926
|
+
|
|
33927
|
+
scale.quantiles = function() {
|
|
33928
|
+
return thresholds.slice();
|
|
33929
|
+
};
|
|
33930
|
+
|
|
33931
|
+
scale.copy = function() {
|
|
33932
|
+
return quantile()
|
|
33933
|
+
.domain(domain)
|
|
33934
|
+
.range(range)
|
|
33935
|
+
.unknown(unknown);
|
|
33936
|
+
};
|
|
33937
|
+
|
|
33938
|
+
return initRange.apply(scale, arguments);
|
|
33939
|
+
}
|
|
33940
|
+
|
|
33873
33941
|
const WaferMapQuadrant = {
|
|
33874
33942
|
bottomLeft: 'bottom-left',
|
|
33875
33943
|
bottomRight: 'bottom-right',
|
|
@@ -33896,13 +33964,7 @@ Instead styling against the role which is more general and likely a better appro
|
|
|
33896
33964
|
*/
|
|
33897
33965
|
class Computations {
|
|
33898
33966
|
constructor(wafermap) {
|
|
33899
|
-
this.
|
|
33900
|
-
top: 0,
|
|
33901
|
-
right: 0,
|
|
33902
|
-
bottom: 0,
|
|
33903
|
-
left: 0
|
|
33904
|
-
};
|
|
33905
|
-
this.defaultAlign = 0.5;
|
|
33967
|
+
this.defaultPadding = 0;
|
|
33906
33968
|
this.baseMarginPercentage = 0.04;
|
|
33907
33969
|
const canvasDimensions = {
|
|
33908
33970
|
width: wafermap.canvasWidth,
|
|
@@ -33927,11 +33989,13 @@ Instead styling against the role which is more general and likely a better appro
|
|
|
33927
33989
|
const containerDiameter = Math.min(this.containerDimensions.width, this.containerDimensions.height);
|
|
33928
33990
|
// this scale is used for positioning the dies on the canvas
|
|
33929
33991
|
this.horizontalScale = this.createHorizontalScale(wafermap.quadrant, gridDimensions, containerDiameter);
|
|
33992
|
+
this.invertedHorizontalScale = this.createInvertedHorizontalScale(wafermap.quadrant, gridDimensions, containerDiameter);
|
|
33930
33993
|
// this scale is used for positioning the dies on the canvas
|
|
33931
33994
|
this.verticalScale = this.createVerticalScale(wafermap.quadrant, gridDimensions, containerDiameter);
|
|
33995
|
+
this.invertedVerticalScale = this.createInvertedVerticalScale(wafermap.quadrant, gridDimensions, containerDiameter);
|
|
33932
33996
|
this.dieDimensions = {
|
|
33933
|
-
width: this.
|
|
33934
|
-
height: this.
|
|
33997
|
+
width: this.horizontalScale.bandwidth(),
|
|
33998
|
+
height: this.verticalScale.bandwidth()
|
|
33935
33999
|
};
|
|
33936
34000
|
this.radius = containerDiameter / 2;
|
|
33937
34001
|
}
|
|
@@ -33968,42 +34032,46 @@ Instead styling against the role which is more general and likely a better appro
|
|
|
33968
34032
|
};
|
|
33969
34033
|
}
|
|
33970
34034
|
createHorizontalScale(axisLocation, grid, containerWidth) {
|
|
34035
|
+
const scale = band()
|
|
34036
|
+
.domain(range(grid.origin.x, grid.origin.x + grid.cols))
|
|
34037
|
+
.paddingInner(0)
|
|
34038
|
+
.paddingOuter(0)
|
|
34039
|
+
.align(0)
|
|
34040
|
+
.round(false);
|
|
33971
34041
|
if (axisLocation === WaferMapQuadrant.bottomLeft
|
|
33972
34042
|
|| axisLocation === WaferMapQuadrant.topLeft) {
|
|
33973
|
-
return
|
|
33974
|
-
.domain([grid.origin.x, grid.origin.x + grid.cols])
|
|
33975
|
-
.range([0, containerWidth]);
|
|
34043
|
+
return scale.range([0, containerWidth]);
|
|
33976
34044
|
}
|
|
33977
|
-
return
|
|
33978
|
-
|
|
33979
|
-
|
|
34045
|
+
return scale.range([containerWidth, 0]);
|
|
34046
|
+
}
|
|
34047
|
+
createInvertedHorizontalScale(axisLocation, grid, containerWidth) {
|
|
34048
|
+
const scale = quantile().domain([0, containerWidth]);
|
|
34049
|
+
if (axisLocation === WaferMapQuadrant.bottomLeft
|
|
34050
|
+
|| axisLocation === WaferMapQuadrant.topLeft) {
|
|
34051
|
+
return scale.range(range(grid.origin.x, grid.origin.x + grid.cols));
|
|
34052
|
+
}
|
|
34053
|
+
return scale.range(range(grid.origin.x, grid.origin.x + grid.cols).reverse());
|
|
33980
34054
|
}
|
|
33981
34055
|
createVerticalScale(axisLocation, grid, containerHeight) {
|
|
34056
|
+
const scale = band()
|
|
34057
|
+
.domain(range(grid.origin.y, grid.origin.y + grid.rows))
|
|
34058
|
+
.paddingInner(this.defaultPadding)
|
|
34059
|
+
.paddingOuter(0)
|
|
34060
|
+
.align(0)
|
|
34061
|
+
.round(false);
|
|
33982
34062
|
if (axisLocation === WaferMapQuadrant.bottomLeft
|
|
33983
34063
|
|| axisLocation === WaferMapQuadrant.bottomRight) {
|
|
33984
|
-
return
|
|
33985
|
-
|
|
33986
|
-
|
|
33987
|
-
|
|
33988
|
-
|
|
33989
|
-
|
|
33990
|
-
|
|
33991
|
-
|
|
33992
|
-
|
|
33993
|
-
|
|
33994
|
-
|
|
33995
|
-
.padding(0)
|
|
33996
|
-
.domain(this.horizontalScale.ticks(cols))
|
|
33997
|
-
.range([0, containerWidth])
|
|
33998
|
-
.bandwidth();
|
|
33999
|
-
}
|
|
34000
|
-
calculateGridHeight(rows, containerHeight) {
|
|
34001
|
-
return band()
|
|
34002
|
-
.align(this.defaultAlign)
|
|
34003
|
-
.padding(0)
|
|
34004
|
-
.domain(this.verticalScale.ticks(rows))
|
|
34005
|
-
.range([0, containerHeight])
|
|
34006
|
-
.bandwidth();
|
|
34064
|
+
return scale.range([containerHeight, 0]);
|
|
34065
|
+
}
|
|
34066
|
+
return scale.range([0, containerHeight]);
|
|
34067
|
+
}
|
|
34068
|
+
createInvertedVerticalScale(axisLocation, grid, containerHeight) {
|
|
34069
|
+
const scale = quantile().domain([0, containerHeight]);
|
|
34070
|
+
if (axisLocation === WaferMapQuadrant.bottomLeft
|
|
34071
|
+
|| axisLocation === WaferMapQuadrant.bottomRight) {
|
|
34072
|
+
return scale.range(range(grid.origin.y, grid.origin.y + grid.rows).reverse());
|
|
34073
|
+
}
|
|
34074
|
+
return scale.range(range(grid.origin.y, grid.origin.y + grid.rows));
|
|
34007
34075
|
}
|
|
34008
34076
|
calculateMarginAddition(baseMargin, addedMargin) {
|
|
34009
34077
|
return {
|
|
@@ -34028,9 +34096,11 @@ Instead styling against the role which is more general and likely a better appro
|
|
|
34028
34096
|
this.labelsFontSize = this.calculateLabelsFontSize(dieDimensions, wafermap.maxCharacters);
|
|
34029
34097
|
this.diesRenderInfo = [];
|
|
34030
34098
|
for (const die of wafermap.dies) {
|
|
34099
|
+
const scaledX = horizontalScale(die.x) ?? 0;
|
|
34100
|
+
const scaledY = verticalScale(die.y) ?? 0;
|
|
34031
34101
|
this.diesRenderInfo.push({
|
|
34032
|
-
x:
|
|
34033
|
-
y:
|
|
34102
|
+
x: scaledX + margin.right,
|
|
34103
|
+
y: scaledY + margin.top,
|
|
34034
34104
|
fillStyle: this.calculateFillStyle(die.value, wafermap.colorScaleMode, wafermap.highlightedValues),
|
|
34035
34105
|
text: this.buildLabel(die.value, wafermap.maxCharacters, wafermap.dieLabelsHidden, wafermap.dieLabelsSuffix)
|
|
34036
34106
|
});
|
|
@@ -34124,9 +34194,15 @@ Instead styling against the role which is more general and likely a better appro
|
|
|
34124
34194
|
get horizontalScale() {
|
|
34125
34195
|
return this.computations.horizontalScale;
|
|
34126
34196
|
}
|
|
34197
|
+
get invertedHorizontalScale() {
|
|
34198
|
+
return this.computations.invertedHorizontalScale;
|
|
34199
|
+
}
|
|
34127
34200
|
get verticalScale() {
|
|
34128
34201
|
return this.computations.verticalScale;
|
|
34129
34202
|
}
|
|
34203
|
+
get invertedVerticalScale() {
|
|
34204
|
+
return this.computations.invertedVerticalScale;
|
|
34205
|
+
}
|
|
34130
34206
|
get labelsFontSize() {
|
|
34131
34207
|
return this.prerendering.labelsFontSize;
|
|
34132
34208
|
}
|
|
@@ -34324,8 +34400,8 @@ Instead styling against the role which is more general and likely a better appro
|
|
|
34324
34400
|
? Math.floor
|
|
34325
34401
|
: Math.ceil;
|
|
34326
34402
|
// go to x and y scale to get the x,y values of the die.
|
|
34327
|
-
const x = xRoundFunction(this.wafermap.dataManager.
|
|
34328
|
-
const y = yRoundFunction(this.wafermap.dataManager.
|
|
34403
|
+
const x = xRoundFunction(this.wafermap.dataManager.invertedHorizontalScale(mousePosition.x - this.wafermap.dataManager.margin.left));
|
|
34404
|
+
const y = yRoundFunction(this.wafermap.dataManager.invertedVerticalScale(mousePosition.y - this.wafermap.dataManager.margin.top));
|
|
34329
34405
|
return { x, y };
|
|
34330
34406
|
}
|
|
34331
34407
|
hoversOverDie(mousePosition) {
|