@ui5/webcomponents-base 0.0.0-6ef02a35f → 0.0.0-7e7d9ea6f

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.
Files changed (183) hide show
  1. package/.eslintignore +3 -2
  2. package/CHANGELOG.md +225 -0
  3. package/README.md +53 -7
  4. package/bundle.esm.js +13 -11
  5. package/dist/Boot.js +34 -18
  6. package/dist/CSP.js +59 -0
  7. package/dist/CustomElementsRegistry.js +60 -4
  8. package/dist/CustomElementsScope.js +20 -98
  9. package/dist/CustomElementsScopeUtils.js +108 -0
  10. package/dist/Device.js +20 -1
  11. package/dist/EventProvider.js +19 -25
  12. package/dist/FeaturesRegistry.js +4 -1
  13. package/dist/FontFace.js +7 -95
  14. package/dist/InitialConfiguration.js +11 -7
  15. package/dist/Keys.js +56 -0
  16. package/dist/ManagedStyles.js +83 -0
  17. package/dist/Render.js +3 -1
  18. package/dist/Runtimes.js +107 -0
  19. package/dist/StaticAreaItem.js +15 -10
  20. package/dist/SystemCSSVars.js +4 -25
  21. package/dist/UI5Element.js +59 -60
  22. package/dist/UI5ElementMetadata.js +47 -6
  23. package/dist/asset-registries/Icons.js +22 -8
  24. package/dist/asset-registries/Illustrations.js +10 -3
  25. package/dist/asset-registries/LocaleData.js +18 -4
  26. package/dist/asset-registries/Themes.js +6 -2
  27. package/dist/asset-registries/i18n.js +3 -1
  28. package/dist/assets/bundle.esm.691f93f5.js +43 -0
  29. package/dist/assets-meta/IconCollectionsAlias.js +18 -0
  30. package/dist/config/Icons.js +52 -0
  31. package/dist/config/Theme.js +25 -0
  32. package/dist/css/BusyIndicator.css +80 -0
  33. package/dist/css/FontFace.css +75 -0
  34. package/dist/css/OverrideFontFace.css +32 -0
  35. package/dist/css/SystemCSSVars.css +17 -0
  36. package/dist/delegate/ItemNavigation.js +75 -4
  37. package/dist/features/F6Navigation.js +110 -0
  38. package/dist/features/OpenUI5Enablement.js +119 -0
  39. package/dist/generated/AssetParameters.js +1 -1
  40. package/dist/generated/VersionInfo.js +10 -0
  41. package/dist/generated/css/BusyIndicator.css.js +5 -0
  42. package/dist/generated/css/FontFace.css.js +5 -0
  43. package/dist/generated/css/OverrideFontFace.css.js +5 -0
  44. package/dist/generated/css/SystemCSSVars.css.js +5 -0
  45. package/dist/i18nBundle.js +33 -2
  46. package/dist/renderer/LitRenderer.js +33 -12
  47. package/dist/renderer/directives/style-map.js +72 -0
  48. package/dist/renderer/executeTemplate.js +19 -2
  49. package/dist/sap/base/Log.js +2 -10
  50. package/dist/sap/base/assert.js +1 -5
  51. package/dist/sap/base/security/encodeCSS.js +14 -0
  52. package/dist/sap/base/security/encodeXML.js +23 -0
  53. package/dist/sap/base/strings/toHex.js +8 -0
  54. package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
  55. package/dist/theming/CustomStyle.js +23 -3
  56. package/dist/theming/applyTheme.js +11 -10
  57. package/dist/theming/getEffectiveLinksHrefs.js +27 -0
  58. package/dist/theming/getEffectiveStyle.js +9 -0
  59. package/dist/theming/getStylesString.js +4 -2
  60. package/dist/theming/getThemeDesignerTheme.js +25 -5
  61. package/dist/theming/preloadLinks.js +23 -0
  62. package/dist/types/DataType.js +12 -0
  63. package/dist/types/Float.js +4 -0
  64. package/dist/types/Integer.js +4 -0
  65. package/dist/updateShadowRoot.js +9 -6
  66. package/dist/util/Caret.js +1 -14
  67. package/dist/util/ColorConversion.js +30 -2
  68. package/dist/util/FocusableElements.js +8 -6
  69. package/dist/util/InvisibleMessage.js +20 -9
  70. package/dist/util/TabbableElements.js +4 -0
  71. package/dist/util/createLinkInHead.js +19 -0
  72. package/dist/util/escapeRegex.js +10 -0
  73. package/dist/util/generateHighlightedMarkup.js +42 -0
  74. package/dist/util/getNormalizedTarget.js +16 -0
  75. package/dist/util/isDefaultSlotProvided.js +11 -0
  76. package/dist/util/isNodeHidden.js +1 -1
  77. package/hash.txt +1 -1
  78. package/lib/generate-asset-parameters/index.js +8 -5
  79. package/lib/generate-styles/index.js +26 -0
  80. package/lib/generate-version-info/index.js +32 -0
  81. package/package-scripts.js +25 -31
  82. package/package.json +11 -12
  83. package/src/Boot.js +34 -18
  84. package/src/CSP.js +59 -0
  85. package/src/CustomElementsRegistry.js +60 -4
  86. package/src/CustomElementsScope.js +20 -98
  87. package/src/CustomElementsScopeUtils.js +108 -0
  88. package/src/Device.js +20 -1
  89. package/src/EventProvider.js +19 -25
  90. package/src/FeaturesRegistry.js +4 -1
  91. package/src/FontFace.js +7 -95
  92. package/src/InitialConfiguration.js +11 -7
  93. package/src/Keys.js +56 -0
  94. package/src/ManagedStyles.js +83 -0
  95. package/src/Render.js +3 -1
  96. package/src/Runtimes.js +107 -0
  97. package/src/StaticAreaItem.js +15 -10
  98. package/src/SystemCSSVars.js +4 -25
  99. package/src/UI5Element.js +59 -60
  100. package/src/UI5ElementMetadata.js +47 -6
  101. package/src/asset-registries/Icons.js +22 -8
  102. package/src/asset-registries/Illustrations.js +10 -3
  103. package/src/asset-registries/LocaleData.js +18 -4
  104. package/src/asset-registries/Themes.js +6 -2
  105. package/src/asset-registries/i18n.js +3 -1
  106. package/src/assets-meta/IconCollectionsAlias.js +18 -0
  107. package/src/config/Icons.js +52 -0
  108. package/src/config/Theme.js +25 -0
  109. package/src/css/BusyIndicator.css +80 -0
  110. package/src/css/FontFace.css +75 -0
  111. package/src/css/OverrideFontFace.css +32 -0
  112. package/src/css/SystemCSSVars.css +17 -0
  113. package/src/delegate/ItemNavigation.js +75 -4
  114. package/src/features/F6Navigation.js +110 -0
  115. package/src/features/OpenUI5Enablement.js +119 -0
  116. package/src/i18nBundle.js +33 -2
  117. package/src/renderer/LitRenderer.js +33 -12
  118. package/src/renderer/directives/style-map.js +72 -0
  119. package/src/renderer/executeTemplate.js +19 -2
  120. package/src/theming/CustomStyle.js +23 -3
  121. package/src/theming/applyTheme.js +11 -10
  122. package/src/theming/getEffectiveLinksHrefs.js +27 -0
  123. package/src/theming/getEffectiveStyle.js +9 -0
  124. package/src/theming/getStylesString.js +4 -2
  125. package/src/theming/getThemeDesignerTheme.js +25 -5
  126. package/src/theming/preloadLinks.js +23 -0
  127. package/src/types/DataType.js +12 -0
  128. package/src/types/Float.js +4 -0
  129. package/src/types/Integer.js +4 -0
  130. package/src/updateShadowRoot.js +9 -6
  131. package/src/util/Caret.js +1 -14
  132. package/src/util/ColorConversion.js +30 -2
  133. package/src/util/FocusableElements.js +8 -6
  134. package/src/util/InvisibleMessage.js +20 -9
  135. package/src/util/TabbableElements.js +4 -0
  136. package/src/util/createLinkInHead.js +19 -0
  137. package/src/util/escapeRegex.js +10 -0
  138. package/src/util/generateHighlightedMarkup.js +42 -0
  139. package/src/util/getNormalizedTarget.js +16 -0
  140. package/src/util/isDefaultSlotProvided.js +11 -0
  141. package/src/util/isNodeHidden.js +1 -1
  142. package/used-modules.txt +4 -1
  143. package/config/.eslintrc.js +0 -3
  144. package/config/rollup.config.js +0 -1
  145. package/dist/config/AssetsPath.js +0 -17
  146. package/dist/isLegacyBrowser.js +0 -3
  147. package/dist/resources/bundle.esm.js +0 -26
  148. package/dist/resources/bundle.esm.js.map +0 -1
  149. package/dist/test-resources/assets/Themes.js +0 -17
  150. package/dist/test-resources/elements/Child.js +0 -35
  151. package/dist/test-resources/elements/Generic.js +0 -84
  152. package/dist/test-resources/elements/GenericExt.js +0 -26
  153. package/dist/test-resources/elements/NoShadowDOM.js +0 -13
  154. package/dist/test-resources/elements/Parent.js +0 -41
  155. package/dist/test-resources/elements/WithStaticArea.js +0 -76
  156. package/dist/test-resources/pages/AllTestElements.html +0 -39
  157. package/dist/test-resources/pages/Configuration.html +0 -18
  158. package/dist/test-resources/pages/ConfigurationScript.html +0 -34
  159. package/dist/test-resources/pages/assets/messagebundle_de.properties +0 -1
  160. package/dist/test-resources/pages/assets/messagebundle_en.properties +0 -1
  161. package/dist/test-resources/pages/assets/messagebundle_es.properties +0 -1
  162. package/dist/test-resources/pages/assets/messagebundle_fr.properties +0 -1
  163. package/dist/test-resources/pages/i18n.html +0 -35
  164. package/dist/test-resources/specs/ConfigurationChange.spec.js +0 -27
  165. package/dist/test-resources/specs/ConfigurationScript.spec.js +0 -63
  166. package/dist/test-resources/specs/ConfigurationURL.spec.js +0 -93
  167. package/dist/test-resources/specs/CustomTheme.spec.js +0 -27
  168. package/dist/test-resources/specs/StaticArea.spec.js +0 -36
  169. package/dist/test-resources/specs/Theming.spec.js +0 -33
  170. package/dist/test-resources/specs/UI5ElementInvalidation.js +0 -242
  171. package/dist/test-resources/specs/UI5ElementLifecycle.js +0 -98
  172. package/dist/test-resources/specs/UI5ElementListenForChildPropChanges.spec.js +0 -75
  173. package/dist/test-resources/specs/UI5ElementMetadataExt.js +0 -42
  174. package/dist/test-resources/specs/UI5ElementPropertyValidation.js +0 -14
  175. package/dist/test-resources/specs/UI5ElementPropsAndAttrs.spec.js +0 -67
  176. package/dist/test-resources/specs/UI5ElementShadowDOM.js +0 -24
  177. package/dist/test-resources/specs/UI5ElementSlots.js +0 -36
  178. package/dist/theming/createThemePropertiesStyleTag.js +0 -20
  179. package/dist/util/encodeCSS.js +0 -24
  180. package/src/config/AssetsPath.js +0 -17
  181. package/src/isLegacyBrowser.js +0 -3
  182. package/src/theming/createThemePropertiesStyleTag.js +0 -20
  183. package/src/util/encodeCSS.js +0 -24
package/.eslintignore CHANGED
@@ -1,7 +1,6 @@
1
1
  # Note: Changes to this file also must be applied to the top level .eslintignore file.
2
2
  test
3
3
  lib
4
- overlay
5
4
  dist
6
5
  src/thirdparty
7
6
  bundle.esm.js
@@ -10,4 +9,6 @@ rollup.config*.js
10
9
  wdio.conf.js
11
10
  postcss.config.js
12
11
  package-scripts.js
13
- .eslintrc.js
12
+ .eslintrc.js
13
+ src/renderer/directives/style-map.js
14
+ src/util/metaUrl.js
package/CHANGELOG.md CHANGED
@@ -3,6 +3,231 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.5.0](https://github.com/SAP/ui5-webcomponents/compare/v1.4.0...v1.5.0) (2022-07-03)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **f6navigation:** prevent default behavior on windows OS ([#5424](https://github.com/SAP/ui5-webcomponents/issues/5424)) ([a494f85](https://github.com/SAP/ui5-webcomponents/commit/a494f85))
12
+ * **framework:** correct use of arrow keys for ItemNavigation in RTL ([#5408](https://github.com/SAP/ui5-webcomponents/issues/5408)) ([cec8119](https://github.com/SAP/ui5-webcomponents/commit/cec8119)), closes [#5166](https://github.com/SAP/ui5-webcomponents/issues/5166)
13
+ * cldr url ([#5397](https://github.com/SAP/ui5-webcomponents/issues/5397)) ([a4df0bd](https://github.com/SAP/ui5-webcomponents/commit/a4df0bd))
14
+ * **ui5-badge:** correctly detect if default slot is provided ([#5334](https://github.com/SAP/ui5-webcomponents/issues/5334)) ([0dceaf5](https://github.com/SAP/ui5-webcomponents/commit/0dceaf5)), closes [#5328](https://github.com/SAP/ui5-webcomponents/issues/5328)
15
+
16
+
17
+
18
+
19
+
20
+ # [1.4.0](https://github.com/SAP/ui5-webcomponents/compare/v1.3.1...v1.4.0) (2022-05-25)
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **framework:** use fonts from proper SDK URL ([#5141](https://github.com/SAP/ui5-webcomponents/issues/5141)) ([2e49248](https://github.com/SAP/ui5-webcomponents/commit/2e49248))
26
+ * **framework:** fix keydown events for all inputs ([#5188](https://github.com/SAP/ui5-webcomponents/issues/5188)) ([11dfe94](https://github.com/SAP/ui5-webcomponents/commit/11dfe94))
27
+ * **framework:** fix fallback to default theme ([#5185](https://github.com/SAP/ui5-webcomponents/issues/5185)) ([0fc2f0d](https://github.com/SAP/ui5-webcomponents/commit/0fc2f0d)), closes [#5136](https://github.com/SAP/ui5-webcomponents/issues/5136) [#5136](https://github.com/SAP/ui5-webcomponents/issues/5136)
28
+
29
+
30
+
31
+
32
+ ## [1.3.1](https://github.com/SAP/ui5-webcomponents/compare/v1.3.0...v1.3.1) (2022-04-27)
33
+
34
+ **Note:** Version bump only for package @ui5/webcomponents-base
35
+
36
+
37
+
38
+
39
+
40
+ # [1.3.0](https://github.com/SAP/ui5-webcomponents/compare/v1.2.4...v1.3.0) (2022-04-19)
41
+
42
+
43
+ ### Bug Fixes
44
+
45
+ * **framework:** make listeners passive ([#5012](https://github.com/SAP/ui5-webcomponents/issues/5012)) ([30f2dc7](https://github.com/SAP/ui5-webcomponents/commit/30f2dc7))
46
+ * **framework:** fix F6 navigation on windows browsers ([#4886](https://github.com/SAP/ui5-webcomponents/issues/4886)) ([36fd3d1](https://github.com/SAP/ui5-webcomponents/commit/36fd3d1))
47
+ * **framework:** fix submit event handling in forms ([#4942](https://github.com/SAP/ui5-webcomponents/issues/4942)) ([883809f](https://github.com/SAP/ui5-webcomponents/commit/883809f))
48
+ * **framework:** add 72-* font as system styles ([#4934](https://github.com/SAP/ui5-webcomponents/issues/4934)) ([4b45d32](https://github.com/SAP/ui5-webcomponents/commit/4b45d32))
49
+ * **framework:** fix scoping of self tag ([#4952](https://github.com/SAP/ui5-webcomponents/issues/4952)) ([8d53e95](https://github.com/SAP/ui5-webcomponents/commit/8d53e95))
50
+
51
+
52
+ ### Features
53
+
54
+ * **framework:** configure default icon collection per theme ([#5031](https://github.com/SAP/ui5-webcomponents/issues/5031)) ([7f84b83](https://github.com/SAP/ui5-webcomponents/commit/7f84b83))
55
+
56
+
57
+
58
+
59
+
60
+ ## [1.2.4](https://github.com/SAP/ui5-webcomponents/compare/v1.2.3...v1.2.4) (2022-03-30)
61
+
62
+
63
+ ### Bug Fixes
64
+
65
+ * **framework:** fix scoping of self tag ([#4952](https://github.com/SAP/ui5-webcomponents/issues/4952)) ([cdb9e2a](https://github.com/SAP/ui5-webcomponents/commit/cdb9e2a))
66
+ * **ui5-card-header:** prevent events from action slot to trigger header's click event ([#4965](https://github.com/SAP/ui5-webcomponents/issues/4965)) ([f87d898](https://github.com/SAP/ui5-webcomponents/commit/f87d898)), closes [#4891](https://github.com/SAP/ui5-webcomponents/issues/4891)
67
+ * **ui5-popover:** prevent arrow placement over popover's rounded corners ([#4960](https://github.com/SAP/ui5-webcomponents/issues/4960)) ([66604c3](https://github.com/SAP/ui5-webcomponents/commit/66604c3)), closes [#4599](https://github.com/SAP/ui5-webcomponents/issues/4599) [#4797](https://github.com/SAP/ui5-webcomponents/issues/4797)
68
+
69
+
70
+
71
+
72
+
73
+ ## [1.2.3](https://github.com/SAP/ui5-webcomponents/compare/v1.2.2...v1.2.3) (2022-03-23)
74
+
75
+ **Note:** Version bump only for package @ui5/webcomponents-base
76
+
77
+
78
+
79
+
80
+
81
+ ## [1.2.2](https://github.com/SAP/ui5-webcomponents/compare/v1.2.1...v1.2.2) (2022-03-22)
82
+
83
+
84
+ ### Bug Fixes
85
+
86
+ * **framework:** add 72-* font as system styles ([#4934](https://github.com/SAP/ui5-webcomponents/issues/4934)) ([8f9b0d2](https://github.com/SAP/ui5-webcomponents/commit/8f9b0d2))
87
+ * **localization:** fix js error if "sh" locale set ([#4905](https://github.com/SAP/ui5-webcomponents/issues/4905)) ([9ace82c](https://github.com/SAP/ui5-webcomponents/commit/9ace82c)), closes [#4904](https://github.com/SAP/ui5-webcomponents/issues/4904)
88
+
89
+
90
+ ### Features
91
+
92
+ * add ` sap_horizon_dark` and `sap_horizon_hcb(hcw)` theme params ([#4722](https://github.com/SAP/ui5-webcomponents/issues/4722)) ([dc070a1](https://github.com/SAP/ui5-webcomponents/commit/dc070a1))
93
+
94
+
95
+
96
+
97
+
98
+ ## [1.2.1](https://github.com/SAP/ui5-webcomponents/compare/v1.2.0...v1.2.1) (2022-03-02)
99
+
100
+ **Note:** Version bump only for package @ui5/webcomponents-base
101
+
102
+
103
+
104
+
105
+
106
+ # [1.2.0](https://github.com/SAP/ui5-webcomponents/compare/v1.1.2...v1.2.0) (2022-02-28)
107
+
108
+
109
+ ### Bug Fixes
110
+
111
+ * **ui5-input:** improve lazy loading behaviour ([#4763](https://github.com/SAP/ui5-webcomponents/issues/4763)) ([35342be](https://github.com/SAP/ui5-webcomponents/commit/35342be))
112
+ * **ui5-list:** initial focus target ([#4809](https://github.com/SAP/ui5-webcomponents/issues/4809)) ([cf6dd1a](https://github.com/SAP/ui5-webcomponents/commit/cf6dd1a))
113
+ * attached boot tasks always run ([#4777](https://github.com/SAP/ui5-webcomponents/issues/4777)) ([ad4608c](https://github.com/SAP/ui5-webcomponents/commit/ad4608c))
114
+ * **framework:** Tabbable elements error ([#4704](https://github.com/SAP/ui5-webcomponents/issues/4704)) ([650473f](https://github.com/SAP/ui5-webcomponents/commit/650473f))
115
+ * **ui5-badge:** update color-scheme parameters ([#4678](https://github.com/SAP/ui5-webcomponents/issues/4678)) ([c7d75ef](https://github.com/SAP/ui5-webcomponents/commit/c7d75ef)), closes [#3940](https://github.com/SAP/ui5-webcomponents/issues/3940)
116
+ * **ui5-label:** allow focusing elements linked with for attribute inside a shadow root ([#4754](https://github.com/SAP/ui5-webcomponents/issues/4754)) ([bd7a8a1](https://github.com/SAP/ui5-webcomponents/commit/bd7a8a1)), closes [#4751](https://github.com/SAP/ui5-webcomponents/issues/4751)
117
+ * **ui5-li-tree:** correct usage of i18nBudnle ([#4668](https://github.com/SAP/ui5-webcomponents/issues/4668)) ([67848d7](https://github.com/SAP/ui5-webcomponents/commit/67848d7))
118
+ * **ui5-select:** incorrect popover styles when value state is used ([#4651](https://github.com/SAP/ui5-webcomponents/issues/4651)) ([2d8ce46](https://github.com/SAP/ui5-webcomponents/commit/2d8ce46))
119
+ * **ui5-tabcontainer:** await for renderFinished in resize handler ([#4675](https://github.com/SAP/ui5-webcomponents/issues/4675)) ([cd8dc26](https://github.com/SAP/ui5-webcomponents/commit/cd8dc26)), closes [#4628](https://github.com/SAP/ui5-webcomponents/issues/4628)
120
+
121
+
122
+ ### Features
123
+
124
+ * add and update icons from 4.13 and 5.01 icon fonts ([#4790](https://github.com/SAP/ui5-webcomponents/issues/4790)) ([a9e88f0](https://github.com/SAP/ui5-webcomponents/commit/a9e88f0))
125
+ * **ui5-input:** implement showClearIcon property ([#4641](https://github.com/SAP/ui5-webcomponents/issues/4641)) ([b1c1620](https://github.com/SAP/ui5-webcomponents/commit/b1c1620))
126
+ * **ui5-table:** extend keyboard handling ([#4550](https://github.com/SAP/ui5-webcomponents/issues/4550)) ([8daa764](https://github.com/SAP/ui5-webcomponents/commit/8daa764)), closes [#3090](https://github.com/SAP/ui5-webcomponents/issues/3090)
127
+ * **ui5-table:** improve keyboard handling ([#4631](https://github.com/SAP/ui5-webcomponents/issues/4631)) ([f1f2b1b](https://github.com/SAP/ui5-webcomponents/commit/f1f2b1b))
128
+ * **ui5-tree:** make `item-click` event preventable ([#4708](https://github.com/SAP/ui5-webcomponents/issues/4708)) ([29967f0](https://github.com/SAP/ui5-webcomponents/commit/29967f0)), closes [#4502](https://github.com/SAP/ui5-webcomponents/issues/4502)
129
+
130
+
131
+
132
+
133
+
134
+ ## [1.1.2](https://github.com/SAP/ui5-webcomponents/compare/v1.1.1...v1.1.2) (2022-01-26)
135
+
136
+
137
+ ### Bug Fixes
138
+
139
+ * fix ipad recognition ([#4632](https://github.com/SAP/ui5-webcomponents/issues/4632)) ([c0cc73d](https://github.com/SAP/ui5-webcomponents/commit/c0cc73d))
140
+ * remove import.meta.url ([#4630](https://github.com/SAP/ui5-webcomponents/issues/4630)) ([604ce63](https://github.com/SAP/ui5-webcomponents/commit/604ce63))
141
+
142
+
143
+ ### Features
144
+
145
+ * **ui5-multi-input:** Keyboard handling ([#4495](https://github.com/SAP/ui5-webcomponents/issues/4495)) ([b978f4a](https://github.com/SAP/ui5-webcomponents/commit/b978f4a))
146
+
147
+
148
+
149
+
150
+
151
+ ## [1.1.1](https://github.com/SAP/ui5-webcomponents/compare/v1.1.0...v1.1.1) (2022-01-24)
152
+
153
+ **Note:** Version bump only for package @ui5/webcomponents-base
154
+
155
+
156
+
157
+
158
+
159
+ # [1.1.0](https://github.com/SAP/ui5-webcomponents/compare/v1.0.2...v1.1.0) (2022-01-21)
160
+
161
+
162
+ ### Bug Fixes
163
+
164
+ * **framework:** correct scoping issues ([#4573](https://github.com/SAP/ui5-webcomponents/issues/4573)) ([4e430d3](https://github.com/SAP/ui5-webcomponents/commit/4e430d3))
165
+ * **framework:** prevent runtime error on malformed custom theme object ([#4375](https://github.com/SAP/ui5-webcomponents/issues/4375)) ([3215c7d](https://github.com/SAP/ui5-webcomponents/commit/3215c7d))
166
+
167
+
168
+ ### Features
169
+
170
+ * **framework:** implement F6 Navigation Helper ([#4490](https://github.com/SAP/ui5-webcomponents/issues/4490)) ([60d0dc1](https://github.com/SAP/ui5-webcomponents/commit/60d0dc1))
171
+ * **framework:** add support for `stable-dom-ref` for abstract items ([#4604](https://github.com/SAP/ui5-webcomponents/issues/4604)) ([5526dea](https://github.com/SAP/ui5-webcomponents/commit/5526dea))
172
+ * **framework:** introduce runtime and version info ([#4491](https://github.com/SAP/ui5-webcomponents/issues/4491)) ([757577f](https://github.com/SAP/ui5-webcomponents/commit/757577f))
173
+
174
+
175
+
176
+
177
+
178
+ ## [1.0.2](https://github.com/SAP/ui5-webcomponents/compare/v1.0.1...v1.0.2) (2021-11-29)
179
+
180
+
181
+ ### Bug Fixes
182
+
183
+ * prevent runtime error on malformed custom theme object ([#4375](https://github.com/SAP/ui5-webcomponents/issues/4375)) ([dd10d7c](https://github.com/SAP/ui5-webcomponents/commit/dd10d7c))
184
+
185
+
186
+
187
+
188
+
189
+ ## [1.0.1](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0...v1.0.1) (2021-11-10)
190
+
191
+ **Note:** Version bump only for package @ui5/webcomponents-base
192
+
193
+
194
+
195
+
196
+
197
+ # [1.0.0](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.16...v1.0.0) (2021-11-10)
198
+
199
+
200
+ **Note:** Version bump only for package @ui5/webcomponents-base
201
+
202
+
203
+
204
+
205
+
206
+ # [1.0.0-rc.16](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.15...v1.0.0-rc.16) (2021-11-09)
207
+
208
+
209
+ ### Bug Fixes
210
+
211
+ * **framework:** apply RTL for components with popovers ([#3657](https://github.com/SAP/ui5-webcomponents/issues/3657)) ([28e868b](https://github.com/SAP/ui5-webcomponents/commit/28e868b))
212
+ * **framework:** Multiple properties have no attribute ([#3725](https://github.com/SAP/ui5-webcomponents/issues/3725)) ([2548935](https://github.com/SAP/ui5-webcomponents/commit/2548935))
213
+ * **framework:** removing the base theme works with adopted stylesheets ([#4158](https://github.com/SAP/ui5-webcomponents/issues/4158)) ([aa1f594](https://github.com/SAP/ui5-webcomponents/commit/aa1f594))
214
+ * **framework:** detach events correctly to prevent memory leaks ([#3941](https://github.com/SAP/ui5-webcomponents/issues/3941)) ([6c877ee](https://github.com/SAP/ui5-webcomponents/commit/6c877ee))
215
+
216
+
217
+ ### Features
218
+
219
+ * **framework:** add SAP-icons5.0 ([#4244](https://github.com/SAP/ui5-webcomponents/issues/4244)) ([c0a226e](https://github.com/SAP/ui5-webcomponents/commit/c0a226e))
220
+ * rework stableDomRef concept ([#4210](https://github.com/SAP/ui5-webcomponents/issues/4210)) ([d1ebea3](https://github.com/SAP/ui5-webcomponents/commit/d1ebea3))
221
+ * **framework:** allow using a custom i18n library ([#4119](https://github.com/SAP/ui5-webcomponents/issues/4119)) ([56f366f](https://github.com/SAP/ui5-webcomponents/commit/56f366f))
222
+ * **framework:** Implement better custom theme support ([#4121](https://github.com/SAP/ui5-webcomponents/issues/4121)) ([31e30f8](https://github.com/SAP/ui5-webcomponents/commit/31e30f8))
223
+ * **framework:** handle Page UP/DOWN ([#3727](https://github.com/SAP/ui5-webcomponents/issues/3727)) ([91a974f](https://github.com/SAP/ui5-webcomponents/commit/91a974f))
224
+ * **framework:** introduce sap_horizon theme initial draft ([#3991](https://github.com/SAP/ui5-webcomponents/issues/3991)) ([b1afaf0](https://github.com/SAP/ui5-webcomponents/commit/b1afaf0)), closes [#3988](https://github.com/SAP/ui5-webcomponents/issues/3988)
225
+ * **framework:** load "72Black" font face ([#4139](https://github.com/SAP/ui5-webcomponents/issues/4139)) ([2be7869](https://github.com/SAP/ui5-webcomponents/commit/2be7869))
226
+
227
+
228
+
229
+
230
+
6
231
  # [1.0.0-rc.15](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.14...v1.0.0-rc.15) (2021-07-23)
7
232
 
8
233
 
package/README.md CHANGED
@@ -1,25 +1,71 @@
1
- ![UI5 icon](https://raw.githubusercontent.com/SAP/ui5-webcomponents/master/docs/images/UI5_logo_wide.png)
1
+ ![UI5 icon](https://raw.githubusercontent.com/SAP/ui5-webcomponents/main/docs/images/UI5_logo_wide.png)
2
2
 
3
3
  # UI5 Web Components - Base
4
4
 
5
- [![Travis CI Build Status](https://travis-ci.org/SAP/ui5-webcomponents.svg?branch=master)](https://travis-ci.org/SAP/ui5-webcomponents)
6
5
  [![npm Package Version](https://badge.fury.io/js/%40ui5%2Fwebcomponents.svg)](https://www.npmjs.com/package/@ui5/webcomponents)
7
6
 
8
7
  Contains the base files for all Web Components, most notably `@ui5/webcomponents-base/dist/UI5Element.js`.
9
8
 
10
- For a complete list of all app development related public module imports from the `base` package, click [here](../../docs/Public%20Module%20Imports.md#base):
9
+ ## Provided APIs for applications
10
+
11
+ | Affects | Import | Description |
12
+ |--------------|---------------------------------------------------------- |-----------------------------------------------------------------------------------------------------|
13
+ Configuration | `@ui5/webcomponents-base/dist/config/Theme.js` | Sets Theme Configuration |
14
+ Configuration | `@ui5/webcomponents-base/dist/config/Language.js` | Sets Language Configuration |
15
+ Configuration | `@ui5/webcomponents-base/dist/config/AnimationMode.js` | Sets Animation Mode Configuration |
16
+ Configuration | `@ui5/webcomponents-base/dist/config/NoConflict.js` | Sets "NoConflict" Mode Configuration - if enabled all custom events are fired with the `ui5-` prefix|
17
+ Framework | `@ui5/webcomponents-base/dist/features/OpenUI5Support.js` | Adds integration with the OpenUI5 framework for resources re-use |
18
+ Components | `@ui5/webcomponents-base/dist/features/F6Navigation.js` | Adds support for F6 fast group navigation |
19
+ Components | `import applyDirection from "@ui5/webcomponents-base/dist/locale/applyDirection.js"`| Applies direction ("ltr"/"rtl") - re-renders all RTL-aware components |
20
+ Components | `import { setCustomElementsScopingSuffix } from "@ui5/webcomponents-base/dist/CustomElementsScope.js"`| Adds suffix to the tag names of all components |
21
+ Components | `@ui5/webcomponents-base/dist/util/InvisibleMessage.js` | Provides a way to expose dynamic content changes that can be announced by screen readers |
22
+ CSP compliance| `import { setPackageCSSRoot } from "@ui5/webcomponents-base/dist/CSP.js"`| Sets directory path where the CSS resources for given package will be served from |
23
+ CSP compliance| `import { setUseLinks } from "@ui5/webcomponents-base/dist/CSP.js"` | Enables or disables the usage of `<link>` tags instead of `<style>` tags |
24
+ CSP compliance| `import { setPreloadLinks } from "@ui5/webcomponents-base/dist/CSP.js"` | Enables or disables the preloading of `<link>` tags |
25
+
26
+ ### `applyDirection.js`
27
+ - `applyDirection`
28
+
29
+ ### `Boot.js`
30
+
31
+ - `attachBoot`
32
+
33
+ ### `CustomElementsScope.js`
34
+
35
+ - `setCustomElementsScopingSuffix`
36
+ - `getCustomElementsScopingSuffix`
37
+ - `setCustomElementsScopingRules`
38
+ - `getCustomElementsScopingRules`
39
+
40
+ ### `CSP.js`
41
+ - `setPackageCSSRoot`
42
+ - `setUseLinks`
43
+ - `setPreloadLinks`
44
+
45
+ ### `i18nBundle.js`
46
+
47
+ - `registerI18nLoader`
48
+ - `getI18nBundle`
49
+
50
+ ### `PropertiesFileFormat.js`
51
+
52
+ - `parseProperties`
53
+
54
+ ### `Render.js`
55
+
56
+ - `renderFinished`
11
57
 
12
58
  ## Resources
13
- - [UI5 Web Components - README.md](https://github.com/SAP/ui5-webcomponents/blob/master/README.md)
59
+ - [UI5 Web Components - README.md](https://github.com/SAP/ui5-webcomponents/blob/main/README.md)
14
60
  - [UI5 Web Components - Home Page](https://sap.github.io/ui5-webcomponents)
15
61
  - [UI5 Web Components - Playground and API Reference](https://sap.github.io/ui5-webcomponents/playground/)
16
62
 
17
63
  ## Support
18
- We welcome all comments, suggestions, questions, and bug reports. Please follow our [Support Guidelines](https://github.com/SAP/ui5-webcomponents/blob/master/SUPPORT.md#-content) on how to report an issue, or chat with us in the `#webcomponents` channel of the [OpenUI5 Community Slack](https://join-ui5-slack.herokuapp.com/).
64
+ We welcome all comments, suggestions, questions, and bug reports. Please follow our [Support Guidelines](https://github.com/SAP/ui5-webcomponents/blob/main/SUPPORT.md#-content) on how to report an issue, or chat with us in the `#webcomponents` channel of the [OpenUI5 Community Slack](https://join-ui5-slack.herokuapp.com/).
19
65
 
20
66
  ## Contribute
21
- Please check our [Contribution Guidelines](https://github.com/SAP/ui5-webcomponents/blob/master/CONTRIBUTING.md).
67
+ Please check our [Contribution Guidelines](https://github.com/SAP/ui5-webcomponents/blob/main/docs/6-contributing/02-conventions-and-guidelines.md).
22
68
 
23
69
  ## License
24
70
  Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
25
- This file is licensed under the Apache Software License, Version 2.0 except as noted otherwise in the [LICENSE](https://github.com/SAP/ui5-webcomponents/blob/master/LICENSE.txt) file.
71
+ This file is licensed under the Apache Software License, Version 2.0 except as noted otherwise in the [LICENSE](https://github.com/SAP/ui5-webcomponents/blob/main/LICENSE.txt) file.
package/bundle.esm.js CHANGED
@@ -1,29 +1,28 @@
1
1
  import { registerThemePropertiesLoader } from "./dist/AssetRegistry.js";
2
+ import EventProvider from "./dist/EventProvider.js";
2
3
 
3
4
  // ESM bundle targets browsers with native support
4
5
  import "./dist/features/OpenUI5Support.js";
5
6
 
6
7
  // Test components
7
- import "./dist/test-resources/elements/Generic.js";
8
- import "./dist/test-resources/elements/NoShadowDOM.js";
9
- import "./dist/test-resources/elements/Parent.js";
10
- import "./dist/test-resources/elements/Child.js";
11
- import "./dist/test-resources/elements/WithStaticArea.js";
12
- import "./dist/test-resources/elements/GenericExt.js";
8
+ import "./test/elements/Generic.js";
9
+ import "./test/elements/NoShadowDOM.js";
10
+ import "./test/elements/Parent.js";
11
+ import "./test/elements/Child.js";
12
+ import "./test/elements/WithStaticArea.js";
13
+ import "./test/elements/GenericExt.js";
13
14
 
14
15
  // Test themes - CSS Vars for the sap_fiori_3, sap_fiori_3_dark, sap_belize and sap_belize_hcb themes
15
- import "./dist/test-resources/assets/Themes.js";
16
+ import "./test/assets/Themes.js";
16
17
 
17
18
  // used in test pages
18
19
  import { renderFinished } from "./dist/Render.js";
19
- import { isIE } from "./dist/Device.js";
20
- window.isIE = isIE; // attached to the window object for testing purposes
21
20
 
22
21
  // used for tests - to register a custom theme
23
22
  window.registerThemePropertiesLoader = registerThemePropertiesLoader;
24
23
 
25
24
  // i18n
26
- import { registerI18nLoader, fetchI18nBundle, getI18nBundle } from "./dist/i18nBundle.js";
25
+ import { registerI18nLoader, getI18nBundle } from "./dist/i18nBundle.js";
27
26
 
28
27
  // Note: keep in sync with rollup.config value for IIFE
29
28
  import { getAnimationMode } from "./dist/config/AnimationMode.js";
@@ -34,6 +33,8 @@ import { getNoConflict, setNoConflict } from "./dist/config/NoConflict.js";
34
33
  import { getRTL } from "./dist/config/RTL.js";
35
34
  import { getFirstDayOfWeek } from "./dist/config/FormatSettings.js";
36
35
  import { _getRegisteredNames as getIconNames } from "./dist/asset-registries/Icons.js"
36
+ import applyDirection from "./dist/locale/applyDirection.js";
37
+
37
38
  window["sap-ui-webcomponents-bundle"] = {
38
39
  configuration : {
39
40
  getAnimationMode,
@@ -48,7 +49,8 @@ window["sap-ui-webcomponents-bundle"] = {
48
49
  },
49
50
  getIconNames,
50
51
  registerI18nLoader,
51
- fetchI18nBundle,
52
52
  getI18nBundle,
53
53
  renderFinished,
54
+ applyDirection,
55
+ EventProvider,
54
56
  };
package/dist/Boot.js CHANGED
@@ -1,40 +1,56 @@
1
- import EventProvider from "./EventProvider.js";
2
1
  import whenDOMReady from "./util/whenDOMReady.js";
3
2
  import insertFontFace from "./FontFace.js";
4
3
  import insertSystemCSSVars from "./SystemCSSVars.js";
5
4
  import { getTheme } from "./config/Theme.js";
6
5
  import applyTheme from "./theming/applyTheme.js";
6
+ import { registerCurrentRuntime } from "./Runtimes.js";
7
7
  import { getFeature } from "./FeaturesRegistry.js";
8
8
 
9
- let booted = false;
10
- const eventProvider = new EventProvider();
9
+ let bootPromise;
11
10
 
12
11
  /**
13
12
  * Attach a callback that will be executed on boot
14
13
  * @public
15
14
  * @param listener
16
15
  */
17
- const attachBoot = listener => {
18
- eventProvider.attachEvent("boot", listener);
16
+ const attachBoot = async listener => {
17
+ await boot();
18
+ listener();
19
19
  };
20
20
 
21
21
  const boot = async () => {
22
- if (booted) {
23
- return;
22
+ if (bootPromise) {
23
+ return bootPromise;
24
24
  }
25
25
 
26
- const OpenUI5Support = getFeature("OpenUI5Support");
27
- if (OpenUI5Support) {
28
- await OpenUI5Support.init();
29
- }
26
+ /* eslint-disable no-alert, no-async-promise-executor */
27
+ /*
28
+ Note(since we disable eslint rule):
29
+ If an async executor function throws an error, the error will be lost and won't cause the newly-constructed Promise to reject.
30
+ This could make it difficult to debug and handle some errors.
31
+ */
32
+ bootPromise = new Promise(async resolve => {
33
+ registerCurrentRuntime();
34
+
35
+ const OpenUI5Support = getFeature("OpenUI5Support");
36
+ const F6Navigation = getFeature("F6Navigation");
37
+ if (OpenUI5Support) {
38
+ await OpenUI5Support.init();
39
+ } else if (F6Navigation) {
40
+ F6Navigation.init();
41
+ }
42
+
43
+ await whenDOMReady();
44
+ await applyTheme(getTheme());
45
+ OpenUI5Support && OpenUI5Support.attachListeners();
46
+ insertFontFace();
47
+ insertSystemCSSVars();
48
+
49
+ resolve();
50
+ });
51
+ /* eslint-enable no-alert, no-async-promise-executor */
30
52
 
31
- await whenDOMReady();
32
- await applyTheme(getTheme());
33
- OpenUI5Support && OpenUI5Support.attachListeners();
34
- insertFontFace();
35
- insertSystemCSSVars();
36
- await eventProvider.fireEventAsync("boot");
37
- booted = true;
53
+ return bootPromise;
38
54
  };
39
55
 
40
56
  export {
package/dist/CSP.js ADDED
@@ -0,0 +1,59 @@
1
+ const roots = new Map();
2
+ let useLinks = false;
3
+ let preloadLinks = true;
4
+
5
+ /**
6
+ * Use this function to provide the path to the directory where the css resources for the given package will be served from
7
+ *
8
+ * @public
9
+ * @param packageName name of the package that is being configured
10
+ * @param root path, accessible by the server that will serve the css resources
11
+ */
12
+ const setPackageCSSRoot = (packageName, root) => {
13
+ roots.set(packageName, root);
14
+ };
15
+
16
+ const getUrl = (packageName, path) => {
17
+ return `${roots.get(packageName)}${path}`;
18
+ };
19
+
20
+ /**
21
+ * Call this function to enable or disable the usage of <link> tags instead of <style> tags to achieve CSP compliance
22
+ * Example: "setUseLinks(true)" will unconditionally use <link> tags for all browsers;
23
+ * Example: "setUseLinks(!document.adoptedStyleSheets) will only enable the usage of <link> tags for browsers that do not support constructable stylesheets.
24
+ *
25
+ * @public
26
+ * @param use whether links will be used
27
+ */
28
+ const setUseLinks = use => {
29
+ useLinks = use;
30
+ };
31
+
32
+ /**
33
+ * Call this function to enable or disable the preloading of <link> tags.
34
+ * Note: only taken into account when <link> tags are being used.
35
+ * Note: links are being preloaded by default, so call "setPreloadLinks(false)" to opt out of this.
36
+ *
37
+ * @public
38
+ * @param preload
39
+ */
40
+ const setPreloadLinks = preload => {
41
+ preloadLinks = preload;
42
+ };
43
+
44
+ const shouldUseLinks = () => {
45
+ return useLinks;
46
+ };
47
+
48
+ const shouldPreloadLinks = () => {
49
+ return preloadLinks;
50
+ };
51
+
52
+ export {
53
+ setPackageCSSRoot,
54
+ getUrl,
55
+ setUseLinks,
56
+ setPreloadLinks,
57
+ shouldUseLinks,
58
+ shouldPreloadLinks,
59
+ };
@@ -1,11 +1,18 @@
1
1
  import setToArray from "./util/setToArray.js";
2
+ import getSharedResource from "./getSharedResource.js";
3
+ import { getCurrentRuntimeIndex, compareRuntimes, getAllRuntimes } from "./Runtimes.js";
4
+
5
+ const Tags = getSharedResource("Tags", new Map());
2
6
 
3
7
  const Definitions = new Set();
4
- const Failures = new Set();
8
+ let Failures = {};
5
9
  let failureTimeout;
6
10
 
11
+ const UNKNOWN_RUNTIME = "unknown";
12
+
7
13
  const registerTag = tag => {
8
14
  Definitions.add(tag);
15
+ Tags.set(tag, getCurrentRuntimeIndex());
9
16
  };
10
17
 
11
18
  const isTagRegistered = tag => {
@@ -17,18 +24,67 @@ const getAllRegisteredTags = () => {
17
24
  };
18
25
 
19
26
  const recordTagRegistrationFailure = tag => {
20
- Failures.add(tag);
27
+ let tagRegRuntimeIndex = Tags.get(tag);
28
+ if (tagRegRuntimeIndex === undefined) {
29
+ tagRegRuntimeIndex = UNKNOWN_RUNTIME; // If the tag is taken, but not registered in Tags, then a version before 1.1.0 defined it => use the "unknown" key
30
+ }
31
+ Failures[tagRegRuntimeIndex] = Failures[tagRegRuntimeIndex] || new Set();
32
+ Failures[tagRegRuntimeIndex].add(tag);
33
+
21
34
  if (!failureTimeout) {
22
35
  failureTimeout = setTimeout(() => {
23
36
  displayFailedRegistrations();
37
+ Failures = {};
24
38
  failureTimeout = undefined;
25
39
  }, 1000);
26
40
  }
27
41
  };
28
42
 
29
43
  const displayFailedRegistrations = () => {
30
- console.warn(`The following tags have already been defined by a different UI5 Web Components version: ${setToArray(Failures).join(", ")}`); // eslint-disable-line
31
- Failures.clear();
44
+ const allRuntimes = getAllRuntimes();
45
+ const currentRuntimeIndex = getCurrentRuntimeIndex();
46
+ const currentRuntime = allRuntimes[currentRuntimeIndex];
47
+
48
+ let message = `Multiple UI5 Web Components instances detected.`;
49
+
50
+ if (allRuntimes.length > 1) {
51
+ message = `${message}\nLoading order (versions before 1.1.0 not listed): ${allRuntimes.map(runtime => `\n${runtime.description}`).join("")}`;
52
+ }
53
+
54
+ Object.keys(Failures).forEach(otherRuntimeIndex => {
55
+ let comparison;
56
+ let otherRuntime;
57
+
58
+ if (otherRuntimeIndex === UNKNOWN_RUNTIME) { // version < 1.1.0 defined the tag
59
+ comparison = 1; // the current runtime is considered newer
60
+ otherRuntime = {
61
+ description: `Older unknown runtime`,
62
+ };
63
+ } else {
64
+ comparison = compareRuntimes(currentRuntimeIndex, otherRuntimeIndex);
65
+ otherRuntime = allRuntimes[otherRuntimeIndex];
66
+ }
67
+
68
+ let compareWord;
69
+ if (comparison > 0) {
70
+ compareWord = "an older";
71
+ } else if (comparison < 0) {
72
+ compareWord = "a newer";
73
+ } else {
74
+ compareWord = "the same";
75
+ }
76
+ message = `${message}\n\n"${currentRuntime.description}" failed to define ${Failures[otherRuntimeIndex].size} tag(s) as they were defined by a runtime of ${compareWord} version "${otherRuntime.description}": ${setToArray(Failures[otherRuntimeIndex]).sort().join(", ")}.`;
77
+
78
+ if (comparison > 0) {
79
+ message = `${message}\nWARNING! If your code uses features of the above web components, unavailable in ${otherRuntime.description}, it might not work as expected!`;
80
+ } else {
81
+ message = `${message}\nSince the above web components were defined by the same or newer version runtime, they should be compatible with your code.`;
82
+ }
83
+ });
84
+
85
+ message = `${message}\n\nTo prevent other runtimes from defining tags that you use, consider using scoping or have third-party libraries use scoping: https://github.com/SAP/ui5-webcomponents/blob/main/docs/2-advanced/03-scoping.md.`;
86
+
87
+ console.warn(message); // eslint-disable-line
32
88
  };
33
89
 
34
90
  export {