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