@ui5/webcomponents-base 0.0.0-cf069fb29 → 0.0.0-cf50976ce
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +0 -1
- package/CHANGELOG.md +173 -0
- package/README.md +28 -6
- package/bundle.esm.js +7 -9
- package/dist/Boot.js +3 -5
- package/dist/CustomElementsRegistry.js +1 -1
- package/dist/CustomElementsScope.js +20 -98
- package/dist/CustomElementsScopeUtils.js +108 -0
- package/dist/Device.js +5 -0
- package/dist/Keys.js +24 -0
- package/dist/StaticAreaItem.js +1 -1
- package/dist/UI5Element.js +24 -2
- package/dist/UI5ElementMetadata.js +1 -1
- package/dist/asset-registries/Icons.js +4 -8
- package/dist/asset-registries/LocaleData.js +7 -2
- package/dist/asset-registries/Themes.js +6 -2
- package/dist/asset-registries/i18n.js +3 -1
- package/dist/assets/bundle.esm.83f057b4.js +43 -0
- package/dist/config/Icons.js +52 -0
- package/dist/config/Theme.js +11 -0
- package/dist/css/BusyIndicator.css +80 -0
- package/dist/css/FontFace.css +31 -10
- package/dist/delegate/ItemNavigation.js +9 -4
- package/dist/features/F6Navigation.js +4 -0
- package/dist/features/OpenUI5Enablement.js +119 -0
- package/dist/generated/AssetParameters.js +1 -1
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/generated/css/BusyIndicator.css.js +5 -0
- package/dist/generated/css/FontFace.css.js +1 -1
- package/dist/i18nBundle.js +1 -1
- package/dist/renderer/LitRenderer.js +29 -11
- package/dist/renderer/executeTemplate.js +19 -2
- package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
- package/dist/theming/getEffectiveLinksHrefs.js +7 -0
- package/dist/theming/getEffectiveStyle.js +9 -0
- package/dist/types/DOMReference.js +24 -0
- package/dist/updateShadowRoot.js +2 -3
- package/dist/util/AriaLabelHelper.js +2 -4
- package/dist/util/Caret.js +1 -14
- package/dist/util/ColorConversion.js +30 -2
- package/dist/util/InvisibleMessage.js +20 -9
- package/dist/util/TabbableElements.js +4 -0
- package/dist/util/getEffectiveScrollbarStyle.js +5 -0
- package/dist/util/getNormalizedTarget.js +16 -0
- package/dist/util/isDefaultSlotProvided.js +11 -0
- package/hash.txt +1 -1
- package/lib/generate-asset-parameters/index.js +8 -4
- package/lib/generate-styles/index.js +17 -9
- package/lib/generate-version-info/index.js +18 -13
- package/package-scripts.js +16 -27
- package/package.json +7 -6
- package/src/Boot.js +3 -5
- package/src/CustomElementsRegistry.js +1 -1
- package/src/CustomElementsScope.js +20 -98
- package/src/CustomElementsScopeUtils.js +108 -0
- package/src/Device.js +5 -0
- package/src/Keys.js +24 -0
- package/src/StaticAreaItem.js +1 -1
- package/src/UI5Element.js +24 -2
- package/src/UI5ElementMetadata.js +1 -1
- package/src/asset-registries/Icons.js +4 -8
- package/src/asset-registries/LocaleData.js +7 -2
- package/src/asset-registries/Themes.js +6 -2
- package/src/asset-registries/i18n.js +3 -1
- package/src/config/Icons.js +52 -0
- package/src/config/Theme.js +11 -0
- package/src/css/BusyIndicator.css +80 -0
- package/src/css/FontFace.css +31 -10
- package/src/delegate/ItemNavigation.js +9 -4
- package/src/features/F6Navigation.js +4 -0
- package/src/features/OpenUI5Enablement.js +119 -0
- package/src/i18nBundle.js +1 -1
- package/src/renderer/LitRenderer.js +29 -11
- package/src/renderer/executeTemplate.js +19 -2
- package/src/theming/getEffectiveLinksHrefs.js +7 -0
- package/src/theming/getEffectiveStyle.js +9 -0
- package/src/types/DOMReference.js +24 -0
- package/src/updateShadowRoot.js +2 -3
- package/src/util/AriaLabelHelper.js +2 -4
- package/src/util/Caret.js +1 -14
- package/src/util/ColorConversion.js +30 -2
- package/src/util/InvisibleMessage.js +20 -9
- package/src/util/TabbableElements.js +4 -0
- package/src/util/getEffectiveScrollbarStyle.js +5 -0
- package/src/util/getNormalizedTarget.js +16 -0
- package/src/util/isDefaultSlotProvided.js +11 -0
- package/config/.eslintrc.js +0 -3
- package/config/rollup.config.js +0 -1
- package/dist/isLegacyBrowser.js +0 -3
- package/dist/resources/bundle.esm.js +0 -37
- package/dist/resources/bundle.esm.js.map +0 -1
- package/dist/test-resources/assets/Themes.js +0 -17
- package/dist/test-resources/elements/Child.js +0 -35
- package/dist/test-resources/elements/Generic.js +0 -84
- package/dist/test-resources/elements/GenericExt.js +0 -26
- package/dist/test-resources/elements/NoShadowDOM.js +0 -13
- package/dist/test-resources/elements/Parent.js +0 -41
- package/dist/test-resources/elements/WithStaticArea.js +0 -77
- package/dist/test-resources/pages/AllTestElements.html +0 -42
- package/dist/test-resources/pages/Configuration.html +0 -18
- package/dist/test-resources/pages/ConfigurationScript.html +0 -34
- package/dist/test-resources/pages/assets/messagebundle_de.properties +0 -1
- package/dist/test-resources/pages/assets/messagebundle_en.properties +0 -1
- package/dist/test-resources/pages/assets/messagebundle_es.properties +0 -1
- package/dist/test-resources/pages/assets/messagebundle_fr.properties +0 -1
- package/dist/test-resources/pages/i18n.html +0 -33
- package/dist/test-resources/specs/ConfigurationChange.spec.js +0 -27
- package/dist/test-resources/specs/ConfigurationScript.spec.js +0 -63
- package/dist/test-resources/specs/ConfigurationURL.spec.js +0 -93
- package/dist/test-resources/specs/CustomTheme.spec.js +0 -27
- package/dist/test-resources/specs/EventProvider.spec.js +0 -63
- package/dist/test-resources/specs/StaticArea.spec.js +0 -78
- package/dist/test-resources/specs/Theming.spec.js +0 -33
- package/dist/test-resources/specs/UI5ElementInvalidation.js +0 -242
- package/dist/test-resources/specs/UI5ElementLifecycle.js +0 -98
- package/dist/test-resources/specs/UI5ElementListenForChildPropChanges.spec.js +0 -75
- package/dist/test-resources/specs/UI5ElementMetadataExt.js +0 -42
- package/dist/test-resources/specs/UI5ElementPropertyValidation.js +0 -14
- package/dist/test-resources/specs/UI5ElementPropsAndAttrs.spec.js +0 -67
- package/dist/test-resources/specs/UI5ElementShadowDOM.js +0 -24
- package/dist/test-resources/specs/UI5ElementSlots.js +0 -36
- package/dist/util/findNodeOwner.js +0 -35
- package/src/isLegacyBrowser.js +0 -3
- package/src/util/findNodeOwner.js +0 -35
package/.eslintignore
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,179 @@
|
|
|
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.7.1](https://github.com/SAP/ui5-webcomponents/compare/v1.7.0...v1.7.1) (2022-09-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @ui5/webcomponents-base
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.7.0](https://github.com/SAP/ui5-webcomponents/compare/v1.6.0...v1.7.0) (2022-09-02)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* correctly calculate accessibleNameRef ([#5520](https://github.com/SAP/ui5-webcomponents/issues/5520)) ([a872c9b](https://github.com/SAP/ui5-webcomponents/commit/a872c9be58ee38f2d81d65e1a977cf7c80a380fd)), closes [#5452](https://github.com/SAP/ui5-webcomponents/issues/5452)
|
|
20
|
+
* **i18n:** usage of quotes in texts ([#5655](https://github.com/SAP/ui5-webcomponents/issues/5655)) ([3484b74](https://github.com/SAP/ui5-webcomponents/commit/3484b74c8ec940c2d5bd9cef72cc4185a703bcd4))
|
|
21
|
+
* regenarete base styles on change ([#5599](https://github.com/SAP/ui5-webcomponents/issues/5599)) ([8a4ccdb](https://github.com/SAP/ui5-webcomponents/commit/8a4ccdb6d0139b996abcd5fb299232f2370360ee))
|
|
22
|
+
* remove woff files and woff/ttf usage ([#5629](https://github.com/SAP/ui5-webcomponents/issues/5629)) ([e4175cd](https://github.com/SAP/ui5-webcomponents/commit/e4175cdf000ace65758e75fb70545edd872197b8))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **framework:** reset scrollbar styles class ([#5623](https://github.com/SAP/ui5-webcomponents/issues/5623)) ([c3f3063](https://github.com/SAP/ui5-webcomponents/commit/c3f306383f971744886b99cc60911dcba924720b))
|
|
28
|
+
* **ui5-icon:** support SVGs with multiple paths ([#5630](https://github.com/SAP/ui5-webcomponents/issues/5630)) ([ce17ca5](https://github.com/SAP/ui5-webcomponents/commit/ce17ca559ce507b8e10f20d7f80dab48908a8305)), closes [#5347](https://github.com/SAP/ui5-webcomponents/issues/5347) [#5526](https://github.com/SAP/ui5-webcomponents/issues/5526)
|
|
29
|
+
* **ui5-popover:** new type DOMReference for opener ([#5609](https://github.com/SAP/ui5-webcomponents/issues/5609)) ([1a4de12](https://github.com/SAP/ui5-webcomponents/commit/1a4de12b37a2cb82be2af010758f4641acf7385d))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# [1.6.0](https://github.com/SAP/ui5-webcomponents/compare/v1.5.0...v1.6.0) (2022-07-25)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
|
|
40
|
+
* **InvisibleMessage:** clear announcement after a while ([#5446](https://github.com/SAP/ui5-webcomponents/issues/5446)) ([af213f1](https://github.com/SAP/ui5-webcomponents/commit/af213f1))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
|
|
45
|
+
* **InvisibleMessage:** make it available for application usage ([#5468](https://github.com/SAP/ui5-webcomponents/issues/5468)) ([c6bcc02](https://github.com/SAP/ui5-webcomponents/commit/c6bcc02))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
# [1.5.0](https://github.com/SAP/ui5-webcomponents/compare/v1.4.0...v1.5.0) (2022-07-03)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### Bug Fixes
|
|
55
|
+
|
|
56
|
+
* **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))
|
|
57
|
+
* **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)
|
|
58
|
+
* cldr url ([#5397](https://github.com/SAP/ui5-webcomponents/issues/5397)) ([a4df0bd](https://github.com/SAP/ui5-webcomponents/commit/a4df0bd))
|
|
59
|
+
* **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)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# [1.4.0](https://github.com/SAP/ui5-webcomponents/compare/v1.3.1...v1.4.0) (2022-05-25)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### Bug Fixes
|
|
69
|
+
|
|
70
|
+
* **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))
|
|
71
|
+
* **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))
|
|
72
|
+
* **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)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
## [1.3.1](https://github.com/SAP/ui5-webcomponents/compare/v1.3.0...v1.3.1) (2022-04-27)
|
|
78
|
+
|
|
79
|
+
**Note:** Version bump only for package @ui5/webcomponents-base
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# [1.3.0](https://github.com/SAP/ui5-webcomponents/compare/v1.2.4...v1.3.0) (2022-04-19)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### Bug Fixes
|
|
89
|
+
|
|
90
|
+
* **framework:** make listeners passive ([#5012](https://github.com/SAP/ui5-webcomponents/issues/5012)) ([30f2dc7](https://github.com/SAP/ui5-webcomponents/commit/30f2dc7))
|
|
91
|
+
* **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))
|
|
92
|
+
* **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))
|
|
93
|
+
* **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))
|
|
94
|
+
* **framework:** fix scoping of self tag ([#4952](https://github.com/SAP/ui5-webcomponents/issues/4952)) ([8d53e95](https://github.com/SAP/ui5-webcomponents/commit/8d53e95))
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### Features
|
|
98
|
+
|
|
99
|
+
* **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))
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
## [1.2.4](https://github.com/SAP/ui5-webcomponents/compare/v1.2.3...v1.2.4) (2022-03-30)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Bug Fixes
|
|
109
|
+
|
|
110
|
+
* **framework:** fix scoping of self tag ([#4952](https://github.com/SAP/ui5-webcomponents/issues/4952)) ([cdb9e2a](https://github.com/SAP/ui5-webcomponents/commit/cdb9e2a))
|
|
111
|
+
* **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)
|
|
112
|
+
* **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)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
## [1.2.3](https://github.com/SAP/ui5-webcomponents/compare/v1.2.2...v1.2.3) (2022-03-23)
|
|
119
|
+
|
|
120
|
+
**Note:** Version bump only for package @ui5/webcomponents-base
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## [1.2.2](https://github.com/SAP/ui5-webcomponents/compare/v1.2.1...v1.2.2) (2022-03-22)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
### Bug Fixes
|
|
130
|
+
|
|
131
|
+
* **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))
|
|
132
|
+
* **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)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
### Features
|
|
136
|
+
|
|
137
|
+
* 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))
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
## [1.2.1](https://github.com/SAP/ui5-webcomponents/compare/v1.2.0...v1.2.1) (2022-03-02)
|
|
144
|
+
|
|
145
|
+
**Note:** Version bump only for package @ui5/webcomponents-base
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
# [1.2.0](https://github.com/SAP/ui5-webcomponents/compare/v1.1.2...v1.2.0) (2022-02-28)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
### Bug Fixes
|
|
155
|
+
|
|
156
|
+
* **ui5-input:** improve lazy loading behaviour ([#4763](https://github.com/SAP/ui5-webcomponents/issues/4763)) ([35342be](https://github.com/SAP/ui5-webcomponents/commit/35342be))
|
|
157
|
+
* **ui5-list:** initial focus target ([#4809](https://github.com/SAP/ui5-webcomponents/issues/4809)) ([cf6dd1a](https://github.com/SAP/ui5-webcomponents/commit/cf6dd1a))
|
|
158
|
+
* attached boot tasks always run ([#4777](https://github.com/SAP/ui5-webcomponents/issues/4777)) ([ad4608c](https://github.com/SAP/ui5-webcomponents/commit/ad4608c))
|
|
159
|
+
* **framework:** Tabbable elements error ([#4704](https://github.com/SAP/ui5-webcomponents/issues/4704)) ([650473f](https://github.com/SAP/ui5-webcomponents/commit/650473f))
|
|
160
|
+
* **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)
|
|
161
|
+
* **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)
|
|
162
|
+
* **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))
|
|
163
|
+
* **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))
|
|
164
|
+
* **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)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
### Features
|
|
168
|
+
|
|
169
|
+
* 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))
|
|
170
|
+
* **ui5-input:** implement showClearIcon property ([#4641](https://github.com/SAP/ui5-webcomponents/issues/4641)) ([b1c1620](https://github.com/SAP/ui5-webcomponents/commit/b1c1620))
|
|
171
|
+
* **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)
|
|
172
|
+
* **ui5-table:** improve keyboard handling ([#4631](https://github.com/SAP/ui5-webcomponents/issues/4631)) ([f1f2b1b](https://github.com/SAP/ui5-webcomponents/commit/f1f2b1b))
|
|
173
|
+
* **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)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
6
179
|
## [1.1.2](https://github.com/SAP/ui5-webcomponents/compare/v1.1.1...v1.1.2) (2022-01-26)
|
|
7
180
|
|
|
8
181
|
|
package/README.md
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
|
-

|
|
2
2
|
|
|
3
3
|
# UI5 Web Components - Base
|
|
4
4
|
|
|
5
|
-
[](https://travis-ci.org/SAP/ui5-webcomponents)
|
|
6
5
|
[](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
9
|
## Provided APIs for applications
|
|
11
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
|
+
|
|
12
29
|
### `Boot.js`
|
|
13
30
|
|
|
14
31
|
- `attachBoot`
|
|
@@ -20,6 +37,11 @@ Contains the base files for all Web Components, most notably `@ui5/webcomponents
|
|
|
20
37
|
- `setCustomElementsScopingRules`
|
|
21
38
|
- `getCustomElementsScopingRules`
|
|
22
39
|
|
|
40
|
+
### `CSP.js`
|
|
41
|
+
- `setPackageCSSRoot`
|
|
42
|
+
- `setUseLinks`
|
|
43
|
+
- `setPreloadLinks`
|
|
44
|
+
|
|
23
45
|
### `i18nBundle.js`
|
|
24
46
|
|
|
25
47
|
- `registerI18nLoader`
|
|
@@ -34,16 +56,16 @@ Contains the base files for all Web Components, most notably `@ui5/webcomponents
|
|
|
34
56
|
- `renderFinished`
|
|
35
57
|
|
|
36
58
|
## Resources
|
|
37
|
-
- [UI5 Web Components - README.md](https://github.com/SAP/ui5-webcomponents/blob/
|
|
59
|
+
- [UI5 Web Components - README.md](https://github.com/SAP/ui5-webcomponents/blob/main/README.md)
|
|
38
60
|
- [UI5 Web Components - Home Page](https://sap.github.io/ui5-webcomponents)
|
|
39
61
|
- [UI5 Web Components - Playground and API Reference](https://sap.github.io/ui5-webcomponents/playground/)
|
|
40
62
|
|
|
41
63
|
## Support
|
|
42
|
-
We welcome all comments, suggestions, questions, and bug reports. Please follow our [Support Guidelines](https://github.com/SAP/ui5-webcomponents/blob/
|
|
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/).
|
|
43
65
|
|
|
44
66
|
## Contribute
|
|
45
|
-
Please check our [Contribution Guidelines](https://github.com/SAP/ui5-webcomponents/blob/
|
|
67
|
+
Please check our [Contribution Guidelines](https://github.com/SAP/ui5-webcomponents/blob/main/docs/6-contributing/02-conventions-and-guidelines.md).
|
|
46
68
|
|
|
47
69
|
## License
|
|
48
70
|
Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
|
|
49
|
-
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/
|
|
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
|
@@ -5,20 +5,18 @@ import EventProvider from "./dist/EventProvider.js";
|
|
|
5
5
|
import "./dist/features/OpenUI5Support.js";
|
|
6
6
|
|
|
7
7
|
// Test components
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
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";
|
|
14
14
|
|
|
15
15
|
// Test themes - CSS Vars for the sap_fiori_3, sap_fiori_3_dark, sap_belize and sap_belize_hcb themes
|
|
16
|
-
import "./
|
|
16
|
+
import "./test/assets/Themes.js";
|
|
17
17
|
|
|
18
18
|
// used in test pages
|
|
19
19
|
import { renderFinished } from "./dist/Render.js";
|
|
20
|
-
import { isIE } from "./dist/Device.js";
|
|
21
|
-
window.isIE = isIE; // attached to the window object for testing purposes
|
|
22
20
|
|
|
23
21
|
// used for tests - to register a custom theme
|
|
24
22
|
window.registerThemePropertiesLoader = registerThemePropertiesLoader;
|
package/dist/Boot.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
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";
|
|
@@ -8,15 +7,15 @@ import { registerCurrentRuntime } from "./Runtimes.js";
|
|
|
8
7
|
import { getFeature } from "./FeaturesRegistry.js";
|
|
9
8
|
|
|
10
9
|
let bootPromise;
|
|
11
|
-
const eventProvider = new EventProvider();
|
|
12
10
|
|
|
13
11
|
/**
|
|
14
12
|
* Attach a callback that will be executed on boot
|
|
15
13
|
* @public
|
|
16
14
|
* @param listener
|
|
17
15
|
*/
|
|
18
|
-
const attachBoot = listener => {
|
|
19
|
-
|
|
16
|
+
const attachBoot = async listener => {
|
|
17
|
+
await boot();
|
|
18
|
+
listener();
|
|
20
19
|
};
|
|
21
20
|
|
|
22
21
|
const boot = async () => {
|
|
@@ -46,7 +45,6 @@ const boot = async () => {
|
|
|
46
45
|
OpenUI5Support && OpenUI5Support.attachListeners();
|
|
47
46
|
insertFontFace();
|
|
48
47
|
insertSystemCSSVars();
|
|
49
|
-
await eventProvider.fireEventAsync("boot");
|
|
50
48
|
|
|
51
49
|
resolve();
|
|
52
50
|
});
|
|
@@ -82,7 +82,7 @@ const displayFailedRegistrations = () => {
|
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
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/
|
|
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
86
|
|
|
87
87
|
console.warn(message); // eslint-disable-line
|
|
88
88
|
};
|
|
@@ -1,102 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
const tagsCache = new Map(); // true/false means the tag should/should not be cached, undefined means not known yet.
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Sets the suffix to be used for custom elements scoping, f.e. pass "demo" to get tags such as "ui5-button-demo".
|
|
10
|
-
* Note: by default all tags starting with "ui5-" will be scoped, unless you change this by calling "setCustomElementsScopingRules"
|
|
11
|
-
*
|
|
12
|
-
* @public
|
|
13
|
-
* @param suffix The scoping suffix
|
|
14
|
-
*/
|
|
15
|
-
const setCustomElementsScopingSuffix = suffix => {
|
|
16
|
-
if (!suffix.match(/^[a-zA-Z0-9_-]+$/)) {
|
|
17
|
-
throw new Error("Only alphanumeric characters and dashes allowed for the scoping suffix");
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
suf = suffix;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Returns the currently set scoping suffix, or undefined if not set.
|
|
25
|
-
*
|
|
26
|
-
* @public
|
|
27
|
-
* @returns {String|undefined}
|
|
28
|
-
*/
|
|
29
|
-
const getCustomElementsScopingSuffix = () => {
|
|
30
|
-
return suf;
|
|
31
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
html,
|
|
3
|
+
svg,
|
|
4
|
+
unsafeStatic,
|
|
5
|
+
} from "lit-html/static.js";
|
|
32
6
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
throw new Error(`"rules.include" must be an array of regular expressions`);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (rules.exclude && (!Array.isArray(rules.exclude) || rules.exclude.some(rule => !(rule instanceof RegExp)))) {
|
|
52
|
-
throw new Error(`"rules.exclude" must be an array of regular expressions`);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
rules.exclude = rules.exclude || [];
|
|
56
|
-
rulesObj = rules;
|
|
57
|
-
tagsCache.clear(); // reset the cache upon setting new rules
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Returns the rules, governing which custom element tags to scope and which not. By default, all elements
|
|
62
|
-
* starting with "ui5-" are scoped. The default rules are: {include: [/^ui5-/]}.
|
|
63
|
-
*
|
|
64
|
-
* @public
|
|
65
|
-
* @returns {Object}
|
|
66
|
-
*/
|
|
67
|
-
const getCustomElementsScopingRules = () => {
|
|
68
|
-
return rulesObj;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Determines whether custom elements with the given tag should be scoped or not.
|
|
73
|
-
* The tag is first matched against the "include" rules and then against the "exclude" rules and the
|
|
74
|
-
* result is cached until new rules are set.
|
|
75
|
-
*
|
|
76
|
-
* @public
|
|
77
|
-
* @param tag
|
|
78
|
-
*/
|
|
79
|
-
const shouldScopeCustomElement = tag => {
|
|
80
|
-
if (!tagsCache.has(tag)) {
|
|
81
|
-
const result = rulesObj.include.some(rule => tag.match(rule)) && !rulesObj.exclude.some(rule => tag.match(rule));
|
|
82
|
-
tagsCache.set(tag, result);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return tagsCache.get(tag);
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Returns the currently set scoping suffix, if any and if the tag should be scoped, or undefined otherwise.
|
|
90
|
-
*
|
|
91
|
-
* @public
|
|
92
|
-
* @param tag
|
|
93
|
-
* @returns {String}
|
|
94
|
-
*/
|
|
95
|
-
const getEffectiveScopingSuffixForTag = tag => {
|
|
96
|
-
if (shouldScopeCustomElement(tag)) {
|
|
97
|
-
return getCustomElementsScopingSuffix();
|
|
98
|
-
}
|
|
99
|
-
};
|
|
7
|
+
import {
|
|
8
|
+
setCustomElementsScopingSuffix,
|
|
9
|
+
getCustomElementsScopingSuffix,
|
|
10
|
+
setCustomElementsScopingRules,
|
|
11
|
+
getCustomElementsScopingRules,
|
|
12
|
+
shouldScopeCustomElement,
|
|
13
|
+
getEffectiveScopingSuffixForTag,
|
|
14
|
+
} from "./CustomElementsScopeUtils.js";
|
|
15
|
+
import { registerFeature } from "./FeaturesRegistry.js";
|
|
16
|
+
|
|
17
|
+
registerFeature("LitStatic", {
|
|
18
|
+
html,
|
|
19
|
+
svg,
|
|
20
|
+
unsafeStatic,
|
|
21
|
+
});
|
|
100
22
|
|
|
101
23
|
export {
|
|
102
24
|
setCustomElementsScopingSuffix,
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
let suf;
|
|
2
|
+
let rulesObj = {
|
|
3
|
+
include: [/^ui5-/],
|
|
4
|
+
exclude: [],
|
|
5
|
+
};
|
|
6
|
+
const tagsCache = new Map(); // true/false means the tag should/should not be cached, undefined means not known yet.
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Sets the suffix to be used for custom elements scoping, f.e. pass "demo" to get tags such as "ui5-button-demo".
|
|
10
|
+
* Note: by default all tags starting with "ui5-" will be scoped, unless you change this by calling "setCustomElementsScopingRules"
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
* @param suffix The scoping suffix
|
|
14
|
+
*/
|
|
15
|
+
const setCustomElementsScopingSuffix = suffix => {
|
|
16
|
+
if (!suffix.match(/^[a-zA-Z0-9_-]+$/)) {
|
|
17
|
+
throw new Error("Only alphanumeric characters and dashes allowed for the scoping suffix");
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
suf = suffix;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Returns the currently set scoping suffix, or undefined if not set.
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
* @returns {String|undefined}
|
|
28
|
+
*/
|
|
29
|
+
const getCustomElementsScopingSuffix = () => {
|
|
30
|
+
return suf;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Sets the rules, governing which custom element tags to scope and which not, f.e.
|
|
35
|
+
* setCustomElementsScopingRules({include: [/^ui5-/]}, exclude: [/^ui5-mylib-/, /^ui5-carousel$/]);
|
|
36
|
+
* will scope all elements starting with "ui5-" but not the ones starting with "ui5-mylib-" and not "ui5-carousel".
|
|
37
|
+
*
|
|
38
|
+
* @public
|
|
39
|
+
* @param rules Object with "include" and "exclude" properties, both arrays of regular expressions. Note that "include"
|
|
40
|
+
* rules are applied first and "exclude" rules second.
|
|
41
|
+
*/
|
|
42
|
+
const setCustomElementsScopingRules = rules => {
|
|
43
|
+
if (!rules || !rules.include) {
|
|
44
|
+
throw new Error(`"rules" must be an object with at least an "include" property`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (!Array.isArray(rules.include) || rules.include.some(rule => !(rule instanceof RegExp))) {
|
|
48
|
+
throw new Error(`"rules.include" must be an array of regular expressions`);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (rules.exclude && (!Array.isArray(rules.exclude) || rules.exclude.some(rule => !(rule instanceof RegExp)))) {
|
|
52
|
+
throw new Error(`"rules.exclude" must be an array of regular expressions`);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
rules.exclude = rules.exclude || [];
|
|
56
|
+
rulesObj = rules;
|
|
57
|
+
tagsCache.clear(); // reset the cache upon setting new rules
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Returns the rules, governing which custom element tags to scope and which not. By default, all elements
|
|
62
|
+
* starting with "ui5-" are scoped. The default rules are: {include: [/^ui5-/]}.
|
|
63
|
+
*
|
|
64
|
+
* @public
|
|
65
|
+
* @returns {Object}
|
|
66
|
+
*/
|
|
67
|
+
const getCustomElementsScopingRules = () => {
|
|
68
|
+
return rulesObj;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Determines whether custom elements with the given tag should be scoped or not.
|
|
73
|
+
* The tag is first matched against the "include" rules and then against the "exclude" rules and the
|
|
74
|
+
* result is cached until new rules are set.
|
|
75
|
+
*
|
|
76
|
+
* @public
|
|
77
|
+
* @param tag
|
|
78
|
+
*/
|
|
79
|
+
const shouldScopeCustomElement = tag => {
|
|
80
|
+
if (!tagsCache.has(tag)) {
|
|
81
|
+
const result = rulesObj.include.some(rule => tag.match(rule)) && !rulesObj.exclude.some(rule => tag.match(rule));
|
|
82
|
+
tagsCache.set(tag, result);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return tagsCache.get(tag);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Returns the currently set scoping suffix, if any and if the tag should be scoped, or undefined otherwise.
|
|
90
|
+
*
|
|
91
|
+
* @public
|
|
92
|
+
* @param tag
|
|
93
|
+
* @returns {String}
|
|
94
|
+
*/
|
|
95
|
+
const getEffectiveScopingSuffixForTag = tag => {
|
|
96
|
+
if (shouldScopeCustomElement(tag)) {
|
|
97
|
+
return getCustomElementsScopingSuffix();
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export {
|
|
102
|
+
setCustomElementsScopingSuffix,
|
|
103
|
+
getCustomElementsScopingSuffix,
|
|
104
|
+
setCustomElementsScopingRules,
|
|
105
|
+
getCustomElementsScopingRules,
|
|
106
|
+
shouldScopeCustomElement,
|
|
107
|
+
getEffectiveScopingSuffixForTag,
|
|
108
|
+
};
|
package/dist/Device.js
CHANGED
|
@@ -103,6 +103,10 @@ const isIOS = () => {
|
|
|
103
103
|
return iOS;
|
|
104
104
|
};
|
|
105
105
|
|
|
106
|
+
const isAndroid = () => {
|
|
107
|
+
return android || androidPhone;
|
|
108
|
+
};
|
|
109
|
+
|
|
106
110
|
export {
|
|
107
111
|
supportsTouch,
|
|
108
112
|
isIE,
|
|
@@ -113,4 +117,5 @@ export {
|
|
|
113
117
|
isDesktop,
|
|
114
118
|
isCombi,
|
|
115
119
|
isIOS,
|
|
120
|
+
isAndroid,
|
|
116
121
|
};
|
package/dist/Keys.js
CHANGED
|
@@ -111,6 +111,8 @@ const isSpace = event => (event.key ? (event.key === "Spacebar" || event.key ===
|
|
|
111
111
|
|
|
112
112
|
const isSpaceShift = event => (event.key ? (event.key === "Spacebar" || event.key === " ") : event.keyCode === KeyCodes.SPACE) && checkModifierKeys(event, false, false, true);
|
|
113
113
|
|
|
114
|
+
const isSpaceCtrl = event => (event.key ? (event.key === "Spacebar" || event.key === " ") : event.keyCode === KeyCodes.SPACE) && checkModifierKeys(event, true, false, false);
|
|
115
|
+
|
|
114
116
|
const isLeft = event => (event.key ? (event.key === "ArrowLeft" || event.key === "Left") : event.keyCode === KeyCodes.ARROW_LEFT) && !hasModifierKeys(event);
|
|
115
117
|
|
|
116
118
|
const isRight = event => (event.key ? (event.key === "ArrowRight" || event.key === "Right") : event.keyCode === KeyCodes.ARROW_RIGHT) && !hasModifierKeys(event);
|
|
@@ -153,8 +155,12 @@ const isEnd = event => (event.key ? event.key === "End" : event.keyCode === KeyC
|
|
|
153
155
|
|
|
154
156
|
const isHomeCtrl = event => (event.key ? event.key === "Home" : event.keyCode === KeyCodes.HOME) && checkModifierKeys(event, true, false, false);
|
|
155
157
|
|
|
158
|
+
const isHomeShift = event => (event.key ? event.key === "Home" : event.keyCode === KeyCodes.HOME) && checkModifierKeys(event, false, false, true);
|
|
159
|
+
|
|
156
160
|
const isEndCtrl = event => (event.key ? event.key === "End" : event.keyCode === KeyCodes.END) && checkModifierKeys(event, true, false, false);
|
|
157
161
|
|
|
162
|
+
const isEndShift = event => (event.key ? event.key === "End" : event.keyCode === KeyCodes.END) && checkModifierKeys(event, false, false, true);
|
|
163
|
+
|
|
158
164
|
const isEscape = event => (event.key ? event.key === "Escape" || event.key === "Esc" : event.keyCode === KeyCodes.ESCAPE) && !hasModifierKeys(event);
|
|
159
165
|
|
|
160
166
|
const isTabNext = event => (event.key ? event.key === "Tab" : event.keyCode === KeyCodes.TAB) && !hasModifierKeys(event);
|
|
@@ -165,6 +171,12 @@ const isBackSpace = event => (event.key ? event.key === "Backspace" : event.keyC
|
|
|
165
171
|
|
|
166
172
|
const isDelete = event => (event.key ? event.key === "Delete" : event.keyCode === KeyCodes.DELETE) && !hasModifierKeys(event);
|
|
167
173
|
|
|
174
|
+
const isDeleteShift = event => (event.key ? event.key === "Delete" : event.keyCode === KeyCodes.DELETE) && checkModifierKeys(event, false, false, true);
|
|
175
|
+
|
|
176
|
+
const isInsertShift = event => (event.key ? event.key === "Insert" : event.keyCode === KeyCodes.DELETE) && checkModifierKeys(event, false, false, true);
|
|
177
|
+
|
|
178
|
+
const isInsertCtrl = event => (event.key ? event.key === "Insert" : event.keyCode === KeyCodes.DELETE) && checkModifierKeys(event, true, false, false);
|
|
179
|
+
|
|
168
180
|
const isPageUp = event => (event.key ? event.key === "PageUp" : event.keyCode === KeyCodes.PAGE_UP) && !hasModifierKeys(event);
|
|
169
181
|
|
|
170
182
|
const isPageDown = event => (event.key ? event.key === "PageDown" : event.keyCode === KeyCodes.PAGE_DOWN) && !hasModifierKeys(event);
|
|
@@ -213,6 +225,10 @@ const isShowByArrows = event => {
|
|
|
213
225
|
|
|
214
226
|
const isShift = event => event.key === "Shift" || event.keyCode === KeyCodes.SHIFT;
|
|
215
227
|
|
|
228
|
+
const isCtrlA = event => ((event.key === "A" || event.key === "a") || event.which === KeyCodes.A) && checkModifierKeys(event, true, false, false);
|
|
229
|
+
|
|
230
|
+
const isCtrlV = event => ((event.key === "V" || event.key === "v") || event.which === KeyCodes.V) && checkModifierKeys(event, true, false, false);
|
|
231
|
+
|
|
216
232
|
const hasModifierKeys = event => event.shiftKey || event.altKey || getCtrlKey(event);
|
|
217
233
|
|
|
218
234
|
const getCtrlKey = event => !!(event.metaKey || event.ctrlKey); // double negation doesn't have effect on boolean but ensures null and undefined are equivalent to false.
|
|
@@ -224,6 +240,7 @@ export {
|
|
|
224
240
|
isEnterShift,
|
|
225
241
|
isSpace,
|
|
226
242
|
isSpaceShift,
|
|
243
|
+
isSpaceCtrl,
|
|
227
244
|
isLeft,
|
|
228
245
|
isRight,
|
|
229
246
|
isUp,
|
|
@@ -248,6 +265,8 @@ export {
|
|
|
248
265
|
isMinus,
|
|
249
266
|
isHomeCtrl,
|
|
250
267
|
isEndCtrl,
|
|
268
|
+
isHomeShift,
|
|
269
|
+
isEndShift,
|
|
251
270
|
isEscape,
|
|
252
271
|
isTabNext,
|
|
253
272
|
isTabPrevious,
|
|
@@ -268,4 +287,9 @@ export {
|
|
|
268
287
|
isPageUpShiftCtrl,
|
|
269
288
|
isPageDownShiftCtrl,
|
|
270
289
|
isShift,
|
|
290
|
+
isCtrlA,
|
|
291
|
+
isCtrlV,
|
|
292
|
+
isDeleteShift,
|
|
293
|
+
isInsertShift,
|
|
294
|
+
isInsertCtrl,
|
|
271
295
|
};
|