@ui5/webcomponents-base 2.8.1-rc.0 → 2.9.0-rc.1
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 +22 -0
- package/cypress/specs/ConfigurationScript.cy.tsx +20 -4
- package/cypress/specs/ConfigurationURL.cy.tsx +20 -1
- package/cypress/specs/CustomMount.cy.tsx +0 -25
- package/cypress/support/commands.ts +39 -0
- package/cypress/support/component-index.html +12 -0
- package/cypress/support/component.ts +36 -0
- package/cypress/tsconfig.json +0 -1
- package/cypress.config.js +1 -1
- package/dist/.tsbuildinfobuild +1 -1
- package/dist/generated/VersionInfo.js +5 -5
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/prod/generated/VersionInfo.js +1 -1
- package/dist/prod/generated/VersionInfo.js.map +1 -1
- package/dist/prod/util/dragAndDrop/findClosestPosition.js +1 -1
- package/dist/prod/util/dragAndDrop/findClosestPosition.js.map +3 -3
- package/dist/util/dragAndDrop/findClosestPosition.d.ts +2 -1
- package/dist/util/dragAndDrop/findClosestPosition.js +45 -41
- package/dist/util/dragAndDrop/findClosestPosition.js.map +1 -1
- package/package-scripts.cjs +2 -2
- package/package.json +10 -5
- package/tsconfig.json +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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.9.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v2.9.0-rc.0...v2.9.0-rc.1) (2025-03-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* keep export paths in base in sync ([#11082](https://github.com/SAP/ui5-webcomponents/issues/11082)) ([8620ac8](https://github.com/SAP/ui5-webcomponents/commit/8620ac8823256ecf34ba70b4c06210253a3e5d14))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [2.9.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.8.1-rc.0...v2.9.0-rc.0) (2025-03-13)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **ui5-tabcontainer:** allow browser refresh shortcut to work ([#11035](https://github.com/SAP/ui5-webcomponents/issues/11035)) ([a4a0f02](https://github.com/SAP/ui5-webcomponents/commit/a4a0f028f44a60fd6caea0f4ecdac49b0289270d))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [2.8.1-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.8.0...v2.8.1-rc.0) (2025-03-06)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @ui5/webcomponents-base
|
|
@@ -44,21 +44,37 @@ describe("Configuration script", () => {
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
before(() => {
|
|
47
|
-
cy.
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
cy.window()
|
|
48
|
+
.then($el => {
|
|
49
|
+
const scriptElement = document.createElement("script");
|
|
50
|
+
scriptElement.type = "application/json";
|
|
51
|
+
scriptElement.setAttribute("data-ui5-config", "true");
|
|
52
|
+
scriptElement.innerHTML = JSON.stringify(configurationObject);
|
|
53
|
+
return $el.document.head.append(scriptElement);
|
|
54
|
+
})
|
|
55
|
+
|
|
50
56
|
|
|
51
57
|
cy.wrap({ resetConfiguration })
|
|
52
58
|
.invoke("resetConfiguration", true);
|
|
53
59
|
|
|
60
|
+
cy.mount(<TestGeneric />);
|
|
54
61
|
cy.get("script[data-ui5-config]")
|
|
55
62
|
.should("exist")
|
|
56
63
|
.then($el => {
|
|
57
|
-
return $el.get(0)
|
|
64
|
+
return $el.get(0)?.innerHTML;
|
|
58
65
|
})
|
|
59
66
|
.should("equal", JSON.stringify(configurationObject));
|
|
60
67
|
});
|
|
61
68
|
|
|
69
|
+
after(() => {
|
|
70
|
+
cy.window()
|
|
71
|
+
.then($el => {
|
|
72
|
+
const scriptElement = $el.document.head.querySelector("script[data-ui5-config]");
|
|
73
|
+
|
|
74
|
+
scriptElement?.remove();
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
|
|
62
78
|
it("getLanguage", () => {
|
|
63
79
|
cy.wrap({ getLanguage })
|
|
64
80
|
.invoke("getLanguage")
|
|
@@ -5,6 +5,7 @@ import { getLanguage } from "../../src/config/Language.js";
|
|
|
5
5
|
import { getCalendarType } from "../../src/config/CalendarType.js";
|
|
6
6
|
import { getTheme } from "../../src/config/Theme.js";
|
|
7
7
|
import { getAnimationMode } from "../../src/config/AnimationMode.js";
|
|
8
|
+
import AnimationMode from "../../src/types/AnimationMode.js";
|
|
8
9
|
import { getThemeRoot } from "../../src/config/ThemeRoot.js";
|
|
9
10
|
|
|
10
11
|
describe("Some settings can be set via SAP UI URL params", () => {
|
|
@@ -47,7 +48,7 @@ describe("Some settings can be set via SAP UI URL params", () => {
|
|
|
47
48
|
it("Tests that animationMode is applied", () => {
|
|
48
49
|
cy.wrap({ getAnimationMode })
|
|
49
50
|
.invoke("getAnimationMode")
|
|
50
|
-
.should("equal",
|
|
51
|
+
.should("equal", AnimationMode.Basic);
|
|
51
52
|
});
|
|
52
53
|
});
|
|
53
54
|
|
|
@@ -55,6 +56,16 @@ describe("Different themeRoot configurations", () => {
|
|
|
55
56
|
it("Allowed theme root", () => {
|
|
56
57
|
const searchParams = "sap-ui-theme=sap_horizon_hcb@https://example.com";
|
|
57
58
|
|
|
59
|
+
// All allowed theme roots need to be described inside the meta tag.
|
|
60
|
+
cy.window()
|
|
61
|
+
.then($el => {
|
|
62
|
+
const metaTag = document.createElement("meta");
|
|
63
|
+
metaTag.name = "sap-allowedThemeOrigins";
|
|
64
|
+
metaTag.content = "https://example.com";
|
|
65
|
+
|
|
66
|
+
$el.document.head.append(metaTag);
|
|
67
|
+
})
|
|
68
|
+
|
|
58
69
|
cy.stub(internals, "search", () => {
|
|
59
70
|
return searchParams;
|
|
60
71
|
});
|
|
@@ -71,6 +82,14 @@ describe("Different themeRoot configurations", () => {
|
|
|
71
82
|
cy.wrap({ getThemeRoot })
|
|
72
83
|
.invoke("getThemeRoot")
|
|
73
84
|
.should("equal", "https://example.com/UI5/");
|
|
85
|
+
|
|
86
|
+
// All allowed theme roots need to be described inside the meta tag.
|
|
87
|
+
cy.window()
|
|
88
|
+
.then($el => {
|
|
89
|
+
const metaTag = $el.document.head.querySelector("[name='sap-allowedThemeOrigins']");
|
|
90
|
+
|
|
91
|
+
metaTag?.remove();
|
|
92
|
+
})
|
|
74
93
|
});
|
|
75
94
|
|
|
76
95
|
it("Unallowed theme root", () => {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { getAnimationMode } from "../../src/config/AnimationMode.js";
|
|
2
|
-
|
|
3
1
|
describe("Custom mount", () => {
|
|
4
2
|
it("mount", () => {
|
|
5
3
|
cy.mount(<button>Test</button>);
|
|
@@ -8,27 +6,4 @@ describe("Custom mount", () => {
|
|
|
8
6
|
.should("exist")
|
|
9
7
|
.and("have.text", "Test");
|
|
10
8
|
});
|
|
11
|
-
|
|
12
|
-
it("mount with configuration", () => {
|
|
13
|
-
const configurationObject = { "animationMode": "basic" };
|
|
14
|
-
|
|
15
|
-
cy.mount(<button>Test with configuration</button>, {
|
|
16
|
-
ui5Configuration: configurationObject,
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
cy.get("button")
|
|
20
|
-
.should("exist")
|
|
21
|
-
.and("have.text", "Test with configuration");
|
|
22
|
-
|
|
23
|
-
cy.get("script[data-ui5-config]")
|
|
24
|
-
.should("exist")
|
|
25
|
-
.then($el => {
|
|
26
|
-
return $el.get(0).innerHTML;
|
|
27
|
-
})
|
|
28
|
-
.should("equal", JSON.stringify(configurationObject));
|
|
29
|
-
|
|
30
|
-
cy.wrap({ getAnimationMode })
|
|
31
|
-
.invoke("getAnimationMode")
|
|
32
|
-
.should("equal", configurationObject.animationMode);
|
|
33
|
-
});
|
|
34
9
|
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
// ***********************************************
|
|
3
|
+
// This example commands.ts shows you how to
|
|
4
|
+
// create various custom commands and overwrite
|
|
5
|
+
// existing commands.
|
|
6
|
+
//
|
|
7
|
+
// For more comprehensive examples of custom
|
|
8
|
+
// commands please read more here:
|
|
9
|
+
// https://on.cypress.io/custom-commands
|
|
10
|
+
// ***********************************************
|
|
11
|
+
//
|
|
12
|
+
//
|
|
13
|
+
// -- This is a parent command --
|
|
14
|
+
// Cypress.Commands.add('login', (email, password) => { ... })
|
|
15
|
+
//
|
|
16
|
+
//
|
|
17
|
+
// -- This is a child command --
|
|
18
|
+
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
|
19
|
+
//
|
|
20
|
+
//
|
|
21
|
+
// -- This is a dual command --
|
|
22
|
+
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
23
|
+
//
|
|
24
|
+
//
|
|
25
|
+
// -- This will overwrite an existing command --
|
|
26
|
+
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
|
27
|
+
//
|
|
28
|
+
// declare global {
|
|
29
|
+
// namespace Cypress {
|
|
30
|
+
// interface Chainable {
|
|
31
|
+
// login(email: string, password: string): Chainable<void>
|
|
32
|
+
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
33
|
+
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
34
|
+
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
|
35
|
+
// }
|
|
36
|
+
// }
|
|
37
|
+
// }
|
|
38
|
+
|
|
39
|
+
import "@ui5/cypress-internal/commands.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
+
<title>Components App</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div data-cy-root></div>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// ***********************************************************
|
|
2
|
+
// This example support/component.ts is processed and
|
|
3
|
+
// loaded automatically before your test files.
|
|
4
|
+
//
|
|
5
|
+
// This is a great place to put global configuration and
|
|
6
|
+
// behavior that modifies Cypress.
|
|
7
|
+
//
|
|
8
|
+
// You can change the location of this file or turn off
|
|
9
|
+
// automatically serving support files with the
|
|
10
|
+
// 'supportFile' configuration option.
|
|
11
|
+
//
|
|
12
|
+
// You can read more here:
|
|
13
|
+
// https://on.cypress.io/configuration
|
|
14
|
+
// ***********************************************************
|
|
15
|
+
|
|
16
|
+
// Import commands.js using ES2015 syntax:
|
|
17
|
+
import './commands'
|
|
18
|
+
|
|
19
|
+
import { mount } from '@ui5/cypress-ct-ui5-webc'
|
|
20
|
+
|
|
21
|
+
// Augment the Cypress namespace to include type definitions for
|
|
22
|
+
// your custom command.
|
|
23
|
+
// Alternatively, can be defined in cypress/support/component.d.ts
|
|
24
|
+
// with a <reference path="./component" /> at the top of your spec.
|
|
25
|
+
declare global {
|
|
26
|
+
namespace Cypress {
|
|
27
|
+
interface Chainable {
|
|
28
|
+
mount: typeof mount
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
Cypress.Commands.add('mount', mount)
|
|
34
|
+
|
|
35
|
+
// Example use:
|
|
36
|
+
// cy.mount(MyComponent)
|
package/cypress/tsconfig.json
CHANGED
package/cypress.config.js
CHANGED