Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into input-suggestions-fea…
Browse files Browse the repository at this point in the history
…ture-rework
  • Loading branch information
vladitasev committed Jan 21, 2025
2 parents 4f66ecc + 475c293 commit ccc29a6
Show file tree
Hide file tree
Showing 412 changed files with 5,539 additions and 10,264 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.7.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.6.2...v2.7.0-rc.0) (2025-01-16)


### Bug Fixes

* ai button and color palette bring their own items ([#10517](https://github.com/SAP/ui5-webcomponents/issues/10517)) ([11b9356](https://github.com/SAP/ui5-webcomponents/commit/11b9356a13d01ece1ebcf4185b61259b9ad6d364))
* i18n decorator property definition ([#10521](https://github.com/SAP/ui5-webcomponents/issues/10521)) ([d19f4e9](https://github.com/SAP/ui5-webcomponents/commit/d19f4e99bad74432bff21587da43a5844f17f8cf))
* **ui5-form:** prevent content overflow ([#10552](https://github.com/SAP/ui5-webcomponents/issues/10552)) ([819a453](https://github.com/SAP/ui5-webcomponents/commit/819a453c1a9dd8c55a89c6c32c34e73f9e127e86))
* **ui5-label:** adjust asterisk size ([#10533](https://github.com/SAP/ui5-webcomponents/issues/10533)) ([44a245d](https://github.com/SAP/ui5-webcomponents/commit/44a245d685c0ace10f93af21652c6c89eb421498)), closes [#10494](https://github.com/SAP/ui5-webcomponents/issues/10494)
* **ui5-popover:** fix opener reference ([#10507](https://github.com/SAP/ui5-webcomponents/issues/10507)) ([a38a28e](https://github.com/SAP/ui5-webcomponents/commit/a38a28e11245e0121bd0a2d6b9d1f5b294952a42))
* **ui5-toast:** fix template and remove additional text ([#10559](https://github.com/SAP/ui5-webcomponents/issues/10559)) ([ad8f08f](https://github.com/SAP/ui5-webcomponents/commit/ad8f08f1a1b8d2e02b3a929afa46a38ae708feb3))
* **ui5-toolbar:** correct display of overflow button in hidden container ([#10529](https://github.com/SAP/ui5-webcomponents/issues/10529)) ([3a2f8e3](https://github.com/SAP/ui5-webcomponents/commit/3a2f8e365a2319176e70e4e8cc8e575f58511c6f))
* **ui5-toolbar:** overflow behaviour ([#10547](https://github.com/SAP/ui5-webcomponents/issues/10547)) ([8df4eb2](https://github.com/SAP/ui5-webcomponents/commit/8df4eb215a15e37df225bbd98836719b584f3065))
* **ui5-view-settings-dialog:** adjust reset button announcement ([#10320](https://github.com/SAP/ui5-webcomponents/issues/10320)) ([42b29f3](https://github.com/SAP/ui5-webcomponents/commit/42b29f3eb6c435959ee67551d5f9f450995370ce)), closes [#10191](https://github.com/SAP/ui5-webcomponents/issues/10191)


### Features

* **create-package:** generate jsx component template ([#10531](https://github.com/SAP/ui5-webcomponents/issues/10531)) ([dd2d45d](https://github.com/SAP/ui5-webcomponents/commit/dd2d45d4c3947f52773272f6a77be294f240d28f))
* **ui5-side-navigation:** update existing design for Horizon theme ([#10337](https://github.com/SAP/ui5-webcomponents/issues/10337)) ([d5eff51](https://github.com/SAP/ui5-webcomponents/commit/d5eff51f56042d5fbf94e87d6bd94cdbe2d55982))
* **ui5-table:** popin-text property added ([#10514](https://github.com/SAP/ui5-webcomponents/issues/10514)) ([a01a303](https://github.com/SAP/ui5-webcomponents/commit/a01a3036526cd02eaac1a973ac5054a7c9c8a194))
* **ui5-table:** table row actions feature added ([#10460](https://github.com/SAP/ui5-webcomponents/issues/10460)) ([dfe09ae](https://github.com/SAP/ui5-webcomponents/commit/dfe09ae51987ef6237fccfbf0bcb76abb8251dee))





## [2.6.2](https://github.com/SAP/ui5-webcomponents/compare/v2.6.2-rc.0...v2.6.2) (2025-01-09)


### Bug Fixes

* **build:** fix incorrect module ref in custom-elements-manifest ([#10497](https://github.com/SAP/ui5-webcomponents/issues/10497)) ([ea8cdea](https://github.com/SAP/ui5-webcomponents/commit/ea8cdea0b43f31c11479aa2997387be0ef71c6cb))





## [2.6.2-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.6.1...v2.6.2-rc.0) (2025-01-09)


Expand Down
38 changes: 0 additions & 38 deletions docs/internal/Toolbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,42 +105,4 @@ import ToolbarButton from "./dist/ToolbarButton.js";
  <ui5-toolbar-button text="Button 1" disabled></ui5-toolbar-button>
  <ui5-toolbar-button text="Button 2"></ui5-toolbar-button>
</ui5-toolbar>
```

## Events

Abstract items can provide a map of events through the `subscribedEvents` getter. The toolbar will actively monitor these events on the physical items, and when triggered, it will also fire the information to the corresponding abstract item. This mechanism proves useful when the abstract item requires synchronization of changes or interactions with the physical items. Importantly, events described as public offer benefits to consumers of the abstract items informing them about interactions with the physical elements. Additionally, the map contains information about the popover, such as `preventClosing: true`, which ensures that the popover remains open when this event is triggered by the physical item.

A good example is the Map of the `ui5-toolbar-select`:

```javascript
get subscribedEvents() {
  const map = new Map();

  map.set("click", { preventClosing: true });
  map.set("change", { preventClosing: false });
  map.set("open", { preventClosing: true });
  map.set("close", { preventClosing: true });

  return map;
}
```

The `ui5-toolbar-select` then waits for the toolbar to fire the `change` event, in order to notify (synchronize) its `options` slots:

```ts
_onEventHandler(e: Event): void {
  if (e.type === "change") {
    // update options
    const selectedOption = (e as CustomEvent<ToolbarSelectChangeEventDetail>).detail.selectedOption;
    const selectedOptionIndex = Number(selectedOption?.getAttribute("data-ui5-external-action-item-index"));
    this.options.forEach((option: Option, index: number) => {
      if (index === selectedOptionIndex) {
        option.setAttribute("selected", "");
      } else {
        option.removeAttribute("selected");
      }
    });
  }
}
```
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"packages/create-package",
"packages/compat"
],
"version": "2.6.2-rc.0",
"version": "2.7.0-rc.0",
"command": {
"publish": {
"allowBranch": "*",
Expand Down
19 changes: 19 additions & 0 deletions packages/ai/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.7.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.6.2...v2.7.0-rc.0) (2025-01-16)


### Bug Fixes

* ai button and color palette bring their own items ([#10517](https://github.com/SAP/ui5-webcomponents/issues/10517)) ([11b9356](https://github.com/SAP/ui5-webcomponents/commit/11b9356a13d01ece1ebcf4185b61259b9ad6d364))





## [2.6.2](https://github.com/SAP/ui5-webcomponents/compare/v2.6.2-rc.0...v2.6.2) (2025-01-09)

**Note:** Version bump only for package @ui5/webcomponents-ai





## [2.6.2-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.6.1...v2.6.2-rc.0) (2025-01-09)

**Note:** Version bump only for package @ui5/webcomponents-ai
Expand Down
1 change: 1 addition & 0 deletions packages/ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Provides web components implementing AI-related visual and interaction.
| Web Component | Tag name | Module import |
|--------------------------|--------------------------------|---------------------------------------------------------|
| Button | `ui5-ai-button` | `import "@ui5/webcomponents-ai/dist/Button.js";` |
| Button State | `ui5-ai-button-state` | comes with `ui5-ai-button` |
| PromptInput | `ui5-ai-prompt-input` | `import "@ui5/webcomponents-ai/dist/PromptInput.js";` |

## Provided assets
Expand Down
12 changes: 6 additions & 6 deletions packages/ai/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ui5/webcomponents-ai",
"version": "2.6.2-rc.0",
"version": "2.7.0-rc.0",
"description": "UI5 Web Components: webcomponents.ai",
"ui5": {
"webComponentsPackage": true
Expand Down Expand Up @@ -45,13 +45,13 @@
"directory": "packages/ai"
},
"dependencies": {
"@ui5/webcomponents": "2.6.2-rc.0",
"@ui5/webcomponents-base": "2.6.2-rc.0",
"@ui5/webcomponents-icons": "2.6.2-rc.0",
"@ui5/webcomponents-theming": "2.6.2-rc.0"
"@ui5/webcomponents": "2.7.0-rc.0",
"@ui5/webcomponents-base": "2.7.0-rc.0",
"@ui5/webcomponents-icons": "2.7.0-rc.0",
"@ui5/webcomponents-theming": "2.7.0-rc.0"
},
"devDependencies": {
"@ui5/webcomponents-tools": "2.6.2-rc.0",
"@ui5/webcomponents-tools": "2.7.0-rc.0",
"chromedriver": "^131.0.0"
}
}
1 change: 1 addition & 0 deletions packages/ai/src/Button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
import type SplitButton from "@ui5/webcomponents/dist/SplitButton.js";
import type ButtonDesign from "@ui5/webcomponents/dist/types/ButtonDesign.js";
import type ButtonState from "./ButtonState.js";
import "./ButtonState.js";

import ButtonTemplate from "./ButtonTemplate.js";

Expand Down
20 changes: 20 additions & 0 deletions packages/base/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.7.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.6.2...v2.7.0-rc.0) (2025-01-16)


### Bug Fixes

* i18n decorator property definition ([#10521](https://github.com/SAP/ui5-webcomponents/issues/10521)) ([d19f4e9](https://github.com/SAP/ui5-webcomponents/commit/d19f4e99bad74432bff21587da43a5844f17f8cf))
* **ui5-popover:** fix opener reference ([#10507](https://github.com/SAP/ui5-webcomponents/issues/10507)) ([a38a28e](https://github.com/SAP/ui5-webcomponents/commit/a38a28e11245e0121bd0a2d6b9d1f5b294952a42))





## [2.6.2](https://github.com/SAP/ui5-webcomponents/compare/v2.6.2-rc.0...v2.6.2) (2025-01-09)

**Note:** Version bump only for package @ui5/webcomponents-base





## [2.6.2-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.6.1...v2.6.2-rc.0) (2025-01-09)

**Note:** Version bump only for package @ui5/webcomponents-base
Expand Down
4 changes: 2 additions & 2 deletions packages/base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ui5/webcomponents-base",
"version": "2.6.2-rc.0",
"version": "2.7.0-rc.0",
"description": "UI5 Web Components: webcomponents.base",
"author": "SAP SE (https://www.sap.com)",
"license": "Apache-2.0",
Expand Down Expand Up @@ -57,7 +57,7 @@
},
"devDependencies": {
"@openui5/sap.ui.core": "1.120.17",
"@ui5/webcomponents-tools": "2.6.2-rc.0",
"@ui5/webcomponents-tools": "2.7.0-rc.0",
"chromedriver": "^131.0.0",
"clean-css": "^5.2.2",
"copy-and-watch": "^0.1.5",
Expand Down
13 changes: 11 additions & 2 deletions packages/base/src/UI5Element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { updateFormValue, setFormValue } from "./features/InputElementsFormSuppo
import type { IFormInputElement } from "./features/InputElementsFormSupport.js";
import { getComponentFeature, subscribeForFeatureLoad } from "./FeaturesRegistry.js";
import { getI18nBundle } from "./i18nBundle.js";
import type I18nBundle from "./i18nBundle.js";
import { fetchCldr } from "./asset-registries/LocaleData.js";
import getLocale from "./locale/getLocale.js";

Expand Down Expand Up @@ -1080,6 +1081,10 @@ abstract class UI5Element extends HTMLElement {
return true;
}

get isUI5AbstractElement(): boolean {
return !(this.constructor as typeof UI5Element)._needsShadowDOM();
}

get classes(): ClassMap {
return {};
}
Expand Down Expand Up @@ -1288,6 +1293,11 @@ abstract class UI5Element extends HTMLElement {

static asyncFinished: boolean;
static definePromise: Promise<void> | undefined;
static i18nBundleStorage: Record<string, I18nBundle> = {};

static get i18nBundles(): Record<string, I18nBundle> {
return this.i18nBundleStorage;
}

/**
* Registers a UI5 Web Component in the browser window object
Expand All @@ -1304,8 +1314,7 @@ abstract class UI5Element extends HTMLElement {
const [i18nBundles] = result;
Object.entries(this.getMetadata().getI18n()).forEach((pair, index) => {
const propertyName = pair[0];
const targetClass = pair[1].target;
(targetClass as Record<string, any>)[propertyName] = i18nBundles[index];
this.i18nBundleStorage[propertyName] = i18nBundles[index];
});
this.asyncFinished = true;
};
Expand Down
3 changes: 1 addition & 2 deletions packages/base/src/config/Theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ const getDefaultTheme = (): string => {
* @returns {boolean}
*/
const isTheme = (theme: string) => {
const currentTheme = getTheme();
return currentTheme === theme || currentTheme === `${theme}_exp`;
return getTheme() === theme;
};

/**
Expand Down
8 changes: 8 additions & 0 deletions packages/base/src/decorators/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ const i18n = (bundleName: string): i18nDecorator => {
if (!target.metadata.i18n) {
target.metadata.i18n = {};
}

Object.defineProperty(target, propertyName, {
get() {
return target.i18nBundles[propertyName];
},
set() {},
});

target.metadata.i18n[propertyName] = {
bundleName,
target,
Expand Down
1 change: 0 additions & 1 deletion packages/base/src/thirdparty/preact/jsxRuntime.module.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ccc29a6

Please sign in to comment.