@ui5/webcomponents-base 1.24.0-rc.3 → 1.24.0-rc.4

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/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["type PromiseResolve = (value: void | PromiseLike<void>) => void;\ntype Timeout = ReturnType<typeof setTimeout>;\ntype Interval = ReturnType<typeof setInterval>;\n\ntype StyleDataCSP = {\n\tcontent: string,\n\tpackageName: string,\n\tfileName: string,\n};\n\ntype StyleData = StyleDataCSP | string;\n\ntype ComponentStylesData = Array<ComponentStylesData> | Array<StyleData> | StyleData;\n\ntype ClassMapValue = Record<string, boolean>\n\ntype ClassMap = { [x: string] : ClassMapValue | ClassMap };\n\ntype PassiveEventListenerObject = EventListenerObject & { passive: boolean };\n\nexport type {\n\tPromiseResolve,\n\tTimeout,\n\tInterval,\n\tStyleData,\n\tStyleDataCSP,\n\tComponentStylesData,\n\tClassMap,\n\tClassMapValue,\n\tPassiveEventListenerObject,\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["type PromiseResolve = (value: void | PromiseLike<void>) => void;\ntype Timeout = ReturnType<typeof setTimeout>;\ntype Interval = ReturnType<typeof setInterval>;\n\ntype StyleDataCSP = {\n\tcontent: string,\n\tpackageName: string,\n\tfileName: string,\n};\n\ntype StyleData = StyleDataCSP | string;\n\ntype ComponentStylesData = Array<ComponentStylesData> | Array<StyleData> | StyleData;\n\ntype ClassMapValue = Record<string, boolean>\n\ntype ClassMap = { [x: string] : ClassMapValue | ClassMap };\n\ntype PassiveEventListenerObject = EventListenerObject & { passive: boolean };\n\ntype LowercaseString<T> = T extends string ? Lowercase<T> : never;\n\ntype AccessibilityInfo = {\n\t// The WAI-ARIA role of the component.\n\trole?: LowercaseString<string>,\n\n\t// A translated text that represents the component type. Used when several components share same role,\n\t// f.e. Select and ComboBox both have role=\"combobox\".\n\ttype?: LowercaseString<string>,\n\n\t// A translated text that represents relevant component description/state - value, placeholder, label, etc.\n\tdescription?: string,\n\n\t // The component disabled state.\n\tdisabled?: boolean,\n\n\t// The component readonly state.\n\treadonly?: boolean,\n\n\t// The component required state.\n\trequired?: boolean,\n\n\t// An array of elements, aggregated by the component\n\t// <b>Note:</b> Children should only be provided when it is helpful to understand the accessibility context.\n\tchildren?: Array<HTMLElement>,\n}\n\nexport type {\n\tAccessibilityInfo,\n\tPromiseResolve,\n\tTimeout,\n\tInterval,\n\tStyleData,\n\tStyleDataCSP,\n\tComponentStylesData,\n\tClassMap,\n\tClassMapValue,\n\tPassiveEventListenerObject,\n};\n"]}
@@ -71,6 +71,7 @@ declare const getClassCopy: (klass: typeof UI5Element, constructorCallback: () =
71
71
  readonly effectiveDir: string | undefined;
72
72
  readonly isUI5Element: boolean;
73
73
  readonly classes: import("../types.js").ClassMap;
74
+ readonly accessibilityInfo: import("../types.js").AccessibilityInfo;
74
75
  getStaticAreaItemDomRef(): Promise<ShadowRoot | null>;
75
76
  accessKey: string;
76
77
  readonly accessKeyLabel: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-base",
3
- "version": "1.24.0-rc.3",
3
+ "version": "1.24.0-rc.4",
4
4
  "description": "UI5 Web Components: webcomponents.base",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@openui5/sap.ui.core": "1.120.5",
48
- "@ui5/webcomponents-tools": "1.24.0-rc.3",
48
+ "@ui5/webcomponents-tools": "1.24.0-rc.4",
49
49
  "chromedriver": "^122.0.6",
50
50
  "clean-css": "^5.2.2",
51
51
  "copy-and-watch": "^0.1.5",
@@ -55,5 +55,5 @@
55
55
  "replace-in-file": "^6.3.5",
56
56
  "resolve": "^1.20.0"
57
57
  },
58
- "gitHead": "6d87e2d4ab7f291614bf56ab81422cfa5565bea1"
58
+ "gitHead": "58608f25543f7ec7287f673a607f867d457d9850"
59
59
  }
@@ -1,72 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2018 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
-
7
- /**
8
- * This is the original style-map.js directive from lit-html 2 with the only difference that "render" is not called even for the first rendering (update is used instead)
9
- */
10
-
11
- import { noChange } from 'lit-html';
12
- import { directive, Directive, PartType, } from 'lit-html/directive.js';
13
- class StyleMapDirective extends Directive {
14
- constructor(partInfo) {
15
- var _a;
16
- super(partInfo);
17
- if (partInfo.type !== PartType.ATTRIBUTE ||
18
- partInfo.name !== 'style' ||
19
- ((_a = partInfo.strings) === null || _a === void 0 ? void 0 : _a.length) > 2) {
20
- throw new Error('The `styleMap` directive must be used in the `style` attribute ' +
21
- 'and must be the only part in the attribute.');
22
- }
23
- }
24
- render(styleInfo) {
25
- return "";
26
- }
27
- update(part, [styleInfo]) {
28
- const { style } = part.element;
29
- if (this._previousStyleProperties === undefined) {
30
- this._previousStyleProperties = new Set();
31
- for (const name in styleInfo) {
32
- this._previousStyleProperties.add(name);
33
- }
34
- // return this.render(styleInfo);
35
- }
36
- // Remove old properties that no longer exist in styleInfo
37
- // We use forEach() instead of for-of so that re don't require down-level
38
- // iteration.
39
- this._previousStyleProperties.forEach((name) => {
40
- // If the name isn't in styleInfo or it's null/undefined
41
- if (styleInfo[name] == null) {
42
- this._previousStyleProperties.delete(name);
43
- if (name.includes('-')) {
44
- style.removeProperty(name);
45
- }
46
- else {
47
- // Note reset using empty string (vs null) as IE11 does not always
48
- // reset via null (https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style#setting_styles)
49
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
50
- style[name] = '';
51
- }
52
- }
53
- });
54
- // Add or update properties
55
- for (const name in styleInfo) {
56
- const value = styleInfo[name];
57
- if (value != null) {
58
- this._previousStyleProperties.add(name);
59
- if (name.includes('-')) {
60
- style.setProperty(name, value);
61
- }
62
- else {
63
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
64
- style[name] = value;
65
- }
66
- }
67
- }
68
- return noChange;
69
- }
70
- }
71
-
72
- export const styleMap = directive(StyleMapDirective);