@wcardinal/wcardinal-ui 0.428.0 → 0.430.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.
Files changed (35) hide show
  1. package/dist/types/wcardinal/ui/d-chart-selection-simple.d.ts +27 -3
  2. package/dist/types/wcardinal/ui/d-view-gesture-impl.d.ts +1 -0
  3. package/dist/types/wcardinal/ui/d-view.d.ts +9 -0
  4. package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-open.d.ts +8 -2
  5. package/dist/types/wcardinal/ui/util/util-gesture-data.d.ts +1 -0
  6. package/dist/types/wcardinal/ui/util/util-gesture-tap.d.ts +16 -2
  7. package/dist/wcardinal/ui/d-chart-selection-simple.js +45 -8
  8. package/dist/wcardinal/ui/d-chart-selection-simple.js.map +1 -1
  9. package/dist/wcardinal/ui/d-view-gesture-impl.js +7 -0
  10. package/dist/wcardinal/ui/d-view-gesture-impl.js.map +1 -1
  11. package/dist/wcardinal/ui/d-view.js.map +1 -1
  12. package/dist/wcardinal/ui/shape/action/e-shape-action-value-open.js +23 -24
  13. package/dist/wcardinal/ui/shape/action/e-shape-action-value-open.js.map +1 -1
  14. package/dist/wcardinal/ui/util/util-gesture-data.js.map +1 -1
  15. package/dist/wcardinal/ui/util/util-gesture-tap.js +58 -7
  16. package/dist/wcardinal/ui/util/util-gesture-tap.js.map +1 -1
  17. package/dist/wcardinal/ui/util/util-gesture.js +3 -1
  18. package/dist/wcardinal/ui/util/util-gesture.js.map +1 -1
  19. package/dist/wcardinal-ui-theme-dark-en-us.js +1 -1
  20. package/dist/wcardinal-ui-theme-dark-en-us.min.js +1 -1
  21. package/dist/wcardinal-ui-theme-dark-ja-jp.js +1 -1
  22. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +1 -1
  23. package/dist/wcardinal-ui-theme-dark.js +1 -1
  24. package/dist/wcardinal-ui-theme-dark.min.js +1 -1
  25. package/dist/wcardinal-ui-theme-white-en-us.js +1 -1
  26. package/dist/wcardinal-ui-theme-white-en-us.min.js +1 -1
  27. package/dist/wcardinal-ui-theme-white-ja-jp.js +1 -1
  28. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +1 -1
  29. package/dist/wcardinal-ui-theme-white.js +1 -1
  30. package/dist/wcardinal-ui-theme-white.min.js +1 -1
  31. package/dist/wcardinal-ui.cjs.js +137 -41
  32. package/dist/wcardinal-ui.js +137 -41
  33. package/dist/wcardinal-ui.min.js +2 -2
  34. package/dist/wcardinal-ui.min.js.map +1 -1
  35. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.428.0
2
+ Winter Cardinal UI v0.430.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -15978,12 +15978,30 @@ var UtilGestureEasing = /** @class */ (function () {
15978
15978
  */
15979
15979
  var UtilGestureTap = /** @class */ (function () {
15980
15980
  function UtilGestureTap(on, options) {
15981
- var _a;
15982
- this._onTap = on === null || on === void 0 ? void 0 : on.tap;
15983
- this._threshold = (_a = options === null || options === void 0 ? void 0 : options.threshold) !== null && _a !== void 0 ? _a : 10;
15981
+ if (on != null) {
15982
+ this._onTap = on.tap;
15983
+ this._onLongPress = on.longpress;
15984
+ }
15985
+ this._threshold = this.toThreshold(options);
15984
15986
  this._unused = [];
15985
15987
  this._used = new Map();
15986
15988
  }
15989
+ UtilGestureTap.prototype.toThreshold = function (options) {
15990
+ var _a, _b;
15991
+ if (options != null) {
15992
+ var threshold = options.threshold;
15993
+ if (threshold != null) {
15994
+ return {
15995
+ distance: (_a = threshold.distance) !== null && _a !== void 0 ? _a : 10,
15996
+ long: (_b = threshold.long) !== null && _b !== void 0 ? _b : 500
15997
+ };
15998
+ }
15999
+ }
16000
+ return {
16001
+ distance: 10,
16002
+ long: 500
16003
+ };
16004
+ };
15987
16005
  UtilGestureTap.prototype.newData = function (target) {
15988
16006
  var used = this._used;
15989
16007
  var result = used.get(target);
@@ -16006,6 +16024,11 @@ var UtilGestureTap = /** @class */ (function () {
16006
16024
  var target = data.target;
16007
16025
  if (target) {
16008
16026
  if (this._used.delete(target)) {
16027
+ var timeoutId = data.timeoutId;
16028
+ if (timeoutId != null) {
16029
+ data.timeoutId = undefined;
16030
+ window.clearTimeout(timeoutId);
16031
+ }
16009
16032
  data.target = undefined;
16010
16033
  data.pointers.clear();
16011
16034
  this._unused.push(data);
@@ -16026,7 +16049,7 @@ var UtilGestureTap = /** @class */ (function () {
16026
16049
  };
16027
16050
  UtilGestureTap.prototype.onDown = function (target, e) {
16028
16051
  var _a;
16029
- if (this._onTap == null) {
16052
+ if (this._onTap == null && this._onLongPress == null) {
16030
16053
  return;
16031
16054
  }
16032
16055
  var layer = DApplications.getLayer(target);
@@ -16049,6 +16072,8 @@ var UtilGestureTap = /** @class */ (function () {
16049
16072
  data.start(e);
16050
16073
  // Event handler
16051
16074
  data.bind(e);
16075
+ // Long press
16076
+ this.start(target, data, e);
16052
16077
  }
16053
16078
  };
16054
16079
  UtilGestureTap.prototype.onMove = function (e, data) {
@@ -16101,10 +16126,36 @@ var UtilGestureTap = /** @class */ (function () {
16101
16126
  // Delete this data
16102
16127
  this.deleteData(data);
16103
16128
  };
16129
+ UtilGestureTap.prototype.onLongPress = function (target, data, e) {
16130
+ data.timeoutId = undefined;
16131
+ if (data.distance < this._threshold.distance) {
16132
+ data.distance = this._threshold.distance;
16133
+ var onLongPress = this._onLongPress;
16134
+ if (onLongPress != null) {
16135
+ onLongPress(target, e);
16136
+ }
16137
+ }
16138
+ };
16139
+ UtilGestureTap.prototype.start = function (target, data, e) {
16140
+ var _this = this;
16141
+ var thresholdLong = this._threshold.long;
16142
+ if (0 <= thresholdLong) {
16143
+ data.timeoutId = window.setTimeout(function () {
16144
+ _this.onLongPress(target, data, e);
16145
+ }, thresholdLong);
16146
+ }
16147
+ };
16104
16148
  UtilGestureTap.prototype.end = function (target, data, e) {
16105
- var onTap = this._onTap;
16106
- if (onTap && data.distance < this._threshold) {
16107
- onTap(target, e);
16149
+ var timeoutId = data.timeoutId;
16150
+ if (timeoutId != null) {
16151
+ data.timeoutId = undefined;
16152
+ window.clearTimeout(timeoutId);
16153
+ }
16154
+ if (data.distance < this._threshold.distance) {
16155
+ var onTap = this._onTap;
16156
+ if (onTap) {
16157
+ onTap(target, e);
16158
+ }
16108
16159
  }
16109
16160
  };
16110
16161
  UtilGestureTap.prototype.stop = function (target) {
@@ -16217,7 +16268,7 @@ var UtilGesture = /** @class */ (function () {
16217
16268
  UtilGesture.prototype.onDown = function (target, e) {
16218
16269
  var _a;
16219
16270
  if (this._touch && !this.isTouch(e)) {
16220
- return this._tap.onDown(target, e);
16271
+ return;
16221
16272
  }
16222
16273
  if (!this._checkerStart(e, this._modifier, target)) {
16223
16274
  return this._tap.onDown(target, e);
@@ -16252,6 +16303,8 @@ var UtilGesture = /** @class */ (function () {
16252
16303
  }
16253
16304
  // Event handler
16254
16305
  data.bind(e);
16306
+ // Tap
16307
+ this._tap.start(target, data, e);
16255
16308
  }
16256
16309
  };
16257
16310
  UtilGesture.prototype.newOnMove = function (data) {
@@ -16440,6 +16493,9 @@ var DViewGestureImpl = /** @class */ (function () {
16440
16493
  },
16441
16494
  tap: function (target, e) {
16442
16495
  _this.onTap(target, e);
16496
+ },
16497
+ longpress: function (target, e) {
16498
+ _this.onLongPress(target, e);
16443
16499
  }
16444
16500
  }
16445
16501
  });
@@ -16462,6 +16518,10 @@ var DViewGestureImpl = /** @class */ (function () {
16462
16518
  var parent = this._parent;
16463
16519
  parent.emit("gesturetap", target, e, parent);
16464
16520
  };
16521
+ DViewGestureImpl.prototype.onLongPress = function (target, e) {
16522
+ var parent = this._parent;
16523
+ parent.emit("gesturelongpress", target, e, parent);
16524
+ };
16465
16525
  DViewGestureImpl.prototype.onGestureMove = function (target, dx, dy, x, y, ds, work) {
16466
16526
  if (target != null) {
16467
16527
  // Scale
@@ -26586,34 +26646,33 @@ var EShapeActionValueOpen = /** @class */ (function (_super) {
26586
26646
  return new EShapeActionValueOpen(this.toSubType(serialized), condition, target, this.inNewWindow(serialized));
26587
26647
  };
26588
26648
  EShapeActionValueOpen.toSubType = function (serialized) {
26589
- if (serialized.length === 6) {
26590
- switch (serialized[2]) {
26591
- case EShapeActionValueOpenType.DIAGRAM_LEGACY:
26592
- return EShapeActionValueOpenType.DIAGRAM;
26593
- case EShapeActionValueOpenType.PAGE_LEGACY:
26594
- return EShapeActionValueOpenType.PAGE;
26595
- case EShapeActionValueOpenType.PAGE_INPLACE_LEGACY:
26596
- return EShapeActionValueOpenType.PAGE;
26597
- }
26598
- }
26599
- else {
26600
- return serialized[2];
26649
+ switch (serialized[2]) {
26650
+ case EShapeActionValueOpenType.DIAGRAM_LEGACY:
26651
+ return EShapeActionValueOpenType.DIAGRAM;
26652
+ case EShapeActionValueOpenType.PAGE_LEGACY:
26653
+ return EShapeActionValueOpenType.PAGE;
26654
+ case EShapeActionValueOpenType.PAGE_INPLACE_LEGACY:
26655
+ return EShapeActionValueOpenType.PAGE;
26656
+ case EShapeActionValueOpenType.DIAGRAM:
26657
+ return EShapeActionValueOpenType.DIAGRAM;
26658
+ case EShapeActionValueOpenType.PAGE:
26659
+ return EShapeActionValueOpenType.PAGE;
26601
26660
  }
26661
+ return EShapeActionValueOpenType.DIAGRAM;
26602
26662
  };
26603
26663
  EShapeActionValueOpen.inNewWindow = function (serialized) {
26604
- if (serialized.length === 6) {
26605
- switch (serialized[2]) {
26606
- case EShapeActionValueOpenType.DIAGRAM_LEGACY:
26607
- return false;
26608
- case EShapeActionValueOpenType.PAGE_LEGACY:
26609
- return true;
26610
- case EShapeActionValueOpenType.PAGE_INPLACE_LEGACY:
26611
- return false;
26612
- }
26613
- }
26614
- else {
26615
- return !!serialized[4];
26664
+ switch (serialized[2]) {
26665
+ case EShapeActionValueOpenType.DIAGRAM_LEGACY:
26666
+ return false;
26667
+ case EShapeActionValueOpenType.PAGE_LEGACY:
26668
+ return true;
26669
+ case EShapeActionValueOpenType.PAGE_INPLACE_LEGACY:
26670
+ return false;
26671
+ case EShapeActionValueOpenType.DIAGRAM:
26672
+ case EShapeActionValueOpenType.PAGE:
26673
+ return !!serialized[4];
26616
26674
  }
26675
+ return false;
26617
26676
  };
26618
26677
  return EShapeActionValueOpen;
26619
26678
  }(EShapeActionValueSubtyped));
@@ -84024,6 +84083,9 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
84024
84083
  _this._onTapBound = function (target, e) {
84025
84084
  _this.onTap(e);
84026
84085
  };
84086
+ _this._onLongPressBound = function (target, e) {
84087
+ _this.onLongPress(e);
84088
+ };
84027
84089
  return _this;
84028
84090
  }
84029
84091
  DChartSelectionSimple.prototype.toDismiss = function (options) {
@@ -84031,13 +84093,31 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
84031
84093
  if (options != null) {
84032
84094
  var dismiss = options.dismiss;
84033
84095
  if (dismiss != null) {
84034
- if (dismiss.enable === false) {
84035
- return undefined;
84036
- }
84037
- return toEnum((_a = dismiss.modifier) !== null && _a !== void 0 ? _a : UtilGestureModifier.NOT_NONE, UtilGestureModifier);
84096
+ return {
84097
+ enable: (_a = dismiss.enable) !== null && _a !== void 0 ? _a : true,
84098
+ tap: this.toDismissTap(dismiss.tap),
84099
+ longPress: this.toDismissLongPress(dismiss.longPress)
84100
+ };
84038
84101
  }
84039
84102
  }
84040
- return UtilGestureModifier.NOT_NONE;
84103
+ return {
84104
+ enable: true,
84105
+ tap: this.toDismissTap(),
84106
+ longPress: this.toDismissLongPress()
84107
+ };
84108
+ };
84109
+ DChartSelectionSimple.prototype.toDismissTap = function (options) {
84110
+ var _a, _b;
84111
+ return {
84112
+ enable: (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : true,
84113
+ modifier: toEnum((_b = options === null || options === void 0 ? void 0 : options.modifier) !== null && _b !== void 0 ? _b : UtilGestureModifier.NOT_NONE, UtilGestureModifier)
84114
+ };
84115
+ };
84116
+ DChartSelectionSimple.prototype.toDismissLongPress = function (options) {
84117
+ var _a;
84118
+ return {
84119
+ enable: (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : true
84120
+ };
84041
84121
  };
84042
84122
  DChartSelectionSimple.prototype.newSelected = function (point, options) {
84043
84123
  return new DChartSelectionSubImpl(this.toSelectedOptions(point, options));
@@ -84091,7 +84171,9 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
84091
84171
  }
84092
84172
  var dismiss = this._dismiss;
84093
84173
  var selected = this._selected;
84094
- if (dismiss != null && UtilGestureModifiers.match(e, dismiss)) {
84174
+ if (dismiss.enable &&
84175
+ dismiss.tap.enable &&
84176
+ UtilGestureModifiers.match(e, dismiss.tap.modifier)) {
84095
84177
  selected.unset();
84096
84178
  }
84097
84179
  else {
@@ -84106,6 +84188,16 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
84106
84188
  }
84107
84189
  }
84108
84190
  };
84191
+ DChartSelectionSimple.prototype.onLongPress = function (e) {
84192
+ var container = this._container;
84193
+ if (container == null) {
84194
+ return;
84195
+ }
84196
+ var dismiss = this._dismiss;
84197
+ if (dismiss.enable && dismiss.longPress.enable) {
84198
+ this._selected.unset();
84199
+ }
84200
+ };
84109
84201
  DChartSelectionSimple.prototype.onMove = function (e) {
84110
84202
  var container = this._container;
84111
84203
  if (container == null) {
@@ -84136,16 +84228,20 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
84136
84228
  this._selected.bind(container);
84137
84229
  this._hovered.bind(container);
84138
84230
  var plotArea = container.plotArea;
84231
+ var plotAreaView = plotArea.view;
84139
84232
  plotArea.on(UtilPointerEvent.move, this._onMoveBound);
84140
- plotArea.view.on("gesturetap", this._onTapBound);
84233
+ plotAreaView.on("gesturetap", this._onTapBound);
84234
+ plotAreaView.on("gesturelongpress", this._onLongPressBound);
84141
84235
  };
84142
84236
  DChartSelectionSimple.prototype.unbind = function () {
84143
84237
  var container = this._container;
84144
84238
  this._container = null;
84145
84239
  if (container != null) {
84146
84240
  var plotArea = container.plotArea;
84241
+ var plotAreaView = plotArea.view;
84147
84242
  plotArea.off(UtilPointerEvent.move, this._onMoveBound);
84148
- plotArea.view.off("gesturetap", this._onTapBound);
84243
+ plotAreaView.off("gesturetap", this._onTapBound);
84244
+ plotAreaView.off("gesturelongpress", this._onLongPressBound);
84149
84245
  }
84150
84246
  this._selected.unbind();
84151
84247
  this._hovered.unbind();
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.428.0
2
+ Winter Cardinal UI v0.430.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -15975,12 +15975,30 @@
15975
15975
  */
15976
15976
  var UtilGestureTap = /** @class */ (function () {
15977
15977
  function UtilGestureTap(on, options) {
15978
- var _a;
15979
- this._onTap = on === null || on === void 0 ? void 0 : on.tap;
15980
- this._threshold = (_a = options === null || options === void 0 ? void 0 : options.threshold) !== null && _a !== void 0 ? _a : 10;
15978
+ if (on != null) {
15979
+ this._onTap = on.tap;
15980
+ this._onLongPress = on.longpress;
15981
+ }
15982
+ this._threshold = this.toThreshold(options);
15981
15983
  this._unused = [];
15982
15984
  this._used = new Map();
15983
15985
  }
15986
+ UtilGestureTap.prototype.toThreshold = function (options) {
15987
+ var _a, _b;
15988
+ if (options != null) {
15989
+ var threshold = options.threshold;
15990
+ if (threshold != null) {
15991
+ return {
15992
+ distance: (_a = threshold.distance) !== null && _a !== void 0 ? _a : 10,
15993
+ long: (_b = threshold.long) !== null && _b !== void 0 ? _b : 500
15994
+ };
15995
+ }
15996
+ }
15997
+ return {
15998
+ distance: 10,
15999
+ long: 500
16000
+ };
16001
+ };
15984
16002
  UtilGestureTap.prototype.newData = function (target) {
15985
16003
  var used = this._used;
15986
16004
  var result = used.get(target);
@@ -16003,6 +16021,11 @@
16003
16021
  var target = data.target;
16004
16022
  if (target) {
16005
16023
  if (this._used.delete(target)) {
16024
+ var timeoutId = data.timeoutId;
16025
+ if (timeoutId != null) {
16026
+ data.timeoutId = undefined;
16027
+ window.clearTimeout(timeoutId);
16028
+ }
16006
16029
  data.target = undefined;
16007
16030
  data.pointers.clear();
16008
16031
  this._unused.push(data);
@@ -16023,7 +16046,7 @@
16023
16046
  };
16024
16047
  UtilGestureTap.prototype.onDown = function (target, e) {
16025
16048
  var _a;
16026
- if (this._onTap == null) {
16049
+ if (this._onTap == null && this._onLongPress == null) {
16027
16050
  return;
16028
16051
  }
16029
16052
  var layer = DApplications.getLayer(target);
@@ -16046,6 +16069,8 @@
16046
16069
  data.start(e);
16047
16070
  // Event handler
16048
16071
  data.bind(e);
16072
+ // Long press
16073
+ this.start(target, data, e);
16049
16074
  }
16050
16075
  };
16051
16076
  UtilGestureTap.prototype.onMove = function (e, data) {
@@ -16098,10 +16123,36 @@
16098
16123
  // Delete this data
16099
16124
  this.deleteData(data);
16100
16125
  };
16126
+ UtilGestureTap.prototype.onLongPress = function (target, data, e) {
16127
+ data.timeoutId = undefined;
16128
+ if (data.distance < this._threshold.distance) {
16129
+ data.distance = this._threshold.distance;
16130
+ var onLongPress = this._onLongPress;
16131
+ if (onLongPress != null) {
16132
+ onLongPress(target, e);
16133
+ }
16134
+ }
16135
+ };
16136
+ UtilGestureTap.prototype.start = function (target, data, e) {
16137
+ var _this = this;
16138
+ var thresholdLong = this._threshold.long;
16139
+ if (0 <= thresholdLong) {
16140
+ data.timeoutId = window.setTimeout(function () {
16141
+ _this.onLongPress(target, data, e);
16142
+ }, thresholdLong);
16143
+ }
16144
+ };
16101
16145
  UtilGestureTap.prototype.end = function (target, data, e) {
16102
- var onTap = this._onTap;
16103
- if (onTap && data.distance < this._threshold) {
16104
- onTap(target, e);
16146
+ var timeoutId = data.timeoutId;
16147
+ if (timeoutId != null) {
16148
+ data.timeoutId = undefined;
16149
+ window.clearTimeout(timeoutId);
16150
+ }
16151
+ if (data.distance < this._threshold.distance) {
16152
+ var onTap = this._onTap;
16153
+ if (onTap) {
16154
+ onTap(target, e);
16155
+ }
16105
16156
  }
16106
16157
  };
16107
16158
  UtilGestureTap.prototype.stop = function (target) {
@@ -16214,7 +16265,7 @@
16214
16265
  UtilGesture.prototype.onDown = function (target, e) {
16215
16266
  var _a;
16216
16267
  if (this._touch && !this.isTouch(e)) {
16217
- return this._tap.onDown(target, e);
16268
+ return;
16218
16269
  }
16219
16270
  if (!this._checkerStart(e, this._modifier, target)) {
16220
16271
  return this._tap.onDown(target, e);
@@ -16249,6 +16300,8 @@
16249
16300
  }
16250
16301
  // Event handler
16251
16302
  data.bind(e);
16303
+ // Tap
16304
+ this._tap.start(target, data, e);
16252
16305
  }
16253
16306
  };
16254
16307
  UtilGesture.prototype.newOnMove = function (data) {
@@ -16437,6 +16490,9 @@
16437
16490
  },
16438
16491
  tap: function (target, e) {
16439
16492
  _this.onTap(target, e);
16493
+ },
16494
+ longpress: function (target, e) {
16495
+ _this.onLongPress(target, e);
16440
16496
  }
16441
16497
  }
16442
16498
  });
@@ -16459,6 +16515,10 @@
16459
16515
  var parent = this._parent;
16460
16516
  parent.emit("gesturetap", target, e, parent);
16461
16517
  };
16518
+ DViewGestureImpl.prototype.onLongPress = function (target, e) {
16519
+ var parent = this._parent;
16520
+ parent.emit("gesturelongpress", target, e, parent);
16521
+ };
16462
16522
  DViewGestureImpl.prototype.onGestureMove = function (target, dx, dy, x, y, ds, work) {
16463
16523
  if (target != null) {
16464
16524
  // Scale
@@ -26583,34 +26643,33 @@
26583
26643
  return new EShapeActionValueOpen(this.toSubType(serialized), condition, target, this.inNewWindow(serialized));
26584
26644
  };
26585
26645
  EShapeActionValueOpen.toSubType = function (serialized) {
26586
- if (serialized.length === 6) {
26587
- switch (serialized[2]) {
26588
- case EShapeActionValueOpenType.DIAGRAM_LEGACY:
26589
- return EShapeActionValueOpenType.DIAGRAM;
26590
- case EShapeActionValueOpenType.PAGE_LEGACY:
26591
- return EShapeActionValueOpenType.PAGE;
26592
- case EShapeActionValueOpenType.PAGE_INPLACE_LEGACY:
26593
- return EShapeActionValueOpenType.PAGE;
26594
- }
26595
- }
26596
- else {
26597
- return serialized[2];
26646
+ switch (serialized[2]) {
26647
+ case EShapeActionValueOpenType.DIAGRAM_LEGACY:
26648
+ return EShapeActionValueOpenType.DIAGRAM;
26649
+ case EShapeActionValueOpenType.PAGE_LEGACY:
26650
+ return EShapeActionValueOpenType.PAGE;
26651
+ case EShapeActionValueOpenType.PAGE_INPLACE_LEGACY:
26652
+ return EShapeActionValueOpenType.PAGE;
26653
+ case EShapeActionValueOpenType.DIAGRAM:
26654
+ return EShapeActionValueOpenType.DIAGRAM;
26655
+ case EShapeActionValueOpenType.PAGE:
26656
+ return EShapeActionValueOpenType.PAGE;
26598
26657
  }
26658
+ return EShapeActionValueOpenType.DIAGRAM;
26599
26659
  };
26600
26660
  EShapeActionValueOpen.inNewWindow = function (serialized) {
26601
- if (serialized.length === 6) {
26602
- switch (serialized[2]) {
26603
- case EShapeActionValueOpenType.DIAGRAM_LEGACY:
26604
- return false;
26605
- case EShapeActionValueOpenType.PAGE_LEGACY:
26606
- return true;
26607
- case EShapeActionValueOpenType.PAGE_INPLACE_LEGACY:
26608
- return false;
26609
- }
26610
- }
26611
- else {
26612
- return !!serialized[4];
26661
+ switch (serialized[2]) {
26662
+ case EShapeActionValueOpenType.DIAGRAM_LEGACY:
26663
+ return false;
26664
+ case EShapeActionValueOpenType.PAGE_LEGACY:
26665
+ return true;
26666
+ case EShapeActionValueOpenType.PAGE_INPLACE_LEGACY:
26667
+ return false;
26668
+ case EShapeActionValueOpenType.DIAGRAM:
26669
+ case EShapeActionValueOpenType.PAGE:
26670
+ return !!serialized[4];
26613
26671
  }
26672
+ return false;
26614
26673
  };
26615
26674
  return EShapeActionValueOpen;
26616
26675
  }(EShapeActionValueSubtyped));
@@ -62863,6 +62922,9 @@
62863
62922
  _this._onTapBound = function (target, e) {
62864
62923
  _this.onTap(e);
62865
62924
  };
62925
+ _this._onLongPressBound = function (target, e) {
62926
+ _this.onLongPress(e);
62927
+ };
62866
62928
  return _this;
62867
62929
  }
62868
62930
  DChartSelectionSimple.prototype.toDismiss = function (options) {
@@ -62870,13 +62932,31 @@
62870
62932
  if (options != null) {
62871
62933
  var dismiss = options.dismiss;
62872
62934
  if (dismiss != null) {
62873
- if (dismiss.enable === false) {
62874
- return undefined;
62875
- }
62876
- return toEnum((_a = dismiss.modifier) !== null && _a !== void 0 ? _a : UtilGestureModifier.NOT_NONE, UtilGestureModifier);
62935
+ return {
62936
+ enable: (_a = dismiss.enable) !== null && _a !== void 0 ? _a : true,
62937
+ tap: this.toDismissTap(dismiss.tap),
62938
+ longPress: this.toDismissLongPress(dismiss.longPress)
62939
+ };
62877
62940
  }
62878
62941
  }
62879
- return UtilGestureModifier.NOT_NONE;
62942
+ return {
62943
+ enable: true,
62944
+ tap: this.toDismissTap(),
62945
+ longPress: this.toDismissLongPress()
62946
+ };
62947
+ };
62948
+ DChartSelectionSimple.prototype.toDismissTap = function (options) {
62949
+ var _a, _b;
62950
+ return {
62951
+ enable: (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : true,
62952
+ modifier: toEnum((_b = options === null || options === void 0 ? void 0 : options.modifier) !== null && _b !== void 0 ? _b : UtilGestureModifier.NOT_NONE, UtilGestureModifier)
62953
+ };
62954
+ };
62955
+ DChartSelectionSimple.prototype.toDismissLongPress = function (options) {
62956
+ var _a;
62957
+ return {
62958
+ enable: (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : true
62959
+ };
62880
62960
  };
62881
62961
  DChartSelectionSimple.prototype.newSelected = function (point, options) {
62882
62962
  return new DChartSelectionSubImpl(this.toSelectedOptions(point, options));
@@ -62930,7 +63010,9 @@
62930
63010
  }
62931
63011
  var dismiss = this._dismiss;
62932
63012
  var selected = this._selected;
62933
- if (dismiss != null && UtilGestureModifiers.match(e, dismiss)) {
63013
+ if (dismiss.enable &&
63014
+ dismiss.tap.enable &&
63015
+ UtilGestureModifiers.match(e, dismiss.tap.modifier)) {
62934
63016
  selected.unset();
62935
63017
  }
62936
63018
  else {
@@ -62945,6 +63027,16 @@
62945
63027
  }
62946
63028
  }
62947
63029
  };
63030
+ DChartSelectionSimple.prototype.onLongPress = function (e) {
63031
+ var container = this._container;
63032
+ if (container == null) {
63033
+ return;
63034
+ }
63035
+ var dismiss = this._dismiss;
63036
+ if (dismiss.enable && dismiss.longPress.enable) {
63037
+ this._selected.unset();
63038
+ }
63039
+ };
62948
63040
  DChartSelectionSimple.prototype.onMove = function (e) {
62949
63041
  var container = this._container;
62950
63042
  if (container == null) {
@@ -62975,16 +63067,20 @@
62975
63067
  this._selected.bind(container);
62976
63068
  this._hovered.bind(container);
62977
63069
  var plotArea = container.plotArea;
63070
+ var plotAreaView = plotArea.view;
62978
63071
  plotArea.on(UtilPointerEvent.move, this._onMoveBound);
62979
- plotArea.view.on("gesturetap", this._onTapBound);
63072
+ plotAreaView.on("gesturetap", this._onTapBound);
63073
+ plotAreaView.on("gesturelongpress", this._onLongPressBound);
62980
63074
  };
62981
63075
  DChartSelectionSimple.prototype.unbind = function () {
62982
63076
  var container = this._container;
62983
63077
  this._container = null;
62984
63078
  if (container != null) {
62985
63079
  var plotArea = container.plotArea;
63080
+ var plotAreaView = plotArea.view;
62986
63081
  plotArea.off(UtilPointerEvent.move, this._onMoveBound);
62987
- plotArea.view.off("gesturetap", this._onTapBound);
63082
+ plotAreaView.off("gesturetap", this._onTapBound);
63083
+ plotAreaView.off("gesturelongpress", this._onLongPressBound);
62988
63084
  }
62989
63085
  this._selected.unbind();
62990
63086
  this._hovered.unbind();