@sapui5/sap.rules.ui 1.110.1 → 1.112.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/package.json +1 -1
- package/src/sap/rules/ui/.library +1 -1
- package/src/sap/rules/ui/AstExpressionBasic.js +7 -1
- package/src/sap/rules/ui/BindingSpy.js +1 -1
- package/src/sap/rules/ui/Constants.js +40 -0
- package/src/sap/rules/ui/DecisionTable.js +1 -1
- package/src/sap/rules/ui/DecisionTableCell.js +1 -1
- package/src/sap/rules/ui/DecisionTableCellAstExpressionBasic.js +13 -13
- package/src/sap/rules/ui/DecisionTableCellExpressionAdvanced.js +1 -1
- package/src/sap/rules/ui/DecisionTableCellExpressionBasic.js +1 -1
- package/src/sap/rules/ui/DecisionTableConfiguration.js +2 -2
- package/src/sap/rules/ui/DecisionTableSettings.js +1 -1
- package/src/sap/rules/ui/DecisionTableSettingsOld.js +1 -1
- package/src/sap/rules/ui/ExpressionBase.js +1 -1
- package/src/sap/rules/ui/ExpressionBasic.js +1 -1
- package/src/sap/rules/ui/RuleBase.js +1 -1
- package/src/sap/rules/ui/RuleBuilder.js +1 -1
- package/src/sap/rules/ui/TextRule.js +77 -5
- package/src/sap/rules/ui/TextRuleConfiguration.js +1 -1
- package/src/sap/rules/ui/TextRuleSettings.js +1 -1
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFixedValuePanel.js +58 -18
- package/src/sap/rules/ui/ast/parser/bundle.js +1 -1
- package/src/sap/rules/ui/i18n/messagebundle.properties +8 -0
- package/src/sap/rules/ui/i18n/messagebundle_ar.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_bg.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_ca.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_cs.properties +5 -1
- package/src/sap/rules/ui/i18n/messagebundle_cy.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_da.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_de.properties +5 -1
- package/src/sap/rules/ui/i18n/messagebundle_el.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_en.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_en_GB.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_en_US_sappsd.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_en_US_saprigi.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_en_US_saptrc.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_es.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_es_MX.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_et.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_fi.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_fr.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_fr_CA.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_hi.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_hr.properties +5 -1
- package/src/sap/rules/ui/i18n/messagebundle_hu.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_id.properties +5 -1
- package/src/sap/rules/ui/i18n/messagebundle_it.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_iw.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_ja.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_kk.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_ko.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_lt.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_lv.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_ms.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_nl.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_no.properties +5 -1
- package/src/sap/rules/ui/i18n/messagebundle_pl.properties +6 -2
- package/src/sap/rules/ui/i18n/messagebundle_pt.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_pt_PT.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_ro.properties +5 -1
- package/src/sap/rules/ui/i18n/messagebundle_ru.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_sh.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_sk.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_sl.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_sv.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_th.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_tr.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_uk.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_vi.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_zh_CN.properties +4 -0
- package/src/sap/rules/ui/i18n/messagebundle_zh_TW.properties +4 -0
- package/src/sap/rules/ui/library.js +3 -3
- package/src/sap/rules/ui/services/AstExpressionLanguage.js +2 -2
- package/src/sap/rules/ui/type/ExpressionAbs.js +1 -1
package/package.json
CHANGED
|
@@ -1073,6 +1073,10 @@ sap.ui.define([
|
|
|
1073
1073
|
}
|
|
1074
1074
|
|
|
1075
1075
|
if (currentText !== lastText) {
|
|
1076
|
+
if(lastText? lastText.trim() == "" : true && currentText.trim() == ""){
|
|
1077
|
+
this.textContent = "";
|
|
1078
|
+
return;
|
|
1079
|
+
}
|
|
1076
1080
|
that.bTypingFlow = true;
|
|
1077
1081
|
//needed when shift and some key has been keyed up at same time
|
|
1078
1082
|
if (((event.keyCode !== 8 && event.keyCode !== 46) && keyCodes.indexOf(event.keyCode) === -1) || (event.key === "Shift" && that
|
|
@@ -2799,7 +2803,9 @@ sap.ui.define([
|
|
|
2799
2803
|
Log.error("Error in parsing string to JSON: " + e.message);
|
|
2800
2804
|
}
|
|
2801
2805
|
}
|
|
2802
|
-
this.
|
|
2806
|
+
if(!(this.getDomRef("input").children && this.getDomRef("input").children.length == 1 && this.getDomRef("input").children[0].outerHTML == "<br>")){
|
|
2807
|
+
this._uiModel.push(item);
|
|
2808
|
+
}
|
|
2803
2809
|
}
|
|
2804
2810
|
that._uiModeltoString();
|
|
2805
2811
|
}
|
|
@@ -37,6 +37,46 @@ sap.ui.define(function() {
|
|
|
37
37
|
Constants.UP = "UP";
|
|
38
38
|
Constants.DOWN = "DOWN";
|
|
39
39
|
Constants.CONDITION = "CONDITION";
|
|
40
|
+
Constants.OPERATOR_MAPPING = [{valueHelpType:"U",operator:"EQ",exclude:false,supported:true,message:"equal to"},
|
|
41
|
+
{valueHelpType:"O",operator:"EQ",exclude:false,supported:true,message:"equal to"},
|
|
42
|
+
{valueHelpType:"U",operator:"Contains",exclude:false,supported:true,message:"contains"},
|
|
43
|
+
{valueHelpType:"O",operator:"Contains",exclude:false,supported:true,message:"contains"},
|
|
44
|
+
{valueHelpType:"U",operator:"EQ",exclude:true,supported:true,message:"equal to"},
|
|
45
|
+
{valueHelpType:"O",operator:"EQ",exclude:true,supported:true,message:"equal to"},
|
|
46
|
+
{valueHelpType:"U",operator:"Contains",exclude:true,supported:false,message:"does not contain"},
|
|
47
|
+
{valueHelpType:"O",operator:"Contains",exclude:true,supported:false,message:"does not contain"},
|
|
48
|
+
{valueHelpType:"U",operator:"BT",exclude:false,supported:true,message:"between"},
|
|
49
|
+
{valueHelpType:"O",operator:"BT",exclude:false,supported:false,message:"between"},
|
|
50
|
+
{valueHelpType:"U",operator:"BT",exclude:true,supported:false,message:"not between"},
|
|
51
|
+
{valueHelpType:"O",operator:"BT",exclude:true,supported:false,message:"not between"},
|
|
52
|
+
{valueHelpType:"U",operator:"StartsWith",exclude:false,supported:false,message:"starts with"},
|
|
53
|
+
{valueHelpType:"O",operator:"StartsWith",exclude:false,supported:false,message:"starts with"},
|
|
54
|
+
{valueHelpType:"U",operator:"StartsWith",exclude:true,supported:false,message:"does not start with"},
|
|
55
|
+
{valueHelpType:"O",operator:"StartsWith",exclude:true,supported:false,message:"does not start with"},
|
|
56
|
+
{valueHelpType:"U",operator:"EndsWith",exclude:false,supported:false,message:"ends with"},
|
|
57
|
+
{valueHelpType:"O",operator:"EndsWith",exclude:false,supported:false,message:"ends with"},
|
|
58
|
+
{valueHelpType:"U",operator:"EndsWith",exclude:true,supported:false,message:"does not end with"},
|
|
59
|
+
{valueHelpType:"O",operator:"EndsWith",exclude:true,supported:false,message:"does not end with"},
|
|
60
|
+
{valueHelpType:"U",operator:"LT",exclude:false,supported:true,message:"less than"},
|
|
61
|
+
{valueHelpType:"O",operator:"LT",exclude:false,supported:false,message:"less than"},
|
|
62
|
+
{valueHelpType:"U",operator:"LT",exclude:true,supported:true,message:"not less than"},
|
|
63
|
+
{valueHelpType:"O",operator:"LT",exclude:true,supported:false,message:"not less than"},
|
|
64
|
+
{valueHelpType:"U",operator:"LE",exclude:false,supported:true,message:"less than equal to"},
|
|
65
|
+
{valueHelpType:"O",operator:"LE",exclude:false,supported:false,message:"less than equal to"},
|
|
66
|
+
{valueHelpType:"U",operator:"LE",exclude:true,supported:true,message:"not less than equal to"},
|
|
67
|
+
{valueHelpType:"O",operator:"LE",exclude:true,supported:false,message:"not less than equal to"},
|
|
68
|
+
{valueHelpType:"U",operator:"GT",exclude:false,supported:true,message:"greater than"},
|
|
69
|
+
{valueHelpType:"O",operator:"GT",exclude:false,supported:false,message:"greater than"},
|
|
70
|
+
{valueHelpType:"U",operator:"GT",exclude:true,supported:true,message:"not greater than"},
|
|
71
|
+
{valueHelpType:"O",operator:"GT",exclude:true,supported:false,message:"not greater than"},
|
|
72
|
+
{valueHelpType:"U",operator:"GE",exclude:false,supported:true,message:"greater than equal to"},
|
|
73
|
+
{valueHelpType:"O",operator:"GE",exclude:false,supported:false,message:"greater than equal to"},
|
|
74
|
+
{valueHelpType:"U",operator:"GE",exclude:true,supported:true,message:"not greater than equal to"},
|
|
75
|
+
{valueHelpType:"O",operator:"GE",exclude:true,supported:false,message:"not greater than equal to"},
|
|
76
|
+
{valueHelpType:"U",operator:"Empty",exclude:false,supported:false,message:"empty"},
|
|
77
|
+
{valueHelpType:"O",operator:"Empty",exclude:false,supported:false,message:"empty"},
|
|
78
|
+
{valueHelpType:"U",operator:"Empty",exclude:true,supported:false,message:"not empty"},
|
|
79
|
+
{valueHelpType:"O",operator:"Empty",exclude:true,supported:false,message:"not empty"}];
|
|
40
80
|
return Constants;
|
|
41
81
|
|
|
42
82
|
}, true);
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @extends sap.rules.ui.AstExpressionBasic
|
|
28
28
|
*
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.112.0
|
|
31
31
|
*
|
|
32
32
|
* @constructor
|
|
33
33
|
* @private
|
|
@@ -128,7 +128,7 @@ sap.ui.define([
|
|
|
128
128
|
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
-
DecisionTableCellAstExpressionBasic.prototype._updateModelAstNodes = function (oModel, oColumnData) {
|
|
131
|
+
DecisionTableCellAstExpressionBasic.prototype._updateModelAstNodes = function (oModel, oColumnData, sGroupId) {
|
|
132
132
|
if (this.oDecisionTableCell) {
|
|
133
133
|
var astNodes = oColumnData.ASTNodes;
|
|
134
134
|
for (var node in astNodes) {
|
|
@@ -163,13 +163,13 @@ sap.ui.define([
|
|
|
163
163
|
|
|
164
164
|
var mParameters = {};
|
|
165
165
|
mParameters.properties = updatedAstNode;
|
|
166
|
-
mParameters.groupId =
|
|
166
|
+
mParameters.groupId = sGroupId;
|
|
167
167
|
oModel.createEntry("/DecisionTableRowCellASTs", mParameters);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
};
|
|
171
171
|
|
|
172
|
-
DecisionTableCellAstExpressionBasic.prototype._removeExistingAstNodes = function (oModel, oColumnData, sPath, astNodes) {
|
|
172
|
+
DecisionTableCellAstExpressionBasic.prototype._removeExistingAstNodes = function (oModel, oColumnData, sPath, astNodes, sGroupId) {
|
|
173
173
|
if (this.oDecisionTableCell) {
|
|
174
174
|
var mParameters = {};
|
|
175
175
|
mParameters.ColId = oColumnData.ColId;
|
|
@@ -199,7 +199,7 @@ sap.ui.define([
|
|
|
199
199
|
|
|
200
200
|
oModel.callFunction("/DeleteDTRowCellASTDraft", {
|
|
201
201
|
method: "POST",
|
|
202
|
-
groupId:
|
|
202
|
+
groupId: sGroupId,
|
|
203
203
|
urlParameters: mParameters
|
|
204
204
|
});
|
|
205
205
|
|
|
@@ -222,22 +222,23 @@ sap.ui.define([
|
|
|
222
222
|
};
|
|
223
223
|
|
|
224
224
|
DecisionTableCellAstExpressionBasic.prototype._removeAndUpdateExisitingNodes = function (oModel, oData, sPath, astNodes,sCellContentPath) {
|
|
225
|
-
|
|
225
|
+
var sGroupId = oData.RowId + "," + oData.ColId;
|
|
226
|
+
oModel.setDeferredGroups([sGroupId]);
|
|
226
227
|
var oEventBus = sap.ui.getCore().getEventBus();
|
|
227
228
|
oModel.update(sPath, {
|
|
228
229
|
"Content": oModel.getProperty(sCellContentPath)
|
|
229
230
|
}, {
|
|
230
|
-
groupId:
|
|
231
|
+
groupId: sGroupId,
|
|
231
232
|
success: function (oData) {
|
|
232
233
|
oEventBus.publish("sap.ui.rules", "astCreated");
|
|
233
234
|
}
|
|
234
235
|
});
|
|
235
|
-
this._removeExistingAstNodes(oModel, oData, sPath, astNodes);
|
|
236
|
+
this._removeExistingAstNodes(oModel, oData, sPath, astNodes, sGroupId);
|
|
236
237
|
if (this._checkEmptyMarkerNode(astNodes)) {
|
|
237
|
-
this._updateModelAstNodes(oModel, oData);
|
|
238
|
+
this._updateModelAstNodes(oModel, oData, sGroupId);
|
|
238
239
|
}
|
|
239
240
|
oModel.submitChanges({
|
|
240
|
-
groupId:
|
|
241
|
+
groupId: sGroupId
|
|
241
242
|
});
|
|
242
243
|
};
|
|
243
244
|
|
|
@@ -266,9 +267,8 @@ sap.ui.define([
|
|
|
266
267
|
var sCellContentPath = this.oDecisionTableCell.getValuePath();
|
|
267
268
|
var sPath = "/" + sCellContentPath.split("/")[1];
|
|
268
269
|
oEventBus.publish("sap.ui.rules", "astCreating");
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
}
|
|
270
|
+
this._removeAndUpdateExisitingNodes(oModel, oData, sPath, astNodes,sCellContentPath);
|
|
271
|
+
|
|
272
272
|
}
|
|
273
273
|
};
|
|
274
274
|
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @extends sap.ui.core.Element
|
|
25
25
|
*
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.112.0
|
|
28
28
|
*
|
|
29
29
|
* @constructor
|
|
30
30
|
* @public
|
|
@@ -39,7 +39,7 @@ sap.ui.define([
|
|
|
39
39
|
properties : {
|
|
40
40
|
/**
|
|
41
41
|
* The value determines the user input mode for the corresponding rule cells when creating or editing a rule.
|
|
42
|
-
* @deprecated
|
|
42
|
+
* @deprecated Since 1.52.8, use the decisionTableFormat property.
|
|
43
43
|
*/
|
|
44
44
|
cellFormat: {
|
|
45
45
|
type: "sap.rules.ui.DecisionTableCellFormat",
|
|
@@ -47,7 +47,7 @@ sap.ui.define(["sap/base/Log","sap/ui/thirdparty/jquery",
|
|
|
47
47
|
* @extends Control
|
|
48
48
|
*
|
|
49
49
|
* @author SAP SE
|
|
50
|
-
* @version 1.
|
|
50
|
+
* @version 1.112.0
|
|
51
51
|
*
|
|
52
52
|
* @constructor
|
|
53
53
|
* @private
|
|
@@ -162,6 +162,7 @@ sap.ui.define(["sap/base/Log","sap/ui/thirdparty/jquery",
|
|
|
162
162
|
_addConditionSuccess: function (newCondition, that, data) {
|
|
163
163
|
var sNumbering;
|
|
164
164
|
var nNewIndex;
|
|
165
|
+
var bConditionCreated = false;
|
|
165
166
|
var sConditionId = newCondition.Id;
|
|
166
167
|
var oDataModel = that._getModel();
|
|
167
168
|
var oHeaderKey = {
|
|
@@ -190,6 +191,18 @@ sap.ui.define(["sap/base/Log","sap/ui/thirdparty/jquery",
|
|
|
190
191
|
var oElsePanel = that._createElseFormLayout(oContext, that.oBundle.getText("titleElse"), true);
|
|
191
192
|
oVerticalLayout.removeContent(data.nIndex);
|
|
192
193
|
oVerticalLayout.insertContent(oElsePanel, data.nIndex);
|
|
194
|
+
oElsePanel.addEventDelegate({
|
|
195
|
+
onAfterRendering: function(){
|
|
196
|
+
if (data && data.bfirst && !bConditionCreated && oElsePanel.getContent().length > 0 && oElsePanel.getContent()[0].getFormContainers() &&
|
|
197
|
+
oElsePanel.getContent()[0].getFormContainers().length > 0 && oElsePanel.getContent()[0].getFormContainers()[0].getFormElements() &&
|
|
198
|
+
oElsePanel.getContent()[0].getFormContainers()[0].getFormElements().length > 0 && oElsePanel.getContent()[0].getFormContainers()[0].getFormElements()[0].getFields() &&
|
|
199
|
+
oElsePanel.getContent()[0].getFormContainers()[0].getFormElements()[0].getFields().length > 0 &&
|
|
200
|
+
oElsePanel.getContent()[0].getFormContainers()[0].getFormElements()[0].getFields()[0]._input) {
|
|
201
|
+
oElsePanel.getContent()[0].getFormContainers()[0].getFormElements()[0].getFields()[0]._input.focus();
|
|
202
|
+
bConditionCreated = true;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
});
|
|
193
206
|
} else if (response.Type === that.typeElseIf) {
|
|
194
207
|
that.getModel("displayModel").getProperty("/textRuleConditions/ElseIf").push(response);
|
|
195
208
|
if (data.bfirst) {
|
|
@@ -202,6 +215,18 @@ sap.ui.define(["sap/base/Log","sap/ui/thirdparty/jquery",
|
|
|
202
215
|
var oElseIfPanel = that._createFormLayout(oContext, that.oBundle.getText("titleElseIf") + sNumbering, true);
|
|
203
216
|
oVerticalLayout.insertContent(oElseIfPanel, nNewIndex);
|
|
204
217
|
that._adjustElseIfTitle(data.verticalLayout, nNewIndex, true);
|
|
218
|
+
oElseIfPanel.addEventDelegate({
|
|
219
|
+
onAfterRendering: function(){
|
|
220
|
+
if (data && data.bfirst && !bConditionCreated && oElseIfPanel.getContent().length > 0 && oElseIfPanel.getContent()[0].getFormContainers() &&
|
|
221
|
+
oElseIfPanel.getContent()[0].getFormContainers().length > 0 && oElseIfPanel.getContent()[0].getFormContainers()[0].getFormElements() &&
|
|
222
|
+
oElseIfPanel.getContent()[0].getFormContainers()[0].getFormElements().length > 0 && oElseIfPanel.getContent()[0].getFormContainers()[0].getFormElements()[0].getFields() &&
|
|
223
|
+
oElseIfPanel.getContent()[0].getFormContainers()[0].getFormElements()[0].getFields().length > 0 &&
|
|
224
|
+
oElseIfPanel.getContent()[0].getFormContainers()[0].getFormElements()[0].getFields()[0]._input) {
|
|
225
|
+
oElseIfPanel.getContent()[0].getFormContainers()[0].getFormElements()[0].getFields()[0]._input.focus();
|
|
226
|
+
bConditionCreated = true;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
});
|
|
205
230
|
}
|
|
206
231
|
that._isAddCallInProgress = false;
|
|
207
232
|
that._updateBusyState(false);
|
|
@@ -437,7 +462,7 @@ sap.ui.define(["sap/base/Log","sap/ui/thirdparty/jquery",
|
|
|
437
462
|
tooltip: this.oBundle.getText("deleteElseIf"),
|
|
438
463
|
visible: "{TextRuleModel>/editable}",
|
|
439
464
|
press: function (oEvent) {
|
|
440
|
-
that.
|
|
465
|
+
that.showDeleteConfirmationDialogMessage(oEvent.getSource());
|
|
441
466
|
}
|
|
442
467
|
}).setBindingContext(oContext);
|
|
443
468
|
|
|
@@ -472,7 +497,7 @@ sap.ui.define(["sap/base/Log","sap/ui/thirdparty/jquery",
|
|
|
472
497
|
tooltip: this.oBundle.getText("deleteElse"),
|
|
473
498
|
visible: "{TextRuleModel>/editable}",
|
|
474
499
|
press: function (oEvent) {
|
|
475
|
-
that.
|
|
500
|
+
that.showDeleteConfirmationDialogMessage(oEvent.getSource());
|
|
476
501
|
}
|
|
477
502
|
}).setBindingContext(oContext);
|
|
478
503
|
|
|
@@ -511,6 +536,35 @@ sap.ui.define(["sap/base/Log","sap/ui/thirdparty/jquery",
|
|
|
511
536
|
return oPanel;
|
|
512
537
|
},
|
|
513
538
|
|
|
539
|
+
showDeleteConfirmationDialogMessage: function(oSource) {
|
|
540
|
+
var that = this;
|
|
541
|
+
var oDialog = new Dialog({
|
|
542
|
+
title: this.oBundle.getText("warning_title"),
|
|
543
|
+
type: sap.m.DialogType.Message,
|
|
544
|
+
state: sap.ui.core.ValueState.Warning,
|
|
545
|
+
content: new Text({
|
|
546
|
+
text: this.oBundle.getText("condition_delete_confirmation_message")
|
|
547
|
+
}),
|
|
548
|
+
afterClose: function() {
|
|
549
|
+
oDialog.destroy();
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
oDialog.setBeginButton(new Button({
|
|
553
|
+
text: this.oBundle.getText("textrule_confirmation_dialog_delete"),
|
|
554
|
+
press: function() {
|
|
555
|
+
that._deleteConditionBlock(oSource)
|
|
556
|
+
oDialog.close();
|
|
557
|
+
}
|
|
558
|
+
}));
|
|
559
|
+
oDialog.setEndButton(new Button({
|
|
560
|
+
text: this.oBundle.getText("textrule_confirmation_dialog_cancel"),
|
|
561
|
+
press: function() {
|
|
562
|
+
oDialog.close();
|
|
563
|
+
}
|
|
564
|
+
}));
|
|
565
|
+
oDialog.open();
|
|
566
|
+
},
|
|
567
|
+
|
|
514
568
|
/*
|
|
515
569
|
* Returns If form container
|
|
516
570
|
*/
|
|
@@ -633,10 +687,9 @@ sap.ui.define(["sap/base/Log","sap/ui/thirdparty/jquery",
|
|
|
633
687
|
* Deletes based on Binding path
|
|
634
688
|
* Vertical layout content deleted based on its index
|
|
635
689
|
*/
|
|
636
|
-
_deleteConditionBlock: function (
|
|
690
|
+
_deleteConditionBlock: function (oSource) {
|
|
637
691
|
var that = this;
|
|
638
692
|
var oDataModel = this._getModel();
|
|
639
|
-
var oSource = oEvent.getSource();
|
|
640
693
|
var oPanel = oSource.getParent().getParent();
|
|
641
694
|
var oVerticalLayout = oPanel.getParent();
|
|
642
695
|
var nIndex = oVerticalLayout.indexOfContent(oPanel);
|
|
@@ -644,6 +697,8 @@ sap.ui.define(["sap/base/Log","sap/ui/thirdparty/jquery",
|
|
|
644
697
|
var sConditionId = oBindingContext.getProperty("Id");
|
|
645
698
|
var sType = oBindingContext.getProperty("Type");
|
|
646
699
|
var sKeyText;
|
|
700
|
+
var initialConditionCount = oVerticalLayout.getContent().length;
|
|
701
|
+
var bConditionDeleted = false;
|
|
647
702
|
if (sType === that.typeElse) {
|
|
648
703
|
sKeyText = "/TextRuleDefaultBranches";
|
|
649
704
|
} else if (sType === that.typeElseIf) {
|
|
@@ -682,6 +737,23 @@ sap.ui.define(["sap/base/Log","sap/ui/thirdparty/jquery",
|
|
|
682
737
|
that._adjustElseIfTitle(oVerticalLayout, nIndex, false);
|
|
683
738
|
} /* eslint-enable */
|
|
684
739
|
that._updateBusyState(false);
|
|
740
|
+
oVerticalLayout.addEventDelegate({
|
|
741
|
+
onAfterRendering: function(){
|
|
742
|
+
if(!bConditionDeleted) {
|
|
743
|
+
if (initialConditionCount === 3 && (nIndex === 1 || nIndex === 2)){
|
|
744
|
+
oVerticalLayout.getContent()[nIndex].getContent()[0].focus();
|
|
745
|
+
} else if(nIndex === initialConditionCount-2 && oVerticalLayout.getContent().length > 0 && oVerticalLayout.getContent()[nIndex] &&
|
|
746
|
+
oVerticalLayout.getContent()[nIndex].getContent().length > 0 && oVerticalLayout.getContent()[nIndex].getContent()[0].getMetadata().getName()
|
|
747
|
+
=== "sap.m.Button") {
|
|
748
|
+
oVerticalLayout.getContent()[initialConditionCount-2].getContent()[0].focus()
|
|
749
|
+
} else if(oVerticalLayout.getContent().length > 0 && oVerticalLayout.getContent()[nIndex] &&
|
|
750
|
+
oVerticalLayout.getContent()[nIndex].getContent().length > 0 && oVerticalLayout.getContent()[nIndex].getContent()[0].getFormContainers().length > 0) {
|
|
751
|
+
oVerticalLayout.getContent()[nIndex].getContent()[0].getFormContainers()[0].getFormElements()[0].getFields()[0]._input.focus();
|
|
752
|
+
}
|
|
753
|
+
bConditionDeleted = true;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
});
|
|
685
757
|
sap.m.MessageToast.show(that.oBundle.getText("branchDeletedSuccess"));
|
|
686
758
|
};
|
|
687
759
|
|
|
@@ -110,14 +110,18 @@ sap.ui.define([
|
|
|
110
110
|
hasValueSource = false;
|
|
111
111
|
}
|
|
112
112
|
//The invisible text is introduced to identify the input field by screen reader.
|
|
113
|
-
this.
|
|
113
|
+
this._invisibleTextLabel = new sap.ui.core.InvisibleText({
|
|
114
|
+
text:this.oBundle.getText("fixedValuePanelTitle")
|
|
115
|
+
})
|
|
116
|
+
this._invisibleTextDescription = new sap.ui.core.InvisibleText({
|
|
114
117
|
text:this.oBundle.getText("fixedValueInvisibleText")
|
|
115
118
|
});
|
|
116
119
|
this.fixedValueTextArea = new sap.m.Input({
|
|
117
120
|
showValueHelp: hasValueSource,
|
|
118
121
|
showSuggestion: true,
|
|
119
122
|
autocomplete: false,
|
|
120
|
-
ariaLabelledBy: this.
|
|
123
|
+
ariaLabelledBy: this._invisibleTextLabel.getId(),
|
|
124
|
+
ariaDescribedBy: this._invisibleTextDescription.getId(),
|
|
121
125
|
valueHelpRequest: function () {
|
|
122
126
|
that._dialogOpenedCallbackReference(true);
|
|
123
127
|
that._setModal(true);
|
|
@@ -137,7 +141,7 @@ sap.ui.define([
|
|
|
137
141
|
headerText: this.oBundle.getText("fixedValuePanelTitle"),
|
|
138
142
|
expandable: true,
|
|
139
143
|
expanded: false,
|
|
140
|
-
content: [this.
|
|
144
|
+
content: [this._invisibleTextLabel, this._invisibleTextDescription, this.fixedValueTextArea],
|
|
141
145
|
width: "auto"
|
|
142
146
|
})
|
|
143
147
|
|
|
@@ -331,8 +335,7 @@ sap.ui.define([
|
|
|
331
335
|
}
|
|
332
336
|
if (this._dateBusinessDataType === "D") {
|
|
333
337
|
formatter = sap.ui.core.format.DateFormat.getDateInstance({
|
|
334
|
-
pattern: "yyyy-MM-dd"
|
|
335
|
-
UTC:true
|
|
338
|
+
pattern: "yyyy-MM-dd"
|
|
336
339
|
});
|
|
337
340
|
sDateFormatted = formatter.format(date);
|
|
338
341
|
} else if (this._dateBusinessDataType === "U") {
|
|
@@ -363,7 +366,7 @@ sap.ui.define([
|
|
|
363
366
|
|
|
364
367
|
},
|
|
365
368
|
filterChange: function (oEvent) {
|
|
366
|
-
that.setValueStateFilter(oEvent);
|
|
369
|
+
that.setValueStateFilter(oEvent, valueHelpInfo);
|
|
367
370
|
},
|
|
368
371
|
controlConfiguration: [that._createControlConfiguration()]
|
|
369
372
|
});
|
|
@@ -657,18 +660,56 @@ sap.ui.define([
|
|
|
657
660
|
});
|
|
658
661
|
},
|
|
659
662
|
|
|
660
|
-
setValueStateFilter: function (oEvent) {
|
|
661
|
-
var
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
663
|
+
setValueStateFilter: function (oEvent, valueHelpInfo) {
|
|
664
|
+
var aFilterFields = oEvent.getSource().getAllFilterItems();
|
|
665
|
+
var aFilterValues = oEvent.getSource().getFilterData();
|
|
666
|
+
|
|
667
|
+
for (var i=0;i<aFilterFields.length; i++){
|
|
668
|
+
if(aFilterFields[i].getName() === "Value" && aFilterValues && aFilterValues.Value && aFilterValues.Value.ranges) {
|
|
669
|
+
var unsupportedOperatorsValueError = this.filterUnSupportedOperator(aFilterValues.Value.ranges, valueHelpInfo);
|
|
670
|
+
if (unsupportedOperatorsValueError) {
|
|
671
|
+
aFilterFields[i].getControl().setValueState("Error");
|
|
672
|
+
aFilterFields[i].getControl().setValueStateText(unsupportedOperatorsValueError);
|
|
673
|
+
} else {
|
|
674
|
+
aFilterFields[i].getControl().setValueState("None");
|
|
675
|
+
aFilterFields[i].getControl().setValueStateText("");
|
|
676
|
+
}
|
|
677
|
+
} else if(aFilterFields[i].getName() === "Description" && aFilterValues && aFilterValues.Description && aFilterValues.Description.ranges) {
|
|
678
|
+
var unsupportedOperatorsDescriptionError = this.filterUnSupportedOperator(aFilterValues.Description.ranges, valueHelpInfo);
|
|
679
|
+
if (unsupportedOperatorsDescriptionError) {
|
|
680
|
+
aFilterFields[i].getControl().setValueState("Error");
|
|
681
|
+
aFilterFields[i].getControl().setValueStateText(unsupportedOperatorsDescriptionError);
|
|
682
|
+
} else {
|
|
683
|
+
aFilterFields[i].getControl().setValueState("None");
|
|
684
|
+
aFilterFields[i].getControl().setValueStateText("");
|
|
685
|
+
}
|
|
686
|
+
} else if(aFilterFields[i].getName() === "Value") {
|
|
687
|
+
aFilterFields[i].getControl().setValueState("None");
|
|
688
|
+
aFilterFields[i].getControl().setValueStateText("");
|
|
689
|
+
} else if(aFilterFields[i].getName() === "Description") {
|
|
690
|
+
aFilterFields[i].getControl().setValueState("None");
|
|
691
|
+
aFilterFields[i].getControl().setValueStateText("");
|
|
692
|
+
}
|
|
666
693
|
}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
694
|
+
},
|
|
695
|
+
|
|
696
|
+
filterUnSupportedOperator: function(aRanges, valueHelpInfo) {
|
|
697
|
+
var aUnSupportedOperator = [];
|
|
698
|
+
var sUnSupportedOperatorError = "";
|
|
699
|
+
for(var i=0;i<aRanges.length;i++) {
|
|
700
|
+
var currentMapping = Constants.OPERATOR_MAPPING.find(function(oItem){
|
|
701
|
+
return aRanges[i].operation === oItem.operator && aRanges[i].exclude === oItem.exclude && valueHelpInfo.sourceType === oItem.valueHelpType
|
|
702
|
+
})
|
|
703
|
+
if (!currentMapping.supported && aUnSupportedOperator.indexOf("'" + currentMapping.message + "'") === -1) {
|
|
704
|
+
aUnSupportedOperator.push("'" + currentMapping.message + "'");
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
if (aUnSupportedOperator.length > 1) {
|
|
708
|
+
sUnSupportedOperatorError = aUnSupportedOperator.join(",") + " are not supported";
|
|
709
|
+
} else if (aUnSupportedOperator.length === 1) {
|
|
710
|
+
sUnSupportedOperatorError = aUnSupportedOperator.join(",") + " is not supported";
|
|
671
711
|
}
|
|
712
|
+
return sUnSupportedOperatorError;
|
|
672
713
|
},
|
|
673
714
|
|
|
674
715
|
_formatText: function (oEvent) {
|
|
@@ -793,8 +834,7 @@ sap.ui.define([
|
|
|
793
834
|
}
|
|
794
835
|
if (this._dateBusinessDataType === "D") {
|
|
795
836
|
formatter = sap.ui.core.format.DateFormat.getDateInstance({
|
|
796
|
-
pattern: "yyyy-MM-dd"
|
|
797
|
-
UTC:true
|
|
837
|
+
pattern: "yyyy-MM-dd"
|
|
798
838
|
});
|
|
799
839
|
sDateFormatted = formatter.format(date);
|
|
800
840
|
} else if (this._dateBusinessDataType === "U") {
|
|
@@ -10788,7 +10788,7 @@ var ASTUtil = (function () {
|
|
|
10788
10788
|
for (var node in jsonObjects) {
|
|
10789
10789
|
var businessDataType = jsonObjects[node].Output ? jsonObjects[node].Output.BusinessDataType : null;
|
|
10790
10790
|
if(businessDataType === "D"){
|
|
10791
|
-
jsonObjects[node].formattedValue = "'" + dateFormat.format(new Date(jsonObjects[node].Value.replace(/\'/g, "")),
|
|
10791
|
+
jsonObjects[node].formattedValue = "'" + dateFormat.format(new Date(jsonObjects[node].Value.replace(/\'/g, "")), true) + "'";
|
|
10792
10792
|
}
|
|
10793
10793
|
if(businessDataType === "U"){
|
|
10794
10794
|
jsonObjects[node].formattedValue = "'" + timeFormat.format(new Date(jsonObjects[node].Value.replace(/\'/g, "")), false) + "'";
|
|
@@ -603,3 +603,11 @@ quarter=quarter
|
|
|
603
603
|
value=Value
|
|
604
604
|
# XFLD: Text for ValueHelp column Description
|
|
605
605
|
description=Description
|
|
606
|
+
# XBUT: Yes Button text for Delete confirmation.
|
|
607
|
+
textrule_confirmation_dialog_delete=Delete
|
|
608
|
+
# XBUT: NO button text for Delete confirmation close.
|
|
609
|
+
textrule_confirmation_dialog_cancel=Cancel
|
|
610
|
+
# XFLD: Text for time and Duration Dialog
|
|
611
|
+
condition_delete_confirmation_message=Delete this condition?
|
|
612
|
+
# XFLD: Dialog title
|
|
613
|
+
warning_title=Delete
|
|
@@ -295,3 +295,7 @@ week=\u0623\u0633\u0628\u0648\u0639
|
|
|
295
295
|
quarter=\u0631\u0628\u0639 \u0633\u0646\u0629
|
|
296
296
|
value=\u0627\u0644\u0642\u064A\u0645\u0629
|
|
297
297
|
description=\u0627\u0644\u0648\u0635\u0641
|
|
298
|
+
textrule_confirmation_dialog_delete=\u062D\u0630\u0641
|
|
299
|
+
textrule_confirmation_dialog_cancel=\u0625\u0644\u063A\u0627\u0621
|
|
300
|
+
condition_delete_confirmation_message=\u0647\u0644 \u062A\u0631\u064A\u062F \u062D\u0630\u0641 \u0647\u0630\u0627 \u0627\u0644\u0634\u0631\u0637\u061F
|
|
301
|
+
warning_title=\u062D\u0630\u0641
|
|
@@ -295,3 +295,7 @@ week=\u0441\u0435\u0434\u043C\u0438\u0446\u0430
|
|
|
295
295
|
quarter=\u0442\u0440\u0438\u043C\u0435\u0441\u0435\u0447\u0438\u0435
|
|
296
296
|
value=\u0421\u0442\u043E\u0439\u043D\u043E\u0441\u0442
|
|
297
297
|
description=\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435
|
|
298
|
+
textrule_confirmation_dialog_delete=\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043D\u0435
|
|
299
|
+
textrule_confirmation_dialog_cancel=\u041E\u0442\u043A\u0430\u0437
|
|
300
|
+
condition_delete_confirmation_message=\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043D\u0435 \u043D\u0430 \u0442\u043E\u0432\u0430 \u0443\u0441\u043B\u043E\u0432\u0438\u0435?
|
|
301
|
+
warning_title=\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043D\u0435
|
|
@@ -295,3 +295,7 @@ week=setmana
|
|
|
295
295
|
quarter=trimestre
|
|
296
296
|
value=Valor
|
|
297
297
|
description=Descripci\u00F3
|
|
298
|
+
textrule_confirmation_dialog_delete=Suprimir
|
|
299
|
+
textrule_confirmation_dialog_cancel=Cancel\u00B7lar
|
|
300
|
+
condition_delete_confirmation_message=Voleu suprimir aquesta condici\u00F3?
|
|
301
|
+
warning_title=Suprimir
|