diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 1b8856979fab..bc0c7e9bb63f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -28,7 +28,7 @@ body: id: example attributes: label: Isolated Example - description: Please provide a link to an isolated example if possible by forking [this codesandbox](https://codesandbox.io/s/71r1x5o51q?fontsize=14&module=%2Findex.html), or [this stackblitz](https://stackblitz.com/edit/js-vsrpnb?file=index.js,index.html). + description: Please provide a link to an isolated example if possible by forking [this stackblitz](https://stackblitz.com/edit/js-vsrpnb?file=index.js,index.html). validations: required: false - type: textarea diff --git a/.github/workflows/ci-test-storybook.yaml b/.github/workflows/ci-test-storybook.yaml index 55f28be4de3d..c2abaa8a6d86 100644 --- a/.github/workflows/ci-test-storybook.yaml +++ b/.github/workflows/ci-test-storybook.yaml @@ -10,8 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4.0.1 with: node-version: 18 cache: 'yarn' diff --git a/.github/workflows/ci-test.yaml b/.github/workflows/ci-test.yaml index 6a9cba4ff87b..101850942131 100644 --- a/.github/workflows/ci-test.yaml +++ b/.github/workflows/ci-test.yaml @@ -12,9 +12,9 @@ jobs: matrix: suite: ['base', 'main:suite-1', 'main:suite-2', 'fiori'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4.0.1 with: node-version: 18 cache: 'yarn' @@ -26,4 +26,4 @@ jobs: run: yarn ci:testbuild - name: Test - run: yarn test:${{ matrix.suite }} + run: yarn ci:test:${{ matrix.suite }} diff --git a/.github/workflows/deploy-latest-playground-on-push.yaml b/.github/workflows/deploy-latest-playground-on-push.yaml index c204d9d7902d..1b316799c373 100644 --- a/.github/workflows/deploy-latest-playground-on-push.yaml +++ b/.github/workflows/deploy-latest-playground-on-push.yaml @@ -8,8 +8,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4.0.1 with: node-version: 18 cache: 'yarn' diff --git a/.github/workflows/deploy-latest-playground-on-release.yaml b/.github/workflows/deploy-latest-playground-on-release.yaml index ff8017b849d1..fd6f8ae67372 100644 --- a/.github/workflows/deploy-latest-playground-on-release.yaml +++ b/.github/workflows/deploy-latest-playground-on-release.yaml @@ -11,8 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4.0.1 with: node-version: 18 cache: 'yarn' diff --git a/.github/workflows/deploy-main-playground-on-push.yaml b/.github/workflows/deploy-main-playground-on-push.yaml index 5f3d40c07ea8..3382c7811dd0 100644 --- a/.github/workflows/deploy-main-playground-on-push.yaml +++ b/.github/workflows/deploy-main-playground-on-push.yaml @@ -8,8 +8,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4.0.1 with: node-version: 18 cache: 'yarn' diff --git a/.github/workflows/deploy-main-playground.yaml b/.github/workflows/deploy-main-playground.yaml index 2b07699d08c5..a7cf4de42498 100644 --- a/.github/workflows/deploy-main-playground.yaml +++ b/.github/workflows/deploy-main-playground.yaml @@ -8,8 +8,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4.0.1 with: node-version: 18 cache: 'yarn' diff --git a/.github/workflows/issues-handling.yaml b/.github/workflows/issues-handling.yaml index 51bf62a0ef4d..30eda2ea471e 100644 --- a/.github/workflows/issues-handling.yaml +++ b/.github/workflows/issues-handling.yaml @@ -6,11 +6,11 @@ jobs: test-issue-comment: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }} fetch-depth: 0 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4.0.1 with: node-version: 18 cache: 'yarn' diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 214bf517e2b0..eb4242c51d27 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -9,9 +9,9 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4.0.1 with: node-version: 18 cache: 'yarn' diff --git a/.github/workflows/release-downport.yaml b/.github/workflows/release-downport.yaml index f07db4f07c6e..2be3f2a8567e 100644 --- a/.github/workflows/release-downport.yaml +++ b/.github/workflows/release-downport.yaml @@ -12,11 +12,11 @@ jobs: build-and-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }} fetch-depth: 0 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4.0.1 with: node-version: 18 cache: 'yarn' diff --git a/.github/workflows/release-experimental.yaml b/.github/workflows/release-experimental.yaml index 9a72184832db..7e1782df441f 100644 --- a/.github/workflows/release-experimental.yaml +++ b/.github/workflows/release-experimental.yaml @@ -7,8 +7,8 @@ jobs: build-and-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4.0.1 with: node-version: 18 cache: 'yarn' diff --git a/.github/workflows/release-rc-auto.yaml b/.github/workflows/release-rc-auto.yaml index 98245981c4eb..5fc10fcb8c96 100644 --- a/.github/workflows/release-rc-auto.yaml +++ b/.github/workflows/release-rc-auto.yaml @@ -8,11 +8,11 @@ jobs: build-and-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }} fetch-depth: 0 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4.0.1 with: node-version: 18 cache: 'yarn' diff --git a/.github/workflows/release-rc.yaml b/.github/workflows/release-rc.yaml index cc149d2242a3..da831dfff081 100644 --- a/.github/workflows/release-rc.yaml +++ b/.github/workflows/release-rc.yaml @@ -7,11 +7,11 @@ jobs: build-and-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }} fetch-depth: 0 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4.0.1 with: node-version: 18 cache: 'yarn' diff --git a/.github/workflows/release-stable.yaml b/.github/workflows/release-stable.yaml index a0e430d0fc74..bdd2b1b9f690 100644 --- a/.github/workflows/release-stable.yaml +++ b/.github/workflows/release-stable.yaml @@ -17,11 +17,11 @@ jobs: build-and-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }} fetch-depth: 0 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4.0.1 with: node-version: 18 cache: 'yarn' diff --git a/.github/workflows/reset-gh-pages.yaml b/.github/workflows/reset-gh-pages.yaml index 789d4273db27..db2f1f717394 100644 --- a/.github/workflows/reset-gh-pages.yaml +++ b/.github/workflows/reset-gh-pages.yaml @@ -8,7 +8,7 @@ jobs: reset-gh-pages: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }} fetch-depth: 0 diff --git a/.gitignore b/.gitignore index a71536e0d67a..5f6ccc114b03 100644 --- a/.gitignore +++ b/.gitignore @@ -83,6 +83,7 @@ packages/playground/docs/FAQ.md # Ignore the generated storybook related files packages/playground/_stories/**/*/argTypes.ts +packages/playground/_stories/**/*/*Overview.mdx packages/playground/.storybook/custom-elements.json packages/playground/docs/storybook/**/* packages/playground/docs/storybook-pages/**/* diff --git a/CHANGELOG.md b/CHANGELOG.md index e91b6a81dd6b..0c4a4a75305c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,81 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.22.0](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.3...v1.22.0) (2024-02-05) + + +### Bug Fixes + +* **ui5-checkbox:** improved key down behavior for readonly state ([#8226](https://github.com/SAP/ui5-webcomponents/issues/8226)) ([faec0ef](https://github.com/SAP/ui5-webcomponents/commit/faec0ef3bb09a05008bbfd091c289a575819858c)), closes [#7807](https://github.com/SAP/ui5-webcomponents/issues/7807) +* **ui5-list:** correct load-more marker visibility ([#8224](https://github.com/SAP/ui5-webcomponents/issues/8224)) ([3d04140](https://github.com/SAP/ui5-webcomponents/commit/3d041401977f036c74d308eb37eeb3caeb900457)) + + + + + +# [1.22.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.2...v1.22.0-rc.3) (2024-02-01) + + +### Bug Fixes + +* build ([#8191](https://github.com/SAP/ui5-webcomponents/issues/8191)) ([5af9560](https://github.com/SAP/ui5-webcomponents/commit/5af956088195cd4de81f9c1ec82f1b937b3498aa)) +* **framework:** property with empty object as default value ([#8215](https://github.com/SAP/ui5-webcomponents/issues/8215)) ([b4e1eba](https://github.com/SAP/ui5-webcomponents/commit/b4e1ebae03a5ea87567ffc07516bb76a36d6734a)) +* release build ([#8222](https://github.com/SAP/ui5-webcomponents/issues/8222)) ([27042ac](https://github.com/SAP/ui5-webcomponents/commit/27042ac90443dea8d5900d1c5bfa5bc93d365da0)) +* **ui5-breadcrumbs:** render current location as link ([#8206](https://github.com/SAP/ui5-webcomponents/issues/8206)) ([01f5542](https://github.com/SAP/ui5-webcomponents/commit/01f5542b8aa1b8c309076ec45b547ce45320d95a)) +* **ui5-combobox:** fix failing test ([#8220](https://github.com/SAP/ui5-webcomponents/issues/8220)) ([888bcd0](https://github.com/SAP/ui5-webcomponents/commit/888bcd02ed1d08872fffe29ec7964734538fe93d)) +* **ui5-dialog:** include the opacity in the background color ([#8181](https://github.com/SAP/ui5-webcomponents/issues/8181)) ([3666e56](https://github.com/SAP/ui5-webcomponents/commit/3666e566287deb28c1eaa5554394303e93867e97)) +* **ui5-li-notification-group:** correct collapse button shape on Compact mode ([#8166](https://github.com/SAP/ui5-webcomponents/issues/8166)) ([226d975](https://github.com/SAP/ui5-webcomponents/commit/226d975204f0755daf25710ad639ebfbd2e8fdd4)), closes [#8059](https://github.com/SAP/ui5-webcomponents/issues/8059) +* **ui5-popover:** arrow is now centered on close to the edge opener ([#8205](https://github.com/SAP/ui5-webcomponents/issues/8205)) ([d17a4bc](https://github.com/SAP/ui5-webcomponents/commit/d17a4bc05062328317e9a09662b22ee21a7a4b31)) +* **ui5-popover:** correct position of the footer ([#8180](https://github.com/SAP/ui5-webcomponents/issues/8180)) ([a5a2f8b](https://github.com/SAP/ui5-webcomponents/commit/a5a2f8bbe5138a713f1ec369ab5dd3d31c2b3be1)), closes [#8009](https://github.com/SAP/ui5-webcomponents/issues/8009) +* **ui5-shellbar:** allow prevent default 'menu-item-click' action ([#8172](https://github.com/SAP/ui5-webcomponents/issues/8172)) ([d16efb6](https://github.com/SAP/ui5-webcomponents/commit/d16efb624f4d581bfa413cb96a4eebd4b9ce29d8)) +* **ui5-split-button:** use correct params ([#8140](https://github.com/SAP/ui5-webcomponents/issues/8140)) ([ddc5fe3](https://github.com/SAP/ui5-webcomponents/commit/ddc5fe31b2cd8bb8c18d8025bdb2036a93fe8bdb)) +* **ui5-tab-container:** correct two-click area separator height ([#8168](https://github.com/SAP/ui5-webcomponents/issues/8168)) ([19c4df1](https://github.com/SAP/ui5-webcomponents/commit/19c4df1205b061913c3762fa27c58b48abba7db8)) +* **ui5-toast:** check whether the event key property exists ([#8209](https://github.com/SAP/ui5-webcomponents/issues/8209)) ([43d32f0](https://github.com/SAP/ui5-webcomponents/commit/43d32f0ec5f122d7cf4ffbfde15c1a26b174065b)) +* **ui5-toolbar-select:** options added to bundle ([#8183](https://github.com/SAP/ui5-webcomponents/issues/8183)) ([a2c37e4](https://github.com/SAP/ui5-webcomponents/commit/a2c37e4fdcc084a19ac325a61636a0d1dd555974)) +* **ui5-toolbar:** fire noConflict events correctly ([#8169](https://github.com/SAP/ui5-webcomponents/issues/8169)) ([6890d94](https://github.com/SAP/ui5-webcomponents/commit/6890d94bf51a2cba4c900f854321f3b32c895ee7)) + + +### Features + +* add dom shim so importing components in SSR works ([#8184](https://github.com/SAP/ui5-webcomponents/issues/8184)) ([ca49674](https://github.com/SAP/ui5-webcomponents/commit/ca49674e046bd74842100245db2cea61d53e2df0)) +* **ui5-date-picker:** introduce value-state-change event ([#8133](https://github.com/SAP/ui5-webcomponents/issues/8133)) ([69143b0](https://github.com/SAP/ui5-webcomponents/commit/69143b047f98f93f5a9debdf88a6e35b02cb674a)), closes [#8005](https://github.com/SAP/ui5-webcomponents/issues/8005) +* **ui5-datetime-picker:** replace time part wheelsliders with clocks ([#8129](https://github.com/SAP/ui5-webcomponents/issues/8129)) ([9041e16](https://github.com/SAP/ui5-webcomponents/commit/9041e16f70c28406c1cab6b568f371d0d7e82fc7)) +* **ui5-illustrated-message:** new illustration type ([#8204](https://github.com/SAP/ui5-webcomponents/issues/8204)) ([9bcf589](https://github.com/SAP/ui5-webcomponents/commit/9bcf58930ce9d8a65507e173d2af99c34e644e78)) +* **ui5-illustrated-message:** new illustration type ([#8207](https://github.com/SAP/ui5-webcomponents/issues/8207)) ([6473ffe](https://github.com/SAP/ui5-webcomponents/commit/6473ffebd6001404c80cd06849e9135c6c350016)) +* **ui5-shellbar:** introducing Joule ([#8036](https://github.com/SAP/ui5-webcomponents/issues/8036)) ([ed5c20f](https://github.com/SAP/ui5-webcomponents/commit/ed5c20ffb42dd5f3eb81f77819fd40a9f7abbe08)) +* **ui5-shellbar:** new event added ([#8197](https://github.com/SAP/ui5-webcomponents/issues/8197)) ([4e864e9](https://github.com/SAP/ui5-webcomponents/commit/4e864e913597cdcc5d783012b8866afc1cde51a1)), closes [#6273](https://github.com/SAP/ui5-webcomponents/issues/6273) +* **ui5-toast:** enable overstyling ([#8170](https://github.com/SAP/ui5-webcomponents/issues/8170)) ([3bfdb85](https://github.com/SAP/ui5-webcomponents/commit/3bfdb8509f4ad598a977dd11ed6d273b039c2d2f)), closes [#7596](https://github.com/SAP/ui5-webcomponents/issues/7596) + + + + + +# [1.22.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.1...v1.22.0-rc.2) (2024-01-25) + + +### Bug Fixes + +* add [@allow](https://github.com/allow)PreventDefault where needed ([#8148](https://github.com/SAP/ui5-webcomponents/issues/8148)) ([5d6eb44](https://github.com/SAP/ui5-webcomponents/commit/5d6eb442dc433bdc2000a5845b8087915c8e1097)) +* **ui5-badge:** correct text-shadow for Quartz dark and Quartz high contrast themes ([#8142](https://github.com/SAP/ui5-webcomponents/issues/8142)) ([e1f4e82](https://github.com/SAP/ui5-webcomponents/commit/e1f4e82be6bc244e3a1fcbdbb4bf133603e4565b)), closes [#8126](https://github.com/SAP/ui5-webcomponents/issues/8126) +* **ui5-color-palette:** add i18n text for default color button's text ([#8157](https://github.com/SAP/ui5-webcomponents/issues/8157)) ([7b4dac3](https://github.com/SAP/ui5-webcomponents/commit/7b4dac34928b70adf1f67481854329fff3838e46)) +* **ui5-date-time-picker:** align calculations with density change ([#8090](https://github.com/SAP/ui5-webcomponents/issues/8090)) ([bc035bb](https://github.com/SAP/ui5-webcomponents/commit/bc035bbc10b2ca2055d5c8698cc3054da12bf794)), closes [#7992](https://github.com/SAP/ui5-webcomponents/issues/7992) +* **ui5-list:** load-more event fired correctly ([#8143](https://github.com/SAP/ui5-webcomponents/issues/8143)) ([c483a28](https://github.com/SAP/ui5-webcomponents/commit/c483a2889e749e1b464b386ba8dc098633ff3c3c)) +* **ui5-multi-combobox:** select all implementation ([#8066](https://github.com/SAP/ui5-webcomponents/issues/8066)) ([7e8a355](https://github.com/SAP/ui5-webcomponents/commit/7e8a3552c047f71d8e08a4dfaaa15dd4af7343c4)) +* **ui5-multi-input:** fix multiple token addition ([#8144](https://github.com/SAP/ui5-webcomponents/issues/8144)) ([94590e1](https://github.com/SAP/ui5-webcomponents/commit/94590e127cb58e4f29a4d93955a984aad89873c0)), closes [#8049](https://github.com/SAP/ui5-webcomponents/issues/8049) +* **ui5-side-navigation:** allow overstyling of width and border-radius ([#8081](https://github.com/SAP/ui5-webcomponents/issues/8081)) ([392f118](https://github.com/SAP/ui5-webcomponents/commit/392f11815b5e85d22949b4008f0a95c64e16d694)) +* **ui5-side-navigation:** correct text placement on items without icon ([#8154](https://github.com/SAP/ui5-webcomponents/issues/8154)) ([6bb45a9](https://github.com/SAP/ui5-webcomponents/commit/6bb45a94e5e52fc64fe8b816d1135e97ef6d85f3)), closes [#8131](https://github.com/SAP/ui5-webcomponents/issues/8131) +* **ui5-textarea:** prevent page height from growing on large input ([#8118](https://github.com/SAP/ui5-webcomponents/issues/8118)) ([7a819c8](https://github.com/SAP/ui5-webcomponents/commit/7a819c88b17ce0ad5ed349381a779f3964da61c9)), closes [#8082](https://github.com/SAP/ui5-webcomponents/issues/8082) + + +### Features + +* **ui5-combobox, ui5-multi-combobox:** clear icon implementation ([#8038](https://github.com/SAP/ui5-webcomponents/issues/8038)) ([d3ad83b](https://github.com/SAP/ui5-webcomponents/commit/d3ad83b0c255f1f41bb5260feeb27306cf5f1f44)) +* **ui5-side-navigation:** display full item in collapsed mode on hover and focus ([#8112](https://github.com/SAP/ui5-webcomponents/issues/8112)) ([e0be298](https://github.com/SAP/ui5-webcomponents/commit/e0be29821a50d6c01f25d671565d0af4863e3d1e)) + + + + + # [1.22.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.0...v1.22.0-rc.1) (2024-01-18) diff --git a/docs/6-contributing/04-writing-samples.md b/docs/6-contributing/04-writing-samples.md index 8d70fe4e514c..8a97168b0167 100644 --- a/docs/6-contributing/04-writing-samples.md +++ b/docs/6-contributing/04-writing-samples.md @@ -119,11 +119,6 @@ Every story has a `docs` page in the storybook's sidebar. Usually, this page is export default { title: "Main/Button", component, - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta {{/if}} {{/if}} @@ -88,27 +90,17 @@
- {{#if showCoPilot}} -
- {{> coPilot}} -
- {{else}} - + {{#if _isXXLBreakpoint}} + {{#if hasSearchField}} + + {{/if}} {{/if}}
+ {{#unless _isXXLBreakpoint }} {{#if hasSearchField}} {{#if _fullWidthSearch}}
@@ -143,6 +135,19 @@ .accessibilityAttributes={{accInfo.search.accessibilityAttributes}} > {{/if}} + {{/unless}} + + {{#if showCoPilot}} + + {{/if}} {{#each customItemsInfo}} {{/inline}} - -{{#*inline "coPilot"}} - -{{/inline}} diff --git a/packages/fiori/src/ShellBar.ts b/packages/fiori/src/ShellBar.ts index 29d35fa33c6e..2df40bf142b2 100644 --- a/packages/fiori/src/ShellBar.ts +++ b/packages/fiori/src/ShellBar.ts @@ -16,8 +16,9 @@ import type { ListSelectionChangeEventDetail } from "@ui5/webcomponents/dist/Lis import type { ResizeObserverCallback } from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js"; import Popover from "@ui5/webcomponents/dist/Popover.js"; import Button from "@ui5/webcomponents/dist/Button.js"; +import ToggleButton from "@ui5/webcomponents/dist/ToggleButton.js"; import type Input from "@ui5/webcomponents/dist/Input.js"; -import type { IButton } from "@ui5/webcomponents/dist/Interfaces.js"; +import type { IButton } from "@ui5/webcomponents/dist/Button.js"; import HasPopup from "@ui5/webcomponents/dist/types/HasPopup.js"; import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js"; import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js"; @@ -37,6 +38,10 @@ import ShellBarPopoverTemplate from "./generated/templates/ShellBarPopoverTempla import shellBarStyles from "./generated/themes/ShellBar.css.js"; import ShellBarPopoverCss from "./generated/themes/ShellBarPopover.css.js"; +// Icons +import "@ui5/webcomponents-icons/dist/da.js"; +import "@ui5/webcomponents-icons/dist/da-2.js"; + import { SHELLBAR_LABEL, SHELLBAR_LOGO, @@ -59,8 +64,8 @@ type ShellBarAccessibilityTexts = { }; type ShellBarAccessibilityAttributesValue = { - ariaHasPopup?: string; - expanded?: boolean; + expanded?: "true" | "false" | boolean, + ariaHasPopup?: `${HasPopup}`, } type ShellBarAccessibilityAttributes = { @@ -95,6 +100,11 @@ type ShellBarMenuItemClickEventDetail = { item: HTMLElement; }; +type ShellBarSearchButtonEventDetail = { + targetRef: HTMLElement; + searchFieldVisible: boolean; +}; + type ShellBarCoPilot = { animated?: boolean, animationValues?: string, @@ -274,6 +284,23 @@ const HANDLE_RESIZE_DEBOUNCE_RATE = 200; // ms }, }) +/** + * Fired, when the search button is activated. + * Note: You can prevent expanding/collapsing of the search field by calling event.preventDefault(). + * + * @allowPreventDefault + * @param {HTMLElement} targetRef dom ref of the activated element + * @param {Boolean} searchFieldVisible whether the search field is visible + * @public + */ + +@event("search-button-click", { + detail: { + targetRef: { type: HTMLElement }, + searchFieldVisible: { type: Boolean }, + }, +}) + class ShellBar extends UI5Element { /** * Defines the primaryTitle. @@ -402,12 +429,6 @@ class ShellBar extends UI5Element { @property() breakpointSize!: string; - /** - * @private - */ - @property({ type: Boolean }) - coPilotActive!: boolean; - /** * @private */ @@ -429,6 +450,12 @@ class ShellBar extends UI5Element { @property({ type: Boolean, noAttribute: true }) _fullWidthSearch!: boolean; + @property({ type: Boolean, noAttribute: true }) + _coPilotPressed!: boolean; + + @property({ type: Boolean, noAttribute: true }) + _isXXLBreakpoint!: boolean; + /** * Defines the ui5-shellbar aditional items. *

@@ -498,11 +525,20 @@ class ShellBar extends UI5Element { _defaultItemPressPrevented: boolean; menuItemsObserver: MutationObserver; coPilot?: ShellBarCoPilot; + _coPilotIcon: string; _debounceInterval?: Timeout | null; _hiddenIcons?: Array; _handleResize: ResizeObserverCallback; _headerPress: () => Promise; + static get CO_PILOT_ICON_PRESSED() { + return "sap-icon://da-2"; + } + + static get CO_PILOT_ICON_UNPRESSED() { + return "sap-icon://da"; + } + static get FIORI_3_BREAKPOINTS() { return [ 599, @@ -528,6 +564,7 @@ class ShellBar extends UI5Element { this._itemsInfo = []; this._isInitialRendering = true; + this._coPilotIcon = ShellBar.CO_PILOT_ICON_UNPRESSED; // marks if preventDefault() is called in item's press handler this._defaultItemPressPrevented = false; @@ -554,6 +591,12 @@ class ShellBar extends UI5Element { }; } + _toggleCoPilotIcon(button: ToggleButton) { + this._coPilotIcon = !this._coPilotPressed ? ShellBar.CO_PILOT_ICON_PRESSED : ShellBar.CO_PILOT_ICON_UNPRESSED; + button.icon = this._coPilotIcon; + this._coPilotPressed = !this._coPilotPressed; + } + _debounce(fn: () => Promise, delay: number) { clearTimeout(this._debounceInterval!); this._debounceInterval = setTimeout(() => { @@ -563,10 +606,12 @@ class ShellBar extends UI5Element { } _menuItemPress(e: CustomEvent) { - this.menuPopover!.close(); - this.fireEvent("menu-item-click", { + const shouldContinue = this.fireEvent("menu-item-click", { item: e.detail.selectedItems[0], }, true); + if (shouldContinue) { + this.menuPopover!.close(); + } } _logoPress() { @@ -614,34 +659,15 @@ class ShellBar extends UI5Element { } } - _fireCoPilotClick() { + _fireCoPilotClick(e: Event) { this.fireEvent("co-pilot-click", { targetRef: this.shadowRoot!.querySelector(".ui5-shellbar-coPilot")!, }); + this._toggleCoPilotIcon(e.target as ToggleButton); } - _coPilotClick() { - this._fireCoPilotClick(); - } - - _coPilotKeydown(e: KeyboardEvent) { - if (isSpace(e)) { - this.coPilotActive = true; - e.preventDefault(); - return; - } - - if (isEnter(e)) { - this.coPilotActive = true; - this._fireCoPilotClick(); - } - } - - _coPilotKeyup(e: KeyboardEvent) { - if (isSpace(e)) { - this._fireCoPilotClick(); - } - this.coPilotActive = false; + _coPilotClick(e: MouseEvent) { + this._fireCoPilotClick(e); } onBeforeRendering() { @@ -691,6 +717,7 @@ class ShellBar extends UI5Element { this.breakpointSize = mappedSize; } + this._isXXLBreakpoint = this.breakpointSize === "XXL"; return mappedSize; } @@ -791,6 +818,15 @@ class ShellBar extends UI5Element { } _handleSearchIconPress() { + const searchButtonRef = this.shadowRoot!.querySelector
{{/inline}} diff --git a/packages/fiori/src/SideNavigation.ts b/packages/fiori/src/SideNavigation.ts index b763a5d3ef2e..fcbb9540ee99 100644 --- a/packages/fiori/src/SideNavigation.ts +++ b/packages/fiori/src/SideNavigation.ts @@ -226,7 +226,7 @@ class SideNavigation extends UI5Element { _handleResizeBound: () => void; - async _onAfterOpen() { + async _onAfterPopoverOpen() { // as the tree/list inside the popover is never destroyed, // item navigation index should be managed, because items are // dynamically recreated and tabIndexes are not updated @@ -239,6 +239,33 @@ class SideNavigation extends UI5Element { } } + async _onAfterMenuClose() { + const selectedItem = this._findSelectedItem(this.items)!; + + await renderFinished(); + selectedItem.getDomRef().focus(); + } + + async _onBeforePopoverOpen() { + const popover = await this.getPicker(); + (popover?.opener as HTMLElement)?.classList.add("ui5-sn-item-active"); + } + + async _onBeforePopoverClose() { + const popover = await this.getPicker(); + (popover?.opener as HTMLElement)?.classList.remove("ui5-sn-item-active"); + } + + async _onBeforeMenuOpen() { + const popover = await this.getOverflowPopover(); + (popover?.opener as HTMLElement)?.classList.add("ui5-sn-item-active"); + } + + async _onBeforeMenuClose() { + const popover = await this.getOverflowPopover(); + (popover?.opener as HTMLElement)?.classList.remove("ui5-sn-item-active"); + } + get accSideNavigationPopoverHiddenText() { return SideNavigation.i18nBundle.getText(SIDE_NAVIGATION_POPOVER_HIDDEN_TEXT); } @@ -256,7 +283,7 @@ class SideNavigation extends UI5Element { return SideNavigation.i18nBundle.getText(SIDE_NAVIGATION_OVERFLOW_ACCESSIBLE_NAME); } - handlePopupItemClick(e: PopupClickEventDetail) { + async handlePopupItemClick(e: PopupClickEventDetail) { const associatedItem = e.target.associatedItem; associatedItem.fireEvent("click"); @@ -267,6 +294,9 @@ class SideNavigation extends UI5Element { this._selectItem(associatedItem); this.closePicker(); + + await renderFinished(); + this._popoverContents.item.getDomRef().classList.add("ui5-sn-item-no-hover-effect"); } handleOverflowItemClick(e: CustomEvent) { @@ -300,14 +330,19 @@ class SideNavigation extends UI5Element { } async openPicker(opener: HTMLElement) { + opener.classList.add("ui5-sn-item-active"); + const responsivePopover = await this.getPicker(); + responsivePopover.opener = opener; responsivePopover.showAt(opener); } async openOverflowMenu(opener: HTMLElement) { + opener.classList.add("ui5-sn-item-active"); + const menu = await this.getOverflowPopover(); - menu.showAt(opener); menu.opener = opener; + menu.showAt(opener); } async closePicker() { @@ -358,7 +393,7 @@ class SideNavigation extends UI5Element { if (!this._overflowDom) { return this.getEnabledItems(this.items); } - this._overflowDom._tabIndex = "0"; + return [...this.getEnabledItems(this.items), this._overflowDom]; } @@ -496,9 +531,9 @@ class SideNavigation extends UI5Element { let focusedItem; if (this.collapsed) { - focusedItem = items.find(item => item._tabIndex === "0"); + focusedItem = items.find(item => item.forcedTabIndex === "0"); } else { - focusedItem = this._getWithNestedItems(items, true).find(item => item._tabIndex === "0"); + focusedItem = this._getWithNestedItems(items, true).find(item => item.forcedTabIndex === "0"); } return focusedItem; @@ -574,13 +609,6 @@ class SideNavigation extends UI5Element { return result; } - async _afterMenuClose() { - const selectedItem = this._findSelectedItem(this.items)!; - - await renderFinished(); - selectedItem.getDomRef().focus(); - } - _selectItem(item: SideNavigationItemBase) { if (item.disabled) { return; diff --git a/packages/fiori/src/SideNavigationItem.ts b/packages/fiori/src/SideNavigationItem.ts index 1f59741430de..13d88e42b3f1 100644 --- a/packages/fiori/src/SideNavigationItem.ts +++ b/packages/fiori/src/SideNavigationItem.ts @@ -159,6 +159,30 @@ class SideNavigationItem extends SideNavigationItemBase { super._onclick(e); } + + _onfocusout = () => { + if (!this.sideNavigation?.collapsed) { + return; + } + + this.getDomRef().classList.remove("ui5-sn-item-no-hover-effect"); + } + + _onmouseenter = () => { + if (!this.sideNavigation?.collapsed) { + return; + } + + this.getDomRef().classList.remove("ui5-sn-item-no-hover-effect"); + } + + _onmouseleave = () => { + if (!this.sideNavigation?.collapsed || !this._selected) { + return; + } + + this.getDomRef().classList.add("ui5-sn-item-no-hover-effect"); + } } SideNavigationItem.define(); diff --git a/packages/fiori/src/SideNavigationItemBase.ts b/packages/fiori/src/SideNavigationItemBase.ts index 02b3e3fe2aa0..bb35d2de3412 100644 --- a/packages/fiori/src/SideNavigationItemBase.ts +++ b/packages/fiori/src/SideNavigationItemBase.ts @@ -113,7 +113,7 @@ class SideNavigationItemBase extends UI5Element implements ITabbable { title!: string; @property({ defaultValue: "-1", noAttribute: true }) - _tabIndex!: string; + forcedTabIndex!: string; get _tooltip() { return this.title || this.text; @@ -162,7 +162,7 @@ class SideNavigationItemBase extends UI5Element implements ITabbable { return undefined; } - return this._tabIndex; + return this.forcedTabIndex; } get sideNavigation() : SideNavigation | undefined { diff --git a/packages/fiori/src/SideNavigationPopover.hbs b/packages/fiori/src/SideNavigationPopover.hbs index bbcf92ba42ec..304b5e580a6e 100644 --- a/packages/fiori/src/SideNavigationPopover.hbs +++ b/packages/fiori/src/SideNavigationPopover.hbs @@ -1,7 +1,9 @@ {{#if isOverflow}} {{#each _menuPopoverItems}} @@ -34,7 +36,9 @@ vertical-align="Top" class="ui5-side-navigation-popover" accessible-name-ref="{{_id}}-sideNavigationPopoverText" - @ui5-after-open="{{_onAfterOpen}}" + @ui5-after-open="{{_onAfterPopoverOpen}}" + @ui5-before-open="{{_onBeforePopoverOpen}}" + @ui5-before-close="{{_onBeforePopoverClose}}" > {{accSideNavigationPopoverHiddenText}} ui5-timeline as items + * + * @public + */ +interface ITimelineItem extends UI5Element, ITabbable { + layout: `${TimelineLayout}`, + icon: string, + forcedLineWidth: string, + nameClickable: boolean, + focusLink: () => void, +} + const SHORT_LINE_WIDTH = "ShortLineWidth"; const LARGE_LINE_WIDTH = "LargeLineWidth"; @@ -116,9 +129,9 @@ class Timeline extends UI5Element { for (let i = 0; i < this.items.length; i++) { this.items[i].layout = this.layout; if (this.items[i + 1] && !!this.items[i + 1].icon) { - this.items[i]._lineWidth = SHORT_LINE_WIDTH; + this.items[i].forcedLineWidth = SHORT_LINE_WIDTH; } else if (this.items[i].icon && this.items[i + 1] && !this.items[i + 1].icon) { - this.items[i]._lineWidth = LARGE_LINE_WIDTH; + this.items[i].forcedLineWidth = LARGE_LINE_WIDTH; } } } @@ -156,3 +169,6 @@ class Timeline extends UI5Element { Timeline.define(); export default Timeline; +export type { + ITimelineItem, +}; diff --git a/packages/fiori/src/TimelineItem.hbs b/packages/fiori/src/TimelineItem.hbs index 8eaab9c34ff3..8aa029d599c8 100644 --- a/packages/fiori/src/TimelineItem.hbs +++ b/packages/fiori/src/TimelineItem.hbs @@ -11,7 +11,7 @@ {{/if}}
-
+
{{#if name}} {{> name}} diff --git a/packages/fiori/src/TimelineItem.ts b/packages/fiori/src/TimelineItem.ts index 29c858f969e5..2ae128fd17e2 100644 --- a/packages/fiori/src/TimelineItem.ts +++ b/packages/fiori/src/TimelineItem.ts @@ -5,7 +5,7 @@ import property from "@ui5/webcomponents-base/dist/decorators/property.js"; import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js"; import Icon from "@ui5/webcomponents/dist/Icon.js"; import Link from "@ui5/webcomponents/dist/Link.js"; -import type { ITimelineItem } from "./Interfaces.js"; +import type { ITimelineItem } from "./Timeline.js"; import TimelineItemTemplate from "./generated/templates/TimelineItemTemplate.lit.js"; import TimelineLayout from "./types/TimelineLayout.js"; // Styles @@ -97,7 +97,7 @@ class TimelineItem extends UI5Element implements ITimelineItem { subtitleText!: string; @property({ defaultValue: "-1", noAttribute: true }) - _tabIndex!: string; + forcedTabIndex!: string; /** * Defines the items orientation. @@ -114,7 +114,7 @@ class TimelineItem extends UI5Element implements ITimelineItem { * @private */ @property() - _lineWidth!: string; + forcedLineWidth!: string; constructor() { super(); @@ -135,8 +135,8 @@ class TimelineItem extends UI5Element implements ITimelineItem { return { indicator: { "ui5-tli-indicator": true, - "ui5-tli-indicator-short-line": this._lineWidth === SHORT_LINE_WIDTH, - "ui5-tli-indicator-large-line": this._lineWidth === LARGE_LINE_WIDTH, + "ui5-tli-indicator-short-line": this.forcedLineWidth === SHORT_LINE_WIDTH, + "ui5-tli-indicator-large-line": this.forcedLineWidth === LARGE_LINE_WIDTH, }, bubbleArrowPosition: { "ui5-tli-bubble-arrow": true, diff --git a/packages/fiori/src/UploadCollection.ts b/packages/fiori/src/UploadCollection.ts index de00d4305c0e..ea4911c8e736 100644 --- a/packages/fiori/src/UploadCollection.ts +++ b/packages/fiori/src/UploadCollection.ts @@ -28,7 +28,6 @@ import { detachBodyDnDHandler, draggingFiles, } from "./upload-utils/UploadCollectionBodyDnD.js"; -import type IUploadCollectionItem from "./UploadCollectionItem.js"; import type { DnDEventListener, DnDEventListenerParam } from "./upload-utils/UploadCollectionBodyDnD.js"; import UploadCollectionDnDOverlayMode from "./types/UploadCollectionDnDMode.js"; @@ -38,6 +37,13 @@ import UploadCollectionTemplate from "./generated/templates/UploadCollectionTemp // Styles import UploadCollectionCss from "./generated/themes/UploadCollection.css.js"; +/** + * Interface for components that may be slotted inside ui5-upload-collection as items + * + * @public + */ +interface IUploadCollectionItem extends HTMLElement { } + type UploadCollectionSelectionChangeEventDetail = { selectedItems: Array, }; @@ -344,6 +350,7 @@ UploadCollection.define(); export default UploadCollection; export type { + IUploadCollectionItem, UploadCollectionItemDeleteEventDetail, UploadCollectionSelectionChangeEventDetail, }; diff --git a/packages/fiori/src/UploadCollectionItem.ts b/packages/fiori/src/UploadCollectionItem.ts index 0f6813fe6034..9726c02b821a 100644 --- a/packages/fiori/src/UploadCollectionItem.ts +++ b/packages/fiori/src/UploadCollectionItem.ts @@ -30,7 +30,7 @@ import { UPLOADCOLLECTIONITEM_TERMINATE_BUTTON_TEXT, UPLOADCOLLECTIONITEM_EDIT_BUTTON_TEXT, } from "./generated/i18n/i18n-defaults.js"; -import type { IUploadCollectionItem } from "./Interfaces.js"; +import type { IUploadCollectionItem } from "./UploadCollection.js"; // Template import UploadCollectionItemTemplate from "./generated/templates/UploadCollectionItemTemplate.lit.js"; diff --git a/packages/fiori/src/ViewSettingsDialog.ts b/packages/fiori/src/ViewSettingsDialog.ts index 0f879116d430..517f5e0c0e3a 100644 --- a/packages/fiori/src/ViewSettingsDialog.ts +++ b/packages/fiori/src/ViewSettingsDialog.ts @@ -774,4 +774,5 @@ export default ViewSettingsDialog; export type { ViewSettingsDialogConfirmEventDetail, ViewSettingsDialogCancelEventDetail, + VSDSettings, }; diff --git a/packages/fiori/src/Wizard.ts b/packages/fiori/src/Wizard.ts index f2ef8faa874d..d03247948af9 100644 --- a/packages/fiori/src/Wizard.ts +++ b/packages/fiori/src/Wizard.ts @@ -185,8 +185,8 @@ type StepInfo = { * @extends UI5Element * @since 1.0.0-rc.10 * @public - * @csspart navigator - Used to style the progress navigator of the ui5-wizard. - * @csspart step-content - Used to style a ui5-wizard-step container. + * @csspart navigator - Used to style the progress navigator of the ui5-wizard. + * @csspart step-content - Used to style a ui5-wizard-step container. */ @customElement({ tag: "ui5-wizard", diff --git a/packages/fiori/src/WizardTab.ts b/packages/fiori/src/WizardTab.ts index fcfb1bf0f95f..a9b98041adfb 100644 --- a/packages/fiori/src/WizardTab.ts +++ b/packages/fiori/src/WizardTab.ts @@ -138,7 +138,7 @@ class WizardTab extends UI5Element implements ITabbable { * @private */ @property({ defaultValue: "-1" }) - _tabIndex!: string + forcedTabIndex!: string _wizardTabAccInfo? : WizardTabInfo @@ -164,7 +164,7 @@ class WizardTab extends UI5Element implements ITabbable { } get tabIndex() { - return Number(this._tabIndex); + return Number(this.forcedTabIndex); } get hasTexts() { diff --git a/packages/fiori/src/i18n/messagebundle.properties b/packages/fiori/src/i18n/messagebundle.properties index 1afb33d6bccc..5d2064e55b27 100644 --- a/packages/fiori/src/i18n/messagebundle.properties +++ b/packages/fiori/src/i18n/messagebundle.properties @@ -137,7 +137,7 @@ SHELLBAR_LABEL = Shell Bar SHELLBAR_LOGO = Logo #XACT: ARIA announcement for the CoPilot button -SHELLBAR_COPILOT = CoPilot +SHELLBAR_COPILOT = Joule #XACT: ARIA announcement for the notifications button SHELLBAR_NOTIFICATIONS = {0} Notifications @@ -337,6 +337,12 @@ IM_TITLE_GROUPTABLE=Try grouping items for a better overview #XTXT: IllustratedMessage's description for the GroupTable illustration IM_SUBTITLE_GROUPTABLE=You can choose grouping categories in the group settings. +#XTIT: IllustratedMessage's title for the NewMail illustration +IM_TITLE_NEWMAIL=New mail + +#XTXT: IllustratedMessage's description for the NewMail illustration +IM_SUBTITLE_NEWMAIL=You have new mail in your inbox. + #XTIT: IllustratedMessage's title for the NoFilterResults illustration IM_TITLE_NOFILTERRESULTS=No results found @@ -355,6 +361,12 @@ IM_TITLE_RESIZECOLUMN=Choose your own column width #XTXT: IllustratedMessage's description for the ResizeColumn illustration IM_SUBTITLE_RESIZECOLUMN=You can resize columns by dragging the column borders. +#XTIT: IllustratedMessage's title for the SignOut illustration +IM_TITLE_SIGNOUT=You''ve been signed out + +#XTXT: IllustratedMessage's description for the SignOut illustration +IM_SUBTITLE_SIGNOUT=You can now close this window. + #XTIT: IllustratedMessage's title for the SortColumn illustration IM_TITLE_SORTCOLUMN=Not seeing the most important items first? diff --git a/packages/fiori/src/i18n/messagebundle_cs.properties b/packages/fiori/src/i18n/messagebundle_cs.properties index a7383ee6b838..7c292bc647ed 100644 --- a/packages/fiori/src/i18n/messagebundle_cs.properties +++ b/packages/fiori/src/i18n/messagebundle_cs.properties @@ -260,4 +260,4 @@ SIDE_NAVIGATION_LIST_ARIA_ROLE_DESC=Strom navigačního seznamu SIDE_NAVIGATION_LIST_ITEMS_ARIA_ROLE_DESC=Položka stromu navigačního seznamu -SIDE_NAVIGATION_OVERFLOW_ACCESSIBLE_NAME=More Items +SIDE_NAVIGATION_OVERFLOW_ACCESSIBLE_NAME=Více položek diff --git a/packages/fiori/src/i18n/messagebundle_en.properties b/packages/fiori/src/i18n/messagebundle_en.properties index f73fbfbb8a91..4b1c41c78746 100644 --- a/packages/fiori/src/i18n/messagebundle_en.properties +++ b/packages/fiori/src/i18n/messagebundle_en.properties @@ -78,7 +78,7 @@ SHELLBAR_LABEL=Shell Bar SHELLBAR_LOGO=Logo -SHELLBAR_COPILOT=CoPilot +SHELLBAR_COPILOT=Joule SHELLBAR_NOTIFICATIONS={0} Notifications @@ -212,6 +212,10 @@ IM_TITLE_GROUPTABLE=Try grouping items for a better overview IM_SUBTITLE_GROUPTABLE=You can choose grouping categories in the group settings. +IM_TITLE_NEWMAIL=New mail + +IM_SUBTITLE_NEWMAIL=You have new mail in your inbox. + IM_TITLE_NOFILTERRESULTS=No results found IM_SUBTITLE_NOFILTERRESULTS=Try adjusting your filter criteria. @@ -224,6 +228,10 @@ IM_TITLE_RESIZECOLUMN=Choose your own column width IM_SUBTITLE_RESIZECOLUMN=You can resize columns by dragging the column borders. +IM_TITLE_SIGNOUT=You've been signed out. + +IM_SUBTITLE_SIGNOUT=You can now close this window. + IM_TITLE_SORTCOLUMN=Not seeing the most important items first? IM_SUBTITLE_SORTCOLUMN=Choose the sort criteria in the sort settings. diff --git a/packages/fiori/src/i18n/messagebundle_en_US_saprigi.properties b/packages/fiori/src/i18n/messagebundle_en_US_saprigi.properties index 18f61672b281..db04d1c10aa5 100644 --- a/packages/fiori/src/i18n/messagebundle_en_US_saprigi.properties +++ b/packages/fiori/src/i18n/messagebundle_en_US_saprigi.properties @@ -78,7 +78,7 @@ SHELLBAR_LABEL=‌​‍‌‌‍‍​​‍‍​​‍‍‍‍​ SHELLBAR_LOGO=‌‌‌​‌‍‍‌‌‍​​​‍​​‌​​‌‌‌​‍‌​‍‍‍‌‌​‌​‍‌​‌​​‌Logo -SHELLBAR_COPILOT=‌​‌‌‍‍​‌‍‌‍​‌‌​‌‍​‍‌‌‍‌‍‌‍​‍‌​​‍​​‌​‍‌​​‌CoPilot +SHELLBAR_COPILOT=‌​‌‌‍‍​‌‍‌‍​‌‌​‌‍​‍‌‌‍‌‍‌‍​‍‌​​‍​​‌​‍‌​​‌Joule SHELLBAR_NOTIFICATIONS=‌‌‍‌‍​‌‍​‍​​‍​‌‍‌​‍​‌‌​​‍‍‍​‍‌‌‍‌​​​‍‍​​​{0}‌‌‌ Notifications @@ -212,6 +212,10 @@ IM_TITLE_GROUPTABLE=‌‍​‍‌‍‌​​‍‌​​‍‌‌‌ IM_SUBTITLE_GROUPTABLE=‌​‍‍‌​‍​​‍‌‍​‍​‌‌​​​‍‌‍‌‌‍​‍‍​‍‌​‍​‍​​‌​‍You can choose grouping categories in the group settings. +IM_TITLE_NEWMAIL=‍‌‌‌‌​‌‍‌‌‍‌‌‍‌​​‌‌‌‍‌​​‌​​‌​‌​‌‌‌​‍‍‍‌‌New mail + +IM_SUBTITLE_NEWMAIL=‌‌​​‍‍‌‍​​​‌​‍‌‌‍‌‍‍‌​‍​​‌‌​‍​‌‌‌​​​‌​‌‌‍You have new mail in your inbox. + IM_TITLE_NOFILTERRESULTS=‌‌‌‍‌​‌‌​​‌‌‍‍‌‌‍‌​‍‍‌‌‍‍‌‍‌​‌‍‌‍​‌​​‍‌No results found IM_SUBTITLE_NOFILTERRESULTS=‌‍​‍‌​‍‌​​‌​‍‌​‌‍‌​​‌‍​‍‍‍‌‌‍‌​‌‌​‍‌‌​‍‌Try adjusting your filter criteria. @@ -224,6 +228,10 @@ IM_TITLE_RESIZECOLUMN=‌‍‍​‍‌​​​‍​‍‌‍‍‍ IM_SUBTITLE_RESIZECOLUMN=‌​‌‍​​​​​‍‍‍‌‍​​​​‍‌‍‌​‌‌‍‌‌​​​‍​‍‍‍​‌You can resize columns by dragging the column borders. +IM_TITLE_SIGNOUT=‌​‍​‍‍‍‍​‌​‌‍‌‍‌‌​‌‍‍‌​‍​‌‍​‌​‌‍‌‍‍‌‍‍​‍You've been signed out. + +IM_SUBTITLE_SIGNOUT=‍​‍‌‌‌‍​‍‌‌​‍‍‌‌​‍‍‌​‌‌‌​‌‌‌​‍‌‍‍​‍​​‍‍You can now close this window. + IM_TITLE_SORTCOLUMN=‍​‍​​‍‍‍‍‍‌‌‍‌‌​‌​‍‍‌​‌‍‍​‌​​‌​​‌‌​‍‌‌Not seeing the most important items first? IM_SUBTITLE_SORTCOLUMN=‌​‍‌​‍‍‌‌‍​​‍‌‌‍‌​‌‍‍‍‍​‍‌‍‍‌​​​‍​‌‌​​‌‍‍Choose the sort criteria in the sort settings. diff --git a/packages/fiori/src/i18n/messagebundle_kk.properties b/packages/fiori/src/i18n/messagebundle_kk.properties index 39de679c1919..e8cd4325a931 100644 --- a/packages/fiori/src/i18n/messagebundle_kk.properties +++ b/packages/fiori/src/i18n/messagebundle_kk.properties @@ -260,4 +260,4 @@ SIDE_NAVIGATION_LIST_ARIA_ROLE_DESC=Навигация тізімінің тар SIDE_NAVIGATION_LIST_ITEMS_ARIA_ROLE_DESC=Навигация тізімі тармақты құрылымының тармағы -SIDE_NAVIGATION_OVERFLOW_ACCESSIBLE_NAME=More Items +SIDE_NAVIGATION_OVERFLOW_ACCESSIBLE_NAME=Қосымша тармақтар diff --git a/packages/fiori/src/i18n/messagebundle_lt.properties b/packages/fiori/src/i18n/messagebundle_lt.properties index 9616286ba16f..983e3d6d49f6 100644 --- a/packages/fiori/src/i18n/messagebundle_lt.properties +++ b/packages/fiori/src/i18n/messagebundle_lt.properties @@ -260,4 +260,4 @@ SIDE_NAVIGATION_LIST_ARIA_ROLE_DESC=Naršymo sąrašo medis SIDE_NAVIGATION_LIST_ITEMS_ARIA_ROLE_DESC=Naršymo sąrašo medžio elementas -SIDE_NAVIGATION_OVERFLOW_ACCESSIBLE_NAME=More Items +SIDE_NAVIGATION_OVERFLOW_ACCESSIBLE_NAME=Daugiau pozicijų diff --git a/packages/fiori/src/i18n/messagebundle_sv.properties b/packages/fiori/src/i18n/messagebundle_sv.properties index bd18f3bb0e36..45902c81fbc1 100644 --- a/packages/fiori/src/i18n/messagebundle_sv.properties +++ b/packages/fiori/src/i18n/messagebundle_sv.properties @@ -260,4 +260,4 @@ SIDE_NAVIGATION_LIST_ARIA_ROLE_DESC=Träd i navigeringslista SIDE_NAVIGATION_LIST_ITEMS_ARIA_ROLE_DESC=Trädelement i navigeringslista -SIDE_NAVIGATION_OVERFLOW_ACCESSIBLE_NAME=More Items +SIDE_NAVIGATION_OVERFLOW_ACCESSIBLE_NAME=Fler element diff --git a/packages/fiori/src/i18n/messagebundle_uk.properties b/packages/fiori/src/i18n/messagebundle_uk.properties index 5f39957acc4f..2c9a4ec9846a 100644 --- a/packages/fiori/src/i18n/messagebundle_uk.properties +++ b/packages/fiori/src/i18n/messagebundle_uk.properties @@ -260,4 +260,4 @@ SIDE_NAVIGATION_LIST_ARIA_ROLE_DESC=Дерево навігаційного сп SIDE_NAVIGATION_LIST_ITEMS_ARIA_ROLE_DESC=Елемент дерева навігаційного списку -SIDE_NAVIGATION_OVERFLOW_ACCESSIBLE_NAME=More Items +SIDE_NAVIGATION_OVERFLOW_ACCESSIBLE_NAME=Більше елементів diff --git a/packages/fiori/src/illustrations/sapIllus-Dialog-NewMail.svg b/packages/fiori/src/illustrations/sapIllus-Dialog-NewMail.svg new file mode 100644 index 000000000000..12147c2193ff --- /dev/null +++ b/packages/fiori/src/illustrations/sapIllus-Dialog-NewMail.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/fiori/src/illustrations/sapIllus-Dialog-SignOut.svg b/packages/fiori/src/illustrations/sapIllus-Dialog-SignOut.svg new file mode 100644 index 000000000000..cfdf866ea6e9 --- /dev/null +++ b/packages/fiori/src/illustrations/sapIllus-Dialog-SignOut.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/fiori/src/illustrations/sapIllus-Dot-NewMail.svg b/packages/fiori/src/illustrations/sapIllus-Dot-NewMail.svg new file mode 100644 index 000000000000..227bf1a0ed1e --- /dev/null +++ b/packages/fiori/src/illustrations/sapIllus-Dot-NewMail.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/packages/fiori/src/illustrations/sapIllus-Dot-SignOut.svg b/packages/fiori/src/illustrations/sapIllus-Dot-SignOut.svg new file mode 100644 index 000000000000..9a53f4b6582c --- /dev/null +++ b/packages/fiori/src/illustrations/sapIllus-Dot-SignOut.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/packages/fiori/src/illustrations/sapIllus-Scene-NewMail.svg b/packages/fiori/src/illustrations/sapIllus-Scene-NewMail.svg new file mode 100644 index 000000000000..a05be9476a14 --- /dev/null +++ b/packages/fiori/src/illustrations/sapIllus-Scene-NewMail.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/fiori/src/illustrations/sapIllus-Scene-SignOut.svg b/packages/fiori/src/illustrations/sapIllus-Scene-SignOut.svg new file mode 100644 index 000000000000..a37531845197 --- /dev/null +++ b/packages/fiori/src/illustrations/sapIllus-Scene-SignOut.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/fiori/src/illustrations/sapIllus-Spot-NewMail.svg b/packages/fiori/src/illustrations/sapIllus-Spot-NewMail.svg new file mode 100644 index 000000000000..271e09f590ed --- /dev/null +++ b/packages/fiori/src/illustrations/sapIllus-Spot-NewMail.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/fiori/src/illustrations/sapIllus-Spot-SignOut.svg b/packages/fiori/src/illustrations/sapIllus-Spot-SignOut.svg new file mode 100644 index 000000000000..4205d035af05 --- /dev/null +++ b/packages/fiori/src/illustrations/sapIllus-Spot-SignOut.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/fiori/src/themes/NotificationListGroupItem.css b/packages/fiori/src/themes/NotificationListGroupItem.css index e0871f168f9a..9f00a9a1354b 100644 --- a/packages/fiori/src/themes/NotificationListGroupItem.css +++ b/packages/fiori/src/themes/NotificationListGroupItem.css @@ -5,10 +5,6 @@ --_ui5-notification_item-border-raius: 0px; } -:host(:not([collapsed])) .ui5-nli-group-toggle-btn { - transform: var(--_ui5_li_notification_group_toggle_btn_rotation); -} - :host([collapsed]) .ui5-nli-group-items { display: none; } diff --git a/packages/fiori/src/themes/ShellBar.css b/packages/fiori/src/themes/ShellBar.css index fb624ce70459..ecf216dcf123 100644 --- a/packages/fiori/src/themes/ShellBar.css +++ b/packages/fiori/src/themes/ShellBar.css @@ -10,6 +10,8 @@ --_ui5_input_border_radius: var(--_ui5_shellbar_input_border_radius); --_ui5_input_focus_border_radius: var(--_ui5_shellbar_input_focus_border_radius); --_ui5_input_background_color: var(--_ui5_shellbar_input_background_color); + --_ui5_input_focus_outline_color: var(--_ui5_shellbar_input_focus_outline_color); + --_ui5_input_margin_top_bottom: 0; } .ui5-shellbar-root { @@ -72,10 +74,6 @@ color: var(--_ui5_shellbar_button_active_color); } -.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:active .ui5-shellbar-menu-button-arrow { - border-top-color: var(--_ui5_shellbar_button_active_color); -} - .ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:focus { outline: var(--_ui5_shellbar_logo_outline); outline-offset: var(--_ui5_shellbar_outline_offset); @@ -97,6 +95,7 @@ slot[name="profile"] { border: none; } +.ui5-shellbar-menu-button-arrow, .ui5-shellbar-menu-button-title, .ui5-shellbar-title { display: inline-block; @@ -127,16 +126,7 @@ slot[name="profile"] { } .ui5-shellbar-menu-button--interactive .ui5-shellbar-menu-button-arrow { - display: inline-block; margin-inline-start: 0.375rem; - width: 10px; - height: 10px; - width: 0px; - height: 0px; - color: var(--sapShell_InteractiveTextColor); - border-left: 5px solid transparent; - border-right: 5px solid transparent; - border-top: 5px solid var(--sapShell_TextColor); } .ui5-shellbar-overflow-container { @@ -152,10 +142,19 @@ slot[name="profile"] { height: var(--_ui5_shellbar_overflow_container_middle_height); width: 0; flex-shrink: 0; + width: 7.5rem; +} + +:host([breakpoint-size="S"]) .ui5-shellbar-overflow-container-middle { + width: 0; } -:host([show-co-pilot]) .ui5-shellbar-overflow-container-middle { - width: 3rem; +:host([breakpoint-size="XXL"]) .ui5-shellbar-with-searchfield .ui5-shellbar-overflow-container-middle { + width: 35rem; +} + +:host([breakpoint-size="S"]) .ui5-shellbar-overflow-container-left { + flex-shrink: 0; } :host([breakpoint-size="S"]) .ui5-shellbar-menu-button { @@ -207,6 +206,19 @@ slot[name="profile"] { border-radius: var(--_ui5_shellbar_logo_border_radius); } +.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:hover { + box-shadow: var(--_ui5_shellbar_button_box_shadow); +} + +.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:active { + box-shadow: var(--_ui5_shellbar_button_box_shadow_active); +} + +.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:active .ui5-shellbar-menu-button-arrow, +.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:active .ui5-shellbar-menu-button-title { + color: var(--sapShell_Active_TextColor); +} + .ui5-shellbar-menu-button .ui5-shellbar-logo:hover { box-shadow: none; } @@ -247,7 +259,7 @@ slot[name="profile"] { justify-content: flex-start; margin-inline-end: 0.5rem; max-width: 75%; - flex-shrink: 0; + flex-shrink: 1; flex-grow: 0; } @@ -255,13 +267,9 @@ slot[name="profile"] { margin-inline-end: 0.5rem; } -:host([show-co-pilot]) .ui5-shellbar-overflow-container-left { +:host([breakpoint-size="XXL"]) .ui5-shellbar-with-searchfield .ui5-shellbar-overflow-container-left { flex-basis: 50%; - max-width: calc(50% - 1.5rem); -} - -:host([show-co-pilot]) .ui5-shellbar-title { - flex-grow: 0; + max-width: calc(50% - 18.25rem); } .ui5-shellbar-menu-button { @@ -281,7 +289,9 @@ slot[name="profile"] { -moz-user-select: none; user-select: none; cursor: pointer; + background: var(--sapButton_Lite_Background); border: var(--_ui5_shellbar_button_border); + color: var(--sapShell_TextColor); } :host(:not([with-logo])) .ui5-shellbar-menu-button { @@ -298,10 +308,6 @@ slot[name="profile"] { max-width: 100%; } -:host([show-co-pilot]) .ui5-shellbar-overflow-container-right { - flex-basis: 0%; -} - :host(:not([show-search-field])) .ui5-shellbar-overflow-container-right { padding-inline-start: 8rem; } @@ -342,12 +348,6 @@ slot[name="profile"] { visibility: hidden; } -.ui5-shellbar-coPilot { - height: 100%; - background-color: transparent; - cursor: pointer; -} - :host([breakpoint-size="L"]) .ui5-shellbar-with-searchfield .ui5-shellbar-overflow-container-right { padding-inline-start: 1rem; } @@ -428,6 +428,7 @@ slot[name="profile"] { ::slotted([ui5-input]) { background: var(--_ui5_shellbar_search_field_background); border: var(--_ui5_shellbar_search_field_border); + box-shadow: var(--_ui5_shellbar_search_field_box_shadow); color: var(--_ui5_shellbar_search_field_color); height: 2.25rem; width: 100%; @@ -447,74 +448,11 @@ slot[name="profile"] { pointer-events: none; } -.ui5-shellbar-copilot-wrapper { - position: relative; - outline: none; - box-sizing: border-box; - height: 100%; -} - -.ui5-shellbar-copilot-wrapper:hover { - border-radius: var(--sapButton_BorderCornerRadius); - background: var(--sapShell_Hover_Background); -} - -.ui5-shellbar-copilot-wrapper:active, -.ui5-shellbar-copilot-wrapper[active] { - background: var(--sapShell_Active_Background); -} - -.ui5-shellbar-copilot-wrapper:hover::after, -.ui5-shellbar-copilot-wrapper:focus::after { - content: ""; - position: absolute; - left: var(--_ui5_shellbar_copilot_focus_offset); - right: var(--_ui5_shellbar_copilot_focus_offset); - top: var(--_ui5_shellbar_copilot_focus_offset); - bottom: var(--_ui5_shellbar_copilot_focus_offset); - outline: none; - pointer-events: none; - border-radius: var(--_ui5_shellbar_logo_outline_border_radius); -} - -.ui5-shellbar-copilot-wrapper:hover::after { - background: transparent; - box-shadow: var(--sapContent_Interaction_Shadow); -} - -.ui5-shellbar-copilot-wrapper:focus::after { - border: var(--_ui5_shellbar_logo_outline); -} - .ui5-shellbar-co-pilot-placeholder { width: 2.75rem; height: 2.75rem; } -.ui5-shellbar-co-pilot-circle { - fill: var(--sapShellColor); -} - -.ui5-shellbar-co-pilot-color1 { - stop-color: var(--_ui5_shellbar_copilot_stop_color1); -} - -.ui5-shellbar-co-pilot-color2 { - stop-color: var(--_ui5_shellbar_copilot_stop_color2); -} - -.ui5-shellbar-co-pilot-opacity7 { - stop-opacity: 0.7; -} - -.ui5-shellbar-co-pilot-opacity36 { - stop-opacity: 0.36; -} - -.ui5-shellbar-co-pilot-opacity2 { - stop-opacity: 0.2; -} - ::slotted([ui5-button][slot="startButton"]) { margin-inline: 0 0.5rem; justify-content: center; diff --git a/packages/fiori/src/themes/SideNavigation.css b/packages/fiori/src/themes/SideNavigation.css index 9e4e255566a2..2f830a3b2583 100644 --- a/packages/fiori/src/themes/SideNavigation.css +++ b/packages/fiori/src/themes/SideNavigation.css @@ -70,7 +70,7 @@ } .ui5-sn-collapsed .ui5-sn-list { - overflow: hidden auto; + overflow: visible; display: flex; flex-direction: column; } @@ -89,6 +89,8 @@ background-color: var(--sapList_Background); border-radius: var(--_ui5_side_navigation_item_border_radius); transition: var(--_ui5_side_navigation_item_transition); + + margin-block-end: var(--_ui5_side_navigation_item_bottom_margin); } .ui5-sn-item-hidden { display: none; @@ -148,11 +150,13 @@ background: var(--sapList_SelectionBackgroundColor); } -.ui5-sn-item:not(.ui5-sn-item-disabled):active .ui5-sn-item-text { +.ui5-sn-item:not(.ui5-sn-item-disabled):active .ui5-sn-item-text, +.ui5-sn-item:not(.ui5-sn-item-disabled).ui5-sn-item-active .ui5-sn-item-text { color: var(--sapList_Active_TextColor); } -.ui5-sn-item:not(.ui5-sn-item-disabled):active [ui5-icon] { +.ui5-sn-item:not(.ui5-sn-item-disabled):active [ui5-icon], +.ui5-sn-item:not(.ui5-sn-item-disabled).ui5-sn-item-active [ui5-icon] { color: var(--sapList_Active_TextColor); } @@ -161,8 +165,11 @@ } .ui5-sn-item:not(.ui5-sn-item-disabled).ui5-sn-item-selected:active, +.ui5-sn-item:not(.ui5-sn-item-disabled).ui5-sn-item-selected.ui5-sn-item-active, .ui5-sn-item:not(.ui5-sn-item-disabled):active, -.ui5-sn-collapsed .ui5-sn-item:not(.ui5-sn-item-disabled).ui5-sn-item-selected:active { +.ui5-sn-item:not(.ui5-sn-item-disabled).ui5-sn-item-active, +.ui5-sn-collapsed .ui5-sn-item:not(.ui5-sn-item-disabled).ui5-sn-item-selected:active, +.ui5-sn-collapsed .ui5-sn-item:not(.ui5-sn-item-disabled).ui5-sn-item-selected.ui5-sn-item-active { background: var(--sapList_Active_Background); } @@ -198,10 +205,6 @@ border-radius: var(--_ui5_side_navigation_item_border_radius); } -.ui5-sn-root:not(.ui5-sn-collapsed) .ui5-sn-item { - margin-block-end: var(--_ui5_side_navigation_item_bottom_margin); -} - .ui5-sn-in-popover .ui5-sn-item-group .ui5-sn-list-li:last-child .ui5-sn-item:not(:hover):not(:active)::before { border: var(--_ui5_side_navigation_last_item_border_style); } @@ -226,10 +229,45 @@ justify-content: center; } +.ui5-sn-collapsed .ui5-sn-list .ui5-sn-item-icon { + padding: var(--_ui5_side_navigation_item_collapsed_icon_padding); +} + .ui5-sn-collapsed .ui5-sn-list .ui5-sn-item-text { display: none; } +.ui5-sn-collapsed .ui5-sn-list .ui5-sn-item-toggle-icon { + display: none; +} + +.ui5-sn-collapsed .ui5-sn-list .ui5-sn-item:not(.ui5-sn-item-active):not(.ui5-sn-item-no-hover-effect):hover, +.ui5-sn-collapsed .ui5-sn-list .ui5-sn-item:not(.ui5-sn-item-active):not(.ui5-sn-item-no-hover-effect):focus { + width: var(--_ui5_side_navigation_item_collapsed_hover_focus_width); + box-shadow: var(--_ui5_side_navigation_box_shadow); + z-index: 1; +} + +.ui5-sn-collapsed .ui5-sn-list .ui5-sn-item.ui5-sn-item-selected:hover, +.ui5-sn-collapsed .ui5-sn-list .ui5-sn-item.ui5-sn-item-selected:focus { + background: var(--sapList_SelectionBackgroundColor); +} + +.ui5-sn-collapsed .ui5-sn-list .ui5-sn-item:not(.ui5-sn-item-active):not(.ui5-sn-item-no-hover-effect):hover:not(.ui5-sn-item-with-expander), +.ui5-sn-collapsed .ui5-sn-list .ui5-sn-item:not(.ui5-sn-item-active):not(.ui5-sn-item-no-hover-effect):focus:not(.ui5-sn-item-with-expander) { + padding-right: var(--_ui5_side_navigation_item_collapsed_hover_focus_padding_right); +} + +.ui5-sn-collapsed .ui5-sn-list .ui5-sn-item:not(.ui5-sn-item-active):not(.ui5-sn-item-no-hover-effect):hover .ui5-sn-item-text, +.ui5-sn-collapsed .ui5-sn-list .ui5-sn-item:not(.ui5-sn-item-active):not(.ui5-sn-item-no-hover-effect):focus .ui5-sn-item-text { + display: var(--_ui5_side_navigation_item_collapsed_hover_focus_display); +} + +.ui5-sn-collapsed .ui5-sn-list .ui5-sn-item:not(.ui5-sn-item-active):not(.ui5-sn-item-no-hover-effect):hover .ui5-sn-item-toggle-icon, +.ui5-sn-collapsed .ui5-sn-list .ui5-sn-item:not(.ui5-sn-item-active):not(.ui5-sn-item-no-hover-effect):focus .ui5-sn-item-toggle-icon { + display: var(--_ui5_side_navigation_item_collapsed_hover_focus_display); +} + .ui5-sn-item[aria-expanded=false] + .ui5-sn-item-group { display: none; } @@ -243,6 +281,7 @@ min-width: 0; overflow: hidden; text-overflow: ellipsis; + white-space: nowrap; color: var(--sapList_TextColor); } @@ -250,6 +289,11 @@ font-weight: var(--_ui5_side_navigation_group_text_weight); } +.ui5-sn-item-level1:not(:has(> .ui5-sn-item-icon)), +.ui5-sn-item-level1.ui5-sn-item-selected:not(:has(> .ui5-sn-item-icon)) { + padding-inline-start: var(--_ui5_side_navigation_item_padding_left); +} + .ui5-sn-item-with-expander .ui5-sn-item-icon::after { display: var(--_ui5_side_navigation_triangle_display); content: ""; @@ -303,8 +347,4 @@ .ui5-sn-item.ui5-sn-item-level1.ui5-sn-item-overflow { margin-top: auto; -} - -.ui5-sn-item.ui5-sn-item-level1.ui5-sn-item-overflow .ui5-sn-item-overflow-icon { - color: var(--_ui5_side_navigation_icon_color); } \ No newline at end of file diff --git a/packages/fiori/src/themes/base/ShellBar-parameters.css b/packages/fiori/src/themes/base/ShellBar-parameters.css index c7f1385e75f1..b84e3a44f8b1 100644 --- a/packages/fiori/src/themes/base/ShellBar-parameters.css +++ b/packages/fiori/src/themes/base/ShellBar-parameters.css @@ -5,6 +5,7 @@ --_ui5_shellbar_outline_offset: -0.0625rem; --_ui5_shellbar_logo_outline_offset: var(--_ui5_shellbar_outline_offset); --_ui5_shellbar_button_box_shadow: none; + --_ui5_shellbar_button_box_shadow_active: none; --_ui5_shellbar_button_border: none; --_ui5_shellbar_button_border_radius: 0.25rem; --_ui5_shellbar_button_focused_border: 0.0625rem dotted var(--sapContent_FocusColor); @@ -17,9 +18,11 @@ --_ui5_shellbar_search_field_height: 2.25rem; --_ui5_shellbar_search_button_border_radius: 0.25rem; --_ui5_shellbar_search_field_background: var(--sapShellColor); - --_ui5_shellbar_search_field_border: 1px solid var(--sapShell_InteractiveBorderColor); + --_ui5_shellbar_search_field_border: 0.0625rem solid var(--sapShell_InteractiveBorderColor); + --_ui5_shellbar_search_field_box_shadow: none; --_ui5_shellbar_search_field_color: var(--sapShell_TextColor); - --_ui5_shellbar_search_field_outline_focused: 1px dotted var(--sapContent_ContrastFocusColor); + --_ui5_shellbar_search_field_outline_focused: 0.0625rem dotted var(--sapContent_ContrastFocusColor); + --_ui5_shellbar_input_focus_outline_color: inherit; --_ui5_shellbar_overflow_container_middle_height: 2.5rem; --_ui5_shellbar_menu_button_title_font_size: 0.75rem; } \ No newline at end of file diff --git a/packages/fiori/src/themes/base/SideNavigation-parameters.css b/packages/fiori/src/themes/base/SideNavigation-parameters.css index 95fe7f3aa174..623c58f2571c 100644 --- a/packages/fiori/src/themes/base/SideNavigation-parameters.css +++ b/packages/fiori/src/themes/base/SideNavigation-parameters.css @@ -34,6 +34,7 @@ --_ui5_side_navigation_item_bottom_margin_compact: 0; --_ui5_side_navigation_item_transition: none; --_ui5_side_navigation_item_padding_right: 0.5rem; + --_ui5_side_navigation_item_padding_left: 0.5rem; --_ui5_side_navigation_no_icons_group_padding: 1rem; --_ui5_side_navigation_no_icons_nested_item_padding: 1rem; --_ui5_side_navigation_item_focus_border_offset: 1px; @@ -61,6 +62,11 @@ --_ui5_side_navigation_popup_title_text_size: var(--sapFontSize); --_ui5_side_navigation_popup_title_line_height: normal; --_ui5_side_navigation_selection_indicator_display: none; + + --_ui5_side_navigation_item_collapsed_icon_padding: 0; + --_ui5_side_navigation_item_collapsed_hover_focus_width: 100%; + --_ui5_side_navigation_item_collapsed_hover_focus_display: none; + --_ui5_side_navigation_item_collapsed_hover_focus_padding_right: 0; } [data-ui5-compact-size], diff --git a/packages/fiori/src/themes/sap_horizon/ShellBar-parameters.css b/packages/fiori/src/themes/sap_horizon/ShellBar-parameters.css index d50e620170ae..4600c81998a2 100644 --- a/packages/fiori/src/themes/sap_horizon/ShellBar-parameters.css +++ b/packages/fiori/src/themes/sap_horizon/ShellBar-parameters.css @@ -3,7 +3,7 @@ --_ui5_shellbar_logo_outline_color: var(--sapContent_FocusColor); --_ui5_shellbar_logo_outline: var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--_ui5_shellbar_logo_outline_color); --_ui5_shellbar_logo_outline_offset: -0.125rem; - --_ui5_shellbar_outline_offset: -0.1875rem; + --_ui5_shellbar_outline_offset: -0.25rem; --_ui5_shellbar_button_border: none; --_ui5_shellbar_button_border_radius: var(--sapButton_BorderCornerRadius); @@ -11,6 +11,7 @@ --_ui5_shellbar_button_badge_border: 1px solid var(--sapContent_BadgeBackground); --_ui5_shellbar_logo_border_radius: 0.5rem; --_ui5_shellbar_button_box_shadow: var(--sapContent_Interaction_Shadow); + --_ui5_shellbar_button_box_shadow_active: inset 0 0 0 0.0625rem var(--sapButton_Lite_Active_BorderColor); --_ui5_shellbar_button_active_color: var(--sapShell_Active_TextColor); --_ui5_shellbar_logo_outline_border_radius: var(--sapField_BorderCornerRadius); --_ui5_shellbar_copilot_stop_color1: #0070F2; @@ -23,7 +24,9 @@ --_ui5_shellbar_search_field_border: none; --_ui5_shellbar_search_field_color: var(--sapShell_InteractiveTextColor); --_ui5_shellbar_search_field_background_hover: var(--sapShell_Hover_Background); - --_ui5_shellbar_search_field_box_shadow_hover: var(--sapContent_Interaction_Shadow); + --_ui5_shellbar_search_field_box_shadow: var(--sapField_Shadow), inset 0 -.0625rem var(--sapField_BorderColor); + --_ui5_shellbar_search_field_box_shadow_hover: var(--sapField_Hover_Shadow), inset 0 -.0625rem var(--sapField_Hover_BorderColor); + --_ui5_shellbar_input_focus_outline_color: var(--sapField_Active_BorderColor); --_ui5_shellbar_overflow_container_middle_height: 3rem; --_ui5_shellbar_menu_button_title_font_size: var(--sapFontHeader5Size); } diff --git a/packages/fiori/src/themes/sap_horizon/SideNavigation-parameters.css b/packages/fiori/src/themes/sap_horizon/SideNavigation-parameters.css index a7023453f455..a7c1eb9c13c7 100644 --- a/packages/fiori/src/themes/sap_horizon/SideNavigation-parameters.css +++ b/packages/fiori/src/themes/sap_horizon/SideNavigation-parameters.css @@ -50,6 +50,11 @@ --_ui5_side_navigation_popup_title_text_size: 1.25rem; --_ui5_side_navigation_popup_title_line_height: 1.5rem; --_ui5_side_navigation_selection_indicator_display: inline-block; + + --_ui5_side_navigation_item_collapsed_icon_padding: 0 0.25rem; + --_ui5_side_navigation_item_collapsed_hover_focus_width: fit-content; + --_ui5_side_navigation_item_collapsed_hover_focus_display: block; + --_ui5_side_navigation_item_collapsed_hover_focus_padding_right: 1rem; } [data-ui5-compact-size], @@ -59,4 +64,6 @@ --_ui5_side_navigation_padding: var(--_ui5_side_navigation_padding_compact); --_ui5_side_navigation_item_bottom_margin: var(--_ui5_side_navigation_item_bottom_margin_compact); --_ui5_side_navigation_item_height: 2rem; + --_ui5_side_navigation_item_collapsed_icon_padding: 0; + --_ui5_side_navigation_item_collapsed_hover_focus_padding_right: 0.5rem; } \ No newline at end of file diff --git a/packages/fiori/src/themes/sap_horizon_dark/ShellBar-parameters.css b/packages/fiori/src/themes/sap_horizon_dark/ShellBar-parameters.css index 89ea7fecf7bd..4600c81998a2 100644 --- a/packages/fiori/src/themes/sap_horizon_dark/ShellBar-parameters.css +++ b/packages/fiori/src/themes/sap_horizon_dark/ShellBar-parameters.css @@ -3,7 +3,7 @@ --_ui5_shellbar_logo_outline_color: var(--sapContent_FocusColor); --_ui5_shellbar_logo_outline: var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--_ui5_shellbar_logo_outline_color); --_ui5_shellbar_logo_outline_offset: -0.125rem; - --_ui5_shellbar_outline_offset: -0.1875rem; + --_ui5_shellbar_outline_offset: -0.25rem; --_ui5_shellbar_button_border: none; --_ui5_shellbar_button_border_radius: var(--sapButton_BorderCornerRadius); @@ -11,6 +11,7 @@ --_ui5_shellbar_button_badge_border: 1px solid var(--sapContent_BadgeBackground); --_ui5_shellbar_logo_border_radius: 0.5rem; --_ui5_shellbar_button_box_shadow: var(--sapContent_Interaction_Shadow); + --_ui5_shellbar_button_box_shadow_active: inset 0 0 0 0.0625rem var(--sapButton_Lite_Active_BorderColor); --_ui5_shellbar_button_active_color: var(--sapShell_Active_TextColor); --_ui5_shellbar_logo_outline_border_radius: var(--sapField_BorderCornerRadius); --_ui5_shellbar_copilot_stop_color1: #0070F2; @@ -23,13 +24,15 @@ --_ui5_shellbar_search_field_border: none; --_ui5_shellbar_search_field_color: var(--sapShell_InteractiveTextColor); --_ui5_shellbar_search_field_background_hover: var(--sapShell_Hover_Background); - --_ui5_shellbar_search_field_box_shadow_hover: var(--sapContent_Interaction_Shadow); + --_ui5_shellbar_search_field_box_shadow: var(--sapField_Shadow), inset 0 -.0625rem var(--sapField_BorderColor); + --_ui5_shellbar_search_field_box_shadow_hover: var(--sapField_Hover_Shadow), inset 0 -.0625rem var(--sapField_Hover_BorderColor); + --_ui5_shellbar_input_focus_outline_color: var(--sapField_Active_BorderColor); --_ui5_shellbar_overflow_container_middle_height: 3rem; --_ui5_shellbar_menu_button_title_font_size: var(--sapFontHeader5Size); } :root { - --_ui5_shellbar_border_radius: 1.125rem; - --_ui5_shellbar_focus_border_radius: 1.125rem; - --_ui5_shellbar_background_color: var(--sapShell_InteractiveBackground); + --_ui5_shellbar_input_border_radius: 1.125rem; + --_ui5_shellbar_input_focus_border_radius: 1.125rem; + --_ui5_shellbar_input_background_color: var(--sapShell_InteractiveBackground); } \ No newline at end of file diff --git a/packages/fiori/src/themes/sap_horizon_dark/SideNavigation-parameters.css b/packages/fiori/src/themes/sap_horizon_dark/SideNavigation-parameters.css index ea171f417874..4817d5fb18ea 100644 --- a/packages/fiori/src/themes/sap_horizon_dark/SideNavigation-parameters.css +++ b/packages/fiori/src/themes/sap_horizon_dark/SideNavigation-parameters.css @@ -50,6 +50,11 @@ --_ui5_side_navigation_popup_title_text_size: 1.25rem; --_ui5_side_navigation_popup_title_line_height: 1.5rem; --_ui5_side_navigation_selection_indicator_display: inline-block; + + --_ui5_side_navigation_item_collapsed_icon_padding: 0 0.25rem; + --_ui5_side_navigation_item_collapsed_hover_focus_width: fit-content; + --_ui5_side_navigation_item_collapsed_hover_focus_display: block; + --_ui5_side_navigation_item_collapsed_hover_focus_padding_right: 1rem; } [data-ui5-compact-size], @@ -59,4 +64,6 @@ --_ui5_side_navigation_padding: var(--_ui5_side_navigation_padding_compact); --_ui5_side_navigation_item_bottom_margin: var(--_ui5_side_navigation_item_bottom_margin_compact); --_ui5_side_navigation_item_height: 2rem; + --_ui5_side_navigation_item_collapsed_icon_padding: 0; + --_ui5_side_navigation_item_collapsed_hover_focus_padding_right: 0.5rem; } \ No newline at end of file diff --git a/packages/fiori/src/themes/sap_horizon_dark_exp/ShellBar-parameters.css b/packages/fiori/src/themes/sap_horizon_dark_exp/ShellBar-parameters.css index 89ea7fecf7bd..7ba65246d8cc 100644 --- a/packages/fiori/src/themes/sap_horizon_dark_exp/ShellBar-parameters.css +++ b/packages/fiori/src/themes/sap_horizon_dark_exp/ShellBar-parameters.css @@ -11,6 +11,7 @@ --_ui5_shellbar_button_badge_border: 1px solid var(--sapContent_BadgeBackground); --_ui5_shellbar_logo_border_radius: 0.5rem; --_ui5_shellbar_button_box_shadow: var(--sapContent_Interaction_Shadow); + --_ui5_shellbar_button_box_shadow_active: inset 0 0 0 0.0625rem var(--sapButton_Lite_Active_BorderColor); --_ui5_shellbar_button_active_color: var(--sapShell_Active_TextColor); --_ui5_shellbar_logo_outline_border_radius: var(--sapField_BorderCornerRadius); --_ui5_shellbar_copilot_stop_color1: #0070F2; diff --git a/packages/fiori/src/themes/sap_horizon_exp/ShellBar-parameters.css b/packages/fiori/src/themes/sap_horizon_exp/ShellBar-parameters.css index d50e620170ae..2c67097b637e 100644 --- a/packages/fiori/src/themes/sap_horizon_exp/ShellBar-parameters.css +++ b/packages/fiori/src/themes/sap_horizon_exp/ShellBar-parameters.css @@ -11,6 +11,7 @@ --_ui5_shellbar_button_badge_border: 1px solid var(--sapContent_BadgeBackground); --_ui5_shellbar_logo_border_radius: 0.5rem; --_ui5_shellbar_button_box_shadow: var(--sapContent_Interaction_Shadow); + --_ui5_shellbar_button_box_shadow_active: inset 0 0 0 0.0625rem var(--sapButton_Lite_Active_BorderColor); --_ui5_shellbar_button_active_color: var(--sapShell_Active_TextColor); --_ui5_shellbar_logo_outline_border_radius: var(--sapField_BorderCornerRadius); --_ui5_shellbar_copilot_stop_color1: #0070F2; diff --git a/packages/fiori/src/themes/sap_horizon_hcb/ShellBar-parameters.css b/packages/fiori/src/themes/sap_horizon_hcb/ShellBar-parameters.css index b951f25a2932..a8a1a3784235 100644 --- a/packages/fiori/src/themes/sap_horizon_hcb/ShellBar-parameters.css +++ b/packages/fiori/src/themes/sap_horizon_hcb/ShellBar-parameters.css @@ -9,5 +9,7 @@ --_ui5_shellbar_outline_offset: -0.1875rem; --_ui5_shellbar_search_field_height: 2.25rem; --_ui5_shellbar_search_field_outline_focused: none; + --_ui5_shellbar_search_field_background_hover: var(--sapShellColor); + --_ui5_shellbar_search_field_box_shadow_hover: none; --_ui5_shellbar_menu_button_title_font_size: var(--sapFontHeader5Size); } \ No newline at end of file diff --git a/packages/fiori/src/themes/sap_horizon_hcb/SideNavigation-parameters.css b/packages/fiori/src/themes/sap_horizon_hcb/SideNavigation-parameters.css index 97babcad2c8e..ed9fa31e8f9f 100644 --- a/packages/fiori/src/themes/sap_horizon_hcb/SideNavigation-parameters.css +++ b/packages/fiori/src/themes/sap_horizon_hcb/SideNavigation-parameters.css @@ -45,6 +45,11 @@ --_ui5_side_navigation_popup_title_text_size: 1.25rem; --_ui5_side_navigation_popup_title_line_height: 1.5rem; --_ui5_side_navigation_selection_indicator_display: block; + + --_ui5_side_navigation_item_collapsed_icon_padding: 0 0.25rem; + --_ui5_side_navigation_item_collapsed_hover_focus_width: fit-content; + --_ui5_side_navigation_item_collapsed_hover_focus_display: block; + --_ui5_side_navigation_item_collapsed_hover_focus_padding_right: 1rem; } [data-ui5-compact-size], @@ -54,4 +59,6 @@ --_ui5_side_navigation_padding: var(--_ui5_side_navigation_padding_compact); --_ui5_side_navigation_item_bottom_margin: var(--_ui5_side_navigation_item_bottom_margin_compact); --_ui5_side_navigation_item_height: 2rem; + --_ui5_side_navigation_item_collapsed_icon_padding: 0; + --_ui5_side_navigation_item_collapsed_hover_focus_padding_right: 0.5rem; } \ No newline at end of file diff --git a/packages/fiori/src/themes/sap_horizon_hcw/ShellBar-parameters.css b/packages/fiori/src/themes/sap_horizon_hcw/ShellBar-parameters.css index b951f25a2932..a8a1a3784235 100644 --- a/packages/fiori/src/themes/sap_horizon_hcw/ShellBar-parameters.css +++ b/packages/fiori/src/themes/sap_horizon_hcw/ShellBar-parameters.css @@ -9,5 +9,7 @@ --_ui5_shellbar_outline_offset: -0.1875rem; --_ui5_shellbar_search_field_height: 2.25rem; --_ui5_shellbar_search_field_outline_focused: none; + --_ui5_shellbar_search_field_background_hover: var(--sapShellColor); + --_ui5_shellbar_search_field_box_shadow_hover: none; --_ui5_shellbar_menu_button_title_font_size: var(--sapFontHeader5Size); } \ No newline at end of file diff --git a/packages/fiori/src/themes/sap_horizon_hcw/SideNavigation-parameters.css b/packages/fiori/src/themes/sap_horizon_hcw/SideNavigation-parameters.css index 97babcad2c8e..ed9fa31e8f9f 100644 --- a/packages/fiori/src/themes/sap_horizon_hcw/SideNavigation-parameters.css +++ b/packages/fiori/src/themes/sap_horizon_hcw/SideNavigation-parameters.css @@ -45,6 +45,11 @@ --_ui5_side_navigation_popup_title_text_size: 1.25rem; --_ui5_side_navigation_popup_title_line_height: 1.5rem; --_ui5_side_navigation_selection_indicator_display: block; + + --_ui5_side_navigation_item_collapsed_icon_padding: 0 0.25rem; + --_ui5_side_navigation_item_collapsed_hover_focus_width: fit-content; + --_ui5_side_navigation_item_collapsed_hover_focus_display: block; + --_ui5_side_navigation_item_collapsed_hover_focus_padding_right: 1rem; } [data-ui5-compact-size], @@ -54,4 +59,6 @@ --_ui5_side_navigation_padding: var(--_ui5_side_navigation_padding_compact); --_ui5_side_navigation_item_bottom_margin: var(--_ui5_side_navigation_item_bottom_margin_compact); --_ui5_side_navigation_item_height: 2rem; + --_ui5_side_navigation_item_collapsed_icon_padding: 0; + --_ui5_side_navigation_item_collapsed_hover_focus_padding_right: 0.5rem; } \ No newline at end of file diff --git a/packages/fiori/src/types/IllustrationMessageType.ts b/packages/fiori/src/types/IllustrationMessageType.ts index b8ad820c7233..f715350d57fe 100644 --- a/packages/fiori/src/types/IllustrationMessageType.ts +++ b/packages/fiori/src/types/IllustrationMessageType.ts @@ -9,6 +9,11 @@ enum IllustrationMessageType { * @public */ BeforeSearch = "BeforeSearch", + /** + * "New Mail" illustration type. + * @public + */ + NewMail = "NewMail", /** * "No Activities" illustration type. * @public @@ -179,6 +184,11 @@ enum IllustrationMessageType { * @public */ SearchFolder = "SearchFolder", + /** + * "Sign Out" illustration type. + * @public + */ + SignOut = "SignOut", /** * "Simple Balloon" illustration type. * @public diff --git a/packages/fiori/test/pages/IllustratedMessage.html b/packages/fiori/test/pages/IllustratedMessage.html index d7db249bab44..ca6a5a7cd7ba 100644 --- a/packages/fiori/test/pages/IllustratedMessage.html +++ b/packages/fiori/test/pages/IllustratedMessage.html @@ -29,6 +29,7 @@ ErrorScreen FilterTable GroupTable + NewMail NoActivities NoColumnsSet NoData @@ -48,6 +49,7 @@ ResizeColumn SearchEarth SearchFolder + SignOut SimpleBalloon SimpleBell SimpleCalendar diff --git a/packages/fiori/test/pages/NotificationListGroupItem.html b/packages/fiori/test/pages/NotificationListGroupItem.html index 05042f37a5f1..acb368626c8e 100644 --- a/packages/fiori/test/pages/NotificationListGroupItem.html +++ b/packages/fiori/test/pages/NotificationListGroupItem.html @@ -16,6 +16,7 @@ + Toggle sapUiSizeCompact diff --git a/packages/fiori/test/pages/ShellBar.html b/packages/fiori/test/pages/ShellBar.html index 98368cd31259..f7d2c78aac6e 100644 --- a/packages/fiori/test/pages/ShellBar.html +++ b/packages/fiori/test/pages/ShellBar.html @@ -97,6 +97,7 @@ + ShellBar in Compact - + + + 1 + diff --git a/packages/fiori/test/specs/ShellBar.spec.js b/packages/fiori/test/specs/ShellBar.spec.js index 5646c218867e..9a12c1242a14 100644 --- a/packages/fiori/test/specs/ShellBar.spec.js +++ b/packages/fiori/test/specs/ShellBar.spec.js @@ -47,7 +47,7 @@ describe("Component Behavior", () => { }); it("tests acc custom roles", async () => { - const sb = await browser.$("#sbAccRoles"); + const sb = await browser.$("#sb"); const logoDOM = await sb.shadow$(".ui5-shellbar-logo"); // assertHANDLE_RESIZE_DEBOUNCE_RATE_WAIT @@ -65,16 +65,34 @@ describe("Component Behavior", () => { }); describe("ui5-shellbar menu", () => { + it("tests prevents close on content click", async () => { + const primaryTitle = await browser.$("#shellbar").shadow$(".ui5-shellbar-menu-button"); + const staticAreaItemClassName = await browser.getStaticAreaItemClassName("#shellbar"); + const menuPopover = await browser.$(`.${staticAreaItemClassName}`).shadow$(".ui5-shellbar-menu-popover"); + const firstMenuItem = await menuPopover.$("ui5-list > ui5-li"); + const checkBox = await browser.$("#checkKeepPopoverOpen"); + + await checkBox.setProperty("checked", true); + + await primaryTitle.click(); + await firstMenuItem.click(); + + assert.strictEqual(await menuPopover.getProperty("opened"), true, "Popover remains open"); + }); + it("tests close on content click", async () => { const primaryTitle = await browser.$("#shellbar").shadow$(".ui5-shellbar-menu-button"); const staticAreaItemClassName = await browser.getStaticAreaItemClassName("#shellbar"); const menuPopover = await browser.$(`.${staticAreaItemClassName}`).shadow$(".ui5-shellbar-menu-popover"); const firstMenuItem = await menuPopover.$("ui5-list > ui5-li"); + const checkBox = await browser.$("#checkKeepPopoverOpen"); + + await checkBox.setProperty("checked", false); await primaryTitle.click(); await firstMenuItem.click(); - assert.strictEqual(await menuPopover.getProperty("opened"), false, "Count property propagates to ui5-button"); + assert.strictEqual(await menuPopover.getProperty("opened"), false, "Popover is closed"); }); }); @@ -371,6 +389,30 @@ describe("Component Behavior", () => { assert.strictEqual(await input.getValue(), "CoPilot", "Input value is set by click event of CoPilot"); }); + it("tests search-button-click event", async () => { + setTimeout(async () => { + const searchIcon = await browser.$("#shellbar").shadow$(".ui5-shellbar-search-button"); + const input = await browser.$("#press-input"); + + await searchIcon.click(); + assert.strictEqual(await input.getValue(), "Search Button", "Input value is set by click event of Search Button"); + }, HANDLE_RESIZE_DEBOUNCE_RATE_WAIT); + + }); + + it("tests search-button-click event", async () => { + setTimeout(async () => { + const searchButton = await browser.$("#sb").shadow$(".ui5-shellbar-search-button"); + const searchField = await browser.$("#sb").shadow$(".ui5-shellbar-search-field"); + assert.strictEqual(await searchField.isDisplayed(), false, "Search is hidden by default"); + + await searchButton .click(); + assert.notOk(await searchField.isDisplayed(), "Search field should not be opened"); + }, HANDLE_RESIZE_DEBOUNCE_RATE_WAIT); + + }); + + it("tests menuItemClick event", async () => { const primaryTitle = await browser.$("#shellbar").shadow$(".ui5-shellbar-menu-button"); const staticAreaItemClassName = await browser.getStaticAreaItemClassName("#shellbar"); @@ -396,28 +438,10 @@ describe("Component Behavior", () => { assert.strictEqual(await inputData.getValue(), "key2", "The user defined attributes are available."); }); - it("tests if searchfield toggles when clicking on search icon", async () => { - const searchIcon = await browser.$("#shellbar").shadow$(".ui5-shellbar-search-button"); - const searchField = await browser.$("#shellbar").shadow$(".ui5-shellbar-search-field"); + it("tests if searchfield is in the middle", async () => { + const searchField = await browser.$("#shellbar").shadow$(".ui5-shellbar-overflow-container-middle").shadow$("slot[name=searchField]"); - assert.strictEqual(await searchField.isDisplayed(), false, "Search is hidden by default"); - - await searchIcon.click(); - assert.ok(await searchField.isDisplayed(), "Search is visible after clicking on icon"); - - await searchIcon.click(); - assert.notOk(await searchField.isDisplayed(), "Search is hidden after clicking again on the icon"); - }); - - it("tests if searchfield toggles when altering the showSearchField property", async () => { - const searchField = await browser.$("#shellbar").shadow$(".ui5-shellbar-search-field"); - const shellBar = await browser.$("#shellbar"); - - assert.strictEqual(await searchField.isDisplayed(), false, "Search is hidden by default"); - - await shellBar.setProperty('showSearchField', true); - assert.ok(await searchField.isDisplayed(), "Search is visible after altering the showSearchField property of the ShellBar"); - await shellBar.setProperty('showSearchField', false); // Clean Up + assert.ok(await searchField.isExisting(), "Search slot is inside middle container"); }); }); @@ -448,7 +472,7 @@ describe("Component Behavior", () => { const overflowButton = await browser.$("#shellbar").shadow$(".ui5-shellbar-overflow-button"); const staticAreaItemClassName = await browser.getStaticAreaItemClassName("#shellbar"); const overflowPopover = await browser.$(`.${staticAreaItemClassName}`).shadow$(".ui5-shellbar-overflow-popover"); - const notificationListItem = await overflowPopover.$("ui5-list ui5-li:nth-child(4)"); + const notificationListItem = await overflowPopover.$("ui5-list ui5-li:nth-child(5)"); const input = await browser.$("#press-input"); await overflowButton.click(); @@ -470,7 +494,7 @@ describe("Component Behavior", () => { const overflowButton = await browser.$("#shellbar").shadow$(".ui5-shellbar-overflow-button"); const staticAreaItemClassName = await browser.getStaticAreaItemClassName("#shellbar"); const overflowPopover = await browser.$(`.${staticAreaItemClassName}`).shadow$(".ui5-shellbar-overflow-popover"); - const productSwitchIcon = await overflowPopover.$("ui5-list ui5-li:nth-child(5)"); + const productSwitchIcon = await overflowPopover.$("ui5-list ui5-li:nth-child(6)"); const input = await browser.$("#press-input"); await overflowButton.click(); @@ -536,7 +560,7 @@ describe("Component Behavior", () => { const popover = await getOverflowPopover("shellbar"); const items = await popover.$$("ui5-li"); - psButtonText = await [...items][4].getText(); + psButtonText = await [...items][5].getText(); assert.strictEqual(psButtonText, await shellBar.getProperty("_productsText"), "Product switch button text is translated in overflow popover"); diff --git a/packages/fiori/test/ssr/component-imports.js b/packages/fiori/test/ssr/component-imports.js new file mode 100644 index 000000000000..6096e31c57b0 --- /dev/null +++ b/packages/fiori/test/ssr/component-imports.js @@ -0,0 +1,27 @@ +import Bar from "../../dist/Bar.js"; +// zxing is using window +// import BarcodeScannerDialog from "../../dist/BarcodeScannerDialog.js"; +import DynamicSideContent from "../../dist/DynamicSideContent.js"; +import FilterItem from "../../dist/FilterItem.js"; +import FilterItemOption from "../../dist/FilterItemOption.js"; +import FlexibleColumnLayout from "../../dist/FlexibleColumnLayout.js"; +import IllustratedMessage from "../../dist/IllustratedMessage.js"; +import MediaGallery from "../../dist/MediaGallery.js"; +import MediaGalleryItem from "../../dist/MediaGalleryItem.js"; +import NotificationAction from "../../dist/NotificationAction.js"; +import NotificationListGroupItem from "../../dist/NotificationListGroupItem.js"; +import NotificationListItem from "../../dist/NotificationListItem.js"; +import Page from "../../dist/Page.js"; +import ProductSwitch from "../../dist/ProductSwitch.js"; +import ProductSwitchItem from "../../dist/ProductSwitchItem.js"; +import ShellBar from "../../dist/ShellBar.js"; +import ShellBarItem from "../../dist/ShellBarItem.js"; +import SideNavigation from "../../dist/SideNavigation.js"; +import SideNavigationItem from "../../dist/SideNavigationItem.js"; +import SideNavigationSubItem from "../../dist/SideNavigationSubItem.js"; +import SortItem from "../../dist/SortItem.js"; +import Timeline from "../../dist/Timeline.js"; +import UploadCollection from "../../dist/UploadCollection.js"; +import UploadCollectionItem from "../../dist/UploadCollectionItem.js"; +import ViewSettingsDialog from "../../dist/ViewSettingsDialog.js"; +import Wizard from "../../dist/Wizard.js"; \ No newline at end of file diff --git a/packages/icons-business-suite/CHANGELOG.md b/packages/icons-business-suite/CHANGELOG.md index 93ea687eff2c..d52913664a1b 100644 --- a/packages/icons-business-suite/CHANGELOG.md +++ b/packages/icons-business-suite/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.22.0](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.3...v1.22.0) (2024-02-05) + +**Note:** Version bump only for package @ui5/webcomponents-icons-business-suite + + + + + +# [1.22.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.2...v1.22.0-rc.3) (2024-02-01) + + +### Bug Fixes + +* release build ([#8222](https://github.com/SAP/ui5-webcomponents/issues/8222)) ([27042ac](https://github.com/SAP/ui5-webcomponents/commit/27042ac90443dea8d5900d1c5bfa5bc93d365da0)) + + + + + +# [1.22.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.1...v1.22.0-rc.2) (2024-01-25) + +**Note:** Version bump only for package @ui5/webcomponents-icons-business-suite + + + + + # [1.22.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.0...v1.22.0-rc.1) (2024-01-18) **Note:** Version bump only for package @ui5/webcomponents-icons-business-suite diff --git a/packages/icons-business-suite/package.json b/packages/icons-business-suite/package.json index e54ac6832ab1..c3963edb3372 100644 --- a/packages/icons-business-suite/package.json +++ b/packages/icons-business-suite/package.json @@ -1,6 +1,6 @@ { "name": "@ui5/webcomponents-icons-business-suite", - "version": "1.22.0-rc.1", + "version": "1.22.0", "description": "UI5 Web Components: SAP Fiori Tools icon set", "author": "SAP SE (https://www.sap.com)", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "wc-dev clean", "build": "wc-dev build", "generate": "nps generate", - "prepublishOnly": "tsc" + "prepublishOnly": "tsc -b" }, "repository": { "type": "git", @@ -28,9 +28,9 @@ "directory": "packages/icons-business-suite" }, "dependencies": { - "@ui5/webcomponents-base": "1.22.0-rc.1" + "@ui5/webcomponents-base": "1.22.0" }, "devDependencies": { - "@ui5/webcomponents-tools": "1.22.0-rc.1" + "@ui5/webcomponents-tools": "1.22.0" } } diff --git a/packages/icons-tnt/CHANGELOG.md b/packages/icons-tnt/CHANGELOG.md index 59f5a0176678..6e293023289f 100644 --- a/packages/icons-tnt/CHANGELOG.md +++ b/packages/icons-tnt/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.22.0](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.3...v1.22.0) (2024-02-05) + +**Note:** Version bump only for package @ui5/webcomponents-icons-tnt + + + + + +# [1.22.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.2...v1.22.0-rc.3) (2024-02-01) + + +### Bug Fixes + +* release build ([#8222](https://github.com/SAP/ui5-webcomponents/issues/8222)) ([27042ac](https://github.com/SAP/ui5-webcomponents/commit/27042ac90443dea8d5900d1c5bfa5bc93d365da0)) + + + + + +# [1.22.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.1...v1.22.0-rc.2) (2024-01-25) + +**Note:** Version bump only for package @ui5/webcomponents-icons-tnt + + + + + # [1.22.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.0...v1.22.0-rc.1) (2024-01-18) diff --git a/packages/icons-tnt/package.json b/packages/icons-tnt/package.json index a8ffe74cbe79..e3b568ec9c76 100644 --- a/packages/icons-tnt/package.json +++ b/packages/icons-tnt/package.json @@ -1,6 +1,6 @@ { "name": "@ui5/webcomponents-icons-tnt", - "version": "1.22.0-rc.1", + "version": "1.22.0", "description": "UI5 Web Components: SAP Fiori Tools icon set", "author": "SAP SE (https://www.sap.com)", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "wc-dev clean", "build": "wc-dev build", "generate": "nps generate", - "prepublishOnly": "tsc" + "prepublishOnly": "tsc -b" }, "repository": { "type": "git", @@ -28,9 +28,9 @@ "directory": "packages/icons-tnt" }, "dependencies": { - "@ui5/webcomponents-base": "1.22.0-rc.1" + "@ui5/webcomponents-base": "1.22.0" }, "devDependencies": { - "@ui5/webcomponents-tools": "1.22.0-rc.1" + "@ui5/webcomponents-tools": "1.22.0" } } diff --git a/packages/icons/CHANGELOG.md b/packages/icons/CHANGELOG.md index c13ea91d92b1..5c444017936f 100644 --- a/packages/icons/CHANGELOG.md +++ b/packages/icons/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.22.0](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.3...v1.22.0) (2024-02-05) + +**Note:** Version bump only for package @ui5/webcomponents-icons + + + + + +# [1.22.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.2...v1.22.0-rc.3) (2024-02-01) + + +### Bug Fixes + +* release build ([#8222](https://github.com/SAP/ui5-webcomponents/issues/8222)) ([27042ac](https://github.com/SAP/ui5-webcomponents/commit/27042ac90443dea8d5900d1c5bfa5bc93d365da0)) + + + + + +# [1.22.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.1...v1.22.0-rc.2) (2024-01-25) + +**Note:** Version bump only for package @ui5/webcomponents-icons + + + + + # [1.22.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.0...v1.22.0-rc.1) (2024-01-18) **Note:** Version bump only for package @ui5/webcomponents-icons diff --git a/packages/icons/package.json b/packages/icons/package.json index f2a5bfb9d945..87d2b45cdfff 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -1,6 +1,6 @@ { "name": "@ui5/webcomponents-icons", - "version": "1.22.0-rc.1", + "version": "1.22.0", "description": "UI5 Web Components: webcomponents.SAP-icons", "author": "SAP SE (https://www.sap.com)", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "wc-dev clean", "generate": "nps generate", "build": "wc-dev build", - "prepublishOnly": "tsc" + "prepublishOnly": "tsc -b" }, "repository": { "type": "git", @@ -28,9 +28,9 @@ "directory": "packages/icons" }, "dependencies": { - "@ui5/webcomponents-base": "1.22.0-rc.1" + "@ui5/webcomponents-base": "1.22.0" }, "devDependencies": { - "@ui5/webcomponents-tools": "1.22.0-rc.1" + "@ui5/webcomponents-tools": "1.22.0" } } diff --git a/packages/localization/CHANGELOG.md b/packages/localization/CHANGELOG.md index e79b15317f27..f7904b7e02f2 100644 --- a/packages/localization/CHANGELOG.md +++ b/packages/localization/CHANGELOG.md @@ -3,6 +3,38 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.22.0](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.3...v1.22.0) (2024-02-05) + +**Note:** Version bump only for package @ui5/webcomponents-localization + + + + + +# [1.22.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.2...v1.22.0-rc.3) (2024-02-01) + + +### Bug Fixes + +* release build ([#8222](https://github.com/SAP/ui5-webcomponents/issues/8222)) ([27042ac](https://github.com/SAP/ui5-webcomponents/commit/27042ac90443dea8d5900d1c5bfa5bc93d365da0)) + + +### Features + +* add dom shim so importing components in SSR works ([#8184](https://github.com/SAP/ui5-webcomponents/issues/8184)) ([ca49674](https://github.com/SAP/ui5-webcomponents/commit/ca49674e046bd74842100245db2cea61d53e2df0)) + + + + + +# [1.22.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.1...v1.22.0-rc.2) (2024-01-25) + +**Note:** Version bump only for package @ui5/webcomponents-localization + + + + + # [1.22.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.0...v1.22.0-rc.1) (2024-01-18) **Note:** Version bump only for package @ui5/webcomponents-localization diff --git a/packages/localization/overlay/sap/base/Log.js b/packages/localization/overlay/sap/base/Log.js new file mode 100644 index 000000000000..47f3c96543fd --- /dev/null +++ b/packages/localization/overlay/sap/base/Log.js @@ -0,0 +1,5 @@ +sap.ui.define([], function() { + const Log = console; + Log.warning = console.warn; + return Log; +}); diff --git a/packages/localization/overlay/sap/base/config.js b/packages/localization/overlay/sap/base/config.js new file mode 100644 index 000000000000..12e575a4b6ec --- /dev/null +++ b/packages/localization/overlay/sap/base/config.js @@ -0,0 +1,26 @@ +sap.ui.define([], function() { + + // called from sapui5, but not supported by us + const legacyFormats = [ + "sapUiLegacyTimeFormat", + "sapUiABAPTimeFormat", + "sapUiLegacyDateFormat", + "sapUiABAPDateFormat", + "sapUiLegacyNumberFormat", + "sapUiABAPNumberFormat" + ]; + + return { + getWritableInstance() { + return { + get({ name }) { + if (legacyFormats.includes(name)) { + return undefined; + } + throw new Error("Localization :: missing configuration requested."); + }, + } + }, + Type: { } + } +}); diff --git a/packages/localization/overlay/sap/ui/Device.js b/packages/localization/overlay/sap/ui/Device.js deleted file mode 100644 index 814505f4371d..000000000000 --- a/packages/localization/overlay/sap/ui/Device.js +++ /dev/null @@ -1,8 +0,0 @@ -sap.ui.define([], function () { - // used by Metadata.js - return { - browser: { - phantomJS: false - } - } -}); diff --git a/packages/localization/overlay/sap/ui/core/Supportability.js b/packages/localization/overlay/sap/ui/core/Supportability.js new file mode 100644 index 000000000000..95e3fd0f175b --- /dev/null +++ b/packages/localization/overlay/sap/ui/core/Supportability.js @@ -0,0 +1,9 @@ +sap.ui.define([], function() { + "use strict"; + + return { + collectOriginInfo() { + return false; + } + } +}); \ No newline at end of file diff --git a/packages/localization/overlay/sap/ui/core/date/_Calendars.js b/packages/localization/overlay/sap/ui/core/date/_Calendars.js index 47f4775511a6..c0b3dbb577a2 100644 --- a/packages/localization/overlay/sap/ui/core/date/_Calendars.js +++ b/packages/localization/overlay/sap/ui/core/date/_Calendars.js @@ -26,4 +26,4 @@ sap.ui.define([], function () { }; return _Calendars; -}); +}); \ No newline at end of file diff --git a/packages/localization/package-scripts.cjs b/packages/localization/package-scripts.cjs index 2a92c25f4dd2..7373c07daa4f 100644 --- a/packages/localization/package-scripts.cjs +++ b/packages/localization/package-scripts.cjs @@ -1,21 +1,15 @@ const resolve = require("resolve"); const copyUsedModules = resolve.sync("@ui5/webcomponents-tools/lib/copy-list/index.js"); -const replaceGlobalCore = resolve.sync("@ui5/webcomponents-tools/lib/replace-global-core/index.js"); -const esmAbsToRel = resolve.sync("@ui5/webcomponents-tools/lib/esm-abs-to-rel/index.js"); +const amdToES6 = resolve.sync("@ui5/webcomponents-tools/lib/amd-to-es6/index.js"); const scripts = { clean: "rimraf dist", lint: "eslint .", - generate: "nps clean copy.used-modules copy.cldr copy.overlay build.replace-amd build.replace-export-true build.replace-export-false build.amd-to-es6 build.replace-global-core-usage build.esm-abs-to-rel build.jsonImports", + generate: "nps clean copy.used-modules copy.cldr copy.overlay build.amd-to-es6 build.jsonImports", build: { - "default": "nps clean copy.used-modules copy.cldr copy.overlay build.replace-amd build.replace-export-true build.replace-export-false build.amd-to-es6 build.replace-global-core-usage build.esm-abs-to-rel build.jsonImports build.typescript", - "replace-amd": "replace-in-file sap.ui.define define dist/**/*.js", - "replace-export-true": `replace-in-file ", /* bExport= */ true" "" dist/**/*.js`, - "replace-export-false": `replace-in-file ", /* bExport= */ false" "" dist/**/*.js`, - "amd-to-es6": "amdtoes6 --src=dist --replace --glob=**/*.js", - "replace-global-core-usage": `node "${replaceGlobalCore}" dist/`, - "esm-abs-to-rel": `node "${esmAbsToRel}" dist/`, + "default": "nps clean copy.used-modules copy.cldr copy.overlay build.amd-to-es6 build.jsonImports build.typescript", + "amd-to-es6": `node "${amdToES6}" dist/`, typescript: "tsc --build", jsonImports: "node ./lib/generate-json-imports/cldr.js", }, diff --git a/packages/localization/package.json b/packages/localization/package.json index 9c1f6e2ec021..d0069f9c694a 100644 --- a/packages/localization/package.json +++ b/packages/localization/package.json @@ -1,6 +1,6 @@ { "name": "@ui5/webcomponents-localization", - "version": "1.22.0-rc.1", + "version": "1.22.0", "description": "Localization for UI5 Web Components", "author": "SAP SE (https://www.sap.com)", "license": "Apache-2.0", @@ -26,7 +26,7 @@ "start": "nps start", "build": "nps build", "generate": "nps generate", - "prepublishOnly": "tsc" + "prepublishOnly": "tsc -b" }, "devDependencies": { "@openui5/sap.ui.core": "1.116.0", @@ -37,6 +37,6 @@ }, "dependencies": { "@types/openui5": "^1.113.0", - "@ui5/webcomponents-base": "1.22.0-rc.1" + "@ui5/webcomponents-base": "1.22.0" } } diff --git a/packages/localization/src/sap/base/util/ObjectPath.ts b/packages/localization/src/sap/base/util/ObjectPath.ts new file mode 100644 index 000000000000..379e7229b150 --- /dev/null +++ b/packages/localization/src/sap/base/util/ObjectPath.ts @@ -0,0 +1,7 @@ +// ObjectPath is accessing window which breaks SSR, hence the overlay + +const ObjectPath = { + set() {}, +}; + +export default ObjectPath; diff --git a/packages/localization/used-modules.txt b/packages/localization/used-modules.txt index dafb9251939a..bd8112b962d2 100644 --- a/packages/localization/used-modules.txt +++ b/packages/localization/used-modules.txt @@ -1,25 +1,44 @@ # Needed files from OpenUI5 - the commented ones are currently overlaid, therefore should not be copied -sap/base/Log.js +# ./ui5loader-autoconfig.js +# sap/base/Log.js +sap/base/i18n/Formatting.js sap/base/assert.js +# sap/base/config.js +sap/base/config/MemoryConfigurationProvider.js +sap/base/Event.js +sap/base/Eventing.js +sap/ui/base/DataType.js sap/base/i18n/LanguageTag.js sap/base/i18n/date/CalendarWeekNumbering.js sap/base/i18n/date/TimezoneUtils.js sap/base/i18n/date/CalendarType.js +sap/base/i18n/Localization.js sap/base/strings/formatMessage.js +sap/base/strings/camelize.js sap/base/util/ObjectPath.js +sap/base/util/resolveReference.js sap/base/util/array/uniqueSort.js sap/base/util/deepEqual.js sap/base/util/isPlainObject.js +sap/base/util/isEmptyObject.js sap/base/util/now.js +sap/base/util/uid.js sap/base/util/_merge.js sap/base/util/extend.js +sap/base/util/deepClone.js +sap/base/util/Version.js sap/ui/base/Interface.js sap/ui/base/Metadata.js sap/ui/base/Object.js sap/ui/core/CalendarType.js +sap/ui/core/Configuration.js +sap/ui/core/Supportability.js sap/ui/core/Locale.js sap/ui/core/LocaleData.js +sap/ui/core/Theming.js +sap/ui/core/date/CalendarWeekNumbering.js +sap/ui/core/date/_Calendars.js sap/ui/core/date/Buddhist.js sap/ui/core/date/CalendarUtils.js sap/ui/core/date/CalendarWeekNumbering.js diff --git a/packages/main/CHANGELOG.md b/packages/main/CHANGELOG.md index 160bf2fefc0a..a50c17ee3527 100644 --- a/packages/main/CHANGELOG.md +++ b/packages/main/CHANGELOG.md @@ -3,6 +3,71 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.22.0](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.3...v1.22.0) (2024-02-05) + + +### Bug Fixes + +* **ui5-checkbox:** improved key down behavior for readonly state ([#8226](https://github.com/SAP/ui5-webcomponents/issues/8226)) ([faec0ef](https://github.com/SAP/ui5-webcomponents/commit/faec0ef3bb09a05008bbfd091c289a575819858c)), closes [#7807](https://github.com/SAP/ui5-webcomponents/issues/7807) +* **ui5-list:** correct load-more marker visibility ([#8224](https://github.com/SAP/ui5-webcomponents/issues/8224)) ([3d04140](https://github.com/SAP/ui5-webcomponents/commit/3d041401977f036c74d308eb37eeb3caeb900457)) + + + + + +# [1.22.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.2...v1.22.0-rc.3) (2024-02-01) + + +### Bug Fixes + +* build ([#8191](https://github.com/SAP/ui5-webcomponents/issues/8191)) ([5af9560](https://github.com/SAP/ui5-webcomponents/commit/5af956088195cd4de81f9c1ec82f1b937b3498aa)) +* release build ([#8222](https://github.com/SAP/ui5-webcomponents/issues/8222)) ([27042ac](https://github.com/SAP/ui5-webcomponents/commit/27042ac90443dea8d5900d1c5bfa5bc93d365da0)) +* **ui5-breadcrumbs:** render current location as link ([#8206](https://github.com/SAP/ui5-webcomponents/issues/8206)) ([01f5542](https://github.com/SAP/ui5-webcomponents/commit/01f5542b8aa1b8c309076ec45b547ce45320d95a)) +* **ui5-combobox:** fix failing test ([#8220](https://github.com/SAP/ui5-webcomponents/issues/8220)) ([888bcd0](https://github.com/SAP/ui5-webcomponents/commit/888bcd02ed1d08872fffe29ec7964734538fe93d)) +* **ui5-dialog:** include the opacity in the background color ([#8181](https://github.com/SAP/ui5-webcomponents/issues/8181)) ([3666e56](https://github.com/SAP/ui5-webcomponents/commit/3666e566287deb28c1eaa5554394303e93867e97)) +* **ui5-popover:** arrow is now centered on close to the edge opener ([#8205](https://github.com/SAP/ui5-webcomponents/issues/8205)) ([d17a4bc](https://github.com/SAP/ui5-webcomponents/commit/d17a4bc05062328317e9a09662b22ee21a7a4b31)) +* **ui5-popover:** correct position of the footer ([#8180](https://github.com/SAP/ui5-webcomponents/issues/8180)) ([a5a2f8b](https://github.com/SAP/ui5-webcomponents/commit/a5a2f8bbe5138a713f1ec369ab5dd3d31c2b3be1)), closes [#8009](https://github.com/SAP/ui5-webcomponents/issues/8009) +* **ui5-split-button:** use correct params ([#8140](https://github.com/SAP/ui5-webcomponents/issues/8140)) ([ddc5fe3](https://github.com/SAP/ui5-webcomponents/commit/ddc5fe31b2cd8bb8c18d8025bdb2036a93fe8bdb)) +* **ui5-tab-container:** correct two-click area separator height ([#8168](https://github.com/SAP/ui5-webcomponents/issues/8168)) ([19c4df1](https://github.com/SAP/ui5-webcomponents/commit/19c4df1205b061913c3762fa27c58b48abba7db8)) +* **ui5-toast:** check whether the event key property exists ([#8209](https://github.com/SAP/ui5-webcomponents/issues/8209)) ([43d32f0](https://github.com/SAP/ui5-webcomponents/commit/43d32f0ec5f122d7cf4ffbfde15c1a26b174065b)) +* **ui5-toolbar-select:** options added to bundle ([#8183](https://github.com/SAP/ui5-webcomponents/issues/8183)) ([a2c37e4](https://github.com/SAP/ui5-webcomponents/commit/a2c37e4fdcc084a19ac325a61636a0d1dd555974)) +* **ui5-toolbar:** fire noConflict events correctly ([#8169](https://github.com/SAP/ui5-webcomponents/issues/8169)) ([6890d94](https://github.com/SAP/ui5-webcomponents/commit/6890d94bf51a2cba4c900f854321f3b32c895ee7)) + + +### Features + +* add dom shim so importing components in SSR works ([#8184](https://github.com/SAP/ui5-webcomponents/issues/8184)) ([ca49674](https://github.com/SAP/ui5-webcomponents/commit/ca49674e046bd74842100245db2cea61d53e2df0)) +* **ui5-date-picker:** introduce value-state-change event ([#8133](https://github.com/SAP/ui5-webcomponents/issues/8133)) ([69143b0](https://github.com/SAP/ui5-webcomponents/commit/69143b047f98f93f5a9debdf88a6e35b02cb674a)), closes [#8005](https://github.com/SAP/ui5-webcomponents/issues/8005) +* **ui5-datetime-picker:** replace time part wheelsliders with clocks ([#8129](https://github.com/SAP/ui5-webcomponents/issues/8129)) ([9041e16](https://github.com/SAP/ui5-webcomponents/commit/9041e16f70c28406c1cab6b568f371d0d7e82fc7)) +* **ui5-toast:** enable overstyling ([#8170](https://github.com/SAP/ui5-webcomponents/issues/8170)) ([3bfdb85](https://github.com/SAP/ui5-webcomponents/commit/3bfdb8509f4ad598a977dd11ed6d273b039c2d2f)), closes [#7596](https://github.com/SAP/ui5-webcomponents/issues/7596) + + + + + +# [1.22.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.1...v1.22.0-rc.2) (2024-01-25) + + +### Bug Fixes + +* add [@allow](https://github.com/allow)PreventDefault where needed ([#8148](https://github.com/SAP/ui5-webcomponents/issues/8148)) ([5d6eb44](https://github.com/SAP/ui5-webcomponents/commit/5d6eb442dc433bdc2000a5845b8087915c8e1097)) +* **ui5-badge:** correct text-shadow for Quartz dark and Quartz high contrast themes ([#8142](https://github.com/SAP/ui5-webcomponents/issues/8142)) ([e1f4e82](https://github.com/SAP/ui5-webcomponents/commit/e1f4e82be6bc244e3a1fcbdbb4bf133603e4565b)), closes [#8126](https://github.com/SAP/ui5-webcomponents/issues/8126) +* **ui5-color-palette:** add i18n text for default color button's text ([#8157](https://github.com/SAP/ui5-webcomponents/issues/8157)) ([7b4dac3](https://github.com/SAP/ui5-webcomponents/commit/7b4dac34928b70adf1f67481854329fff3838e46)) +* **ui5-date-time-picker:** align calculations with density change ([#8090](https://github.com/SAP/ui5-webcomponents/issues/8090)) ([bc035bb](https://github.com/SAP/ui5-webcomponents/commit/bc035bbc10b2ca2055d5c8698cc3054da12bf794)), closes [#7992](https://github.com/SAP/ui5-webcomponents/issues/7992) +* **ui5-list:** load-more event fired correctly ([#8143](https://github.com/SAP/ui5-webcomponents/issues/8143)) ([c483a28](https://github.com/SAP/ui5-webcomponents/commit/c483a2889e749e1b464b386ba8dc098633ff3c3c)) +* **ui5-multi-combobox:** select all implementation ([#8066](https://github.com/SAP/ui5-webcomponents/issues/8066)) ([7e8a355](https://github.com/SAP/ui5-webcomponents/commit/7e8a3552c047f71d8e08a4dfaaa15dd4af7343c4)) +* **ui5-multi-input:** fix multiple token addition ([#8144](https://github.com/SAP/ui5-webcomponents/issues/8144)) ([94590e1](https://github.com/SAP/ui5-webcomponents/commit/94590e127cb58e4f29a4d93955a984aad89873c0)), closes [#8049](https://github.com/SAP/ui5-webcomponents/issues/8049) +* **ui5-textarea:** prevent page height from growing on large input ([#8118](https://github.com/SAP/ui5-webcomponents/issues/8118)) ([7a819c8](https://github.com/SAP/ui5-webcomponents/commit/7a819c88b17ce0ad5ed349381a779f3964da61c9)), closes [#8082](https://github.com/SAP/ui5-webcomponents/issues/8082) + + +### Features + +* **ui5-combobox, ui5-multi-combobox:** clear icon implementation ([#8038](https://github.com/SAP/ui5-webcomponents/issues/8038)) ([d3ad83b](https://github.com/SAP/ui5-webcomponents/commit/d3ad83b0c255f1f41bb5260feeb27306cf5f1f44)) + + + + + # [1.22.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.0...v1.22.0-rc.1) (2024-01-18) diff --git a/packages/main/package.json b/packages/main/package.json index e57894b16dbf..f8f5bea6762e 100644 --- a/packages/main/package.json +++ b/packages/main/package.json @@ -1,6 +1,6 @@ { "name": "@ui5/webcomponents", - "version": "1.22.0-rc.1", + "version": "1.22.0", "description": "UI5 Web Components: webcomponents.main", "ui5": { "webComponentsPackage": true @@ -26,10 +26,11 @@ "build": "wc-dev build", "bundle": "nps build.bundle", "test": "wc-dev test", + "test:ssr": "node -e \"import('./test/ssr/component-imports.js')\"", "test:suite-1": "wc-dev test-suite-1", "test:suite-2": "wc-dev test-suite-2", "create-ui5-element": "wc-create-ui5-element", - "prepublishOnly": "tsc" + "prepublishOnly": "tsc -b" }, "exports": { "./.port": "./.port", @@ -47,12 +48,12 @@ "directory": "packages/main" }, "dependencies": { - "@ui5/webcomponents-base": "1.22.0-rc.1", - "@ui5/webcomponents-icons": "1.22.0-rc.1", - "@ui5/webcomponents-icons-business-suite": "1.22.0-rc.1", - "@ui5/webcomponents-icons-tnt": "1.22.0-rc.1", - "@ui5/webcomponents-localization": "1.22.0-rc.1", - "@ui5/webcomponents-theming": "1.22.0-rc.1" + "@ui5/webcomponents-base": "1.22.0", + "@ui5/webcomponents-icons": "1.22.0", + "@ui5/webcomponents-icons-business-suite": "1.22.0", + "@ui5/webcomponents-icons-tnt": "1.22.0", + "@ui5/webcomponents-localization": "1.22.0", + "@ui5/webcomponents-theming": "1.22.0" }, "devDependencies": { "@ui5/webcomponents-tools": "1.22.0-rc.1", diff --git a/packages/main/src/Avatar.ts b/packages/main/src/Avatar.ts index 32f510e697d6..21c57811ab10 100644 --- a/packages/main/src/Avatar.ts +++ b/packages/main/src/Avatar.ts @@ -11,7 +11,7 @@ import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.j import type { ResizeObserverCallback } from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js"; import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js"; import { isEnter, isSpace } from "@ui5/webcomponents-base/dist/Keys.js"; -import type { IAvatar } from "./Interfaces.js"; +import type { IAvatarGroupItem } from "./AvatarGroup.js"; // Template import AvatarTemplate from "./generated/templates/AvatarTemplate.lit.js"; @@ -56,7 +56,7 @@ import "@ui5/webcomponents-icons/dist/alert.js"; * @constructor * @extends UI5Element * @since 1.0.0-rc.6 - * @implements {IAvatar} + * @implements {IAvatarGroupItem} * @public */ @customElement({ @@ -75,7 +75,7 @@ import "@ui5/webcomponents-icons/dist/alert.js"; * @since 1.0.0-rc.11 */ @event("click") -class Avatar extends UI5Element implements ITabbable, IAvatar { +class Avatar extends UI5Element implements ITabbable, IAvatarGroupItem { /** * Defines whether the component is disabled. * A disabled component can't be pressed or @@ -227,7 +227,7 @@ class Avatar extends UI5Element implements ITabbable, IAvatar { ariaHaspopup!: string; @property({ noAttribute: true }) - _tabIndex!: string; + forcedTabIndex!: string; @property({ type: Boolean }) _hasImage!: boolean; @@ -288,7 +288,7 @@ class Avatar extends UI5Element implements ITabbable, IAvatar { } get tabindex() { - return this._tabIndex || (this._interactive ? "0" : "-1"); + return this.forcedTabIndex || (this._interactive ? "0" : "-1"); } /** @@ -296,7 +296,7 @@ class Avatar extends UI5Element implements ITabbable, IAvatar { * @default "S" * @private */ - get _effectiveSize(): AvatarSize { + get effectiveSize(): AvatarSize { // we read the attribute, because the "size" property will always have a default value return this.getAttribute("size") as AvatarSize || this._size; } @@ -306,7 +306,7 @@ class Avatar extends UI5Element implements ITabbable, IAvatar { * @default "Accent6" * @private */ - get _effectiveBackgroundColor(): AvatarColorScheme { + get еffectiveBackgroundColor(): AvatarColorScheme { // we read the attribute, because the "background-color" property will always have a default value return this.getAttribute("color-scheme") as AvatarColorScheme || this._colorScheme; } diff --git a/packages/main/src/AvatarGroup.ts b/packages/main/src/AvatarGroup.ts index 25734f61a815..48b1ad9f6df8 100644 --- a/packages/main/src/AvatarGroup.ts +++ b/packages/main/src/AvatarGroup.ts @@ -2,6 +2,7 @@ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js"; import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js"; import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js"; import ItemNavigation from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js"; +import type { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js"; import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js"; import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js"; import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js"; @@ -14,10 +15,10 @@ import { isSpace, } from "@ui5/webcomponents-base/dist/Keys.js"; import Button from "./Button.js"; -import type IAvatar from "./Avatar.js"; import AvatarSize from "./types/AvatarSize.js"; import AvatarGroupType from "./types/AvatarGroupType.js"; import AvatarColorScheme from "./types/AvatarColorScheme.js"; +import type { IButton } from "./Button.js"; import { AVATAR_GROUP_DISPLAYED_HIDDEN_LABEL, @@ -32,7 +33,18 @@ import AvatarGroupCss from "./generated/themes/AvatarGroup.css.js"; // Template import AvatarGroupTemplate from "./generated/templates/AvatarGroupTemplate.lit.js"; -import { IButton } from "./Interfaces.js"; + +/** + * Interface for components that represent an avatar and may be slotted in numerous higher-order components such as ui5-avatar-group + * + * @public + */ +interface IAvatarGroupItem extends HTMLElement, ITabbable { + еffectiveBackgroundColor: AvatarColorScheme; + size: `${AvatarSize}`; + effectiveSize: AvatarSize; + interactive: boolean; +} const OVERFLOW_BTN_CLASS = "ui5-avatar-group-overflow-btn"; const AVATAR_GROUP_OVERFLOW_BTN_SELECTOR = `.${OVERFLOW_BTN_CLASS}`; @@ -212,7 +224,7 @@ class AvatarGroup extends UI5Element { * @public */ @slot({ type: HTMLElement, "default": true }) - items!: Array; + items!: Array; /** * Defines the overflow button of the component. @@ -254,7 +266,7 @@ class AvatarGroup extends UI5Element { * @default [] * @public */ - get hiddenItems(): IAvatar[] { + get hiddenItems(): IAvatarGroupItem[] { return this.items.slice(this._hiddenStartIndex); } @@ -264,7 +276,7 @@ class AvatarGroup extends UI5Element { * @public */ get colorScheme(): AvatarColorScheme[] { - return this.items.map(avatar => avatar._effectiveBackgroundColor); + return this.items.map(avatar => avatar.еffectiveBackgroundColor); } get _customOverflowButton() { @@ -373,11 +385,11 @@ class AvatarGroup extends UI5Element { return { overflowButton: { "ui5-avatar-group-overflow-btn": true, - "ui5-avatar-group-overflow-btn-xs": this.firstAvatarSize === "XS", - "ui5-avatar-group-overflow-btn-s": this.firstAvatarSize === "S", - "ui5-avatar-group-overflow-btn-m": this.firstAvatarSize === "M", - "ui5-avatar-group-overflow-btn-l": this.firstAvatarSize === "L", - "ui5-avatar-group-overflow-btn-xl": this.firstAvatarSize === "XL", + "ui5-avatar-group-overflow-btn-xs": this.firstAvatarSize === AvatarSize.XS, + "ui5-avatar-group-overflow-btn-s": this.firstAvatarSize === AvatarSize.S, + "ui5-avatar-group-overflow-btn-m": this.firstAvatarSize === AvatarSize.M, + "ui5-avatar-group-overflow-btn-l": this.firstAvatarSize === AvatarSize.L, + "ui5-avatar-group-overflow-btn-xl": this.firstAvatarSize === AvatarSize.XL, }, }; } @@ -478,13 +490,13 @@ class AvatarGroup extends UI5Element { // last avatar should not be offset as it breaks the container width and focus styles are no set correctly if (index !== this._itemsCount - 1 || this._customOverflowButton) { // based on RTL the browser automatically sets left or right margin to avatars - avatar.style.marginInlineEnd = offsets[avatar._effectiveSize][this.type]; + avatar.style.marginInlineEnd = offsets[avatar.effectiveSize][this.type]; } }); } _onfocusin(e: FocusEvent) { - this._itemNavigation.setCurrentItem(e.target as IAvatar); + this._itemNavigation.setCurrentItem(e.target as IAvatarGroupItem); } /** @@ -526,7 +538,7 @@ class AvatarGroup extends UI5Element { let hiddenItems = 0; for (let index = 0; index < this._itemsCount; index++) { - const item: IAvatar = this.items[index]; + const item: IAvatarGroupItem = this.items[index]; // show item to determine if it will fit the new container size item.hidden = false; @@ -587,4 +599,5 @@ AvatarGroup.define(); export default AvatarGroup; export type { AvatarGroupClickEventDetail, + IAvatarGroupItem, }; diff --git a/packages/main/src/Badge.ts b/packages/main/src/Badge.ts index ce4cd38c7555..5a05d4fcc184 100644 --- a/packages/main/src/Badge.ts +++ b/packages/main/src/Badge.ts @@ -7,7 +7,7 @@ import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js"; import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js"; import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js"; import willShowContent from "@ui5/webcomponents-base/dist/util/willShowContent.js"; -import type { IIcon } from "./Interfaces.js"; +import type { IIcon } from "./Icon.js"; import Icon from "./Icon.js"; import "@ui5/webcomponents-icons/dist/sys-help-2.js"; import "@ui5/webcomponents-icons/dist/sys-enter-2.js"; diff --git a/packages/main/src/Breadcrumbs.hbs b/packages/main/src/Breadcrumbs.hbs index b0aeb121457f..d2d975e5b1e0 100644 --- a/packages/main/src/Breadcrumbs.hbs +++ b/packages/main/src/Breadcrumbs.hbs @@ -22,28 +22,16 @@ href="{{this.href}}" target="{{this.target}}" id="{{this._id}}-link" + design="{{this._linkDesign}}" accessible-name="{{this._accessibleNameText}}" data-ui5-stable="{{this.stableDomRef}}"> {{this.innerText}} - + {{#unless this._isCurrentPageItem}} + + {{/unless}} {{/each}} - - {{#if _endsWithCurrentLocationLabel}} -
  • - - - - - {{_currentLocationText}} - - -
  • - {{/if}} \ No newline at end of file diff --git a/packages/main/src/Breadcrumbs.ts b/packages/main/src/Breadcrumbs.ts index d4e3592c7daa..3f21ee360e83 100644 --- a/packages/main/src/Breadcrumbs.ts +++ b/packages/main/src/Breadcrumbs.ts @@ -9,7 +9,6 @@ import type { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNaviga import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js"; import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js"; import { - isEnter, isSpace, isShow, } from "@ui5/webcomponents-base/dist/Keys.js"; @@ -30,7 +29,6 @@ import { } from "./generated/i18n/i18n-defaults.js"; import Link from "./Link.js"; import type { LinkClickEventDetail } from "./Link.js"; -import Label from "./Label.js"; import ResponsivePopover from "./ResponsivePopover.js"; import List from "./List.js"; import type { ListSelectionChangeEventDetail } from "./List.js"; @@ -55,10 +53,6 @@ type BreadcrumbsItemClickEventDetail = { shiftKey: boolean; } -type FocusAdaptor = ITabbable & { - getlabelWrapper: () => Element | null; -} - /** * @class * @@ -102,7 +96,6 @@ type FocusAdaptor = ITabbable & { dependencies: [ BreadcrumbsItem, Link, - Label, ResponsivePopover, List, StandardListItem, @@ -195,7 +188,6 @@ class Breadcrumbs extends UI5Element { // the width of the interactive element that opens the overflow _dropdownArrowLinkWidth = 0; responsivePopover?: ResponsivePopover; - _labelFocusAdaptor: FocusAdaptor; static i18nBundle: I18nBundle; constructor() { @@ -207,19 +199,6 @@ class Breadcrumbs extends UI5Element { }); this._onResizeHandler = this._updateOverflow.bind(this); - - this._labelFocusAdaptor = { - id: `${this._id}-labelWrapper`, - getlabelWrapper: this.getCurrentLocationLabelWrapper.bind(this), - set _tabIndex(value: string) { - const wrapper = this.getlabelWrapper(); - wrapper && wrapper.setAttribute("tabindex", value); - }, - get _tabIndex() { - const wrapper = this.getlabelWrapper(); - return wrapper?.getAttribute("tabindex") || ""; - }, - }; } onInvalidation(changeInfo: ChangeInfo) { @@ -278,16 +257,11 @@ class Breadcrumbs extends UI5Element { items.unshift(this._dropdownArrowLink); } - if (this._endsWithCurrentLocationLabel) { - items.push(this._labelFocusAdaptor); - } return items; } _onfocusin(e: FocusEvent) { - const target = e.target, - labelWrapper = this.getCurrentLocationLabelWrapper(), - currentItem = (target === labelWrapper) ? this._labelFocusAdaptor : target as Link; + const currentItem = e.target as Link; this._itemNavigation.setCurrentItem(currentItem); } @@ -302,10 +276,6 @@ class Breadcrumbs extends UI5Element { } if (isSpace(e) && isDropdownArrowFocused && !this._isOverflowEmpty && !this._isPickerOpen) { e.preventDefault(); - return; - } - if ((isEnter(e) || isSpace(e)) && this._isCurrentLocationLabelFocused) { - this._onLabelPress(e); } } @@ -321,8 +291,7 @@ class Breadcrumbs extends UI5Element { */ _cacheWidths() { const map = this._breadcrumbItemWidths, - items = this._getItems(), - label = this._currentLocationLabel; + items = this._getItems(); for (let i = this._overflowSize; i < items.length; i++) { const item = items[i], @@ -330,12 +299,6 @@ class Breadcrumbs extends UI5Element { map.set(item, this._getElementWidth(link)); } - if (items.length && this._endsWithCurrentLocationLabel && label) { - const item = items[items.length - 1]; - - map.set(item, this._getElementWidth(label)); - } - if (!this._isOverflowEmpty) { const arrow = this.shadowRoot!.querySelector(".ui5-breadcrumbs-dropdown-arrow-link-wrapper")!; this._dropdownArrowLinkWidth = this._getElementWidth(arrow); @@ -376,7 +339,7 @@ class Breadcrumbs extends UI5Element { // if the last focused link has done into the overflow => // ensure the first visible link is focusable const focusableItems = this._getFocusableItems(); - if (!focusableItems.some(x => x._tabIndex === "0")) { + if (!focusableItems.some(x => x.forcedTabIndex === "0")) { this._itemNavigation.setCurrentItem(focusableItems[0]); } } @@ -416,26 +379,12 @@ class Breadcrumbs extends UI5Element { shiftKey, }, true)) { e.preventDefault(); + return; } - } - _onLabelPress(e: MouseEvent | KeyboardEvent) { - const items = this._getItems(), - item = items[items.length - 1], - { - altKey, - ctrlKey, - metaKey, - shiftKey, - } = e; - - this.fireEvent("item-click", { - item, - altKey, - ctrlKey, - metaKey, - shiftKey, - }); + if (item._isCurrentPageItem) { + window.location.reload(); + } } _onOverflowListItemSelect(e: CustomEvent) { @@ -508,42 +457,18 @@ class Breadcrumbs extends UI5Element { return text; } - getCurrentLocationLabelWrapper() { - return this.shadowRoot!.querySelector(".ui5-breadcrumbs-current-location > span"); - } - get _visibleItems() { return this._getItems() .slice(this._overflowSize) .filter(i => this._isItemVisible(i)); } - get _endsWithCurrentLocationLabel() { + get _endsWithCurrentPageItem() { return this.design === BreadcrumbsDesign.Standard; } - get _currentLocationText() { - const items = this._getItems(); - if (this._endsWithCurrentLocationLabel && items.length) { - const item = items[items.length - 1]; - if (this._isItemVisible(item)) { - return item.innerText; - } - } - return ""; - } - - get _currentLocationLabel() { - return this.shadowRoot!.querySelector
    {{/if}} @@ -35,7 +35,7 @@ class="ui5-cp-more-colors" @click="{{_openMoreColorsDialog}}" @keydown={{_onMoreColorsKeyDown}} - >{{colorPaleteMoreColorsText}} + >{{colorPaletteMoreColorsText}}
    {{/if}} diff --git a/packages/main/src/ColorPalette.ts b/packages/main/src/ColorPalette.ts index 3bc7be899b94..8c71cc598fb3 100644 --- a/packages/main/src/ColorPalette.ts +++ b/packages/main/src/ColorPalette.ts @@ -7,6 +7,7 @@ import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js"; import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js"; import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js"; import ItemNavigation from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js"; +import type { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js"; import CSSColor from "@ui5/webcomponents-base/dist/types/CSSColor.js"; import ItemNavigationBehavior from "@ui5/webcomponents-base/dist/types/ItemNavigationBehavior.js"; import { isPhone } from "@ui5/webcomponents-base/dist/Device.js"; @@ -25,17 +26,27 @@ import Button from "./Button.js"; import type Dialog from "./Dialog.js"; import type ColorPaletteMoreColors from "./features/ColorPaletteMoreColors.js"; import type ColorPicker from "./ColorPicker.js"; -import type { IColorPaletteItem } from "./Interfaces.js"; import { COLORPALETTE_CONTAINER_LABEL, COLOR_PALETTE_MORE_COLORS_TEXT, + COLOR_PALETTE_DEFAULT_COLOR_TEXT, } from "./generated/i18n/i18n-defaults.js"; // Styles import ColorPaletteCss from "./generated/themes/ColorPalette.css.js"; import ColorPaletteStaticAreaCss from "./generated/themes/ColorPaletteStaticArea.css.js"; +/** + * Interface for components that may be used inside a ui5-color-palette or ui5-color-palette-popover + * + * @public + */ +interface IColorPaletteItem extends HTMLElement, ITabbable { + value?: string, + index?: number, +} + type ColorPaletteNavigationItem = IColorPaletteItem | Button; type ColorPaletteItemClickEventDetail = { @@ -422,10 +433,14 @@ class ColorPalette extends UI5Element { return ColorPalette.i18nBundle.getText(COLORPALETTE_CONTAINER_LABEL); } - get colorPaleteMoreColorsText() { + get colorPaletteMoreColorsText() { return ColorPalette.i18nBundle.getText(COLOR_PALETTE_MORE_COLORS_TEXT); } + get colorPaletteDefaultColorText() { + return ColorPalette.i18nBundle.getText(COLOR_PALETTE_DEFAULT_COLOR_TEXT); + } + get _showMoreColors() { return this.showMoreColors && this.moreColorsFeature; } @@ -503,4 +518,7 @@ class ColorPalette extends UI5Element { ColorPalette.define(); export default ColorPalette; -export type { ColorPaletteItemClickEventDetail }; +export type { + ColorPaletteItemClickEventDetail, + IColorPaletteItem, +}; diff --git a/packages/main/src/ColorPaletteItem.hbs b/packages/main/src/ColorPaletteItem.hbs index f53050f0609a..037f968af275 100644 --- a/packages/main/src/ColorPaletteItem.hbs +++ b/packages/main/src/ColorPaletteItem.hbs @@ -2,7 +2,7 @@ class="ui5-cp-item" style="{{styles.root}}" value="{{value}}" - tabindex="{{_tabIndex}}" + tabindex="{{forcedTabIndex}}" role="button" aria-label="{{colorLabel}} - {{index}}: {{this.value}}" title="{{colorLabel}} - {{index}}: {{this.value}}" diff --git a/packages/main/src/ColorPaletteItem.ts b/packages/main/src/ColorPaletteItem.ts index ada5201c375d..5861f6b2e8bf 100644 --- a/packages/main/src/ColorPaletteItem.ts +++ b/packages/main/src/ColorPaletteItem.ts @@ -7,7 +7,7 @@ import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js"; import CSSColor from "@ui5/webcomponents-base/dist/types/CSSColor.js"; import { isPhone } from "@ui5/webcomponents-base/dist/Device.js"; import Integer from "@ui5/webcomponents-base/dist/types/Integer.js"; -import type { IColorPaletteItem } from "./Interfaces.js"; +import type { IColorPaletteItem } from "./ColorPalette.js"; import ColorPaletteItemTemplate from "./generated/templates/ColorPaletteItemTemplate.lit.js"; import { COLORPALETTE_COLOR_LABEL, @@ -25,7 +25,6 @@ import ColorPaletteItemCss from "./generated/themes/ColorPaletteItem.css.js"; * * @constructor * @extends UI5Element - * @abstract * @since 1.0.0-rc.12 * @implements { IColorPaletteItem } * @public @@ -54,7 +53,7 @@ class ColorPaletteItem extends UI5Element implements IColorPaletteItem { * @private */ @property({ defaultValue: "-1", noAttribute: true }) - _tabIndex!: string; + forcedTabIndex!: string; /** * Defines the index of the item inside of the ColorPalette. diff --git a/packages/main/src/ColorPalettePopover.ts b/packages/main/src/ColorPalettePopover.ts index 1c963da08f49..b752145dc234 100644 --- a/packages/main/src/ColorPalettePopover.ts +++ b/packages/main/src/ColorPalettePopover.ts @@ -22,9 +22,8 @@ import Button from "./Button.js"; import Title from "./Title.js"; import ResponsivePopover from "./ResponsivePopover.js"; import ColorPalette from "./ColorPalette.js"; -import type { ColorPaletteItemClickEventDetail } from "./ColorPalette.js"; +import type { ColorPaletteItemClickEventDetail, IColorPaletteItem } from "./ColorPalette.js"; import type ColorPaletteItem from "./ColorPaletteItem.js"; -import { IColorPaletteItem } from "./Interfaces.js"; type ColorPalettePopoverItemClickEventDetail = ColorPaletteItemClickEventDetail; diff --git a/packages/main/src/ComboBox.hbs b/packages/main/src/ComboBox.hbs index efa119156a76..16f71b45d11b 100644 --- a/packages/main/src/ComboBox.hbs +++ b/packages/main/src/ComboBox.hbs @@ -27,6 +27,12 @@ data-sap-focus-ref /> + {{#if _effectiveShowClearIcon}} +
    + +
    + {{/if}} + {{#if icon}} {{/if}} diff --git a/packages/main/src/ComboBox.ts b/packages/main/src/ComboBox.ts index 6ee15e20292d..183062b3d308 100644 --- a/packages/main/src/ComboBox.ts +++ b/packages/main/src/ComboBox.ts @@ -5,7 +5,7 @@ import event from "@ui5/webcomponents-base/dist/decorators/event.js"; import slot from "@ui5/webcomponents-base/dist/decorators/slot.js"; import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js"; import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js"; -import { isPhone, isAndroid, isSafari } from "@ui5/webcomponents-base/dist/Device.js"; +import { isPhone, isAndroid } from "@ui5/webcomponents-base/dist/Device.js"; import Integer from "@ui5/webcomponents-base/dist/types/Integer.js"; import InvisibleMessageMode from "@ui5/webcomponents-base/dist/types/InvisibleMessageMode.js"; import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/AriaLabelHelper.js"; @@ -36,7 +36,7 @@ import { isHome, isEnd, } from "@ui5/webcomponents-base/dist/Keys.js"; -import type { IIcon, IComboBoxItem } from "./Interfaces.js"; +import type { IIcon } from "./Icon.js"; import * as Filters from "./Filters.js"; import { @@ -52,6 +52,7 @@ import { SELECT_OPTIONS, LIST_ITEM_POSITION, LIST_ITEM_GROUP_HEADER, + INPUT_CLEAR_ICON_ACC_NAME, } from "./generated/i18n/i18n-defaults.js"; // Templates @@ -79,9 +80,24 @@ import GroupHeaderListItem from "./GroupHeaderListItem.js"; import ComboBoxFilter from "./types/ComboBoxFilter.js"; import type FormSupportT from "./features/InputElementsFormSupport.js"; import PopoverHorizontalAlign from "./types/PopoverHorizontalAlign.js"; +import Input, { InputEventDetail } from "./Input.js"; +import SuggestionItem from "./SuggestionItem.js"; const SKIP_ITEMS_SIZE = 10; +/** + * Interface for components that may be slotted inside a ui5-combobox + * + * @public + */ +interface IComboBoxItem { + text: string, + focused: boolean, + isGroupItem: boolean, + selected?: boolean, + additionalText?: string, +} + type ValueStateAnnouncement = Record, string>; type ValueStateTypeAnnouncement = Record, string>; @@ -170,6 +186,8 @@ type ComboBoxSelectionChangeEventDetail = { GroupHeaderListItem, Popover, ComboBoxGroupItem, + Input, + SuggestionItem, ], }) /** @@ -180,7 +198,7 @@ type ComboBoxSelectionChangeEventDetail = { @event("change") /** - * Fired when typing in input. + * Fired when typing in input or clear icon is pressed. *

    * Note: filterValue property is updated, input is changed. * @public @@ -306,6 +324,16 @@ class ComboBox extends UI5Element { @property({ type: ComboBoxFilter, defaultValue: ComboBoxFilter.StartsWithPerTerm }) filter!: `${ComboBoxFilter}`; + /** + * Defines whether the clear icon of the combobox will be shown. + * + * @default false + * @public + * @since 1.20.1 + */ + @property({ type: Boolean }) + showClearIcon!: boolean; + /** * Indicates whether the input is focssed * @private @@ -348,6 +376,9 @@ class ComboBox extends UI5Element { @property({ validator: Integer, noAttribute: true }) _listWidth!: number; + @property({ type: Boolean, noAttribute: true }) + _effectiveShowClearIcon!: boolean; + /** * Defines the component items. * @@ -401,7 +432,8 @@ class ComboBox extends UI5Element { this._itemFocused = false; this._autocomplete = false; this._isKeyNavigation = false; - this._lastValue = ""; + // when an initial value is set it should be considered as a _lastValue + this._lastValue = this.getAttribute("value") || ""; this._selectionPerformed = false; this._selectedItemText = ""; this._userTypedValue = ""; @@ -412,6 +444,8 @@ class ComboBox extends UI5Element { this.FormSupport = getFeature("FormSupport"); + this._effectiveShowClearIcon = (this.showClearIcon && !!this.value && !this.readonly && !this.disabled); + if (this._initialRendering || this.filter === "None") { this._filteredItems = this.items; } @@ -427,19 +461,20 @@ class ComboBox extends UI5Element { this._selectMatchingItem(); this._initialRendering = false; - const slottedIconsCount = this.icon.length || 0; + this.style.setProperty(getScopedVarName("--_ui5-input-icons-count"), `${this.iconsCount}`); + } + + get iconsCount() { + const slottedIconsCount = this.icon?.length || 0; + const clearIconCount = Number(this._effectiveShowClearIcon) ?? 0; const arrowDownIconsCount = this.readonly ? 0 : 1; - this.style.setProperty(getScopedVarName("--_ui5-input-icons-count"), `${slottedIconsCount + arrowDownIconsCount}`); + + return slottedIconsCount + clearIconCount + arrowDownIconsCount; } async onAfterRendering() { const picker: ResponsivePopover = await this._getPicker(); - if (isPhone() && picker.opened) { - // Set initial focus to the native input - this.inner.focus(); - } - if ((await this.shouldClosePopover()) && !isPhone()) { picker.close(false, false, true); this._clearFocus(); @@ -449,13 +484,9 @@ class ComboBox extends UI5Element { this.toggleValueStatePopover(this.shouldOpenValueStateMessagePopover); this.storeResponsivePopoverWidth(); - // Safari is quite slow and does not preserve text highlighting on control rerendering. - // That's why we need to restore it "manually". - if (isSafari() && this._autocomplete && this.filterValue !== this.value) { - this.inner.setSelectionRange( - (this._isKeyNavigation ? 0 : this.filterValue.length), - this.value.length, - ); + if (isPhone()) { + this.value = this.inner.value; + this._selectMatchingItem(); } } @@ -467,7 +498,6 @@ class ComboBox extends UI5Element { _focusin(e: FocusEvent) { this.focused = true; - this._lastValue = this.value; this._autocomplete = false; !isPhone() && (e.target as HTMLInputElement).setSelectionRange(0, this.value.length); @@ -476,6 +506,12 @@ class ComboBox extends UI5Element { _focusout(e: FocusEvent) { const toBeFocused = e.relatedTarget as HTMLElement; const focusedOutToValueStateMessage = toBeFocused?.shadowRoot?.querySelector(".ui5-valuestatemessage-root"); + const clearIconWrapper = this.shadowRoot!.querySelector(".ui5-input-clear-icon-wrapper"); + const focusedOutToClearIcon = clearIconWrapper === toBeFocused || clearIconWrapper?.contains(toBeFocused); + + if (this._effectiveShowClearIcon && focusedOutToClearIcon) { + return; + } this._fireChangeEvent(); @@ -492,6 +528,7 @@ class ComboBox extends UI5Element { _afterOpenPopover() { this._iconPressed = true; + this.inner.focus(); } _afterClosePopover() { @@ -571,6 +608,13 @@ class ComboBox extends UI5Element { this._toggleRespPopover(); } + _handleMobileInput(e: CustomEvent) { + const { target } = e; + this.filterValue = (target as Input).value; + this.value = (target as Input).value; + this.fireEvent("input"); + } + _input(e: InputEvent) { const { value } = e.target as HTMLInputElement; const shouldAutocomplete = this.shouldAutocomplete(e); @@ -909,7 +953,7 @@ class ComboBox extends UI5Element { } async _openRespPopover() { - (await this._getPicker()).showAt(this); + (await this._getPicker()).showAt(this, true); } _filterItems(str: string) { @@ -1045,6 +1089,24 @@ class ComboBox extends UI5Element { } } + _clear() { + const selectedItem = this.items.find(item => item.selected) as (ComboBoxItem | undefined); + + if (selectedItem?.text === this.value) { + this.fireEvent("change"); + } + + this.value = ""; + this.fireEvent("input"); + + if (this._isPhone) { + this._lastValue = ""; + this.fireEvent("change"); + } else { + this.focus(); + } + } + async _scrollToItem(indexOfItem: number, forward: boolean) { const picker = await this._getPicker(); const list = picker.querySelector(".ui5-combobox-items-list") as List; @@ -1078,7 +1140,7 @@ class ComboBox extends UI5Element { } get inner(): HTMLInputElement { - return isPhone() ? this.responsivePopover!.querySelector(".ui5-input-inner-phone")! : this.shadowRoot!.querySelector("[inner-input]")!; + return isPhone() ? this.responsivePopover!.querySelector("[ui5-input]")!.shadowRoot!.querySelector("input")! : this.shadowRoot!.querySelector("[inner-input]")!; } async _getPicker() { @@ -1184,6 +1246,10 @@ class ComboBox extends UI5Element { return getEffectiveAriaLabelText(this); } + get clearIconAccessibleName() { + return ComboBox.i18nBundle.getText(INPUT_CLEAR_ICON_ACC_NAME); + } + static async onDefine() { ComboBox.i18nBundle = await getI18nBundle("@ui5/webcomponents"); } diff --git a/packages/main/src/ComboBoxPopover.hbs b/packages/main/src/ComboBoxPopover.hbs index 9bd1f8b1db26..a28dac3fe5ab 100644 --- a/packages/main/src/ComboBoxPopover.hbs +++ b/packages/main/src/ComboBoxPopover.hbs @@ -1,7 +1,6 @@
    -
    - -
    + {{#each _filteredItems}} + + {{/each}} +
    diff --git a/packages/main/src/DatePicker.ts b/packages/main/src/DatePicker.ts index a784690f3072..2320aa9df5bd 100644 --- a/packages/main/src/DatePicker.ts +++ b/packages/main/src/DatePicker.ts @@ -59,6 +59,11 @@ type DatePickerChangeEventDetail = { valid: boolean, } +type DatePickerValueStateChangeEventDetail = { + valueState: `${ValueState}`, + valid: boolean, +} + type DatePickerInputEventDetail = { value: string, valid: boolean, @@ -217,6 +222,32 @@ type DatePickerInputEventDetail = { }, }, }) +/** + * Fired before the value state of the component is updated internally. + * The event is preventable, meaning that if it's default action is + * prevented, the component will not update the value state. + * + * @allowPreventDefault + * @public + * @param {string} valueState The new valueState that will be set. + * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range. + */ +@event("value-state-change", { + detail: { + /** + * @public + */ + valueState: { + type: String, + }, + /** + * @public + */ + valid: { + type: Boolean, + }, + }, +}) class DatePicker extends DateComponentBase implements IFormElement { /** * Defines a formatted date value. @@ -542,12 +573,15 @@ class DatePicker extends DateComponentBase implements IFormElement { } _updateValueState() { - const isValid = this._checkValueValidity(this.value); + const valid = this._checkValueValidity(this.value); + const previousValueState = this.valueState; + + this.valueState = valid ? ValueState.None : ValueState.Error; + + const eventPrevented = !this.fireEvent("value-state-change", { valueState: this.valueState, valid }, true); - if (isValid && this.valueState === ValueState.Error) { // If not valid - always set Error regardless of the current value state - this.valueState = ValueState.None; - } else if (!isValid) { // However if valid, change only Error (but not the others) to None - this.valueState = ValueState.Error; + if (eventPrevented) { + this.valueState = previousValueState; } } @@ -860,4 +894,5 @@ export default DatePicker; export type { DatePickerChangeEventDetail, DatePickerInputEventDetail, + DatePickerValueStateChangeEventDetail, }; diff --git a/packages/main/src/DateTimePicker.ts b/packages/main/src/DateTimePicker.ts index d75aa4d4ee94..0b93faaad5ea 100644 --- a/packages/main/src/DateTimePicker.ts +++ b/packages/main/src/DateTimePicker.ts @@ -4,7 +4,6 @@ import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.j import type { ResizeObserverCallback } from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js"; import getLocale from "@ui5/webcomponents-base/dist/locale/getLocale.js"; import getCachedLocaleDataInstance from "@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js"; -import getEffectiveContentDensity from "@ui5/webcomponents-base/dist/util/getEffectiveContentDensity.js"; import modifyDateBy from "@ui5/webcomponents-localization/dist/dates/modifyDateBy.js"; import CalendarDate from "@ui5/webcomponents-localization/dist/dates/CalendarDate.js"; import "@ui5/webcomponents-icons/dist/date-time.js"; @@ -19,8 +18,8 @@ import type { DatePickerChangeEventDetail as DateTimePickerChangeEventDetail, DatePickerInputEventDetail as DateTimePickerInputEventDetail, } from "./DatePicker.js"; -import TimeSelection from "./TimeSelection.js"; -import type { TimeSelectionChangeEventDetail, TimeSelectionSliderChangeEventDetail } from "./TimeSelection.js"; +import TimeSelectionClocks from "./TimeSelectionClocks.js"; +import type { TimeSelectionChangeEventDetail } from "./TimePickerInternals.js"; // i18n texts import { @@ -132,7 +131,7 @@ type PreviewValues = { Button, ToggleButton, SegmentedButton, - TimeSelection, + TimeSelectionClocks, ], }) class DateTimePicker extends DatePicker { @@ -166,12 +165,6 @@ class DateTimePicker extends DatePicker { @property({ type: Object }) _previewValues!: PreviewValues; - /** - * @private - */ - @property({ defaultValue: "hours" }) - _currentTimeSlider!: string; - _handleResizeBound: ResizeObserverCallback; constructor() { @@ -211,8 +204,10 @@ class DateTimePicker extends DatePicker { */ async openPicker(): Promise { await super.openPicker(); - this._currentTimeSlider = "hours"; - this._previewValues.timeSelectionValue = this.value || this.getFormat().format(new Date()); + this._previewValues = { + ...this._previewValues, + timeSelectionValue: this.value || this.getFormat().format(new Date()), + }; } /** @@ -329,10 +324,6 @@ class DateTimePicker extends DatePicker { }; } - onTimeSliderChange(e: CustomEvent) { - this._currentTimeSlider = e.detail.slider; - } - /** * Handles document resize to switch between phoneMode and normal appearance. */ @@ -350,10 +341,6 @@ class DateTimePicker extends DatePicker { return !this._calendarSelectedDates || !this._calendarSelectedDates.length; } - get _density() { - return getEffectiveContentDensity(this); - } - /** * Handles clicking on the submit button, within the picker`s footer. */ @@ -385,9 +372,6 @@ class DateTimePicker extends DatePicker { _dateTimeSwitchChange(e: CustomEvent) { // Note: fix when SegmentedButton is implemented in TS const target = e.target as HTMLElement; this._showTimeView = target.getAttribute("key") === "Time"; - if (this._showTimeView) { - this._currentTimeSlider = "hours"; - } } /** diff --git a/packages/main/src/DateTimePickerPopover.hbs b/packages/main/src/DateTimePickerPopover.hbs index d5ddb60ac1b6..4cb146cbef46 100644 --- a/packages/main/src/DateTimePickerPopover.hbs +++ b/packages/main/src/DateTimePickerPopover.hbs @@ -40,17 +40,14 @@ {{/unless}} {{#if showTimeView}} - + {{/if}} {{/inline}} diff --git a/packages/main/src/GroupHeaderListItem.hbs b/packages/main/src/GroupHeaderListItem.hbs index 17dc8f142dde..759a842572c6 100644 --- a/packages/main/src/GroupHeaderListItem.hbs +++ b/packages/main/src/GroupHeaderListItem.hbs @@ -1,6 +1,6 @@
      - {{#if effectiveShowClearIcon}} + {{#if _effectiveShowClearIcon}}
      diff --git a/packages/main/src/Input.ts b/packages/main/src/Input.ts index 04c03c6bc21f..507097b00ae8 100644 --- a/packages/main/src/Input.ts +++ b/packages/main/src/Input.ts @@ -55,7 +55,8 @@ import type { PopupScrollEventDetail } from "./Popup.js"; import InputType from "./types/InputType.js"; import Popover from "./Popover.js"; import Icon from "./Icon.js"; -import type { IIcon, IInputSuggestionItem } from "./Interfaces.js"; +import type { IIcon } from "./Icon.js"; +import type ListItemType from "./types/ListItemType.js"; // Templates import InputTemplate from "./generated/templates/InputTemplate.lit.js"; import InputPopoverTemplate from "./generated/templates/InputPopoverTemplate.lit.js"; @@ -84,6 +85,22 @@ import ResponsivePopoverCommonCss from "./generated/themes/ResponsivePopoverComm import ValueStateMessageCss from "./generated/themes/ValueStateMessage.css.js"; import SuggestionsCss from "./generated/themes/Suggestions.css.js"; +/** + * Interface for components that represent a suggestion item, usable in ui5-input + * + * @public + */ +interface IInputSuggestionItem extends UI5Element { + text: string; + groupItem: boolean; + description?: string; + image?: string; + icon?: string; + additionalText?: string; + additionalTextState?: `${ValueState}`; + type?: `${ListItemType}`; +} + type NativeInputAttributes = { min?: number, max?: number, @@ -116,7 +133,7 @@ enum INPUT_ACTIONS { } type InputEventDetail = { - inputType?: string; + inputType: string; } type InputSuggestionItemSelectEventDetail = { @@ -176,7 +193,6 @@ type InputSuggestionScrollEventDetail = { * * @constructor * @extends UI5Element - * @implements {IInput} * @public */ @customElement({ @@ -463,7 +479,7 @@ class Input extends UI5Element implements SuggestionComponent, IFormElement { * @since 1.2.0 */ @property({ type: Boolean }) - effectiveShowClearIcon!: boolean; + _effectiveShowClearIcon!: boolean; /** * @private @@ -684,7 +700,7 @@ class Input extends UI5Element implements SuggestionComponent, IFormElement { this.suggestionObjects = this.Suggestions!.defaultSlotProperties(this.typedInValue); } - this.effectiveShowClearIcon = (this.showClearIcon && !!this.value && !this.readonly && !this.disabled); + this._effectiveShowClearIcon = (this.showClearIcon && !!this.value && !this.readonly && !this.disabled); this.style.setProperty(getScopedVarName("--_ui5-input-icons-count"), `${this.iconsCount}`); this.FormSupport = getFeature("FormSupport"); @@ -969,7 +985,7 @@ class Input extends UI5Element implements SuggestionComponent, IFormElement { this._keepInnerValue = false; - if (this.showClearIcon && !this.effectiveShowClearIcon) { + if (this.showClearIcon && !this._effectiveShowClearIcon) { this._clearIconClicked = false; this._handleChange(); } @@ -1054,7 +1070,7 @@ class Input extends UI5Element implements SuggestionComponent, IFormElement { const inputDomRef = this.getInputDOMRefSync(); const emptyValueFiredOnNumberInput = this.value && this.isTypeNumber && !inputDomRef!.value; const eventType: string = (e as InputEvent).inputType - || (e.detail && (e as CustomEvent).detail.inputType!) + || (e.detail as InputEventDetail).inputType || ""; this._keepInnerValue = false; @@ -1572,7 +1588,7 @@ class Input extends UI5Element implements SuggestionComponent, IFormElement { get iconsCount(): number { const slottedIconsCount = this.icon ? this.icon.length : 0; - const clearIconCount = Number(this.effectiveShowClearIcon) ?? 0; + const clearIconCount = Number(this._effectiveShowClearIcon) ?? 0; return slottedIconsCount + clearIconCount; } @@ -1775,7 +1791,9 @@ Input.define(); export default Input; export type { + IInputSuggestionItem, InputSuggestionScrollEventDetail, InputSuggestionItemSelectEventDetail, InputSuggestionItemPreviewEventDetail, + InputEventDetail, }; diff --git a/packages/main/src/Interfaces.ts b/packages/main/src/Interfaces.ts deleted file mode 100644 index 88d8bcc16fc0..000000000000 --- a/packages/main/src/Interfaces.ts +++ /dev/null @@ -1,207 +0,0 @@ -import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js"; -import type { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js"; -import type ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js"; -import type { TableColumnInfo } from "./Table.js"; -import type TableMode from "./types/TableMode.js"; -import type SemanticColor from "./types/SemanticColor.js"; -import type Tab from "./Tab.js"; -import type ListItemType from "./types/ListItemType.js"; - -/** - * Interface for components that represent an avatar and may be slotted in numerous higher-order components such as ui5-avatar-group - * - * @public - */ -interface IAvatar extends HTMLElement {} - -/** - * Interface for components that may be used as a button inside numerous higher-order components - * - * @public - */ -interface IButton extends HTMLElement, ITabbable { - nonInteractive: boolean; -} - -/** - * Interface for components that may be slotted inside ui5-card as header - * - * @public - */ -interface ICardHeader extends HTMLElement { - subtitleText: string, - titleText: string, - status: string, - interactive: boolean, -} - -/** - * Interface for components that may be slotted inside a ui5-combobox - * - * @public - */ -interface IComboBoxItem { - text: string, - focused: boolean, - isGroupItem: boolean, - selected?: boolean, - additionalText?: string, -} - -/** - * Interface for components that may be used inside a ui5-color-palette or ui5-color-palette-popover - * - * @public - */ -interface IColorPaletteItem extends HTMLElement, ITabbable { - value?: string, - index?: number, -} - -/** - * Interface for components that represent an icon, usable in numerous higher-order components - * - * @public - */ -interface IIcon extends HTMLElement { } - -/** - * Interface for components that represent an input, usable in numerous higher-order components - * - * @public - */ -interface IInput extends HTMLElement { } - -/** - * Interface for components that may be slotted inside a ui5-multi-combobox as items - * - * @public - */ -interface IMultiComboBoxItem extends UI5Element { - text: string, - selected: boolean, - isGroupItem?: boolean, - stableDomRef: string, -} - -/** - * Interface for components that may be slotted inside ui5-segmented-button as items - * - * @public - */ -interface ISegmentedButtonItem extends UI5Element { - disabled: boolean, - pressed: boolean, - _tabIndex: string, -} - -/** - * Interface for components that may be slotted inside ui5-select as options - * - * @public - */ -interface IOption extends UI5Element { - selected: boolean, - disabled: boolean, - title: string, - icon?: string | null, - value: string, - additionalText?: string, - _focused?: boolean, - focused?: boolean, - text?: Array, - stableDomRef: string, - displayText?: string, -} - -/** - * Interface for components that may be slotted inside ui5-tabcontainer as items - * - * @public - */ -interface ITab extends UI5Element { - isSeparator: boolean; - getTabInStripDomRef: () => ITab | null; - additionalText?: string; - design?: `${SemanticColor}`; - disabled?: boolean; - icon?: string; - isSingleClickArea?: boolean; - requiresExpandButton?: boolean; - selected?: boolean; - subTabs?: Array; - tabs?: Array - text?: string; - _hasOwnContent?: boolean; - _level?: number; - _selected?: boolean; - _getElementInStrip?: () => ITab | null; - _isInline?: boolean; - _mixedMode?: boolean; - _posinset?: number; - _setsize?: number; - _realTab?: Tab; - _isTopLevelTab?: boolean; - _style?: Record; -} - -/** - * Interface for components that represent a suggestion item, usable in ui5-input - * - * @public - */ -interface IInputSuggestionItem extends UI5Element { - text: string; - groupItem: boolean; - description?: string; - image?: string; - icon?: string; - additionalText?: string; - additionalTextState?: `${ValueState}`; - type?: `${ListItemType}`; -} - -/** - * Interface for components that may be slotted inside a ui5-table as rows - * - * @public - */ -interface ITableRow extends HTMLElement, ITabbable { - mode: `${TableMode}`, - selected: boolean, - _busy: boolean, - _tabIndex: string, - _ariaPosition: string, - _columnsInfoString: string, - _columnsInfo: Array, - _tabbables: Array, -} - -/** - * Interface for components that represent a token and are usable in components such as ui5-multi-input - * - * @public - */ -interface IToken extends HTMLElement, ITabbable { - text: string; - readonly: boolean, - selected: boolean, - isTruncatable: boolean, -} - -export { - IAvatar, - IButton, - ICardHeader, - IColorPaletteItem, - IComboBoxItem, - IIcon, - IInput, - IMultiComboBoxItem, - ISegmentedButtonItem, - IInputSuggestionItem, - IOption, - ITab, - ITableRow, - IToken, -}; diff --git a/packages/main/src/Link.ts b/packages/main/src/Link.ts index 2ada74fbe7dd..427ee0ea183d 100644 --- a/packages/main/src/Link.ts +++ b/packages/main/src/Link.ts @@ -12,6 +12,7 @@ import type { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNaviga import { markEvent } from "@ui5/webcomponents-base/dist/MarkedEvents.js"; import LinkDesign from "./types/LinkDesign.js"; import WrappingType from "./types/WrappingType.js"; +import HasPopup from "./types/HasPopup.js"; // Template import LinkTemplate from "./generated/templates/LinkTemplate.lit.js"; @@ -28,6 +29,11 @@ type LinkClickEventDetail = { shiftKey: boolean; } +type AccessibilityAttributes = { + expanded?: "true" | "false" | boolean, + hasPopup?: `${HasPopup}`, +}; + /** * @class * @@ -227,7 +233,7 @@ class Link extends UI5Element implements ITabbable { *
        *
      • Dialog
      • *
      • Grid
      • - *
      • ListBox
      • + *
      • Listbox
      • *
      • Menu
      • *
      • Tree
      • *
      @@ -239,13 +245,13 @@ class Link extends UI5Element implements ITabbable { * @default {} */ @property({ type: Object }) - accessibilityAttributes!: { expanded: "true" | "false", hasPopup: "Dialog" | "Grid" | "ListBox" | "Menu" | "Tree" }; + accessibilityAttributes!: AccessibilityAttributes; @property({ noAttribute: true }) _rel: string | undefined; @property({ noAttribute: true }) - _tabIndex!: string; + forcedTabIndex!: string; /** * Indicates if the element is on focus. @@ -282,8 +288,8 @@ class Link extends UI5Element implements ITabbable { } get effectiveTabIndex() { - if (this._tabIndex) { - return this._tabIndex; + if (this.forcedTabIndex) { + return this.forcedTabIndex; } return (this.disabled || !this.textContent?.length) ? "-1" : "0"; } @@ -382,4 +388,7 @@ Link.define(); export default Link; -export type { LinkClickEventDetail }; +export type { + LinkClickEventDetail, + AccessibilityAttributes, +}; diff --git a/packages/main/src/ListItem.ts b/packages/main/src/ListItem.ts index aac7a2952741..1f88d576a12f 100644 --- a/packages/main/src/ListItem.ts +++ b/packages/main/src/ListItem.ts @@ -15,7 +15,7 @@ import ListItemBase from "./ListItemBase.js"; import RadioButton from "./RadioButton.js"; import CheckBox from "./CheckBox.js"; import Button from "./Button.js"; -import { IButton } from "./Interfaces.js"; +import type { IButton } from "./Button.js"; import { DELETE, ARIA_LABEL_LIST_ITEM_CHECKBOX, @@ -66,8 +66,8 @@ type AccInfo = { } type AccessibilityAttributes = { - ariaSetsize: number, - ariaPosinset: number, + ariaSetsize?: number, + ariaPosinset?: number, } /** @@ -76,6 +76,7 @@ type AccessibilityAttributes = { * for the StandardListItem and CustomListItem classes. * * @constructor + * @abstract * @extends ListItemBase * @public */ diff --git a/packages/main/src/ListItemBase.ts b/packages/main/src/ListItemBase.ts index f341b01c0693..21b4695591af 100644 --- a/packages/main/src/ListItemBase.ts +++ b/packages/main/src/ListItemBase.ts @@ -18,6 +18,7 @@ import styles from "./generated/themes/ListItemBase.css.js"; * for the ListItem and GroupHeaderListItem classes. * * @constructor + * @abstract * @extends UI5Element * @public */ @@ -46,7 +47,7 @@ class ListItemBase extends UI5Element implements ITabbable { hasBorder!: boolean; @property({ defaultValue: "-1", noAttribute: true }) - _tabIndex!: string; + forcedTabIndex!: string; /** * Defines whether ui5-li is in disabled state. @@ -149,7 +150,7 @@ class ListItemBase extends UI5Element implements ITabbable { if (this.selected) { return 0; } - return this._tabIndex; + return this.forcedTabIndex; } } diff --git a/packages/main/src/MessageStrip.ts b/packages/main/src/MessageStrip.ts index d8f852992227..a64de2506e5a 100644 --- a/packages/main/src/MessageStrip.ts +++ b/packages/main/src/MessageStrip.ts @@ -15,7 +15,7 @@ import "@ui5/webcomponents-icons/dist/error.js"; import "@ui5/webcomponents-icons/dist/alert.js"; import MessageStripDesign from "./types/MessageStripDesign.js"; import MessageStripTemplate from "./generated/templates/MessageStripTemplate.lit.js"; -import type { IIcon } from "./Interfaces.js"; +import type { IIcon } from "./Icon.js"; import Icon from "./Icon.js"; import Button from "./Button.js"; import { diff --git a/packages/main/src/MultiComboBox.hbs b/packages/main/src/MultiComboBox.hbs index 205008d12693..004c6709a823 100644 --- a/packages/main/src/MultiComboBox.hbs +++ b/packages/main/src/MultiComboBox.hbs @@ -61,6 +61,12 @@ data-sap-focus-ref /> + {{#if _effectiveShowClearIcon}} +
      + +
      + {{/if}} + {{#if icon}} {{/if}} diff --git a/packages/main/src/MultiComboBox.ts b/packages/main/src/MultiComboBox.ts index 598a3f6afb63..99c589577466 100644 --- a/packages/main/src/MultiComboBox.ts +++ b/packages/main/src/MultiComboBox.ts @@ -39,6 +39,7 @@ import { } from "@ui5/webcomponents-base/dist/Keys.js"; import Integer from "@ui5/webcomponents-base/dist/types/Integer.js"; import "@ui5/webcomponents-icons/dist/slim-arrow-down.js"; +import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js"; import { isPhone, isAndroid, @@ -63,7 +64,7 @@ import Tokenizer, { ClipboardDataOperation } from "./Tokenizer.js"; import type { TokenizerTokenDeleteEventDetail } from "./Tokenizer.js"; import Token from "./Token.js"; import Icon from "./Icon.js"; -import type { IIcon, IMultiComboBoxItem } from "./Interfaces.js"; +import type { IIcon } from "./Icon.js"; import Popover from "./Popover.js"; import ResponsivePopover from "./ResponsivePopover.js"; import List from "./List.js"; @@ -86,6 +87,8 @@ import { SHOW_SELECTED_BUTTON, MULTICOMBOBOX_DIALOG_OK_BUTTON, VALUE_STATE_ERROR_ALREADY_SELECTED, + MCB_SELECTED_ITEMS, + INPUT_CLEAR_ICON_ACC_NAME, } from "./generated/i18n/i18n-defaults.js"; // Templates @@ -101,6 +104,20 @@ import MultiComboBoxPopover from "./generated/themes/MultiComboBoxPopover.css.js import ComboBoxFilter from "./types/ComboBoxFilter.js"; import type FormSupportT from "./features/InputElementsFormSupport.js"; import type ListItemBase from "./ListItemBase.js"; +import CheckBox from "./CheckBox.js"; +import Input, { InputEventDetail } from "./Input.js"; + +/** + * Interface for components that may be slotted inside a ui5-multi-combobox as items + * + * @public + */ +interface IMultiComboBoxItem extends UI5Element { + text: string, + selected: boolean, + isGroupItem?: boolean, + stableDomRef: string, +} type ValueStateAnnouncement = Record, string>; type ValueStateTypeAnnouncement = Record, string>; @@ -181,6 +198,7 @@ type MultiComboboxItemWithSelection = { GroupHeaderListItem, ToggleButton, Button, + CheckBox, ], }) /** @@ -191,7 +209,7 @@ type MultiComboboxItemWithSelection = { @event("change") /** - * Fired when the value of the component changes at each keystroke. + * Fired when the value of the component changes at each keystroke or clear icon is pressed. * * @public */ @@ -206,8 +224,7 @@ type MultiComboboxItemWithSelection = { @event("open-change") /** - * Fired when selection is changed by user interaction - * in SingleSelect and MultiSelect modes. + * Fired when selection is changed by user interaction. * * @param {IMultiComboBoxItem[]} items an array of the selected items. * @public @@ -278,8 +295,6 @@ class MultiComboBox extends UI5Element { /** * Defines the value state of the component. - *

      - * Available options are: * * @default "None" * @public @@ -311,7 +326,6 @@ class MultiComboBox extends UI5Element { /** * Defines the filter type of the component. - * Available options are: StartsWithPerTerm, StartsWith, Contains and None. * * @default "StartsWithPerTerm" * @public @@ -319,6 +333,16 @@ class MultiComboBox extends UI5Element { @property({ type: ComboBoxFilter, defaultValue: ComboBoxFilter.StartsWithPerTerm }) filter!: `${ComboBoxFilter}`; + /** + * Defines whether the clear icon of the multi-combobox will be shown. + * + * @default false + * @public + * @since 1.20.1 + */ + @property({ type: Boolean }) + showClearIcon!: boolean; + /** * Defines the accessible ARIA name of the component. * @@ -339,6 +363,15 @@ class MultiComboBox extends UI5Element { @property() accessibleNameRef!: string; + /** + * Determines if the select all checkbox is visible on top of suggestions. + * + * @default false + * @public + */ + @property({ type: Boolean }) + showSelectAll!: boolean; + @property({ type: ValueState, defaultValue: ValueState.None }) _effectiveValueState!: `${ValueState}`; /** @@ -350,6 +383,9 @@ class MultiComboBox extends UI5Element { @property({ type: Boolean }) _open!: boolean; + @property() + _valueBeforeOpen!: string; + @property({ type: Object, noAttribute: true, multiple: true }) _filteredItems!: Array; @@ -377,6 +413,15 @@ class MultiComboBox extends UI5Element { @property({ type: Boolean, noAttribute: true }) _performingSelectionTwice!: boolean; + @property({ type: Boolean, noAttribute: true }) + _allSelected!: boolean; + + @property({ type: Boolean, noAttribute: true }) + _effectiveShowClearIcon!: boolean; + + @property({ type: ValueState, defaultValue: ValueState.None }) + _dialogInputValueState!: `${ValueState}`; + /** * Indicates whether the tokenizer has tokens * @private @@ -418,7 +463,6 @@ class MultiComboBox extends UI5Element { selectedValues: Array; _inputLastValue: string; - _valueBeforeOpen: string _deleting: boolean; _validationTimeout: Timeout | null; _handleResizeBound: ResizeObserverCallback; @@ -427,6 +471,7 @@ class MultiComboBox extends UI5Element { _lastValue: string; _shouldFilterItems?: boolean; _showMorePressed?: boolean; + _clearingValue?: boolean; allItemsPopover?: ResponsivePopover; valueStateHeader?: HTMLElement; list?: List; @@ -447,12 +492,11 @@ class MultiComboBox extends UI5Element { this.selectedValues = []; this._itemsBeforeOpen = []; this._inputLastValue = ""; - this._valueBeforeOpen = ""; this._deleting = false; this._validationTimeout = null; this._handleResizeBound = this._handleResize.bind(this); this.valueBeforeAutoComplete = ""; - this._lastValue = ""; + this._lastValue = this.getAttribute("value") || ""; this.currentItemIdx = -1; this.FormSupport = undefined; } @@ -469,8 +513,47 @@ class MultiComboBox extends UI5Element { this._inputWidth = this.offsetWidth; } + _handleMobileInput(e: CustomEvent) { + const target = e.target as Input; + const value = target.value; + + if (!this.allowCustomValues && !this._filterItems(value).length) { + this._dialogInputValueState = ValueState.Error; + } else { + this._dialogInputValueState = this.valueState; + } + + this.value = value; + this._shouldFilterItems = true; + this.valueBeforeAutoComplete = value; + + this.fireEvent("input"); + } + _inputChange() { - this.fireEvent("change"); + if (!this._clearingValue && this._lastValue !== this.value) { + this._lastValue = this.value; + this.fireEvent("change"); + } + } + + async _mobileInputChange(e:CustomEvent) { + this._inputChange.call(this); + const { value } = (e.target as Input); + const matchingItem = this.items.find(item => item.text === value); + + if (!matchingItem) { + return; + } + + const initiallySelected = matchingItem?.selected; + const changePrevented = this.fireSelectionChange(); + + if (!changePrevented) { + matchingItem.selected = !initiallySelected; + (await this._getResponsivePopover()).close(); + this.value = ""; + } } togglePopover() { @@ -854,9 +937,10 @@ class MultiComboBox extends UI5Element { } } - _onValueStateKeydown(e: KeyboardEvent) { + async _onListHeaderKeydown(e: KeyboardEvent) { const isArrowDown = isDown(e); const isArrowUp = isUp(e); + const isSelectAllFocused = (e.target as HTMLElement).classList.contains("ui5-mcb-select-all-checkbox"); if (isTabNext(e) || isTabPrevious(e)) { this._onItemTab(); @@ -866,12 +950,44 @@ class MultiComboBox extends UI5Element { e.preventDefault(); if (isArrowDown || isDownCtrl(e)) { + if (this.showSelectAll && !isSelectAllFocused) { + return ((await this._getResponsivePopover())!.querySelector(".ui5-mcb-select-all-checkbox") as CheckBox).focus(); + } + this._handleArrowDown(); } if (isArrowUp || isUpCtrl(e)) { - this._shouldAutocomplete = true; - this._inputDom.focus(); + if (e.target === this.valueStateHeader || !this.valueStateHeader) { + this._shouldAutocomplete = true; + return this._inputDom.focus(); + } + + if (this.showSelectAll && isSelectAllFocused) { + this.valueStateHeader?.focus(); + } + } + } + + _handleSelectAllCheckboxClick(e: CustomEvent) { + if (!this.filterSelected) { + this._handleSelectAll(); + this.filterSelected = false; + } else { + this._previouslySelectedItems = this._getSelectedItems(); + this.selectedItems?.forEach(item => { + item.selected = (e.target as CheckBox).checked; + }); + + if (!(e.target as CheckBox).checked) { + this.filterSelected = false; + } + + const changePrevented = this.fireSelectionChange(); + + if (changePrevented) { + this._revertSelection(); + } } } @@ -924,13 +1040,15 @@ class MultiComboBox extends UI5Element { return; } - if (((isArrowUp && isFirstItem) || isHome(e)) && this.valueStateHeader) { - this.valueStateHeader.focus(); - } - - if (!this.valueStateHeader && isFirstItem && isArrowUp) { - this._inputDom.focus(); - this._shouldAutocomplete = true; + if (isFirstItem && isArrowUp) { + if (this.showSelectAll) { + ((await this._getResponsivePopover())!.querySelector(".ui5-mcb-select-all-checkbox") as CheckBox).focus(); + } else if (this.valueStateHeader) { + this.valueStateHeader.focus(); + } else { + this._inputDom.focus(); + this._shouldAutocomplete = true; + } } } @@ -963,10 +1081,17 @@ class MultiComboBox extends UI5Element { await this._setValueStateHeader(); } - if (isArrowDown && isOpen && this.valueStateHeader) { - this.value = this.valueBeforeAutoComplete || this.value; - this.valueStateHeader.focus(); - return; + if (isArrowDown && isOpen) { + if (this.valueStateHeader) { + this.value = this.valueBeforeAutoComplete || this.value; + this.valueStateHeader.focus(); + return; + } + + if (this.showSelectAll) { + ((await this._getResponsivePopover())!.querySelector(".ui5-mcb-select-all-checkbox") as CheckBox).focus(); + return; + } } if (isArrowDown && hasSuggestions) { @@ -978,13 +1103,16 @@ class MultiComboBox extends UI5Element { } } - _handleArrowDown() { + async _handleArrowDown() { const isOpen = this.allItemsPopover?.opened; const firstListItem = this.list?.items[0]; if (isOpen) { firstListItem && this.list?._itemNavigation.setCurrentItem(firstListItem); this.value = this.valueBeforeAutoComplete || this.value; + + // wait item navigation to apply correct tabindex + await renderFinished(); firstListItem?.focus(); } else if (!this.readonly) { this._navigateToNextItem(); @@ -1257,6 +1385,10 @@ class MultiComboBox extends UI5Element { // casted to KeyboardEvent since isSpace and isSpaceCtrl accepts KeyboardEvent only const castedEvent = { key: e.detail.key } as KeyboardEvent; + if (!e.detail.selectedItems.length && this.filterSelected) { + this.filterSelected = false; + } + if (!e.detail.selectionComponentPressed && !isSpace(castedEvent) && !isSpaceCtrl(castedEvent)) { this.allItemsPopover?.close(); this.value = ""; @@ -1329,6 +1461,7 @@ class MultiComboBox extends UI5Element { _afterClosePicker() { // close device's keyboard and prevent further typing if (isPhone()) { + this._dialogInputValueState = this.valueState; this.blur(); } @@ -1348,6 +1481,10 @@ class MultiComboBox extends UI5Element { }); this._valueBeforeOpen = this.value; + this._dialogInputValueState = this.valueState; + + // in order to use the autocomplete feature of the input we should not set value in state + this._innerInput.value = this.value; if (this.filterSelected) { const selectedItems = this._filteredItems.filter(item => item.selected); @@ -1399,6 +1536,15 @@ class MultiComboBox extends UI5Element { const autoCompletedChars = input && (input.selectionEnd || 0) - (input.selectionStart || 0); const value = input && input.value; + if (this.open) { + this._getList().then(list => { + const selectedItemsCount = list?.querySelectorAll("[ui5-li][selected]")?.length; + const allItemsCount = list?.querySelectorAll("[ui5-li]")?.length; + this._allSelected = selectedItemsCount === allItemsCount; + }); + } + this._effectiveShowClearIcon = (this.showClearIcon && !!this.value && !this.readonly && !this.disabled); + this.FormSupport = getFeature("FormSupport"); this._inputLastValue = value; @@ -1455,6 +1601,20 @@ class MultiComboBox extends UI5Element { this._iconPressed = true; } + _clear() { + this.value = ""; + this._inputDom.value = ""; + this.fireEvent("input"); + + if (!this._isPhone) { + this.focus(); + } + } + + _iconMouseDown() { + this._clearingValue = true; + } + storeResponsivePopoverWidth() { if (this.open && !this._listWidth) { this._listWidth = this.list!.offsetWidth; @@ -1546,6 +1706,8 @@ class MultiComboBox extends UI5Element { this._innerInput.blur(); } + this._clearingValue = false; + if (!isPhone() && (((e.relatedTarget as HTMLElement)?.tagName !== "UI5-STATIC-AREA-ITEM") || !e.relatedTarget)) { this._innerInput.setSelectionRange(0, this.value.length); } @@ -1554,13 +1716,17 @@ class MultiComboBox extends UI5Element { token.selected = false; }); - this._lastValue = this.value; this.valueBeforeAutoComplete = ""; } inputFocusOut(e: FocusEvent) { - if (!this.shadowRoot!.contains(e.relatedTarget as Node) && !this._deleting) { + if (!this.shadowRoot!.contains(e.relatedTarget as Node) && !this._deleting && !this._clearingValue) { this.focused = false; + + if (this._lastValue !== this.value) { + this._inputChange(); + } + this._tokenizer.expanded = this.open; // remove the value if user focus out the input and focus is not going in the popover if (!isPhone() && !this.allowCustomValues && (this.staticAreaItem !== e.relatedTarget)) { @@ -1586,11 +1752,13 @@ class MultiComboBox extends UI5Element { } get hasValueState() { - return this.valueState !== ValueState.None; + return (this.valueState !== ValueState.None) || (this._dialogInputValueState !== ValueState.None); } get hasValueStateMessage() { - return this.hasValueState && this.valueState !== ValueState.Success; + const valueState = isPhone() ? this._dialogInputValueState : this.valueState; + + return this.hasValueState && valueState !== ValueState.Success; } get ariaValueStateHiddenText() { @@ -1612,7 +1780,9 @@ class MultiComboBox extends UI5Element { } get valueStateDefaultText(): string { - if (this.valueState === ValueState.None) { + const valueState = isPhone() ? this._dialogInputValueState : this.valueState; + + if (valueState === ValueState.None) { return ""; } @@ -1620,7 +1790,7 @@ class MultiComboBox extends UI5Element { return MultiComboBox.i18nBundle.getText(VALUE_STATE_ERROR_ALREADY_SELECTED); } - return this.valueStateTextMappings[this.valueState]; + return this.valueStateTextMappings[valueState]; } get valueStateTextId() { @@ -1639,7 +1809,9 @@ class MultiComboBox extends UI5Element { * This method is relevant for sap_horizon theme only */ get _valueStateMessageIcon() { - if (this.valueState === ValueState.None) { + const valueState = (isPhone() && this.open) ? this._dialogInputValueState : this.valueState; + + if (valueState === ValueState.None) { return ""; } @@ -1648,7 +1820,7 @@ class MultiComboBox extends UI5Element { [ValueState.Warning]: "alert", [ValueState.Success]: "sys-enter-2", [ValueState.Information]: "information", - }[this.valueState]; + }[valueState]; } get _tokensCountText() { @@ -1699,7 +1871,7 @@ class MultiComboBox extends UI5Element { get _innerInput(): HTMLInputElement { if (isPhone()) { if (this.allItemsPopover?.opened) { - return this.allItemsPopover.querySelector("input")!; + return this.allItemsPopover.querySelector("ui5-input")!.shadowRoot!.querySelector("input")!; } } @@ -1743,8 +1915,20 @@ class MultiComboBox extends UI5Element { get iconsCount() { const slottedIconsCount = this.icon?.length || 0; + const clearIconCount = Number(this._effectiveShowClearIcon) ?? 0; const arrowDownIconsCount = this.readonly ? 0 : 1; - return slottedIconsCount + arrowDownIconsCount; + + return slottedIconsCount + clearIconCount + arrowDownIconsCount; + } + + get clearIconAccessibleName() { + return MultiComboBox.i18nBundle.getText(INPUT_CLEAR_ICON_ACC_NAME); + } + + get selectAllCheckboxLabel() { + const items = this.items.filter(item => !item.isGroupItem); + const selected = items.filter(item => item.selected); + return MultiComboBox.i18nBundle.getText(MCB_SELECTED_ITEMS, selected.length, items.length); } get classes(): ClassMap { @@ -1758,10 +1942,10 @@ class MultiComboBox extends UI5Element { popoverValueState: { "ui5-valuestatemessage-root": true, "ui5-valuestatemessage-header": true, - "ui5-valuestatemessage--success": this.valueState === ValueState.Success, - "ui5-valuestatemessage--error": this.valueState === ValueState.Error, - "ui5-valuestatemessage--warning": this.valueState === ValueState.Warning, - "ui5-valuestatemessage--information": this.valueState === ValueState.Information, + "ui5-valuestatemessage--success": (this.valueState === ValueState.Success) || (this._dialogInputValueState === ValueState.Success), + "ui5-valuestatemessage--error": (this.valueState === ValueState.Error) || (this._dialogInputValueState === ValueState.Error), + "ui5-valuestatemessage--warning": (this.valueState === ValueState.Warning) || (this._dialogInputValueState === ValueState.Warning), + "ui5-valuestatemessage--information": (this.valueState === ValueState.Information) || (this._dialogInputValueState === ValueState.Information), }, }; } diff --git a/packages/main/src/MultiComboBoxPopover.hbs b/packages/main/src/MultiComboBoxPopover.hbs index a957dfed2bc7..c0853cf249c0 100644 --- a/packages/main/src/MultiComboBoxPopover.hbs +++ b/packages/main/src/MultiComboBoxPopover.hbs @@ -23,22 +23,18 @@
      -
      - -
      + {{#each _filteredItems}} + + {{/each}} + valueStateMessage}}
      {{/if}} + + {{> selectAllWrapper}} {{/if}} {{#unless _isPhone}} {{#if hasValueStateMessage}} -
      +
      {{> valueStateMessage}}
      {{/if}} + + {{> selectAllWrapper}} {{/unless}} {{#if filterSelected}} @@ -139,3 +139,11 @@ {{this.text}} {{/inline}} + +{{#*inline "selectAllWrapper"}} + {{#if showSelectAll}} +
      + +
      + {{/if}} +{{/inline}} diff --git a/packages/main/src/MultiInput.ts b/packages/main/src/MultiInput.ts index 8257f443ea66..ec3f873862ef 100644 --- a/packages/main/src/MultiInput.ts +++ b/packages/main/src/MultiInput.ts @@ -12,6 +12,7 @@ import { isHome, isEnd, } from "@ui5/webcomponents-base/dist/Keys.js"; +import type { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js"; import { getScopedVarName } from "@ui5/webcomponents-base/dist/CustomElementsScope.js"; import { MULTIINPUT_ROLEDESCRIPTION_TEXT } from "./generated/i18n/i18n-defaults.js"; import Input from "./Input.js"; @@ -20,7 +21,6 @@ import styles from "./generated/themes/MultiInput.css.js"; import Token from "./Token.js"; import Tokenizer, { ClipboardDataOperation } from "./Tokenizer.js"; import type { TokenizerTokenDeleteEventDetail } from "./Tokenizer.js"; -import type { IToken } from "./Interfaces.js"; import Icon from "./Icon.js"; import "@ui5/webcomponents-icons/dist/value-help.js"; @@ -29,6 +29,13 @@ import type { InputSuggestionItemPreviewEventDetail as MultiInputSuggestionItemPreviewEventDetail, } from "./Input.js"; +interface IToken extends HTMLElement, ITabbable { + text: string; + readonly: boolean, + selected: boolean, + isTruncatable: boolean, +} + type MultiInputTokenDeleteEventDetail = { token: IToken; } @@ -408,6 +415,7 @@ MultiInput.define(); export default MultiInput; export type { + IToken, MultiInputTokenDeleteEventDetail, MultiInputSuggestionItemSelectEventDetail, MultiInputSuggestionItemPreviewEventDetail, diff --git a/packages/main/src/Option.ts b/packages/main/src/Option.ts index d53082bf28de..f64fbf860f72 100644 --- a/packages/main/src/Option.ts +++ b/packages/main/src/Option.ts @@ -2,7 +2,7 @@ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js"; import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js"; import slot from "@ui5/webcomponents-base/dist/decorators/slot.js"; import property from "@ui5/webcomponents-base/dist/decorators/property.js"; -import type { IOption } from "./Interfaces.js"; +import type { IOption } from "./Select.js"; /** * @class * @@ -14,6 +14,7 @@ import type { IOption } from "./Interfaces.js"; * @extends UI5Element * @implements {IOption} * @public + * @abstract */ @customElement("ui5-option") class Option extends UI5Element implements IOption { @@ -83,7 +84,7 @@ class Option extends UI5Element implements IOption { * @private */ @property({ type: Boolean }) - _focused!: boolean; + focused!: boolean; /** * Defines the text of the component. diff --git a/packages/main/src/Panel.ts b/packages/main/src/Panel.ts index c98b7e2920d6..1e501289b732 100644 --- a/packages/main/src/Panel.ts +++ b/packages/main/src/Panel.ts @@ -153,8 +153,6 @@ class Panel extends UI5Element { /** * Defines the "aria-level" of component heading, * set by the headerText. - *

      - * Available options are: "H6" to "H1". * * @default "H2" * @public diff --git a/packages/main/src/Popover.ts b/packages/main/src/Popover.ts index 3bf539c5c7b0..c51c5ce73525 100644 --- a/packages/main/src/Popover.ts +++ b/packages/main/src/Popover.ts @@ -502,7 +502,7 @@ class Popover extends Popup { * @private */ calcPlacement(targetRect: DOMRect, popoverSize: PopoverSize): CalculatedPlacement { - let left = 0; + let left = Popover.VIEWPORT_MARGIN; let top = 0; const allowTargetOverlap = this.allowTargetOverlap; @@ -570,10 +570,10 @@ class Popover extends Popup { // correct popover positions if (isVertical) { - if (popoverSize.width > clientWidth || left < 0) { - left = 0; - } else if (left + popoverSize.width > clientWidth) { - left -= left + popoverSize.width - clientWidth; + if (popoverSize.width > clientWidth || left < Popover.VIEWPORT_MARGIN) { + left = Popover.VIEWPORT_MARGIN; + } else if (left + popoverSize.width > clientWidth - Popover.VIEWPORT_MARGIN) { + left = clientWidth - Popover.VIEWPORT_MARGIN - popoverSize.width; } } else { if (popoverSize.height > clientHeight || top < 0) { // eslint-disable-line @@ -719,7 +719,7 @@ class Popover extends Popup { getVerticalLeft(targetRect: DOMRect, popoverSize: PopoverSize): number { const horizontalAlign = this._actualHorizontalAlign; - let left = 0; + let left = Popover.VIEWPORT_MARGIN; switch (horizontalAlign) { case PopoverHorizontalAlign.Center: diff --git a/packages/main/src/SegmentedButton.ts b/packages/main/src/SegmentedButton.ts index adac5f8d45b1..98dbd372f168 100644 --- a/packages/main/src/SegmentedButton.ts +++ b/packages/main/src/SegmentedButton.ts @@ -3,7 +3,7 @@ import customElement from "@ui5/webcomponents-base/dist/decorators/customElement import property from "@ui5/webcomponents-base/dist/decorators/property.js"; import event from "@ui5/webcomponents-base/dist/decorators/event.js"; import slot from "@ui5/webcomponents-base/dist/decorators/slot.js"; -import ItemNavigation from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js"; +import ItemNavigation, { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js"; import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js"; import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js"; import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js"; @@ -15,7 +15,6 @@ import { import { SEGMENTEDBUTTON_ARIA_DESCRIPTION, SEGMENTEDBUTTON_ARIA_DESCRIBEDBY } from "./generated/i18n/i18n-defaults.js"; import SegmentedButtonItem from "./SegmentedButtonItem.js"; import SegmentedButtonMode from "./types/SegmentedButtonMode.js"; -import type { ISegmentedButtonItem } from "./Interfaces.js"; // Template import SegmentedButtonTemplate from "./generated/templates/SegmentedButtonTemplate.lit.js"; @@ -23,6 +22,16 @@ import SegmentedButtonTemplate from "./generated/templates/SegmentedButtonTempla // Styles import SegmentedButtonCss from "./generated/themes/SegmentedButton.css.js"; +/** + * Interface for components that may be slotted inside ui5-segmented-button as items + * + * @public + */ +interface ISegmentedButtonItem extends UI5Element, ITabbable { + disabled: boolean, + pressed: boolean, +} + type SegmentedButtonSelectionChangeEventDetail = { selectedItem: ISegmentedButtonItem, selectedItems: Array, @@ -291,4 +300,5 @@ SegmentedButton.define(); export default SegmentedButton; export type { SegmentedButtonSelectionChangeEventDetail, + ISegmentedButtonItem, }; diff --git a/packages/main/src/SegmentedButtonItem.ts b/packages/main/src/SegmentedButtonItem.ts index e932dde1f129..65d62398ac0e 100644 --- a/packages/main/src/SegmentedButtonItem.ts +++ b/packages/main/src/SegmentedButtonItem.ts @@ -2,7 +2,7 @@ import customElement from "@ui5/webcomponents-base/dist/decorators/customElement import property from "@ui5/webcomponents-base/dist/decorators/property.js"; import Integer from "@ui5/webcomponents-base/dist/types/Integer.js"; -import type { ISegmentedButtonItem } from "./Interfaces.js"; +import type { ISegmentedButtonItem } from "./SegmentedButton.js"; import SegmentedButtonItemTemplate from "./generated/templates/SegmentedButtonItemTemplate.lit.js"; import ToggleButton from "./ToggleButton.js"; @@ -30,7 +30,6 @@ import { SEGMENTEDBUTTONITEM_ARIA_DESCRIPTION } from "./generated/i18n/i18n-defa * @constructor * @extends ToggleButton * @implements { ISegmentedButtonItem } - * @abstract * @public */ @customElement({ diff --git a/packages/main/src/Select.ts b/packages/main/src/Select.ts index 79164e7f47a7..d14328244f47 100644 --- a/packages/main/src/Select.ts +++ b/packages/main/src/Select.ts @@ -72,7 +72,24 @@ import type { IFormElement, NativeFormElement } from "./features/InputElementsFo import type ListItemBase from "./ListItemBase.js"; import type SelectMenu from "./SelectMenu.js"; import type { SelectMenuOptionClick, SelectMenuChange } from "./SelectMenu.js"; -import { IOption } from "./Interfaces.js"; + +/** + * Interface for components that may be slotted inside ui5-select as options + * + * @public + */ +interface IOption extends UI5Element { + selected: boolean, + disabled: boolean, + title: string, + icon?: string | null, + value: string, + additionalText?: string, + focused?: boolean, + text?: Array, + stableDomRef: string, + displayText?: string, +} type SelectChangeEventDetail = { selectedOption: IOption, @@ -601,11 +618,11 @@ class Select extends UI5Element implements IFormElement { } opt.selected = false; - opt._focused = false; + opt.focused = false; return { selected: false, - _focused: false, + focused: false, icon: opt.icon, value: opt.value, textContent: opt.textContent, @@ -618,9 +635,9 @@ class Select extends UI5Element implements IFormElement { if (lastSelectedOptionIndex > -1) { syncOpts[lastSelectedOptionIndex].selected = true; - syncOpts[lastSelectedOptionIndex]._focused = true; + syncOpts[lastSelectedOptionIndex].focused = true; options[lastSelectedOptionIndex].selected = true; - options[lastSelectedOptionIndex]._focused = true; + options[lastSelectedOptionIndex].focused = true; this._text = syncOpts[lastSelectedOptionIndex].textContent; this._selectedIndex = lastSelectedOptionIndex; } else { @@ -628,9 +645,9 @@ class Select extends UI5Element implements IFormElement { this._selectedIndex = -1; if (syncOpts[firstEnabledOptionIndex]) { syncOpts[firstEnabledOptionIndex].selected = true; - syncOpts[firstEnabledOptionIndex]._focused = true; + syncOpts[firstEnabledOptionIndex].focused = true; options[firstEnabledOptionIndex].selected = true; - options[firstEnabledOptionIndex]._focused = true; + options[firstEnabledOptionIndex].focused = true; this._selectedIndex = firstEnabledOptionIndex; this._text = options[firstEnabledOptionIndex].textContent; } @@ -882,12 +899,10 @@ class Select extends UI5Element implements IFormElement { const previousOption = options[oldIndex]; previousOption.selected = false; - previousOption._focused = false; previousOption.focused = false; const nextOption = options[newIndex]; nextOption.selected = true; - nextOption._focused = true; nextOption.focused = true; this._selectedIndex = newIndex; diff --git a/packages/main/src/SelectMenu.ts b/packages/main/src/SelectMenu.ts index af9a9cef2333..88f85289cd33 100644 --- a/packages/main/src/SelectMenu.ts +++ b/packages/main/src/SelectMenu.ts @@ -24,7 +24,7 @@ import Button from "./Button.js"; // Types import type Select from "./Select.js"; import type SelectMenuOption from "./SelectMenuOption.js"; -import { IOption } from "./Interfaces.js"; +import type { IOption } from "./Select.js"; type SelectMenuOptionClick = { option: SelectMenuOption, diff --git a/packages/main/src/SelectMenuOption.ts b/packages/main/src/SelectMenuOption.ts index f1d92ed0d937..975f642079b3 100644 --- a/packages/main/src/SelectMenuOption.ts +++ b/packages/main/src/SelectMenuOption.ts @@ -10,7 +10,8 @@ import CustomListItemTemplate from "./generated/templates/CustomListItemTemplate import CustomListItem from "./CustomListItem.js"; import ListItemType from "./types/ListItemType.js"; import type { AccessibilityAttributes } from "./ListItem.js"; -import { IButton, IOption } from "./Interfaces.js"; +import type { IButton } from "./Button.js"; +import type { IOption } from "./Select.js"; /** * @class diff --git a/packages/main/src/SuggestionGroupItem.ts b/packages/main/src/SuggestionGroupItem.ts index 71ee8aa07e42..1569dd8874ff 100644 --- a/packages/main/src/SuggestionGroupItem.ts +++ b/packages/main/src/SuggestionGroupItem.ts @@ -2,7 +2,7 @@ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js"; import property from "@ui5/webcomponents-base/dist/decorators/property.js"; import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js"; import GroupHeaderListItem from "./GroupHeaderListItem.js"; -import type { IInputSuggestionItem } from "./Interfaces.js"; +import type { IInputSuggestionItem } from "./Input.js"; /** * @class diff --git a/packages/main/src/SuggestionItem.ts b/packages/main/src/SuggestionItem.ts index 4a20d0399b69..66fd14d914e4 100644 --- a/packages/main/src/SuggestionItem.ts +++ b/packages/main/src/SuggestionItem.ts @@ -5,7 +5,7 @@ import property from "@ui5/webcomponents-base/dist/decorators/property.js"; import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js"; import SuggestionListItem from "./SuggestionListItem.js"; import ListItemType from "./types/ListItemType.js"; -import type { IInputSuggestionItem } from "./Interfaces.js"; +import type { IInputSuggestionItem } from "./Input.js"; /** * @class @@ -100,8 +100,6 @@ class SuggestionItem extends UI5Element implements IInputSuggestionItem { /** * Defines the state of the additionalText. - *

      - * Available options are: "None" (by default), "Success", "Information", "Warning" and "Error". * * @default "None" * @since 1.0.0-rc.15 diff --git a/packages/main/src/Tab.ts b/packages/main/src/Tab.ts index 91321bd2574b..0ef7d522f626 100644 --- a/packages/main/src/Tab.ts +++ b/packages/main/src/Tab.ts @@ -4,7 +4,7 @@ import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js"; import property from "@ui5/webcomponents-base/dist/decorators/property.js"; import slot from "@ui5/webcomponents-base/dist/decorators/slot.js"; import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js"; -import { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js"; +import type { ITabbable } from "@ui5/webcomponents-base/dist/delegate/ItemNavigation.js"; import executeTemplate from "@ui5/webcomponents-base/dist/renderer/executeTemplate.js"; import willShowContent from "@ui5/webcomponents-base/dist/util/willShowContent.js"; import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js"; @@ -23,7 +23,7 @@ import "@ui5/webcomponents-icons/dist/sys-enter-2.js"; import SemanticColor from "./types/SemanticColor.js"; import ListItemType from "./types/ListItemType.js"; import TabContainer from "./TabContainer.js"; -import type { ITab } from "./Interfaces.js"; +import type { ITab } from "./TabContainer.js"; import Icon from "./Icon.js"; import Button from "./Button.js"; import CustomListItem from "./CustomListItem.js"; @@ -136,13 +136,13 @@ class Tab extends UI5Element implements ITab, ITabbable { selected!: boolean; @property({ type: Boolean }) - _selected!: boolean; + forcedSelected!: boolean; @property({ type: Object }) - _realTab!: Tab; + realTabReference!: Tab; @property({ type: Boolean }) - _isTopLevelTab!: boolean; + isTopLevelTab!: boolean; /** * Holds the content associated with this tab. @@ -176,25 +176,25 @@ class Tab extends UI5Element implements ITab, ITabbable { }) subTabs!: Array - _isInline?: boolean; - _mixedMode?: boolean; - _getElementInStrip?: () => ITab | null; + isInline?: boolean; + forcedMixedMode?: boolean; + getElementInStrip?: () => ITab | null; _individualSlot!: string; static i18nBundle: I18nBundle; - set _tabIndex(val: string) { + set forcedTabIndex(val: string) { this.getTabInStripDomRef()!.setAttribute("tabindex", val); } - get _tabIndex() { + get forcedTabIndex() { return this.getTabInStripDomRef()!.getAttribute("tabindex")!; } get displayText() { let text = this.text; - if (this._isInline && this.additionalText) { + if (this.isInline && this.additionalText) { text += ` (${this.additionalText})`; } @@ -218,19 +218,19 @@ class Tab extends UI5Element implements ITab, ITabbable { } get requiresExpandButton() { - return this.subTabs.length > 0 && this._isTopLevelTab && this._hasOwnContent; + return this.subTabs.length > 0 && this.isTopLevelTab && this.hasOwnContent; } get isSingleClickArea() { - return this.subTabs.length > 0 && this._isTopLevelTab && !this._hasOwnContent; + return this.subTabs.length > 0 && this.isTopLevelTab && !this.hasOwnContent; } get isTwoClickArea() { - return this.subTabs.length > 0 && this._isTopLevelTab && this._hasOwnContent; + return this.subTabs.length > 0 && this.isTopLevelTab && this.hasOwnContent; } get isOnSelectedTabPath(): boolean { - return this._realTab === this || this.tabs.some(subTab => subTab.isOnSelectedTabPath); + return this.realTabReference === this || this.tabs.some(subTab => subTab.isOnSelectedTabPath); } get _effectiveSlotName() { @@ -238,10 +238,10 @@ class Tab extends UI5Element implements ITab, ITabbable { } get _defaultSlotName() { - return this._realTab === this ? "" : "disabled-slot"; + return this.realTabReference === this ? "" : "disabled-slot"; } - get _hasOwnContent() { + get hasOwnContent() { return willShowContent(this.content); } @@ -254,8 +254,8 @@ class Tab extends UI5Element implements ITab, ITabbable { * @since 1.0.0-rc.16 */ getTabInStripDomRef(): ITab | null { - if (this._getElementInStrip) { - return this._getElementInStrip(); + if (this.getElementInStrip) { + return this.getElementInStrip(); } return null; @@ -264,19 +264,19 @@ class Tab extends UI5Element implements ITab, ITabbable { getFocusDomRef() { let focusedDomRef = super.getFocusDomRef(); - if (this._getElementInStrip && this._getElementInStrip()) { - focusedDomRef = this._getElementInStrip()!; + if (this.getElementInStrip && this.getElementInStrip()) { + focusedDomRef = this.getElementInStrip()!; } return focusedDomRef; } get isMixedModeTab() { - return !this.icon && this._mixedMode; + return !this.icon && this.forcedMixedMode; } get isTextOnlyTab() { - return !this.icon && !this._mixedMode; + return !this.icon && !this.forcedMixedMode; } get isIconTab() { @@ -289,7 +289,7 @@ class Tab extends UI5Element implements ITab, ITabbable { get effectiveSelected() { const subItemSelected = this.tabs.some(elem => elem.effectiveSelected); - return this.selected || this._selected || subItemSelected; + return this.selected || this.forcedSelected || subItemSelected; } get effectiveHidden() { @@ -333,7 +333,7 @@ class Tab extends UI5Element implements ITab, ITabbable { classes.push("ui5-tab-strip-item--disabled"); } - if (this._isInline) { + if (this.isInline) { classes.push("ui5-tab-strip-item--inline"); } @@ -341,7 +341,7 @@ class Tab extends UI5Element implements ITab, ITabbable { classes.push("ui5-tab-strip-item--withAdditionalText"); } - if (!this.icon && !this._mixedMode) { + if (!this.icon && !this.forcedMixedMode) { classes.push("ui5-tab-strip-item--textOnly"); } @@ -349,7 +349,7 @@ class Tab extends UI5Element implements ITab, ITabbable { classes.push("ui5-tab-strip-item--withIcon"); } - if (!this.icon && this._mixedMode) { + if (!this.icon && this.forcedMixedMode) { classes.push("ui5-tab-strip-item--mixedMode"); } diff --git a/packages/main/src/TabContainer.ts b/packages/main/src/TabContainer.ts index b9dee612e5e6..8565f27868cc 100644 --- a/packages/main/src/TabContainer.ts +++ b/packages/main/src/TabContainer.ts @@ -46,7 +46,7 @@ import SemanticColor from "./types/SemanticColor.js"; import TabContainerBackgroundDesign from "./types/TabContainerBackgroundDesign.js"; import TabLayout from "./types/TabLayout.js"; import TabsOverflowMode from "./types/TabsOverflowMode.js"; -import type { IButton, ITab } from "./Interfaces.js"; +import type { IButton } from "./Button.js"; // Templates import TabContainerTemplate from "./generated/templates/TabContainerTemplate.lit.js"; @@ -56,6 +56,37 @@ import TabContainerPopoverTemplate from "./generated/templates/TabContainerPopov import tabContainerCss from "./generated/themes/TabContainer.css.js"; import ResponsivePopoverCommonCss from "./generated/themes/ResponsivePopoverCommon.css.js"; +/** + * Interface for components that may be slotted inside ui5-tabcontainer as items + * + * @public + */ +interface ITab extends UI5Element { + isSeparator: boolean; + getTabInStripDomRef: () => ITab | null; + additionalText?: string; + design?: `${SemanticColor}`; + disabled?: boolean; + icon?: string; + isSingleClickArea?: boolean; + requiresExpandButton?: boolean; + selected?: boolean; + subTabs?: Array; + tabs?: Array + text?: string; + hasOwnContent?: boolean; + forcedLevel?: number; + forcedSelected?: boolean; + getElementInStrip?: () => ITab | null; + isInline?: boolean; + forcedMixedMode?: boolean; + forcedPosinset?: number; + forcedSetsize?: number; + realTabReference?: Tab; + isTopLevelTab?: boolean; + forcedStyle?: Record; +} + const tabStyles: Array = []; const staticAreaTabStyles: Array = []; const PAGE_UP_DOWN_SIZE = 5; @@ -70,7 +101,7 @@ interface TabContainerExpandButton extends Button { } interface TabContainerTabInOverflow extends CustomListItem { - _realTab: Tab; + realTabReference: Tab; } /** @@ -346,11 +377,11 @@ class TabContainer extends UI5Element { // update selected tab const selectedTabs = this._allItemsAndSubItems.filter(tab => tab.selected) as Array; if (selectedTabs.length) { - this._selectedTab._selected = false; + this._selectedTab.forcedSelected = false; this._selectedTab = selectedTabs[0]; } else { this._selectedTab = this._allItemsAndSubItems[0] as Tab; - this._selectedTab._selected = true; + this._selectedTab.forcedSelected = true; } this._setItemsPrivateProperties(this.items); @@ -397,19 +428,19 @@ class TabContainer extends UI5Element { _setItemsPrivateProperties(items: Array) { // set real dom ref to all items, then return only the tabs for further processing const allTabs = items.filter(item => { - item._getElementInStrip = () => this.getDomRef()!.querySelector(`[id="${item._id}"]`); + item.getElementInStrip = () => this.getDomRef()!.querySelector(`[id="${item._id}"]`); return !item.isSeparator; }); allTabs.forEach((tab, index, arr) => { - tab._isInline = this.tabLayout === TabLayout.Inline; - tab._mixedMode = this.mixedMode; - tab._posinset = index + 1; - tab._setsize = arr.length; - tab._realTab = this._selectedTab; - tab._isTopLevelTab = items.some(i => i === tab); + tab.isInline = this.tabLayout === TabLayout.Inline; + tab.forcedMixedMode = this.mixedMode; + tab.forcedPosinset = index + 1; + tab.forcedSetsize = arr.length; + tab.realTabReference = this._selectedTab; + tab.isTopLevelTab = items.some(i => i === tab); walk(items, _tab => { - _tab._realTab = tab._realTab; + _tab.realTabReference = tab.realTabReference; }); }); } @@ -418,13 +449,13 @@ class TabContainer extends UI5Element { const tab = getTab(e.target as HTMLElement); if (tab) { - this._itemNavigation.setCurrentItem(tab._realTab); + this._itemNavigation.setCurrentItem(tab.realTabReference); } } async _onTabStripClick(e: Event) { const tab = getTab(e.target as HTMLElement); - if (!tab || tab._realTab.disabled) { + if (!tab || tab.realTabReference.disabled) { return; } @@ -436,8 +467,8 @@ class TabContainer extends UI5Element { return; } - if (!tab._realTab._hasOwnContent && tab._realTab.tabs.length) { - this._overflowItems = tab._realTab.subTabs; + if (!tab.realTabReference.hasOwnContent && tab.realTabReference.tabs.length) { + this._overflowItems = tab.realTabReference.subTabs; this._addStyleIndent(this._overflowItems); this.responsivePopover = await this._respPopover(); @@ -447,7 +478,7 @@ class TabContainer extends UI5Element { this._setPopoverInitialFocus(); } - this.responsivePopover.showAt(tab._realTab.getTabInStripDomRef()!); + this.responsivePopover.showAt(tab.realTabReference.getTabInStripDomRef()!); return; } @@ -465,9 +496,9 @@ class TabContainer extends UI5Element { tabInstance.focus(); } - if (e.type === "keydown" && !(e.target as Tab)._realTab.isSingleClickArea) { + if (e.type === "keydown" && !(e.target as Tab).realTabReference.isSingleClickArea) { button = (e.target as Tab).querySelectorAll(".ui5-tab-expand-button")[0]; - tabInstance = (e.target as Tab)._realTab; + tabInstance = (e.target as Tab).realTabReference; } // if clicked between the expand button and the tab @@ -492,12 +523,12 @@ class TabContainer extends UI5Element { const selectedTabInOverflow = this._getSelectedTabInOverflow(); const tab = selectedTabInOverflow || this._getFirstFocusableItemInOverflow(); - this.responsivePopover!.initialFocus = `${tab._realTab._id}-li`; + this.responsivePopover!.initialFocus = `${tab.realTabReference._id}-li`; } _getSelectedTabInOverflow() { return ( this.responsivePopover!.content[0]).items.find(item => { - return (item)._realTab && (item)._realTab.selected; + return (item).realTabReference && (item).realTabReference.selected; }); } @@ -507,12 +538,12 @@ class TabContainer extends UI5Element { _onTabStripKeyDown(e: KeyboardEvent) { const tab = getTab(e.target as HTMLElement); - if (!tab || tab._realTab.disabled) { + if (!tab || tab.realTabReference.disabled) { return; } if (isEnter(e)) { - if (tab._realTab.isSingleClickArea) { + if (tab.realTabReference.isSingleClickArea) { this._onTabStripClick(e); } else { this._onHeaderItemSelect(tab); @@ -524,10 +555,10 @@ class TabContainer extends UI5Element { } if (isDown(e) || isUp(e)) { - if (tab._realTab.requiresExpandButton) { + if (tab.realTabReference.requiresExpandButton) { this._onTabExpandButtonClick(e); } - if (tab._realTab.isSingleClickArea) { + if (tab.realTabReference.isSingleClickArea) { this._onTabStripClick(e); } } @@ -535,13 +566,13 @@ class TabContainer extends UI5Element { _onTabStripKeyUp(e: KeyboardEvent) { const tab = getTab(e.target as HTMLElement); - if (!tab || tab._realTab.disabled) { + if (!tab || tab.realTabReference.disabled) { return; } if (isSpace(e)) { e.preventDefault(); - if (tab._realTab.isSingleClickArea) { + if (tab.realTabReference.isSingleClickArea) { this._onTabStripClick(e); } else { this._onHeaderItemSelect(tab); @@ -593,7 +624,7 @@ class TabContainer extends UI5Element { _getAllSubItems(items: Array, result: Array = [], level = 1) { items.forEach(item => { if (item.hasAttribute("ui5-tab") || item.hasAttribute("ui5-tab-separator")) { - item._level = level; + item.forcedLevel = level; result.push(item); if (item.subTabs) { @@ -620,8 +651,8 @@ class TabContainer extends UI5Element { const selected = selectedTabIndex === index; item.selected = selected; - if (item._selected) { - item._selected = false; + if (item.forcedSelected) { + item.forcedSelected = false; } }); @@ -732,13 +763,13 @@ class TabContainer extends UI5Element { .some(tab => tab.design !== SemanticColor.Default && tab.design !== SemanticColor.Neutral); walk(tabs, tab => { - let level = tab._level! - 1; + let level = tab.forcedLevel! - 1; if (tab.isSeparator) { level += 1; } - tab._style = { + tab.forcedStyle = { [getScopedVarName("--_ui5-tab-indentation-level")]: level, [getScopedVarName("--_ui5-tab-extra-indent")]: extraIndent ? 1 : null, }; diff --git a/packages/main/src/TabInOverflow.hbs b/packages/main/src/TabInOverflow.hbs index f362ac188a45..045bd2ab0f96 100644 --- a/packages/main/src/TabInOverflow.hbs +++ b/packages/main/src/TabInOverflow.hbs @@ -4,7 +4,7 @@ type="{{this.overflowState}}" aria-disabled="{{this.effectiveDisabled}}" aria-selected="{{this.effectiveSelected}}" - ._realTab="{{this}}" + .realTabReference="{{this}}" style="{{this._style}}" >
      diff --git a/packages/main/src/TabInStrip.hbs b/packages/main/src/TabInStrip.hbs index f940fce36770..c126dbf58c15 100644 --- a/packages/main/src/TabInStrip.hbs +++ b/packages/main/src/TabInStrip.hbs @@ -4,14 +4,14 @@ role="tab" aria-roledescription="{{_roleDescription}}" aria-haspopup="{{_ariaHasPopup}}" - aria-posinset="{{this._posinset}}" - aria-setsize="{{this._setsize}}" + aria-posinset="{{this.forcedPosinset}}" + aria-setsize="{{this.forcedSetsize}}" aria-controls="ui5-tc-content" aria-selected="{{this.effectiveSelected}}" aria-disabled="{{this.effectiveDisabled}}" ?disabled="{{this.effectiveDisabled}}" aria-labelledby="{{this.ariaLabelledBy}}" - ._realTab="{{this}}" + .realTabReference="{{this}}" > {{#if this.icon}}
      diff --git a/packages/main/src/TabSeparator.ts b/packages/main/src/TabSeparator.ts index 2d08a54355fb..1a6f59a029ba 100644 --- a/packages/main/src/TabSeparator.ts +++ b/packages/main/src/TabSeparator.ts @@ -3,7 +3,7 @@ import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js"; import executeTemplate from "@ui5/webcomponents-base/dist/renderer/executeTemplate.js"; import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js"; import TabContainer from "./TabContainer.js"; -import type { ITab } from "./Interfaces.js"; +import type { ITab } from "./TabContainer.js"; // Templates import TabSeparatorInStripTemplate from "./generated/templates/TabSeparatorInStripTemplate.lit.js"; @@ -28,7 +28,7 @@ import overflowCss from "./generated/themes/TabSeparatorInOverflow.css.js"; renderer: litRender, }) class TabSeparator extends UI5Element implements ITab { - _getElementInStrip?: () => ITab | null; + getElementInStrip?: () => ITab | null; static get stripTemplate() { return TabSeparatorInStripTemplate; @@ -57,8 +57,8 @@ class TabSeparator extends UI5Element implements ITab { * @public */ getTabInStripDomRef(): ITab | null { - if (this._getElementInStrip) { - return this._getElementInStrip(); + if (this.getElementInStrip) { + return this.getElementInStrip(); } return null; diff --git a/packages/main/src/Table.hbs b/packages/main/src/Table.hbs index 1f51b71a8d29..3ca157ad0ed5 100644 --- a/packages/main/src/Table.hbs +++ b/packages/main/src/Table.hbs @@ -17,7 +17,7 @@ id="{{_columnHeader.id}}" class="ui5-table-header-row" aria-label="{{ariaLabelText}}" - tabindex="{{_columnHeader._tabIndex}}" + tabindex="{{_columnHeader.forcedTabIndex}}" @click="{{_onColumnHeaderClick}}" @focusin="{{_onColumnHeaderFocused}}" @keydown="{{_onColumnHeaderKeydown}}" diff --git a/packages/main/src/Table.ts b/packages/main/src/Table.ts index a54a2d962c8d..af3b64d0e3a3 100644 --- a/packages/main/src/Table.ts +++ b/packages/main/src/Table.ts @@ -55,7 +55,6 @@ import { TABLE_HEADER_ROW_INFORMATION, TABLE_ROW_POSITION, } from "./generated/i18n/i18n-defaults.js"; -import type { ITableRow } from "./Interfaces.js"; // Template import TableTemplate from "./generated/templates/TableTemplate.lit.js"; @@ -63,6 +62,21 @@ import TableTemplate from "./generated/templates/TableTemplate.lit.js"; // Styles import tableStyles from "./generated/themes/Table.css.js"; +/** + * Interface for components that may be slotted inside a ui5-table as rows + * + * @public + */ +interface ITableRow extends HTMLElement, ITabbable { + mode: `${TableMode}`, + selected: boolean, + forcedBusy: boolean, + forcedAriaPosition: string, + _columnsInfoString: string, + _columnsInfo: Array, + tabbableElements: Array, +} + const GROWING_WITH_SCROLL_DEBOUNCE_RATE = 250; // ms const PAGE_UP_DOWN_SIZE = 20; @@ -487,10 +501,10 @@ class Table extends UI5Element { super(); this.visibleColumns = []; // template loop should always have a defined array - // The ItemNavigation requires each item to 1) have a "_tabIndex" property and 2) be either a UI5Element, or have an id property (to find it in the component's shadow DOM by) + // The ItemNavigation requires each item to 1) have a "forcedTabIndex" property and 2) be either a UI5Element, or have an id property (to find it in the component's shadow DOM by) this._columnHeader = { id: `${this._id}-columnHeader`, - _tabIndex: "0", + forcedTabIndex: "0", }; this._itemNavigation = new ItemNavigation(this, { @@ -528,8 +542,8 @@ class Table extends UI5Element { row._columnsInfoString = JSON.stringify(row._columnsInfo); } - row._ariaPosition = Table.i18nBundle.getText(TABLE_ROW_POSITION, index + 2, rowsCount); - row._busy = this.busy; + row.forcedAriaPosition = Table.i18nBundle.getText(TABLE_ROW_POSITION, index + 2, rowsCount); + row.forcedBusy = this.busy; row.removeEventListener("ui5-_focused", this.fnOnRowFocused as EventListener); row.addEventListener("ui5-_focused", this.fnOnRowFocused as EventListener); row.removeEventListener("ui5-f7-pressed", this.fnHandleF7 as EventListener); @@ -801,12 +815,12 @@ class Table extends UI5Element { */ _handleF7(e: CustomEvent) { const row = e.detail.row; - row._tabbables = getTabbableElements(row); + row.tabbableElements = getTabbableElements(row); const activeElement = getActiveElement(); - const lastFocusedElement = row._tabbables[this._prevNestedElementIndex] || row._tabbables[0]; - const targetIndex = row._tabbables.indexOf(activeElement as HTMLElement); + const lastFocusedElement = row.tabbableElements[this._prevNestedElementIndex] || row.tabbableElements[0]; + const targetIndex = row.tabbableElements.indexOf(activeElement as HTMLElement); - if (!row._tabbables.length) { + if (!row.tabbableElements.length) { return; } diff --git a/packages/main/src/TableGroupRow.hbs b/packages/main/src/TableGroupRow.hbs index 6441278912c1..64c0e64b0904 100644 --- a/packages/main/src/TableGroupRow.hbs +++ b/packages/main/src/TableGroupRow.hbs @@ -2,7 +2,7 @@ class="ui5-table-group-row-root" part="group-row" aria-label={{ariaLabelText}} - tabindex="{{_tabIndex}}" + tabindex="{{forcedTabIndex}}" @focusin="{{_onfocusin}}" > diff --git a/packages/main/src/TableGroupRow.ts b/packages/main/src/TableGroupRow.ts index 26be0c5ff119..0f89bab1c179 100644 --- a/packages/main/src/TableGroupRow.ts +++ b/packages/main/src/TableGroupRow.ts @@ -47,15 +47,6 @@ class TableGroupRow extends UI5Element implements ITableRow { /** * Defines the mode of the row * - *

      - * Note: - * Available options are: - *
        - *
      • None
      • - *
      • SingleSelect
      • - *
      • MultiSelect
      • - *
      - * * @default "None" * @private */ @@ -66,17 +57,17 @@ class TableGroupRow extends UI5Element implements ITableRow { _columnsInfo!: Array; @property({ defaultValue: "-1" }) - _tabIndex!: string; + forcedTabIndex!: string; @property({ type: Boolean }) - _busy!: boolean; + forcedBusy!: boolean; @property({ defaultValue: "", noAttribute: true }) - _ariaPosition!: string; + forcedAriaPosition!: string; // Properties, set and handled by the Table selected = false; - _tabbables: Array = []; + tabbableElements: Array = []; _columnsInfoString = ""; static i18nBundle: I18nBundle; @@ -88,7 +79,7 @@ class TableGroupRow extends UI5Element implements ITableRow { } get ariaLabelText() { - return `${TableGroupRow.i18nBundle.getText(TABLE_GROUP_ROW_ARIA_LABEL)} ${this.innerText}. ${this._ariaPosition}`; + return `${TableGroupRow.i18nBundle.getText(TABLE_GROUP_ROW_ARIA_LABEL)} ${this.innerText}. ${this.forcedAriaPosition}`; } visibleColCount(): number { diff --git a/packages/main/src/TableRow.hbs b/packages/main/src/TableRow.hbs index 715e50f45291..5d40d4f4c82b 100644 --- a/packages/main/src/TableRow.hbs +++ b/packages/main/src/TableRow.hbs @@ -1,6 +1,6 @@
      - * Available options are: - *
        - *
      • Active
      • - *
      • Inactive
      • - *
      - *

      + * * Note: When set to Active, the item will provide visual response upon press, - * while with type Inactive - will not. + * while with type Inactive-will not. * * @default "Inactive" * @since 1.0.0-rc.15 @@ -160,13 +154,13 @@ class TableRow extends UI5Element implements ITableRow { _columnsInfo!: Array; @property({ defaultValue: "-1" }) - _tabIndex!: string; + forcedTabIndex!: string; @property({ type: Boolean }) - _busy!: boolean; + forcedBusy!: boolean; @property({ defaultValue: "", noAttribute: true }) - _ariaPosition!: string; + forcedAriaPosition!: string; /** * Defines the cells of the component. @@ -186,7 +180,7 @@ class TableRow extends UI5Element implements ITableRow { _ontouchstart: PassiveEventListenerObject; // Properties, set and handled by the Table - _tabbables: Array = []; + tabbableElements: Array = []; _columnsInfoString = ""; constructor() { @@ -406,10 +400,10 @@ class TableRow extends UI5Element implements ITableRow { }).join(" "); if (isRowSelectable) { - return `${ariaLabel}. ${this._ariaPosition}. ${isSelected}`; + return `${ariaLabel}. ${this.forcedAriaPosition}. ${isSelected}`; } - return `${ariaLabel}. ${this._ariaPosition}`; + return `${ariaLabel}. ${this.forcedAriaPosition}`; } get ariaLabelRowSelection() { diff --git a/packages/main/src/TimePickerInternals.ts b/packages/main/src/TimePickerInternals.ts index 80b209cb6ac9..aadc2ed27ac4 100644 --- a/packages/main/src/TimePickerInternals.ts +++ b/packages/main/src/TimePickerInternals.ts @@ -59,6 +59,7 @@ type TimePickerEntityProperties = { showInnerCircle?: boolean, prependZero: boolean, active?: boolean, + focused?: boolean, hasSeparator?: boolean, attributes?: TimePickerEntityAttributes, } diff --git a/packages/main/src/TimeSelectionClocks.hbs b/packages/main/src/TimeSelectionClocks.hbs index f17145e08273..85e598f85737 100644 --- a/packages/main/src/TimeSelectionClocks.hbs +++ b/packages/main/src/TimeSelectionClocks.hbs @@ -5,6 +5,7 @@ @keydown={{_onkeydown}} @keyup={{_onkeyup}} @focusin={{_clocksFocusIn}} + @focusout={{_clocksFocusOut}} format-pattern="{{formatPattern}}" >
      {{this.stringValue}} {{/each}} @@ -31,6 +33,8 @@ {{#each _periods}} + +
      + Select all + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + Selected items count: 0 + + +
      +
      MultiComboBox with items @@ -444,6 +522,41 @@

      MultiComboBox in Compact

      +
      + + + + + + + + + + + + +
      + Change event calls: 0 +
      + Input event calls: 0 + + +
      + diff --git a/packages/main/test/pages/Toast.html b/packages/main/test/pages/Toast.html index 63f0500a1a48..bc730bed2df8 100644 --- a/packages/main/test/pages/Toast.html +++ b/packages/main/test/pages/Toast.html @@ -69,6 +69,19 @@ Show BottomEnd Toast BottomEnd +
      + + + Show Styled Toast + +
      + Styled Toast +
      + UNDO + DISMISS +
      +
      +
      diff --git a/packages/main/test/pages/styles/MultiComboBox.css b/packages/main/test/pages/styles/MultiComboBox.css index 861fe8a9f11b..3eba59de17df 100644 --- a/packages/main/test/pages/styles/MultiComboBox.css +++ b/packages/main/test/pages/styles/MultiComboBox.css @@ -50,4 +50,8 @@ ui5-multi-combobox:not(:defined) { #truncated-token { width: 240px; +} + +.column { + flex-direction: column; } \ No newline at end of file diff --git a/packages/main/test/pages/styles/Popover.css b/packages/main/test/pages/styles/Popover.css index 8e8f5905a66a..f6a94b40b1dd 100644 --- a/packages/main/test/pages/styles/Popover.css +++ b/packages/main/test/pages/styles/Popover.css @@ -32,7 +32,7 @@ ui5-date-picker, width: 300px } -.popover7auto { +.fullWidth { width: 100% } @@ -73,3 +73,9 @@ ui5-date-picker, position: relative; z-index: 1; } + +.flexContainerSpaceBetween { + display: flex; + justify-content: space-between; +} + diff --git a/packages/main/test/pages/styles/Toast.css b/packages/main/test/pages/styles/Toast.css index 88a737716bb1..f2a35b19b999 100644 --- a/packages/main/test/pages/styles/Toast.css +++ b/packages/main/test/pages/styles/Toast.css @@ -1,4 +1,46 @@ -ui5-button, ui5-title { - margin: 1rem; +ui5-button, +ui5-title { + margin: 1rem; } - + +.styled-content { + display: flex; + align-items: center; + justify-content: space-between; + height: 100%; + width: 100%; + padding: .5rem .75rem; + box-sizing: border-box; +} + +.styled-content ui5-button { + margin: 0; +} + +#wcToastStyled { + max-width: 300px; + width: 300px; + background-color: #323232; + padding: 0; + color: white; + height: 4rem; + white-space: normal; + border-radius: 0; +} + +#wcToastStyled[focused] { + outline-color: white; + outline-offset: -4px; +} + +.actions { + display: flex; +} + +.actions ui5-button { + color: red; +} + +.actions ui5-button:first-child { + margin-right: 1rem; +} \ No newline at end of file diff --git a/packages/main/test/specs/Breadcrumbs.spec.js b/packages/main/test/specs/Breadcrumbs.spec.js index bc4a8d8c3703..d91fa5ee0268 100644 --- a/packages/main/test/specs/Breadcrumbs.spec.js +++ b/packages/main/test/specs/Breadcrumbs.spec.js @@ -149,10 +149,10 @@ describe("Breadcrumbs general interaction", () => { it("standard breadcrumb with single item shows location", async () => { const breadcrumbs = await browser.$("#breadcrumbsWithSingleItem"), - label = (await breadcrumbs.shadow$("ui5-label")); + link = (await breadcrumbs.shadow$$("ui5-link"))[1]; // Check - assert.strictEqual(await label.getText(), "Location", "label is displayed"); + assert.strictEqual(await link.getText(), "Location", "label is displayed"); }); it("opens upon space", async () => { @@ -363,3 +363,43 @@ describe("Breadcrumbs general interaction", () => { }); }); + +describe("Breadcrumbs with item for current page", () => { + before(async () => { + await browser.url(`test/pages/Breadcrumbs.html`); + }); + + it("renders current page item as link", async () => { + const breadcrumbs = await browser.$("#breadcrumbs2"), + link = (await breadcrumbs.shadow$("li:last-child ui5-link")); + + // assert + assert.ok(await link.isExisting(), "item for current page is a link"); + assert.strictEqual(await link.getText(), "Location", + "item for current page has correct text"); + }); + + it("sets correct design to link for current page", async () => { + const breadcrumbs = await browser.$("#breadcrumbs2"), + link = (await breadcrumbs.shadow$("li:last-child ui5-link")); + + // assert + assert.strictEqual(await link.getProperty("design"), "Emphasized", + "link has correct design"); + }); + + it("does not render separator after link to current page", async () => { + const breadcrumbWithCurrentPage = await browser.$("#breadcrumbs2"), + breadcrumbWithNoCurrentPage = await browser.$("#breadcrumbs3"), + separatorAfterCurrentPageLink = + (await breadcrumbWithCurrentPage.shadow$("li:last-child span.ui5-breadcrumbs-separator")), + separatorAfterNonCurrentPageLink = + (await breadcrumbWithNoCurrentPage.shadow$("li:last-child span.ui5-breadcrumbs-separator")); + + // assert + assert.ok(await separatorAfterNonCurrentPageLink.isExisting(), + "renders separator after link to another page"); + assert.notOk(await separatorAfterCurrentPageLink.isExisting(), + "does not render separator after link to current page"); + }); +}); diff --git a/packages/main/test/specs/Calendar.spec.js b/packages/main/test/specs/Calendar.spec.js index bb5092782e82..eea7e6c0958a 100644 --- a/packages/main/test/specs/Calendar.spec.js +++ b/packages/main/test/specs/Calendar.spec.js @@ -329,7 +329,7 @@ describe("Calendar general interaction", () => { const yearButton = await calendarHeader.shadow$(`[data-ui5-cal-header-btn-year]`).$$('span'); assert.strictEqual(await monthButton[0].getText(), "Rajab", "first month set in the header"); - assert.strictEqual(await monthButton[1].getText(), "Sep – Oct", "Second month set in the header"); + assert.strictEqual(await monthButton[1].getText(), "Sep – Oct", "Second month set in the header"); assert.strictEqual(await yearButton[0].getText(), "1421 AH", "first year set in the header"); assert.strictEqual(await yearButton[1].getText(), "2000", "Second year set in the header"); @@ -345,7 +345,7 @@ describe("Calendar general interaction", () => { assert.strictEqual(await montInfo.length, 2, "Month is rendered with two text") assert.strictEqual(await montInfo[0].getText(), "Muharram", "First text of month set in the button") - assert.strictEqual(await montInfo[1].getText(), "Apr – May", "Second text of month set in the button") + assert.strictEqual(await montInfo[1].getText(), "Apr – May", "Second text of month set in the button") }); it("Calendar render two type for Year when YaerPicker is opened", async () => { diff --git a/packages/main/test/specs/CheckBox.spec.js b/packages/main/test/specs/CheckBox.spec.js index 533b969c1f7e..84159c6f05a4 100644 --- a/packages/main/test/specs/CheckBox.spec.js +++ b/packages/main/test/specs/CheckBox.spec.js @@ -1,4 +1,8 @@ import { assert } from "chai"; +const KEYS = { + ENTER: '\uE007', + SPACE: '\ue00D', +} describe("CheckBox general interaction", () => { before(async () => { @@ -22,6 +26,32 @@ describe("CheckBox general interaction", () => { assert.strictEqual(await field.getProperty("value"), "3", "Change event should be fired 3 times"); }); + it("tests readonly space and enter keys active state", async () => { + const checkBox = await browser.$("#cbReadonly"); + + await checkBox.click(); // force focus + + // Setup for SPACE Key + await browser.performActions([{ + type: 'key', + id: 'keyboard3', + actions: [{ type: 'keyDown', value: KEYS.SPACE }], + }]); + // Action + assert.strictEqual(await checkBox.getAttribute("active"), null, "Space doesn't trigger active attr"); + await browser.releaseActions(); + + // Setup for ENTER Key + await browser.performActions([{ + type: 'key', + id: 'keyboard3', + actions: [{ type: 'keyDown', value: KEYS.ENTER }], + }]); + // Action + assert.strictEqual(await checkBox.getAttribute("active"), null, "Enter doesn't trigger active attr"); + await browser.releaseActions(); + }); + it("tests change event not fired, when disabled", async () => { const checkBox = await browser.$("#cb2"); const field = await browser.$("#field"); diff --git a/packages/main/test/specs/ComboBox.mobile.spec.js b/packages/main/test/specs/ComboBox.mobile.spec.js index 7473dbc9a5d5..c4112db37940 100644 --- a/packages/main/test/specs/ComboBox.mobile.spec.js +++ b/packages/main/test/specs/ComboBox.mobile.spec.js @@ -13,7 +13,7 @@ describe("Basic mobile picker rendering and interaction", () => { await combo.scrollIntoView(); await combo.click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-input-inner-phone"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("[ui5-input]"); assert.ok(await dialogInput.isDisplayed(), "Input is displayed"); const dialogCloseButton = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-responsive-popover-close-btn"); @@ -58,7 +58,7 @@ describe("Basic mobile picker rendering and interaction", () => { await combo.scrollIntoView(); await combo.click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-input-inner-phone"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("[ui5-input]"); assert.strictEqual(await dialogInput.getAttribute("placeholder"), await combo.getAttribute("placeholder"), "Correct placeholder shown"); }); }); @@ -95,7 +95,7 @@ describe("Eventing", () => { await combo.scrollIntoView(); await combo.click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-input-inner-phone"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("[ui5-input]").shadow$("input"); await dialogInput.keys("A"); await dialogInput.keys("B"); @@ -118,11 +118,10 @@ describe("Eventing", () => { await combo.scrollIntoView(); await combo.click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-input-inner-phone"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("[ui5-input]"); const closeButton = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-responsive-popover-close-btn"); - await dialogInput.setValue(""); - await dialogInput.keys("A"); + await dialogInput.shadow$("input").keys("A"); await closeButton.click(); assert.notOk(await combo.getAttribute("value"), "The combo box does not have value attribute"); @@ -141,11 +140,11 @@ describe("Eventing", () => { await combo.scrollIntoView(); await combo.click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-input-inner-phone"); - const dialogOkButton =await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-responsive-popover-footer").$("ui5-button"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("[ui5-input]"); + const dialogOkButton = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-responsive-popover-footer").$("ui5-button"); - await dialogInput.setValue(""); - await dialogInput.keys("A"); + await dialogInput.setProperty("value", ""); + await dialogInput.shadow$("input").keys("A"); await dialogOkButton.click(); assert.strictEqual(await combo.getAttribute("value"), "Argentina", "The combo box have correct value attribute"); @@ -166,23 +165,40 @@ describe("Eventing", () => { await cb.click(); const resPopover = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover"); - const dialogInput = await resPopover.$(".ui5-input-inner-phone"); + const dialogInput = await resPopover.$("[ui5-input]"); const okBtn = await resPopover.$(".ui5-responsive-popover-footer").$("ui5-button"); - await dialogInput.click(); - await dialogInput.setValue(''); - await dialogInput.keys('A'); - await dialogInput.keys('ArrowDown'); + await dialogInput.shadow$("input").click(); + await dialogInput.setProperty("value", ''); + await dialogInput.shadow$("input").keys('A'); await okBtn.click(); assert.strictEqual(await cb.getProperty("value"), "Algeria", "Value should be Algeria."); await cb.click(); - await dialogInput.keys('Backspace'); + await dialogInput.shadow$("input").keys('Backspace'); + await dialogInput.shadow$("input").keys('Backspace'); + await dialogInput.shadow$("input").keys('Backspace'); + await dialogInput.shadow$("input").keys('Backspace'); + await dialogInput.shadow$("input").keys('Backspace'); + await dialogInput.shadow$("input").keys('Backspace'); + await dialogInput.shadow$("input").keys('Backspace'); await okBtn.click(); assert.strictEqual(await cb.getProperty("value"), "", "Value should be empty."); }); + + it ("Should set clear icon to dialog's input", async () => { + const cb = await $("#clear-icon-cb"); + const staticAreaItemClassName = await browser.getStaticAreaItemClassName("#clear-icon-cb"); + + await cb.shadow$("input").click(); + + const resPopover = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover"); + const dialogInput = await resPopover.$("[ui5-input]"); + + assert.ok(await dialogInput.getProperty("showClearIcon"), "Clear icon should be propagated to internal ui5-input") + }); }); describe("Typeahead", () => { @@ -199,8 +215,13 @@ describe("Typeahead", () => { await combo.scrollIntoView(); await combo.click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-input-inner-phone"); - await dialogInput.keys("Bu"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("[ui5-input]"); + + await dialogInput.shadow$("input").click(); + + await browser.keys("B"); + await browser.keys("u"); + assert.strictEqual(await dialogInput.getProperty("value"), sExpected, "Value is autocompleted"); }); @@ -213,7 +234,7 @@ describe("Typeahead", () => { await combo.scrollIntoView(); await combo.click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-input-inner-phone"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("[ui5-input]").shadow$("input"); await dialogInput.keys("b"); assert.strictEqual(await dialogInput.getProperty("value"), "b", "Value is not autocompleted"); }); @@ -232,7 +253,7 @@ describe("Picker filtering", () => { await combo.scrollIntoView(); await combo.click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-input-inner-phone"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("[ui5-input]"); const dialogList = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$('ui5-list') assert.strictEqual(await dialogList.$$('ui5-li').length, 8, "All of the items are shown (8)"); @@ -249,7 +270,7 @@ describe("Picker filtering", () => { await combo.scrollIntoView(); await combo.click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-input-inner-phone"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("[ui5-input]"); const dialogList = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$('ui5-list') assert.strictEqual(await dialogList.$$('ui5-li-groupheader').length, 3, "All of the group header list items are shown (3)"); diff --git a/packages/main/test/specs/ComboBox.spec.js b/packages/main/test/specs/ComboBox.spec.js index 054061efec79..b5cc6c0a3947 100644 --- a/packages/main/test/specs/ComboBox.spec.js +++ b/packages/main/test/specs/ComboBox.spec.js @@ -571,6 +571,39 @@ describe("General interaction", () => { assert.notEqual(initialListItems.length, updatedListItems.length, "item count should be updated"); }); + + it ("Should check clear icon availability", async () => { + await browser.url(`test/pages/ComboBox.html`); + + const cb = await $("#clear-icon-cb"); + const inner = cb.shadow$("input"); + const clearIcon = await cb.shadow$(".ui5-input-clear-icon-wrapper"); + + assert.ok(await cb.getProperty("_effectiveShowClearIcon"), "_effectiveShowClearIcon should be set to true when cb has a value"); + + await clearIcon.click(); + + assert.notOk(await cb.getProperty("_effectiveShowClearIcon"), "_effectiveShowClearIcon should be set to false when cb has no value"); + + await inner.click(); + await inner.keys("c"); + + assert.ok(await cb.getProperty("_effectiveShowClearIcon"), "_effectiveShowClearIcon should be set to true upon typing"); + }); + + it ("Should check clear icon events", async () => { + await browser.url(`test/pages/ComboBox.html`); + + const cb = await $("#clear-icon-cb"); + const clearIcon = await cb.shadow$(".ui5-input-clear-icon-wrapper"); + + await clearIcon.click(); + // focus out the combo + await $("#dynamic-items").click(); + + assert.strictEqual(await $("#clear-icon-change-count").getText(), "1", "change event is fired once"); + assert.strictEqual(await $("#clear-icon-input-count").getText(), "1", "input event is fired once"); + }); }); describe("Grouping", () => { diff --git a/packages/main/test/specs/DatePicker.spec.js b/packages/main/test/specs/DatePicker.spec.js index 7dff59f6ee78..e2d55fce74f9 100644 --- a/packages/main/test/specs/DatePicker.spec.js +++ b/packages/main/test/specs/DatePicker.spec.js @@ -40,7 +40,8 @@ describe("Date Picker Tests", () => { await setDateButton.click(); const innerInput = await datepicker.getInnerInput(); - assert.equal(await innerInput.getValue(), "11 декември 2018 г."); + // \u202f is Narrow No-Break Space, coming with latest CLDR updates + assert.equal(await innerInput.getValue(), "11 декември 2018\u202fг."); }); it("custom formatting", async () => { @@ -1330,4 +1331,18 @@ describe("Date Picker Tests", () => { let displayedYear = await datepicker.getDisplayedYear(11); assert.notOk(await displayedYear.hasClass("ui5-yp-item--disabled"), "Year 2025 is not disabled"); }); + + it("Value state is not changed, when value-state-change is prevented", async () => { + datepicker.id = "#dpVsChangePrevented"; + + const input = await datepicker.getInput(); + + const valueState = await input.getProperty("valueState"); + await input.click(); + await browser.keys("Jan 29, 2019"); + + await browser.$("#dpVsChangePrevented").shadow$("ui5-input").shadow$("input").click(); // click elsewhere to focusout + + assert.strictEqual(await input.getProperty("valueState"), valueState, "value state is not changed"); + }); }); diff --git a/packages/main/test/specs/DateTimePicker.spec.js b/packages/main/test/specs/DateTimePicker.spec.js index 442dafcf7074..c7b0562321ea 100644 --- a/packages/main/test/specs/DateTimePicker.spec.js +++ b/packages/main/test/specs/DateTimePicker.spec.js @@ -35,11 +35,19 @@ const getCancelButton = async id => { return picker.$("#cancel"); }; -const getTimeSlidersCount = async id => { +const getTimeSelectionClocksCount = async id => { const picker = await getPicker(id); return await browser.executeAsync( (picker, done) => { - done(picker.querySelector("ui5-time-selection").shadowRoot.querySelectorAll("ui5-wheelslider").length); + done(picker.querySelector("ui5-time-selection-clocks").shadowRoot.querySelectorAll("ui5-time-picker-clock").length); + }, picker); +}; + +const getPeriodSegmentedButtonCount = async id => { + const picker = await getPicker(id); + + return await browser.executeAsync( (picker, done) => { + done(picker.querySelector("ui5-time-selection-clocks").shadowRoot.querySelectorAll("ui5-segmented-button").length); }, picker); }; @@ -83,26 +91,26 @@ describe("DateTimePicker general interaction", () => { await browser.keys("Space"); // select new time - await picker.$("ui5-time-selection").shadow$(`ui5-wheelslider[data-sap-slider="hours"]`).shadow$(`div[tabindex="0"]`).click(); - await browser.keys("PageDown"); // select 01 + await picker.$("ui5-time-selection-clocks").shadow$(`ui5-toggle-spin-button[data-sap-clock="hours"]`).click(); + await browser.keys("ArrowDown"); // select 02 - await picker.$("ui5-time-selection").shadow$(`ui5-wheelslider[data-sap-slider="minutes"]`).shadow$(`div[tabindex="0"]`).click(); - await browser.keys("PageDown"); // select 0 - await browser.keys("ArrowDown"); await browser.keys("ArrowDown"); // select 02 + await picker.$("ui5-time-selection-clocks").shadow$(`ui5-toggle-spin-button[data-sap-clock="minutes"]`).click(); + await browser.keys("ArrowDown"); await browser.keys("ArrowDown"); // select 14 - await picker.$("ui5-time-selection").shadow$(`ui5-wheelslider[data-sap-slider="seconds"]`).shadow$(`div[tabindex="0"]`).click(); - await browser.keys("PageDown"); // select 0 - await browser.keys("ArrowDown"); await browser.keys("ArrowDown"); await browser.keys("ArrowDown"); // select 03 + await picker.$("ui5-time-selection-clocks").shadow$(`ui5-toggle-spin-button[data-sap-clock="seconds"]`).click(); + await browser.keys("ArrowUp"); await browser.keys("ArrowUp"); await browser.keys("ArrowUp"); // select 19 + + await browser.keys("p"); // select PM await picker.$("#ok").click(); // assert const newValue = await dtPicker.shadow$("ui5-input").getValue(); - assert.strictEqual(newValue.toUpperCase(), "14/04/2020, 01:02:03 AM", "The new date/time is correctly selected."); + assert.strictEqual(newValue.toUpperCase(), "14/04/2020, 02:14:19 PM", "The new date/time is correctly selected."); }); it("tests selection of new date without changing the time section", async () => { - const PREVIOUS_VALUE = "14/04/2020, 01:02:03 AM"; + const PREVIOUS_VALUE = "14/04/2020, 02:14:19 PM"; const dtPicker = await browser.$("#dtSeconds"); // assert const currentValue = await dtPicker.shadow$("ui5-input").getValue(); @@ -171,16 +179,21 @@ describe("DateTimePicker general interaction", () => { }); it("tests time controls displayed according to format", async () => { - const expectedHoursMinSlidersCount = 3; - const expectedHoursMinSecSlidersCount = 4; + const expectedHoursMinClocksCount = 2; + const expectedHoursMinSecClocksCount = 3; + const expectedHoursMinPeriodCount = 1; + const expectedHoursMinSecPeriodCount = 1; // act await openPickerById("dtSeconds"); // assert - const hoursMinSecSliders = await getTimeSlidersCount("dtSeconds"); - assert.strictEqual(hoursMinSecSliders, expectedHoursMinSecSlidersCount, - "The picker have 4 sliders - hours, minutes, seconds and periods sliders."); + const hoursMinSecClocks = await getTimeSelectionClocksCount("dtSeconds"); + const hoursMinSecPeriod = await getPeriodSegmentedButtonCount("dtSeconds"); + assert.strictEqual(hoursMinSecClocks, expectedHoursMinSecClocksCount, + "The picker have 3 clocks - hours, minutes, seconds clocks."); + assert.strictEqual(hoursMinSecPeriod, expectedHoursMinSecPeriodCount, + "The picker have 1 Period Selector"); await closePickerById("dtSeconds"); @@ -188,26 +201,29 @@ describe("DateTimePicker general interaction", () => { await openPickerById("dtMinutes"); // assert - const hoursMinSliders = await getTimeSlidersCount("dtMinutes"); - assert.strictEqual(hoursMinSliders, expectedHoursMinSlidersCount, - "The picker have 3 sliders - hours, minutes and periods sliders."); + const hoursMinClocks = await getTimeSelectionClocksCount("dtMinutes"); + const hoursMinPeriod = await getPeriodSegmentedButtonCount("dtMinutes"); + assert.strictEqual(hoursMinClocks, expectedHoursMinClocksCount, + "The picker have 2 clocks - hours, and minutes clocks."); + assert.strictEqual(hoursMinPeriod, expectedHoursMinPeriodCount, + "The picker have 1 Period Selector"); await closePickerById("dtMinutes"); }); - it("tests hours slider is expanded", async () => { + it("tests hours clock is active on picker open", async () => { // act await openPickerById("dt"); // assert const picker = await getPicker("dt"); - const expanded = await picker.$("ui5-time-selection").shadow$(`ui5-wheelslider[data-sap-slider="hours"]`).getProperty("expanded"); - assert.ok(expanded, "The hours slider is expanded."); + const active = await picker.$("ui5-time-selection-clocks").shadow$(`ui5-time-picker-clock[data-sap-clock="hours"]`).getProperty("active"); + assert.ok(active, "The hours clock is active."); await closePickerById("dt"); }); - it("tests selection of 12:00:00 AM", async () => { + it("tests selection of 12:34:56 AM", async () => { const dtPicker = await browser.$("#dtTest12AM"); // act @@ -216,26 +232,18 @@ describe("DateTimePicker general interaction", () => { const picker = await getPicker("dtTest12AM"); // select new time - await picker.$("ui5-time-selection").shadow$(`ui5-wheelslider[data-sap-slider="hours"]`).shadow$(`div[tabindex="0"]`).click(); - await browser.keys("PageUp"); // select 12 - - await picker.$("ui5-time-selection").shadow$(`ui5-wheelslider[data-sap-slider="minutes"]`).shadow$(`div[tabindex="0"]`).click(); - await browser.keys("PageDown");// select 00 - - await picker.$("ui5-time-selection").shadow$(`ui5-wheelslider[data-sap-slider="seconds"]`).shadow$(`div[tabindex="0"]`).click(); - await browser.keys("PageDown");// select 00 - - await picker.$("ui5-time-selection").shadow$(`ui5-wheelslider[data-sap-slider="periods"]`).shadow$(`div[tabindex="0"]`).click(); - await browser.keys("PageDown");// select AM + await picker.$("ui5-time-selection-clocks").shadow$(`ui5-toggle-spin-button[data-sap-clock="hours"]`).click(); + await browser.keys("123456a"); // select 12:34:56 AM await picker.$("#ok").click(); // assert const newValue = await dtPicker.shadow$("ui5-input").getValue(); - assert.strictEqual(newValue.toUpperCase(), "13/04/2020, 12:00:00 AM", "The new date/time is correctly selected."); + assert.strictEqual(newValue.toUpperCase(), "13/04/2020, 12:34:56 AM", "The new date/time is correctly selected."); }); - it("tests selection of 12:00:00 PM", async () => { + + it("tests selection of 12:34:56 PM", async () => { const dtPicker = await browser.$("#dtTest12PM"); // act @@ -244,24 +252,14 @@ describe("DateTimePicker general interaction", () => { const picker = await getPicker("dtTest12PM"); // select new time - await picker.$("ui5-time-selection").shadow$(`ui5-wheelslider[data-sap-slider="hours"]`).shadow$(`div[tabindex="0"]`).click(); - await browser.keys("PageUp"); // select 12 - - await picker.$("ui5-time-selection").shadow$(`ui5-wheelslider[data-sap-slider="minutes"]`).shadow$(`div[tabindex="0"]`).click(); - await browser.keys("PageDown");// select 00 - - await picker.$("ui5-time-selection").shadow$(`ui5-wheelslider[data-sap-slider="seconds"]`).shadow$(`div[tabindex="0"]`).click(); - await browser.keys("PageDown");// select 00 - - await picker.$("ui5-time-selection").shadow$(`ui5-wheelslider[data-sap-slider="periods"]`).shadow$(`div[tabindex="0"]`).click(); - await browser.keys("PageUp");// select PM - + await picker.$("ui5-time-selection-clocks").shadow$(`ui5-toggle-spin-button[data-sap-clock="hours"]`).click(); + await browser.keys("123456p"); // select 12:34:56 PM await picker.$("#ok").click(); // assert const newValue = await dtPicker.shadow$("ui5-input").getValue(); - assert.strictEqual(newValue.toUpperCase(), "13/04/2020, 12:00:00 PM", "The new date/time is correctly selected."); + assert.strictEqual(newValue.toUpperCase(), "13/04/2020, 12:34:56 PM", "The new date/time is correctly selected."); }); it("tests change event is prevented on submit when prevent default is called", async () => { diff --git a/packages/main/test/specs/Input.mobile.spec.js b/packages/main/test/specs/Input.mobile.spec.js index e9ad7ca138c0..6a05ff258f4b 100644 --- a/packages/main/test/specs/Input.mobile.spec.js +++ b/packages/main/test/specs/Input.mobile.spec.js @@ -155,10 +155,10 @@ describe("Clear icon", () => { const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-input-inner-phone"); - assert.strictEqual(await dialogInput.getAttribute("effective-show-clear-icon"), null, "There is no clear icon initially"); + assert.strictEqual(await dialogInput.getAttribute("_effective-show-clear-icon"), null, "There is no clear icon initially"); await dialogInput.keys("t"); - assert.strictEqual(await dialogInput.getAttribute("effective-show-clear-icon"), "", "Clear icon is shown"); + assert.strictEqual(await dialogInput.getAttribute("_effective-show-clear-icon"), "", "Clear icon is shown"); }); }); diff --git a/packages/main/test/specs/Input.spec.js b/packages/main/test/specs/Input.spec.js index 336276fa17cf..b0cacbb05078 100644 --- a/packages/main/test/specs/Input.spec.js +++ b/packages/main/test/specs/Input.spec.js @@ -925,13 +925,13 @@ describe("Input general interaction", () => { const changeCounter = await $("#clear-input-change-event-count"); const inputCounter = await $("#clear-input-input-event-count"); - assert.notOk(await input.getProperty("effectiveShowClearIcon"), "Clear icon should not be shown"); + assert.notOk(await input.getProperty("_effectiveShowClearIcon"), "Clear icon should not be shown"); // type await innerInput.click(); await innerInput.keys("a"); - assert.ok(await input.getProperty("effectiveShowClearIcon"), "Clear icon should be shown"); + assert.ok(await input.getProperty("_effectiveShowClearIcon"), "Clear icon should be shown"); assert.strictEqual(await changeCounter.getText(), "0", "Change event not called yet"); assert.strictEqual(await inputCounter.getText(), "1", "Input event called when typing"); @@ -941,7 +941,7 @@ describe("Input general interaction", () => { await clearIcon.click(); assert.strictEqual(await input.getProperty("value"), "", "Clear icon clear the value"); - assert.notOk(await input.getProperty("effectiveShowClearIcon"), "Clear icon should not be shown"); + assert.notOk(await input.getProperty("_effectiveShowClearIcon"), "Clear icon should not be shown"); assert.strictEqual(await changeCounter.getText(), "0", "Change event should not be called on clearIcon click"); assert.strictEqual(await inputCounter.getText(), "2", "Input event called when typing or clear action is done"); }); @@ -1010,16 +1010,16 @@ describe("Input general interaction", () => { const disable = await $("#clear-icon-disabled-toggle"); await readonly.click(); - assert.notOk(await input.getProperty("effectiveShowClearIcon"), "Clear icon should be not be shown when readonly"); + assert.notOk(await input.getProperty("_effectiveShowClearIcon"), "Clear icon should be not be shown when readonly"); await readonly.click(); - assert.ok(await input.getProperty("effectiveShowClearIcon"), "Clear icon should be shown"); + assert.ok(await input.getProperty("_effectiveShowClearIcon"), "Clear icon should be shown"); await disable.click(); - assert.notOk(await input.getProperty("effectiveShowClearIcon"), "Clear icon should be not be shown when disabled"); + assert.notOk(await input.getProperty("_effectiveShowClearIcon"), "Clear icon should be not be shown when disabled"); await disable.click(); - assert.ok(await input.getProperty("effectiveShowClearIcon"), "Clear icon should be shown"); + assert.ok(await input.getProperty("_effectiveShowClearIcon"), "Clear icon should be shown"); }); it("Should open suggestions popover if openPicker() is called on focusin", async () => { diff --git a/packages/main/test/specs/MultiComboBox.mobile.spec.js b/packages/main/test/specs/MultiComboBox.mobile.spec.js index dee0dc90dbe8..393b0abd0f9f 100644 --- a/packages/main/test/specs/MultiComboBox.mobile.spec.js +++ b/packages/main/test/specs/MultiComboBox.mobile.spec.js @@ -13,7 +13,7 @@ describe("Basic interaction", () => { await multiCombo.scrollIntoView(); await multiCombo.shadow$('input').click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("input"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("ui5-input"); assert.ok(await dialogInput.isDisplayed(), "Input is displayed"); const toggleSelectedButton = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("ui5-toggle-button"); @@ -61,7 +61,7 @@ describe("Basic interaction", () => { await multiCombo.scrollIntoView(); await multiCombo.click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("input"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("ui5-input"); assert.strictEqual(await dialogInput.getAttribute("placeholder"), await multiCombo.getAttribute("placeholder"), "Correct placeholder shown"); const dialogCloseButton = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-responsive-popover-close-btn"); @@ -95,6 +95,18 @@ describe("Basic interaction", () => { const dialogCloseButton = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-responsive-popover-close-btn"); await dialogCloseButton.click(); }); + + it("Should set clear icon to dialog's input", async () => { + const cb = await $("#clear-icon-cb"); + const staticAreaItemClassName = await browser.getStaticAreaItemClassName("#clear-icon-cb"); + + await cb.shadow$("input").click(); + + const resPopover = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover"); + const dialogInput = await resPopover.$("[ui5-input]"); + + assert.ok(await dialogInput.getProperty("showClearIcon"), "Clear icon should be propagated to internal ui5-input") + }); }); describe("Typeahead", () => { @@ -111,12 +123,12 @@ describe("Typeahead", () => { await mcbInput.click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".input-root-phone input"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("ui5-input").shadow$("input"); await dialogInput.click(); await dialogInput.keys("c"); - assert.strictEqual(await mcb.getProperty("value"), sExpected, "Value is autocompleted"); + assert.strictEqual(await dialogInput.getProperty("value"), sExpected, "Value is autocompleted"); }); it("Should not perform typeahead when it is disabled", async () => { @@ -128,7 +140,7 @@ describe("Typeahead", () => { await mcbInput.click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".input-root-phone input"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("ui5-input").shadow$("input"); await dialogInput.click(); await dialogInput.keys("c"); @@ -147,7 +159,7 @@ describe("Typeahead", () => { await mcbInput.click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".input-root-phone input"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("ui5-input").shadow$("input"); await dialogInput.click(); await dialogInput.keys("c"); @@ -263,6 +275,26 @@ describe("Items selection", () => { const tokens = await multiCombo.shadow$("ui5-tokenizer").$$("ui5-token"); assert.strictEqual(tokens.length, 3, "No deselection was performed"); }); + + it ("should select all items when clicking select all", async () => { + const cb = await $("#mcb-select-all-vs"); + const staticAreaItemClassName = await browser.getStaticAreaItemClassName("#mcb-select-all-vs"); + const popover = await $(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover"); + const spanRef = await $("#select-all-event"); + + await cb.click(); + + await popover.$(".ui5-mcb-select-all-checkbox").click(); + // ok button + await popover.$(".ui5-responsive-popover-footer").$("ui5-button").click(); + assert.strictEqual(await spanRef.getText(), "Selected items count: 27"); + + await cb.click(); + await popover.$(".ui5-mcb-select-all-checkbox").click(); + // ok button + await popover.$(".ui5-responsive-popover-footer").$("ui5-button").click(); + assert.strictEqual(await spanRef.getText(), "Selected items count: 0"); + }); }); describe("Value state header", () => { @@ -281,7 +313,7 @@ describe("Value state header", () => { const dialogStateHeader = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-valuestatemessage-header"); assert.strictEqual(await dialogStateHeader.isDisplayed(), true, "The value state header is shown"); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".input-root-phone input"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("ui5-input"); assert.strictEqual(await dialogInput.getAttribute("value-state"), "Error", "Inner input's value state is correct"); }); }); @@ -383,14 +415,14 @@ describe("Validation", () => { await multiCombo.scrollIntoView(); await multiCombo.shadow$("ui5-icon").click(); - const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".input-root-phone input"); - await dialogInput.click(); - await dialogInput.keys("m"); + const dialogInput = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$("ui5-input") + await dialogInput.shadow$("input").click(); + await dialogInput.shadow$("input").keys("m"); const dialogStateHeader = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover").$(".ui5-valuestatemessage-header"); assert.strictEqual(await dialogStateHeader.isDisplayed(), true, "The value state header is shown"); assert.strictEqual(await dialogInput.getAttribute("value-state"), "Error", "Inner input's value state is correct"); - assert.strictEqual(await dialogInput.getValue(), "com", "Additional input was not allowed"); + assert.strictEqual(await dialogInput.getValue(), "comm", "Additional input is allowed, but value state is error"); }); }); diff --git a/packages/main/test/specs/MultiComboBox.spec.js b/packages/main/test/specs/MultiComboBox.spec.js index 64c21a034cda..eabd12529884 100644 --- a/packages/main/test/specs/MultiComboBox.spec.js +++ b/packages/main/test/specs/MultiComboBox.spec.js @@ -573,7 +573,7 @@ describe("MultiComboBox general interaction", () => { tokens = await mcb.shadow$$(".ui5-multi-combobox-token"); assert.equal(await tokens.length, 1, "should have one token"); - }); + }); it ("should prevent selection-change on CTRL+A", async () => { await browser.url(`test/pages/MultiComboBox.html`); @@ -592,6 +592,85 @@ describe("MultiComboBox general interaction", () => { tokens = await mcb.shadow$$(".ui5-multi-combobox-token"); assert.equal(await tokens.length, 1, "Should have 1 token."); }); + + it ("should select all items", async () => { + const cb = await $("#mcb-select-all-vs"); + const arrow = await cb.shadow$("[input-icon]"); + const spanRef = await $("#select-all-event"); + + await arrow.click(); + await browser.keys("ArrowDown"); + await browser.keys("ArrowDown"); + + // select all items + await browser.keys("Space"); + + assert.strictEqual(await spanRef.getText(), "Selected items count: 27"); + + // deselect all items + await browser.keys("Space"); + + assert.strictEqual(await spanRef.getText(), "Selected items count: 0"); + }); + + it ("should select a few items and show Select All in selected items Popover", async () => { + await browser.setWindowSize(1920, 1080); + + const cb = await $("#mcb-select-all-vs"); + const arrow = await cb.shadow$("[input-icon]"); + const spanRef = await $("#select-all-event"); + + await arrow.click(); + await browser.keys("ArrowDown"); + await browser.keys("ArrowDown"); + await browser.keys("ArrowDown"); + + // select Item 1 + await browser.keys("Space"); + + // select Item 2 + await browser.keys("ArrowDown"); + await browser.keys("Space"); + + // select Item 3 + await browser.keys("ArrowDown"); + await browser.keys("Space"); + + // select Item 4 + await browser.keys("ArrowDown"); + await browser.keys("Space"); + + // select Item 5 + await browser.keys("ArrowDown"); + await browser.keys("Enter"); + await browser.keys("Tab"); + + assert.strictEqual(await spanRef.getText(), "Selected items count: 5"); + + const staticAreaItemClassName = await browser.getStaticAreaItemClassName("#mcb-select-all-vs"); + const popover = await $(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover"); + + const tokenizerNMore = await cb.shadow$("[ui5-tokenizer]"); + const nMoreLabel = await tokenizerNMore.shadow$(".ui5-tokenizer-more-text"); + + await nMoreLabel.click(); + + assert.ok(await popover.$(".ui5-mcb-select-all-checkbox").getProperty("checked"), "Select All CheckBox should be selected"); + + await browser.keys("ArrowDown"); + await browser.keys("ArrowDown"); + await browser.keys("ArrowDown"); + await browser.keys("Space"); + + assert.notOk(await popover.$(".ui5-mcb-select-all-checkbox").getProperty("checked"), "Select All CheckBox should not be selected"); + assert.strictEqual(await spanRef.getText(), "Selected items count: 4"); + + await browser.keys("ArrowUp"); + await browser.keys("Space"); + + assert.ok(await popover.$(".ui5-mcb-select-all-checkbox").getProperty("checked"), "Select All CheckBox should be selected"); + assert.strictEqual(await spanRef.getText(), "Selected items count: 5"); + }); }); describe("keyboard handling", () => { @@ -1627,6 +1706,38 @@ describe("MultiComboBox general interaction", () => { assert.strictEqual(await nItemsLabel.getText(), resourceBundleText.mcItemsLabelText, "Text should be 2 Items"); assert.strictEqual(await nMoreLabel.getText(), resourceBundleText.mcNMoreLabelText, "Text should be 1 More"); }); + + it ("Should check clear icon availability", async () => { + await browser.url(`test/pages/MultiComboBox.html`); + + const cb = await $("#clear-icon-cb"); + const inner = cb.shadow$("input"); + const clearIcon = await cb.shadow$(".ui5-input-clear-icon-wrapper"); + + assert.notOk(await cb.getProperty("_effectiveShowClearIcon"), "_effectiveShowClearIcon should be set to false when mcb has no value"); + + await inner.click(); + await inner.keys("c"); + + assert.ok(await cb.getProperty("_effectiveShowClearIcon"), "_effectiveShowClearIcon should be set to true upon typing"); + }); + + it ("Should check clear icon events", async () => { + await browser.url(`test/pages/MultiComboBox.html`); + + const cb = await $("#clear-icon-cb"); + + await cb.shadow$("input").click(); + await cb.shadow$("input").keys("c"); + + const clearIcon = await cb.shadow$(".ui5-input-clear-icon-wrapper"); + + // focus out the combo + await clearIcon.click(); + + assert.strictEqual(await $("#clear-icon-change-count").getText(), "0", "change event is not fired"); + assert.strictEqual(await $("#clear-icon-input-count").getText(), "2", "input event is fired twice"); + }); }); describe("MultiComboBox Truncated Token", () => { diff --git a/packages/main/test/specs/MultiInput.spec.js b/packages/main/test/specs/MultiInput.spec.js index 4e4cbb9c685b..5636863908d5 100644 --- a/packages/main/test/specs/MultiInput.spec.js +++ b/packages/main/test/specs/MultiInput.spec.js @@ -90,6 +90,20 @@ describe("MultiInput general interaction", () => { assert.notOk(await allTokens[1].getProperty("overflows"), "Token should not overflow"); }); + it ("adds multiple tokens to multi input", async () => { + const mi = await browser.$("#no-tokens2"); + const btn = await browser.$("#add-multiple-tokens"); + + await btn.click(); + + assert.strictEqual((await mi.$$("ui5-token")).length, 2, "should have 2 tokens"); + + let allTokens = await mi.$$("ui5-token"); + + assert.notOk(await allTokens[0].getProperty("overflows"), "Token 1 should not overflow"); + assert.notOk(await allTokens[1].getProperty("overflows"), "Token 2 should not overflow"); + }); + it ("adds an overflowing token to multi input", async () => { const mi = await browser.$("#multiple-token"); const btn = await browser.$("#add-to-multiple"); diff --git a/packages/main/test/specs/Popover.spec.js b/packages/main/test/specs/Popover.spec.js index 1bd402356f7e..83459ce293a4 100644 --- a/packages/main/test/specs/Popover.spec.js +++ b/packages/main/test/specs/Popover.spec.js @@ -421,26 +421,22 @@ describe("Acc", () => { }); }); -describe("Horizontal Alignment", () => { - before(async () => { - await browser.url(`test/pages/Popover.html`); - }); - +describe("Alignment", () => { const EPS = 2; // 2px - const isHorizontallyCentered = async (popover, opener) => { - const popoverRect = { - ...await popover.getLocation(), - ...await popover.getSize() + const isHorizontallyCentered = async (element, opener) => { + const elemRect = { + ...await element.getLocation(), + ...await element.getSize() }; const openerRect = { ...await opener.getLocation(), ...await opener.getSize() }; const openerCenter = openerRect.x + openerRect.width / 2; - const expectedPopoverLeft = openerCenter - popoverRect.width / 2; + const expectedElemX = openerCenter - elemRect.width / 2; - return Math.abs(popoverRect.x - expectedPopoverLeft) < EPS; + return Math.abs(elemRect.x - expectedElemX) < EPS; } const isHorizontallyLeftAligned = async (popover, opener) => { @@ -471,59 +467,104 @@ describe("Horizontal Alignment", () => { return Math.abs(openerRight - popoverRight) < EPS; } - it("Center", async () => { - await browser.$("[ui5-radio-button][name='horizontalAlign'][text='Center']").click(); - await browser.$("#horizontalAlignBtn").click(); - const popover = await browser.$("#popoverHorizontalAlign"); - const opener = await browser.$("#targetOpener"); + describe("Horizontal Alignment", () => { + before(async () => { + await browser.url(`test/pages/Popover.html`); + }); - assert.ok(await isHorizontallyCentered(popover, opener), `Popover should be centered`); - }); + it("Center", async () => { + await browser.$("[ui5-radio-button][name='horizontalAlign'][text='Center']").click(); + await browser.$("#horizontalAlignBtn").click(); + const popover = await browser.$("#popoverHorizontalAlign"); + const opener = await browser.$("#targetOpener"); - it("Left", async () => { - await browser.$("[ui5-radio-button][name='horizontalAlign'][text='Left']").click(); - await browser.$("#horizontalAlignBtn").click(); - const popover = await browser.$("#popoverHorizontalAlign"); - const opener = await browser.$("#targetOpener"); + assert.ok(await isHorizontallyCentered(popover, opener), `Popover should be centered`); + }); - assert.ok(await isHorizontallyLeftAligned(popover, opener), `Popover should be left aligned`); - }); + it("Left", async () => { + await browser.$("[ui5-radio-button][name='horizontalAlign'][text='Left']").click(); + await browser.$("#horizontalAlignBtn").click(); + const popover = await browser.$("#popoverHorizontalAlign"); + const opener = await browser.$("#targetOpener"); - it("Right", async () => { - await browser.$("[ui5-radio-button][name='horizontalAlign'][text='Right']").click(); - await browser.$("#horizontalAlignBtn").click(); - const popover = await browser.$("#popoverHorizontalAlign"); - const opener = await browser.$("#targetOpener"); + assert.ok(await isHorizontallyLeftAligned(popover, opener), `Popover should be left aligned`); + }); - assert.ok(await isHorizontallyRightAligned(popover, opener), `Popover should be right aligned`); - }); + it("Right", async () => { + await browser.$("[ui5-radio-button][name='horizontalAlign'][text='Right']").click(); + await browser.$("#horizontalAlignBtn").click(); + const popover = await browser.$("#popoverHorizontalAlign"); + const opener = await browser.$("#targetOpener"); - it("Center, in RTL", async () => { - await browser.$("[ui5-radio-button][name='horizontalAlign'][text='Center']").click(); - await browser.$("#rtlCb").click(); - await browser.$("#horizontalAlignBtn").click(); - const popover = await browser.$("#popoverHorizontalAlign"); - const opener = await browser.$("#targetOpener"); + assert.ok(await isHorizontallyRightAligned(popover, opener), `Popover should be right aligned`); + }); - assert.ok(await isHorizontallyCentered(popover, opener), `Popover should be centered`); - }); + it("Center, in RTL", async () => { + await browser.$("[ui5-radio-button][name='horizontalAlign'][text='Center']").click(); + await browser.$("#rtlCb").click(); + await browser.$("#horizontalAlignBtn").click(); + const popover = await browser.$("#popoverHorizontalAlign"); + const opener = await browser.$("#targetOpener"); + + assert.ok(await isHorizontallyCentered(popover, opener), `Popover should be centered`); + }); - it("Left, in RTL", async () => { - await browser.$("[ui5-radio-button][name='horizontalAlign'][text='Left']").click(); - await browser.$("#horizontalAlignBtn").click(); - const popover = await browser.$("#popoverHorizontalAlign"); - const opener = await browser.$("#targetOpener"); + it("Left, in RTL", async () => { + await browser.$("[ui5-radio-button][name='horizontalAlign'][text='Left']").click(); + await browser.$("#horizontalAlignBtn").click(); + const popover = await browser.$("#popoverHorizontalAlign"); + const opener = await browser.$("#targetOpener"); - assert.ok(isHorizontallyRightAligned(popover, opener), `Popover should be right aligned, flipped by RTL direction`); + assert.ok(isHorizontallyRightAligned(popover, opener), `Popover should be right aligned, flipped by RTL direction`); + }); + + it("Right, in RTL", async () => { + await browser.$("[ui5-radio-button][name='horizontalAlign'][text='Right']").click(); + await browser.$("#horizontalAlignBtn").click(); + const popover = await browser.$("#popoverHorizontalAlign"); + const opener = await browser.$("#targetOpener"); + + assert.ok(await isHorizontallyLeftAligned(popover, opener), `Popover should be left aligned, flipped by RTL direction`); + }); }); - it("Right, in RTL", async () => { - await browser.$("[ui5-radio-button][name='horizontalAlign'][text='Right']").click(); - await browser.$("#horizontalAlignBtn").click(); - const popover = await browser.$("#popoverHorizontalAlign"); - const opener = await browser.$("#targetOpener"); + describe("Arrow Horizontal Alignment", () => { + before(async () => { + await browser.url(`test/pages/Popover.html`); + }); + + it("Arrow centering when opener has big width", async () => { + const opener = await browser.$("#btnFullWidthTop"); + await opener.click(); + const popover = await browser.$("#popFullWidthTop"); + const arrow = await popover.shadow$(".ui5-popover-arrow"); + + assert.ok(await isHorizontallyCentered(arrow, opener), `Arrow should be centered`); + + await browser.keys("Escape"); + }); + + it("Arrow centering when opener is to the left edge", async () => { + const opener = await browser.$("#btnLeftEdgeTop"); + await opener.click(); + const popover = await browser.$("#popFullWidthTop"); + const arrow = await popover.shadow$(".ui5-popover-arrow"); + + assert.ok(await isHorizontallyCentered(arrow, opener), `Arrow should be centered`); + + await browser.keys("Escape"); + }); + + it("Arrow centering when opener is to the right edge", async () => { + const opener = await browser.$("#btnRightEdgeTop"); + await opener.click(); + const popover = await browser.$("#popFullWidthTop"); + const arrow = await popover.shadow$(".ui5-popover-arrow"); - assert.ok(await isHorizontallyLeftAligned(popover, opener), `Popover should be left aligned, flipped by RTL direction`); + assert.ok(await isHorizontallyCentered(arrow, opener), `Arrow should be centered`); + + await browser.keys("Escape"); + }); }); }); diff --git a/packages/main/test/specs/Table.spec.js b/packages/main/test/specs/Table.spec.js index 12a34922f44a..410721d1d8da 100644 --- a/packages/main/test/specs/Table.spec.js +++ b/packages/main/test/specs/Table.spec.js @@ -835,7 +835,7 @@ describe("Table keyboard interaction", async () => { await browser.keys(["Control", "End"]); - assert.strictEqual(await fourthRow.getAttribute("_tab-index"), "0", "The last row is focused"); + assert.strictEqual(await fourthRow.getAttribute("forced-tab-index"), "0", "The last row is focused"); }); it("SHIFT + HOME/END", async () => { diff --git a/packages/main/test/specs/Toast.spec.js b/packages/main/test/specs/Toast.spec.js index 0b9286658096..561d114221d0 100644 --- a/packages/main/test/specs/Toast.spec.js +++ b/packages/main/test/specs/Toast.spec.js @@ -79,12 +79,12 @@ describe("Toast general interaction", () => { it("tests shadow content div inline styles with default duration", async () => { const button = await browser.$("#wcBtnShowToastBE"); - const toastShadowContent = await browser.$("#wcToastBE").shadow$(".ui5-toast-root"); + const toast = await browser.$("#wcToastBE"); const EXPECTED_STYLES = "transition-duration: 1000ms; transition-delay: 2000ms; opacity: 0;"; await button.click(); - const styleValue = await toastShadowContent.getAttribute("style"); + const styleValue = await toast.getAttribute("style"); assert.include(styleValue, EXPECTED_STYLES, "The correct default inline styles are applied to the shadow ui5-toast-root"); }); @@ -92,7 +92,6 @@ describe("Toast general interaction", () => { it("tests shadow content div inline styles with long duration", async () => { const button = await browser.$("#wcBtnShowToastBS"); const toast = await browser.$("#wcToastBS"); - const toastShadowContent = await toast.shadow$(".ui5-toast-root"); const maximumAllowedTransition = 1000; const durationProperty = await toast.getProperty("duration"); let calculatedDelay; @@ -103,7 +102,7 @@ describe("Toast general interaction", () => { const EXPECTED_STYLES = `transition-duration: ${maximumAllowedTransition}ms; transition-delay: ${calculatedDelay}; opacity: 0;`; - const styleValue = await toastShadowContent.getAttribute("style"); + const styleValue = await toast.getAttribute("style"); assert.include(styleValue, EXPECTED_STYLES, "The correct custom inline styles are applied to the shadow ui5-toast-root," + "when the duration is longer than default. Transition is not longer than allowed (1000ms)."); @@ -112,7 +111,6 @@ describe("Toast general interaction", () => { it("tests shadow content div inline styles with short duration", async () => { const button = await browser.$("#wcBtnShowToastME"); const toast = await browser.$("#wcToastME"); - const toastShadowContent = await toast.shadow$(".ui5-toast-root"); const durationProperty = await toast.getProperty("duration"); let calculatedTransition, calculatedDelay; @@ -123,7 +121,7 @@ describe("Toast general interaction", () => { const EXPECTED_STYLES = `transition-duration: ${calculatedTransition}ms; transition-delay: ${calculatedDelay}; opacity: 0;`; - const styleValue = await toastShadowContent.getAttribute("style"); + const styleValue = await toast.getAttribute("style"); assert.include(styleValue, EXPECTED_STYLES, "The correct custom inline styles are applied to the shadow ui5-toast-root," + "when the duration is shorter than default. Transition is a third of the duration."); @@ -201,3 +199,22 @@ describe("Keyboard handling", () => { assert.ok(await toast.getProperty("open"), "second Toast should stay open"); }); }); + +describe("Customisation", async () => { + beforeEach(async () => { + await browser.url(`test/pages/Toast.html`); + }); + + it("should check sizes to the toast", async () => { + const btn = await $("#wcBtnShowToastStyled"); + const styledToast = await $("#wcToastStyled") + + await btn.click(); + + const width = await styledToast.getSize("width"); + const height = await styledToast.getSize("height"); + + assert.strictEqual(width, 300, "width is custom"); + assert.strictEqual(height, 64, "height is custom"); + }); +}); diff --git a/packages/main/test/specs/ToolbarSelect.spec.js b/packages/main/test/specs/ToolbarSelect.spec.js index d2c98a39fef4..55d67266c8f7 100644 --- a/packages/main/test/specs/ToolbarSelect.spec.js +++ b/packages/main/test/specs/ToolbarSelect.spec.js @@ -32,21 +32,21 @@ describe("Toolbar general interaction", () => { assert.strictEqual(accessibleNameRef, "title", "Select accessible name ref is correct"); }); - // // Events + // Events - // it.only("Should fire change event on selection change", async () => { - // const toolbar = await browser.$("ui5-toolbar"); - // const select = await toolbar.shadow$("ui5-select"); - // const selectResult = await browser.$("input[placeholder='Changed']"); + it("Should fire change event on selection change", async () => { + const toolbar = await browser.$("ui5-toolbar"); + const select = await toolbar.shadow$("ui5-select"); + const selectResult = await browser.$("input[placeholder='Changed']"); - // await select.click(); - // await select.keys("ArrowDown"); - // await select.keys("Enter"); + await select.click(); + await select.keys("ArrowUp"); + await select.keys("Enter"); - // const selectResultText = await selectResult.getValue(); + const selectResultText = await selectResult.getValue(); - // assert.strictEqual(selectResultText, "1", "Select change event is fired correctly"); - // }); + assert.strictEqual(selectResultText, "1", "Select change event is fired correctly"); + }); // Popover diff --git a/packages/main/test/ssr/component-imports.js b/packages/main/test/ssr/component-imports.js new file mode 100644 index 000000000000..2d8412017afd --- /dev/null +++ b/packages/main/test/ssr/component-imports.js @@ -0,0 +1,83 @@ +import Avatar from "../../dist/Avatar.js"; +import AvatarGroup from "../../dist/AvatarGroup.js"; +import Badge from "../../dist/Badge.js"; +import Breadcrumbs from "../../dist/Breadcrumbs.js"; +import BusyIndicator from "../../dist/BusyIndicator.js"; +import Button from "../../dist/Button.js"; +import Card from "../../dist/Card.js"; +import CardHeader from "../../dist/CardHeader.js"; +import Carousel from "../../dist/Carousel.js"; +import CheckBox from "../../dist/CheckBox.js"; +import ColorPalette from "../../dist/ColorPalette.js"; +import ColorPaletteItem from "../../dist/ColorPaletteItem.js"; +import ColorPalettePopover from "../../dist/ColorPalettePopover.js"; +import ColorPicker from "../../dist/ColorPicker.js"; +import ComboBox from "../../dist/ComboBox.js"; +import DatePicker from "../../dist/DatePicker.js"; +import DateRangePicker from "../../dist/DateRangePicker.js"; +import DateTimePicker from "../../dist/DateTimePicker.js"; +import Dialog from "../../dist/Dialog.js"; +import FileUploader from "../../dist/FileUploader.js"; +import Icon from "../../dist/Icon.js"; +import Input from "../../dist/Input.js"; +import MultiInput from "../../dist/MultiInput.js"; +import Label from "../../dist/Label.js"; +import Link from "../../dist/Link.js"; +import Menu from "../../dist/Menu.js"; +import NavigationMenu from "../../dist/NavigationMenu.js"; +import NavigationMenuItem from "../../dist/NavigationMenuItem.js"; +import MenuItem from "../../dist/MenuItem.js"; +import Popover from "../../dist/Popover.js"; +import Panel from "../../dist/Panel.js"; +import RadioButton from "../../dist/RadioButton.js"; +import ResponsivePopover from "../../dist/ResponsivePopover.js"; +import SegmentedButton from "../../dist/SegmentedButton.js"; +import SegmentedButtonItem from "../../dist/SegmentedButtonItem.js"; +import Select from "../../dist/Select.js"; +import SelectMenu from "../../dist/SelectMenu.js"; +import SelectMenuOption from "../../dist/SelectMenuOption.js"; +import Slider from "../../dist/Slider.js"; +import SplitButton from "../../dist/SplitButton.js"; +import StepInput from "../../dist/StepInput.js"; +import RangeSlider from "../../dist/RangeSlider.js"; +import Switch from "../../dist/Switch.js"; +import MessageStrip from "../../dist/MessageStrip.js"; +import MultiComboBox from "../../dist/MultiComboBox.js"; +import ProgressIndicator from "../../dist/ProgressIndicator.js"; +import RatingIndicator from "../../dist/RatingIndicator.js"; +import TabContainer from "../../dist/TabContainer.js"; +import Tab from "../../dist/Tab.js"; +import TabSeparator from "../../dist/TabSeparator.js"; +import Table from "../../dist/Table.js"; +import TableColumn from "../../dist/TableColumn.js"; +import TableRow from "../../dist/TableRow.js"; +import TableGroupRow from "../../dist/TableGroupRow.js"; +import TableCell from "../../dist/TableCell.js"; +import TextArea from "../../dist/TextArea.js"; +import TimeSelection from "../../dist/TimeSelection.js"; +import TimePicker from "../../dist/TimePicker.js"; +import TimePickerClock from "../../dist/TimePickerClock.js"; +import TimeSelectionClocks from "../../dist/TimeSelectionClocks.js"; +import Title from "../../dist/Title.js"; +import Toast from "../../dist/Toast.js"; +import ToggleButton from "../../dist/ToggleButton.js"; +// console.log({ToggleButton}) +import Toolbar from "../../dist/Toolbar.js"; +import ToolbarButton from "../../dist/ToolbarButton.js"; +import ToolbarSeparator from "../../dist/ToolbarSeparator.js"; +import ToolbarSpacer from "../../dist/ToolbarSpacer.js"; +import ToolbarSelect from "../../dist/ToolbarSelect.js"; +import Tree from "../../dist/Tree.js"; +import TreeList from "../../dist/TreeList.js"; +import TreeItem from "../../dist/TreeItem.js"; +import TreeItemCustom from "../../dist/TreeItemCustom.js"; +import List from "../../dist/List.js"; +// console.log({List}) +import StandardListItem from "../../dist/StandardListItem.js"; +import CustomListItem from "../../dist/CustomListItem.js"; +import GroupHeaderListItem from "../../dist/GroupHeaderListItem.js"; + +// Features +import "../../dist/features/InputElementsFormSupport.js"; +import "../../dist/features/ColorPaletteMoreColors.js"; +import "../../dist/features/InputSuggestions.js"; diff --git a/packages/playground/.storybook/docs.tsx b/packages/playground/.storybook/docs.tsx deleted file mode 100644 index 010824d6cdc5..000000000000 --- a/packages/playground/.storybook/docs.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import React from 'react'; -// @ts-ignore -import { Footer } from "@sb/components/footer/Footer.tsx"; -import { - Title, - Subtitle, - Description, - Primary, - ArgsTable, - Stories, - PRIMARY_STORY, -} from '@storybook/addon-docs'; - -interface DocsPageArgs { - showDefaultStoryOnly?: boolean; - component: string; - package: string; - since?: string; -} - -export const DocsPage = (args: DocsPageArgs) => { - return () => ( - <> -
      - - - </span> - {args.since && ( - <span className='sb-ui5-component-heading-since'> - <b>v{args.since}</b> - </span> - )} - </header> - <div className='sb-ui5-component-package'><b>{args.package}</b></div> - <h2 className='sb-ui5-control-tag'><{args.component}></h2> - <Subtitle /> - <Description /> - <br /> - <Primary /> - <ArgsTable story={PRIMARY_STORY} /> - { !args.showDefaultStoryOnly && <Stories />} - <Footer /> - </> - ) -} \ No newline at end of file diff --git a/packages/playground/.storybook/main.ts b/packages/playground/.storybook/main.ts index b1773b5166bd..5c4510aa4867 100644 --- a/packages/playground/.storybook/main.ts +++ b/packages/playground/.storybook/main.ts @@ -1,7 +1,7 @@ import remarkGfm from 'remark-gfm'; const config = { - stories: ["../docs/**/*.mdx", "../_stories/**/*.stories.@(ts)"], + stories: ["../docs/**/*.mdx", "../_stories/**/*.stories.@(ts)", "../_stories/**/*.mdx"], staticDirs: [ { from: "../assets", to: "../assets" }, // from /assets to /dist/assets { from: "../docs/storybook-pages", to: "/" }, // from /docs/storybook-pages to /dist/playground @@ -42,7 +42,7 @@ const config = { reactDocgen: 'react-docgen' }, docs: { - autodocs: true + autodocs: 'tag' } }; export default config; \ No newline at end of file diff --git a/packages/playground/.storybook/preview.ts b/packages/playground/.storybook/preview.ts index 967892d70416..1b63ac32170e 100644 --- a/packages/playground/.storybook/preview.ts +++ b/packages/playground/.storybook/preview.ts @@ -36,13 +36,55 @@ export const parameters: Parameters = { .replace(/^\s*[\r\n]/gm, ""), }, options: { - storySort: { - order: [ - "Docs", - "Main", - "Fiori" - ], - }, + // @ts-ignore + storySort: (a, b) => { + // Define the sorting order + const sortOrder = { + "Docs": 1, + "Main": 2, + "Fiori": 3, + }; + + const sortSubOrder = ['Overview', 'Basic']; + + // Function to get the order value for a given category + // @ts-ignore + function getOrder(category) { + // @ts-ignore + return sortOrder[category] || 4; + } + + // Function to get sub-order for 'Main' and 'Fiori' + // @ts-ignore + function getSubOrder(title) { + let index = sortSubOrder.findIndex(keyword => title.endsWith(keyword)); + return index === -1 ? sortSubOrder.length : index; // Default sub-order for titles not listed or found at the end + } + + const aTitle = `${a.title}/${a.name}`; + const bTitle = `${b.title}/${b.name}`; + + const partsA = aTitle.split('/'); + const partsB = bTitle.split('/'); + + // Sort by primary category (Docs, Main, Fiori) + const orderA = getOrder(partsA[0]); + const orderB = getOrder(partsB[0]); + if (orderA !== orderB) { + return orderA - orderB; + } + + // Within 'Main' and 'Fiori', sort by sub-order + if (partsA[0] === 'Main' || partsA[0] === 'Fiori') { + const subOrderA = getSubOrder(partsA[2]); + const subOrderB = getSubOrder(partsB[2]); + if (subOrderA !== subOrderB) { + return subOrderA - subOrderB; + } + } + + return 1; + } }, }; diff --git a/packages/playground/CHANGELOG.md b/packages/playground/CHANGELOG.md index 4337a04fc124..3800c3dc352e 100644 --- a/packages/playground/CHANGELOG.md +++ b/packages/playground/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.22.0](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.3...v1.22.0) (2024-02-05) + +**Note:** Version bump only for package @ui5/webcomponents-playground + + + + + +# [1.22.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.2...v1.22.0-rc.3) (2024-02-01) + + +### Features + +* **ui5-shellbar:** introducing Joule ([#8036](https://github.com/SAP/ui5-webcomponents/issues/8036)) ([ed5c20f](https://github.com/SAP/ui5-webcomponents/commit/ed5c20ffb42dd5f3eb81f77819fd40a9f7abbe08)) + + + + + +# [1.22.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.1...v1.22.0-rc.2) (2024-01-25) + +**Note:** Version bump only for package @ui5/webcomponents-playground + + + + + # [1.22.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.0...v1.22.0-rc.1) (2024-01-18) **Note:** Version bump only for package @ui5/webcomponents-playground diff --git a/packages/playground/_stories/fiori/Bar/Bar.stories.ts b/packages/playground/_stories/fiori/Bar/Bar.stories.ts index 14abd8382a0f..d91781ca999b 100644 --- a/packages/playground/_stories/fiori/Bar/Bar.stories.ts +++ b/packages/playground/_stories/fiori/Bar/Bar.stories.ts @@ -3,25 +3,15 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type Bar from "@ui5/webcomponents-fiori/dist/Bar.js"; import BarDesign from "@ui5/webcomponents-fiori/dist/types/BarDesign.js"; -const component = "ui5-bar"; - export default { title: "Fiori/Bar", component: "Bar", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Bar>; diff --git a/packages/playground/_stories/fiori/BarcodeScannerDialog/BarcodeScannerDialog.stories.ts b/packages/playground/_stories/fiori/BarcodeScannerDialog/BarcodeScannerDialog.stories.ts index 24689fe5ff0f..8492d3720e4d 100644 --- a/packages/playground/_stories/fiori/BarcodeScannerDialog/BarcodeScannerDialog.stories.ts +++ b/packages/playground/_stories/fiori/BarcodeScannerDialog/BarcodeScannerDialog.stories.ts @@ -1,25 +1,15 @@ import { html } from "lit"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - // @ts-ignore import type BarcodeScannerDialog from "@ui5/webcomponents-fiori/dist/BarcodeScannerDialog.js"; -const component = "ui5-barcode-scanner-dialog"; - export default { title: "Fiori/Barcode Scanner Dialog", component: "BarcodeScannerDialog", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }), - }, - }, argTypes, } as Meta<BarcodeScannerDialog>; diff --git a/packages/playground/_stories/fiori/DynamicSideContent/DynamicSideContent.stories.ts b/packages/playground/_stories/fiori/DynamicSideContent/DynamicSideContent.stories.ts index 69806c662672..64f19d3597f4 100644 --- a/packages/playground/_stories/fiori/DynamicSideContent/DynamicSideContent.stories.ts +++ b/packages/playground/_stories/fiori/DynamicSideContent/DynamicSideContent.stories.ts @@ -3,27 +3,17 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type DynamicSideContent from "@ui5/webcomponents-fiori/dist/DynamicSideContent.js"; import SideContentPosition from "@ui5/webcomponents-fiori/dist/types/SideContentPosition.js"; import SideContentFallDown from "@ui5/webcomponents-fiori/dist/types/SideContentFallDown.js"; import SideContentVisibility from "@ui5/webcomponents-fiori/dist/types/SideContentVisibility.js"; -const component = "ui5-dynamic-side-content"; - export default { title: "Fiori/DynamicSideContent", component: "DynamicSideContent", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<DynamicSideContent>; diff --git a/packages/playground/_stories/fiori/FlexibleColumnLayout/FlexibleColumnLayout.stories.ts b/packages/playground/_stories/fiori/FlexibleColumnLayout/FlexibleColumnLayout.stories.ts index c982cd93d9d5..91fa4247defc 100644 --- a/packages/playground/_stories/fiori/FlexibleColumnLayout/FlexibleColumnLayout.stories.ts +++ b/packages/playground/_stories/fiori/FlexibleColumnLayout/FlexibleColumnLayout.stories.ts @@ -3,24 +3,14 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type FlexibleColumnLayout from "@ui5/webcomponents-fiori/dist/FlexibleColumnLayout.js"; -const component = "ui5-flexible-column-layout"; - export default { title: "Fiori/Flexible Column Layout", component: "FlexibleColumnLayout", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<FlexibleColumnLayout>; diff --git a/packages/playground/_stories/fiori/IllustratedMessage/IllustratedMessage.stories.ts b/packages/playground/_stories/fiori/IllustratedMessage/IllustratedMessage.stories.ts index 628055d79ca6..37a28a082afd 100644 --- a/packages/playground/_stories/fiori/IllustratedMessage/IllustratedMessage.stories.ts +++ b/packages/playground/_stories/fiori/IllustratedMessage/IllustratedMessage.stories.ts @@ -3,25 +3,15 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type IllustratedMessage from "@ui5/webcomponents-fiori/dist/IllustratedMessage.js"; import IllustrationMessageType from "@ui5/webcomponents-fiori/dist/types/IllustrationMessageType.js"; -const component = "ui5-illustrated-message"; - export default { title: "Fiori/Illustrated Message", component: "IllustratedMessage", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }), - }, - }, argTypes, } as Meta<IllustratedMessage>; diff --git a/packages/playground/_stories/fiori/MediaGallery/MediaGallery.stories.ts b/packages/playground/_stories/fiori/MediaGallery/MediaGallery.stories.ts index 5c061d8ca4f6..aa32488aca0f 100644 --- a/packages/playground/_stories/fiori/MediaGallery/MediaGallery.stories.ts +++ b/packages/playground/_stories/fiori/MediaGallery/MediaGallery.stories.ts @@ -4,17 +4,12 @@ import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta, StoryFn } from "@storybook/web-components"; import type { PartialStoryFn } from "@storybook/types"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import MediaGallery from "@ui5/webcomponents-fiori/dist/MediaGallery.js"; import TemplateMediaGalleryTypes from "./TemplateMediaGalleryTypes.js"; -const component = "ui5-media-gallery"; - const stylesDecorator = (storyFn: PartialStoryFn) => html` <style> ui5-media-gallery-item:not(:defined) { @@ -33,11 +28,6 @@ const stylesDecorator = (storyFn: PartialStoryFn) => html` export default { title: "Fiori/Media Gallery", component: "MediaGallery", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }), - }, - }, decorators: [stylesDecorator], argTypes, } as Meta<MediaGallery>; diff --git a/packages/playground/_stories/fiori/MediaGallery/MediaGalleryItem/MediaGalleryItem.stories.ts b/packages/playground/_stories/fiori/MediaGallery/MediaGalleryItem/MediaGalleryItem.stories.ts index 062bf7950e0a..d133cc07eb7a 100644 --- a/packages/playground/_stories/fiori/MediaGallery/MediaGalleryItem/MediaGalleryItem.stories.ts +++ b/packages/playground/_stories/fiori/MediaGallery/MediaGalleryItem/MediaGalleryItem.stories.ts @@ -4,16 +4,12 @@ import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta, StoryFn } from "@storybook/web-components"; import type { PartialStoryFn } from "@storybook/types"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - import MediaGalleryItem from "@ui5/webcomponents-fiori/dist/MediaGalleryItem.js"; -const component = "ui5-media-gallery-item"; - const stylesDecorator = (storyFn: PartialStoryFn) => html` <style> ui5-media-gallery-item:not(:defined) { @@ -32,11 +28,6 @@ const stylesDecorator = (storyFn: PartialStoryFn) => html` export default { title: "Fiori/Media Gallery/Media Gallery Item", component: "MediaGalleryItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }), - } - }, decorators: [stylesDecorator], argTypes, } as Meta<MediaGalleryItem>; diff --git a/packages/playground/_stories/fiori/NotificationListGroupItem/NotificationAction/NotificationAction.stories.ts b/packages/playground/_stories/fiori/NotificationListGroupItem/NotificationAction/NotificationAction.stories.ts index cf8e5f67cb65..71de2dece8cb 100644 --- a/packages/playground/_stories/fiori/NotificationListGroupItem/NotificationAction/NotificationAction.stories.ts +++ b/packages/playground/_stories/fiori/NotificationListGroupItem/NotificationAction/NotificationAction.stories.ts @@ -2,20 +2,16 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; import type NotificationAction from "@ui5/webcomponents-fiori/dist/NotificationAction.js"; -const component = "ui5-notification-action"; - export default { title: "Fiori/Notification List Group Item/Notification Action", component: "NotificationAction", parameters: { docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }), story: { iframeHeight: "470px", inline: false, diff --git a/packages/playground/_stories/fiori/NotificationListGroupItem/NotificationListGroupItem.stories.ts b/packages/playground/_stories/fiori/NotificationListGroupItem/NotificationListGroupItem.stories.ts index d8a06c80b69d..10372388a451 100644 --- a/packages/playground/_stories/fiori/NotificationListGroupItem/NotificationListGroupItem.stories.ts +++ b/packages/playground/_stories/fiori/NotificationListGroupItem/NotificationListGroupItem.stories.ts @@ -2,21 +2,17 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; -import { DocsPage } from "../../../.storybook/docs"; import type NotificationListGroupItem from "@ui5/webcomponents-fiori/dist/NotificationListGroupItem.js"; import Priority from "@ui5/webcomponents/dist/types/Priority.js"; -const component = "ui5-li-notification-group"; - export default { title: "Fiori/Notification List Group Item", component: "NotificationListGroupItem", parameters: { docs: { - page: DocsPage({ ...componentInfo, component }), story: { // Opt-out of inline rendering inline: false, diff --git a/packages/playground/_stories/fiori/NotificationListItem/NotificationAction/NotificationAction.stories.ts b/packages/playground/_stories/fiori/NotificationListItem/NotificationAction/NotificationAction.stories.ts index 71b953bfb9d5..6e886063b2d1 100644 --- a/packages/playground/_stories/fiori/NotificationListItem/NotificationAction/NotificationAction.stories.ts +++ b/packages/playground/_stories/fiori/NotificationListItem/NotificationAction/NotificationAction.stories.ts @@ -2,20 +2,16 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; import type NotificationAction from "@ui5/webcomponents-fiori/dist/NotificationAction.js"; -const component = "ui5-notification-action"; - export default { title: "Fiori/Notification List Item/Notification Action", component: "NotificationAction", parameters: { docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }), story: { iframeHeight: "470px", inline: false, diff --git a/packages/playground/_stories/fiori/NotificationListItem/NotificationListItem.stories.ts b/packages/playground/_stories/fiori/NotificationListItem/NotificationListItem.stories.ts index 4bb2321aaa99..f06c7ff084c9 100644 --- a/packages/playground/_stories/fiori/NotificationListItem/NotificationListItem.stories.ts +++ b/packages/playground/_stories/fiori/NotificationListItem/NotificationListItem.stories.ts @@ -2,21 +2,17 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; -import { DocsPage } from "../../../.storybook/docs"; import type NotificationListItem from "@ui5/webcomponents-fiori/dist/NotificationListItem.js"; import Priority from "@ui5/webcomponents/dist/types/Priority.js"; -const component = "ui5-li-notification"; - export default { title: "Fiori/Notification List Item", component: "NotificationListItem", parameters: { docs: { - page: DocsPage({ ...componentInfo, component }), story: { iframeHeight: "470px", inline: false, diff --git a/packages/playground/_stories/fiori/Page/Page.stories.ts b/packages/playground/_stories/fiori/Page/Page.stories.ts index 22315f60c972..2b28fcd87594 100644 --- a/packages/playground/_stories/fiori/Page/Page.stories.ts +++ b/packages/playground/_stories/fiori/Page/Page.stories.ts @@ -3,25 +3,15 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import PageBackgroundDesign from "@ui5/webcomponents-fiori/dist/types/PageBackgroundDesign.js"; import type Page from "@ui5/webcomponents-fiori/dist/Page.js"; -const component = "ui5-page"; - export default { title: "Fiori/Page", component: "Page", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Page>; diff --git a/packages/playground/_stories/fiori/ProductSwitch/ProductSwitch.stories.ts b/packages/playground/_stories/fiori/ProductSwitch/ProductSwitch.stories.ts index 8557f1c477b8..a4b4d5f8b130 100644 --- a/packages/playground/_stories/fiori/ProductSwitch/ProductSwitch.stories.ts +++ b/packages/playground/_stories/fiori/ProductSwitch/ProductSwitch.stories.ts @@ -2,25 +2,15 @@ import { html } from "lit"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - // @ts-ignore import type ProductSwitch from "@ui5/webcomponents-fiori/dist/ProductSwitch.js"; -const component = "ui5-product-switch"; - export default { title: "Fiori/Product Switch", component: "ProductSwitch", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }), - }, - }, argTypes, } as Meta<ProductSwitch>; diff --git a/packages/playground/_stories/fiori/ProductSwitch/ProductSwitchItem/ProductSwitchItem.stories.ts b/packages/playground/_stories/fiori/ProductSwitch/ProductSwitchItem/ProductSwitchItem.stories.ts index db88887d01da..99879ec5617a 100644 --- a/packages/playground/_stories/fiori/ProductSwitch/ProductSwitchItem/ProductSwitchItem.stories.ts +++ b/packages/playground/_stories/fiori/ProductSwitch/ProductSwitchItem/ProductSwitchItem.stories.ts @@ -1,26 +1,17 @@ import { html } from "lit"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - // @ts-ignore import type ProductSwitchItem from "@ui5/webcomponents-fiori/dist/ProductSwitchItem.js"; import { ifDefined } from "lit/directives/if-defined.js"; -const component = "ui5-product-switch-item"; - export default { title: "Fiori/Product Switch/Product Switch Item", component: "ProductSwitchItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }), - }, - }, argTypes, } as Meta<ProductSwitchItem>; diff --git a/packages/playground/_stories/fiori/ShellBar/ShellBar.stories.ts b/packages/playground/_stories/fiori/ShellBar/ShellBar.stories.ts index 4ee5ac7eb494..90e1f452d985 100644 --- a/packages/playground/_stories/fiori/ShellBar/ShellBar.stories.ts +++ b/packages/playground/_stories/fiori/ShellBar/ShellBar.stories.ts @@ -3,24 +3,14 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type ShellBar from "@ui5/webcomponents-fiori/dist/ShellBar.js"; -const component = "ui5-shellbar"; - export default { title: "Fiori/ShellBar", component: "ShellBar", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }), - }, - }, argTypes, } as Meta<ShellBar>; @@ -31,7 +21,6 @@ const Template: UI5StoryArgs<ShellBar, StoryArgsSlots> = ( secondary-title="${ifDefined(args.secondaryTitle)}" notifications-count="${ifDefined(args.notificationsCount)}" ?show-notifications="${ifDefined(args.showNotifications)}" - ?show-product-switch="${ifDefined(args.showProductSwitch)}" ?show-co-pilot="${ifDefined(args.showCoPilot)}" ?show-search-field="${ifDefined(args.showSearchField)}" .accessibilityRoles="${ifDefined(args.accessibilityRoles)}" @@ -69,8 +58,8 @@ Search.args = { searchField: `<ui5-input slot="searchField" placeholder="Enter service..."></ui5-input>`, }; -export const WithCoPilot = Template.bind({}); -WithCoPilot.args = { +export const WithJoule = Template.bind({}); +WithJoule.args = { primaryTitle: "Corporate Portal", secondaryTitle: "secondary title", showCoPilot: true, @@ -91,7 +80,6 @@ export const Advanced: StoryFn = () => { secondary-title="secondary title" notifications-count="99+" show-notifications="" - show-product-switch="" show-co-pilot="" > <ui5-avatar slot="profile"> diff --git a/packages/playground/_stories/fiori/ShellBar/ShellBarItem/ShellBarItem.stories.ts b/packages/playground/_stories/fiori/ShellBar/ShellBarItem/ShellBarItem.stories.ts index a21fe291bfb7..ac0e2195191b 100644 --- a/packages/playground/_stories/fiori/ShellBar/ShellBarItem/ShellBarItem.stories.ts +++ b/packages/playground/_stories/fiori/ShellBar/ShellBarItem/ShellBarItem.stories.ts @@ -2,24 +2,15 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - import type ShellBarItem from "@ui5/webcomponents-fiori/dist/ShellBarItem.js"; -const component = "ui5-shellbar-item"; - export default { title: "Fiori/ShellBar/ShellBarItem", component: "ShellBarItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }), - }, - }, argTypes, } as Meta<ShellBarItem>; diff --git a/packages/playground/_stories/fiori/SideNavigation/SideNavigation.stories.ts b/packages/playground/_stories/fiori/SideNavigation/SideNavigation.stories.ts index 624a706b8318..eadba7a07174 100644 --- a/packages/playground/_stories/fiori/SideNavigation/SideNavigation.stories.ts +++ b/packages/playground/_stories/fiori/SideNavigation/SideNavigation.stories.ts @@ -2,24 +2,14 @@ import { html } from "lit"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Decorator, Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type SideNavigation from "@ui5/webcomponents-fiori/dist/SideNavigation.js"; -const component = "ui5-side-navigation"; - export default { title: "Fiori/Side Navigation", component: "SideNavigation", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<SideNavigation>; diff --git a/packages/playground/_stories/fiori/SideNavigation/SideNavigationItem/SideNavigationItem.stories.ts b/packages/playground/_stories/fiori/SideNavigation/SideNavigationItem/SideNavigationItem.stories.ts index 25cee6da35fb..24feb168a25c 100644 --- a/packages/playground/_stories/fiori/SideNavigation/SideNavigationItem/SideNavigationItem.stories.ts +++ b/packages/playground/_stories/fiori/SideNavigation/SideNavigationItem/SideNavigationItem.stories.ts @@ -2,24 +2,15 @@ import { html } from "lit"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - import type SideNavigationItem from "@ui5/webcomponents-fiori/dist/SideNavigationItem.js"; -const component = "ui5-side-navigation-item"; - export default { title: "Fiori/Side Navigation/Side Navigation Item", component: "SideNavigationItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<SideNavigationItem>; diff --git a/packages/playground/_stories/fiori/SideNavigation/SideNavigationSubItem/SideNavigationSubItem.stories.ts b/packages/playground/_stories/fiori/SideNavigation/SideNavigationSubItem/SideNavigationSubItem.stories.ts index faefcb0761e3..45949fb827e7 100644 --- a/packages/playground/_stories/fiori/SideNavigation/SideNavigationSubItem/SideNavigationSubItem.stories.ts +++ b/packages/playground/_stories/fiori/SideNavigation/SideNavigationSubItem/SideNavigationSubItem.stories.ts @@ -1,24 +1,15 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - import type SideNavigationSubItem from "@ui5/webcomponents-fiori/dist/SideNavigationSubItem.js"; -const component = "ui5-side-navigation-sub-item"; - export default { title: "Fiori/Side Navigation/Side Navigation Sub Item", component: "SideNavigationSubItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<SideNavigationSubItem>; diff --git a/packages/playground/_stories/fiori/Timeline/Timeline.stories.ts b/packages/playground/_stories/fiori/Timeline/Timeline.stories.ts index a52f1e5e10be..53eea694a1f1 100644 --- a/packages/playground/_stories/fiori/Timeline/Timeline.stories.ts +++ b/packages/playground/_stories/fiori/Timeline/Timeline.stories.ts @@ -3,25 +3,15 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type Timeline from "@ui5/webcomponents-fiori/dist/Timeline.js"; import TimelineLayout from "@ui5/webcomponents-fiori/dist/types/TimelineLayout.js"; -const component = "ui5-timeline"; - export default { title: "Fiori/Timeline", component: "Timeline", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Timeline>; diff --git a/packages/playground/_stories/fiori/Timeline/TimelineItem/TimelineItem.stories.ts b/packages/playground/_stories/fiori/Timeline/TimelineItem/TimelineItem.stories.ts index c1f0e7dab8aa..491f98b82e00 100644 --- a/packages/playground/_stories/fiori/Timeline/TimelineItem/TimelineItem.stories.ts +++ b/packages/playground/_stories/fiori/Timeline/TimelineItem/TimelineItem.stories.ts @@ -3,24 +3,15 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - import type TimelineItem from "@ui5/webcomponents-fiori/dist/TimelineItem.js"; -const component = "ui5-timeline-item"; - export default { title: "Fiori/Timeline/Timeline Item", component: "TimelineItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<TimelineItem>; diff --git a/packages/playground/_stories/fiori/UploadCollection/UploadCollection.stories.ts b/packages/playground/_stories/fiori/UploadCollection/UploadCollection.stories.ts index 1e59025ea4c7..43e75a28bc01 100644 --- a/packages/playground/_stories/fiori/UploadCollection/UploadCollection.stories.ts +++ b/packages/playground/_stories/fiori/UploadCollection/UploadCollection.stories.ts @@ -2,26 +2,18 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Decorator, Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; -import { DocsPage } from "../../../.storybook/docs"; import UploadCollection from "@ui5/webcomponents-fiori/dist/UploadCollection.js"; import UploadState from "@ui5/webcomponents-fiori/dist/types/UploadState.js"; import ListMode from "@ui5/webcomponents/dist/types/ListMode.js"; import ListItemType from "@ui5/webcomponents/dist/types/ListItemType.js"; -const component = "ui5-upload-collection"; - export default { title: "Fiori/Upload Collection", component: "UploadCollection", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }), - }, - }, argTypes, } as Meta<UploadCollection>; diff --git a/packages/playground/_stories/fiori/UploadCollection/UploadCollectionItem/UploadCollectionItem.stories.ts b/packages/playground/_stories/fiori/UploadCollection/UploadCollectionItem/UploadCollectionItem.stories.ts index 49a33a2fd2c1..24d254747646 100644 --- a/packages/playground/_stories/fiori/UploadCollection/UploadCollectionItem/UploadCollectionItem.stories.ts +++ b/packages/playground/_stories/fiori/UploadCollection/UploadCollectionItem/UploadCollectionItem.stories.ts @@ -2,23 +2,14 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Decorator, Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - import UploadCollectionItem from "@ui5/webcomponents-fiori/dist/UploadCollectionItem.js"; -const component = "ui5-upload-collection-item"; - export default { title: "Fiori/Upload Collection/Upload Collection Item", component: "UploadCollectionItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }), - }, - }, argTypes, } as Meta<UploadCollectionItem>; diff --git a/packages/playground/_stories/fiori/ViewSettingsDialog/FilterItem/FilterItem.stories.ts b/packages/playground/_stories/fiori/ViewSettingsDialog/FilterItem/FilterItem.stories.ts index f6811442d9ee..352fe6d6746d 100644 --- a/packages/playground/_stories/fiori/ViewSettingsDialog/FilterItem/FilterItem.stories.ts +++ b/packages/playground/_stories/fiori/ViewSettingsDialog/FilterItem/FilterItem.stories.ts @@ -3,24 +3,15 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - import type FilterItem from "@ui5/webcomponents-fiori/dist/FilterItem.js"; -const component = "ui5-filter-item"; - export default { title: "Fiori/View Settings Dialog/Filter Item", component: "FilterItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<FilterItem>; diff --git a/packages/playground/_stories/fiori/ViewSettingsDialog/FilterItemOption/FilterItemOption.stories.ts b/packages/playground/_stories/fiori/ViewSettingsDialog/FilterItemOption/FilterItemOption.stories.ts index 1eb95a1dc8bf..c9336a7e7c9b 100644 --- a/packages/playground/_stories/fiori/ViewSettingsDialog/FilterItemOption/FilterItemOption.stories.ts +++ b/packages/playground/_stories/fiori/ViewSettingsDialog/FilterItemOption/FilterItemOption.stories.ts @@ -2,24 +2,15 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - import type FilterItemOption from "@ui5/webcomponents-fiori/dist/FilterItemOption.js"; -const component = "ui5-filter-item-option"; - export default { title: "Fiori/View Settings Dialog/Filter Item Option", component: "FilterItemOption", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<FilterItemOption>; diff --git a/packages/playground/_stories/fiori/ViewSettingsDialog/SortItem/SortItem.stories.ts b/packages/playground/_stories/fiori/ViewSettingsDialog/SortItem/SortItem.stories.ts index 478d4a828482..7734f1a24502 100644 --- a/packages/playground/_stories/fiori/ViewSettingsDialog/SortItem/SortItem.stories.ts +++ b/packages/playground/_stories/fiori/ViewSettingsDialog/SortItem/SortItem.stories.ts @@ -2,24 +2,15 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - import type SortItem from "@ui5/webcomponents-fiori/dist/SortItem.js"; -const component = "ui5-sort-item"; - export default { title: "Fiori/View Settings Dialog/Sort Item", component: "SortItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<SortItem>; diff --git a/packages/playground/_stories/fiori/ViewSettingsDialog/ViewSettingsDialog.stories.ts b/packages/playground/_stories/fiori/ViewSettingsDialog/ViewSettingsDialog.stories.ts index c23046e32405..92df59084930 100644 --- a/packages/playground/_stories/fiori/ViewSettingsDialog/ViewSettingsDialog.stories.ts +++ b/packages/playground/_stories/fiori/ViewSettingsDialog/ViewSettingsDialog.stories.ts @@ -3,25 +3,15 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type ViewSettingsDialog from "@ui5/webcomponents-fiori/dist/ViewSettingsDialog.js"; -const component = "ui5-view-settings-dialog"; - export default { title: "Fiori/View Settings Dialog", component: "ViewSettingsDialog", subcomponents: {'SortItem' : 'SortItem', 'FilterItem' : 'FilterItem', 'FilterItemOption' : 'FilterItemOption'}, - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<ViewSettingsDialog>; diff --git a/packages/playground/_stories/fiori/Wizard/Wizard.stories.ts b/packages/playground/_stories/fiori/Wizard/Wizard.stories.ts index 81d5c9e0d2c4..2957605df2ec 100644 --- a/packages/playground/_stories/fiori/Wizard/Wizard.stories.ts +++ b/packages/playground/_stories/fiori/Wizard/Wizard.stories.ts @@ -1,23 +1,13 @@ import { html } from "lit"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; - -import { DocsPage } from "../../../.storybook/docs"; - +import argTypes from "./argTypes.js"; // @ts-ignore import type Wizard from "@ui5/webcomponents-fiori/dist/Wizard.js"; -const component = "ui5-wizard"; - export default { title: "Fiori/Wizard", component: "Wizard", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Wizard>; diff --git a/packages/playground/_stories/fiori/Wizard/WizardStep/WizardStep.stories.ts b/packages/playground/_stories/fiori/Wizard/WizardStep/WizardStep.stories.ts index 356dc7d673d7..83066ebeffeb 100644 --- a/packages/playground/_stories/fiori/Wizard/WizardStep/WizardStep.stories.ts +++ b/packages/playground/_stories/fiori/Wizard/WizardStep/WizardStep.stories.ts @@ -5,22 +5,13 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js"; import argTypes, { StoryArgsSlots, componentInfo } from "./argTypes.js"; -import { DocsPage } from "../../../../.storybook/docs"; - // @ts-ignore import type WizardStep from "@ui5/webcomponents-fiori/dist/WizardStep.js"; import { UI5StoryArgs } from "../../../../types.js"; -const component = "ui5-wizard-step"; - export default { title: "Fiori/Wizard/Wizard Step", component: "WizardStep", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<WizardStep>; diff --git a/packages/playground/_stories/main/Avatar/Avatar.stories.ts b/packages/playground/_stories/main/Avatar/Avatar.stories.ts index dd966d977461..2ee6524c1ca8 100644 --- a/packages/playground/_stories/main/Avatar/Avatar.stories.ts +++ b/packages/playground/_stories/main/Avatar/Avatar.stories.ts @@ -7,26 +7,16 @@ import type Avatar from "@ui5/webcomponents/dist/Avatar.js"; import AvatarSize from "@ui5/webcomponents/dist/types/AvatarSize.js"; import AvatarShape from "@ui5/webcomponents/dist/types/AvatarShape.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; import TemplateAvatarTypesAndSizes from "./TemplateAvatarTypesandSizes.js" - -import { DocsPage } from "../../../.storybook/docs"; - -const component = "ui5-avatar"; - export default { title: "Main/Avatar", component: "Avatar", argTypes, - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, } as Meta<Avatar>; const Template: UI5StoryArgs<Avatar, StoryArgsSlots> = (args) => diff --git a/packages/playground/_stories/main/AvatarGroup/AvatarGroup.stories.ts b/packages/playground/_stories/main/AvatarGroup/AvatarGroup.stories.ts index c63bf61d1d62..44f5d80799f7 100644 --- a/packages/playground/_stories/main/AvatarGroup/AvatarGroup.stories.ts +++ b/packages/playground/_stories/main/AvatarGroup/AvatarGroup.stories.ts @@ -6,27 +6,17 @@ import type { StoryFn, Meta } from "@storybook/web-components"; import type AvatarGroup from "@ui5/webcomponents/dist/AvatarGroup.js"; import AvatarGroupType from "@ui5/webcomponents/dist/types/AvatarGroupType.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; import TemplateGroupWithPopover from "./TemplateGroupWithPopover.js"; import TemplateIndividualWithPopover from "./TemplateIndividualWithPopover.js"; import TemplateAvatarGroupTypesAndSizes from "./TemplateAvatarGroupTypesAndSizes.js"; - -import { DocsPage } from "../../../.storybook/docs"; - -const component = "ui5-avatar-group"; - export default { title: "Main/AvatarGroup", component: "AvatarGroup", argTypes, - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, } as Meta<AvatarGroup>; const Template: UI5StoryArgs<AvatarGroup, StoryArgsSlots> = (args) => diff --git a/packages/playground/_stories/main/Badge/Badge.stories.ts b/packages/playground/_stories/main/Badge/Badge.stories.ts index ce8da3890d8f..e96f5205443b 100644 --- a/packages/playground/_stories/main/Badge/Badge.stories.ts +++ b/packages/playground/_stories/main/Badge/Badge.stories.ts @@ -2,24 +2,16 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; -import { DocsPage } from "../../../.storybook/docs"; import type Badge from "@ui5/webcomponents/dist/Badge.js"; import BadgeDesign from "@ui5/webcomponents/dist/types/BadgeDesign.js"; import WrappingType from "@ui5/webcomponents/dist/types/WrappingType.js"; -const component = "ui5-badge"; - export default { title: "Main/Badge", component: "Badge", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Badge>; diff --git a/packages/playground/_stories/main/Breadcrumbs/Breadcrumbs.stories.ts b/packages/playground/_stories/main/Breadcrumbs/Breadcrumbs.stories.ts index 19e5c2b8f402..92b1d68fd7f1 100644 --- a/packages/playground/_stories/main/Breadcrumbs/Breadcrumbs.stories.ts +++ b/packages/playground/_stories/main/Breadcrumbs/Breadcrumbs.stories.ts @@ -3,24 +3,14 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type Breadcrumbs from "@ui5/webcomponents/dist/Breadcrumbs.js"; -const component = "ui5-breadcrumbs"; - export default { title: "Main/Breadcrumbs", component: "Breadcrumbs", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }), - }, - }, argTypes, } as Meta<Breadcrumbs>; diff --git a/packages/playground/_stories/main/Breadcrumbs/BreadcrumbsItem/BreadcrumbsItem.stories.ts b/packages/playground/_stories/main/Breadcrumbs/BreadcrumbsItem/BreadcrumbsItem.stories.ts index a0cbc22f5a8b..7529a630b7d7 100644 --- a/packages/playground/_stories/main/Breadcrumbs/BreadcrumbsItem/BreadcrumbsItem.stories.ts +++ b/packages/playground/_stories/main/Breadcrumbs/BreadcrumbsItem/BreadcrumbsItem.stories.ts @@ -3,24 +3,15 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - import type BreadcrumbsItem from "@ui5/webcomponents/dist/BreadcrumbsItem.js"; -const component = "ui5-breadcrumbs-item"; - export default { title: "Main/Breadcrumbs/Breadcrumbs Item", component: "BreadcrumbsItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }), - }, - }, argTypes, } as Meta<BreadcrumbsItem>; diff --git a/packages/playground/_stories/main/BusyIndicator/BusyIndicator.stories.ts b/packages/playground/_stories/main/BusyIndicator/BusyIndicator.stories.ts index 5d479c623987..ef712c605106 100644 --- a/packages/playground/_stories/main/BusyIndicator/BusyIndicator.stories.ts +++ b/packages/playground/_stories/main/BusyIndicator/BusyIndicator.stories.ts @@ -2,23 +2,15 @@ import { html } from "lit"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; -import { DocsPage } from "../../../.storybook/docs"; import BusyIndicator from "@ui5/webcomponents/dist/BusyIndicator.js"; import BusyIndicatorSize from "@ui5/webcomponents/dist/types/BusyIndicatorSize.js"; -const component = "ui5-busy-indicator"; - export default { title: "Main/Busy Indicator", component: "BusyIndicator", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<BusyIndicator>; diff --git a/packages/playground/_stories/main/Button/Button.stories.ts b/packages/playground/_stories/main/Button/Button.stories.ts index 07cb175d67f5..8b154b506ce8 100644 --- a/packages/playground/_stories/main/Button/Button.stories.ts +++ b/packages/playground/_stories/main/Button/Button.stories.ts @@ -1,27 +1,18 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; -import type { Meta, StoryFn } from "@storybook/web-components"; +import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; -import { DocsPage } from "../../../.storybook/docs"; - import type Button from "@ui5/webcomponents/dist/Button.js"; import ButtonDesign from "@ui5/webcomponents/dist/types/ButtonDesign.js"; -const component = "ui5-button"; - export default { title: "Main/Button", component: "Button", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Button>; diff --git a/packages/playground/_stories/main/Calendar/Calendar.stories.ts b/packages/playground/_stories/main/Calendar/Calendar.stories.ts index 647502572312..32dd7efe3249 100644 --- a/packages/playground/_stories/main/Calendar/Calendar.stories.ts +++ b/packages/playground/_stories/main/Calendar/Calendar.stories.ts @@ -3,26 +3,16 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type Calendar from "@ui5/webcomponents/dist/Calendar.js"; import CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js"; -const component = "ui5-calendar"; - export default { title: "Main/Calendar", component: "Calendar", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Calendar>; diff --git a/packages/playground/_stories/main/Calendar/CalendarDate/CalendarDate.stories.ts b/packages/playground/_stories/main/Calendar/CalendarDate/CalendarDate.stories.ts index 7c738814526b..3e538575ee51 100644 --- a/packages/playground/_stories/main/Calendar/CalendarDate/CalendarDate.stories.ts +++ b/packages/playground/_stories/main/Calendar/CalendarDate/CalendarDate.stories.ts @@ -3,25 +3,16 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - import type CalendarDate from "@ui5/webcomponents/dist/CalendarDate.js"; -const component = "ui5-date"; - export default { title: "Main/Calendar/Calendar Date", component: "CalendarDate", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<CalendarDate>; diff --git a/packages/playground/_stories/main/Card/Card.stories.ts b/packages/playground/_stories/main/Card/Card.stories.ts index d77574c9dfcd..871d22e0f8d8 100644 --- a/packages/playground/_stories/main/Card/Card.stories.ts +++ b/packages/playground/_stories/main/Card/Card.stories.ts @@ -1,21 +1,17 @@ import { html } from "lit"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; -import { DocsPage } from "../../../.storybook/docs.js"; import type Card from "@ui5/webcomponents/dist/Card.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; -const component = "ui5-card"; - export default { title: "Main/Card", component: "Card", parameters: { docs: { - page: DocsPage({ ...componentInfo, component }), story: { iframeHeight: "370px", inline: false, @@ -155,7 +151,6 @@ WithTable.args = { WithTable.decorators = [setWidth("40rem")]; WithTable.parameters = { docs: { - page: DocsPage({ ...componentInfo, component }), story: { iframeHeight: "250px", inline: false, @@ -243,7 +238,6 @@ More.decorators = [ More.parameters = { docs: { - page: DocsPage({ ...componentInfo, component }), story: { iframeHeight: "680px", inline: false, diff --git a/packages/playground/_stories/main/Card/CardHeader/CardHeader.stories.ts b/packages/playground/_stories/main/Card/CardHeader/CardHeader.stories.ts index 438368154631..c9f62358c1c2 100644 --- a/packages/playground/_stories/main/Card/CardHeader/CardHeader.stories.ts +++ b/packages/playground/_stories/main/Card/CardHeader/CardHeader.stories.ts @@ -1,23 +1,15 @@ import { html } from "lit"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; import type CardHeader from "@ui5/webcomponents/dist/CardHeader.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; -const component = "ui5-card-header"; - export default { title: "Main/Card/Card Header", component: "CardHeader", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<CardHeader>; diff --git a/packages/playground/_stories/main/Carousel/Carousel.stories.ts b/packages/playground/_stories/main/Carousel/Carousel.stories.ts index 80bdce50ea11..df62d1dfd87b 100644 --- a/packages/playground/_stories/main/Carousel/Carousel.stories.ts +++ b/packages/playground/_stories/main/Carousel/Carousel.stories.ts @@ -4,25 +4,15 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type Carousel from "@ui5/webcomponents/dist/Carousel.js"; import CarouselArrowsPlacement from "@ui5/webcomponents/dist/types/CarouselArrowsPlacement.js"; -const component = "ui5-carousel"; - export default { title: "Main/Carousel", component: "Carousel", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Carousel>; diff --git a/packages/playground/_stories/main/CheckBox/CheckBox.stories.ts b/packages/playground/_stories/main/CheckBox/CheckBox.stories.ts index b464277edfe9..10f51a0f0eab 100644 --- a/packages/playground/_stories/main/CheckBox/CheckBox.stories.ts +++ b/packages/playground/_stories/main/CheckBox/CheckBox.stories.ts @@ -2,25 +2,15 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type CheckBox from "@ui5/webcomponents/dist/CheckBox.js"; import WrappingType from "@ui5/webcomponents/dist/types/WrappingType.js"; -const component = "ui5-checkbox"; - export default { title: "Main/Check Box", component: "CheckBox", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }), - }, - }, argTypes, } as Meta<CheckBox>; diff --git a/packages/playground/_stories/main/ColorPalette/ColorPalette.stories.ts b/packages/playground/_stories/main/ColorPalette/ColorPalette.stories.ts index 6d9af2fc2c2c..428a039977bd 100644 --- a/packages/playground/_stories/main/ColorPalette/ColorPalette.stories.ts +++ b/packages/playground/_stories/main/ColorPalette/ColorPalette.stories.ts @@ -2,24 +2,14 @@ import { html } from "lit"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type ColorPalette from "@ui5/webcomponents/dist/ColorPalette.js"; -const component = "ui5-color-palette"; - export default { title: "Main/ColorPalette", component: "ColorPalette", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<ColorPalette>; diff --git a/packages/playground/_stories/main/ColorPalette/ColorPaletteItem/ColorPaletteItem.stories.ts b/packages/playground/_stories/main/ColorPalette/ColorPaletteItem/ColorPaletteItem.stories.ts index 7dcacda1efb6..7a43ce1459c7 100644 --- a/packages/playground/_stories/main/ColorPalette/ColorPaletteItem/ColorPaletteItem.stories.ts +++ b/packages/playground/_stories/main/ColorPalette/ColorPaletteItem/ColorPaletteItem.stories.ts @@ -2,24 +2,15 @@ import { html } from "lit"; import type { Meta } from "@storybook/web-components"; import { ifDefined } from "lit/directives/if-defined.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - import type ColorPaletteItem from "@ui5/webcomponents/dist/ColorPaletteItem.js"; -const component = "ui5-color-palette-item"; - export default { title: "Main/ColorPalette/ColorPaletteItem", component: "ColorPaletteItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<ColorPaletteItem>; diff --git a/packages/playground/_stories/main/ColorPalettePopover/ColorPalettePopover.stories.ts b/packages/playground/_stories/main/ColorPalettePopover/ColorPalettePopover.stories.ts index bbf9a31977b6..7e4638f61996 100644 --- a/packages/playground/_stories/main/ColorPalettePopover/ColorPalettePopover.stories.ts +++ b/packages/playground/_stories/main/ColorPalettePopover/ColorPalettePopover.stories.ts @@ -3,24 +3,14 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type ColorPalettePopover from "@ui5/webcomponents/dist/ColorPalettePopover.js"; -const component = "ui5-color-palette-popover"; - export default { title: "Main/ColorPalettePopover", component: "ColorPalettePopover", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<ColorPalettePopover>; diff --git a/packages/playground/_stories/main/ColorPicker/ColorPicker.stories.ts b/packages/playground/_stories/main/ColorPicker/ColorPicker.stories.ts index 246e514104b4..a4fb809db068 100644 --- a/packages/playground/_stories/main/ColorPicker/ColorPicker.stories.ts +++ b/packages/playground/_stories/main/ColorPicker/ColorPicker.stories.ts @@ -2,24 +2,14 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type ColorPicker from "@ui5/webcomponents/dist/ColorPicker.js"; -const component = "ui5-color-picker"; - export default { title: "Main/ColorPicker", component: "ColorPicker", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<ColorPicker>; diff --git a/packages/playground/_stories/main/ComboBox/ComboBox.stories.ts b/packages/playground/_stories/main/ComboBox/ComboBox.stories.ts index a035ea2741f2..a9c55caecb93 100644 --- a/packages/playground/_stories/main/ComboBox/ComboBox.stories.ts +++ b/packages/playground/_stories/main/ComboBox/ComboBox.stories.ts @@ -3,27 +3,17 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - // @ts-ignore import type ComboBox from "@ui5/webcomponents/dist/ComboBox.js"; import ComboBoxFilter from "@ui5/webcomponents/dist/types/ComboBoxFilter.js"; -const component = "ui5-combobox"; - export default { title: "Main/Combo Box", component: "ComboBox", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }), - }, - }, argTypes, } as Meta<ComboBox>; diff --git a/packages/playground/_stories/main/ComboBox/ComboBoxGroupItem/ComboBoxGroupItem.stories.ts b/packages/playground/_stories/main/ComboBox/ComboBoxGroupItem/ComboBoxGroupItem.stories.ts index 60f8c47da241..d31fdc9cd559 100644 --- a/packages/playground/_stories/main/ComboBox/ComboBoxGroupItem/ComboBoxGroupItem.stories.ts +++ b/packages/playground/_stories/main/ComboBox/ComboBoxGroupItem/ComboBoxGroupItem.stories.ts @@ -2,25 +2,16 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - // @ts-ignore import type ComboBoxGroupItem from "@ui5/webcomponents/dist/ComboBoxGroupItem.js"; -const component = "ui5-cb-group-item"; - export default { title: "Main/Combo Box/Combo Box Group Item", component: "ComboBoxGroupItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }), - }, - }, argTypes, } as Meta<ComboBoxGroupItem>; diff --git a/packages/playground/_stories/main/ComboBox/ComboBoxItem/ComboBoxItem.stories.ts b/packages/playground/_stories/main/ComboBox/ComboBoxItem/ComboBoxItem.stories.ts index b5509a5bd8e2..cda81f49a1f0 100644 --- a/packages/playground/_stories/main/ComboBox/ComboBoxItem/ComboBoxItem.stories.ts +++ b/packages/playground/_stories/main/ComboBox/ComboBoxItem/ComboBoxItem.stories.ts @@ -2,25 +2,16 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - // @ts-ignore import type ComboBoxItem from "@ui5/webcomponents/dist/ComboBoxItem.js"; -const component = "ui5-cb-item"; - export default { title: "Main/Combo Box/Combo Box Item", component: "ComboBoxItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }), - }, - }, argTypes, } as Meta<ComboBoxItem>; diff --git a/packages/playground/_stories/main/DatePicker/DatePicker.stories.ts b/packages/playground/_stories/main/DatePicker/DatePicker.stories.ts index 23fda844efd3..cf0008247ca2 100644 --- a/packages/playground/_stories/main/DatePicker/DatePicker.stories.ts +++ b/packages/playground/_stories/main/DatePicker/DatePicker.stories.ts @@ -3,26 +3,16 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type DatePicker from "@ui5/webcomponents/dist/DatePicker.js"; import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js"; import CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js"; -const component = "ui5-date-picker"; - export default { title: "Main/DatePicker", component: "DatePicker", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<DatePicker>; diff --git a/packages/playground/_stories/main/DateRangePicker/DateRangePicker.stories.ts b/packages/playground/_stories/main/DateRangePicker/DateRangePicker.stories.ts index 3ec429b18a53..af619f0d5633 100644 --- a/packages/playground/_stories/main/DateRangePicker/DateRangePicker.stories.ts +++ b/packages/playground/_stories/main/DateRangePicker/DateRangePicker.stories.ts @@ -3,24 +3,14 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type DateRangePicker from "@ui5/webcomponents/dist/DateRangePicker.js"; -const component = "ui5-daterange-picker"; - export default { title: "Main/DateRangePicker", component: "DateRangePicker", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<DateRangePicker>; diff --git a/packages/playground/_stories/main/DateTimePicker/DateTimePicker.stories.ts b/packages/playground/_stories/main/DateTimePicker/DateTimePicker.stories.ts index 53160d98cf48..d6e79ef1a836 100644 --- a/packages/playground/_stories/main/DateTimePicker/DateTimePicker.stories.ts +++ b/packages/playground/_stories/main/DateTimePicker/DateTimePicker.stories.ts @@ -3,24 +3,14 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type DateTimePicker from "@ui5/webcomponents/dist/DateTimePicker.js"; -const component = "ui5-datetime-picker"; - export default { title: "Main/DateTimePicker", component: "DateTimePicker", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<DateTimePicker>; diff --git a/packages/playground/_stories/main/Dialog/Dialog.stories.ts b/packages/playground/_stories/main/Dialog/Dialog.stories.ts index 88c177b69a68..5a01acb9f81c 100644 --- a/packages/playground/_stories/main/Dialog/Dialog.stories.ts +++ b/packages/playground/_stories/main/Dialog/Dialog.stories.ts @@ -3,14 +3,11 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; import type Dialog from "@ui5/webcomponents/dist/Dialog.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; -import { DocsPage } from "../../../.storybook/docs"; import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js"; -const component = "ui5-dialog"; - export default { title: "Main/Dialog", component: "Dialog", @@ -21,7 +18,6 @@ export default { iframeHeight: "800px", inline: false, }, - page: DocsPage({ ...componentInfo, component }), }, }, } as Meta<Dialog>; diff --git a/packages/playground/_stories/main/FileUploader/FileUploader.stories.ts b/packages/playground/_stories/main/FileUploader/FileUploader.stories.ts index ac894d0880e8..207831153405 100644 --- a/packages/playground/_stories/main/FileUploader/FileUploader.stories.ts +++ b/packages/playground/_stories/main/FileUploader/FileUploader.stories.ts @@ -3,24 +3,14 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type FileUploader from "@ui5/webcomponents/dist/FileUploader.js"; -const component = "ui5-file-uploader"; - export default { title: "Main/FileUploader", component: "FileUploader", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<FileUploader>; diff --git a/packages/playground/_stories/main/Icon/Icon.stories.ts b/packages/playground/_stories/main/Icon/Icon.stories.ts index bc801ad2214c..0087e5f44655 100644 --- a/packages/playground/_stories/main/Icon/Icon.stories.ts +++ b/packages/playground/_stories/main/Icon/Icon.stories.ts @@ -2,25 +2,15 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type Icon from "@ui5/webcomponents/dist/Icon.js"; import IconDesign from "@ui5/webcomponents/dist/types/IconDesign.js"; -const component = "ui5-icon"; - export default { title: "Main/Icon", component: "Icon", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }), - }, - }, argTypes, } as Meta<Icon>; diff --git a/packages/playground/_stories/main/Input/Input.stories.ts b/packages/playground/_stories/main/Input/Input.stories.ts index 01218838aa1f..457cbc87e27f 100644 --- a/packages/playground/_stories/main/Input/Input.stories.ts +++ b/packages/playground/_stories/main/Input/Input.stories.ts @@ -1,29 +1,19 @@ import { html } from "lit"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type Input from "@ui5/webcomponents/dist/Input.js"; import { ifDefined } from "lit-html/directives/if-defined.js"; import { unsafeHTML } from "lit-html/directives/unsafe-html.js"; import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js"; import InputType from "@ui5/webcomponents/dist/types/InputType.js"; - -const component = "ui5-input"; let index = 0; export default { title: "Main/Input", component: "Input", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Input>; diff --git a/packages/playground/_stories/main/Input/SuggestionGroupItem/SuggestionGroupItem.stories.ts b/packages/playground/_stories/main/Input/SuggestionGroupItem/SuggestionGroupItem.stories.ts index 4d7cbaecbe56..b64d80c08111 100644 --- a/packages/playground/_stories/main/Input/SuggestionGroupItem/SuggestionGroupItem.stories.ts +++ b/packages/playground/_stories/main/Input/SuggestionGroupItem/SuggestionGroupItem.stories.ts @@ -1,25 +1,16 @@ import { html } from "lit"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - import type SuggestionGroupItem from "@ui5/webcomponents/dist/SuggestionGroupItem.js"; import { ifDefined } from "lit-html/directives/if-defined.js"; -const component = "ui5-suggestion-group-item"; - export default { title: "Main/Input/Suggestion Group Item", component: "SuggestionGroupItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<SuggestionGroupItem>; diff --git a/packages/playground/_stories/main/Input/SuggestionItem/SuggestionItem.stories.ts b/packages/playground/_stories/main/Input/SuggestionItem/SuggestionItem.stories.ts index d4c4dd867514..d9a38d18f061 100644 --- a/packages/playground/_stories/main/Input/SuggestionItem/SuggestionItem.stories.ts +++ b/packages/playground/_stories/main/Input/SuggestionItem/SuggestionItem.stories.ts @@ -1,25 +1,16 @@ import { html } from "lit"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - import type SuggestionItem from "@ui5/webcomponents/dist/SuggestionItem.js"; import { ifDefined } from "lit-html/directives/if-defined.js"; -const component = "ui5-suggestion-item"; - export default { title: "Main/Input/Suggestion Item", component: "SuggestionItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<SuggestionItem>; diff --git a/packages/playground/_stories/main/Label/Label.stories.ts b/packages/playground/_stories/main/Label/Label.stories.ts index a76ecaceed8b..b6aa1bbd6c09 100644 --- a/packages/playground/_stories/main/Label/Label.stories.ts +++ b/packages/playground/_stories/main/Label/Label.stories.ts @@ -2,24 +2,16 @@ import { html } from "lit"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; -import { DocsPage } from "../../../.storybook/docs"; import type Label from "@ui5/webcomponents/dist/Label.js"; import WrappingType from "@ui5/webcomponents/dist/types/WrappingType.js"; import type { Decorator } from "@storybook/web-components" -const component = "ui5-label"; - export default { title: "Main/Label", component: "Label", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Label>; diff --git a/packages/playground/_stories/main/Link/Link.stories.ts b/packages/playground/_stories/main/Link/Link.stories.ts index 99914cd85ae0..e93031b9c0c8 100644 --- a/packages/playground/_stories/main/Link/Link.stories.ts +++ b/packages/playground/_stories/main/Link/Link.stories.ts @@ -3,26 +3,16 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type Link from "@ui5/webcomponents/dist/Link.js"; import WrappingType from "@ui5/webcomponents/dist/types/WrappingType.js"; import LinkDesign from "@ui5/webcomponents/dist/types/LinkDesign.js"; -const component = "ui5-link"; - export default { title: "Main/Link", component: "Link", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Link>; diff --git a/packages/playground/_stories/main/List/CustomListItem/CustomListItem.stories.ts b/packages/playground/_stories/main/List/CustomListItem/CustomListItem.stories.ts index 4799bf5524eb..ed40c97be931 100644 --- a/packages/playground/_stories/main/List/CustomListItem/CustomListItem.stories.ts +++ b/packages/playground/_stories/main/List/CustomListItem/CustomListItem.stories.ts @@ -5,22 +5,13 @@ import type { Meta, StoryFn } from "@storybook/web-components"; import type CustomListItem from "@ui5/webcomponents/dist/CustomListItem.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - -const component = "ui5-li-custom"; - export default { title: "Main/List/Custom List Item", component: "CustomListItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<CustomListItem>; diff --git a/packages/playground/_stories/main/List/GroupHeaderListItem/GroupHeaderListItem.stories.ts b/packages/playground/_stories/main/List/GroupHeaderListItem/GroupHeaderListItem.stories.ts index 6fa442868744..63c9514dd859 100644 --- a/packages/playground/_stories/main/List/GroupHeaderListItem/GroupHeaderListItem.stories.ts +++ b/packages/playground/_stories/main/List/GroupHeaderListItem/GroupHeaderListItem.stories.ts @@ -5,22 +5,13 @@ import type { Meta, StoryFn } from "@storybook/web-components"; import type GroupHeaderListItem from "@ui5/webcomponents/dist/GroupHeaderListItem.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - -const component = "ui5-li-groupheader"; - export default { title: "Main/List/Group Header List Item", component: "GroupHeaderListItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<GroupHeaderListItem>; diff --git a/packages/playground/_stories/main/List/List.stories.ts b/packages/playground/_stories/main/List/List.stories.ts index afe288d05676..0988a8f479e7 100644 --- a/packages/playground/_stories/main/List/List.stories.ts +++ b/packages/playground/_stories/main/List/List.stories.ts @@ -7,22 +7,12 @@ import type List from "@ui5/webcomponents/dist/List.js"; import ListMode from "@ui5/webcomponents/dist/types/ListMode.js"; import ListSeparators from "@ui5/webcomponents/dist/types/ListSeparators.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - -const component = "ui5-list"; - export default { title: "Main/List", component: "List", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<List>; diff --git a/packages/playground/_stories/main/List/StandardListItem/StandardListItem.stories.ts b/packages/playground/_stories/main/List/StandardListItem/StandardListItem.stories.ts index 5103c7393f3c..d70445ef6b22 100644 --- a/packages/playground/_stories/main/List/StandardListItem/StandardListItem.stories.ts +++ b/packages/playground/_stories/main/List/StandardListItem/StandardListItem.stories.ts @@ -5,22 +5,13 @@ import type { Meta } from "@storybook/web-components"; import type StandardListItem from "@ui5/webcomponents/dist/StandardListItem.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - -const component = "ui5-li"; - export default { title: "Main/List/Standard List Item", component: "StandardListItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<StandardListItem>; diff --git a/packages/playground/_stories/main/Menu/Menu.stories.ts b/packages/playground/_stories/main/Menu/Menu.stories.ts index 614f98837186..68b766d2ce34 100644 --- a/packages/playground/_stories/main/Menu/Menu.stories.ts +++ b/packages/playground/_stories/main/Menu/Menu.stories.ts @@ -3,24 +3,14 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type Menu from "@ui5/webcomponents/dist/Menu.js"; -const component = "ui5-menu"; - export default { title: "Main/Menu", component: "Menu", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Menu>; diff --git a/packages/playground/_stories/main/Menu/MenuItem/MenuItem.stories.ts b/packages/playground/_stories/main/Menu/MenuItem/MenuItem.stories.ts index 21e96f428340..89499b06f345 100644 --- a/packages/playground/_stories/main/Menu/MenuItem/MenuItem.stories.ts +++ b/packages/playground/_stories/main/Menu/MenuItem/MenuItem.stories.ts @@ -3,24 +3,15 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - import type MenuItem from "@ui5/webcomponents/dist/MenuItem.js"; -const component = "ui5-menu-item"; - export default { title: "Main/Menu/MenuItem", component: "MenuItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<MenuItem>; diff --git a/packages/playground/_stories/main/MessageStrip/MessageStrip.stories.ts b/packages/playground/_stories/main/MessageStrip/MessageStrip.stories.ts index 03a5dcf21f40..4584b1e9ab59 100644 --- a/packages/playground/_stories/main/MessageStrip/MessageStrip.stories.ts +++ b/packages/playground/_stories/main/MessageStrip/MessageStrip.stories.ts @@ -2,24 +2,15 @@ import { html } from "lit"; import type { Meta, StoryFn } from "@storybook/web-components"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; import MessageStrip from "@ui5/webcomponents/dist/MessageStrip.js"; import MessageStripDesign from "@ui5/webcomponents/dist/types/MessageStripDesign.js"; -const component = "ui5-message-strip"; - export default { title: "Main/Message Strip", component: "MessageStrip", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<MessageStrip>; diff --git a/packages/playground/_stories/main/MultiComboBox/MultiComboBox.stories.ts b/packages/playground/_stories/main/MultiComboBox/MultiComboBox.stories.ts index 00c1dc6f81b3..2973bd9a7118 100644 --- a/packages/playground/_stories/main/MultiComboBox/MultiComboBox.stories.ts +++ b/packages/playground/_stories/main/MultiComboBox/MultiComboBox.stories.ts @@ -1,27 +1,17 @@ import { html } from "lit"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type MultiComboBox from "@ui5/webcomponents/dist/MultiComboBox.js"; import { unsafeHTML } from "lit-html/directives/unsafe-html.js"; import { ifDefined } from "lit-html/directives/if-defined.js"; import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js"; -const component = "ui5-multi-combobox"; - export default { title: "Main/Multi-Combo Box", component: "MultiComboBox", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<MultiComboBox>; diff --git a/packages/playground/_stories/main/MultiComboBox/MultiComboBoxGroupItem/MultiComboBoxGroupItem.stories.ts b/packages/playground/_stories/main/MultiComboBox/MultiComboBoxGroupItem/MultiComboBoxGroupItem.stories.ts index a12953f88379..f6656fb4f00a 100644 --- a/packages/playground/_stories/main/MultiComboBox/MultiComboBoxGroupItem/MultiComboBoxGroupItem.stories.ts +++ b/packages/playground/_stories/main/MultiComboBox/MultiComboBoxGroupItem/MultiComboBoxGroupItem.stories.ts @@ -1,24 +1,15 @@ import { html } from "lit"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - import type MultiComboBoxGroupItem from "@ui5/webcomponents/dist/MultiComboBoxGroupItem.js"; -const component = "ui5-mcb-group-item"; - export default { title: "Main/Multi-Combo Box/Multi-Combo Box Group Item", component: "MultiComboBoxGroupItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<MultiComboBoxGroupItem>; diff --git a/packages/playground/_stories/main/MultiComboBox/MultiComboBoxItem/MultiComboBoxItem.stories.ts b/packages/playground/_stories/main/MultiComboBox/MultiComboBoxItem/MultiComboBoxItem.stories.ts index fc170930fe0d..f74bf40942dc 100644 --- a/packages/playground/_stories/main/MultiComboBox/MultiComboBoxItem/MultiComboBoxItem.stories.ts +++ b/packages/playground/_stories/main/MultiComboBox/MultiComboBoxItem/MultiComboBoxItem.stories.ts @@ -1,25 +1,16 @@ import { html } from "lit"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - import type MultiComboBoxItem from "@ui5/webcomponents/dist/MultiComboBoxItem.js"; import { ifDefined } from "lit-html/directives/if-defined.js"; -const component = "ui5-mcb-item"; - export default { title: "Main/Multi-Combo Box/Multi-Combo Box Item", component: "MultiComboBoxItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<MultiComboBoxItem>; diff --git a/packages/playground/_stories/main/MultiInput/MultiInput.stories.ts b/packages/playground/_stories/main/MultiInput/MultiInput.stories.ts index 0d9888849a00..eac355e3c499 100644 --- a/packages/playground/_stories/main/MultiInput/MultiInput.stories.ts +++ b/packages/playground/_stories/main/MultiInput/MultiInput.stories.ts @@ -1,26 +1,16 @@ import { html } from "lit"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type MultiInput from "@ui5/webcomponents/dist/MultiInput.js"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; -const component = "ui5-multi-input"; - export default { title: "Main/Multi Input", component: "MultiInput", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<MultiInput>; diff --git a/packages/playground/_stories/main/MultiInput/Token/Token.stories.ts b/packages/playground/_stories/main/MultiInput/Token/Token.stories.ts index 067e9f7f859c..17b2d8e8d942 100644 --- a/packages/playground/_stories/main/MultiInput/Token/Token.stories.ts +++ b/packages/playground/_stories/main/MultiInput/Token/Token.stories.ts @@ -1,26 +1,17 @@ import { html } from "lit"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - import type Token from "@ui5/webcomponents/dist/Token.js"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; -const component = "ui5-token"; - export default { title: "Main/Multi Input/Token", component: "Token", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<Token>; diff --git a/packages/playground/_stories/main/Panel/Panel.stories.ts b/packages/playground/_stories/main/Panel/Panel.stories.ts index 2c1fa816bf29..31e7ee39a44b 100644 --- a/packages/playground/_stories/main/Panel/Panel.stories.ts +++ b/packages/playground/_stories/main/Panel/Panel.stories.ts @@ -3,28 +3,18 @@ import { ifDefined } from "lit/directives/if-defined.js" import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type Panel from "@ui5/webcomponents/dist/Panel.js"; import PanelAccessibleRole from "@ui5/webcomponents/dist/types/PanelAccessibleRole.js"; import TitleLevel from "@ui5/webcomponents/dist/types/TitleLevel.js"; - -const component = "ui5-panel"; let index = 0; export default { title: "Main/Panel", component: "Panel", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Panel>; diff --git a/packages/playground/_stories/main/Popover/Popover.stories.ts b/packages/playground/_stories/main/Popover/Popover.stories.ts index b843a8575365..53b790e467e7 100644 --- a/packages/playground/_stories/main/Popover/Popover.stories.ts +++ b/packages/playground/_stories/main/Popover/Popover.stories.ts @@ -2,20 +2,16 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; -import { DocsPage } from "../../../.storybook/docs"; import type Popover from "@ui5/webcomponents/dist/Popover.js"; -const component = "ui5-popover"; - export default { title: "Main/Popover", component: "Popover", parameters: { docs: { - page: DocsPage({ ...componentInfo, component }), story: { inline: false, iframeHeight: "700px", diff --git a/packages/playground/_stories/main/ProgressIndicator/ProgressIndicator.stories.ts b/packages/playground/_stories/main/ProgressIndicator/ProgressIndicator.stories.ts index 7118779cd832..76352c2de715 100644 --- a/packages/playground/_stories/main/ProgressIndicator/ProgressIndicator.stories.ts +++ b/packages/playground/_stories/main/ProgressIndicator/ProgressIndicator.stories.ts @@ -2,24 +2,14 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type ProgressIndicator from "@ui5/webcomponents/dist/ProgressIndicator.js"; -const component = "ui5-progress-indicator"; - export default { title: "Main/Progress Indicator", component: "ProgressIndicator", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }), - }, - }, argTypes, } as Meta<ProgressIndicator>; diff --git a/packages/playground/_stories/main/RadioButton/RadioButton.stories.ts b/packages/playground/_stories/main/RadioButton/RadioButton.stories.ts index 2918f0476e0c..c503ea85aeb4 100644 --- a/packages/playground/_stories/main/RadioButton/RadioButton.stories.ts +++ b/packages/playground/_stories/main/RadioButton/RadioButton.stories.ts @@ -1,23 +1,15 @@ import { html } from "lit"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; -import { DocsPage } from "../../../.storybook/docs"; import type RadioButton from "@ui5/webcomponents/dist/RadioButton.js"; import { ifDefined } from "lit/directives/if-defined.js"; import WrappingType from "@ui5/webcomponents/dist/types/WrappingType.js"; -const component = "ui5-radio-button"; - export default { title: "Main/Radio Button", component: "RadioButton", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<RadioButton>; diff --git a/packages/playground/_stories/main/RangeSlider/RangeSlider.stories.ts b/packages/playground/_stories/main/RangeSlider/RangeSlider.stories.ts index 40e60f84b9c0..0e0582593254 100644 --- a/packages/playground/_stories/main/RangeSlider/RangeSlider.stories.ts +++ b/packages/playground/_stories/main/RangeSlider/RangeSlider.stories.ts @@ -1,25 +1,15 @@ import { html } from "lit"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type RangeSlider from "@ui5/webcomponents/dist/RangeSlider.js"; import { ifDefined } from "lit/directives/if-defined.js"; -const component = "ui5-range-slider"; - export default { title: "Main/Range Slider", component: "RangeSlider", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<RangeSlider>; diff --git a/packages/playground/_stories/main/RatingIndicator/RatingIndicator.stories.ts b/packages/playground/_stories/main/RatingIndicator/RatingIndicator.stories.ts index c68ba7302e3b..85a717e6571c 100644 --- a/packages/playground/_stories/main/RatingIndicator/RatingIndicator.stories.ts +++ b/packages/playground/_stories/main/RatingIndicator/RatingIndicator.stories.ts @@ -2,25 +2,15 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type RatingIndicator from "@ui5/webcomponents/dist/RatingIndicator.js"; - -const component = "ui5-rating-indicator"; let index = 0; export default { title: "Main/Rating Indicator", component: "RatingIndicator", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<RatingIndicator>; diff --git a/packages/playground/_stories/main/ResponsivePopover/ResponsivePopover.stories.ts b/packages/playground/_stories/main/ResponsivePopover/ResponsivePopover.stories.ts index cbcef3853918..25f290ab6b0b 100644 --- a/packages/playground/_stories/main/ResponsivePopover/ResponsivePopover.stories.ts +++ b/packages/playground/_stories/main/ResponsivePopover/ResponsivePopover.stories.ts @@ -2,20 +2,16 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; -import { DocsPage } from "../../../.storybook/docs"; import type ResponsivePopover from "@ui5/webcomponents/dist/ResponsivePopover.js"; -const component = "ui5-responsive-popover"; - export default { title: "Main/Responsive Popover", component: "ResponsivePopover", parameters: { docs: { - page: DocsPage({ ...componentInfo, component }), story: { inline: false, iframeHeight: "700px", diff --git a/packages/playground/_stories/main/SegmentedButton/SegmentedButton.stories.ts b/packages/playground/_stories/main/SegmentedButton/SegmentedButton.stories.ts index 4054444fbded..84456c5e00a0 100644 --- a/packages/playground/_stories/main/SegmentedButton/SegmentedButton.stories.ts +++ b/packages/playground/_stories/main/SegmentedButton/SegmentedButton.stories.ts @@ -3,24 +3,14 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type SegmentedButton from "@ui5/webcomponents/dist/SegmentedButton.js"; -const component = "ui5-segmented-button"; - export default { title: "Main/Segmented Button", component: "SegmentedButton", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<SegmentedButton>; diff --git a/packages/playground/_stories/main/SegmentedButton/SegmentedButtonItem/SegmentedButtonItem.stories.ts b/packages/playground/_stories/main/SegmentedButton/SegmentedButtonItem/SegmentedButtonItem.stories.ts index 44c4ff62f0b3..f8f329c1bbc0 100644 --- a/packages/playground/_stories/main/SegmentedButton/SegmentedButtonItem/SegmentedButtonItem.stories.ts +++ b/packages/playground/_stories/main/SegmentedButton/SegmentedButtonItem/SegmentedButtonItem.stories.ts @@ -3,24 +3,15 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - import type SegmentedButtonItem from "@ui5/webcomponents/dist/SegmentedButtonItem.js"; -const component = "ui5-segmented-button-item"; - export default { title: "Main/Segmented Button/Segmented Button Item", component: "SegmentedButtonItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<SegmentedButtonItem>; diff --git a/packages/playground/_stories/main/Select/Option/Option.stories.ts b/packages/playground/_stories/main/Select/Option/Option.stories.ts index 67ee62824c36..0118a1137afd 100644 --- a/packages/playground/_stories/main/Select/Option/Option.stories.ts +++ b/packages/playground/_stories/main/Select/Option/Option.stories.ts @@ -5,23 +5,15 @@ import type { Meta } from "@storybook/web-components"; import type Option from "@ui5/webcomponents/dist/Option.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - -const component = "ui5-option"; - export default { title: "Main/Select/Option", component: "Option", argTypes, - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, + } as Meta<Option>; const Template: UI5StoryArgs<Option, StoryArgsSlots> = (args) => { diff --git a/packages/playground/_stories/main/Select/Select.stories.ts b/packages/playground/_stories/main/Select/Select.stories.ts index 99ff936cd256..902581437d60 100644 --- a/packages/playground/_stories/main/Select/Select.stories.ts +++ b/packages/playground/_stories/main/Select/Select.stories.ts @@ -5,23 +5,13 @@ import type { StoryFn, Meta } from "@storybook/web-components"; import type Select from "@ui5/webcomponents/dist/Select.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - -const component = "ui5-select"; - export default { title: "Main/Select", component: "Select", argTypes, - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, } as Meta<Select>; const Template: UI5StoryArgs<Select, StoryArgsSlots> = (args) => { diff --git a/packages/playground/_stories/main/Select/SelectMenu/SelectMenu.stories.ts b/packages/playground/_stories/main/Select/SelectMenu/SelectMenu.stories.ts index e385877b684e..41aea576fd71 100644 --- a/packages/playground/_stories/main/Select/SelectMenu/SelectMenu.stories.ts +++ b/packages/playground/_stories/main/Select/SelectMenu/SelectMenu.stories.ts @@ -4,23 +4,15 @@ import type { Meta } from "@storybook/web-components"; import type SelectMenu from "@ui5/webcomponents/dist/SelectMenu.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - -const component = "ui5-select-menu"; - export default { title: "Main/Select/Select Menu", component: "SelectMenu", argTypes, - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, + } as Meta<SelectMenu>; const Template: UI5StoryArgs<SelectMenu, StoryArgsSlots> = (args) => { diff --git a/packages/playground/_stories/main/Select/SelectMenuOption/SelectMenuOption.stories.ts b/packages/playground/_stories/main/Select/SelectMenuOption/SelectMenuOption.stories.ts index b7c3c7545730..1d3be8bef932 100644 --- a/packages/playground/_stories/main/Select/SelectMenuOption/SelectMenuOption.stories.ts +++ b/packages/playground/_stories/main/Select/SelectMenuOption/SelectMenuOption.stories.ts @@ -5,23 +5,15 @@ import type { Meta } from "@storybook/web-components"; import type SelectMenuOption from "@ui5/webcomponents/dist/SelectMenuOption.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - -const component = "ui5-select-menu-option"; - export default { title: "Main/Select/Select Menu Option", component: "SelectMenuOption", argTypes, - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, + } as Meta<SelectMenuOption>; const Template: UI5StoryArgs<SelectMenuOption, StoryArgsSlots> = (args) => { diff --git a/packages/playground/_stories/main/Slider/Slider.stories.ts b/packages/playground/_stories/main/Slider/Slider.stories.ts index 5efbc9fa3c28..f17ea04f9c5e 100644 --- a/packages/playground/_stories/main/Slider/Slider.stories.ts +++ b/packages/playground/_stories/main/Slider/Slider.stories.ts @@ -1,25 +1,15 @@ import { html } from "lit"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type Slider from "@ui5/webcomponents/dist/Slider.js"; import { ifDefined } from "lit/directives/if-defined.js"; -const component = "ui5-slider"; - export default { title: "Main/Slider", component: "Slider", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Slider>; diff --git a/packages/playground/_stories/main/SplitButton/SplitButton.stories.ts b/packages/playground/_stories/main/SplitButton/SplitButton.stories.ts index e383cf93047e..84556009227b 100644 --- a/packages/playground/_stories/main/SplitButton/SplitButton.stories.ts +++ b/packages/playground/_stories/main/SplitButton/SplitButton.stories.ts @@ -3,26 +3,16 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type SplitButton from "@ui5/webcomponents/dist/SplitButton.js"; import ButtonDesign from "@ui5/webcomponents/dist/types/ButtonDesign.js"; -const component = "ui5-split-button"; - export default { title: "Main/SplitButton", component: "SplitButton", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, -}, -argTypes, + argTypes, } as Meta<SplitButton>; const Template: UI5StoryArgs<SplitButton, StoryArgsSlots> = (args) => html`<ui5-split-button diff --git a/packages/playground/_stories/main/StepInput/StepInput.stories.ts b/packages/playground/_stories/main/StepInput/StepInput.stories.ts index 72260c008946..7ec76ce59711 100644 --- a/packages/playground/_stories/main/StepInput/StepInput.stories.ts +++ b/packages/playground/_stories/main/StepInput/StepInput.stories.ts @@ -3,24 +3,14 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type StepInput from "@ui5/webcomponents/dist/StepInput.js"; -const component = "ui5-step-input"; - export default { title: "Main/StepInput", component: "StepInput", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<StepInput>; diff --git a/packages/playground/_stories/main/Switch/Switch.stories.ts b/packages/playground/_stories/main/Switch/Switch.stories.ts index f5bd859e8371..00ea273cc6c8 100644 --- a/packages/playground/_stories/main/Switch/Switch.stories.ts +++ b/packages/playground/_stories/main/Switch/Switch.stories.ts @@ -2,25 +2,15 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type Switch from "@ui5/webcomponents/dist/Switch.js"; import SwitchDesign from "@ui5/webcomponents/dist/types/SwitchDesign.js"; -const component = "ui5-switch"; - export default { title: "Main/Switch", component: "Switch", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Switch>; diff --git a/packages/playground/_stories/main/TabContainer/Tab/Tab.stories.ts b/packages/playground/_stories/main/TabContainer/Tab/Tab.stories.ts index bdef00ce1af7..ae383dab76b3 100644 --- a/packages/playground/_stories/main/TabContainer/Tab/Tab.stories.ts +++ b/packages/playground/_stories/main/TabContainer/Tab/Tab.stories.ts @@ -2,23 +2,15 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; import type Tab from "@ui5/webcomponents/dist/Tab.js"; import TabLayout from "@ui5/webcomponents/dist/types/TabLayout.js"; -const component = "ui5-tab"; - export default { title: "Main/Tab Container/Tab", component: "Tab", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<Tab>; diff --git a/packages/playground/_stories/main/TabContainer/TabContainer.stories.ts b/packages/playground/_stories/main/TabContainer/TabContainer.stories.ts index 7494b3a0b11e..2c9c664d15ea 100644 --- a/packages/playground/_stories/main/TabContainer/TabContainer.stories.ts +++ b/packages/playground/_stories/main/TabContainer/TabContainer.stories.ts @@ -2,23 +2,15 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; -import { DocsPage } from "../../../.storybook/docs"; import type TabContainer from "@ui5/webcomponents/dist/TabContainer.js"; import TabLayout from "@ui5/webcomponents/dist/types/TabLayout.js"; -const component = "ui5-tabcontainer"; - export default { title: "Main/Tab Container", component: "TabContainer", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<TabContainer>; diff --git a/packages/playground/_stories/main/TabContainer/TabSeparator/TabSeparator.stories.ts b/packages/playground/_stories/main/TabContainer/TabSeparator/TabSeparator.stories.ts index 180dc47b41d1..ed505457eaaf 100644 --- a/packages/playground/_stories/main/TabContainer/TabSeparator/TabSeparator.stories.ts +++ b/packages/playground/_stories/main/TabContainer/TabSeparator/TabSeparator.stories.ts @@ -2,22 +2,14 @@ import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; import type TabSeparator from "@ui5/webcomponents/dist/TabSeparator.js"; -const component = "ui5-tab-separator"; - export default { title: "Main/Tab Container/Tab Separator", component: "TabSeparator", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<TabSeparator>; diff --git a/packages/playground/_stories/main/Table/Table.stories.ts b/packages/playground/_stories/main/Table/Table.stories.ts index ab4b736303aa..4e397e951270 100644 --- a/packages/playground/_stories/main/Table/Table.stories.ts +++ b/packages/playground/_stories/main/Table/Table.stories.ts @@ -1,30 +1,20 @@ import { html } from "lit"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type Table from "@ui5/webcomponents/dist/Table.js"; import { ifDefined } from "lit-html/directives/if-defined.js"; import { unsafeHTML } from "lit-html/directives/unsafe-html.js"; import TableMode from "@ui5/webcomponents/dist/types/TableMode.js"; import TableGrowingMode from "@ui5/webcomponents/dist/types/TableGrowingMode.js"; - -const component = "ui5-table"; let index = 0; export default { title: "Main/Table", component: "Table", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Table>; diff --git a/packages/playground/_stories/main/Table/TableCell/TableCell.stories.ts b/packages/playground/_stories/main/Table/TableCell/TableCell.stories.ts index 91d692068786..c68bf61d65d8 100644 --- a/packages/playground/_stories/main/Table/TableCell/TableCell.stories.ts +++ b/packages/playground/_stories/main/Table/TableCell/TableCell.stories.ts @@ -1,25 +1,16 @@ import { html } from "lit"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - import type TableCell from "@ui5/webcomponents/dist/TableCell.js"; import { unsafeHTML } from "lit-html/directives/unsafe-html.js"; -const component = "ui5-table"; - export default { title: "Main/Table/Table Cell", component: "TableCell", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<TableCell>; diff --git a/packages/playground/_stories/main/Table/TableColumn/TableColumn.stories.ts b/packages/playground/_stories/main/Table/TableColumn/TableColumn.stories.ts index 354d779c3d44..2c6ec4572f7c 100644 --- a/packages/playground/_stories/main/Table/TableColumn/TableColumn.stories.ts +++ b/packages/playground/_stories/main/Table/TableColumn/TableColumn.stories.ts @@ -1,26 +1,17 @@ import { html } from "lit"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - import type TableColumn from "@ui5/webcomponents/dist/TableColumn.js"; import { ifDefined } from "lit-html/directives/if-defined.js"; import { unsafeHTML } from "lit-html/directives/unsafe-html.js"; -const component = "ui5-table-column"; - export default { title: "Main/Table/Table Column", component: "TableColumn", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<TableColumn>; diff --git a/packages/playground/_stories/main/Table/TableGroupRow/TableGroupRow.stories.ts b/packages/playground/_stories/main/Table/TableGroupRow/TableGroupRow.stories.ts index d31197d36678..aaddd55c9833 100644 --- a/packages/playground/_stories/main/Table/TableGroupRow/TableGroupRow.stories.ts +++ b/packages/playground/_stories/main/Table/TableGroupRow/TableGroupRow.stories.ts @@ -1,26 +1,17 @@ import { html } from "lit"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - import type TableGroupRow from "@ui5/webcomponents/dist/TableGroupRow.js"; import { unsafeHTML } from "lit-html/directives/unsafe-html.js"; - -const component = "ui5-table-group-row"; let index = 0; export default { title: "Main/Table/Table Group Row", component: "TableGroupRow", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<TableGroupRow>; diff --git a/packages/playground/_stories/main/Table/TableRow/TableRow.stories.ts b/packages/playground/_stories/main/Table/TableRow/TableRow.stories.ts index eaa7135e5330..f30473f875d2 100644 --- a/packages/playground/_stories/main/Table/TableRow/TableRow.stories.ts +++ b/packages/playground/_stories/main/Table/TableRow/TableRow.stories.ts @@ -1,26 +1,17 @@ import { html } from "lit"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - import type TableRow from "@ui5/webcomponents/dist/TableRow.js"; import { ifDefined } from "lit-html/directives/if-defined.js"; import { unsafeHTML } from "lit-html/directives/unsafe-html.js"; -const component = "ui5-table-row"; - export default { title: "Main/Table/Table Row", component: "TableRow", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, argTypes, } as Meta<TableRow>; diff --git a/packages/playground/_stories/main/TextArea/TextArea.stories.ts b/packages/playground/_stories/main/TextArea/TextArea.stories.ts index d17a78656a9d..1cfce54efb6f 100644 --- a/packages/playground/_stories/main/TextArea/TextArea.stories.ts +++ b/packages/playground/_stories/main/TextArea/TextArea.stories.ts @@ -4,25 +4,15 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type TextArea from "@ui5/webcomponents/dist/TextArea.js"; - -const component = "ui5-textarea"; let index = 0; export default { title: "Main/Text Area", component: "TextArea", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<TextArea>; diff --git a/packages/playground/_stories/main/TimePicker/TimePicker.stories.ts b/packages/playground/_stories/main/TimePicker/TimePicker.stories.ts index 0eaf5447d560..e52174d0696d 100644 --- a/packages/playground/_stories/main/TimePicker/TimePicker.stories.ts +++ b/packages/playground/_stories/main/TimePicker/TimePicker.stories.ts @@ -3,25 +3,15 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type TimePicker from "@ui5/webcomponents/dist/TimePicker.js"; import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js"; -const component = "ui5-time-picker"; - export default { title: "Main/TimePicker", component: "TimePicker", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<TimePicker>; diff --git a/packages/playground/_stories/main/Title/Title.stories.ts b/packages/playground/_stories/main/Title/Title.stories.ts index e6cc57f10778..70974a6f7a64 100644 --- a/packages/playground/_stories/main/Title/Title.stories.ts +++ b/packages/playground/_stories/main/Title/Title.stories.ts @@ -1,25 +1,17 @@ import { html } from "lit"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; -import { DocsPage } from "../../../.storybook/docs"; import type Title from "@ui5/webcomponents/dist/Title.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; import TitleLevel from "@ui5/webcomponents/dist/types/TitleLevel.js"; import WrappingType from "@ui5/webcomponents/dist/types/WrappingType.js"; -const component = "ui5-title"; - export default { title: "Main/Title", component: "Title", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Title>; diff --git a/packages/playground/_stories/main/Toast/Toast.stories.ts b/packages/playground/_stories/main/Toast/Toast.stories.ts index 83d278f1ffa8..2d9b3f9cd872 100644 --- a/packages/playground/_stories/main/Toast/Toast.stories.ts +++ b/packages/playground/_stories/main/Toast/Toast.stories.ts @@ -3,26 +3,16 @@ import { ifDefined } from "lit/directives/if-defined.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; import ToastPlacement from "@ui5/webcomponents/dist/types/ToastPlacement.js"; - -import { DocsPage } from "../../../.storybook/docs"; - // @ts-ignore import type Toast from "@ui5/webcomponents/dist/Toast.js"; -const component = "ui5-toast"; - export default { title: "Main/Toast", component: "Toast", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<Toast>; diff --git a/packages/playground/_stories/main/ToggleButton/ToggleButton.stories.ts b/packages/playground/_stories/main/ToggleButton/ToggleButton.stories.ts index 2c8cff3d14e1..2e370464822a 100644 --- a/packages/playground/_stories/main/ToggleButton/ToggleButton.stories.ts +++ b/packages/playground/_stories/main/ToggleButton/ToggleButton.stories.ts @@ -3,25 +3,15 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { ifDefined } from "lit/directives/if-defined.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type ToggleButton from "@ui5/webcomponents/dist/ToggleButton.js"; import ButtonDesign from "@ui5/webcomponents/dist/types/ButtonDesign.js"; -const component = "ui5-toggle-button"; - export default { title: "Main/ToggleButton", component: "ToggleButton", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, argTypes, } as Meta<ToggleButton>; diff --git a/packages/playground/_stories/main/Toolbar/Toolbar.stories.ts b/packages/playground/_stories/main/Toolbar/Toolbar.stories.ts index 399e63dfe50d..962e69ff1f45 100644 --- a/packages/playground/_stories/main/Toolbar/Toolbar.stories.ts +++ b/packages/playground/_stories/main/Toolbar/Toolbar.stories.ts @@ -6,24 +6,15 @@ import type { Meta, StoryFn } from "@storybook/web-components"; import type Toolbar from "@ui5/webcomponents/dist/Toolbar.js"; import ToolbarAlign from "@ui5/webcomponents/dist/types/ToolbarAlign.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; import TemplateToolbarTypes from "./TemplateToolbarTypes.js"; -const component = "ui5-toolbar"; - export default { title: "Main/Toolbar", component: "Toolbar", argTypes, - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }) - }, - }, } as Meta<Toolbar>; const Template: UI5StoryArgs<Toolbar, StoryArgsSlots> = (args) => { diff --git a/packages/playground/_stories/main/Toolbar/ToolbarButton/ToolbarButton.stories.ts b/packages/playground/_stories/main/Toolbar/ToolbarButton/ToolbarButton.stories.ts index e480a8360635..3d090ffbd1c6 100644 --- a/packages/playground/_stories/main/Toolbar/ToolbarButton/ToolbarButton.stories.ts +++ b/packages/playground/_stories/main/Toolbar/ToolbarButton/ToolbarButton.stories.ts @@ -5,23 +5,14 @@ import type { Meta } from "@storybook/web-components"; import type ToolbarButton from "@ui5/webcomponents/dist/ToolbarButton.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - -const component = "ui5-toolbar-button"; - export default { title: "Main/Toolbar/Toolbar Button", component: "ToolbarButton", argTypes, - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, } as Meta<ToolbarButton>; const Template: UI5StoryArgs<ToolbarButton, StoryArgsSlots> = (args) => { diff --git a/packages/playground/_stories/main/Toolbar/ToolbarSelect/ToolbarSelect.stories.ts b/packages/playground/_stories/main/Toolbar/ToolbarSelect/ToolbarSelect.stories.ts index a62c5661eded..823b8112714d 100644 --- a/packages/playground/_stories/main/Toolbar/ToolbarSelect/ToolbarSelect.stories.ts +++ b/packages/playground/_stories/main/Toolbar/ToolbarSelect/ToolbarSelect.stories.ts @@ -5,23 +5,14 @@ import type { Meta } from "@storybook/web-components"; import type ToolbarSelect from "@ui5/webcomponents/dist/ToolbarSelect.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - -const component = "ui5-toolbar-select"; - export default { title: "Main/Toolbar/Toolbar Select", component: "ToolbarSelect", argTypes, - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, } as Meta<ToolbarSelect>; const Template: UI5StoryArgs<ToolbarSelect, StoryArgsSlots> = (args) => { diff --git a/packages/playground/_stories/main/Toolbar/ToolbarSelectOption/ToolbarSelectOption.stories.ts b/packages/playground/_stories/main/Toolbar/ToolbarSelectOption/ToolbarSelectOption.stories.ts index cc78606ef1fc..108950ba97d8 100644 --- a/packages/playground/_stories/main/Toolbar/ToolbarSelectOption/ToolbarSelectOption.stories.ts +++ b/packages/playground/_stories/main/Toolbar/ToolbarSelectOption/ToolbarSelectOption.stories.ts @@ -5,23 +5,14 @@ import type { Meta } from "@storybook/web-components"; import type ToolbarSelectOption from "@ui5/webcomponents/dist/ToolbarSelectOption.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - -const component = "ui5-toolbar-select-option"; - export default { title: "Main/Toolbar/Toolbar Select Option", component: "ToolbarSelectOption", argTypes, - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, } as Meta<ToolbarSelectOption>; const Template: UI5StoryArgs<ToolbarSelectOption, StoryArgsSlots> = (args) => { diff --git a/packages/playground/_stories/main/Toolbar/ToolbarSeparator/ToolbarSeparator.stories.ts b/packages/playground/_stories/main/Toolbar/ToolbarSeparator/ToolbarSeparator.stories.ts index 2b7731274300..10ff69237340 100644 --- a/packages/playground/_stories/main/Toolbar/ToolbarSeparator/ToolbarSeparator.stories.ts +++ b/packages/playground/_stories/main/Toolbar/ToolbarSeparator/ToolbarSeparator.stories.ts @@ -5,23 +5,14 @@ import type { Meta } from "@storybook/web-components"; import type ToolbarSeparator from "@ui5/webcomponents/dist/ToolbarSeparator.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - -const component = "ui5-toolbar-separator"; - export default { title: "Main/Toolbar/Toolbar Separator", component: "ToolbarSeparator", argTypes, - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, } as Meta<ToolbarSeparator>; const Template: UI5StoryArgs<ToolbarSeparator, StoryArgsSlots> = (args) => { diff --git a/packages/playground/_stories/main/Toolbar/ToolbarSpacer/ToolbarSpacer.stories.ts b/packages/playground/_stories/main/Toolbar/ToolbarSpacer/ToolbarSpacer.stories.ts index b181c7c2973b..bd6388a3d43c 100644 --- a/packages/playground/_stories/main/Toolbar/ToolbarSpacer/ToolbarSpacer.stories.ts +++ b/packages/playground/_stories/main/Toolbar/ToolbarSpacer/ToolbarSpacer.stories.ts @@ -5,23 +5,14 @@ import type { Meta } from "@storybook/web-components"; import type ToolbarSpacer from "@ui5/webcomponents/dist/ToolbarSpacer.js"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs.js"; - -const component = "ui5-toolbar-spacer"; - export default { title: "Main/Toolbar/Toolbar Spacer", component: "ToolbarSpacer", argTypes, - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }) - }, - }, } as Meta<ToolbarSpacer>; const Template: UI5StoryArgs<ToolbarSpacer, StoryArgsSlots> = (args) => { diff --git a/packages/playground/_stories/main/Tree/Tree.stories.ts b/packages/playground/_stories/main/Tree/Tree.stories.ts index d8b14e3d6aca..9fc7160da71e 100644 --- a/packages/playground/_stories/main/Tree/Tree.stories.ts +++ b/packages/playground/_stories/main/Tree/Tree.stories.ts @@ -2,25 +2,15 @@ import { html } from "lit"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta, StoryFn } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../types.js"; - -import { DocsPage } from "../../../.storybook/docs"; - import type Tree from "@ui5/webcomponents/dist/Tree.js"; import { ifDefined } from "lit/directives/if-defined.js"; -const component = "ui5-tree"; - export default { title: "Main/Tree", component: "Tree", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component }), - }, - }, argTypes, } as Meta<Tree>; diff --git a/packages/playground/_stories/main/Tree/TreeItem/TreeItem.stories.ts b/packages/playground/_stories/main/Tree/TreeItem/TreeItem.stories.ts index 4037a12d10c2..6a956e2825b5 100644 --- a/packages/playground/_stories/main/Tree/TreeItem/TreeItem.stories.ts +++ b/packages/playground/_stories/main/Tree/TreeItem/TreeItem.stories.ts @@ -2,25 +2,16 @@ import { html } from "lit"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - import type TreeItem from "@ui5/webcomponents/dist/TreeItem.js"; import { ifDefined } from "lit/directives/if-defined.js"; -const component = "ui5-tree-item"; - export default { title: "Main/Tree/Tree Item", component: "TreeItem", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }), - }, - }, argTypes, } as Meta<TreeItem>; diff --git a/packages/playground/_stories/main/Tree/TreeItemCustom/TreeItemCustom.stories.ts b/packages/playground/_stories/main/Tree/TreeItemCustom/TreeItemCustom.stories.ts index 4d5a53b463c2..d76faa5a1aaa 100644 --- a/packages/playground/_stories/main/Tree/TreeItemCustom/TreeItemCustom.stories.ts +++ b/packages/playground/_stories/main/Tree/TreeItemCustom/TreeItemCustom.stories.ts @@ -2,25 +2,16 @@ import { html } from "lit"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; import type { Meta } from "@storybook/web-components"; -import argTypes, { componentInfo } from "./argTypes.js"; +import argTypes from "./argTypes.js"; import type { StoryArgsSlots } from "./argTypes.js"; import type { UI5StoryArgs } from "../../../../types.js"; -import { DocsPage } from "../../../../.storybook/docs"; - import type TreeItemCustom from "@ui5/webcomponents/dist/TreeItemCustom.js"; import { ifDefined } from "lit/directives/if-defined.js"; -const component = "ui5-tree-item-custom"; - export default { title: "Main/Tree/Tree Item Custom", component: "TreeItemCustom", - parameters: { - docs: { - page: DocsPage({ ...componentInfo, component, showDefaultStoryOnly: true }), - }, - }, argTypes, } as Meta<TreeItemCustom>; diff --git a/packages/playground/build-scripts-storybook/overviews-prepare.ts b/packages/playground/build-scripts-storybook/overviews-prepare.ts new file mode 100644 index 000000000000..237834ba5113 --- /dev/null +++ b/packages/playground/build-scripts-storybook/overviews-prepare.ts @@ -0,0 +1,80 @@ +// the following script goes through all the stories in the _stories folder and generates the {ComponentName}Overview.mdx file + + +import fs from 'fs/promises'; +import path from 'path'; + +const STORIES_ROOT_FOLDER_NAME = '../_stories'; + +// Function to split camel case string +const splitCamelCase = (str: string) => str.replace(/([a-z0-9])([A-Z])/g, '$1 $2'); + +// Function to generate file content +const fileContent = (component: string) => `import { Meta } from "@storybook/blocks"; +import * as ComponentStories from "./${component}.stories.ts"; + +import { componentInfo } from "./argTypes.ts"; + +import { Footer } from "@sb/components/footer/Footer.tsx"; +import { + Title, + Subtitle, + Description, + Primary, + ArgsTable, + Stories, + PRIMARY_STORY, +} from "@storybook/addon-docs"; + +<Meta name="${splitCamelCase(component)} Overview" of={ComponentStories} /> + +<header> + <span className="sb-ui5-title"> + <Title /> + </span> + {componentInfo.since && ( + <span className="sb-ui5-component-heading-since"> + <b>v{componentInfo.since}</b> + </span> + )} +</header> +<div className="sb-ui5-component-package"> + <b>{componentInfo.package}</b> +</div> +<h2 className="sb-ui5-control-tag"><{componentInfo.tagName}></h2> +<Subtitle /> +<Description /> +<br /> +<Primary /> +<ArgsTable story={PRIMARY_STORY} /> +{!componentInfo.showDefaultStoryOnly && <Stories />} +<Footer /> +`; + +// Recursive function to process each directory +const processDirectory = async (dirPath: string) => { + const entries = await fs.readdir(dirPath, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(dirPath, entry.name); + if (entry.isDirectory()) { + // If the entry is a directory, process it + await processDirectory(fullPath); + } else if (entry.isFile() && entry.name.endsWith('.stories.ts')) { + // If the entry is a file and matches the criteria, generate overview file + const componentName = entry.name.replace('.stories.ts', ''); + await fs.writeFile(path.join(dirPath, `${componentName}Overview.mdx`), fileContent(componentName)); + // remove old files if exist + await fs.rm(path.join(dirPath, `01-${componentName}Overview.mdx`), { force: true }); + console.log(`Generated ${componentName}Overview.mdx`); + } + } +}; + +// Initial call to process the root stories directory +const main = async () => { + const rootDir = path.join(__dirname, STORIES_ROOT_FOLDER_NAME); + await processDirectory(rootDir); +}; + +main(); diff --git a/packages/playground/build-scripts-storybook/samples-prepare.ts b/packages/playground/build-scripts-storybook/samples-prepare.ts index 3900041815b6..7e5d7a902db4 100644 --- a/packages/playground/build-scripts-storybook/samples-prepare.ts +++ b/packages/playground/build-scripts-storybook/samples-prepare.ts @@ -52,6 +52,7 @@ type APIData = { info: { package: string; since: string | undefined; + tagName?: string; }; slotNames: Array<string>; storyArgsTypes: string; @@ -80,7 +81,7 @@ const main = async () => { const subComponentStats = await fs.stat(subComponentPath); if (subComponentStats.isDirectory()) { - generateStoryDoc(subComponentPath, subComponent, api, currPackage); + generateStoryDoc(subComponentPath, subComponent, api, currPackage, true); } })) @@ -91,7 +92,7 @@ const main = async () => { } }; -const generateStoryDoc = async (componentPath: string, component: string, api: Package, componentPackage: string) => { +const generateStoryDoc = async (componentPath: string, component: string, api: Package, componentPackage: string, isSubComponent?: boolean) => { console.log(`Generating argTypes for story ${component}`); const apiData = getAPIData(api, component, componentPackage); @@ -100,9 +101,13 @@ const generateStoryDoc = async (componentPath: string, component: string, api: P } const { storyArgsTypes, slotNames, info } = apiData; + const componentInfo = { + ...info, + showDefaultStoryOnly: isSubComponent + } await fs.writeFile(componentPath + '/argTypes.ts', `export default ${storyArgsTypes}; -export const componentInfo = ${JSON.stringify(info, null, 4)}; +export const componentInfo = ${JSON.stringify(componentInfo, null, 4)}; export type StoryArgsSlots = { ${slotNames.map(slotName => `${slotName}: string;`).join('\n ')} }`); @@ -111,7 +116,8 @@ export type StoryArgsSlots = { const getAPIData = (api: Package, module: string, componentPackage: string): APIData | undefined => { const moduleAPI = api.modules?.find(currModule => currModule.declarations?.find(s => s.name === module && s._ui5package === `@ui5/webcomponents${componentPackage !== 'main' ? `-${componentPackage}` : ''}`)); const declaration = moduleAPI?.declarations?.find(s => s.name === module && s._ui5package === `@ui5/webcomponents${componentPackage !== 'main' ? `-${componentPackage}` : ''}`); - + const exportedAs = moduleAPI?.exports?.find(s => s.kind === "custom-element-definition"); + if (!declaration) { return; } @@ -121,7 +127,8 @@ const getAPIData = (api: Package, module: string, componentPackage: string): API return { info: { package: `@ui5/webcomponents${componentPackage !== 'main' ? `-${componentPackage}` : ''}`, - since: (declaration as CustomElementDeclaration)?._ui5since + since: (declaration as CustomElementDeclaration)?._ui5since, + tagName: exportedAs?.name }, slotNames: data.slotNames, storyArgsTypes: JSON.stringify(data.args, null, "\t") diff --git a/packages/playground/package.json b/packages/playground/package.json index 84ea98e591b3..32eb9cae1d23 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -1,7 +1,7 @@ { "name": "@ui5/webcomponents-playground", "private": true, - "version": "1.22.0-rc.1", + "version": "1.22.0", "description": "UI5 Web Components Playground", "author": "SAP SE (https://www.sap.com)", "license": "Apache-2.0", @@ -54,6 +54,7 @@ "prepare:samples": "vite-node ./build-scripts-storybook/samples-prepare.ts", "prepare:manifest": "node ./build-scripts-storybook/parse-manifest.js", "prepare:documentation": "vite-node ./build-scripts-storybook/documentation-prepare.ts", + "prepare:overviews": "vite-node ./build-scripts-storybook/overviews-prepare.ts", "storybook": "npm-run-all --parallel prepare:* && storybook dev -p 6006", "build-storybook": "npm-run-all --parallel prepare:build:* prepare:* && tsc && storybook build -o ./dist/playground", "build-sitemap": "vite-node ./build-scripts-storybook/sitemap-prepare.ts" diff --git a/packages/theming/CHANGELOG.md b/packages/theming/CHANGELOG.md index ca52945e2912..9f4f98c16cf6 100644 --- a/packages/theming/CHANGELOG.md +++ b/packages/theming/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.22.0](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.3...v1.22.0) (2024-02-05) + +**Note:** Version bump only for package @ui5/webcomponents-theming + + + + + +# [1.22.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.2...v1.22.0-rc.3) (2024-02-01) + + +### Bug Fixes + +* release build ([#8222](https://github.com/SAP/ui5-webcomponents/issues/8222)) ([27042ac](https://github.com/SAP/ui5-webcomponents/commit/27042ac90443dea8d5900d1c5bfa5bc93d365da0)) + + + + + +# [1.22.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.1...v1.22.0-rc.2) (2024-01-25) + +**Note:** Version bump only for package @ui5/webcomponents-theming + + + + + # [1.22.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.0...v1.22.0-rc.1) (2024-01-18) **Note:** Version bump only for package @ui5/webcomponents-theming diff --git a/packages/theming/package.json b/packages/theming/package.json index 052e5ef1399d..71541a9db2d3 100644 --- a/packages/theming/package.json +++ b/packages/theming/package.json @@ -1,6 +1,6 @@ { "name": "@ui5/webcomponents-theming", - "version": "1.22.0-rc.1", + "version": "1.22.0", "description": "UI5 Web Components: webcomponents.theming", "author": "SAP SE (https://www.sap.com)", "license": "Apache-2.0", @@ -22,7 +22,7 @@ "generate": "nps generate", "start": "nps start", "verify": "node ./lib/verify-vars/index.js", - "prepublishOnly": "tsc" + "prepublishOnly": "tsc -b" }, "repository": { "type": "git", @@ -31,10 +31,10 @@ }, "dependencies": { "@sap-theming/theming-base-content": "11.10.0", - "@ui5/webcomponents-base": "1.22.0-rc.1" + "@ui5/webcomponents-base": "1.22.0" }, "devDependencies": { - "@ui5/webcomponents-tools": "1.22.0-rc.1", + "@ui5/webcomponents-tools": "1.22.0", "globby": "^13.1.1", "json-beautify": "^1.1.1", "nps": "^5.10.0", diff --git a/packages/tools/CHANGELOG.md b/packages/tools/CHANGELOG.md index 2865790a2336..aa83bceda2c1 100644 --- a/packages/tools/CHANGELOG.md +++ b/packages/tools/CHANGELOG.md @@ -3,6 +3,30 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.22.0](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.3...v1.22.0) (2024-02-05) + +**Note:** Version bump only for package @ui5/webcomponents-tools + + + + + +# [1.22.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.2...v1.22.0-rc.3) (2024-02-01) + +**Note:** Version bump only for package @ui5/webcomponents-tools + + + + + +# [1.22.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.1...v1.22.0-rc.2) (2024-01-25) + +**Note:** Version bump only for package @ui5/webcomponents-tools + + + + + # [1.22.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.0...v1.22.0-rc.1) (2024-01-18) diff --git a/packages/tools/components-package/nps.js b/packages/tools/components-package/nps.js index f186ebea01ea..ac0e2f2a2a1a 100644 --- a/packages/tools/components-package/nps.js +++ b/packages/tools/components-package/nps.js @@ -135,13 +135,13 @@ const getScripts = (options) => { bundle: `node ${LIB}/dev-server/dev-server.js ${viteConfig}`, }, generateAPI: { - default: `nps ${ tsOption ? "generateAPI.generateCEM generateAPI.validateCEM" : "generateAPI.prepare generateAPI.preprocess generateAPI.jsdoc generateAPI.cleanup generateAPI.prepareManifest"}`, + default: `nps ${ tsOption ? "generateAPI.generateCEM generateAPI.validateCEM" : "generateAPI.prepare generateAPI.preprocess generateAPI.jsdoc generateAPI.cleanup generateAPI.prepareManifest generateAPI.validateCEM"}`, generateCEM: `cem analyze --config "${LIB}/cem/custom-elements-manifest.config.mjs" ${ options.dev ? "--dev" : "" }`, validateCEM: `node "${LIB}/cem/validate.js" ${ options.dev ? "--dev" : "" }`, prepare: `node "${LIB}/copy-and-watch/index.js" --silent "dist/**/*.js" jsdoc-dist/`, prepareManifest: `node "${LIB}/generate-custom-elements-manifest/index.js" dist dist`, preprocess: `node "${preprocessJSDocScript}" jsdoc-dist/ src`, - jsdoc: `jsdoc -c "${LIB}/jsdoc/configTypescript.json"`, + jsdoc: `jsdoc -c "${LIB}/jsdoc/config.json"`, cleanup: "rimraf jsdoc-dist/" }, }; diff --git a/packages/tools/lib/amd-to-es6/index.js b/packages/tools/lib/amd-to-es6/index.js new file mode 100644 index 000000000000..7a8930a4f06d --- /dev/null +++ b/packages/tools/lib/amd-to-es6/index.js @@ -0,0 +1,104 @@ +const fs = require("fs").promises; +const path = require("path"); +const basePath = process.argv[2]; +const babelCore = require("@babel/core"); +const babelParser = require("@babel/parser"); +const babelGenerator = require("@babel/generator").default; +const replaceAsync = require('replace-in-file'); + +const convertSAPUIDefineToDefine = async (filePath) => { + return replaceAsync({ + files: filePath, + processor: (input) => { + return input.replace("sap.ui.define", "define").replace(", /* bExport= */ false", "").replace(", /* bExport= */ true", ""); + } + }) +} + +const convertAmdToEs6 = async (code) => { + code = code.replace(/sap\.ui\.require/g, "require"); + + return (await babelCore.transformAsync(code, { + plugins: [['babel-plugin-amd-to-esm', {}]] + })).code; +} + +const convertAbsImportsToRelative = (filePath, code) => { + let changed = false; + // console.log("File processing started: ", srcPath); + + if (code.includes("import(")) { + // esprima can't parse this, but it's from the project files + return; + } + + const tree = babelParser.parse(code, { sourceType: "module" }); + const importer = filePath.replace(basePath, ""); + const importerDir = path.dirname(importer); + // console.log("Importer -> ", importer); + + tree?.program?.body?.forEach(node => { + if (node.type === "ImportDeclaration") { + let importee = node.source.value; + // console.log(importee); + if (importee.startsWith(".")) { + // add .js extension if missing + if (!importee.endsWith(".js")) { + node.source.value += ".js" + changed = true; + } + return; + } + let importeeDir = path.dirname(importee); + let importeeFile = path.basename(importee); + let relativePath = path.relative(importerDir, importeeDir); + if (relativePath.length === 0) { + relativePath = "." + } + if (!relativePath.startsWith(".")) { + relativePath = "./" + relativePath; + } + + relativePath = relativePath.replace(/\\/g, "/"); // the browser expects unix paths + let relativeImport = `${relativePath}/${importeeFile}.js`; + // console.log(importee + " --> " + relativeImport); + node.source.value = relativeImport; + changed = true; + } + }); + + return changed ? babelGenerator(tree).code : code; +} + +const replaceGlobalCoreUsage = (filePath, code) => { + if (!filePath.includes("Configuration")) { + const replaced = code.replace(/sap\.ui\.getCore\(\)/g, `Core`); + return code !== replaced ? `import Core from 'sap/ui/core/Core';${replaced}` : code; + } + + return code; +}; + +const transformAmdToES6Module = async (filePath) => { + await convertSAPUIDefineToDefine(filePath); + + let code = (await fs.readFile(filePath)).toString(); + + code = await convertAmdToEs6(code); + + code = replaceGlobalCoreUsage(filePath, code); + + code = convertAbsImportsToRelative(filePath, code); + + return fs.writeFile(filePath, code); +} + +const transformAmdToES6Modules = async () => { + const { globby } = await import("globby"); + const fileNames = await globby(basePath.replace(/\\/g, "/") + "**/*.js"); + return Promise.all(fileNames.map(transformAmdToES6Module).filter(x => !!x)); +}; + +transformAmdToES6Modules().then(() => { + console.log("Success: all amd modules are transformed to es6!"); +}); \ No newline at end of file diff --git a/packages/tools/lib/cem/custom-elements-manifest.config.mjs b/packages/tools/lib/cem/custom-elements-manifest.config.mjs index 7157e194c3a4..47e7d920599d 100644 --- a/packages/tools/lib/cem/custom-elements-manifest.config.mjs +++ b/packages/tools/lib/cem/custom-elements-manifest.config.mjs @@ -13,12 +13,13 @@ import { hasTag, findTag, findAllTags, - getJSDocErrors, getTypeRefs, normalizeDescription, formatArrays, isClass, - normalizeTagType + normalizeTagType, + logDocumentationError, + displayDocumentationErrors } from "./utils.mjs"; const packageJSON = JSON.parse(fs.readFileSync("./package.json")); @@ -165,6 +166,7 @@ function processClass(ts, classNode, moduleDoc) { if (propertyDecorator) { member._ui5validator = propertyDecorator?.expression?.arguments[0]?.properties?.find(property => ["validator", "type"].includes(property.name.text))?.initializer?.text || "String"; + member._ui5noAttribute = propertyDecorator?.expression?.arguments[0]?.properties?.find(property => property.name.text === "noAttribute")?.initializer?.kind === ts.SyntaxKind.TrueKeyword || undefined; } if (hasTag(memberParsedJsDoc, "formProperty")) { @@ -183,24 +185,14 @@ function processClass(ts, classNode, moduleDoc) { member.default = tagValue; } - if (member.privacy === "public") { - const JSDocErrors = getJSDocErrors(); - - if (!member.default) { - JSDocErrors.push( - `=== ERROR: Problem found with ${member.name}'s JSDoc comment in ${moduleDoc.path}: Default value is missing` - ); - } + if (member.privacy === "public" && !member.default) { + logDocumentationError(moduleDoc.path, `Missing default value for '${member.name}'.`) } // Getters are treated as fields so they should not have return, instead of return they should have default value defined with @default if (member.readonly) { if (member.privacy === "public" && !member.type) { - const JSDocErrors = getJSDocErrors(); - - JSDocErrors.push( - `=== ERROR: Problem found with ${member.name}'s JSDoc comment in ${moduleDoc.path}: Missing return type` - ); + logDocumentationError(moduleDoc.path, `Missing return type for read-only field '${member.name}'.`) } delete member.return; @@ -249,21 +241,19 @@ function processClass(ts, classNode, moduleDoc) { if (member.return) { const returnTag = findTag(memberParsedJsDoc, "returns"); member.return.description = returnTag?.description ? `${returnTag.name} ${returnTag.description}` : returnTag?.name; - member.return.type.text = classNodeMember?.type?.getFullText?.()?.trim(); + member.return.type.text = formatArrays(classNodeMember?.type?.getFullText?.()?.trim()); const typeRefs = (getTypeRefs(ts, classNodeMember, member.return) ?.map(typeRef => getReference(ts, typeRef, classNodeMember, moduleDoc.path)).filter(Boolean)) || []; if (typeRefs.length) { member.return.type.references = typeRefs; } - } - - if (member.privacy === "public" && !member.return) { - const JSDocErrors = getJSDocErrors(); - JSDocErrors.push( - `=== ERROR: Problem found with ${member.name}'s JSDoc comment in ${moduleDoc.path}: Missing return type` - ); + if (member.privacy === "public" && !member.return.type.text) { + logDocumentationError(moduleDoc.path, `Missing return type for function '${member.name}'.`) + } + } else if (member.privacy === "public") { + logDocumentationError(moduleDoc.path, `Missing return type for function '${member.name}'.`) } } } @@ -425,29 +415,27 @@ export default { moduleDoc.path = moduleDoc.path?.replace(/^src/, "dist").replace(/\.ts$/, ".js"); - if (moduleDoc.exports) { - moduleDoc.exports = moduleDoc.exports. - filter(e => !(e.kind === "custom-element-definition" && !moduleDoc.declarations?.find(d => d.name === e.name)?.tagName)) + moduleDoc.exports = moduleDoc.exports. + filter(e => !(e.kind === "custom-element-definition" && !moduleDoc.declarations?.find(d => d.name === e.name)?.tagName)) - moduleDoc.exports?.forEach(e => { - const classNode = moduleDoc.declarations.find(c => c.name === e.declaration.name); + moduleDoc.exports.forEach(e => { + const classNode = moduleDoc.declarations.find(c => c.name === e.declaration.name); - if (e.declaration && e.declaration.module) { - e.declaration.module = e.declaration.module.replace(/^src/, "dist").replace(/\.ts$/, ".js"); - } + if (e.declaration && e.declaration.module) { + e.declaration.module = e.declaration.module.replace(/^src/, "dist").replace(/\.ts$/, ".js"); + } - if (classNode?.customElement && classNode.tagName && e.kind !== "custom-element-definition") { - moduleDoc.exports.push({ - kind: "custom-element-definition", - name: classNode.tagName, - declaration: { - name: e.declaration.name, - module: e.declaration.module - } - }) - } - }) - } + if (classNode?.customElement && classNode.tagName && e.kind !== "custom-element-definition") { + moduleDoc.exports.push({ + kind: "custom-element-definition", + name: classNode.tagName, + declaration: { + name: e.declaration.name, + module: e.declaration.module + } + }) + } + }) const typeReferences = new Set(); const registerTypeReference = reference => typeReferences.add(JSON.stringify(reference)) @@ -470,28 +458,20 @@ export default { }) }); - for (let reference in typeReferences) { + typeReferences.forEach(reference => { reference = JSON.parse(reference); - if (reference.package === packageJSON?.name && reference.module === moduleDoc.path) { const hasExport = moduleDoc.exports.some(e => e.declaration?.name === reference.name && e.declaration?.module === reference.module) if (!hasExport) { - const JSDocErrors = getJSDocErrors(); - JSDocErrors.push( - `=== ERROR: Problem found with ${reference.name} type reference in ${moduleDoc.path?.replace(/^dist/, "src").replace(/\.js$/, ".ts")}: \n\t- ${reference.name} is used as type of public API, but it's not exported`) + logDocumentationError(moduleDoc.path?.replace(/^dist/, "src").replace(/\.js$/, ".ts"), `Type '${reference.name}' is used to describe a public API but is not exported.`,) } } - } + }) }, packageLinkPhase({ context }) { if (context.dev) { - const JSDocErrors = getJSDocErrors(); - if (JSDocErrors.length > 0) { - console.log(JSDocErrors.join("\n")); - console.log(`Invalid JSDoc. ${JSDocErrors.length} were found.`); - throw new Error(`Invalid JSDoc.`); - } + displayDocumentationErrors(); } } }, diff --git a/packages/tools/lib/cem/event.mjs b/packages/tools/lib/cem/event.mjs index 6dfcb6893da6..b1f1fec59bd6 100644 --- a/packages/tools/lib/cem/event.mjs +++ b/packages/tools/lib/cem/event.mjs @@ -12,7 +12,7 @@ import { getReference, normalizeDescription, normalizeTagType, - getJSDocErrors + logDocumentationError } from "./utils.mjs"; const jsDocRegExp = /\/\*\*(.|\n)+?\s+\*\//; @@ -83,11 +83,7 @@ function processEvent(ts, event, classNode, moduleDoc) { const eventDetails = event?.expression?.arguments?.[1]?.properties?.find(prop => prop?.name?.text === "detail")?.initializer?.properties; if (event?.expression?.arguments?.[1] && !event?.expression?.typeArguments) { - const JSDocErrors = getJSDocErrors(); - - JSDocErrors.push( - `=== ERROR: Problem found with ${name}'s description in ${moduleDoc.path}: \n\t- Event details have to be described with type via generics type passed to the decorator ( @event<TypeForDetails>("example-name", {details}) ) ` - ); + logDocumentationError(moduleDoc.path, `Event details for event '${name}' must be described using generics. Add type via generics to the decorator: @event<TypeForDetails>("${name}", {details}).`) } result.description = description; diff --git a/packages/tools/lib/cem/schema-internal.json b/packages/tools/lib/cem/schema-internal.json index 426724da4efb..854b788a5ff7 100644 --- a/packages/tools/lib/cem/schema-internal.json +++ b/packages/tools/lib/cem/schema-internal.json @@ -245,6 +245,9 @@ "ClassField": { "additionalProperties": false, "properties": { + "_ui5noAttribute": { + "type": "boolean" + }, "_ui5validator": { "type": "string" }, diff --git a/packages/tools/lib/cem/types-internal.d.ts b/packages/tools/lib/cem/types-internal.d.ts index 4cedca713e0b..d5b17686d072 100644 --- a/packages/tools/lib/cem/types-internal.d.ts +++ b/packages/tools/lib/cem/types-internal.d.ts @@ -602,6 +602,7 @@ export interface PropertyLike { } export interface ClassField extends PropertyLike { + _ui5noAttribute?: boolean; _ui5validator?: string _ui5formProperty?: boolean _ui5formEvents?: string diff --git a/packages/tools/lib/cem/utils.mjs b/packages/tools/lib/cem/utils.mjs index 24f2aeb8347b..54cd94a2d6f3 100644 --- a/packages/tools/lib/cem/utils.mjs +++ b/packages/tools/lib/cem/utils.mjs @@ -1,7 +1,7 @@ import fs from "fs"; import path from "path"; -let JSDocErrors = []; +let documentationErrors = new Map(); const getDeprecatedStatus = (jsdocComment) => { const deprecatedTag = findTag(jsdocComment, "deprecated"); @@ -24,6 +24,8 @@ const getTypeRefs = (ts, node, member) => { return type.typeArguments?.length ? type.typeArguments.map((typeRef) => typeRef.typeName?.text) : [type.typeName?.text]; + } else if (type?.kind === ts.SyntaxKind.ArrayType) { + return [type.elementType?.typeName?.text]; } else if (type?.kind === ts.SyntaxKind.UnionType) { return type.types .map((type) => extractTypeRefs(type)) @@ -316,21 +318,43 @@ const validateJSDocComment = (fieldType, jsdocComment, node, moduleDoc) => { } if (!isValid) { - JSDocErrors.push( - `=== ERROR: Problem found with ${node}'s JSDoc comment in ${moduleDoc.path}: \n\t- @${tag.tag} tag is being used wrong or it's not part of ${fieldType} JSDoc tags` - ); + logDocumentationError(moduleDoc.path, `Incorrect use of @${tag.tag}. Ensure it is part of ${fieldType} JSDoc tags.`) } return !!isValid; }); }; -const getJSDocErrors = () => { - return JSDocErrors; -}; +const logDocumentationError = (modulePath, message) => { + let moduleErrors = documentationErrors.get(modulePath); + + if (!moduleErrors) { + documentationErrors.set(modulePath, []); + moduleErrors = documentationErrors.get(modulePath); + } + + moduleErrors.push(message); +} + +const displayDocumentationErrors = () => { + let errorsCount = 0; + [...documentationErrors.keys()].forEach(modulePath => { + const moduleErrors = documentationErrors.get(modulePath); + + console.log(`=== ERROR: ${moduleErrors.length > 1 ? `${moduleErrors.length} problems` : "Problem"} found in file: ${modulePath}:`) + moduleErrors.forEach(moduleError => { + errorsCount++; + console.log(`\t- ${moduleError}`) + }) + }) + + if(errorsCount) { + throw new Error(`Found ${errorsCount} errors in the description of the public API.`); + } +} const formatArrays = (typeText) => { - return typeText.replaceAll(/(\S+)\[\]/g, "Array<$1>") + return typeText?.replaceAll(/(\S+)\[\]/g, "Array<$1>") } export { @@ -345,10 +369,11 @@ export { hasTag, findTag, findAllTags, - getJSDocErrors, getTypeRefs, normalizeDescription, formatArrays, isClass, - normalizeTagType + normalizeTagType, + displayDocumentationErrors, + logDocumentationError, }; diff --git a/packages/tools/lib/cem/validate.js b/packages/tools/lib/cem/validate.js index 9ab3a282bc47..2b906f3b6e5a 100644 --- a/packages/tools/lib/cem/validate.js +++ b/packages/tools/lib/cem/validate.js @@ -15,6 +15,11 @@ const inputFilePath = path.join(process.cwd(), "dist/custom-elements.json"); // const customManifest = fs.readFileSync(inputFilePath, 'utf8'); const inputDataInternal = JSON.parse(customManifest); +inputDataInternal.modules.forEach(moduleDoc => { + moduleDoc.exports = moduleDoc.exports. + filter(e => moduleDoc.declarations.find(d => d.name === e.declaration.name && ["class", "function", "variable", "enum"].includes(d.kind)) || e.name === "default"); +}) + const clearProps = (data) => { if (Array.isArray(data)) { for (let i = 0; i < data.length; i++) { @@ -60,8 +65,6 @@ if (validate(inputDataExternal)) { console.log('Custom element manifest is validated successfully'); fs.writeFileSync(inputFilePath, JSON.stringify(inputDataExternal, null, 2), 'utf8'); fs.writeFileSync(inputFilePath.replace("custom-elements", "custom-elements-internal"), JSON.stringify(inputDataInternal, null, 2), 'utf8'); -} else { - if (argv.dev) { - throw new Error(`Validation of public custom elements manifest failed: ${validate.errors}`); - } -} \ No newline at end of file +} else if (argv.dev) { + throw new Error(`Validation of public custom elements manifest failed: ${validate.errors}`); + } \ No newline at end of file diff --git a/packages/tools/lib/esm-abs-to-rel/index.js b/packages/tools/lib/esm-abs-to-rel/index.js deleted file mode 100644 index 3f65baad53f5..000000000000 --- a/packages/tools/lib/esm-abs-to-rel/index.js +++ /dev/null @@ -1,61 +0,0 @@ -const esprima = require("esprima"); -const escodegen = require("escodegen"); - -const fs = require("fs").promises; -const path = require("path"); -const basePath = process.argv[2]; - -const convertImports = async (srcPath) => { - let changed = false; - let code = (await fs.readFile(srcPath)).toString(); - if (code.includes("import(")) { - // esprima can't parse this, but it's from the project files - return; - } - const tree = esprima.parseModule(code); - const importer = srcPath.replace(basePath, ""); - const importerDir = path.dirname(importer); - // console.log("-> ", importer); - tree.body.forEach(node => { - if (node.type === "ImportDeclaration") { - let importee = node.source.value; - if (importee.startsWith(".")) { - // add .js extension if missing - if (!importee.endsWith(".js")) { - node.source.value += ".js" - changed = true; - } - return; - } - let importeeDir = path.dirname(importee); - let importeeFile = path.basename(importee); - let relativePath = path.relative(importerDir, importeeDir); - if (relativePath.length === 0) { - relativePath = "." - } - if (!relativePath.startsWith(".")) { - relativePath = "./" + relativePath; - } - - relativePath = relativePath.replace(/\\/g, "/"); // the browser expects unix paths - let relativeImport = `${relativePath}/${importeeFile}.js`; - // console.log(importee + " --> " + relativeImport); - node.source.value = relativeImport; - changed = true; - } - }); - - if (changed) { - return fs.writeFile(srcPath, escodegen.generate(tree)); - } -} - -const generate = async () => { - const { globby } = await import("globby"); - const fileNames = await globby(basePath.replace(/\\/g, "/") + "**/*.js"); - return Promise.all(fileNames.map(convertImports).filter(x => !!x)); -}; - -generate().then(() => { - console.log("Success: Converted absolute imports to relative for files in:", basePath); -}); diff --git a/packages/tools/lib/generate-custom-elements-manifest/index.js b/packages/tools/lib/generate-custom-elements-manifest/index.js index 41520f719cbc..3c6338978239 100644 --- a/packages/tools/lib/generate-custom-elements-manifest/index.js +++ b/packages/tools/lib/generate-custom-elements-manifest/index.js @@ -5,61 +5,40 @@ const path = require("path"); const inputDir = process.argv[2]; const outputDir = process.argv[3]; -const camelToKebabMap = new Map(); -const apiIndex = new Map(); -const forbiddenAttributeTypes = ["object", "array"]; - -const camelToKebabCase = string => { - if (!camelToKebabMap.has(string)) { - const result = string.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(); - camelToKebabMap.set(string, result); - } - return camelToKebabMap.get(string); -}; +const moduleDeclarations = new Map(); const generateJavaScriptExport = entity => { return { - declaration: generateRefenrece(entity.name), - deprecated: !!entity.deprecated, + declaration: { + name: entity.basename, + module: `dist/${entity.resource}`, + }, kind: "js", name: "default", }; }; const generateCustomElementExport = entity => { + if (!entity.tagname) return; + return { declaration: { name: entity.basename, - module: `${entity.module}.js`, + module: `dist/${entity.resource}`, }, - deprecated: !!entity.deprecated, kind: "custom-element-definition", - name: entity.tagname, - }; -}; - -const generateJavaScriptModule = entity => { - return { - kind: "javascript-module", - path: `${entity.basename}.js`, - declarations: [ - generateCustomElementDeclaration(entity), - ], - exports: [ - generateJavaScriptExport(entity), - generateCustomElementExport(entity), - ], + name: entity.basename, }; }; const generateSingleClassField = classField => { let generatedClassField = { - deprecated: !!classField.deprecated, kind: "field", name: classField.name, - privacy: classField.visibility, - static: !!classField.static, type: generateType(classField.type), + privacy: classField.visibility, + deprecated: !!classField.deprecated || undefined, + static: !!classField.static || undefined, }; if (classField.defaultValue) { @@ -75,7 +54,7 @@ const generateSingleClassField = classField => { const generateSingleParameter = parameter => { let generatedParameter = { - deprecated: !!parameter.deprecated, + deprecated: !!parameter.deprecated || undefined, name: parameter.name, type: generateType(parameter.type), }; @@ -86,6 +65,7 @@ const generateSingleParameter = parameter => { if (parameter.optional) { generatedParameter.optional = parameter.optional; + generatedParameter.default = parameter.defaultValue; } return generatedParameter; @@ -101,7 +81,7 @@ const generateParameters = (parameters) => { const generateSingleClassMethod = classMethod => { let generatedClassMethod = { - deprecated: !!classMethod.deprecated, + deprecated: !!classMethod.deprecated || undefined, kind: "method", name: classMethod.name, privacy: classMethod.visibility, @@ -122,7 +102,7 @@ const generateSingleClassMethod = classMethod => { }; if (classMethod.returnValue.description) { - generatedClassMethod.return.description = classMethod.returnValue.type; + generatedClassMethod.return.description = classMethod.returnValue.description; } } @@ -150,47 +130,16 @@ const generateMembers = (classFields, classMethods) => { }; const generateType = type => { - const dataType = apiIndex.get(type); - return { - text: dataType && dataType.name.includes(".types.") ? - filterPublicApi(dataType.properties) - .map(prop => `"${prop.name}"`) - .join(" | ") : type, - }; -}; - -const generateSingleAttribute = attribute => { - let generatedAttribute = { - default: attribute.defaultValue, - deprecated: !!attribute.deprecated, - fieldName: attribute.name, - name: camelToKebabCase(attribute.name), - type: generateType(attribute.type), + text: type, }; - - if (attribute.description) { - generatedAttribute.description = attribute.description; - } - - return generatedAttribute; -}; - -const generateAttributes = attributes => { - attributes = attributes.reduce((newAttributesArray, attribute) => { - newAttributesArray.push(generateSingleAttribute(attribute)); - - return newAttributesArray; - }, []); - - return attributes; }; const generateSingleEvent = event => { let generatedEvent = { - deprecated: !!event.deprecated, + deprecated: !!event.deprecated || undefined, name: event.name, - type: event.native === "true" ? "NativeEvent" : "CustomEvent", + type: generateType(event.native === "true" ? "NativeEvent" : "CustomEvent") }; if (event.description) { @@ -212,7 +161,7 @@ const generateEvents = events => { const generateSingleSlot = slot => { return { - deprecated: !!slot.deprecated, + deprecated: !!slot.deprecated || undefined, description: slot.description, name: slot.name, }; @@ -230,9 +179,9 @@ const generateSlots = slots => { const generateCustomElementDeclaration = entity => { let generatedCustomElementDeclaration = { - deprecated: !!entity.deprecated, + deprecated: !!entity.deprecated || undefined, customElement: true, - kind: entity.basename, + kind: entity.kind, name: entity.basename, tagName: entity.tagname, }; @@ -241,9 +190,6 @@ const generateCustomElementDeclaration = entity => { const events = filterPublicApi(entity.events); const classFields = filterPublicApi(entity.properties); const classMethods = filterPublicApi(entity.methods); - const attributes = classFields.filter(property => { - return property.noattribute !== "true" && property.readonly !== "true" && !forbiddenAttributeTypes.includes(property.type.toLowerCase()); - }); if (slots.length) { generatedCustomElementDeclaration.slots = generateSlots(slots); @@ -253,10 +199,6 @@ const generateCustomElementDeclaration = entity => { generatedCustomElementDeclaration.events = generateEvents(events); } - if (attributes.length) { - generatedCustomElementDeclaration.attributes = generateAttributes(attributes); - } - if (entity.description) { generatedCustomElementDeclaration.description = entity.description; } @@ -273,31 +215,8 @@ const generateCustomElementDeclaration = entity => { }; const generateRefenrece = (entityName) => { - let packageName; - let basename; - - if (!entityName) { - throw new Error("JSDoc error: entity not found in api.json."); - } - - if (entityName.includes(".")) { - basename = entityName.split(".").pop(); - } else { - basename = entityName - } - - if (entityName.includes("sap.ui.webc.main")) { - packageName = "@ui5/webcomponents"; - } else if (entityName.includes("sap.ui.webc.fiori")) { - packageName = "@ui5/webcomponents-fiori"; - } else if (entityName.includes("sap.ui.webc.base")) { - packageName = "@ui5/webcomponents-base"; - } - return { - module: `${basename}.js`, - name: `${basename}`, - package: packageName, + name: entityName, }; }; @@ -313,12 +232,37 @@ const generate = async () => { modules: [], }; - file.symbols.forEach(entity => { - if (entity.tagname || entity.kind === "class") { - customElementsManifest.modules.push(generateJavaScriptModule(entity)); + filterPublicApi(file.symbols).forEach(entity => { + let declaration = moduleDeclarations.get(entity.resource); + + if (!declaration) { + moduleDeclarations.set(entity.resource, { + declarations: [], + exports: [], + }); + declaration = moduleDeclarations.get(entity.resource); + } + + if (entity.kind === "class" && entity.tagname) { + declaration.declarations.push(generateCustomElementDeclaration(entity)); + declaration.exports.push(generateJavaScriptExport(entity)); + declaration.exports.push(generateCustomElementExport(entity)); + } else if (entity.kind === "class" && entity.static) { + declaration.exports.push(generateJavaScriptExport(entity)); } }); + [...moduleDeclarations.keys()].forEach(key => { + let declaration = moduleDeclarations.get(key); + + customElementsManifest.modules.push({ + kind: "javascript-module", + path: `dist/${key}`, + declarations: declaration.declarations, + exports: declaration.exports + }) + }) + await fs.writeFile(path.join(outputDir, "custom-elements.json"), JSON.stringify(customElementsManifest)); }; diff --git a/packages/tools/lib/replace-global-core/index.js b/packages/tools/lib/replace-global-core/index.js deleted file mode 100644 index 90208bbab249..000000000000 --- a/packages/tools/lib/replace-global-core/index.js +++ /dev/null @@ -1,25 +0,0 @@ -const fs = require("fs").promises; - -const basePath = process.argv[2]; - -const replaceGlobalCoreUsage = async (srcPath) => { - - const original = (await fs.readFile(srcPath)).toString(); - let replaced = original.replace(/sap\.ui\.getCore\(\)/g, `Core`); - - if (original !== replaced) { - replaced = `import Core from 'sap/ui/core/Core'; - ${replaced}`; - return fs.writeFile(srcPath, replaced); - } -}; - -const generate = async () => { - const { globby } = await import("globby"); - const fileNames = await globby(basePath.replace(/\\/g, "/") + "**/*.js"); - return Promise.all(fileNames.map(replaceGlobalCoreUsage).filter(x => !!x)); -}; - -generate().then(() => { - console.log("Success: Replaced global core usage in:", basePath); -}); diff --git a/packages/tools/package.json b/packages/tools/package.json index 7adf0c72bd65..1a46c5c754ef 100644 --- a/packages/tools/package.json +++ b/packages/tools/package.json @@ -1,6 +1,6 @@ { "name": "@ui5/webcomponents-tools", - "version": "1.22.0-rc.1", + "version": "1.22.0", "description": "UI5 Web Components: webcomponents.tools", "author": "SAP SE (https://www.sap.com)", "license": "Apache-2.0", diff --git a/vite.config.js b/vite.config.js index b3563a55830f..8f88407dbb84 100644 --- a/vite.config.js +++ b/vite.config.js @@ -63,10 +63,21 @@ const customResolver = (id, source, options) => { if (resolved.endsWith("dist/sap/base/util/LoaderExtensions.js")) { resolved = resolved.replace("/dist/", "/src/").replace(".js", ".ts"); } + if (resolved.endsWith("dist/sap/base/util/ObjectPath.js")) { + resolved = resolved.replace("/dist/", "/src/").replace(".js", ".ts"); + } return resolved; } + + } + + // The `base/package.json` has exports that resolves the absolute import to "dist/ssr-dom.js". + // However, in development, the file is not present in `dist`. Instead, load `ssr-dom.ts` from `src`. + if (id === "@ui5/webcomponents-base/dist/ssr-dom.js") { + return join("packages/base/src/ssr-dom.ts"); } + // relative imports from fiori src that are to a folder starting with `illustrations` are in dist if (source.includes("fiori/src/") && id.includes("/illustrations") && !id.includes("AllIllustrations") && id.startsWith(".")) { let absoluteId = resolve(dirname(source), id); diff --git a/yarn.lock b/yarn.lock index d228af22066d..e346fe78889d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -96,6 +96,27 @@ json5 "^2.2.3" semver "^6.3.1" +"@babel/core@^7.23.7": + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.7.tgz#4d8016e06a14b5f92530a13ed0561730b5c6483f" + integrity sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.6" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helpers" "^7.23.7" + "@babel/parser" "^7.23.6" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.7" + "@babel/types" "^7.23.6" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/generator@^7.22.9": version "7.22.9" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.9.tgz#572ecfa7a31002fa1de2a9d91621fd895da8493d" @@ -411,6 +432,15 @@ "@babel/traverse" "^7.23.6" "@babel/types" "^7.23.6" +"@babel/helpers@^7.23.7": + version "7.23.8" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.8.tgz#fc6b2d65b16847fd50adddbd4232c76378959e34" + integrity sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ== + dependencies: + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.7" + "@babel/types" "^7.23.6" + "@babel/highlight@^7.10.4", "@babel/highlight@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031" @@ -1218,6 +1248,22 @@ debug "^4.3.1" globals "^11.1.0" +"@babel/traverse@^7.23.7": + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.7.tgz#9a7bf285c928cb99b5ead19c3b1ce5b310c9c305" + integrity sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg== + dependencies: + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.6" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.6" + "@babel/types" "^7.23.6" + debug "^4.3.1" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.4.4": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.5.tgz#cd93eeaab025880a3a47ec881f4b096a5b786fbe" @@ -1236,17 +1282,6 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" -"@buxlabs/amd-to-es6@0.16.1": - version "0.16.1" - resolved "https://registry.yarnpkg.com/@buxlabs/amd-to-es6/-/amd-to-es6-0.16.1.tgz#4baf5bc01af7d2306a8fe3ecb3fe3589688e7aa7" - integrity sha512-tHxTDXAvYNlGfNjyrD2Ub+Oob6viq3Kofvro9+TkRl9d1MyQRp6pINYlXxLfkhSLnSJPgYoNaGddHgUTwjWJbA== - dependencies: - abstract-syntax-tree "^2.20.0" - commander "^8.0.0" - glob "^7.1.7" - mkdirp "^1.0.4" - pure-utilities "^1.2.3" - "@colors/colors@1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" @@ -1444,11 +1479,6 @@ resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz#08de79f54eb3406f9daaf77c76e35313da963963" integrity sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw== -"@esbuild/android-arm64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.13.tgz#70ef455455654c7800c31ae55ae295d81712238c" - integrity sha512-j7NhycJUoUAG5kAzGf4fPWfd17N6SM3o1X6MlXVqfHvs2buFraCJzos9vbeWjLxOyBKHyPOnuCuipbhvbYtTAg== - "@esbuild/android-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" @@ -1459,11 +1489,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.19.9.tgz#683794bdc3d27222d3eced7b74cad15979548031" integrity sha512-q4cR+6ZD0938R19MyEW3jEsMzbb/1rulLXiNAJQADD/XYp7pT+rOS5JGxvpRW8dFDEfjW4wLgC/3FXIw4zYglQ== -"@esbuild/android-arm@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.13.tgz#15db83099855fc4193658a40687893ee5c95d7a9" - integrity sha512-KwqFhxRFMKZINHzCqf8eKxE0XqWlAVPRxwy6rc7CbVFxzUWB2sA/s3hbMZeemPdhN3fKBkqOaFhTbS8xJXYIWQ== - "@esbuild/android-arm@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz#fedb265bc3a589c84cc11f810804f234947c3682" @@ -1474,11 +1499,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.19.9.tgz#21a4de41f07b2af47401c601d64dfdefd056c595" integrity sha512-jkYjjq7SdsWuNI6b5quymW0oC83NN5FdRPuCbs9HZ02mfVdAP8B8eeqLSYU3gb6OJEaY5CQabtTFbqBf26H3GA== -"@esbuild/android-x64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.13.tgz#473d589219e1c06e305cf61ca77b8f69d9b6ffab" - integrity sha512-M2eZkRxR6WnWfVELHmv6MUoHbOqnzoTVSIxgtsyhm/NsgmL+uTmag/VVzdXvmahak1I6sOb1K/2movco5ikDJg== - "@esbuild/android-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz#35cf419c4cfc8babe8893d296cd990e9e9f756f2" @@ -1489,11 +1509,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.19.9.tgz#e2d7674bc025ddc8699f0cc76cb97823bb63c252" integrity sha512-KOqoPntWAH6ZxDwx1D6mRntIgZh9KodzgNOy5Ebt9ghzffOk9X2c1sPwtM9P+0eXbefnDhqYfkh5PLP5ULtWFA== -"@esbuild/darwin-arm64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.13.tgz#0f525b2c1821a0591a06963582e5dc749ba51d45" - integrity sha512-f5goG30YgR1GU+fxtaBRdSW3SBG9pZW834Mmhxa6terzcboz7P2R0k4lDxlkP7NYRIIdBbWp+VgwQbmMH4yV7w== - "@esbuild/darwin-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz#08172cbeccf95fbc383399a7f39cfbddaeb0d7c1" @@ -1504,11 +1519,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.9.tgz#ae7a582289cc5c0bac15d4b9020a90cb7288f1e9" integrity sha512-KBJ9S0AFyLVx2E5D8W0vExqRW01WqRtczUZ8NRu+Pi+87opZn5tL4Y0xT0mA4FtHctd0ZgwNoN639fUUGlNIWw== -"@esbuild/darwin-x64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.13.tgz#81965b690bae86bf1289b2ce0732506fd41fb545" - integrity sha512-RIrxoKH5Eo+yE5BtaAIMZaiKutPhZjw+j0OCh8WdvKEKJQteacq0myZvBDLU+hOzQOZWJeDnuQ2xgSScKf1Ovw== - "@esbuild/darwin-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz#d70d5790d8bf475556b67d0f8b7c5bdff053d85d" @@ -1519,11 +1529,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.19.9.tgz#8a216c66dcf51addeeb843d8cfaeff712821d12b" integrity sha512-vE0VotmNTQaTdX0Q9dOHmMTao6ObjyPm58CHZr1UK7qpNleQyxlFlNCaHsHx6Uqv86VgPmR4o2wdNq3dP1qyDQ== -"@esbuild/freebsd-arm64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.13.tgz#895bb37fdea886db09549119158e044f146861f0" - integrity sha512-AfRPhHWmj9jGyLgW/2FkYERKmYR+IjYxf2rtSLmhOrPGFh0KCETFzSjx/JX/HJnvIqHt/DRQD/KAaVsUKoI3Xg== - "@esbuild/freebsd-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz#98755cd12707f93f210e2494d6a4b51b96977f54" @@ -1534,11 +1539,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.9.tgz#63d4f603e421252c3cd836b18d01545be7c6c440" integrity sha512-uFQyd/o1IjiEk3rUHSwUKkqZwqdvuD8GevWF065eqgYfexcVkxh+IJgwTaGZVu59XczZGcN/YMh9uF1fWD8j1g== -"@esbuild/freebsd-x64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.13.tgz#0b1dfde3ff1b18f03f71e460f91dc463e6a23903" - integrity sha512-pGzWWZJBInhIgdEwzn8VHUBang8UvFKsvjDkeJ2oyY5gZtAM6BaxK0QLCuZY+qoj/nx/lIaItH425rm/hloETA== - "@esbuild/freebsd-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz#c1eb2bff03915f87c29cece4c1a7fa1f423b066e" @@ -1549,11 +1549,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.9.tgz#a3db52595be65360eae4de1d1fa3c1afd942e1e4" integrity sha512-WMLgWAtkdTbTu1AWacY7uoj/YtHthgqrqhf1OaEWnZb7PQgpt8eaA/F3LkV0E6K/Lc0cUr/uaVP/49iE4M4asA== -"@esbuild/linux-arm64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.13.tgz#350febed5d32d8ec1a424a4c4d7c9ba885604960" - integrity sha512-hCzZbVJEHV7QM77fHPv2qgBcWxgglGFGCxk6KfQx6PsVIdi1u09X7IvgE9QKqm38OpkzaAkPnnPqwRsltvLkIQ== - "@esbuild/linux-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz#bad4238bd8f4fc25b5a021280c770ab5fc3a02a0" @@ -1564,11 +1559,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.19.9.tgz#4ae5811ce9f8d7df5eb9edd9765ea9401a534f13" integrity sha512-PiPblfe1BjK7WDAKR1Cr9O7VVPqVNpwFcPWgfn4xu0eMemzRp442hXyzF/fSwgrufI66FpHOEJk0yYdPInsmyQ== -"@esbuild/linux-arm@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.13.tgz#47639d73d894026350eaccf7c174f1d26b747d6a" - integrity sha512-4iMxLRMCxGyk7lEvkkvrxw4aJeC93YIIrfbBlUJ062kilUUnAiMb81eEkVvCVoh3ON283ans7+OQkuy1uHW+Hw== - "@esbuild/linux-arm@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz#3e617c61f33508a27150ee417543c8ab5acc73b0" @@ -1579,11 +1569,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.19.9.tgz#9807e92cfd335f46326394805ad488e646e506f2" integrity sha512-C/ChPohUYoyUaqn1h17m/6yt6OB14hbXvT8EgM1ZWaiiTYz7nWZR0SYmMnB5BzQA4GXl3BgBO1l8MYqL/He3qw== -"@esbuild/linux-ia32@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.13.tgz#a901a16349c58bf6f873bced36bdf46a5f4dac5d" - integrity sha512-I3OKGbynl3AAIO6onXNrup/ttToE6Rv2XYfFgLK/wnr2J+1g+7k4asLrE+n7VMhaqX+BUnyWkCu27rl+62Adug== - "@esbuild/linux-ia32@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz#699391cccba9aee6019b7f9892eb99219f1570a7" @@ -1594,11 +1579,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.19.9.tgz#18892c10f3106652b16f9da88a0362dc95ed46c7" integrity sha512-f37i/0zE0MjDxijkPSQw1CO/7C27Eojqb+r3BbHVxMLkj8GCa78TrBZzvPyA/FNLUMzP3eyHCVkAopkKVja+6Q== -"@esbuild/linux-loong64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.13.tgz#faa08db402c18e351234719e00aba98867aa34ce" - integrity sha512-8pcKDApAsKc6WW51ZEVidSGwGbebYw2qKnO1VyD8xd6JN0RN6EUXfhXmDk9Vc4/U3Y4AoFTexQewQDJGsBXBpg== - "@esbuild/linux-loong64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz#e6fccb7aac178dd2ffb9860465ac89d7f23b977d" @@ -1609,11 +1589,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.19.9.tgz#dc2ebf9a125db0a1bba18c2bbfd4fbdcbcaf61c2" integrity sha512-t6mN147pUIf3t6wUt3FeumoOTPfmv9Cc6DQlsVBpB7eCpLOqQDyWBP1ymXn1lDw4fNUSb/gBcKAmvTP49oIkaA== -"@esbuild/linux-mips64el@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.13.tgz#2123a54b49ddc1a1dff057bba8a9a5e9f26e5009" - integrity sha512-6GU+J1PLiVqWx8yoCK4Z0GnfKyCGIH5L2KQipxOtbNPBs+qNDcMJr9euxnyJ6FkRPyMwaSkjejzPSISD9hb+gg== - "@esbuild/linux-mips64el@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz#eeff3a937de9c2310de30622a957ad1bd9183231" @@ -1624,11 +1599,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.9.tgz#4c2f7c5d901015e3faf1563c4a89a50776cb07fd" integrity sha512-jg9fujJTNTQBuDXdmAg1eeJUL4Jds7BklOTkkH80ZgQIoCTdQrDaHYgbFZyeTq8zbY+axgptncko3v9p5hLZtw== -"@esbuild/linux-ppc64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.13.tgz#9a9befd275a6a3f5baeed89aaafb746df7ba735d" - integrity sha512-pfn/OGZ8tyR8YCV7MlLl5hAit2cmS+j/ZZg9DdH0uxdCoJpV7+5DbuXrR+es4ayRVKIcfS9TTMCs60vqQDmh+w== - "@esbuild/linux-ppc64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz#2f7156bde20b01527993e6881435ad79ba9599fb" @@ -1639,11 +1609,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.9.tgz#8385332713b4e7812869622163784a5633f76fc4" integrity sha512-tkV0xUX0pUUgY4ha7z5BbDS85uI7ABw3V1d0RNTii7E9lbmV8Z37Pup2tsLV46SQWzjOeyDi1Q7Wx2+QM8WaCQ== -"@esbuild/linux-riscv64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.13.tgz#6644a5b5840fa0c3ffade6f87d943413ece520a8" - integrity sha512-aIbhU3LPg0lOSCfVeGHbmGYIqOtW6+yzO+Nfv57YblEK01oj0mFMtvDJlOaeAZ6z0FZ9D13oahi5aIl9JFphGg== - "@esbuild/linux-riscv64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz#6628389f210123d8b4743045af8caa7d4ddfc7a6" @@ -1654,11 +1619,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.9.tgz#23f1db24fa761be311874f32036c06249aa20cba" integrity sha512-DfLp8dj91cufgPZDXr9p3FoR++m3ZJ6uIXsXrIvJdOjXVREtXuQCjfMfvmc3LScAVmLjcfloyVtpn43D56JFHg== -"@esbuild/linux-s390x@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.13.tgz#c1367a0a02b37f6b0382e71d9c9d97352ca23013" - integrity sha512-Pct1QwF2sp+5LVi4Iu5Y+6JsGaV2Z2vm4O9Dd7XZ5tKYxEHjFtb140fiMcl5HM1iuv6xXO8O1Vrb1iJxHlv8UA== - "@esbuild/linux-s390x@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz#255e81fb289b101026131858ab99fba63dcf0071" @@ -1669,11 +1629,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.19.9.tgz#2dffe497726b897c9f0109e774006e25b33b4fd0" integrity sha512-zHbglfEdC88KMgCWpOl/zc6dDYJvWGLiUtmPRsr1OgCViu3z5GncvNVdf+6/56O2Ca8jUU+t1BW261V6kp8qdw== -"@esbuild/linux-x64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.13.tgz#892674f0918ee3f5e523270cf49a69a557fb64c0" - integrity sha512-zTrIP0KzYP7O0+3ZnmzvUKgGtUvf4+piY8PIO3V8/GfmVd3ZyHJGz7Ht0np3P1wz+I8qJ4rjwJKqqEAbIEPngA== - "@esbuild/linux-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz#c7690b3417af318a9b6f96df3031a8865176d338" @@ -1684,11 +1639,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.19.9.tgz#ceb1d62cd830724ff5b218e5d3172a8bad59420e" integrity sha512-JUjpystGFFmNrEHQnIVG8hKwvA2DN5o7RqiO1CVX8EN/F/gkCjkUMgVn6hzScpwnJtl2mPR6I9XV1oW8k9O+0A== -"@esbuild/netbsd-x64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.13.tgz#67954292195ecbdae33ab09a9ae6a7f566e49d04" - integrity sha512-I6zs10TZeaHDYoGxENuksxE1sxqZpCp+agYeW039yqFwh3MgVvdmXL5NMveImOC6AtpLvE4xG5ujVic4NWFIDQ== - "@esbuild/netbsd-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz#30e8cd8a3dded63975e2df2438ca109601ebe0d1" @@ -1699,11 +1649,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.9.tgz#0cbca65e9ef4d3fc41502d3e055e6f49479a8f18" integrity sha512-GThgZPAwOBOsheA2RUlW5UeroRfESwMq/guy8uEe3wJlAOjpOXuSevLRd70NZ37ZrpO6RHGHgEHvPg1h3S1Jug== -"@esbuild/openbsd-x64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.13.tgz#b3eef873dfab547fbe7bcdb3573e1c59dea676b7" - integrity sha512-W5C5nczhrt1y1xPG5bV+0M12p2vetOGlvs43LH8SopQ3z2AseIROu09VgRqydx5qFN7y9qCbpgHLx0kb0TcW7g== - "@esbuild/openbsd-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz#7812af31b205055874c8082ea9cf9ab0da6217ae" @@ -1714,11 +1659,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.9.tgz#1f57adfbee09c743292c6758a3642e875bcad1cf" integrity sha512-Ki6PlzppaFVbLnD8PtlVQfsYw4S9n3eQl87cqgeIw+O3sRr9IghpfSKY62mggdt1yCSZ8QWvTZ9jo9fjDSg9uw== -"@esbuild/sunos-x64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.13.tgz#b368080f42dbb5ae926d0567c02bcd68a34c5efd" - integrity sha512-X/xzuw4Hzpo/yq3YsfBbIsipNgmsm8mE/QeWbdGdTTeZ77fjxI2K0KP3AlhZ6gU3zKTw1bKoZTuKLnqcJ537qw== - "@esbuild/sunos-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz#d5c275c3b4e73c9b0ecd38d1ca62c020f887ab9d" @@ -1729,11 +1669,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.19.9.tgz#116be6adbd2c7479edeeb5f6ea0441002ab4cb9c" integrity sha512-MLHj7k9hWh4y1ddkBpvRj2b9NCBhfgBt3VpWbHQnXRedVun/hC7sIyTGDGTfsGuXo4ebik2+3ShjcPbhtFwWDw== -"@esbuild/win32-arm64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.13.tgz#11dedda0e8cfb5f781411ea362b2040304be0fc3" - integrity sha512-4CGYdRQT/ILd+yLLE5i4VApMPfGE0RPc/wFQhlluDQCK09+b4JDbxzzjpgQqTPrdnP7r5KUtGVGZYclYiPuHrw== - "@esbuild/win32-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz#73bc7f5a9f8a77805f357fab97f290d0e4820ac9" @@ -1744,11 +1679,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.19.9.tgz#2be22131ab18af4693fd737b161d1ef34de8ca9d" integrity sha512-GQoa6OrQ8G08guMFgeXPH7yE/8Dt0IfOGWJSfSH4uafwdC7rWwrfE6P9N8AtPGIjUzdo2+7bN8Xo3qC578olhg== -"@esbuild/win32-ia32@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.13.tgz#6b8aa95515c05827b7c24c9db9581943566e0dcb" - integrity sha512-D+wKZaRhQI+MUGMH+DbEr4owC2D7XnF+uyGiZk38QbgzLcofFqIOwFs7ELmIeU45CQgfHNy9Q+LKW3cE8g37Kg== - "@esbuild/win32-ia32@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz#ec93cbf0ef1085cc12e71e0d661d20569ff42102" @@ -1759,11 +1689,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.19.9.tgz#e10ead5a55789b167b4225d2469324538768af7c" integrity sha512-UOozV7Ntykvr5tSOlGCrqU3NBr3d8JqPes0QWN2WOXfvkWVGRajC+Ym0/Wj88fUgecUCLDdJPDF0Nna2UK3Qtg== -"@esbuild/win32-x64@0.18.13": - version "0.18.13" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.13.tgz#031f69b1f4cf62a18c38d502458c0b8b02625461" - integrity sha512-iVl6lehAfJS+VmpF3exKpNQ8b0eucf5VWfzR8S7xFve64NBNz2jPUgx1X93/kfnkfgP737O+i1k54SVQS7uVZA== - "@esbuild/win32-x64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" @@ -2126,6 +2051,11 @@ resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.1.tgz#64df34e2f12e68e78ac57e571d25ec07fa460ca9" integrity sha512-kXOeFbfCm4fFf2A3WwVEeQj55tMZa8c8/f9AKHMobQMkzNUfUj+antR3fRPaZJawsa1aZiP/Da3ndpZrwEe4rQ== +"@lit-labs/ssr-dom-shim@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.2.tgz#d693d972974a354034454ec1317eb6afd0b00312" + integrity sha512-jnOD+/+dSrfTWYfSXBXlo5l5f0q1UuJo3tkbMDCYA2lKUYq79jaxqtGEvnRoh049nt1vdo1+45RinipU6FGY2g== + "@lit/reactive-element@^1.3.0", "@lit/reactive-element@^1.6.0": version "1.6.2" resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-1.6.2.tgz#c256690f82f2d7d0ffb0b1cdf68dcb1ec86cea28" @@ -2543,10 +2473,10 @@ dependencies: "@octokit/openapi-types" "^18.0.0" -"@openui5/sap.ui.core@1.116.0": - version "1.116.0" - resolved "https://registry.yarnpkg.com/@openui5/sap.ui.core/-/sap.ui.core-1.116.0.tgz#88acc1bebd1926f8c1bc00c513a3563d26c6e2ea" - integrity sha512-HwVuy0XIGIHM0emz6xh2HMLQnDbMSVatkEq9uPmbQoeV8PvThJcjyEMgAuLKgUpAim2qMNyOvsfn2zHeuOmOaw== +"@openui5/sap.ui.core@1.120.3": + version "1.120.3" + resolved "https://registry.yarnpkg.com/@openui5/sap.ui.core/-/sap.ui.core-1.120.3.tgz#5ccddddc254f23c346ba5d1bd919d547ad84b0f1" + integrity sha512-KTV80IiK2pGwnyRh3VGROoK5DYJ8jhNImhVu7wH760BcFv8NskPvhek8+N0b52oKG9jwr6ijdzzfUJtK/znMjg== "@parcel/watcher@2.0.4": version "2.0.4" @@ -4462,18 +4392,6 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" -abstract-syntax-tree@^2.20.0: - version "2.21.0" - resolved "https://registry.yarnpkg.com/abstract-syntax-tree/-/abstract-syntax-tree-2.21.0.tgz#7a6b9da5c2077baaf6288d141fa66455efb058c1" - integrity sha512-YJ+q/DgsNM+cp4vVFr67BhaFtSKeIGzNkH8UZzqOMCl86DZb1QraPVHb99jJFn6CaA3W+yileAkx0s8Xbs0DFg== - dependencies: - ast-types "0.14.2" - astring "^1.8.6" - esquery "^1.5.0" - meriyah "^4.3.7" - pure-conditions "^1.2.1" - source-map "^0.7.4" - accepts@~1.3.5, accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" @@ -4497,15 +4415,10 @@ acorn@^7.4.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.11.2: - version "8.11.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" - integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== - -acorn@^8.4.1, acorn@^8.9.0: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== +acorn@^8.11.2, acorn@^8.4.1, acorn@^8.9.0: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== add-stream@^1.0.0: version "1.0.0" @@ -4860,13 +4773,6 @@ assertion-error@^1.1.0: resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== -ast-types@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.2.tgz#600b882df8583e3cd4f2df5fa20fa83759d4bdfd" - integrity sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA== - dependencies: - tslib "^2.0.1" - ast-types@^0.16.1: version "0.16.1" resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.16.1.tgz#7a9da1617c9081bc121faafe91711b4c8bb81da2" @@ -4879,11 +4785,6 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== -astring@^1.8.6: - version "1.8.6" - resolved "https://registry.yarnpkg.com/astring/-/astring-1.8.6.tgz#2c9c157cf1739d67561c56ba896e6948f6b93731" - integrity sha512-ISvCdHdlTDlH5IpxQJIex7BWBywFWgjJSVdwst+/iQCoEYnyOaQ95+X1JGshuBjGp6nxKUy1jMgE3zPqN7fQdg== - async-exit-hook@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/async-exit-hook/-/async-exit-hook-2.0.1.tgz#8bd8b024b0ec9b1c01cccb9af9db29bd717dfaf3" @@ -4919,7 +4820,7 @@ axe-core@4.2.3: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.2.3.tgz#2a3afc332f0031b42f602f4a3de03c211ca98f72" integrity sha512-pXnVMfJKSIWU2Ml4JHP7pZEPIrgBO1Fd3WGx+fPBsS+KRGhE4vxooD8XBGWbQOIVSZsVK7pUDBBkCicNu80yzQ== -axios@^1.0.0, axios@^1.6.0: +axios@^1.0.0: version "1.6.2" resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.2.tgz#de67d42c755b571d3e698df1b6504cde9b0ee9f2" integrity sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A== @@ -4928,6 +4829,15 @@ axios@^1.0.0, axios@^1.6.0: form-data "^4.0.0" proxy-from-env "^1.1.0" +axios@^1.6.0: + version "1.6.7" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.7.tgz#7b48c2e27c96f9c68a2f8f31e2ab19f59b06b0a7" + integrity sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA== + dependencies: + follow-redirects "^1.15.4" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + babar@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/babar/-/babar-0.2.0.tgz#79bc0f029721467207f2b6baedf96b3938ad7db0" @@ -4940,6 +4850,11 @@ babel-core@^7.0.0-bridge.0: resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg== +babel-plugin-amd-to-esm@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/babel-plugin-amd-to-esm/-/babel-plugin-amd-to-esm-2.0.3.tgz#879d14e212cca6af05431d52f94aff27da02b66e" + integrity sha512-jPzcPXaMDTzCD68Cn9UVxl0XVHq+6zmbhjCT6TYRr5Wruk8hQMkL46fiJgia44ObgwnrmH3Ni9keBNp/1NgGxA== + babel-plugin-istanbul@^6.0.0, babel-plugin-istanbul@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" @@ -5539,10 +5454,10 @@ chrome-launcher@^0.15.0: is-wsl "^2.2.0" lighthouse-logger "^1.0.0" -chromedriver@119.0.1: - version "119.0.1" - resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-119.0.1.tgz#064f3650790ccea055e9bfd95c600f5ea60295e9" - integrity sha512-lpCFFLaXPpvElTaUOWKdP74pFb/sJhWtWqMjn7Ju1YriWn8dT5JBk84BGXMPvZQs70WfCYWecxdMmwfIu1Mupg== +chromedriver@120.0.0: + version "120.0.0" + resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-120.0.0.tgz#34d60a6726a104a348d8dbf82106ca45a430684b" + integrity sha512-LGy2LhWRBiqDarFIU8gQ43EEyj+07Tc3JuUhthkESAwZ99lrifSnKZwKU0aVwansU84+k6bt71z7K3dkk65gZg== dependencies: "@testim/chrome-version" "^1.1.4" axios "^1.6.0" @@ -6798,7 +6713,7 @@ esbuild-register@^3.5.0: dependencies: debug "^4.3.4" -esbuild@^0.18.0: +esbuild@^0.18.0, esbuild@^0.18.10: version "0.18.20" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.20.tgz#4709f5a34801b43b799ab7d6d82f7284a9b7a7a6" integrity sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA== @@ -6826,34 +6741,6 @@ esbuild@^0.18.0: "@esbuild/win32-ia32" "0.18.20" "@esbuild/win32-x64" "0.18.20" -esbuild@^0.18.10: - version "0.18.13" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.13.tgz#59160add6c3420947fe008238140ed3480baf817" - integrity sha512-vhg/WR/Oiu4oUIkVhmfcc23G6/zWuEQKFS+yiosSHe4aN6+DQRXIfeloYGibIfVhkr4wyfuVsGNLr+sQU1rWWw== - optionalDependencies: - "@esbuild/android-arm" "0.18.13" - "@esbuild/android-arm64" "0.18.13" - "@esbuild/android-x64" "0.18.13" - "@esbuild/darwin-arm64" "0.18.13" - "@esbuild/darwin-x64" "0.18.13" - "@esbuild/freebsd-arm64" "0.18.13" - "@esbuild/freebsd-x64" "0.18.13" - "@esbuild/linux-arm" "0.18.13" - "@esbuild/linux-arm64" "0.18.13" - "@esbuild/linux-ia32" "0.18.13" - "@esbuild/linux-loong64" "0.18.13" - "@esbuild/linux-mips64el" "0.18.13" - "@esbuild/linux-ppc64" "0.18.13" - "@esbuild/linux-riscv64" "0.18.13" - "@esbuild/linux-s390x" "0.18.13" - "@esbuild/linux-x64" "0.18.13" - "@esbuild/netbsd-x64" "0.18.13" - "@esbuild/openbsd-x64" "0.18.13" - "@esbuild/sunos-x64" "0.18.13" - "@esbuild/win32-arm64" "0.18.13" - "@esbuild/win32-ia32" "0.18.13" - "@esbuild/win32-x64" "0.18.13" - esbuild@^0.19.9: version "0.19.9" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.19.9.tgz#423a8f35153beb22c0b695da1cd1e6c0c8cdd490" @@ -7069,7 +6956,7 @@ esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.0, esquery@^1.5.0: +esquery@^1.4.0: version "1.5.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== @@ -7528,6 +7415,11 @@ follow-redirects@^1.15.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== +follow-redirects@^1.15.4: + version "1.15.5" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.5.tgz#54d4d6d062c0fa7d9d17feb008461550e3ba8020" + integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -7932,7 +7824,7 @@ glob@^10.2.2: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" -glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7, glob@^7.2.0: +glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.2.0: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -10254,11 +10146,6 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -meriyah@^4.3.7: - version "4.3.7" - resolved "https://registry.yarnpkg.com/meriyah/-/meriyah-4.3.7.tgz#f931998e7b608a2c8dd4ad3bb4039819db234bb9" - integrity sha512-JAlSOUqFU/rmLy2CEdZO5hN5E5dyUj1f4AlRR4GCQMjfobvd5lcm9JLkrqq0MgVaLQ/Zur590A+0RyUZhj0b5A== - metaviewport-parser@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/metaviewport-parser/-/metaviewport-parser-0.2.0.tgz#535c3ce1ccf6223a5025fddc6a1c36505f7e7db1" @@ -12253,16 +12140,6 @@ puppeteer-core@^2.1.1: rimraf "^2.6.1" ws "^6.1.0" -pure-conditions@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/pure-conditions/-/pure-conditions-1.2.1.tgz#de3717e2bd9b6eae07b6c68257cfa3332818ffef" - integrity sha512-MKk7sKQiR3Fe3bL/QedUZ1eVoNO0xpOCyiTGdVrK+4ZCDa9TgwNp6D/U1FthjhVGS9a857BS84WncvZvOYECUw== - -pure-utilities@^1.2.3: - version "1.3.0" - resolved "https://registry.yarnpkg.com/pure-utilities/-/pure-utilities-1.3.0.tgz#e0292d343d1e576652cfe8308708958cc095d1fa" - integrity sha512-26WfRjAv4sKGNvyN/qi0EtYBASJLOrnQC/nN67D4K7ZFx3POOmhrNMFHtgeH+12RtEaXZ5O4rCZrcuuI+9cXNg== - q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -13228,11 +13105,6 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" - integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== - space-separated-tokens@^1.0.0: version "1.1.5" resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz#85f32c3d10d9682007e917414ddc5c26d1aa6899" @@ -14546,9 +14418,9 @@ vite-tsconfig-paths@^4.2.1: tsconfck "^2.1.0" "vite@^3.0.0 || ^4.0.0", vite@^4.4.9: - version "4.4.12" - resolved "https://registry.yarnpkg.com/vite/-/vite-4.4.12.tgz#e9c355d5a0d8a47afa46cb4bad10820da333da5c" - integrity sha512-KtPlUbWfxzGVul8Nut8Gw2Qe8sBzWY+8QVc5SL8iRFnpnrcoCaNlzO40c1R6hPmcdTwIPEDkq0Y9+27a5tVbdQ== + version "4.5.2" + resolved "https://registry.yarnpkg.com/vite/-/vite-4.5.2.tgz#d6ea8610e099851dad8c7371599969e0f8b97e82" + integrity sha512-tBCZBNSBbHQkaGyhGCDUGqeo2ph8Fstyp6FMSvTtsXeZSPpSMGlviAOav2hxVTqFcx8Hj/twtWKsMJXNY0xI8w== dependencies: esbuild "^0.18.10" postcss "^8.4.27"