@sapui5/sap.rules.ui 1.121.0 → 1.123.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 +25 -18
- package/src/sap/rules/ui/AstExpressionBasicRenderer.js +6 -4
- package/src/sap/rules/ui/AutoCompleteSuggestionContent.js +36 -34
- package/src/sap/rules/ui/BindingSpy.js +3 -4
- package/src/sap/rules/ui/DecisionTable.js +113 -74
- package/src/sap/rules/ui/DecisionTableCell.js +67 -34
- package/src/sap/rules/ui/DecisionTableCellAstExpressionBasic.js +17 -13
- package/src/sap/rules/ui/DecisionTableCellExpressionAdvanced.js +40 -32
- package/src/sap/rules/ui/DecisionTableCellExpressionBasic.js +21 -19
- package/src/sap/rules/ui/DecisionTableConfiguration.js +5 -6
- package/src/sap/rules/ui/DecisionTableRenderer.js +6 -5
- package/src/sap/rules/ui/DecisionTableSettings.js +264 -232
- package/src/sap/rules/ui/DecisionTableSettingsOld.js +61 -61
- package/src/sap/rules/ui/ExpressionAdvanced.js +135 -111
- package/src/sap/rules/ui/ExpressionBase.js +1 -1
- package/src/sap/rules/ui/ExpressionBasic.js +17 -12
- package/src/sap/rules/ui/InstructionRenderer.js +30 -26
- package/src/sap/rules/ui/RuleBase.js +2 -3
- package/src/sap/rules/ui/RuleBuilder.js +29 -23
- package/src/sap/rules/ui/TextRule.js +78 -62
- package/src/sap/rules/ui/TextRuleConfiguration.js +2 -3
- package/src/sap/rules/ui/TextRuleSettings.js +133 -116
- package/src/sap/rules/ui/ast/autoComplete/AutoComplete.js +4 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAdvancedFunctionPanel.js +15 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAggregateFunctionPanel.js +14 -9
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionArrayOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionComparisionOperatorPanel.js +15 -11
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionDateAndTimePanel.js +26 -17
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFixedValuePanel.js +75 -53
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFunctionalOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLogicalOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLoopFunctionPanel.js +14 -9
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMathematicalOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMiscellaneousOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionOperationsPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionRangeOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionSelectFunctionPanel.js +14 -9
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionTimeAndDurationFunctionPanel.js +35 -23
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionVocabularyPanel.js +93 -73
- package/src/sap/rules/ui/ast/util/AggregateFunctionDialog.js +172 -157
- package/src/sap/rules/ui/ast/util/LoopFunctionDialog.js +186 -163
- package/src/sap/rules/ui/ast/util/SelectFunctionDialog.js +205 -182
- package/src/sap/rules/ui/ast/util/utilsBase.js +85 -0
- package/src/sap/rules/ui/codemirror/addon/hint/show-hint.js +8 -4
- package/src/sap/rules/ui/i18n/messagebundle.properties +9 -1
- package/src/sap/rules/ui/i18n/messagebundle_ar.properties +1 -1
- package/src/sap/rules/ui/i18n/messagebundle_cnr.properties +34 -34
- package/src/sap/rules/ui/i18n/messagebundle_en_US_saprigi.properties +285 -285
- package/src/sap/rules/ui/i18n/messagebundle_hu.properties +1 -1
- package/src/sap/rules/ui/i18n/messagebundle_mk.properties +3 -3
- package/src/sap/rules/ui/i18n/messagebundle_sh.properties +88 -88
- package/src/sap/rules/ui/i18n/messagebundle_uk.properties +5 -5
- package/src/sap/rules/ui/library.js +6 -7
- package/src/sap/rules/ui/parser/businessLanguage/lib/IDPParser.js +115 -114
- package/src/sap/rules/ui/parser/businessLanguage/lib/antlr3_all_min.js +4 -4
- package/src/sap/rules/ui/parser/businessLanguage/lib/autoCompleteUtils.js +4 -3
- package/src/sap/rules/ui/parser/businessLanguage/lib/conversionUtils.js +10 -6
- package/src/sap/rules/ui/parser/businessLanguage/lib/entityModel.js +8 -7
- package/src/sap/rules/ui/parser/businessLanguage/lib/entityModelConstractor.js +17 -16
- package/src/sap/rules/ui/parser/businessLanguage/lib/parsingBackendMediator.js +10 -9
- package/src/sap/rules/ui/parser/businessLanguage/lib/termsUtils.js +4 -3
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_cnr.properties +57 -57
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_en_US_saprigi.properties +210 -210
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_mk.properties +1 -1
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_sh.properties +90 -90
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_sr.properties +1 -1
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_uk.properties +2 -2
- package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_cnr.properties +19 -19
- package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_en_US_saprigi.properties +26 -26
- package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_mk.properties +2 -2
- package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_sh.properties +26 -26
- package/src/sap/rules/ui/parser/infrastructure/errorHandling/hrfException.js +3 -3
- package/src/sap/rules/ui/parser/infrastructure/locale/lib/resourceBundleContext.js +4 -3
- package/src/sap/rules/ui/parser/infrastructure/messageHandling/lib/responseCollector.js +8 -7
- package/src/sap/rules/ui/parser/ruleBody/lib/ruleBody.js +8 -7
- package/src/sap/rules/ui/parser/ruleBody/lib/ruleBodyConvertor.js +4 -3
- package/src/sap/rules/ui/parser/ruleBody/lib/ruleBodyValidator.js +9 -8
- package/src/sap/rules/ui/providers/ValueHelpDialogProvider.js +63 -46
- package/src/sap/rules/ui/providers/ValueHelpProvider.js +8 -7
- package/src/sap/rules/ui/services/AstExpressionLanguage.js +12 -10
- package/src/sap/rules/ui/services/ExpressionLanguage.js +89 -83
- package/src/sap/rules/ui/type/DecisionTableCell.js +2 -2
- package/src/sap/rules/ui/type/DecisionTableHeader.js +3 -3
- package/src/sap/rules/ui/type/Expression.js +3 -3
- package/src/sap/rules/ui/type/ExpressionAbs.js +5 -5
|
@@ -3,14 +3,33 @@ sap.ui.define([
|
|
|
3
3
|
"sap/m/List",
|
|
4
4
|
"sap/ui/model/json/JSONModel",
|
|
5
5
|
"sap/rules/ui/ast/constants/Constants",
|
|
6
|
-
"sap/rules/ui/ast/provider/TermsProvider"
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
"sap/rules/ui/ast/provider/TermsProvider",
|
|
7
|
+
"sap/ui/layout/GridData",
|
|
8
|
+
"sap/m/Select",
|
|
9
|
+
"sap/ui/core/ListItem",
|
|
10
|
+
"sap/m/ColumnListItem",
|
|
11
|
+
"sap/ui/layout/HorizontalLayout",
|
|
12
|
+
"sap/m/Button",
|
|
13
|
+
"sap/m/library",
|
|
14
|
+
"sap/ui/core/IconPool",
|
|
15
|
+
"sap/m/TextArea",
|
|
16
|
+
"sap/m/Table",
|
|
17
|
+
"sap/m/Column",
|
|
18
|
+
/*"sap/ui/layout/form/GridContainerData",*/
|
|
19
|
+
"sap/ui/layout/form/SimpleForm",
|
|
20
|
+
"sap/m/Label",
|
|
21
|
+
"sap/m/Dialog",
|
|
22
|
+
"sap/ui/core/Lib",
|
|
23
|
+
"sap/m/Text",
|
|
24
|
+
"sap/ui/core/Element"
|
|
25
|
+
|
|
26
|
+
], function (Control, List, JSONModel, Constants, TermsProvider, GridData, Select, ListItem, ColumnListItem, HorizontalLayout, Button,
|
|
27
|
+
mobileLibrary, IconPool, TextArea, Table, Column, /*GridContainerData, */SimpleForm, Label, Dialog, coreLib, Text, Element) {
|
|
9
28
|
"use strict";
|
|
10
29
|
|
|
11
30
|
var instance;
|
|
12
31
|
var LoopFunctionDialog = function () {
|
|
13
|
-
this.oBundle =
|
|
32
|
+
this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
|
|
14
33
|
this.functionLabelDisplay = "";
|
|
15
34
|
this.functionLabel = "";
|
|
16
35
|
this._loopFunctionSelected = "";
|
|
@@ -55,14 +74,14 @@ sap.ui.define([
|
|
|
55
74
|
};
|
|
56
75
|
LoopFunctionDialog.prototype._createLoopFunctionDropDown = function (loopFunction, sAriaValue) {
|
|
57
76
|
var that = this;
|
|
58
|
-
var model = new
|
|
77
|
+
var model = new JSONModel(loopFunction);
|
|
59
78
|
|
|
60
|
-
this.functionLoop = new
|
|
79
|
+
this.functionLoop = new Select({
|
|
61
80
|
width: "200px",
|
|
62
81
|
selectedKey: this._loopFunctionSelected,
|
|
63
82
|
forceSelection: false,
|
|
64
83
|
showSecondaryValues: true,
|
|
65
|
-
layoutData: new
|
|
84
|
+
layoutData: new GridData({
|
|
66
85
|
span: "L3 M3 S3"
|
|
67
86
|
}),
|
|
68
87
|
ariaLabelledBy: sAriaValue,
|
|
@@ -90,7 +109,7 @@ sap.ui.define([
|
|
|
90
109
|
this.functionLoop.setModel(model);
|
|
91
110
|
this.functionLoop.bindItems({
|
|
92
111
|
path: "/loop",
|
|
93
|
-
template: new
|
|
112
|
+
template: new ListItem({
|
|
94
113
|
text: "{name}",
|
|
95
114
|
key: "{name}",
|
|
96
115
|
additionalText: "{label}"
|
|
@@ -100,9 +119,9 @@ sap.ui.define([
|
|
|
100
119
|
return this.functionLoop;
|
|
101
120
|
};
|
|
102
121
|
|
|
103
|
-
LoopFunctionDialog.prototype._getOperationAstExpressionBasic = function (
|
|
122
|
+
LoopFunctionDialog.prototype._getOperationAstExpressionBasic = function (sAriaValue, AstExpressionBasic) {
|
|
104
123
|
var that = this;
|
|
105
|
-
this.astExpressionBasicForOperation = new
|
|
124
|
+
this.astExpressionBasicForOperation = new AstExpressionBasic({
|
|
106
125
|
astExpressionLanguage: this._oAstExpressionLanguage,
|
|
107
126
|
value: "{operationSelected}",
|
|
108
127
|
conditionContext: false,
|
|
@@ -132,15 +151,15 @@ sap.ui.define([
|
|
|
132
151
|
return this.astExpressionBasicForOperation;
|
|
133
152
|
};
|
|
134
153
|
|
|
135
|
-
LoopFunctionDialog.prototype._tableColumnsFactory = function (sId, oContext) {
|
|
154
|
+
LoopFunctionDialog.prototype._tableColumnsFactory = function (AstExpressionBasic, sId, oContext) {
|
|
136
155
|
var that = this;
|
|
137
|
-
var itemTemplate = new
|
|
138
|
-
cells: [that._getOperationAstExpressionBasic("loopOperationsLabelId"),
|
|
139
|
-
new
|
|
156
|
+
var itemTemplate = new ColumnListItem({
|
|
157
|
+
cells: [that._getOperationAstExpressionBasic("loopOperationsLabelId", AstExpressionBasic),
|
|
158
|
+
new HorizontalLayout({
|
|
140
159
|
content: [
|
|
141
|
-
new
|
|
142
|
-
type:
|
|
143
|
-
icon:
|
|
160
|
+
new Button({
|
|
161
|
+
type: mobileLibrary.ButtonType.Transparent,
|
|
162
|
+
icon:IconPool.getIconURI("sys-cancel"),
|
|
144
163
|
visible: "{cancelButton}",
|
|
145
164
|
enabled: "{/enabledData/enabled}",
|
|
146
165
|
press: function (oEvent) {
|
|
@@ -153,9 +172,9 @@ sap.ui.define([
|
|
|
153
172
|
|
|
154
173
|
}.bind(this)
|
|
155
174
|
}),
|
|
156
|
-
new
|
|
157
|
-
type:
|
|
158
|
-
icon:
|
|
175
|
+
new Button({
|
|
176
|
+
type: mobileLibrary.ButtonType.Transparent,
|
|
177
|
+
icon: IconPool.getIconURI("add"),
|
|
159
178
|
visible: "{addButton}",
|
|
160
179
|
enabled: "{/enabledData/enabled}",
|
|
161
180
|
press: function (oEvent) {
|
|
@@ -242,9 +261,9 @@ sap.ui.define([
|
|
|
242
261
|
var that = this;
|
|
243
262
|
var autoSuggestion = this._getSuggestionsForTheGivenInput("");
|
|
244
263
|
var aVocabulary = this._filterloopFunctionVocabulary(autoSuggestion.autoComplete.categories.terms);
|
|
245
|
-
var model = new
|
|
264
|
+
var model = new JSONModel(aVocabulary);
|
|
246
265
|
|
|
247
|
-
this.vocabularySelect = new
|
|
266
|
+
this.vocabularySelect = new Select({
|
|
248
267
|
width: "100%",
|
|
249
268
|
selectedKey: this.dataObjectIdSelected,
|
|
250
269
|
forceSelection: false,
|
|
@@ -290,7 +309,7 @@ sap.ui.define([
|
|
|
290
309
|
this.vocabularySelect.setModel(model);
|
|
291
310
|
this.vocabularySelect.bindItems({
|
|
292
311
|
path: "/terms",
|
|
293
|
-
template: new
|
|
312
|
+
template: new ListItem({
|
|
294
313
|
text: "{label}",
|
|
295
314
|
key: "{id}"
|
|
296
315
|
})
|
|
@@ -298,7 +317,7 @@ sap.ui.define([
|
|
|
298
317
|
// Add Rules to the same path so that the dataobjects list contain rules as well
|
|
299
318
|
var vocabularyRules = autoSuggestion.autoComplete.categories.vocabularyRules;
|
|
300
319
|
for (var entry in vocabularyRules) {
|
|
301
|
-
var item = new
|
|
320
|
+
var item = new ListItem({
|
|
302
321
|
text: vocabularyRules[entry].label,
|
|
303
322
|
key: vocabularyRules[entry].id
|
|
304
323
|
})
|
|
@@ -309,7 +328,7 @@ sap.ui.define([
|
|
|
309
328
|
};
|
|
310
329
|
|
|
311
330
|
LoopFunctionDialog.prototype._bindOperations = function () {
|
|
312
|
-
this.oModel = new
|
|
331
|
+
this.oModel = new JSONModel();
|
|
313
332
|
this.oModel.setData({
|
|
314
333
|
selectionData: this.selectedData,
|
|
315
334
|
enabledData: this.enabledData,
|
|
@@ -317,9 +336,9 @@ sap.ui.define([
|
|
|
317
336
|
});
|
|
318
337
|
this.conditionsTable.setModel(this.oModel);
|
|
319
338
|
};
|
|
320
|
-
LoopFunctionDialog.prototype._createWhereAstExpressionBasic = function (sAriaValue) {
|
|
339
|
+
LoopFunctionDialog.prototype._createWhereAstExpressionBasic = function (sAriaValue, AstExpressionBasic) {
|
|
321
340
|
var that = this;
|
|
322
|
-
this.astExpressionBasicForWhere = new
|
|
341
|
+
this.astExpressionBasicForWhere = new AstExpressionBasic({
|
|
323
342
|
astExpressionLanguage: this._oAstExpressionLanguage,
|
|
324
343
|
enableAggregateFunctionWhereClause: true,
|
|
325
344
|
value: this._whereExpressionId,
|
|
@@ -358,7 +377,7 @@ sap.ui.define([
|
|
|
358
377
|
};
|
|
359
378
|
|
|
360
379
|
LoopFunctionDialog.prototype._createFunctionLabel = function () {
|
|
361
|
-
this.functionLabelField = new
|
|
380
|
+
this.functionLabelField = new TextArea({
|
|
362
381
|
value: this.functionLabelDisplay,
|
|
363
382
|
enabled: false,
|
|
364
383
|
width: "100%"
|
|
@@ -390,27 +409,27 @@ sap.ui.define([
|
|
|
390
409
|
};
|
|
391
410
|
}
|
|
392
411
|
|
|
393
|
-
LoopFunctionDialog.prototype._createTable = function () {
|
|
412
|
+
LoopFunctionDialog.prototype._createTable = function (AstExpressionBasic) {
|
|
394
413
|
var that = this;
|
|
395
|
-
this.conditionsTable = new
|
|
396
|
-
backgroundDesign:
|
|
397
|
-
showSeparators:
|
|
398
|
-
layoutData: new sap.ui.layout.form.GridContainerData({
|
|
414
|
+
this.conditionsTable = new Table({
|
|
415
|
+
backgroundDesign: mobileLibrary.BackgroundDesign.Solid,
|
|
416
|
+
showSeparators: mobileLibrary.ListSeparators.None,
|
|
417
|
+
/*layoutData: new sap.ui.layout.form.GridContainerData({
|
|
399
418
|
halfGrid: false
|
|
400
|
-
})
|
|
419
|
+
}),*/
|
|
401
420
|
columns: [
|
|
402
|
-
new
|
|
421
|
+
new Column({
|
|
403
422
|
width: "89%"
|
|
404
423
|
}).setStyleClass("sapAstOperationColumn"),
|
|
405
424
|
|
|
406
|
-
new
|
|
425
|
+
new Column({
|
|
407
426
|
width: "11%"
|
|
408
427
|
})
|
|
409
428
|
]
|
|
410
429
|
}).addStyleClass("sapAstOperationTable");
|
|
411
430
|
|
|
412
431
|
this._bindOperations();
|
|
413
|
-
var itemTemplate = that._tableColumnsFactory();
|
|
432
|
+
var itemTemplate = that._tableColumnsFactory(AstExpressionBasic);
|
|
414
433
|
this.conditionsTable.bindItems("/selectionData", itemTemplate);
|
|
415
434
|
|
|
416
435
|
return this.conditionsTable;
|
|
@@ -427,137 +446,141 @@ sap.ui.define([
|
|
|
427
446
|
var that = this;
|
|
428
447
|
var sequence = 0;
|
|
429
448
|
this._clearData();
|
|
430
|
-
this.oBundle =
|
|
449
|
+
this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
|
|
431
450
|
this._oAstExpressionLanguage = AstExpressionLanguage;
|
|
432
451
|
this._loopFunctionSelected = Constants.FOREACH;
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
452
|
+
sap.ui.require([
|
|
453
|
+
"sap/rules/ui/AstExpressionBasic"
|
|
454
|
+
], (AstExpressionBasic) => {
|
|
455
|
+
if (jsonData) {
|
|
456
|
+
this._loopFunctionSelected = jsonData.function;
|
|
457
|
+
this._whereExpressionId = jsonData.filter;
|
|
458
|
+
this.dataObjectId = jsonData.dataObject;
|
|
459
|
+
this.functionLabel = jsonData.functionLabel;
|
|
460
|
+
this.dataObjectIdSelected = jsonData.dataObject.replace("/", "");
|
|
461
|
+
this.operationArray = jsonData.actions;
|
|
462
|
+
that.functionLabelDisplay = this._convertFunctionLabelToText(jsonData.dataObject, jsonData.functionLabel);;
|
|
463
|
+
if (this.dataObjectId) {
|
|
464
|
+
this.dataObjectIdData.dataObjectId = this.dataObjectId;
|
|
465
|
+
this.enabledData.enabled = true;
|
|
466
|
+
this.termsProvider = this._oAstExpressionLanguage._astBunldeInstance.TermsProvider.TermsProvider;
|
|
467
|
+
this.dataObjectLabel = this.termsProvider.getTermNameFromASTNodeReference(this.dataObjectId);
|
|
468
|
+
}
|
|
469
|
+
if (this.operationArray && this.operationArray.length > 0) {
|
|
470
|
+
this.selectedData = [];
|
|
471
|
+
for (var index = 0; index < this.operationArray.length; index++) {
|
|
472
|
+
var newjson = {
|
|
473
|
+
operationSelected: "",
|
|
474
|
+
preSuggestionContext: "",
|
|
475
|
+
cancelButton: true,
|
|
476
|
+
addButton: true,
|
|
477
|
+
}
|
|
478
|
+
newjson.operationSelected = this.operationArray[index];
|
|
479
|
+
this.selectedData.push(newjson);
|
|
480
|
+
sequence++;
|
|
481
|
+
}
|
|
482
|
+
if (sequence === 1) {
|
|
483
|
+
this.selectedData[0].cancelButton = false;
|
|
484
|
+
}
|
|
485
|
+
if (!this._whereExpressionId) {
|
|
486
|
+
that.selectedData[0].preSuggestionContext = this._loopFunctionSelected + "(" + this.dataObjectId + ",";
|
|
487
|
+
} else {
|
|
488
|
+
that.selectedData[0].preSuggestionContext = this._loopFunctionSelected + "(" + Constants.FILTER + "(" + this.dataObjectId + "," +
|
|
489
|
+
that._whereExpressionId + ") ,";
|
|
490
|
+
}
|
|
491
|
+
that._setPreSuggestionContextChange(0);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
var functionLoop = that._createLoopFunctionDropDown(data, "LoopFuntionLabelId");
|
|
497
|
+
var oVocabularyText = new Text({
|
|
498
|
+
text: that.oBundle.getText("vocabulary"),
|
|
499
|
+
tooltip: that.oBundle.getText("vocabulary"),
|
|
500
|
+
textAlign: "End",
|
|
501
|
+
layoutData: new GridData({
|
|
502
|
+
span: "L2 M2 S2"
|
|
503
|
+
})
|
|
504
|
+
});
|
|
505
|
+
var operationTable = that._createTable(AstExpressionBasic);
|
|
506
|
+
var oWhereControl = that._createWhereAstExpressionBasic("loopWhereLabelId", AstExpressionBasic);
|
|
507
|
+
var oFunctionLabelControl = that._createFunctionLabel();
|
|
508
|
+
|
|
509
|
+
var verticalLayoutForLoopFunction = new SimpleForm({
|
|
510
|
+
layout: "ResponsiveGridLayout",
|
|
511
|
+
editable: true,
|
|
512
|
+
content: [
|
|
513
|
+
new Label("loopFunctionSelectionLabelId", {
|
|
514
|
+
text: that.oBundle.getText("function"),
|
|
515
|
+
tooltip: that.oBundle.getText("function"),
|
|
516
|
+
labelFor: functionLoop.getId()
|
|
517
|
+
}), functionLoop,
|
|
518
|
+
oVocabularyText,
|
|
519
|
+
that._createVocabularyDropDown(oVocabularyText.getId()),
|
|
520
|
+
new Label("loopWhereLabelId", {
|
|
521
|
+
text: that.oBundle.getText("where"),
|
|
522
|
+
tooltip: that.oBundle.getText("where"),
|
|
523
|
+
labelFor: oWhereControl.getId()
|
|
524
|
+
}),
|
|
525
|
+
oWhereControl,
|
|
526
|
+
new Label("loopOperationsLabelId", {
|
|
527
|
+
text: "",
|
|
528
|
+
tooltip: "",
|
|
529
|
+
labelFor: operationTable.getId()
|
|
530
|
+
}).addStyleClass(""),
|
|
531
|
+
operationTable,
|
|
532
|
+
new Label({
|
|
533
|
+
text: that.oBundle.getText("function_label"),
|
|
534
|
+
tooltip: that.oBundle.getText("function_label"),
|
|
535
|
+
labelFor: oFunctionLabelControl.getId()
|
|
536
|
+
}),
|
|
537
|
+
oFunctionLabelControl
|
|
538
|
+
]
|
|
539
|
+
});
|
|
540
|
+
|
|
541
|
+
var loopFunctionsDialog = new Dialog({
|
|
542
|
+
title: this.oBundle.getText("loopFunctionTitle"),
|
|
543
|
+
contentWidth: "800px",
|
|
544
|
+
showHeader: true,
|
|
545
|
+
draggable: true,
|
|
546
|
+
beforeClose: function () {
|
|
547
|
+
dialogOpenedCallbackReference(false);
|
|
548
|
+
},
|
|
549
|
+
content: [verticalLayoutForLoopFunction],
|
|
550
|
+
buttons: [
|
|
551
|
+
this.applyButton = new Button({
|
|
552
|
+
text: this.oBundle.getText("apply"),
|
|
553
|
+
tooltip: this.oBundle.getText("applyChangesBtnTooltip"),
|
|
554
|
+
press: function (event) {
|
|
555
|
+
var loopFunctionData = that._createJson()
|
|
556
|
+
event.getSource().mProperties = {
|
|
557
|
+
value: that.functionLabel,
|
|
558
|
+
jsonData: loopFunctionData
|
|
559
|
+
};
|
|
560
|
+
callBack(event);
|
|
561
|
+
that._setModal(false);
|
|
562
|
+
loopFunctionsDialog.close();
|
|
563
|
+
loopFunctionsDialog.destroy();
|
|
564
|
+
}
|
|
565
|
+
}),
|
|
566
|
+
new Button({
|
|
567
|
+
text: this.oBundle.getText("cancel"),
|
|
568
|
+
tooltip: this.oBundle.getText("cancelBtnTooltip"),
|
|
569
|
+
press: function (event) {
|
|
570
|
+
that._setModal(false);
|
|
571
|
+
loopFunctionsDialog.close();
|
|
572
|
+
loopFunctionsDialog.destroy();
|
|
573
|
+
}
|
|
574
|
+
})
|
|
575
|
+
]
|
|
576
|
+
}).addStyleClass("sapUiSizeCompact");;
|
|
577
|
+
that._setModal(true);
|
|
578
|
+
loopFunctionsDialog.open();
|
|
579
|
+
});
|
|
557
580
|
};
|
|
558
581
|
|
|
559
582
|
LoopFunctionDialog.prototype._setModal = function (value) {
|
|
560
|
-
var pop =
|
|
583
|
+
var pop = Element.getElementById("popover");
|
|
561
584
|
if (pop) {
|
|
562
585
|
pop.setModal(value);
|
|
563
586
|
}
|