@magic-xpa/engine 4.1000.0 → 4.1000.410-0.428
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/esm2020/index.mjs +1 -1
- package/esm2020/src/ClientManager.mjs +6 -3
- package/esm2020/src/CurrentClientVersion.mjs +2 -2
- package/esm2020/src/GuiEventsProcessor.mjs +5 -5
- package/esm2020/src/event/EventsManager.mjs +18 -5
- package/esm2020/src/event/RunTimeEvent.mjs +8 -1
- package/fesm2015/magic-xpa-engine.mjs +36 -11
- package/fesm2015/magic-xpa-engine.mjs.map +1 -1
- package/fesm2020/magic-xpa-engine.mjs +34 -11
- package/fesm2020/magic-xpa-engine.mjs.map +1 -1
- package/package.json +4 -4
- package/src/event/EventsManager.d.ts +1 -0
- package/src/event/RunTimeEvent.d.ts +3 -0
@@ -3126,6 +3126,12 @@ class MgPriorityBlockingQueue {
|
|
3126
3126
|
}
|
3127
3127
|
|
3128
3128
|
class RunTimeEvent extends RunTimeEventBase {
|
3129
|
+
set ShouldHandleZoom(value) {
|
3130
|
+
this._shouldHandleZoom = value;
|
3131
|
+
}
|
3132
|
+
get ShouldHandleZoom() {
|
3133
|
+
return this._shouldHandleZoom;
|
3134
|
+
}
|
3129
3135
|
set Control(value) {
|
3130
3136
|
this._ctrl = value;
|
3131
3137
|
}
|
@@ -3169,6 +3175,7 @@ class RunTimeEvent extends RunTimeEventBase {
|
|
3169
3175
|
this._task = null;
|
3170
3176
|
this._taskTag = null;
|
3171
3177
|
this._val = null;
|
3178
|
+
this._shouldHandleZoom = false;
|
3172
3179
|
this.IgnoreSpecifiedControl = false;
|
3173
3180
|
this.LastFocusedVal = null;
|
3174
3181
|
if (arguments.length === 1 && (taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt === null || taskRefOrCtrlRefOrTaskrefOrFldRefOrEvt instanceof TaskBase))
|
@@ -25818,7 +25825,7 @@ class EventsManager {
|
|
25818
25825
|
if (raiseAt === RaiseAt.TaskInFocus)
|
25819
25826
|
mgControl.setRtEvtTask(LastFocusedManager.Instance.getLastFocusedTask());
|
25820
25827
|
}
|
25821
|
-
await this.handleFocus(mgControl, line, produceClick);
|
25828
|
+
await this.handleFocus(mgControl, line, produceClick, false);
|
25822
25829
|
currTask.setCancelWasRaised(cancelWasRaised);
|
25823
25830
|
if (this._stopExecution)
|
25824
25831
|
return;
|
@@ -26401,7 +26408,7 @@ class EventsManager {
|
|
26401
26408
|
this.setLastSavedRouteEvent(aRtEvt);
|
26402
26409
|
}
|
26403
26410
|
}
|
26404
|
-
async handleFocus(ctrl, line, onClick) {
|
26411
|
+
async handleFocus(ctrl, line, onClick, shouldHandleZoom) {
|
26405
26412
|
try {
|
26406
26413
|
if (ctrl.isStatic())
|
26407
26414
|
return;
|
@@ -26419,6 +26426,10 @@ class EventsManager {
|
|
26419
26426
|
let prevCtrl = LastFocusedManager.getLastFocusedControl();
|
26420
26427
|
if (ctrl === prevCtrl && !ctrl.isRepeatable()) {
|
26421
26428
|
await ctrl.getForm().bringRecordToPage();
|
26429
|
+
await this.HandleZoomIfNeeded(ctrl, line, shouldHandleZoom);
|
26430
|
+
let rtEvnt = this.getLastRtEvent();
|
26431
|
+
if (rtEvnt != null && rtEvnt.ShouldHandleZoom)
|
26432
|
+
FocusManager.SetFocus(ctrl, -1);
|
26422
26433
|
return;
|
26423
26434
|
}
|
26424
26435
|
let prevTask = LastFocusedManager.Instance.getLastFocusedTask();
|
@@ -26458,8 +26469,10 @@ class EventsManager {
|
|
26458
26469
|
}
|
26459
26470
|
else
|
26460
26471
|
await this.HandleNonParkableControls(ctrl.getForm().getTask());
|
26461
|
-
if (!this._stopExecution && MgControl.ReturnToCtrl === ctrl)
|
26472
|
+
if (!this._stopExecution && MgControl.ReturnToCtrl === ctrl) {
|
26462
26473
|
LastFocusedManager.setLastFocusedControl(ctrl.getForm().getTask(), ctrl);
|
26474
|
+
await this.HandleZoomIfNeeded(ctrl, line, shouldHandleZoom);
|
26475
|
+
}
|
26463
26476
|
return;
|
26464
26477
|
}
|
26465
26478
|
finally {
|
@@ -26520,6 +26533,13 @@ class EventsManager {
|
|
26520
26533
|
}
|
26521
26534
|
}
|
26522
26535
|
}
|
26536
|
+
async HandleZoomIfNeeded(ctrl, line, shouldHandleZoom) {
|
26537
|
+
if (shouldHandleZoom) {
|
26538
|
+
var rtEvt = new RunTimeEvent(ctrl, line, true);
|
26539
|
+
rtEvt.setInternal(InternalInterface.MG_ACT_ZOOM);
|
26540
|
+
await this.handleEvent(rtEvt, false);
|
26541
|
+
}
|
26542
|
+
}
|
26523
26543
|
canGoToControl(ctrl, onClick) {
|
26524
26544
|
if (onClick && (ctrl.Type === MgControlType.CTRL_TYPE_SUBFORM || ctrl.Type === MgControlType.CTRL_TYPE_BROWSER))
|
26525
26545
|
return false;
|
@@ -26752,7 +26772,7 @@ class EventsManager {
|
|
26752
26772
|
case InternalInterface.MG_ACT_WEB_ON_DBLICK:
|
26753
26773
|
break;
|
26754
26774
|
case InternalInterface.MG_ACT_CTRL_FOCUS:
|
26755
|
-
await this.handleFocus(ctrl, displayLine, evt.isProduceClick());
|
26775
|
+
await this.handleFocus(ctrl, displayLine, evt.isProduceClick(), evt.ShouldHandleZoom);
|
26756
26776
|
return false;
|
26757
26777
|
case InternalInterface.MG_ACT_CTRL_FOCUS_ON_NON_MAGIC_CONTROL:
|
26758
26778
|
await this.handleFocusOnNonMagicControl(ctrl);
|
@@ -28610,15 +28630,15 @@ class GuiEventsProcessor extends EventsProcessor {
|
|
28610
28630
|
}
|
28611
28631
|
static processSelection(val, guiMgCtrl, line, produceClick) {
|
28612
28632
|
let mgControl = guiMgCtrl;
|
28613
|
-
if (mgControl.Type === MgControlType.CTRL_TYPE_BUTTON && mgControl.getForm().getTask().getLastParkedCtrl() !== mgControl)
|
28614
|
-
produceClick = true;
|
28615
28633
|
if (guiMgCtrl.ConnectedControl) {
|
28616
28634
|
let rtEvt = new RunTimeEvent(mgControl, +line, true);
|
28617
|
-
rtEvt.setInternal(InternalInterface.
|
28618
|
-
rtEvt.
|
28635
|
+
rtEvt.setInternal(InternalInterface.MG_ACT_CTRL_FOCUS);
|
28636
|
+
rtEvt.ShouldHandleZoom = true;
|
28619
28637
|
EventsManager.Instance.addToTail(rtEvt);
|
28620
28638
|
}
|
28621
28639
|
else {
|
28640
|
+
if (mgControl.Type === MgControlType.CTRL_TYPE_BUTTON && mgControl.getForm().getTask().getLastParkedCtrl() !== mgControl)
|
28641
|
+
produceClick = true;
|
28622
28642
|
let rtEvt = new RunTimeEvent(mgControl, +line, true);
|
28623
28643
|
rtEvt.setInternal(InternalInterface.MG_ACT_SELECTION);
|
28624
28644
|
rtEvt.setValue(val);
|
@@ -29546,7 +29566,7 @@ class CommandsTable {
|
|
29546
29566
|
}
|
29547
29567
|
}
|
29548
29568
|
|
29549
|
-
let CurrentClientVersion = '4.1000.
|
29569
|
+
let CurrentClientVersion = '4.1000.04100.428';
|
29550
29570
|
|
29551
29571
|
class ClientManager {
|
29552
29572
|
static get Instance() {
|
@@ -29574,7 +29594,7 @@ class ClientManager {
|
|
29574
29594
|
}
|
29575
29595
|
break;
|
29576
29596
|
case "mousedown":
|
29577
|
-
if (control.isButton()) {
|
29597
|
+
if (control.isButton() || (control.ConnectedControl && guiEvent.fromButton)) {
|
29578
29598
|
this._buttonIsClicked = true;
|
29579
29599
|
}
|
29580
29600
|
else if (!control.isSubform())
|
@@ -29593,7 +29613,7 @@ class ClientManager {
|
|
29593
29613
|
}
|
29594
29614
|
break;
|
29595
29615
|
case "focus":
|
29596
|
-
if (this._buttonIsClicked)
|
29616
|
+
if (this._buttonIsClicked || (control.ConnectedControl && guiEvent.fromButton))
|
29597
29617
|
return;
|
29598
29618
|
Events.OnFocus(control, lineIdx, true, false);
|
29599
29619
|
break;
|
@@ -29609,6 +29629,9 @@ class ClientManager {
|
|
29609
29629
|
case "setexternalvalue":
|
29610
29630
|
EventsManager.Instance.AddExternalValueEvent(control, guiEvent.externalValue, guiEvent.param);
|
29611
29631
|
break;
|
29632
|
+
case "setAsThreeState":
|
29633
|
+
control.setAsThreeState();
|
29634
|
+
break;
|
29612
29635
|
default:
|
29613
29636
|
break;
|
29614
29637
|
}
|