@openui5/sap.ui.webc.common 1.93.3 → 1.96.2
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/.reuse/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- package/package.json +2 -2
- package/src/sap/ui/webc/common/.library +1 -1
- package/src/sap/ui/webc/common/WebComponent.js +42 -21
- package/src/sap/ui/webc/common/WebComponentMetadata.js +1 -1
- package/src/sap/ui/webc/common/WebComponentRenderer.js +3 -3
- package/src/sap/ui/webc/common/library.js +3 -3
- package/src/sap/ui/webc/common/thirdparty/base/Device.js +2 -0
- package/src/sap/ui/webc/common/thirdparty/base/EventProvider.js +16 -24
- package/src/sap/ui/webc/common/thirdparty/base/FontFace.js +4 -4
- package/src/sap/ui/webc/common/thirdparty/base/Keys.js +10 -0
- package/src/sap/ui/webc/common/thirdparty/base/StaticAreaItem.js +10 -1
- package/src/sap/ui/webc/common/thirdparty/base/SystemCSSVars.js +3 -3
- package/src/sap/ui/webc/common/thirdparty/base/UI5Element.js +25 -31
- package/src/sap/ui/webc/common/thirdparty/base/UI5ElementMetadata.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/base/asset-registries/Icons.js +5 -0
- package/src/sap/ui/webc/common/thirdparty/base/asset-registries/Illustrations.js +23 -0
- package/src/sap/ui/webc/common/thirdparty/base/delegate/ItemNavigation.js +38 -0
- package/src/sap/ui/webc/common/thirdparty/base/renderer/LitRenderer.js +20 -18
- package/src/sap/ui/webc/common/thirdparty/base/sap/base/Log.js +253 -0
- package/src/sap/ui/webc/common/thirdparty/base/sap/base/assert.js +16 -0
- package/src/sap/ui/webc/common/thirdparty/base/sap/base/util/now.js +12 -0
- package/src/sap/ui/webc/common/thirdparty/base/types/DataType.js +9 -0
- package/src/sap/ui/webc/common/thirdparty/base/types/Float.js +3 -0
- package/src/sap/ui/webc/common/thirdparty/base/types/Integer.js +3 -0
- package/src/sap/ui/webc/common/thirdparty/base/updateShadowRoot.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/base/util/AriaLabelHelper.js +4 -4
- package/src/sap/ui/webc/common/thirdparty/base/util/InvisibleMessage.js +21 -14
- package/src/sap/ui/webc/common/thirdparty/base/util/PopupUtils.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/lit-html/directive.js +16 -0
- package/src/sap/ui/webc/common/thirdparty/lit-html/directives/class-map.js +8 -80
- package/src/sap/ui/webc/common/thirdparty/lit-html/directives/if-defined.js +13 -0
- package/src/sap/ui/webc/common/thirdparty/lit-html/directives/repeat.js +15 -159
- package/src/sap/ui/webc/common/thirdparty/lit-html/directives/style-map.js +8 -51
- package/src/sap/ui/webc/common/thirdparty/lit-html/directives/unsafe-html.js +9 -32
- package/src/sap/ui/webc/common/thirdparty/lit-html/lit-html.js +14 -49
- package/src/sap/ui/webc/common/thirdparty/lit-html/static.js +17 -0
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/json-imports/Themes.js +7 -7
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/themes/sap_belize/parameters-bundle.css.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/theme-base/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-10d6a87c.js +9 -0
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-17ba1024.js +9 -0
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-33240f21.js +9 -0
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-354df2bd.js +9 -0
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-4c3222f0.js +9 -0
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-abf4cf1a.js +9 -0
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-f92d2591.js +9 -0
- package/ui5.yaml +1 -1
- package/src/sap/ui/webc/common/thirdparty/base/renderer/ifDefined.js +0 -18
- package/src/sap/ui/webc/common/thirdparty/base/renderer/scopeHTML.js +0 -23
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/default-template-processor.js +0 -43
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/directive.js +0 -31
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/dom.js +0 -41
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/part.js +0 -24
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/parts.js +0 -374
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/render.js +0 -33
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/template-factory.js +0 -45
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/template-instance.js +0 -88
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/template-result.js +0 -77
- package/src/sap/ui/webc/common/thirdparty/lit-html/lib/template.js +0 -149
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-0ad70668.js +0 -9
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-0f7f1dcc.js +0 -9
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-4bf24a54.js +0 -9
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-69006d4e.js +0 -9
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-819624f1.js +0 -9
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-97e70e91.js +0 -9
- package/src/sap/ui/webc/common/thirdparty/theme-base/parameters-bundle.css-c5f25513.js +0 -9
package/.reuse/dep5
CHANGED
@@ -309,7 +309,7 @@ License: MIT
|
|
309
309
|
Comment: these files belong to: lodash
|
310
310
|
|
311
311
|
Files: src/sap.ui.core/src/sap/ui/thirdparty/hyphenopoly/*
|
312
|
-
Copyright:
|
312
|
+
Copyright: 2021 Mathias Nater
|
313
313
|
License: MIT
|
314
314
|
Comment: these files belong to: Hyphenopoly
|
315
315
|
|
@@ -347,11 +347,6 @@ Copyright: 2013 Ariya Hidayat and other contributors
|
|
347
347
|
License: BSD-2-Clause
|
348
348
|
Comment: these files belong to: Esprima
|
349
349
|
|
350
|
-
Files: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/*
|
351
|
-
Copyright: 2006 Google Inc.
|
352
|
-
License: Apache-2.0
|
353
|
-
Comment: these files belong to: google-code-prettify
|
354
|
-
|
355
350
|
Files: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/highlight.js/*
|
356
351
|
Copyright: 2006-2020, Ivan Sagalaev
|
357
352
|
License: BSD-3-Clause
|
@@ -405,6 +400,11 @@ Copyright: 2014 Vitaly Puzrin, Alex Kocharin
|
|
405
400
|
License: MIT
|
406
401
|
Comment: these files belong to: Markdown-it
|
407
402
|
|
403
|
+
Files: src/sap.ui.integration/test/sap/ui/integration/demokit/cardExplorer/webapp/thirdparty/ajv/ajv.min.js
|
404
|
+
Copyright: 2015-2017 Evgeny Poberezkin
|
405
|
+
License: MIT
|
406
|
+
Comment: these files belong to: ajv
|
407
|
+
|
408
408
|
|
409
409
|
# Library: sap.ui.mdc:
|
410
410
|
|
@@ -452,11 +452,6 @@ Copyright: 2009-2014, Alexis Sellier <self@cloudhead.net>
|
|
452
452
|
License: Apache-2.0
|
453
453
|
Comment: these files belong to: LESS
|
454
454
|
|
455
|
-
Files: ../test/sap/ui/integration/demokit/cardExplorer/webapp/thirdparty/ajv/ajv.min.js
|
456
|
-
Copyright: 2015-2017 Evgeny Poberezkin
|
457
|
-
License: MIT
|
458
|
-
Comment: these files belong to: ajv
|
459
|
-
|
460
455
|
Files: lib/jsdoc/ui5/plugin.js
|
461
456
|
Copyright:
|
462
457
|
2009-2021 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
package/THIRDPARTY.txt
CHANGED
@@ -6,7 +6,7 @@ The full text of all referenced licenses is appended at the end of this file.
|
|
6
6
|
|
7
7
|
Library: sap.ui.codeeditor:
|
8
8
|
|
9
|
-
Component: Ace (Ajax.org Cloud9 Editor), version: 1.4.
|
9
|
+
Component: Ace (Ajax.org Cloud9 Editor), version: 1.4.13
|
10
10
|
Copyright: 2010, Ajax.org B.V.
|
11
11
|
License: BSD-3-Clause
|
12
12
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
|
@@ -279,8 +279,8 @@ License: MIT
|
|
279
279
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
280
280
|
Contained in: src/sap.ui.core/src/sap/ui/base/util/restricted/_/lodash.custom.js
|
281
281
|
|
282
|
-
Component: Hyphenopoly, version:
|
283
|
-
Copyright:
|
282
|
+
Component: Hyphenopoly, version: 3.4.0
|
283
|
+
Copyright: 2021 Mathias Nater
|
284
284
|
License: MIT
|
285
285
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
286
286
|
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/hyphenopoly/*
|
@@ -324,12 +324,6 @@ License: BSD-2-Clause
|
|
324
324
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-2-Clause.txt
|
325
325
|
Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/esprima.js
|
326
326
|
|
327
|
-
Component: google-code-prettify, version: 20130304
|
328
|
-
Copyright: 2006 Google Inc.
|
329
|
-
License: Apache-2.0
|
330
|
-
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
331
|
-
Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/*
|
332
|
-
|
333
327
|
Component: highlight.js, version: 10.4.1
|
334
328
|
Copyright: 2006-2020, Ivan Sagalaev
|
335
329
|
License: BSD-3-Clause
|
@@ -376,7 +370,7 @@ License: Unicode-DFS-2015
|
|
376
370
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Unicode-DFS-2015.txt
|
377
371
|
Contained in: src/sap.ui.integration/src/sap/ui/integration/thirdparty/webcomponents/Unicode-Data-Files-LICENSE.txt
|
378
372
|
|
379
|
-
Component: Adaptive Cards, version:
|
373
|
+
Component: Adaptive Cards, version: 2.9.0
|
380
374
|
Copyright: 2017 Microsoft
|
381
375
|
License: MIT
|
382
376
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
@@ -395,6 +389,12 @@ License: MIT
|
|
395
389
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
396
390
|
Contained in: src/sap.ui.integration/src/sap/ui/integration/thirdparty/markdown-it.js
|
397
391
|
|
392
|
+
Component: ajv, version: 6.12.3
|
393
|
+
Copyright: 2015-2017 Evgeny Poberezkin
|
394
|
+
License: MIT
|
395
|
+
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
396
|
+
Contained in: src/sap.ui.integration/test/sap/ui/integration/demokit/cardExplorer/webapp/thirdparty/ajv/ajv.min.js
|
397
|
+
|
398
398
|
|
399
399
|
Library: sap.ui.mdc:
|
400
400
|
|
@@ -450,12 +450,6 @@ License: Apache-2.0
|
|
450
450
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
451
451
|
Contained in: src/testsuite-utils/src/main/resources/META-INF/less/less.js
|
452
452
|
|
453
|
-
Component: ajv, version: 6.12.3
|
454
|
-
Copyright: 2015-2017 Evgeny Poberezkin
|
455
|
-
License: MIT
|
456
|
-
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
457
|
-
Contained in: ../test/sap/ui/integration/demokit/cardExplorer/webapp/thirdparty/ajv/ajv.min.js
|
458
|
-
|
459
453
|
Component: JSDoc 3, version: 3.6.7
|
460
454
|
Copyright: 2011-present Michael Mathews micmath@gmail.com and the contributors to JSDoc
|
461
455
|
License: Apache-2.0
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@openui5/sap.ui.webc.common",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.96.2",
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.webc.common",
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
6
6
|
"license": "Apache-2.0",
|
@@ -16,6 +16,6 @@
|
|
16
16
|
"url": "https://github.com/SAP/openui5.git"
|
17
17
|
},
|
18
18
|
"dependencies": {
|
19
|
-
"@openui5/sap.ui.core": "1.
|
19
|
+
"@openui5/sap.ui.core": "1.96.2"
|
20
20
|
}
|
21
21
|
}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
<name>sap.ui.webc.common</name>
|
5
5
|
<vendor>SAP SE</vendor>
|
6
|
-
<version>1.
|
6
|
+
<version>1.96.2</version>
|
7
7
|
<copyright>OpenUI5
|
8
8
|
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
9
9
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
@@ -47,9 +47,18 @@ sap.ui.define([
|
|
47
47
|
*
|
48
48
|
* @private
|
49
49
|
* @param obj
|
50
|
+
* @param level
|
51
|
+
* @param maxLevel
|
50
52
|
* @returns {Object}
|
51
53
|
*/
|
52
|
-
var fnConvert = function(obj) {
|
54
|
+
var fnConvert = function(obj, level, maxLevel) {
|
55
|
+
if (level === undefined) {
|
56
|
+
level = 0;
|
57
|
+
}
|
58
|
+
if (maxLevel === undefined) {
|
59
|
+
maxLevel = 2;
|
60
|
+
}
|
61
|
+
|
53
62
|
// Null
|
54
63
|
if (obj == null) {
|
55
64
|
return obj;
|
@@ -61,20 +70,22 @@ sap.ui.define([
|
|
61
70
|
return oControl ? oControl : obj;
|
62
71
|
}
|
63
72
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
73
|
+
if (level < maxLevel) {
|
74
|
+
// Array
|
75
|
+
if (Array.isArray(obj)) {
|
76
|
+
return obj.map(fnConvert, level + 1, maxLevel);
|
77
|
+
}
|
68
78
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
79
|
+
// Object
|
80
|
+
if (typeof obj === "object") {
|
81
|
+
var oResult = {};
|
82
|
+
for (var i in obj) {
|
83
|
+
if (obj.hasOwnProperty(i)) {
|
84
|
+
oResult[i] = fnConvert(obj[i], level + 1, maxLevel);
|
85
|
+
}
|
75
86
|
}
|
87
|
+
return oResult;
|
76
88
|
}
|
77
|
-
return oResult;
|
78
89
|
}
|
79
90
|
|
80
91
|
// Anything else
|
@@ -93,7 +104,7 @@ sap.ui.define([
|
|
93
104
|
*
|
94
105
|
* @extends sap.ui.core.Control
|
95
106
|
* @author SAP SE
|
96
|
-
* @version 1.
|
107
|
+
* @version 1.96.2
|
97
108
|
* @public
|
98
109
|
* @since 1.92.0
|
99
110
|
* @alias sap.ui.webc.common.WebComponent
|
@@ -111,6 +122,8 @@ sap.ui.define([
|
|
111
122
|
constructor : function(sId, mSettings) {
|
112
123
|
Control.apply(this, arguments);
|
113
124
|
|
125
|
+
this.__onInvalidationBound = this.__onInvalidation.bind(this);
|
126
|
+
|
114
127
|
// After the DOM element is rendered for the first time, attach the invalidation callback (in __onAfterRenderingDelegate)
|
115
128
|
this.__delegates = {
|
116
129
|
onAfterRendering: this.__onAfterRenderingDelegate
|
@@ -235,11 +248,15 @@ sap.ui.define([
|
|
235
248
|
*/
|
236
249
|
WebComponent.prototype.__onAfterRenderingDelegate = function() {
|
237
250
|
var oDomRef = this.getDomRef();
|
238
|
-
|
239
|
-
|
240
|
-
this.
|
241
|
-
|
242
|
-
|
251
|
+
|
252
|
+
window.customElements.whenDefined(oDomRef.localName).then(function() {
|
253
|
+
oDomRef.attachInvalidate(this.__onInvalidationBound);
|
254
|
+
|
255
|
+
if (oDomRef._individualSlot) {
|
256
|
+
this.__slot = oDomRef._individualSlot; // If the component creates individual slots for children, f.e. columns-3 or default-1, update the __slot property, otherwise RenderManager will set the normal slot name, f.e. columns or ""
|
257
|
+
}
|
258
|
+
this.__updateObjectProperties(oDomRef);
|
259
|
+
}.bind(this));
|
243
260
|
};
|
244
261
|
|
245
262
|
/**
|
@@ -251,10 +268,10 @@ sap.ui.define([
|
|
251
268
|
var oAttrProperties = this.getMetadata().getPropertiesByMapping("attribute");
|
252
269
|
for (var sPropName in oAttrProperties) {
|
253
270
|
var oPropData = oAttrProperties[sPropName];
|
271
|
+
var vPropValue = oPropData.get(this);
|
254
272
|
|
255
|
-
if (oPropData.type === "object") {
|
273
|
+
if (oPropData.type === "object" || typeof vPropValue === "object") {
|
256
274
|
var sWebComponentPropName = oPropData._sMapTo ? oPropData._sMapTo : sPropName;
|
257
|
-
var vPropValue = oPropData.get(this);
|
258
275
|
oDomRef[sWebComponentPropName] = vPropValue;
|
259
276
|
}
|
260
277
|
}
|
@@ -344,8 +361,12 @@ sap.ui.define([
|
|
344
361
|
|
345
362
|
|
346
363
|
WebComponent.prototype.destroy = function() {
|
364
|
+
var oDomRef = this.getDomRef();
|
347
365
|
this.__detachCustomEventsListeners();
|
348
|
-
|
366
|
+
if (oDomRef && typeof oDomRef.detachInvalidate === "function") {
|
367
|
+
oDomRef.detachInvalidate(this.__onInvalidationBound);
|
368
|
+
}
|
369
|
+
|
349
370
|
return Control.prototype.destroy.call(this, arguments);
|
350
371
|
};
|
351
372
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
22
22
|
*
|
23
23
|
* @class
|
24
24
|
* @author SAP SE
|
25
|
-
* @version 1.
|
25
|
+
* @version 1.96.2
|
26
26
|
* @since 1.92.0
|
27
27
|
* @experimental Since 1.92.0 The API might change. It is not intended for productive usage yet!
|
28
28
|
* @alias sap.ui.webc.common.WebComponentMetadata
|
@@ -72,12 +72,12 @@ sap.ui.define([
|
|
72
72
|
var oAttrProperties = oWebComponent.getMetadata().getPropertiesByMapping("attribute");
|
73
73
|
for (var sPropName in oAttrProperties) {
|
74
74
|
var oPropData = oAttrProperties[sPropName];
|
75
|
-
|
76
|
-
|
75
|
+
var vPropValue = oPropData.get(oWebComponent);
|
76
|
+
if (oPropData.type === "object" || typeof vPropValue === "object") {
|
77
|
+
continue; // Properties of type "object" and custom-type properties with object values are set during onAfterRendering
|
77
78
|
}
|
78
79
|
|
79
80
|
var sAttrName = oPropData._sMapTo ? oPropData._sMapTo : hyphenate(sPropName);
|
80
|
-
var vPropValue = oPropData.get(oWebComponent);
|
81
81
|
if (oPropData._fnMappingFormatter) {
|
82
82
|
vPropValue = oWebComponent[oPropData._fnMappingFormatter].call(oWebComponent, vPropValue);
|
83
83
|
}
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
22
22
|
// delegate further initialization of this library to the Core
|
23
23
|
sap.ui.getCore().initLibrary({
|
24
24
|
name : "sap.ui.webc.common",
|
25
|
-
version: "1.
|
25
|
+
version: "1.96.2",
|
26
26
|
dependencies : ["sap.ui.core"],
|
27
27
|
noLibraryCSS: true,
|
28
28
|
designtime: "sap/ui/webc/common/designtime/library.designtime",
|
@@ -45,7 +45,7 @@ sap.ui.define([
|
|
45
45
|
* @namespace
|
46
46
|
* @alias sap.ui.webc
|
47
47
|
* @author SAP SE
|
48
|
-
* @version 1.
|
48
|
+
* @version 1.96.2
|
49
49
|
* @public
|
50
50
|
* @since 1.92.0
|
51
51
|
* @experimental Since 1.92.0
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
57
57
|
* @namespace
|
58
58
|
* @alias sap.ui.webc.common
|
59
59
|
* @author SAP SE
|
60
|
-
* @version 1.
|
60
|
+
* @version 1.96.2
|
61
61
|
* @public
|
62
62
|
* @since 1.92.0
|
63
63
|
* @experimental Since 1.92.0
|
@@ -62,6 +62,7 @@ sap.ui.define(['exports'], function (exports) { 'use strict';
|
|
62
62
|
const supportsTouch = () => touch;
|
63
63
|
const isIE = () => ie;
|
64
64
|
const isSafari = () => safari;
|
65
|
+
const isChrome = () => chrome;
|
65
66
|
const isTablet = () => {
|
66
67
|
detectTablet();
|
67
68
|
return (touch || isWindows8OrAbove()) && tablet;
|
@@ -74,6 +75,7 @@ sap.ui.define(['exports'], function (exports) { 'use strict';
|
|
74
75
|
return (!isTablet() && !isPhone()) || isWindows8OrAbove();
|
75
76
|
};
|
76
77
|
|
78
|
+
exports.isChrome = isChrome;
|
77
79
|
exports.isDesktop = isDesktop;
|
78
80
|
exports.isIE = isIE;
|
79
81
|
exports.isPhone = isPhone;
|
@@ -2,40 +2,38 @@ sap.ui.define(function () { 'use strict';
|
|
2
2
|
|
3
3
|
class EventProvider {
|
4
4
|
constructor() {
|
5
|
-
this._eventRegistry =
|
5
|
+
this._eventRegistry = new Map();
|
6
6
|
}
|
7
7
|
attachEvent(eventName, fnFunction) {
|
8
8
|
const eventRegistry = this._eventRegistry;
|
9
|
-
|
9
|
+
const eventListeners = eventRegistry.get(eventName);
|
10
10
|
if (!Array.isArray(eventListeners)) {
|
11
|
-
eventRegistry
|
12
|
-
|
11
|
+
eventRegistry.set(eventName, [fnFunction]);
|
12
|
+
return;
|
13
|
+
}
|
14
|
+
if (!eventListeners.includes(fnFunction)) {
|
15
|
+
eventListeners.push(fnFunction);
|
13
16
|
}
|
14
|
-
eventListeners.push({
|
15
|
-
"function": fnFunction,
|
16
|
-
});
|
17
17
|
}
|
18
18
|
detachEvent(eventName, fnFunction) {
|
19
19
|
const eventRegistry = this._eventRegistry;
|
20
|
-
let eventListeners = eventRegistry
|
20
|
+
let eventListeners = eventRegistry.get(eventName);
|
21
21
|
if (!eventListeners) {
|
22
22
|
return;
|
23
23
|
}
|
24
|
-
eventListeners = eventListeners.filter(
|
25
|
-
return event["function"] !== fnFunction;
|
26
|
-
});
|
24
|
+
eventListeners = eventListeners.filter(fn => fn !== fnFunction);
|
27
25
|
if (eventListeners.length === 0) {
|
28
|
-
delete
|
26
|
+
eventRegistry.delete(eventName);
|
29
27
|
}
|
30
28
|
}
|
31
29
|
fireEvent(eventName, data) {
|
32
30
|
const eventRegistry = this._eventRegistry;
|
33
|
-
const eventListeners = eventRegistry
|
31
|
+
const eventListeners = eventRegistry.get(eventName);
|
34
32
|
if (!eventListeners) {
|
35
33
|
return [];
|
36
34
|
}
|
37
|
-
return eventListeners.map(
|
38
|
-
return
|
35
|
+
return eventListeners.map(fn => {
|
36
|
+
return fn.call(this, data);
|
39
37
|
});
|
40
38
|
}
|
41
39
|
fireEventAsync(eventName, data) {
|
@@ -43,20 +41,14 @@ sap.ui.define(function () { 'use strict';
|
|
43
41
|
}
|
44
42
|
isHandlerAttached(eventName, fnFunction) {
|
45
43
|
const eventRegistry = this._eventRegistry;
|
46
|
-
const eventListeners = eventRegistry
|
44
|
+
const eventListeners = eventRegistry.get(eventName);
|
47
45
|
if (!eventListeners) {
|
48
46
|
return false;
|
49
47
|
}
|
50
|
-
|
51
|
-
const event = eventListeners[i];
|
52
|
-
if (event["function"] === fnFunction) {
|
53
|
-
return true;
|
54
|
-
}
|
55
|
-
}
|
56
|
-
return false;
|
48
|
+
return eventListeners.includes(fnFunction);
|
57
49
|
}
|
58
50
|
hasListeners(eventName) {
|
59
|
-
return !!this._eventRegistry
|
51
|
+
return !!this._eventRegistry.get(eventName);
|
60
52
|
}
|
61
53
|
}
|
62
54
|
|
@@ -17,7 +17,7 @@ sap.ui.define(['./util/createStyleInHead', './FeaturesRegistry'], function (crea
|
|
17
17
|
url(${font72RegularWoff2}) format("woff2"),
|
18
18
|
url(${font72RegularWoff}) format("woff");
|
19
19
|
}
|
20
|
-
|
20
|
+
|
21
21
|
@font-face {
|
22
22
|
font-family: "72full";
|
23
23
|
font-style: normal;
|
@@ -25,9 +25,9 @@ sap.ui.define(['./util/createStyleInHead', './FeaturesRegistry'], function (crea
|
|
25
25
|
src: local('72-full'),
|
26
26
|
url(${font72RegularFullWoff2}) format("woff2"),
|
27
27
|
url(${font72RegularFullWoff}) format("woff");
|
28
|
-
|
28
|
+
|
29
29
|
}
|
30
|
-
|
30
|
+
|
31
31
|
@font-face {
|
32
32
|
font-family: "72";
|
33
33
|
font-style: normal;
|
@@ -36,7 +36,7 @@ sap.ui.define(['./util/createStyleInHead', './FeaturesRegistry'], function (crea
|
|
36
36
|
url(${font72BoldWoff2}) format("woff2"),
|
37
37
|
url(${font72BoldWoff}) format("woff");
|
38
38
|
}
|
39
|
-
|
39
|
+
|
40
40
|
@font-face {
|
41
41
|
font-family: "72full";
|
42
42
|
font-style: normal;
|
@@ -118,6 +118,8 @@ sap.ui.define(['exports'], function (exports) { 'use strict';
|
|
118
118
|
const isDownCtrl = event => (event.key ? (event.key === "ArrowDown" || event.key === "Down") : event.keyCode === KeyCodes.ARROW_DOWN) && checkModifierKeys(event, true, false, false);
|
119
119
|
const isUpShift = event => (event.key ? (event.key === "ArrowUp" || event.key === "Up") : event.keyCode === KeyCodes.ARROW_UP) && checkModifierKeys(event, false, false, true);
|
120
120
|
const isDownShift = event => (event.key ? (event.key === "ArrowDown" || event.key === "Down") : event.keyCode === KeyCodes.ARROW_DOWN) && checkModifierKeys(event, false, false, true);
|
121
|
+
const isLeftShift = event => (event.key ? (event.key === "ArrowLeft" || event.key === "Left") : event.keyCode === KeyCodes.ARROW_LEFT) && checkModifierKeys(event, false, false, true);
|
122
|
+
const isRightShift = event => (event.key ? (event.key === "ArrowRight" || event.key === "Right") : event.keyCode === KeyCodes.ARROW_RIGHT) && checkModifierKeys(event, false, false, true);
|
121
123
|
const isUpShiftCtrl = event => (event.key ? (event.key === "ArrowUp" || event.key === "Up") : event.keyCode === KeyCodes.ARROW_UP) && checkModifierKeys(event, true, false, true);
|
122
124
|
const isDownShiftCtrl = event => (event.key ? (event.key === "ArrowDown" || event.key === "Down") : event.keyCode === KeyCodes.ARROW_DOWN) && checkModifierKeys(event, true, false, true);
|
123
125
|
const isHome = event => (event.key ? event.key === "Home" : event.keyCode === KeyCodes.HOME) && !hasModifierKeys(event);
|
@@ -132,7 +134,9 @@ sap.ui.define(['exports'], function (exports) { 'use strict';
|
|
132
134
|
const isPageUp = event => (event.key ? event.key === "PageUp" : event.keyCode === KeyCodes.PAGE_UP) && !hasModifierKeys(event);
|
133
135
|
const isPageDown = event => (event.key ? event.key === "PageDown" : event.keyCode === KeyCodes.PAGE_DOWN) && !hasModifierKeys(event);
|
134
136
|
const isPageUpShift = event => (event.key ? event.key === "PageUp" : event.keyCode === KeyCodes.PAGE_UP) && checkModifierKeys(event, false, false, true);
|
137
|
+
const isPageUpAlt = event => (event.key ? event.key === "PageUp" : event.keyCode === KeyCodes.PAGE_UP) && checkModifierKeys(event, false, true, false);
|
135
138
|
const isPageDownShift = event => (event.key ? event.key === "PageDown" : event.keyCode === KeyCodes.PAGE_DOWN) && checkModifierKeys(event, false, false, true);
|
139
|
+
const isPageDownAlt = event => (event.key ? event.key === "PageDown" : event.keyCode === KeyCodes.PAGE_DOWN) && checkModifierKeys(event, false, true, false);
|
136
140
|
const isPageUpShiftCtrl = event => (event.key ? event.key === "PageUp" : event.keyCode === KeyCodes.PAGE_UP) && checkModifierKeys(event, true, false, true);
|
137
141
|
const isPageDownShiftCtrl = event => (event.key ? event.key === "PageDown" : event.keyCode === KeyCodes.PAGE_DOWN) && checkModifierKeys(event, true, false, true);
|
138
142
|
const isPlus = event => (event.key ? event.key === "+" : event.keyCode === KeyCodes.PLUS) || (event.keyCode === KeyCodes.NUMPAD_PLUS && !hasModifierKeys(event));
|
@@ -147,6 +151,7 @@ sap.ui.define(['exports'], function (exports) { 'use strict';
|
|
147
151
|
return event.key === "F4" && !hasModifierKeys(event);
|
148
152
|
};
|
149
153
|
const isF4Shift = event => (event.key ? event.key === "F4" : event.keyCode === KeyCodes.F4) && checkModifierKeys(event, false, false, true);
|
154
|
+
const isF7 = event => (event.key ? event.key === "F7" : event.keyCode === KeyCodes.F7) && !hasModifierKeys(event);
|
150
155
|
const isShowByArrows = event => {
|
151
156
|
return ((event.key === "ArrowDown" || event.key === "Down") || (event.key === "ArrowUp" || event.key === "Up")) && checkModifierKeys(event, false, true, false);
|
152
157
|
};
|
@@ -167,20 +172,25 @@ sap.ui.define(['exports'], function (exports) { 'use strict';
|
|
167
172
|
exports.isEscape = isEscape;
|
168
173
|
exports.isF4 = isF4;
|
169
174
|
exports.isF4Shift = isF4Shift;
|
175
|
+
exports.isF7 = isF7;
|
170
176
|
exports.isHome = isHome;
|
171
177
|
exports.isHomeCtrl = isHomeCtrl;
|
172
178
|
exports.isLeft = isLeft;
|
173
179
|
exports.isLeftCtrl = isLeftCtrl;
|
180
|
+
exports.isLeftShift = isLeftShift;
|
174
181
|
exports.isMinus = isMinus;
|
175
182
|
exports.isPageDown = isPageDown;
|
183
|
+
exports.isPageDownAlt = isPageDownAlt;
|
176
184
|
exports.isPageDownShift = isPageDownShift;
|
177
185
|
exports.isPageDownShiftCtrl = isPageDownShiftCtrl;
|
178
186
|
exports.isPageUp = isPageUp;
|
187
|
+
exports.isPageUpAlt = isPageUpAlt;
|
179
188
|
exports.isPageUpShift = isPageUpShift;
|
180
189
|
exports.isPageUpShiftCtrl = isPageUpShiftCtrl;
|
181
190
|
exports.isPlus = isPlus;
|
182
191
|
exports.isRight = isRight;
|
183
192
|
exports.isRightCtrl = isRightCtrl;
|
193
|
+
exports.isRightShift = isRightShift;
|
184
194
|
exports.isShow = isShow;
|
185
195
|
exports.isSpace = isSpace;
|
186
196
|
exports.isSpaceShift = isSpaceShift;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
sap.ui.define(['./StaticArea', './updateShadowRoot', './Render', './util/getEffectiveContentDensity', './CustomElementsScope'], function (StaticArea, updateShadowRoot, Render, getEffectiveContentDensity, CustomElementsScope) { 'use strict';
|
1
|
+
sap.ui.define(['./StaticArea', './updateShadowRoot', './Render', './util/getEffectiveContentDensity', './CustomElementsScope', './locale/getEffectiveDir'], function (StaticArea, updateShadowRoot, Render, getEffectiveContentDensity, CustomElementsScope, getEffectiveDir) { 'use strict';
|
2
2
|
|
3
3
|
class StaticAreaItem extends HTMLElement {
|
4
4
|
constructor() {
|
@@ -13,6 +13,7 @@ sap.ui.define(['./StaticArea', './updateShadowRoot', './Render', './util/getEffe
|
|
13
13
|
update() {
|
14
14
|
if (this._rendered) {
|
15
15
|
this._updateContentDensity();
|
16
|
+
this._updateDirection();
|
16
17
|
updateShadowRoot(this.ownerElement, true);
|
17
18
|
}
|
18
19
|
}
|
@@ -25,6 +26,14 @@ sap.ui.define(['./StaticArea', './updateShadowRoot', './Render', './util/getEffe
|
|
25
26
|
this.classList.remove("ui5-content-density-compact");
|
26
27
|
}
|
27
28
|
}
|
29
|
+
_updateDirection() {
|
30
|
+
const dir = getEffectiveDir(this.ownerElement);
|
31
|
+
if (dir) {
|
32
|
+
this.setAttribute("dir", dir);
|
33
|
+
} else {
|
34
|
+
this.removeAttribute("dir");
|
35
|
+
}
|
36
|
+
}
|
28
37
|
async getDomRef() {
|
29
38
|
this._updateContentDensity();
|
30
39
|
if (!this._rendered) {
|
@@ -4,17 +4,17 @@ sap.ui.define(['./util/createStyleInHead'], function (createStyleInHead) { 'use
|
|
4
4
|
:root {
|
5
5
|
--_ui5_content_density:cozy;
|
6
6
|
}
|
7
|
-
|
7
|
+
|
8
8
|
[data-ui5-compact-size],
|
9
9
|
.ui5-content-density-compact,
|
10
10
|
.sapUiSizeCompact {
|
11
11
|
--_ui5_content_density:compact;
|
12
12
|
}
|
13
|
-
|
13
|
+
|
14
14
|
[dir="rtl"] {
|
15
15
|
--_ui5_dir:rtl;
|
16
16
|
}
|
17
|
-
|
17
|
+
|
18
18
|
[dir="ltr"] {
|
19
19
|
--_ui5_dir:ltr;
|
20
20
|
}
|