@magic-xpa/gui 4.801.7 → 4.900.0-dev4100.11
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/src/Manager.mjs +2 -2
- package/esm2020/src/management/gui/DisplayConvertor.mjs +1 -1
- package/esm2020/src/management/gui/FieldValidator.mjs +1 -1
- package/esm2020/src/management/gui/Helps.mjs +10 -3
- package/esm2020/src/management/gui/MgControlBase.mjs +15 -18
- package/esm2020/src/management/gui/MgFormBase.mjs +5 -16
- package/esm2020/src/management/gui/PIC.mjs +8 -1
- package/esm2020/src/management/gui/Property.mjs +2 -2
- package/esm2020/src/management/tasks/GuiTaskBase.mjs +3 -2
- package/fesm2015/magic-xpa-gui.mjs +37 -36
- package/fesm2015/magic-xpa-gui.mjs.map +1 -1
- package/fesm2020/magic-xpa-gui.mjs +37 -36
- package/fesm2020/magic-xpa-gui.mjs.map +1 -1
- package/package.json +2 -2
- package/src/management/gui/MgControlBase.d.ts +0 -2
- package/src/management/gui/MgFormBase.d.ts +1 -5
- package/src/management/gui/PIC.d.ts +3 -0
|
@@ -1595,7 +1595,7 @@ class Manager {
|
|
|
1595
1595
|
return Commands.getValue(ctrl, ctrl.getDisplayLine(true));
|
|
1596
1596
|
}
|
|
1597
1597
|
static async SetReadOnlyControl(ctrl, isReadOnly) {
|
|
1598
|
-
if (ctrl.isTextControl() || ctrl.IsRepeatable || ctrl.isCheckBox() || ctrl.
|
|
1598
|
+
if (ctrl.isTextControl() || ctrl.IsRepeatable || ctrl.isComboBox() || ctrl.isListBox() || ctrl.isCheckBox() || ctrl.isRadio()) {
|
|
1599
1599
|
if (UtilStrByteMode.isLocaleDefLangDBCS()) {
|
|
1600
1600
|
if (await ctrl.getForm().getTask().checkProp(PropInterface.PROP_TYPE_ALLOW_LOCATE_IN_QUERY, false))
|
|
1601
1601
|
return;
|
|
@@ -2023,6 +2023,7 @@ class PIC {
|
|
|
2023
2023
|
this._maskChars = 0;
|
|
2024
2024
|
this._maskSize = 0;
|
|
2025
2025
|
this._mixed = false;
|
|
2026
|
+
this._formatExp = false;
|
|
2026
2027
|
this._msk = null;
|
|
2027
2028
|
this._needLength = false;
|
|
2028
2029
|
this._negative = false;
|
|
@@ -2110,6 +2111,12 @@ class PIC {
|
|
|
2110
2111
|
decInFirstPos() {
|
|
2111
2112
|
return this._decPointIsFirst;
|
|
2112
2113
|
}
|
|
2114
|
+
setFormatExp(val) {
|
|
2115
|
+
this._formatExp = val;
|
|
2116
|
+
}
|
|
2117
|
+
isFormatExp() {
|
|
2118
|
+
return this._formatExp;
|
|
2119
|
+
}
|
|
2113
2120
|
getPosPref_() {
|
|
2114
2121
|
return this._posPref.ToString();
|
|
2115
2122
|
}
|
|
@@ -9801,7 +9808,7 @@ class Property {
|
|
|
9801
9808
|
async onModifiable() {
|
|
9802
9809
|
if (this._parentType === GuiConstants.PARENT_TYPE_CONTROL) {
|
|
9803
9810
|
let ctrl = this._parentObj;
|
|
9804
|
-
if (ctrl.isTextControl()) {
|
|
9811
|
+
if (ctrl.isTextControl() || ctrl.isChoiceControl() || ctrl.isCheckBox()) {
|
|
9805
9812
|
let task = this.GetTaskByParentObject();
|
|
9806
9813
|
let readOnlyValue = !this.GetComputedValueBoolean();
|
|
9807
9814
|
if ((readOnlyValue || task.getMode() !== Constants.TASK_MODE_QUERY) && ctrl.GetCurrReadOnly() !== readOnlyValue) {
|
|
@@ -11567,7 +11574,6 @@ class MgControlBase extends GuiControlPropertyAdapter {
|
|
|
11567
11574
|
this._firstRefreshProperties = true;
|
|
11568
11575
|
this._form = null;
|
|
11569
11576
|
this._hasValidItmAndDispVal = false;
|
|
11570
|
-
this._id = -1;
|
|
11571
11577
|
this._controlIsn = -1;
|
|
11572
11578
|
this._linkedParentDitIdx = -1;
|
|
11573
11579
|
this._orgChoiceDisps = null;
|
|
@@ -11610,9 +11616,6 @@ class MgControlBase extends GuiControlPropertyAdapter {
|
|
|
11610
11616
|
get Form() {
|
|
11611
11617
|
return this._form;
|
|
11612
11618
|
}
|
|
11613
|
-
get Id() {
|
|
11614
|
-
return this._id;
|
|
11615
|
-
}
|
|
11616
11619
|
get ControlIsn() {
|
|
11617
11620
|
return this._controlIsn;
|
|
11618
11621
|
}
|
|
@@ -11834,9 +11837,6 @@ class MgControlBase extends GuiControlPropertyAdapter {
|
|
|
11834
11837
|
case XMLConstants.MG_ATTR_CONTAINER:
|
|
11835
11838
|
this.setContainer(XmlParser.getInt(valueStr));
|
|
11836
11839
|
break;
|
|
11837
|
-
case XMLConstants.MG_ATTR_ID:
|
|
11838
|
-
this._id = XmlParser.getInt(valueStr);
|
|
11839
|
-
break;
|
|
11840
11840
|
case XMLConstants.MG_ATTR_CONTROL_ISN:
|
|
11841
11841
|
this._controlIsn = XmlParser.getInt(valueStr);
|
|
11842
11842
|
break;
|
|
@@ -11971,6 +11971,8 @@ class MgControlBase extends GuiControlPropertyAdapter {
|
|
|
11971
11971
|
}
|
|
11972
11972
|
}
|
|
11973
11973
|
getPIC() {
|
|
11974
|
+
if (this._picExpExists)
|
|
11975
|
+
this._pic.setFormatExp(this._picExpExists);
|
|
11974
11976
|
return this._pic;
|
|
11975
11977
|
}
|
|
11976
11978
|
getParent() {
|
|
@@ -12049,7 +12051,7 @@ class MgControlBase extends GuiControlPropertyAdapter {
|
|
|
12049
12051
|
}
|
|
12050
12052
|
getRangedValue(newVal) {
|
|
12051
12053
|
let vd;
|
|
12052
|
-
vd = this.
|
|
12054
|
+
vd = this.buildPicture(this.Value, newVal);
|
|
12053
12055
|
vd.evaluate();
|
|
12054
12056
|
this.ModifiedByUser = true;
|
|
12055
12057
|
let val = vd.getDispValue();
|
|
@@ -12059,7 +12061,7 @@ class MgControlBase extends GuiControlPropertyAdapter {
|
|
|
12059
12061
|
let vd;
|
|
12060
12062
|
let modified = this.ModifiedByUser;
|
|
12061
12063
|
this.ModifiedByUser = true;
|
|
12062
|
-
vd = this.
|
|
12064
|
+
vd = this.buildPicture(this.Value, newVal);
|
|
12063
12065
|
vd.evaluate();
|
|
12064
12066
|
this.ModifiedByUser = modified;
|
|
12065
12067
|
if (vd.ValidationFailed)
|
|
@@ -13388,15 +13390,17 @@ class MgControlBase extends GuiControlPropertyAdapter {
|
|
|
13388
13390
|
async ZoomButtonInitialization() {
|
|
13389
13391
|
if (this.isTextControl() && this.checkIfExistProp(PropInterface.PROP_TYPE_CONNECTED_ZOOM_CONTROL)) {
|
|
13390
13392
|
let connectedButton = this.Form.CtrlTab.GetControlByIsn((await (await this.getProp(PropInterface.PROP_TYPE_CONNECTED_ZOOM_CONTROL)).getValueInt()));
|
|
13391
|
-
|
|
13392
|
-
|
|
13393
|
-
|
|
13394
|
-
|
|
13395
|
-
|
|
13396
|
-
|
|
13393
|
+
if (connectedButton) {
|
|
13394
|
+
let imageFileName = null;
|
|
13395
|
+
if (connectedButton.IsImageButton() && connectedButton.PropertyExists(PropInterface.PROP_TYPE_IMAGE_FILENAME)) {
|
|
13396
|
+
imageFileName = await (await connectedButton.getProp(PropInterface.PROP_TYPE_IMAGE_FILENAME)).getValue();
|
|
13397
|
+
if (!Misc.IsWebUrl(imageFileName))
|
|
13398
|
+
imageFileName = "./assets/images/" + imageFileName;
|
|
13399
|
+
Commands.addOperationWithLine(CommandType.SET_STYLE, this, 0, MagicProperties.ImageFile, imageFileName);
|
|
13400
|
+
}
|
|
13401
|
+
this.ConnectedControl = connectedButton;
|
|
13402
|
+
connectedButton.ConnectedControl = this;
|
|
13397
13403
|
}
|
|
13398
|
-
this.ConnectedControl = connectedButton;
|
|
13399
|
-
connectedButton.ConnectedControl = this;
|
|
13400
13404
|
}
|
|
13401
13405
|
}
|
|
13402
13406
|
}
|
|
@@ -13945,13 +13949,8 @@ class MgFormBase extends GuiFormPropertyAdapter {
|
|
|
13945
13949
|
if (idx >= 0 && idx < this.Rows.length)
|
|
13946
13950
|
this.Rows.set_Item(idx, new Row(false, false));
|
|
13947
13951
|
}
|
|
13948
|
-
SelectRow(
|
|
13949
|
-
|
|
13950
|
-
this.SelectRow_0();
|
|
13951
|
-
else if (arguments.length === 1)
|
|
13952
|
-
this.SelectRow_1(sendAlwaysOrRowIdx);
|
|
13953
|
-
else
|
|
13954
|
-
this.SelectRow_2(sendAlwaysOrRowIdx, sendAlways);
|
|
13952
|
+
SelectRow() {
|
|
13953
|
+
this.SelectRowByIdx(this.DisplayLine);
|
|
13955
13954
|
}
|
|
13956
13955
|
getRowsInPage() {
|
|
13957
13956
|
return this._rowsInPage;
|
|
@@ -14189,19 +14188,13 @@ class MgFormBase extends GuiFormPropertyAdapter {
|
|
|
14189
14188
|
this.Rows.SetSize(idx + 1);
|
|
14190
14189
|
this.Rows.set_Item(idx, new Row(true, true));
|
|
14191
14190
|
}
|
|
14192
|
-
|
|
14193
|
-
this.SelectRow(false);
|
|
14194
|
-
}
|
|
14195
|
-
SelectRow_1(sendAlways) {
|
|
14196
|
-
this.SelectRow(this.DisplayLine, sendAlways);
|
|
14197
|
-
}
|
|
14198
|
-
SelectRow_2(rowIdx, sendAlways) {
|
|
14191
|
+
SelectRowByIdx(rowIdx) {
|
|
14199
14192
|
let mainControl = this.getMainControl();
|
|
14200
14193
|
if (mainControl !== null && this.RefreshRepeatableAllowed) {
|
|
14201
14194
|
let index = rowIdx;
|
|
14202
14195
|
if (this._task.DataView.isEmptyDataview())
|
|
14203
14196
|
index = GuiConstants.NO_ROW_SELECTED;
|
|
14204
|
-
if (
|
|
14197
|
+
if (index !== this._prevSelIndex) {
|
|
14205
14198
|
this._prevSelIndex = index;
|
|
14206
14199
|
Commands.addOperationWithLine(CommandType.SET_PROPERTY, mainControl, 0, HtmlProperties.SelectedRow, index);
|
|
14207
14200
|
}
|
|
@@ -15435,9 +15428,16 @@ class Helps {
|
|
|
15435
15428
|
initInnerObjects(foundTagName, parser) {
|
|
15436
15429
|
if (foundTagName === null)
|
|
15437
15430
|
return false;
|
|
15438
|
-
if (foundTagName === XMLConstants.MG_TAG_HELPTABLE)
|
|
15431
|
+
if (foundTagName === XMLConstants.MG_TAG_HELPTABLE) {
|
|
15432
|
+
let currrentIndex = parser.getCurrIndex();
|
|
15433
|
+
let encoded = parser.ReadContentOfCurrentElement().trim();
|
|
15434
|
+
let decoded = Base64.decode(encoded.substr(0, encoded.length).trim());
|
|
15435
|
+
let newXmlData = parser.getXMLdata().replace(encoded.trim(), decoded);
|
|
15436
|
+
parser.setXMLdata(newXmlData);
|
|
15437
|
+
parser.setCurrIndex(currrentIndex);
|
|
15439
15438
|
parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) +
|
|
15440
15439
|
1);
|
|
15440
|
+
}
|
|
15441
15441
|
else if (foundTagName === XMLConstants.MG_TAG_HELPITEM) {
|
|
15442
15442
|
let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
|
|
15443
15443
|
if (endContext !== -1 && endContext < parser.getXMLdata().length) {
|
|
@@ -16017,7 +16017,8 @@ class GuiTaskBase {
|
|
|
16017
16017
|
this.IsParallel = XmlParser.getBoolean(valueStr);
|
|
16018
16018
|
break;
|
|
16019
16019
|
case XMLConstants.MG_ATTR_ROUTER_PATH:
|
|
16020
|
-
|
|
16020
|
+
if (valueStr.trim() != "")
|
|
16021
|
+
this.routerPath = valueStr;
|
|
16021
16022
|
break;
|
|
16022
16023
|
case XMLConstants.MG_ATTR_IN_DEFAULT_ROUTER_OUTLET:
|
|
16023
16024
|
this.inDefaultRouterOutlet = XmlParser.getBoolean(valueStr);
|