@sapui5/sap.rules.ui 1.116.0 → 1.118.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 +26 -8
- package/src/sap/rules/ui/AstExpressionBasic.js +56 -0
- package/src/sap/rules/ui/BindingSpy.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/src/sap/rules/ui/TextRuleConfiguration.js +1 -1
- package/src/sap/rules/ui/TextRuleSettings.js +1 -1
- package/src/sap/rules/ui/library.js +1 -1
- package/src/sap/rules/ui/type/ExpressionAbs.js +1 -1
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
(c) Copyright 2009-2016 SAP SE. All rights reserved
|
|
9
9
|
</copyright>
|
|
10
|
-
<version>1.
|
|
10
|
+
<version>1.118.0</version>
|
|
11
11
|
|
|
12
12
|
<documentation>UI5 library: sap.rules.ui</documentation>
|
|
13
13
|
|
|
@@ -26,18 +26,36 @@
|
|
|
26
26
|
<exclude name="sap.rules.ui.js."/>
|
|
27
27
|
</jsdoc>
|
|
28
28
|
<documentation xmlns="http://www.sap.com/ui5/buildext/documentation"
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
indexUrl="../../../../test-resources/sap/rules/ui/demokit/docuindex.json"
|
|
30
|
+
resolve="lib" />
|
|
31
31
|
<!-- excludes for the JSCoverage -->
|
|
32
32
|
<jscoverage xmlns="http://www.sap.com/ui5/buildext/jscoverage">
|
|
33
33
|
<exclude name="sap.rules.ui.js."/>
|
|
34
34
|
</jscoverage>
|
|
35
35
|
<packaging xmlns="http://www.sap.com/ui5/buildext/packaging" version="2.0" >
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
<module-infos>
|
|
37
|
+
<raw-module name="sap/rules/ui/ast/parser/bundle.js"
|
|
38
|
+
requiresTopLevelScope="false" />
|
|
39
|
+
</module-infos>
|
|
40
|
+
</packaging>
|
|
41
|
+
|
|
42
|
+
<thirdparty xmlns="http://www.sap.com/ui5/buildext/thirdparty" >
|
|
43
|
+
<lib name="codemirror" displayName="CodeMirror" version="4.6.0" homepage="http://codemirror.net" id="73554900106100004257">
|
|
44
|
+
<license url="http://codemirror.net/LICENSE" type="MIT"/>
|
|
45
|
+
<copyright>Marijn Haverbeke and others</copyright>
|
|
46
|
+
<pattern>sap/rules/ui/codemirror/*</pattern>
|
|
47
|
+
</lib>
|
|
48
|
+
<lib name="Moment.js" displayName="Moment JavaScript Date Library" version="2.14.1" homepage="https://github.com/moment/moment" id="73554900106100009370">
|
|
49
|
+
<license url="https://github.com/moment/moment/blob/2.14.1/LICENSE" type="MIT"/>
|
|
50
|
+
<copyright>2011-2016 Tim Wood, Iskren Chernev, Moment.js contributors</copyright>
|
|
51
|
+
<pattern>sap/rules/ui/parser/infrastructure/locale/lib/moment_JS_min.js</pattern>
|
|
52
|
+
</lib>
|
|
53
|
+
</thirdparty>
|
|
54
|
+
|
|
55
|
+
<ownership xmlns="http://www.sap.com/ui5/buildext/ownership">
|
|
56
|
+
<component>CA-UI5-RUL</component><!-- default component for library, embedded text as a shortcut for <name>text</name> -->
|
|
57
|
+
</ownership>
|
|
58
|
+
|
|
41
59
|
</appData>
|
|
42
60
|
|
|
43
61
|
</library>
|
|
@@ -2356,6 +2356,56 @@ sap.ui.define([
|
|
|
2356
2356
|
}
|
|
2357
2357
|
return length;
|
|
2358
2358
|
},
|
|
2359
|
+
|
|
2360
|
+
// add single quotes to the input text if the context is an attribute of string type
|
|
2361
|
+
_getInputStringFormattedBasedOnContext: function(oEvent){
|
|
2362
|
+
|
|
2363
|
+
// return if already starts with a quote
|
|
2364
|
+
if(oEvent.getParameter("newValue")[0] == "'" || oEvent.getParameter("newValue")[0] == "\""){
|
|
2365
|
+
return;
|
|
2366
|
+
}
|
|
2367
|
+
var sHeaderInfo = this.getHeaderInfo() && this.getHeaderInfo().headerValue? this.getHeaderInfo() && this.getHeaderInfo().headerValue : null;
|
|
2368
|
+
var sAttributeInfo = this.getAttributeInfo();
|
|
2369
|
+
var sContextAttrId = "";
|
|
2370
|
+
|
|
2371
|
+
if(this.relString){
|
|
2372
|
+
sContextAttrId = this.relString;
|
|
2373
|
+
}
|
|
2374
|
+
else if(sHeaderInfo){
|
|
2375
|
+
sContextAttrId = sHeaderInfo;
|
|
2376
|
+
}
|
|
2377
|
+
else if(sAttributeInfo){
|
|
2378
|
+
sContextAttrId = sAttributeInfo;
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
if(oEvent.mParameters && oEvent.mParameters.value){
|
|
2382
|
+
|
|
2383
|
+
if(sContextAttrId){
|
|
2384
|
+
var sTargetIds = null;
|
|
2385
|
+
var aSplitValues = sContextAttrId.split(" ");
|
|
2386
|
+
for(var i=aSplitValues.length-1; i>=0; i--){
|
|
2387
|
+
if(aSplitValues[i].startsWith("/")){
|
|
2388
|
+
sTargetIds = aSplitValues[i];
|
|
2389
|
+
break;
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
if(sTargetIds){
|
|
2394
|
+
sContextAttrId = sTargetIds.substring(1, sContextAttrId.length);
|
|
2395
|
+
sContextAttrId = sContextAttrId.replaceAll("/", ".");
|
|
2396
|
+
var oTerm = this._oAstExpressionLanguage._astBunldeInstance.TermsProvider.TermsProvider.getTermByTermId(sContextAttrId);
|
|
2397
|
+
if(oTerm && oTerm.getBusinessDataType()){
|
|
2398
|
+
if(oTerm.getBusinessDataType() == "S"){
|
|
2399
|
+
oEvent.mParameters.newValue = "\'" + oEvent.mParameters.newValue + "\'";
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2406
|
+
},
|
|
2407
|
+
|
|
2408
|
+
|
|
2359
2409
|
/*
|
|
2360
2410
|
* the text selected from autosuggestions, more dialog ,
|
|
2361
2411
|
* value help and text entered in fixed value will all have to be set in the
|
|
@@ -2366,11 +2416,17 @@ sap.ui.define([
|
|
|
2366
2416
|
this.dotInOperationsContext = false;
|
|
2367
2417
|
this.bTypingFlow = false;
|
|
2368
2418
|
var newSpan;
|
|
2419
|
+
if(oEvent.getParameter("newValue")){
|
|
2420
|
+
this._getInputStringFormattedBasedOnContext(oEvent);
|
|
2421
|
+
}
|
|
2369
2422
|
this._resetCursorForRerendering();
|
|
2370
2423
|
var currentSpan = this._selectedSpans ? this._selectedSpans[0] : {};
|
|
2371
2424
|
var spanId = "#" + currentSpan.id;
|
|
2372
2425
|
var sPrevId = (currentSpan.getAttribute(Constants.TOKEN_TYPE) === Constants.WS || this._uiModel.length === 0) ? "" : currentSpan.id;
|
|
2373
2426
|
var item = this._getItemFromSuggestionModel(oEvent, sPrevId);
|
|
2427
|
+
if(oEvent.getParameter("newValue")){
|
|
2428
|
+
item.text = oEvent.mParameters.newValue;
|
|
2429
|
+
}
|
|
2374
2430
|
this.ruleContext = false;
|
|
2375
2431
|
this.forceFireChange = false;
|
|
2376
2432
|
|