@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.rules.ui",
3
- "version": "1.116.0",
3
+ "version": "1.118.0",
4
4
  "description": "SAPUI5 Library sap.rules.ui",
5
5
  "homepage": "https://sap.github.io/ui5-tooling/pages/SAPUI5/",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -7,7 +7,7 @@
7
7
 
8
8
  (c) Copyright 2009-2016 SAP SE. All rights reserved
9
9
  </copyright>
10
- <version>1.116.0</version>
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
- indexUrl="../../../../test-resources/sap/rules/ui/demokit/docuindex.json"
30
- resolve="lib" />
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
- <module-infos>
37
- <raw-module name="sap/rules/ui/ast/parser/bundle.js"
38
- requiresTopLevelScope="false" />
39
- </module-infos>
40
- </packaging>
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
 
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @extends ManagedObject
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.116.0
28
+ * @version 1.118.0
29
29
  *
30
30
  * @constructor
31
31
  * @private
@@ -58,7 +58,7 @@ sap.ui.define([
58
58
  * @extends Control
59
59
  *
60
60
  * @author SAP SE
61
- * @version 1.116.0
61
+ * @version 1.118.0
62
62
  *
63
63
  * @constructor
64
64
  * @private
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  * @extends sap.ui.core.Control
36
36
  *
37
37
  * @author SAP SE
38
- * @version 1.116.0
38
+ * @version 1.118.0
39
39
  *
40
40
  * @constructor
41
41
  * @public
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @extends sap.rules.ui.AstExpressionBasic
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.116.0
30
+ * @version 1.118.0
31
31
  *
32
32
  * @constructor
33
33
  * @private
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @extends sap.rules.ui.ExpressionAdvanced
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.116.0
30
+ * @version 1.118.0
31
31
  *
32
32
  * @constructor
33
33
  * @private
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.rules.ui.ExpressionBasic
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.116.0
29
+ * @version 1.118.0
30
30
  *
31
31
  * @constructor
32
32
  * @private
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @extends sap.ui.core.Element
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.116.0
27
+ * @version 1.118.0
28
28
  *
29
29
  * @constructor
30
30
  * @public
@@ -44,7 +44,7 @@ sap.ui.define([
44
44
  * @extends Control
45
45
  *
46
46
  * @author SAP SE
47
- * @version 1.116.0
47
+ * @version 1.118.0
48
48
  *
49
49
  * @constructor
50
50
  * @private
@@ -38,7 +38,7 @@ sap.ui.define([
38
38
  * @extends Control
39
39
  *
40
40
  * @author SAP SE
41
- * @version 1.116.0
41
+ * @version 1.118.0
42
42
  *
43
43
  * @constructor
44
44
  * @private
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @extends sap.ui.core.Control
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.116.0
25
+ * @version 1.118.0
26
26
  *
27
27
  * @constructor
28
28
  * @private
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends Control
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.116.0
29
+ * @version 1.118.0
30
30
  *
31
31
  * @constructor
32
32
  * @private
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @extends Control
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.116.0
27
+ * @version 1.118.0
28
28
  *
29
29
  * @constructor
30
30
  * @private
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  * @extends sap.ui.core.Control
35
35
  *
36
36
  * @author SAP SE
37
- * @version 1.116.0
37
+ * @version 1.118.0
38
38
  *
39
39
  * @constructor
40
40
  * @public
@@ -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.116.0
50
+ * @version 1.118.0
51
51
  *
52
52
  * @constructor
53
53
  * @private
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @extends sap.ui.core.Element
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.116.0
27
+ * @version 1.118.0
28
28
  *
29
29
  * @constructor
30
30
  * @public
@@ -45,7 +45,7 @@ sap.ui.define([
45
45
  * @extends Control
46
46
  *
47
47
  * @author SAP SE
48
- * @version 1.116.0
48
+ * @version 1.118.0
49
49
  *
50
50
  * @constructor
51
51
  * @private
@@ -85,7 +85,7 @@ sap.ui.define([
85
85
  "sap.rules.ui.type.Expression"
86
86
  ],
87
87
  noLibraryCSS: false,
88
- version: "1.116.0"
88
+ version: "1.118.0"
89
89
  });
90
90
 
91
91
  // sap.rules.ui library contants
@@ -18,7 +18,7 @@ sap.ui.define(["jquery.sap.global"], function(jQuery) {
18
18
  * @extends sap.ui.model.CompositeType
19
19
  *
20
20
  * @author SAP SE
21
- * @version 1.116.0
21
+ * @version 1.118.0
22
22
  *
23
23
  * @constructor
24
24
  * @private