@ui5/webcomponents-base 0.0.0-d010d8832 → 0.0.0-d1315d658

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 (78) hide show
  1. package/CHANGELOG.md +170 -0
  2. package/README.md +4 -0
  3. package/bundle.esm.js +4 -1
  4. package/dist/Boot.js +1 -1
  5. package/dist/Boot.js.map +1 -1
  6. package/dist/EventProvider.js +1 -1
  7. package/dist/EventProvider.js.map +1 -1
  8. package/dist/FontFace.js +1 -1
  9. package/dist/FontFace.js.map +1 -1
  10. package/dist/IgnoreCustomElements.d.ts +27 -0
  11. package/dist/IgnoreCustomElements.js +39 -0
  12. package/dist/IgnoreCustomElements.js.map +1 -0
  13. package/dist/InitialConfiguration.js +1 -1
  14. package/dist/InitialConfiguration.js.map +1 -1
  15. package/dist/Keys.d.ts +5 -1
  16. package/dist/Keys.js +6 -2
  17. package/dist/Keys.js.map +1 -1
  18. package/dist/ManagedStyles.js +9 -2
  19. package/dist/ManagedStyles.js.map +1 -1
  20. package/dist/StaticAreaItem.d.ts +1 -0
  21. package/dist/StaticAreaItem.js +10 -4
  22. package/dist/StaticAreaItem.js.map +1 -1
  23. package/dist/UI5Element.d.ts +2 -0
  24. package/dist/UI5Element.js +17 -4
  25. package/dist/UI5Element.js.map +1 -1
  26. package/dist/asset-registries/LocaleData.js.map +1 -1
  27. package/dist/assets/Boot.f668b2d0.js +9 -0
  28. package/dist/assets/bundle.esm.88a9eda7.js +50 -0
  29. package/dist/config/AnimationMode.d.ts +2 -2
  30. package/dist/config/AnimationMode.js +1 -1
  31. package/dist/config/AnimationMode.js.map +1 -1
  32. package/dist/config/ThemeRoot.d.ts +29 -0
  33. package/dist/config/ThemeRoot.js +59 -0
  34. package/dist/config/ThemeRoot.js.map +1 -0
  35. package/dist/css/FontFace.css +34 -16
  36. package/dist/delegate/ItemNavigation.js +1 -1
  37. package/dist/delegate/ItemNavigation.js.map +1 -1
  38. package/dist/features/OpenUI5Support.d.ts +13 -3
  39. package/dist/features/OpenUI5Support.js +88 -33
  40. package/dist/features/OpenUI5Support.js.map +1 -1
  41. package/dist/generated/VersionInfo.js +3 -3
  42. package/dist/generated/css/FontFace.css.js +1 -1
  43. package/dist/generated/css/FontFace.css.js.map +1 -1
  44. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.d.ts +4 -0
  45. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js +8 -10
  46. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js.map +1 -0
  47. package/dist/getSharedResource.js +7 -1
  48. package/dist/getSharedResource.js.map +1 -1
  49. package/dist/i18nBundle.d.ts +1 -1
  50. package/dist/i18nBundle.js +2 -1
  51. package/dist/i18nBundle.js.map +1 -1
  52. package/dist/locale/RTLAwareRegistry.d.ts +1 -1
  53. package/dist/locale/RTLAwareRegistry.js.map +1 -1
  54. package/dist/renderer/executeTemplate.js +1 -1
  55. package/dist/renderer/executeTemplate.js.map +1 -1
  56. package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +111 -96
  57. package/dist/theming/applyTheme.js +5 -3
  58. package/dist/theming/applyTheme.js.map +1 -1
  59. package/dist/types.d.ts +1 -1
  60. package/dist/types.js.map +1 -1
  61. package/dist/updateShadowRoot.js +7 -4
  62. package/dist/updateShadowRoot.js.map +1 -1
  63. package/dist/util/InvisibleMessage.d.ts +1 -1
  64. package/dist/util/InvisibleMessage.js.map +1 -1
  65. package/dist/util/PopupUtils.js +1 -1
  66. package/dist/util/PopupUtils.js.map +1 -1
  67. package/dist/util/getClassCopy.d.ts +2 -0
  68. package/dist/util/getSingletonElementInstance.d.ts +10 -1
  69. package/dist/util/getSingletonElementInstance.js +11 -2
  70. package/dist/util/getSingletonElementInstance.js.map +1 -1
  71. package/package-scripts.cjs +1 -1
  72. package/package.json +4 -4
  73. package/src/css/FontFace.css +34 -16
  74. package/dist/assets/Boot.fc041a90.js +0 -9
  75. package/dist/assets/bundle.esm.1f755700.js +0 -50
  76. package/dist/config/ThemeRoots.d.ts +0 -4
  77. package/dist/config/ThemeRoots.js +0 -28
  78. package/dist/config/ThemeRoots.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,176 @@
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.16.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.2...v1.16.0-rc.3) (2023-07-27)
7
+
8
+ **Note:** Version bump only for package @ui5/webcomponents-base
9
+
10
+
11
+
12
+
13
+
14
+ # [1.16.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.1...v1.16.0-rc.2) (2023-07-20)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **framework:** fix I18Bundle#getText params TypeScript types ([#7310](https://github.com/SAP/ui5-webcomponents/issues/7310)) ([2f88dc8](https://github.com/SAP/ui5-webcomponents/commit/2f88dc814dd393748a7482c7f6566d244368c970)), closes [#7300](https://github.com/SAP/ui5-webcomponents/issues/7300)
20
+ * **ui5:** change "focus-visible" pseudo selector to "focus" ([#7338](https://github.com/SAP/ui5-webcomponents/issues/7338)) ([37505c3](https://github.com/SAP/ui5-webcomponents/commit/37505c3f4e5dfe1c23fba7b5ee675312752f7ef5))
21
+
22
+
23
+
24
+
25
+
26
+ # [1.16.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.0...v1.16.0-rc.1) (2023-07-13)
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * **framework:** missing 72-Semibold font ([#7298](https://github.com/SAP/ui5-webcomponents/issues/7298)) ([9547d1c](https://github.com/SAP/ui5-webcomponents/commit/9547d1cf75edce8739c3dc54a1f64b2f44d7c18c))
32
+
33
+
34
+
35
+
36
+
37
+ # [1.16.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.15.1...v1.16.0-rc.0) (2023-07-06)
38
+
39
+ **Note:** Version bump only for package @ui5/webcomponents-base
40
+
41
+
42
+
43
+
44
+
45
+ # [1.15.0](https://github.com/SAP/ui5-webcomponents/compare/v1.15.0-rc.2...v1.15.0) (2023-06-30)
46
+
47
+
48
+ ### Bug Fixes
49
+
50
+ * **framework:** fix OpenUI5Support feature usage ([#7265](https://github.com/SAP/ui5-webcomponents/issues/7265)) ([109b6ee](https://github.com/SAP/ui5-webcomponents/commit/109b6eecb3b56f07c085ed59442c2a73f31644a8)), closes [#7175](https://github.com/SAP/ui5-webcomponents/issues/7175)
51
+
52
+
53
+
54
+
55
+
56
+ # [1.15.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.15.0-rc.1...v1.15.0-rc.2) (2023-06-22)
57
+
58
+
59
+ ### Bug Fixes
60
+
61
+ * **framework:** support older OpenUI5 getThemeRoot API ([#7202](https://github.com/SAP/ui5-webcomponents/issues/7202)) ([54e615c](https://github.com/SAP/ui5-webcomponents/commit/54e615cffc047b8e1e72861a5be7d50bfcc2d6bf)), closes [#7199](https://github.com/SAP/ui5-webcomponents/issues/7199)
62
+
63
+
64
+
65
+
66
+
67
+ # [1.15.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.15.0-rc.0...v1.15.0-rc.1) (2023-06-15)
68
+
69
+
70
+ ### Bug Fixes
71
+
72
+ * **framework:** prioritize external fonts over locally installed ([#7184](https://github.com/SAP/ui5-webcomponents/issues/7184)) ([c527c70](https://github.com/SAP/ui5-webcomponents/commit/c527c70e47be84b663b6c40107737c25f91c9034)), closes [/github.com/SAP/openui5/blob/master/src/themelib_sap_horizon/src/sap/ui/core/themes/sap_horizon/shared.less#L259](https://github.com//github.com/SAP/openui5/blob/master/src/themelib_sap_horizon/src/sap/ui/core/themes/sap_horizon/shared.less/issues/L259) [#7177](https://github.com/SAP/ui5-webcomponents/issues/7177)
73
+ * **ui5-static-area-item:** element additional properties ([#7166](https://github.com/SAP/ui5-webcomponents/issues/7166)) ([361ff95](https://github.com/SAP/ui5-webcomponents/commit/361ff9537dd6ed887e61d8fe2927e3eee0c952f8))
74
+
75
+
76
+ ### Features
77
+
78
+ * **ui5-time-picker:** Redesign the Time Picker component according to the new design ([#6818](https://github.com/SAP/ui5-webcomponents/issues/6818)) ([1d910cf](https://github.com/SAP/ui5-webcomponents/commit/1d910cf47290fcd9986b0b9ced45c9c06e29d657))
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+ # [1.15.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0...v1.15.0-rc.0) (2023-06-08)
90
+
91
+ **Note:** Version bump only for package @ui5/webcomponents-base
92
+
93
+
94
+
95
+
96
+
97
+ # [1.14.0](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0-rc.2...v1.14.0) (2023-06-01)
98
+
99
+ **Note:** Version bump only for package @ui5/webcomponents-base
100
+
101
+
102
+
103
+
104
+
105
+ # [1.14.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0-rc.1...v1.14.0-rc.2) (2023-06-01)
106
+
107
+ **Note:** Version bump only for package @ui5/webcomponents-base
108
+
109
+
110
+
111
+
112
+
113
+ # [1.14.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0-rc.0...v1.14.0-rc.1) (2023-05-25)
114
+
115
+
116
+ ### Bug Fixes
117
+
118
+ * **framework:** store shared resources as `meta` tag within the `head` ([#7051](https://github.com/SAP/ui5-webcomponents/issues/7051)) ([90722da](https://github.com/SAP/ui5-webcomponents/commit/90722da24600e28f31864e9f2006d18e97c1e596))
119
+
120
+
121
+ ### Features
122
+
123
+ * **framework:** add `setThemeRoot` public API ([#6970](https://github.com/SAP/ui5-webcomponents/issues/6970)) ([a0ad904](https://github.com/SAP/ui5-webcomponents/commit/a0ad904ea21578ada97dc0c990ec04dbb5072990))
124
+
125
+
126
+
127
+
128
+
129
+ # [1.14.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.13.2...v1.14.0-rc.0) (2023-05-18)
130
+
131
+
132
+ ### Features
133
+
134
+ * **framework:** add `ignoreCustomElements` public API ([#7027](https://github.com/SAP/ui5-webcomponents/issues/7027)) ([776f905](https://github.com/SAP/ui5-webcomponents/commit/776f9058de5b4e37489dd3ef388863edc2627eb3))
135
+ * **framework:** use `template literal notation` for enum types ([#6856](https://github.com/SAP/ui5-webcomponents/issues/6856)) ([0de21e8](https://github.com/SAP/ui5-webcomponents/commit/0de21e8ba37c6a75fd3d2a29a16cc82661619cb1)), closes [#6636](https://github.com/SAP/ui5-webcomponents/issues/6636)
136
+
137
+
138
+
139
+
140
+
141
+ ## [1.13.2](https://github.com/SAP/ui5-webcomponents/compare/v1.13.1...v1.13.2) (2023-05-15)
142
+
143
+ **Note:** Version bump only for package @ui5/webcomponents-base
144
+
145
+
146
+
147
+
148
+
149
+ ## [1.13.1](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.5...v1.13.1) (2023-05-11)
150
+
151
+ **Note:** Version bump only for package @ui5/webcomponents-base
152
+
153
+
154
+
155
+
156
+
157
+ # [1.13.0-rc.5](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.4...v1.13.0-rc.5) (2023-05-11)
158
+
159
+ **Note:** Version bump only for package @ui5/webcomponents-base
160
+
161
+
162
+
163
+
164
+
165
+ # [1.13.0-rc.4](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.3...v1.13.0-rc.4) (2023-05-04)
166
+
167
+
168
+ ### Features
169
+
170
+ * generate TS from HBS templates ([#6558](https://github.com/SAP/ui5-webcomponents/issues/6558)) ([02611b2](https://github.com/SAP/ui5-webcomponents/commit/02611b2e24b2c2a06129b8e60a8bc680d9501e39))
171
+
172
+
173
+
174
+
175
+
6
176
  # [1.13.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.2...v1.13.0-rc.3) (2023-04-27)
7
177
 
8
178
 
package/README.md CHANGED
@@ -37,6 +37,10 @@ Contains the base files for all Web Components, most notably `@ui5/webcomponents
37
37
  - `setCustomElementsScopingRules`
38
38
  - `getCustomElementsScopingRules`
39
39
 
40
+ ### `IgnoreCustomElements.js`
41
+
42
+ - `ignoreCustomElements`
43
+
40
44
  ### `CSP.js`
41
45
  - `setPackageCSSRoot`
42
46
  - `setUseLinks`
package/bundle.esm.js CHANGED
@@ -31,12 +31,13 @@ import { getAnimationMode } from "./dist/config/AnimationMode.js";
31
31
  import { getLanguage, setLanguage } from "./dist/config/Language.js";
32
32
  import { getCalendarType } from "./dist/config/CalendarType.js";
33
33
  import { getTheme, setTheme } from "./dist/config/Theme.js";
34
- import { getThemeRoot } from "./dist/config/ThemeRoots";
34
+ import { getThemeRoot, setThemeRoot } from "./dist/config/ThemeRoot.js";
35
35
  import { getNoConflict, setNoConflict } from "./dist/config/NoConflict.js";
36
36
  import { getRTL } from "./dist/config/RTL.js";
37
37
  import { getFirstDayOfWeek, getLegacyDateCalendarCustomizing } from "./dist/config/FormatSettings.js";
38
38
  import { _getRegisteredNames as getIconNames } from "./dist/asset-registries/Icons.js"
39
39
  import applyDirection from "./dist/locale/applyDirection.js";
40
+ import { getCurrentRuntimeIndex } from "./dist/Runtimes.js";
40
41
  import LegacyDateFormats from "./dist/features/LegacyDateFormats.js";
41
42
 
42
43
  window["sap-ui-webcomponents-bundle"] = {
@@ -46,6 +47,7 @@ window["sap-ui-webcomponents-bundle"] = {
46
47
  setLanguage,
47
48
  getTheme,
48
49
  getThemeRoot,
50
+ setThemeRoot,
49
51
  setTheme,
50
52
  getNoConflict,
51
53
  setNoConflict,
@@ -54,6 +56,7 @@ window["sap-ui-webcomponents-bundle"] = {
54
56
  getFirstDayOfWeek,
55
57
  getLegacyDateCalendarCustomizing,
56
58
  },
59
+ getCurrentRuntimeIndex,
57
60
  getIconNames,
58
61
  parseProperties,
59
62
  registerI18nLoader,
package/dist/Boot.js CHANGED
@@ -35,7 +35,7 @@ const boot = async () => {
35
35
  attachThemeRegistered(onThemeRegistered);
36
36
  registerCurrentRuntime();
37
37
  const openUI5Support = getFeature("OpenUI5Support");
38
- const isOpenUI5Loaded = openUI5Support ? openUI5Support.isLoaded() : false;
38
+ const isOpenUI5Loaded = openUI5Support ? openUI5Support.isOpenUI5Detected() : false;
39
39
  const f6Navigation = getFeature("F6Navigation");
40
40
  if (openUI5Support) {
41
41
  await openUI5Support.init();
package/dist/Boot.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Boot.js","sourceRoot":"","sources":["../src/Boot.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,cAAc,MAAM,eAAe,CAAC;AAC3C,OAAO,mBAAmB,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAInD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,IAAI,MAAM,GAAG,KAAK,CAAC;AACnB,IAAI,WAA0B,CAAC;AAC/B,MAAM,aAAa,GAAG,IAAI,aAAa,EAAc,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,UAAU,GAAG,CAAC,QAAoB,EAAE,EAAE;IAC3C,IAAI,CAAC,MAAM,EAAE;QACZ,aAAa,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC5C,OAAO;KACP;IAED,QAAQ,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,KAAK,IAAmB,EAAE;IACtC,IAAI,WAAW,KAAK,SAAS,EAAE;QAC9B,OAAO,WAAW,CAAC;KACnB;IAED,MAAM,YAAY,GAAG,KAAK,EAAE,OAAuB,EAAE,EAAE;QACtD,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;YACpC,OAAO,EAAE,CAAC;YACV,OAAO;SACP;QAED,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;QAEzC,sBAAsB,EAAE,CAAC;QAEzB,MAAM,cAAc,GAAG,UAAU,CAAwB,gBAAgB,CAAC,CAAC;QAC3E,MAAM,eAAe,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;QAC3E,MAAM,YAAY,GAAG,UAAU,CAAsB,cAAc,CAAC,CAAC;QAErE,IAAI,cAAc,EAAE;YACnB,MAAM,cAAc,CAAC,IAAI,EAAE,CAAC;SAC5B;QAED,IAAI,YAAY,IAAI,CAAC,eAAe,EAAE;YACrC,YAAY,CAAC,IAAI,EAAE,CAAC;SACpB;QAED,MAAM,YAAY,EAAE,CAAC;QACrB,MAAM,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC7B,cAAc,IAAI,cAAc,CAAC,eAAe,EAAE,CAAC;QACnD,cAAc,EAAE,CAAC;QACjB,mBAAmB,EAAE,CAAC;QAEtB,OAAO,EAAE,CAAC;QAEV,MAAM,GAAG,IAAI,CAAC;QACd,MAAM,aAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEF,WAAW,GAAG,IAAI,OAAO,CAAC,YAAiD,CAAC,CAAC;IAC7E,OAAO,WAAW,CAAC;AACpB,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,EAAE;IAC3C,MAAM,YAAY,GAAG,QAAQ,EAAE,CAAC;IAChC,IAAI,MAAM,IAAI,KAAK,KAAK,YAAY,EAAE;QACrC,UAAU,CAAC,YAAY,CAAC,CAAC;KACzB;AACF,CAAC,CAAC;AAEF,OAAO,EACN,IAAI,EACJ,UAAU,GACV,CAAC","sourcesContent":["import whenDOMReady from \"./util/whenDOMReady.js\";\nimport EventProvider from \"./EventProvider.js\";\nimport insertFontFace from \"./FontFace.js\";\nimport insertSystemCSSVars from \"./SystemCSSVars.js\";\nimport { getTheme } from \"./config/Theme.js\";\nimport applyTheme from \"./theming/applyTheme.js\";\nimport { registerCurrentRuntime } from \"./Runtimes.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport type F6Navigation from \"./features/F6Navigation.js\";\nimport { PromiseResolve } from \"./types.js\";\nimport { attachThemeRegistered } from \"./theming/ThemeRegistered.js\";\n\nlet booted = false;\nlet bootPromise: Promise<void>;\nconst eventProvider = new EventProvider<void, void>();\n\n/**\n * Attaches a callback that will be executed after boot finishes.\n * <b>Note:</b> If the framework already booted, the callback will be immediately executed.\n * @public\n * @param { Function } listener\n */\nconst attachBoot = (listener: () => void) => {\n\tif (!booted) {\n\t\teventProvider.attachEvent(\"boot\", listener);\n\t\treturn;\n\t}\n\n\tlistener();\n};\n\nconst boot = async (): Promise<void> => {\n\tif (bootPromise !== undefined) {\n\t\treturn bootPromise;\n\t}\n\n\tconst bootExecutor = async (resolve: PromiseResolve) => {\n\t\tif (typeof document === \"undefined\") {\n\t\t\tresolve();\n\t\t\treturn;\n\t\t}\n\n\t\tattachThemeRegistered(onThemeRegistered);\n\n\t\tregisterCurrentRuntime();\n\n\t\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\t\tconst isOpenUI5Loaded = openUI5Support ? openUI5Support.isLoaded() : false;\n\t\tconst f6Navigation = getFeature<typeof F6Navigation>(\"F6Navigation\");\n\n\t\tif (openUI5Support) {\n\t\t\tawait openUI5Support.init();\n\t\t}\n\n\t\tif (f6Navigation && !isOpenUI5Loaded) {\n\t\t\tf6Navigation.init();\n\t\t}\n\n\t\tawait whenDOMReady();\n\t\tawait applyTheme(getTheme());\n\t\topenUI5Support && openUI5Support.attachListeners();\n\t\tinsertFontFace();\n\t\tinsertSystemCSSVars();\n\n\t\tresolve();\n\n\t\tbooted = true;\n\t\tawait eventProvider.fireEventAsync(\"boot\");\n\t};\n\n\tbootPromise = new Promise(bootExecutor as (resolve: PromiseResolve) => void);\n\treturn bootPromise;\n};\n\n/**\n * Callback, executed after theme properties registration\n * to apply the newly registered theme.\n * @private\n * @param { string } theme\n */\nconst onThemeRegistered = (theme: string) => {\n\tconst currentTheme = getTheme();\n\tif (booted && theme === currentTheme) {\n\t\tapplyTheme(currentTheme);\n\t}\n};\n\nexport {\n\tboot,\n\tattachBoot,\n};\n"]}
1
+ {"version":3,"file":"Boot.js","sourceRoot":"","sources":["../src/Boot.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,cAAc,MAAM,eAAe,CAAC;AAC3C,OAAO,mBAAmB,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAInD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,IAAI,MAAM,GAAG,KAAK,CAAC;AACnB,IAAI,WAA0B,CAAC;AAC/B,MAAM,aAAa,GAAG,IAAI,aAAa,EAAc,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,UAAU,GAAG,CAAC,QAAoB,EAAE,EAAE;IAC3C,IAAI,CAAC,MAAM,EAAE;QACZ,aAAa,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC5C,OAAO;KACP;IAED,QAAQ,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,KAAK,IAAmB,EAAE;IACtC,IAAI,WAAW,KAAK,SAAS,EAAE;QAC9B,OAAO,WAAW,CAAC;KACnB;IAED,MAAM,YAAY,GAAG,KAAK,EAAE,OAAuB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util/whenDOMReady.js\";\nimport EventProvider from \"./EventProvider.js\";\nimport insertFontFace from \"./FontFace.js\";\nimport insertSystemCSSVars from \"./SystemCSSVars.js\";\nimport { getTheme } from \"./config/Theme.js\";\nimport applyTheme from \"./theming/applyTheme.js\";\nimport { registerCurrentRuntime } from \"./Runtimes.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport type F6Navigation from \"./features/F6Navigation.js\";\nimport { PromiseResolve } from \"./types.js\";\nimport { attachThemeRegistered } from \"./theming/ThemeRegistered.js\";\n\nlet booted = false;\nlet bootPromise: Promise<void>;\nconst eventProvider = new EventProvider<void, void>();\n\n/**\n * Attaches a callback that will be executed after boot finishes.\n * <b>Note:</b> If the framework already booted, the callback will be immediately executed.\n * @public\n * @param { Function } listener\n */\nconst attachBoot = (listener: () => void) => {\n\tif (!booted) {\n\t\teventProvider.attachEvent(\"boot\", listener);\n\t\treturn;\n\t}\n\n\tlistener();\n};\n\nconst boot = async (): Promise<void> => {\n\tif (bootPromise !== undefined) {\n\t\treturn bootPromise;\n\t}\n\n\tconst bootExecutor = async (resolve: PromiseResolve) => {\n\t\tif (typeof document === \"undefined\") {\n\t\t\tresolve();\n\t\t\treturn;\n\t\t}\n\n\t\tattachThemeRegistered(onThemeRegistered);\n\n\t\tregisterCurrentRuntime();\n\n\t\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\t\tconst isOpenUI5Loaded = openUI5Support ? openUI5Support.isOpenUI5Detected() : false;\n\t\tconst f6Navigation = getFeature<typeof F6Navigation>(\"F6Navigation\");\n\n\t\tif (openUI5Support) {\n\t\t\tawait openUI5Support.init();\n\t\t}\n\n\t\tif (f6Navigation && !isOpenUI5Loaded) {\n\t\t\tf6Navigation.init();\n\t\t}\n\n\t\tawait whenDOMReady();\n\t\tawait applyTheme(getTheme());\n\t\topenUI5Support && openUI5Support.attachListeners();\n\t\tinsertFontFace();\n\t\tinsertSystemCSSVars();\n\n\t\tresolve();\n\n\t\tbooted = true;\n\t\tawait eventProvider.fireEventAsync(\"boot\");\n\t};\n\n\tbootPromise = new Promise(bootExecutor as (resolve: PromiseResolve) => void);\n\treturn bootPromise;\n};\n\n/**\n * Callback, executed after theme properties registration\n * to apply the newly registered theme.\n * @private\n * @param { string } theme\n */\nconst onThemeRegistered = (theme: string) => {\n\tconst currentTheme = getTheme();\n\tif (booted && theme === currentTheme) {\n\t\tapplyTheme(currentTheme);\n\t}\n};\n\nexport {\n\tboot,\n\tattachBoot,\n};\n"]}
@@ -41,7 +41,7 @@ class EventProvider {
41
41
  return [];
42
42
  }
43
43
  return eventListeners.map(fn => {
44
- return fn.call(this, data); // eslint-disable-line
44
+ return fn.call(this, data);
45
45
  });
46
46
  }
47
47
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"EventProvider.js","sourceRoot":"","sources":["../src/EventProvider.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa;IAGlB;QACC,IAAI,CAAC,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;IACjC,CAAC;IAED,WAAW,CAAC,SAAiB,EAAE,UAA8D;QAC5F,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;QAC1C,MAAM,cAAc,GAAG,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAEpD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;YACnC,aAAa,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;YAC3C,OAAO;SACP;QAED,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;YACzC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAChC;IACF,CAAC;IAED,WAAW,CAAC,SAAiB,EAAE,UAA8D;QAC5F,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;QAC1C,MAAM,cAAc,GAAG,aAAa,CAAC,GAAG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SAAiB;QAC7B,OAAO,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;CACD;AAED,eAAe,aAAa,CAAC","sourcesContent":["class EventProvider<EventListenerParam, EventListenerReturn> {\n\t_eventRegistry: Map<string, Array<(param: EventListenerParam) => EventListenerReturn>>;\n\n\tconstructor() {\n\t\tthis._eventRegistry = new Map();\n\t}\n\n\tattachEvent(eventName: string, fnFunction: (param: EventListenerParam) => EventListenerReturn) {\n\t\tconst eventRegistry = this._eventRegistry;\n\t\tconst eventListeners = eventRegistry.get(eventName);\n\n\t\tif (!Array.isArray(eventListeners)) {\n\t\t\teventRegistry.set(eventName, [fnFunction]);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!eventListeners.includes(fnFunction)) {\n\t\t\teventListeners.push(fnFunction);\n\t\t}\n\t}\n\n\tdetachEvent(eventName: string, fnFunction: (param: EventListenerParam) => EventListenerReturn) {\n\t\tconst eventRegistry = this._eventRegistry;\n\t\tconst eventListeners = eventRegistry.get(eventName);\n\n\t\tif (!eventListeners) {\n\t\t\treturn;\n\t\t}\n\t\tconst indexOfFnToDetach = eventListeners.indexOf(fnFunction);\n\n\t\tif (indexOfFnToDetach !== -1) {\n\t\t\teventListeners.splice(indexOfFnToDetach, 1);\n\t\t}\n\n\t\tif (eventListeners.length === 0) {\n\t\t\teventRegistry.delete(eventName);\n\t\t}\n\t}\n\n\t/**\n\t * Fires an event and returns the results of all event listeners as an array.\n\t *\n\t * @param eventName the event to fire\n\t * @param data optional data to pass to each event listener\n\t * @returns {Array} an array with the results of all event listeners\n\t */\n\tfireEvent(eventName: string, data: EventListenerParam) {\n\t\tconst eventRegistry = this._eventRegistry;\n\t\tconst eventListeners = eventRegistry.get(eventName);\n\n\t\tif (!eventListeners) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn eventListeners.map(fn => {\n\t\t\treturn fn.call(this, data); // eslint-disable-line\n\t\t});\n\t}\n\n\t/**\n\t * Fires an event and returns a promise that will resolve once all listeners have resolved.\n\t *\n\t * @param eventName the event to fire\n\t * @param data optional data to pass to each event listener\n\t * @returns {Promise} a promise that will resolve when all listeners have resolved\n\t */\n\tfireEventAsync(eventName: string, data: EventListenerParam) {\n\t\treturn Promise.all(this.fireEvent(eventName, data));\n\t}\n\n\tisHandlerAttached(eventName: string, fnFunction: (param: EventListenerParam) => EventListenerReturn) {\n\t\tconst eventRegistry = this._eventRegistry;\n\t\tconst eventListeners = eventRegistry.get(eventName);\n\n\t\tif (!eventListeners) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn eventListeners.includes(fnFunction);\n\t}\n\n\thasListeners(eventName: string) {\n\t\treturn !!this._eventRegistry.get(eventName);\n\t}\n}\n\nexport default EventProvider;\n"]}
1
+ {"version":3,"file":"EventProvider.js","sourceRoot":"","sources":["../src/EventProvider.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa;IAGlB;QACC,IAAI,CAAC,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;IACjC,CAAC;IAED,WAAW,CAAC,SAAiB,EAAE,UAA8D;QAC5F,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;QAC1C,MAAM,cAAc,GAAG,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAEpD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;YACnC,aAAa,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;YAC3C,OAAO;SACP;QAED,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;YACzC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAChC;IACF,CAAC;IAED,WAAW,CAAC,SAAiB,EAAE,UAA8D;QAC5F,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;QAC1C,MAAM,cAAc,GAAG,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QA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AC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;CACD;AAED,eAAe,aAAa,CAAC","sourcesContent":["class EventProvider<EventListenerParam, EventListenerReturn> {\n\t_eventRegistry: Map<string, Array<(param: EventListenerParam) => EventListenerReturn>>;\n\n\tconstructor() {\n\t\tthis._eventRegistry = new Map();\n\t}\n\n\tattachEvent(eventName: string, fnFunction: (param: EventListenerParam) => EventListenerReturn) {\n\t\tconst eventRegistry = this._eventRegistry;\n\t\tconst eventListeners = eventRegistry.get(eventName);\n\n\t\tif (!Array.isArray(eventListeners)) {\n\t\t\teventRegistry.set(eventName, [fnFunction]);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!eventListeners.includes(fnFunction)) {\n\t\t\teventListeners.push(fnFunction);\n\t\t}\n\t}\n\n\tdetachEvent(eventName: string, fnFunction: (param: EventListenerParam) => EventListenerReturn) {\n\t\tconst eventRegistry = this._eventRegistry;\n\t\tconst eventListeners = eventRegistry.get(eventName);\n\n\t\tif (!eventListeners) {\n\t\t\treturn;\n\t\t}\n\t\tconst indexOfFnToDetach = eventListeners.indexOf(fnFunction);\n\n\t\tif (indexOfFnToDetach !== -1) {\n\t\t\teventListeners.splice(indexOfFnToDetach, 1);\n\t\t}\n\n\t\tif (eventListeners.length === 0) {\n\t\t\teventRegistry.delete(eventName);\n\t\t}\n\t}\n\n\t/**\n\t * Fires an event and returns the results of all event listeners as an array.\n\t *\n\t * @param eventName the event to fire\n\t * @param data optional data to pass to each event listener\n\t * @returns {Array} an array with the results of all event listeners\n\t */\n\tfireEvent(eventName: string, data: EventListenerParam) {\n\t\tconst eventRegistry = this._eventRegistry;\n\t\tconst eventListeners = eventRegistry.get(eventName);\n\n\t\tif (!eventListeners) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn eventListeners.map(fn => {\n\t\t\treturn fn.call(this, data);\n\t\t});\n\t}\n\n\t/**\n\t * Fires an event and returns a promise that will resolve once all listeners have resolved.\n\t *\n\t * @param eventName the event to fire\n\t * @param data optional data to pass to each event listener\n\t * @returns {Promise} a promise that will resolve when all listeners have resolved\n\t */\n\tfireEventAsync(eventName: string, data: EventListenerParam) {\n\t\treturn Promise.all(this.fireEvent(eventName, data));\n\t}\n\n\tisHandlerAttached(eventName: string, fnFunction: (param: EventListenerParam) => EventListenerReturn) {\n\t\tconst eventRegistry = this._eventRegistry;\n\t\tconst eventListeners = eventRegistry.get(eventName);\n\n\t\tif (!eventListeners) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn eventListeners.includes(fnFunction);\n\t}\n\n\thasListeners(eventName: string) {\n\t\treturn !!this._eventRegistry.get(eventName);\n\t}\n}\n\nexport default EventProvider;\n"]}
package/dist/FontFace.js CHANGED
@@ -5,7 +5,7 @@ import overrideFontFaceCSS from "./generated/css/OverrideFontFace.css.js";
5
5
  const insertFontFace = () => {
6
6
  const openUI5Support = getFeature("OpenUI5Support");
7
7
  // Only set the main font if there is no OpenUI5 support, or there is, but OpenUI5 is not loaded
8
- if (!openUI5Support || !openUI5Support.isLoaded()) {
8
+ if (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {
9
9
  insertMainFontFace();
10
10
  }
11
11
  // Always set the override font - OpenUI5 in CSS Vars mode does not set it, unlike the main font
@@ -1 +1 @@
1
- {"version":3,"file":"FontFace.js","sourceRoot":"","sources":["../src/FontFace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAC1D,OAAO,mBAAmB,MAAM,yCAAyC,CAAC;AAG1E,MAAM,cAAc,GAAG,GAAG,EAAE;IAC3B,MAAM,cAAc,GAAG,UAAU,CAAwB,gBAAgB,CAAC,CAAC;IAE3E,gGAAgG;IAChG,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,EAAE;QAClD,kBAAkB,EAAE,CAAC;KACrB;IAED,gGAAgG;IAChG,sBAAsB,EAAE,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC/B,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE;QACpC,WAAW,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;KAC/C;AACF,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,GAAG,EAAE;IACnC,IAAI,CAAC,QAAQ,CAAC,6BAA6B,CAAC,EAAE;QAC7C,WAAW,CAAC,mBAAmB,EAAE,6BAA6B,CAAC,CAAC;KAChE;AACF,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { hasStyle, createStyle } from \"./ManagedStyles.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport fontFaceCSS from \"./generated/css/FontFace.css.js\";\nimport overrideFontFaceCSS from \"./generated/css/OverrideFontFace.css.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\n\nconst insertFontFace = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\n\t// Only set the main font if there is no OpenUI5 support, or there is, but OpenUI5 is not loaded\n\tif (!openUI5Support || !openUI5Support.isLoaded()) {\n\t\tinsertMainFontFace();\n\t}\n\n\t// Always set the override font - OpenUI5 in CSS Vars mode does not set it, unlike the main font\n\tinsertOverrideFontFace();\n};\n\nconst insertMainFontFace = () => {\n\tif (!hasStyle(\"data-ui5-font-face\")) {\n\t\tcreateStyle(fontFaceCSS, \"data-ui5-font-face\");\n\t}\n};\n\nconst insertOverrideFontFace = () => {\n\tif (!hasStyle(\"data-ui5-font-face-override\")) {\n\t\tcreateStyle(overrideFontFaceCSS, \"data-ui5-font-face-override\");\n\t}\n};\n\nexport default insertFontFace;\n"]}
1
+ {"version":3,"file":"FontFace.js","sourceRoot":"","sources":["../src/FontFace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAC1D,OAAO,mBAAmB,MAAM,yCAAyC,CAAC;AAG1E,MAAM,cAAc,GAAG,GAAG,EAAE;IAC3B,MAAM,cAAc,GAAG,UAAU,CAAwB,gBAAgB,CAAC,CAAC;IAE3E,gGAAgG;IAChG,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,EAAE;QAC3D,kBAAkB,EAAE,CAAC;KACrB;IAED,gGAAgG;IAChG,sBAAsB,EAAE,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC/B,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE;QACpC,WAAW,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;KAC/C;AACF,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,GAAG,EAAE;IACnC,IAAI,CAAC,QAAQ,CAAC,6BAA6B,CAAC,EAAE;QAC7C,WAAW,CAAC,mBAAmB,EAAE,6BAA6B,CAAC,CAAC;KAChE;AACF,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { hasStyle, createStyle } from \"./ManagedStyles.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport fontFaceCSS from \"./generated/css/FontFace.css.js\";\nimport overrideFontFaceCSS from \"./generated/css/OverrideFontFace.css.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\n\nconst insertFontFace = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\n\t// Only set the main font if there is no OpenUI5 support, or there is, but OpenUI5 is not loaded\n\tif (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {\n\t\tinsertMainFontFace();\n\t}\n\n\t// Always set the override font - OpenUI5 in CSS Vars mode does not set it, unlike the main font\n\tinsertOverrideFontFace();\n};\n\nconst insertMainFontFace = () => {\n\tif (!hasStyle(\"data-ui5-font-face\")) {\n\t\tcreateStyle(fontFaceCSS, \"data-ui5-font-face\");\n\t}\n};\n\nconst insertOverrideFontFace = () => {\n\tif (!hasStyle(\"data-ui5-font-face-override\")) {\n\t\tcreateStyle(overrideFontFaceCSS, \"data-ui5-font-face-override\");\n\t}\n};\n\nexport default insertFontFace;\n"]}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Ignores all custom HTML elements with a given tag prefix to improve the rendering performance of the UI5 Web Components.
3
+ * <br>
4
+ *
5
+ * <b>When used:</b> the UI5 Web Components framework treats all custom HTML elements,
6
+ * starting with the given prefix as if they are standard HTML elements, such as: `div`, `span`, etc, without additional processing.
7
+ * <br>
8
+ *
9
+ * <b>When not used:</b> the framework waits for the slotted children to be defined and registered first,
10
+ * because the state or visual appearance of the parent may rely on the slotted elements/children.
11
+ *
12
+ * <b>Note:</b> We recommend using `ignoreCustomElements` when slotting custom HTML elements (with only semantic purpose)
13
+ * inside UI5 Web Components, to improve the time to render.
14
+ *
15
+ * @public
16
+ * @since 1.14.0
17
+ * @param { string } tagPrefix
18
+ */
19
+ declare const ignoreCustomElements: (tagPrefix: string) => void;
20
+ /**
21
+ * Determines whether custom elements with the given tag should be ignored.
22
+ *
23
+ * @private
24
+ * @param { string } tag
25
+ */
26
+ declare const shouldIgnoreCustomElement: (tag: string) => boolean;
27
+ export { ignoreCustomElements, shouldIgnoreCustomElement, };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The tag prefixes to be ignored.
3
+ */
4
+ const tagPrefixes = [];
5
+ /**
6
+ * Ignores all custom HTML elements with a given tag prefix to improve the rendering performance of the UI5 Web Components.
7
+ * <br>
8
+ *
9
+ * <b>When used:</b> the UI5 Web Components framework treats all custom HTML elements,
10
+ * starting with the given prefix as if they are standard HTML elements, such as: `div`, `span`, etc, without additional processing.
11
+ * <br>
12
+ *
13
+ * <b>When not used:</b> the framework waits for the slotted children to be defined and registered first,
14
+ * because the state or visual appearance of the parent may rely on the slotted elements/children.
15
+ *
16
+ * <b>Note:</b> We recommend using `ignoreCustomElements` when slotting custom HTML elements (with only semantic purpose)
17
+ * inside UI5 Web Components, to improve the time to render.
18
+ *
19
+ * @public
20
+ * @since 1.14.0
21
+ * @param { string } tagPrefix
22
+ */
23
+ const ignoreCustomElements = (tagPrefix) => {
24
+ if (typeof tagPrefix !== "string" || !tagPrefix.length) {
25
+ throw new Error("Only string characters for a tag prefix.");
26
+ }
27
+ tagPrefixes.push(tagPrefix);
28
+ };
29
+ /**
30
+ * Determines whether custom elements with the given tag should be ignored.
31
+ *
32
+ * @private
33
+ * @param { string } tag
34
+ */
35
+ const shouldIgnoreCustomElement = (tag) => {
36
+ return tagPrefixes.some(pref => tag.startsWith(pref));
37
+ };
38
+ export { ignoreCustomElements, shouldIgnoreCustomElement, };
39
+ //# sourceMappingURL=IgnoreCustomElements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IgnoreCustomElements.js","sourceRoot":"","sources":["../src/IgnoreCustomElements.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,GAAkB,EAAE,CAAC;AAEtC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,oBAAoB,GAAG,CAAC,SAAiB,EAAE,EAAE;IAClD,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;QACvD,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;KAC5D;IAED,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,yBAAyB,GAAG,CAAC,GAAW,EAAW,EAAE;IAC1D,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;AACvD,CAAC,CAAC;AAEF,OAAO,EACN,oBAAoB,EACpB,yBAAyB,GACzB,CAAC","sourcesContent":["/**\n * The tag prefixes to be ignored.\n */\nconst tagPrefixes: Array<string> = [];\n\n/**\n * Ignores all custom HTML elements with a given tag prefix to improve the rendering performance of the UI5 Web Components.\n * <br>\n *\n * <b>When used:</b> the UI5 Web Components framework treats all custom HTML elements,\n * starting with the given prefix as if they are standard HTML elements, such as: `div`, `span`, etc, without additional processing.\n * <br>\n *\n * <b>When not used:</b> the framework waits for the slotted children to be defined and registered first,\n * because the state or visual appearance of the parent may rely on the slotted elements/children.\n *\n * <b>Note:</b> We recommend using `ignoreCustomElements` when slotting custom HTML elements (with only semantic purpose)\n * inside UI5 Web Components, to improve the time to render.\n *\n * @public\n * @since 1.14.0\n * @param { string } tagPrefix\n */\nconst ignoreCustomElements = (tagPrefix: string) => {\n\tif (typeof tagPrefix !== \"string\" || !tagPrefix.length) {\n\t\tthrow new Error(\"Only string characters for a tag prefix.\");\n\t}\n\n\ttagPrefixes.push(tagPrefix);\n};\n\n/**\n * Determines whether custom elements with the given tag should be ignored.\n *\n * @private\n * @param { string } tag\n */\nconst shouldIgnoreCustomElement = (tag: string): boolean => {\n\treturn tagPrefixes.some(pref => tag.startsWith(pref));\n};\n\nexport {\n\tignoreCustomElements,\n\tshouldIgnoreCustomElement,\n};\n"]}
@@ -134,7 +134,7 @@ const applyURLParam = (key, value, paramType) => {
134
134
  };
135
135
  const applyOpenUI5Configuration = () => {
136
136
  const openUI5Support = getFeature("OpenUI5Support");
137
- if (!openUI5Support || !openUI5Support.isLoaded()) {
137
+ if (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {
138
138
  return;
139
139
  }
140
140
  const OpenUI5Config = openUI5Support.getConfigurationSettingsObject();
@@ -1 +1 @@
1
- {"version":3,"file":"InitialConfiguration.js","sourceRoot":"","sources":["../src/InitialConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,EAAE,UAAU,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AC;AAEF,OAAO,EACN,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,WAAW,EACX,iBAAiB,GACjB,CAAC","sourcesContent":["import merge from \"./thirdparty/merge.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport { DEFAULT_THEME } from \"./generated/AssetParameters.js\";\nimport validateThemeRoot from \"./validateThemeRoot.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support\";\nimport type { FormatSettings } from \"./config/FormatSettings.js\";\nimport AnimationMode from \"./types/AnimationMode.js\";\nimport CalendarType from \"./types/CalendarType.js\";\n\nlet initialized = false;\n\ntype InitialConfig = {\n\t[key: string]: any,\n\tanimationMode: AnimationMode,\n\ttheme: string,\n\tthemeRoot: string | undefined,\n\trtl: boolean | undefined,\n\tlanguage: string | undefined,\n\ttimezone: string | undefined,\n\tcalendarType: CalendarType | undefined,\n\tnoConflict: boolean,\n\tformatSettings: FormatSettings,\n\tfetchDefaultLanguage: boolean,\n};\n\nlet initialConfig: InitialConfig = {\n\tanimationMode: AnimationMode.Full,\n\ttheme: DEFAULT_THEME,\n\tthemeRoot: undefined,\n\trtl: undefined,\n\tlanguage: undefined,\n\ttimezone: undefined,\n\tcalendarType: undefined,\n\tnoConflict: false, // no URL\n\tformatSettings: {},\n\tfetchDefaultLanguage: false,\n};\n\n/* General settings */\nconst getAnimationMode = () => {\n\tinitConfiguration();\n\treturn initialConfig.animationMode;\n};\n\nconst getTheme = () => {\n\tinitConfiguration();\n\treturn initialConfig.theme;\n};\n\nconst getThemeRoot = () => {\n\tinitConfiguration();\n\treturn initialConfig.themeRoot;\n};\n\nconst getRTL = () => {\n\tinitConfiguration();\n\treturn initialConfig.rtl;\n};\n\nconst getLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.language;\n};\n\n/**\n * Returns if the default language, that is inlined at build time,\n * should be fetched over the network instead.\n * @returns {Boolean}\n */\nconst getFetchDefaultLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.fetchDefaultLanguage;\n};\n\nconst getNoConflict = () => {\n\tinitConfiguration();\n\treturn initialConfig.noConflict;\n};\n\n/**\n * Get the configured calendar type\n * @returns { String } the name of the configured calendar type\n */\nconst getCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.calendarType;\n};\n\n/**\n * Returns the configured IANA timezone ID.\n * @returns { String } the configured IANA timezone ID, e.g. \"America/New_York\"\n */\nconst getTimezone = () => {\n\tinitConfiguration();\n\treturn initialConfig.timezone;\n};\n\nconst getFormatSettings = () => {\n\tinitConfiguration();\n\treturn initialConfig.formatSettings;\n};\n\nconst booleanMapping = new Map();\nbooleanMapping.set(\"true\", true);\nbooleanMapping.set(\"false\", false);\n\nconst parseConfigurationScript = () => {\n\tconst configScript = document.querySelector(\"[data-ui5-config]\") || document.querySelector(\"[data-id='sap-ui-config']\"); // for backward compatibility\n\n\tlet configJSON;\n\n\tif (configScript) {\n\t\ttry {\n\t\t\tconfigJSON = JSON.parse(configScript.innerHTML);\n\t\t} catch (err) {\n\t\t\tconsole.warn(\"Incorrect data-sap-ui-config format. Please use JSON\"); /* eslint-disable-line */\n\t\t}\n\n\t\tif (configJSON) {\n\t\t\tinitialConfig = merge(initialConfig, configJSON);\n\t\t}\n\t}\n};\n\nconst parseURLParameters = () => {\n\tconst params = new URLSearchParams(window.location.search);\n\n\t// Process \"sap-*\" params first\n\tparams.forEach((value, key) => {\n\t\tconst parts = key.split(\"sap-\").length;\n\t\tif (parts === 0 || parts === key.split(\"sap-ui-\").length) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap\");\n\t});\n\n\t// Process \"sap-ui-*\" params\n\tparams.forEach((value, key) => {\n\t\tif (!key.startsWith(\"sap-ui\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap-ui\");\n\t});\n};\n\nconst normalizeThemeRootParamValue = (value: string) => {\n\tconst themeRoot = value.split(\"@\")[1];\n\n\treturn validateThemeRoot(themeRoot);\n};\n\nconst normalizeThemeParamValue = (param: string, value: string) => {\n\tif (param === \"theme\" && value.includes(\"@\")) { // the theme parameter might have @<URL-TO-THEME> in the value - strip this\n\t\treturn value.split(\"@\")[0];\n\t}\n\n\treturn value;\n};\n\nconst applyURLParam = (key: string, value: string, paramType: string) => {\n\tconst lowerCaseValue = value.toLowerCase();\n\tconst param = key.split(`${paramType}-`)[1];\n\n\tif (booleanMapping.has(value)) {\n\t\tvalue = booleanMapping.get(lowerCaseValue);\n\t}\n\n\tif (param === \"theme\") {\n\t\tinitialConfig.theme = normalizeThemeParamValue(param, value);\n\n\t\tif (value && value.includes(\"@\")) {\n\t\t\tinitialConfig.themeRoot = normalizeThemeRootParamValue(value);\n\t\t}\n\t} else {\n\t\tinitialConfig[param] = value;\n\t}\n};\n\nconst applyOpenUI5Configuration = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (!openUI5Support || !openUI5Support.isLoaded()) {\n\t\treturn;\n\t}\n\n\tconst OpenUI5Config = openUI5Support.getConfigurationSettingsObject();\n\tinitialConfig = merge(initialConfig, OpenUI5Config);\n};\n\nconst initConfiguration = () => {\n\tif (typeof document === \"undefined\" || initialized) {\n\t\treturn;\n\t}\n\n\t// 1. Lowest priority - configuration script\n\tparseConfigurationScript();\n\n\t// 2. URL parameters overwrite configuration script parameters\n\tparseURLParameters();\n\n\t// 3. If OpenUI5 is detected, it has the highest priority\n\tapplyOpenUI5Configuration();\n\n\tinitialized = true;\n};\n\nexport {\n\tgetAnimationMode,\n\tgetTheme,\n\tgetThemeRoot,\n\tgetRTL,\n\tgetLanguage,\n\tgetFetchDefaultLanguage,\n\tgetNoConflict,\n\tgetCalendarType,\n\tgetTimezone,\n\tgetFormatSettings,\n};\n"]}
1
+ {"version":3,"file":"InitialConfiguration.js","sourceRoot":"","sources":["../src/InitialConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAA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AAC;IAE5B,WAAW,GAAG,IAAI,CAAC;AACpB,CAAC,CAAC;AAEF,OAAO,EACN,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,WAAW,EACX,iBAAiB,GACjB,CAAC","sourcesContent":["import merge from \"./thirdparty/merge.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport { DEFAULT_THEME } from \"./generated/AssetParameters.js\";\nimport validateThemeRoot from \"./validateThemeRoot.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport type { FormatSettings } from \"./config/FormatSettings.js\";\nimport AnimationMode from \"./types/AnimationMode.js\";\nimport CalendarType from \"./types/CalendarType.js\";\n\nlet initialized = false;\n\ntype InitialConfig = {\n\t[key: string]: any,\n\tanimationMode: AnimationMode,\n\ttheme: string,\n\tthemeRoot: string | undefined,\n\trtl: boolean | undefined,\n\tlanguage: string | undefined,\n\tcalendarType: CalendarType | undefined,\n\ttimezone: string | undefined,\n\tnoConflict: boolean,\n\tformatSettings: FormatSettings,\n\tfetchDefaultLanguage: boolean,\n};\n\nlet initialConfig: InitialConfig = {\n\tanimationMode: AnimationMode.Full,\n\ttheme: DEFAULT_THEME,\n\tthemeRoot: undefined,\n\trtl: undefined,\n\tlanguage: undefined,\n\ttimezone: undefined,\n\tcalendarType: undefined,\n\tnoConflict: false, // no URL\n\tformatSettings: {},\n\tfetchDefaultLanguage: false,\n};\n\n/* General settings */\nconst getAnimationMode = () => {\n\tinitConfiguration();\n\treturn initialConfig.animationMode;\n};\n\nconst getTheme = () => {\n\tinitConfiguration();\n\treturn initialConfig.theme;\n};\n\nconst getThemeRoot = () => {\n\tinitConfiguration();\n\treturn initialConfig.themeRoot;\n};\n\nconst getRTL = () => {\n\tinitConfiguration();\n\treturn initialConfig.rtl;\n};\n\nconst getLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.language;\n};\n\n/**\n * Returns if the default language, that is inlined at build time,\n * should be fetched over the network instead.\n * @returns {Boolean}\n */\nconst getFetchDefaultLanguage = () => {\n\tinitConfiguration();\n\treturn initialConfig.fetchDefaultLanguage;\n};\n\nconst getNoConflict = () => {\n\tinitConfiguration();\n\treturn initialConfig.noConflict;\n};\n\n/**\n * Get the configured calendar type\n * @returns { String } the name of the configured calendar type\n */\nconst getCalendarType = () => {\n\tinitConfiguration();\n\treturn initialConfig.calendarType;\n};\n\n/**\n * Returns the configured IANA timezone ID.\n * @returns { String } the configured IANA timezone ID, e.g. \"America/New_York\"\n */\nconst getTimezone = () => {\n\tinitConfiguration();\n\treturn initialConfig.timezone;\n};\n\nconst getFormatSettings = () => {\n\tinitConfiguration();\n\treturn initialConfig.formatSettings;\n};\n\nconst booleanMapping = new Map();\nbooleanMapping.set(\"true\", true);\nbooleanMapping.set(\"false\", false);\n\nconst parseConfigurationScript = () => {\n\tconst configScript = document.querySelector(\"[data-ui5-config]\") || document.querySelector(\"[data-id='sap-ui-config']\"); // for backward compatibility\n\n\tlet configJSON;\n\n\tif (configScript) {\n\t\ttry {\n\t\t\tconfigJSON = JSON.parse(configScript.innerHTML);\n\t\t} catch (err) {\n\t\t\tconsole.warn(\"Incorrect data-sap-ui-config format. Please use JSON\"); /* eslint-disable-line */\n\t\t}\n\n\t\tif (configJSON) {\n\t\t\tinitialConfig = merge(initialConfig, configJSON);\n\t\t}\n\t}\n};\n\nconst parseURLParameters = () => {\n\tconst params = new URLSearchParams(window.location.search);\n\n\t// Process \"sap-*\" params first\n\tparams.forEach((value, key) => {\n\t\tconst parts = key.split(\"sap-\").length;\n\t\tif (parts === 0 || parts === key.split(\"sap-ui-\").length) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap\");\n\t});\n\n\t// Process \"sap-ui-*\" params\n\tparams.forEach((value, key) => {\n\t\tif (!key.startsWith(\"sap-ui\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tapplyURLParam(key, value, \"sap-ui\");\n\t});\n};\n\nconst normalizeThemeRootParamValue = (value: string) => {\n\tconst themeRoot = value.split(\"@\")[1];\n\n\treturn validateThemeRoot(themeRoot);\n};\n\nconst normalizeThemeParamValue = (param: string, value: string) => {\n\tif (param === \"theme\" && value.includes(\"@\")) { // the theme parameter might have @<URL-TO-THEME> in the value - strip this\n\t\treturn value.split(\"@\")[0];\n\t}\n\n\treturn value;\n};\n\nconst applyURLParam = (key: string, value: string, paramType: string) => {\n\tconst lowerCaseValue = value.toLowerCase();\n\tconst param = key.split(`${paramType}-`)[1];\n\n\tif (booleanMapping.has(value)) {\n\t\tvalue = booleanMapping.get(lowerCaseValue);\n\t}\n\n\tif (param === \"theme\") {\n\t\tinitialConfig.theme = normalizeThemeParamValue(param, value);\n\n\t\tif (value && value.includes(\"@\")) {\n\t\t\tinitialConfig.themeRoot = normalizeThemeRootParamValue(value);\n\t\t}\n\t} else {\n\t\tinitialConfig[param] = value;\n\t}\n};\n\nconst applyOpenUI5Configuration = () => {\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (!openUI5Support || !openUI5Support.isOpenUI5Detected()) {\n\t\treturn;\n\t}\n\n\tconst OpenUI5Config = openUI5Support.getConfigurationSettingsObject();\n\tinitialConfig = merge(initialConfig, OpenUI5Config);\n};\n\nconst initConfiguration = () => {\n\tif (typeof document === \"undefined\" || initialized) {\n\t\treturn;\n\t}\n\n\t// 1. Lowest priority - configuration script\n\tparseConfigurationScript();\n\n\t// 2. URL parameters overwrite configuration script parameters\n\tparseURLParameters();\n\n\t// 3. If OpenUI5 is detected, it has the highest priority\n\tapplyOpenUI5Configuration();\n\n\tinitialized = true;\n};\n\nexport {\n\tgetAnimationMode,\n\tgetTheme,\n\tgetThemeRoot,\n\tgetRTL,\n\tgetLanguage,\n\tgetFetchDefaultLanguage,\n\tgetNoConflict,\n\tgetCalendarType,\n\tgetTimezone,\n\tgetFormatSettings,\n};\n"]}
package/dist/Keys.d.ts CHANGED
@@ -54,4 +54,8 @@ declare const isF7: (event: KeyboardEvent) => boolean;
54
54
  declare const isShift: (event: KeyboardEvent) => boolean;
55
55
  declare const isCtrlA: (event: KeyboardEvent) => boolean;
56
56
  declare const isCtrlV: (event: KeyboardEvent) => boolean;
57
- export { isEnter, isEnterShift, isSpace, isSpaceShift, isSpaceCtrl, isLeft, isRight, isUp, isDown, isLeftCtrl, isRightCtrl, isUpCtrl, isDownCtrl, isUpShift, isDownShift, isUpAlt, isDownAlt, isLeftShift, isRightShift, isLeftShiftCtrl, isRightShiftCtrl, isUpShiftCtrl, isDownShiftCtrl, isHome, isEnd, isPlus, isMinus, isHomeCtrl, isEndCtrl, isHomeShift, isEndShift, isEscape, isTabNext, isTabPrevious, isBackSpace, isDelete, isShow, isF4, isF4Shift, isF6Previous, isF6Next, isF7, isPageUp, isPageDown, isPageUpShift, isPageUpAlt, isPageDownShift, isPageDownAlt, isPageUpShiftCtrl, isPageDownShiftCtrl, isShift, isCtrlA, isCtrlV, isDeleteShift, isInsertShift, isInsertCtrl, };
57
+ declare const isKeyA: (event: KeyboardEvent) => boolean;
58
+ declare const isKeyP: (event: KeyboardEvent) => boolean;
59
+ declare const isNumber: (event: KeyboardEvent) => boolean;
60
+ declare const isColon: (event: KeyboardEvent) => boolean;
61
+ export { isEnter, isEnterShift, isSpace, isSpaceShift, isSpaceCtrl, isLeft, isRight, isUp, isDown, isLeftCtrl, isRightCtrl, isUpCtrl, isDownCtrl, isUpShift, isDownShift, isUpAlt, isDownAlt, isLeftShift, isRightShift, isLeftShiftCtrl, isRightShiftCtrl, isUpShiftCtrl, isDownShiftCtrl, isHome, isEnd, isPlus, isMinus, isHomeCtrl, isEndCtrl, isHomeShift, isEndShift, isEscape, isTabNext, isTabPrevious, isBackSpace, isDelete, isShow, isF4, isF4Shift, isF6Previous, isF6Next, isF7, isPageUp, isPageDown, isPageUpShift, isPageUpAlt, isPageDownShift, isPageDownAlt, isPageUpShiftCtrl, isPageDownShiftCtrl, isShift, isCtrlA, isCtrlV, isKeyA, isKeyP, isDeleteShift, isInsertShift, isInsertCtrl, isNumber, isColon, };
package/dist/Keys.js CHANGED
@@ -90,7 +90,7 @@ var KeyCodes;
90
90
  KeyCodes[KeyCodes["F12"] = 123] = "F12";
91
91
  KeyCodes[KeyCodes["NUM_LOCK"] = 144] = "NUM_LOCK";
92
92
  KeyCodes[KeyCodes["SCROLL_LOCK"] = 145] = "SCROLL_LOCK";
93
- KeyCodes[KeyCodes["OPEN_BRACKET"] = 186] = "OPEN_BRACKET";
93
+ KeyCodes[KeyCodes["COLON"] = 186] = "COLON";
94
94
  KeyCodes[KeyCodes["PLUS"] = 187] = "PLUS";
95
95
  KeyCodes[KeyCodes["COMMA"] = 188] = "COMMA";
96
96
  KeyCodes[KeyCodes["SLASH"] = 189] = "SLASH";
@@ -171,8 +171,12 @@ const isShowByArrows = (event) => {
171
171
  const isShift = (event) => event.key === "Shift" || event.keyCode === KeyCodes.SHIFT;
172
172
  const isCtrlA = (event) => ((event.key === "A" || event.key === "a") || event.which === KeyCodes.A) && checkModifierKeys(event, true, false, false);
173
173
  const isCtrlV = (event) => ((event.key === "V" || event.key === "v") || event.which === KeyCodes.V) && checkModifierKeys(event, true, false, false);
174
+ const isKeyA = (event) => ((event.key === "A" || event.key === "a") || event.which === KeyCodes.A) && checkModifierKeys(event, false, false, false);
175
+ const isKeyP = (event) => ((event.key === "P" || event.key === "p") || event.which === KeyCodes.P) && checkModifierKeys(event, false, false, false);
174
176
  const hasModifierKeys = (event) => event.shiftKey || event.altKey || getCtrlKey(event);
175
177
  const getCtrlKey = (event) => !!(event.metaKey || event.ctrlKey); // double negation doesn't have effect on boolean but ensures null and undefined are equivalent to false.
176
178
  const checkModifierKeys = (event, bCtrlKey, bAltKey, bShiftKey) => event.shiftKey === bShiftKey && event.altKey === bAltKey && getCtrlKey(event) === bCtrlKey;
177
- export { isEnter, isEnterShift, isSpace, isSpaceShift, isSpaceCtrl, isLeft, isRight, isUp, isDown, isLeftCtrl, isRightCtrl, isUpCtrl, isDownCtrl, isUpShift, isDownShift, isUpAlt, isDownAlt, isLeftShift, isRightShift, isLeftShiftCtrl, isRightShiftCtrl, isUpShiftCtrl, isDownShiftCtrl, isHome, isEnd, isPlus, isMinus, isHomeCtrl, isEndCtrl, isHomeShift, isEndShift, isEscape, isTabNext, isTabPrevious, isBackSpace, isDelete, isShow, isF4, isF4Shift, isF6Previous, isF6Next, isF7, isPageUp, isPageDown, isPageUpShift, isPageUpAlt, isPageDownShift, isPageDownAlt, isPageUpShiftCtrl, isPageDownShiftCtrl, isShift, isCtrlA, isCtrlV, isDeleteShift, isInsertShift, isInsertCtrl, };
179
+ const isNumber = (event) => ((event.key ? "0123456789".indexOf(event.key) !== -1 : event.keyCode >= KeyCodes.DIGIT_0 && event.keyCode <= KeyCodes.DIGIT_9) && checkModifierKeys(event, false, false, false));
180
+ const isColon = (event) => ((event.key ? event.key === ":" : event.keyCode === KeyCodes.COLON) && checkModifierKeys(event, false, false, true));
181
+ export { isEnter, isEnterShift, isSpace, isSpaceShift, isSpaceCtrl, isLeft, isRight, isUp, isDown, isLeftCtrl, isRightCtrl, isUpCtrl, isDownCtrl, isUpShift, isDownShift, isUpAlt, isDownAlt, isLeftShift, isRightShift, isLeftShiftCtrl, isRightShiftCtrl, isUpShiftCtrl, isDownShiftCtrl, isHome, isEnd, isPlus, isMinus, isHomeCtrl, isEndCtrl, isHomeShift, isEndShift, isEscape, isTabNext, isTabPrevious, isBackSpace, isDelete, isShow, isF4, isF4Shift, isF6Previous, isF6Next, isF7, isPageUp, isPageDown, isPageUpShift, isPageUpAlt, isPageDownShift, isPageDownAlt, isPageUpShiftCtrl, isPageDownShiftCtrl, isShift, isCtrlA, isCtrlV, isKeyA, isKeyP, isDeleteShift, isInsertShift, isInsertCtrl, isNumber, isColon, };
178
182
  //# sourceMappingURL=Keys.js.map