@ui5/webcomponents-tools 2.10.0-rc.2 → 2.10.0-rc.3

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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
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
+ # [2.10.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v2.10.0-rc.2...v2.10.0-rc.3) (2025-05-01)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * escape backslash when processing component's css ([#11425](https://github.com/SAP/ui5-webcomponents/issues/11425)) ([2c4dc74](https://github.com/SAP/ui5-webcomponents/commit/2c4dc744fb06f79ec77df6cbe725723a75eecb87))
12
+
13
+
14
+ ### Features
15
+
16
+ * **ui5-button:** make click button preventable ([#11318](https://github.com/SAP/ui5-webcomponents/issues/11318)) ([1f4aa92](https://github.com/SAP/ui5-webcomponents/commit/1f4aa927d2841e0c51f665ab2bdb851b1d030c35))
17
+
18
+
19
+
20
+
21
+
6
22
  # [2.10.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v2.10.0-rc.1...v2.10.0-rc.2) (2025-04-24)
7
23
 
8
24
  **Note:** Version bump only for package @ui5/webcomponents-tools
@@ -131,23 +131,6 @@ function processClass(ts, classNode, moduleDoc) {
131
131
  currClass.events = findAllDecorators(classNode, ["event", "eventStrict"])
132
132
  ?.map(event => processEvent(ts, event, classNode, moduleDoc));
133
133
 
134
- // TODO: remove after changing Button's click to custom event.
135
- // Currently, the Button emits a native click that doesn't need and doesn't have an event decorator,
136
- // so we add it manually to the events array.
137
- if (currClass.tagName === "ui5-button") {
138
- currClass.events.push({
139
- "name": "click",
140
- "_ui5privacy": "public",
141
- "type": {
142
- "text": "Event"
143
- },
144
- "description": "Fired when the component is activated either with a\nmouse/tap or by using the Enter or Space key.\n\n**Note:** The event will not be fired if the `disabled`\nproperty is set to `true`.",
145
- "_ui5Cancelable": false,
146
- "_ui5allowPreventDefault": false,
147
- "_ui5Bubbles": true
148
- });
149
- }
150
-
151
134
  const filename = classNode.getSourceFile().fileName;
152
135
  const sourceFile = typeProgram.getSourceFile(filename);
153
136
  const tsProgramClassNode = sourceFile.statements.find(statement => ts.isClassDeclaration(statement) && statement.name?.text === classNode.name?.text);
@@ -4,14 +4,14 @@ const Component = require("./Component.js");
4
4
  const ComponentTemplate= require("./ComponentTemplate.js");
5
5
 
6
6
  /**
7
- * Hyphanates the given PascalCase string, f.e.:
8
- * Foo -> "my-foo" (adds preffix)
9
- * FooBar -> "foo-bar"
7
+ * Hyphanates the given PascalCase string and adds prefix, f.e.:
8
+ * Foo -> "my-foo"
9
+ * FooBar -> "my-foo-bar"
10
10
  */
11
11
  const hyphaneteComponentName = (componentName) => {
12
12
  const result = componentName.replace(/([a-z])([A-Z])/g, '$1-$2' ).toLowerCase();
13
13
 
14
- return result.includes("-") ? result : `my-${result}`;
14
+ return `my-${result}`;
15
15
  };
16
16
 
17
17
  /**
@@ -75,7 +75,7 @@ const generateFiles = (componentName, tagName, library, packageName) => {
75
75
 
76
76
  // Change the color of the output
77
77
  console.warn('\x1b[33m%s\x1b[0m', `
78
- Now, import the component via: "import ${componentName} from ./${componentName}.js";
78
+ Now, import the component via: "import ${componentName} from "./${componentName}.js";
79
79
  And, add it to your HTML: <${tagName}></${tagName}>.`);
80
80
  }
81
81
 
@@ -22,7 +22,8 @@ let customPlugin = {
22
22
  build.onEnd(result => {
23
23
  result.outputFiles.forEach(async f => {
24
24
  // scoping
25
- const newText = scopeVariables(f.text, packageJSON);
25
+ let newText = scopeVariables(f.text, packageJSON);
26
+ newText = newText.replaceAll(/\\/g, "\\\\"); // Escape backslashes as they might appear in css rules
26
27
  await mkdir(path.dirname(f.path), {recursive: true});
27
28
  writeFile(f.path, newText);
28
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-tools",
3
- "version": "2.10.0-rc.2",
3
+ "version": "2.10.0-rc.3",
4
4
  "description": "UI5 Web Components: webcomponents.tools",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -82,5 +82,5 @@
82
82
  "esbuild": "^0.25.0",
83
83
  "yargs": "^17.5.1"
84
84
  },
85
- "gitHead": "b898559a591c2febe8dbd0cb99a15c88eac293b2"
85
+ "gitHead": "930bdc688d96e3bacf4b3d77d7e1d5388c90be41"
86
86
  }