@wcardinal/wcardinal-ui 0.430.0 → 0.431.0
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/types/wcardinal/ui/d-chart-plot-area-twofold-sub-base.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-chart-plot-area.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-chart-selection-container-impl.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-container.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-shape-base.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-chart-selection-shape.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-simple.d.ts +9 -0
- package/dist/types/wcardinal/ui/d-chart-selection-sub-impl.d.ts +6 -1
- package/dist/types/wcardinal/ui/d-chart-selection-sub.d.ts +18 -1
- package/dist/types/wcardinal/ui/d-chart-selection.d.ts +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js +3 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-shape-base.js +1 -1
- package/dist/wcardinal/ui/d-chart-selection-shape-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-shape.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-simple.js +17 -4
- package/dist/wcardinal/ui/d-chart-selection-simple.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-sub-impl.js +160 -61
- package/dist/wcardinal/ui/d-chart-selection-sub-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-sub.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white-en-us.js +1 -1
- package/dist/wcardinal-ui-theme-white-en-us.min.js +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +181 -66
- package/dist/wcardinal-ui.js +181 -66
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.431.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -83222,6 +83222,9 @@ var DChartPlotAreaTwofoldSubBase = /** @class */ (function () {
|
|
|
83222
83222
|
DChartPlotAreaTwofoldSubBase.prototype.toBoundsDirty = function () {
|
|
83223
83223
|
this._isContainerBoundsDirty = true;
|
|
83224
83224
|
};
|
|
83225
|
+
DChartPlotAreaTwofoldSubBase.prototype.toLocal = function (position, from, result, skipUpdate) {
|
|
83226
|
+
return this._plotArea.toLocal(position, from, result, skipUpdate);
|
|
83227
|
+
};
|
|
83225
83228
|
DChartPlotAreaTwofoldSubBase.prototype.destroy = function () {
|
|
83226
83229
|
this._container.destroy();
|
|
83227
83230
|
this._series.destroy();
|
|
@@ -83764,7 +83767,7 @@ var DChartSelectionShapeBase = /** @class */ (function () {
|
|
|
83764
83767
|
DChartSelectionShapeBase.prototype.set = function (container, position, mappedPosition, series) {
|
|
83765
83768
|
this.update(container, position, mappedPosition, series);
|
|
83766
83769
|
var shape = this._shape;
|
|
83767
|
-
if (shape) {
|
|
83770
|
+
if (shape != null) {
|
|
83768
83771
|
this._style(shape, series);
|
|
83769
83772
|
}
|
|
83770
83773
|
};
|
|
@@ -83901,18 +83904,25 @@ var DChartSelectionPoint = {
|
|
|
83901
83904
|
var DChartSelectionSubImpl = /** @class */ (function (_super) {
|
|
83902
83905
|
__extends(DChartSelectionSubImpl, _super);
|
|
83903
83906
|
function DChartSelectionSubImpl(options) {
|
|
83904
|
-
var _a, _b, _c
|
|
83907
|
+
var _a, _b, _c;
|
|
83905
83908
|
var _this = _super.call(this) || this;
|
|
83906
83909
|
_this._container = null;
|
|
83907
83910
|
_this._series = null;
|
|
83908
83911
|
_this._isEnabled = (_a = options.enable) !== null && _a !== void 0 ? _a : true;
|
|
83909
|
-
_this.
|
|
83912
|
+
_this._isVisible = false;
|
|
83913
|
+
var gridline = options.gridline;
|
|
83914
|
+
if (gridline != null) {
|
|
83915
|
+
_this._gridline = new DChartSelectionContainerImpl(new DChartSelectionGridlineX(gridline.x), new DChartSelectionGridlineY(gridline.y));
|
|
83916
|
+
}
|
|
83917
|
+
else {
|
|
83918
|
+
_this._gridline = new DChartSelectionContainerImpl(new DChartSelectionGridlineX(), new DChartSelectionGridlineY());
|
|
83919
|
+
}
|
|
83910
83920
|
_this._marker = new DChartSelectionMarker(options.marker);
|
|
83911
|
-
_this._state = (
|
|
83921
|
+
_this._state = (_b = options.state) !== null && _b !== void 0 ? _b : DBaseState.HOVERED;
|
|
83912
83922
|
_this._coordinateX = null;
|
|
83913
83923
|
_this._coordinateY = null;
|
|
83914
83924
|
_this._position = new pixi_js.Point();
|
|
83915
|
-
_this._point = (
|
|
83925
|
+
_this._point = (_c = options.point) !== null && _c !== void 0 ? _c : DChartSelectionPoint.CLOSER;
|
|
83916
83926
|
_this._work = new pixi_js.Point();
|
|
83917
83927
|
// Events
|
|
83918
83928
|
var on = options.on;
|
|
@@ -83940,6 +83950,13 @@ var DChartSelectionSubImpl = /** @class */ (function (_super) {
|
|
|
83940
83950
|
this._coordinateX = null;
|
|
83941
83951
|
this._coordinateY = null;
|
|
83942
83952
|
};
|
|
83953
|
+
Object.defineProperty(DChartSelectionSubImpl.prototype, "visible", {
|
|
83954
|
+
get: function () {
|
|
83955
|
+
return this._isVisible;
|
|
83956
|
+
},
|
|
83957
|
+
enumerable: false,
|
|
83958
|
+
configurable: true
|
|
83959
|
+
});
|
|
83943
83960
|
Object.defineProperty(DChartSelectionSubImpl.prototype, "series", {
|
|
83944
83961
|
get: function () {
|
|
83945
83962
|
return this._series;
|
|
@@ -83969,49 +83986,116 @@ var DChartSelectionSubImpl = /** @class */ (function (_super) {
|
|
|
83969
83986
|
configurable: true
|
|
83970
83987
|
});
|
|
83971
83988
|
DChartSelectionSubImpl.prototype.set = function (series, result) {
|
|
83989
|
+
if (isNumber(series)) {
|
|
83990
|
+
this.set1(series, result);
|
|
83991
|
+
}
|
|
83992
|
+
else {
|
|
83993
|
+
this.set2(series, result);
|
|
83994
|
+
}
|
|
83995
|
+
};
|
|
83996
|
+
DChartSelectionSubImpl.prototype.set1 = function (x, y) {
|
|
83972
83997
|
var container = this._container;
|
|
83973
|
-
|
|
83974
|
-
|
|
83975
|
-
|
|
83976
|
-
|
|
83977
|
-
|
|
83978
|
-
|
|
83979
|
-
|
|
83980
|
-
|
|
83981
|
-
|
|
83982
|
-
|
|
83983
|
-
|
|
83984
|
-
|
|
83985
|
-
|
|
83986
|
-
|
|
83987
|
-
|
|
83988
|
-
|
|
83989
|
-
|
|
83990
|
-
|
|
83991
|
-
|
|
83992
|
-
|
|
83993
|
-
|
|
83994
|
-
|
|
83995
|
-
|
|
83996
|
-
|
|
83997
|
-
|
|
83998
|
-
|
|
83999
|
-
|
|
84000
|
-
|
|
84001
|
-
|
|
84002
|
-
|
|
84003
|
-
|
|
84004
|
-
|
|
84005
|
-
|
|
84006
|
-
|
|
84007
|
-
|
|
84008
|
-
|
|
83998
|
+
if (container == null) {
|
|
83999
|
+
return;
|
|
84000
|
+
}
|
|
84001
|
+
var work = this._work;
|
|
84002
|
+
work.set(x, y);
|
|
84003
|
+
var plotArea = container.plotArea;
|
|
84004
|
+
plotArea.container.toLocal(work, undefined, work, true);
|
|
84005
|
+
var coordinate = plotArea.coordinate;
|
|
84006
|
+
var coordinateX = coordinate.x.get(0);
|
|
84007
|
+
var coordinateY = coordinate.y.get(0);
|
|
84008
|
+
var newPositionX = work.x;
|
|
84009
|
+
var newPositionY = work.y;
|
|
84010
|
+
if (coordinateX && coordinateY) {
|
|
84011
|
+
newPositionX = coordinateX.unmap(coordinateX.transform.unmap(newPositionX));
|
|
84012
|
+
newPositionY = coordinateY.unmap(coordinateY.transform.unmap(newPositionY));
|
|
84013
|
+
}
|
|
84014
|
+
else {
|
|
84015
|
+
coordinateX = null;
|
|
84016
|
+
coordinateY = null;
|
|
84017
|
+
}
|
|
84018
|
+
var oldSeries = this._series;
|
|
84019
|
+
var position = this._position;
|
|
84020
|
+
if (this._isVisible &&
|
|
84021
|
+
oldSeries == null &&
|
|
84022
|
+
newPositionX === position.x &&
|
|
84023
|
+
newPositionY === position.y) {
|
|
84024
|
+
return;
|
|
84025
|
+
}
|
|
84026
|
+
this._isVisible = true;
|
|
84027
|
+
position.set(newPositionX, newPositionY);
|
|
84028
|
+
this._coordinateX = coordinateX;
|
|
84029
|
+
this._coordinateY = coordinateY;
|
|
84030
|
+
plotArea.container.localTransform.apply(work, work);
|
|
84031
|
+
this._gridline.set(container, position, work, null);
|
|
84032
|
+
this._marker.set(container, position, work, null);
|
|
84033
|
+
if (oldSeries != null) {
|
|
84034
|
+
var state = this._state;
|
|
84035
|
+
if (oldSeries) {
|
|
84036
|
+
oldSeries.state.remove(state);
|
|
84009
84037
|
}
|
|
84010
|
-
this.
|
|
84011
|
-
|
|
84012
|
-
|
|
84038
|
+
this._series = null;
|
|
84039
|
+
}
|
|
84040
|
+
this.emit("change", this);
|
|
84041
|
+
DApplications.update(plotArea);
|
|
84042
|
+
};
|
|
84043
|
+
DChartSelectionSubImpl.prototype.set2 = function (series, result) {
|
|
84044
|
+
var container = this._container;
|
|
84045
|
+
if (container == null) {
|
|
84046
|
+
return;
|
|
84047
|
+
}
|
|
84048
|
+
var work = this._work;
|
|
84049
|
+
var x = result.x;
|
|
84050
|
+
var y = result.y;
|
|
84051
|
+
switch (this._point) {
|
|
84052
|
+
case DChartSelectionPoint.PREVIOUS:
|
|
84053
|
+
x = result.p0x;
|
|
84054
|
+
y = result.p0y;
|
|
84055
|
+
break;
|
|
84056
|
+
case DChartSelectionPoint.NEXT:
|
|
84057
|
+
x = result.p1x;
|
|
84058
|
+
y = result.p1y;
|
|
84059
|
+
break;
|
|
84060
|
+
case DChartSelectionPoint.CLOSER:
|
|
84061
|
+
if (Math.abs(result.p0x - result.x) < Math.abs(result.p1x - result.x)) {
|
|
84062
|
+
x = result.p0x;
|
|
84063
|
+
y = result.p0y;
|
|
84064
|
+
}
|
|
84065
|
+
else {
|
|
84066
|
+
x = result.p1x;
|
|
84067
|
+
y = result.p1y;
|
|
84068
|
+
}
|
|
84069
|
+
}
|
|
84070
|
+
work.set(x, y);
|
|
84071
|
+
var plotArea = container.plotArea;
|
|
84072
|
+
plotArea.container.localTransform.apply(work, work);
|
|
84073
|
+
var coordinateX = series.coordinate.x;
|
|
84074
|
+
var coordinateY = series.coordinate.y;
|
|
84075
|
+
var newPositionX = x;
|
|
84076
|
+
var newPositionY = y;
|
|
84077
|
+
if (coordinateX && coordinateY) {
|
|
84078
|
+
newPositionX = coordinateX.unmap(coordinateX.transform.unmap(newPositionX));
|
|
84079
|
+
newPositionY = coordinateY.unmap(coordinateY.transform.unmap(newPositionY));
|
|
84080
|
+
}
|
|
84081
|
+
else {
|
|
84082
|
+
coordinateX = null;
|
|
84083
|
+
coordinateY = null;
|
|
84013
84084
|
}
|
|
84014
84085
|
var oldSeries = this._series;
|
|
84086
|
+
var position = this._position;
|
|
84087
|
+
if (this._isVisible &&
|
|
84088
|
+
oldSeries === series &&
|
|
84089
|
+
newPositionX === position.x &&
|
|
84090
|
+
newPositionY === position.y) {
|
|
84091
|
+
return;
|
|
84092
|
+
}
|
|
84093
|
+
this._isVisible = true;
|
|
84094
|
+
position.set(newPositionX, newPositionY);
|
|
84095
|
+
this._coordinateX = coordinateX;
|
|
84096
|
+
this._coordinateY = coordinateY;
|
|
84097
|
+
this._gridline.set(container, position, work, series);
|
|
84098
|
+
this._marker.set(container, position, work, series);
|
|
84015
84099
|
if (oldSeries !== series) {
|
|
84016
84100
|
var state = this._state;
|
|
84017
84101
|
if (oldSeries) {
|
|
@@ -84021,34 +84105,52 @@ var DChartSelectionSubImpl = /** @class */ (function (_super) {
|
|
|
84021
84105
|
series.state.add(state);
|
|
84022
84106
|
}
|
|
84023
84107
|
this.emit("change", this);
|
|
84108
|
+
DApplications.update(plotArea);
|
|
84024
84109
|
};
|
|
84025
84110
|
DChartSelectionSubImpl.prototype.unset = function () {
|
|
84026
|
-
var
|
|
84027
|
-
if (
|
|
84111
|
+
var container = this._container;
|
|
84112
|
+
if (container == null) {
|
|
84113
|
+
return;
|
|
84114
|
+
}
|
|
84115
|
+
var oldSeries = this._series;
|
|
84116
|
+
if (!this._isVisible && oldSeries == null) {
|
|
84117
|
+
return;
|
|
84118
|
+
}
|
|
84119
|
+
this._isVisible = false;
|
|
84120
|
+
this._coordinateX = null;
|
|
84121
|
+
this._coordinateY = null;
|
|
84122
|
+
this._gridline.unset();
|
|
84123
|
+
this._marker.unset();
|
|
84124
|
+
if (oldSeries != null) {
|
|
84028
84125
|
this._series = null;
|
|
84029
|
-
this.
|
|
84030
|
-
this._coordinateY = null;
|
|
84031
|
-
series.state.remove(this._state);
|
|
84032
|
-
this._gridline.unset();
|
|
84033
|
-
this._marker.unset();
|
|
84034
|
-
this.emit("change", this);
|
|
84126
|
+
oldSeries.state.remove(this._state);
|
|
84035
84127
|
}
|
|
84128
|
+
this.emit("change", this);
|
|
84129
|
+
DApplications.update(container.plotArea);
|
|
84036
84130
|
};
|
|
84037
84131
|
DChartSelectionSubImpl.prototype.update = function () {
|
|
84038
84132
|
var container = this._container;
|
|
84133
|
+
if (container == null) {
|
|
84134
|
+
return false;
|
|
84135
|
+
}
|
|
84136
|
+
if (!this._isVisible) {
|
|
84137
|
+
return false;
|
|
84138
|
+
}
|
|
84139
|
+
var position = this._position;
|
|
84140
|
+
var work = this._work;
|
|
84039
84141
|
var coordinateX = this._coordinateX;
|
|
84040
84142
|
var coordinateY = this._coordinateY;
|
|
84041
|
-
if (
|
|
84042
|
-
var position = this._position;
|
|
84043
|
-
var work = this._work;
|
|
84143
|
+
if (coordinateX && coordinateY) {
|
|
84044
84144
|
work.set(coordinateX.transform.map(coordinateX.map(position.x)), coordinateY.transform.map(coordinateY.map(position.y)));
|
|
84045
|
-
container.plotArea.container.localTransform.apply(work, work);
|
|
84046
|
-
var series = this._series;
|
|
84047
|
-
var isGridlineUpdated = this._gridline.update(container, position, work, series);
|
|
84048
|
-
var isMarkerUpdated = this._marker.update(container, position, work, series);
|
|
84049
|
-
return isGridlineUpdated || isMarkerUpdated;
|
|
84050
84145
|
}
|
|
84051
|
-
|
|
84146
|
+
else {
|
|
84147
|
+
work.copyFrom(position);
|
|
84148
|
+
}
|
|
84149
|
+
container.plotArea.container.localTransform.apply(work, work);
|
|
84150
|
+
var series = this._series;
|
|
84151
|
+
var isGridlineUpdated = this._gridline.update(container, position, work, series);
|
|
84152
|
+
var isMarkerUpdated = this._marker.update(container, position, work, series);
|
|
84153
|
+
return isGridlineUpdated || isMarkerUpdated;
|
|
84052
84154
|
};
|
|
84053
84155
|
return DChartSelectionSubImpl;
|
|
84054
84156
|
}(pixi_js.utils.EventEmitter));
|
|
@@ -84096,14 +84198,16 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
|
|
|
84096
84198
|
return {
|
|
84097
84199
|
enable: (_a = dismiss.enable) !== null && _a !== void 0 ? _a : true,
|
|
84098
84200
|
tap: this.toDismissTap(dismiss.tap),
|
|
84099
|
-
longPress: this.toDismissLongPress(dismiss.longPress)
|
|
84201
|
+
longPress: this.toDismissLongPress(dismiss.longPress),
|
|
84202
|
+
noSeries: this.toDismissNoSeries(dismiss.noSeries)
|
|
84100
84203
|
};
|
|
84101
84204
|
}
|
|
84102
84205
|
}
|
|
84103
84206
|
return {
|
|
84104
84207
|
enable: true,
|
|
84105
84208
|
tap: this.toDismissTap(),
|
|
84106
|
-
longPress: this.toDismissLongPress()
|
|
84209
|
+
longPress: this.toDismissLongPress(),
|
|
84210
|
+
noSeries: this.toDismissNoSeries()
|
|
84107
84211
|
};
|
|
84108
84212
|
};
|
|
84109
84213
|
DChartSelectionSimple.prototype.toDismissTap = function (options) {
|
|
@@ -84119,6 +84223,12 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
|
|
|
84119
84223
|
enable: (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : true
|
|
84120
84224
|
};
|
|
84121
84225
|
};
|
|
84226
|
+
DChartSelectionSimple.prototype.toDismissNoSeries = function (options) {
|
|
84227
|
+
var _a;
|
|
84228
|
+
return {
|
|
84229
|
+
enable: (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : true
|
|
84230
|
+
};
|
|
84231
|
+
};
|
|
84122
84232
|
DChartSelectionSimple.prototype.newSelected = function (point, options) {
|
|
84123
84233
|
return new DChartSelectionSubImpl(this.toSelectedOptions(point, options));
|
|
84124
84234
|
};
|
|
@@ -84184,7 +84294,12 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
|
|
|
84184
84294
|
selected.set(series, result);
|
|
84185
84295
|
}
|
|
84186
84296
|
else {
|
|
84187
|
-
|
|
84297
|
+
if (dismiss.enable && dismiss.noSeries.enable) {
|
|
84298
|
+
selected.unset();
|
|
84299
|
+
}
|
|
84300
|
+
else {
|
|
84301
|
+
selected.set(global_1.x, global_1.y);
|
|
84302
|
+
}
|
|
84188
84303
|
}
|
|
84189
84304
|
}
|
|
84190
84305
|
};
|
|
@@ -84212,7 +84327,7 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
|
|
|
84212
84327
|
var result = DChartSelectionSimple.WORK_SELECT;
|
|
84213
84328
|
var global_2 = e.data.global;
|
|
84214
84329
|
var series = container.calcHitPoint(global_2.x, global_2.y, result);
|
|
84215
|
-
if (series) {
|
|
84330
|
+
if (series != null) {
|
|
84216
84331
|
hovered.set(series, result);
|
|
84217
84332
|
}
|
|
84218
84333
|
else {
|