@fundamental-ngx/ui5-webcomponents-fiori 0.58.0-rc.64 → 0.58.0-rc.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,77 @@
1
1
  # ui5-webcomponents-fiori
2
2
 
3
- ui5-wecomponents-fiori package
3
+ Angular component wrappers around the [@ui5/webcomponents-fiori](https://www.npmjs.com/package/@ui5/webcomponents-fiori) npm package.
4
+
5
+ ## Overview
6
+
7
+ This library provides Angular components that wrap UI5 Fiori Web Components, enabling you to build SAP Fiori-compliant applications with Angular. These components include higher-level patterns and layouts specific to enterprise applications.
8
+
9
+ - Angular-friendly API (inputs, outputs, template syntax)
10
+ - TypeScript type definitions
11
+ - Full integration with Angular's change detection
12
+ - Standalone components support
13
+ - SAP Fiori design guidelines compliance
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install @fundamental-ngx/ui5-webcomponents-fiori
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ Import the Fiori components you need:
24
+
25
+ ```typescript
26
+ import { ShellBar } from '@fundamental-ngx/ui5-webcomponents-fiori/shell-bar';
27
+ import { DynamicPage } from '@fundamental-ngx/ui5-webcomponents-fiori/dynamic-page';
28
+ import { Timeline } from '@fundamental-ngx/ui5-webcomponents-fiori/timeline';
29
+
30
+ @Component({
31
+ selector: 'app-example',
32
+ standalone: true,
33
+ imports: [ShellBar, DynamicPage, Timeline],
34
+ template: `
35
+ <ui5-shellbar
36
+ primary-title="My App"
37
+ (profile-click)="handleProfile()">
38
+ </ui5-shellbar>
39
+ <ui5-dynamic-page>
40
+ <!-- Page content -->
41
+ </ui5-dynamic-page>
42
+ `
43
+ })
44
+ export class ExampleComponent {
45
+ handleProfile() {
46
+ console.log('Profile clicked!');
47
+ }
48
+ }
49
+ ```
50
+
51
+ ### Using Angular Components Inside UI5 Components
52
+
53
+ Angular components often use selectors with hyphens (e.g. `<app-item>`, `<app-value>`).
54
+ UI5 interprets such tags as custom elements and may wait **up to 1 second** for their registration, causing delayed rendering inside components like `<ui5-table-cell>`.
55
+
56
+ To avoid this, configure UI5 to ignore Angular component prefixes:
57
+
58
+ ```ts
59
+ // ui5-init.ts
60
+ import { ignoreCustomElements } from '@ui5/webcomponents-base/dist/IgnoreCustomElements.js';
61
+
62
+ ignoreCustomElements('app-');
63
+ ```
64
+
65
+ Import it before Angular bootstraps:
66
+ ```ts
67
+ // main.ts
68
+ import './ui5-init';
69
+ ```
70
+
71
+ This prevents unnecessary waiting, ensures smooth rendering, and improves performance when mixing Angular components with UI5 Web Components.
72
+
73
+ ## Resources
74
+
75
+ - [UI5 Web Components Documentation](https://ui5.github.io/webcomponents/)
76
+ - [Fundamental NGX Documentation](https://sap.github.io/fundamental-ngx)
77
+ - [GitHub Repository](https://github.com/SAP/fundamental-ngx)
@@ -66,6 +66,7 @@ import '@ui5/webcomponents-fiori/dist/UserMenu.js';
66
66
  import '@ui5/webcomponents-fiori/dist/UserMenuAccount.js';
67
67
  import '@ui5/webcomponents-fiori/dist/UserMenuItem.js';
68
68
  import '@ui5/webcomponents-fiori/dist/UserMenuItemGroup.js';
69
+ import '@ui5/webcomponents-fiori/dist/UserSettingsAccountView.js';
69
70
  import '@ui5/webcomponents-fiori/dist/UserSettingsDialog.js';
70
71
  import '@ui5/webcomponents-fiori/dist/UserSettingsItem.js';
71
72
  import '@ui5/webcomponents-fiori/dist/UserSettingsView.js';
@@ -2688,8 +2689,8 @@ class SearchItemShowMore {
2688
2689
  constructor() {
2689
2690
  /**
2690
2691
  * Specifies the number of additional items available to show.
2691
- This value replaces the placeholder (N) in the "Show more (N)" text.
2692
- If not set, the placeholder will remain as (N).
2692
+ If no value is defined, the control shows "Show more" (without any counter).
2693
+ If a number is provided, it displays "Show more (N)", where N is that number.
2693
2694
  */
2694
2695
  this.itemsToShowCount = input(...(ngDevMode ? [undefined, { debugName: "itemsToShowCount" }] : []));
2695
2696
  /**
@@ -5235,6 +5236,126 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
5235
5236
  }]
5236
5237
  }] });
5237
5238
 
5239
+ class UserSettingsAccountView {
5240
+ constructor() {
5241
+ /**
5242
+ * Defines if the User Menu shows the `Manage Account` option.
5243
+ */
5244
+ this.showManageAccount = input(false, ...(ngDevMode ? [{ debugName: "showManageAccount", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
5245
+ /**
5246
+ * Defines the title text of the user settings view.
5247
+ */
5248
+ this.text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : []));
5249
+ /**
5250
+ * Defines whether the view is selected. There can be just one selected view at a time.
5251
+ */
5252
+ this.selected = input(false, ...(ngDevMode ? [{ debugName: "selected", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
5253
+ /**
5254
+ * Indicates whether the view is secondary. It is relevant only if the view is used in `pages` slot of `ui5-user-settings-item`
5255
+ and controls the visibility of the back button.
5256
+ */
5257
+ this.secondary = input(false, ...(ngDevMode ? [{ debugName: "secondary", transform: booleanAttribute }] : [{ transform: booleanAttribute }])); // className is now passed
5258
+ /**
5259
+ * Fired when the `Edit Accounts` button is selected.
5260
+ */
5261
+ this.ui5EditAccountsClick = output();
5262
+ /**
5263
+ * Fired when the `Manage Account` button is selected.
5264
+ */
5265
+ this.ui5ManageAccountClick = output();
5266
+ /**
5267
+ * Available slots for content projection in this component.
5268
+ *
5269
+ * Slots allow you to insert custom content into predefined areas of the web component.
5270
+ * Use the `slot` attribute on child elements to target specific slots.
5271
+ *
5272
+ * - **account**: Defines the user account.
5273
+ * - **(default)**: Defines the content of the view.
5274
+ *
5275
+ * @example
5276
+ * ```html
5277
+ * <ui5-user-settings-account-view>
5278
+ * <div slot="header">Custom header content</div>
5279
+ * <p>Default slot content</p>
5280
+ * </ui5-user-settings-account-view>
5281
+ * ```
5282
+ *
5283
+ * @readonly
5284
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots | MDN Web Components Slots}
5285
+ */
5286
+ this.slots = [
5287
+ {
5288
+ "name": "account",
5289
+ "description": "Defines the user account."
5290
+ },
5291
+ {
5292
+ "name": "default",
5293
+ "description": "Defines the content of the view."
5294
+ }
5295
+ ];
5296
+ this.elementRef = inject(ElementRef);
5297
+ this.injector = inject(Injector);
5298
+ }
5299
+ get element() {
5300
+ return this.elementRef.nativeElement;
5301
+ }
5302
+ ngAfterViewInit() {
5303
+ const wcElement = this.element;
5304
+ const inputsToSync = [
5305
+ 'showManageAccount',
5306
+ 'text',
5307
+ 'selected',
5308
+ 'secondary',
5309
+ ];
5310
+ // Synchronize inputs (properties)
5311
+ for (const inputName of inputsToSync) {
5312
+ // Find the corresponding camelCase signal property on the Angular component
5313
+ const signalName = inputName.replace(/-./g, (x) => x[1].toUpperCase());
5314
+ // Use the Injector to run the effect in the correct context
5315
+ if (this[signalName] && typeof this[signalName] === 'function') {
5316
+ runInInjectionContext(this.injector, () => {
5317
+ effect(() => {
5318
+ // Read the signal value
5319
+ const value = this[signalName]();
5320
+ if (wcElement) {
5321
+ // Write the value to the Web Component's property
5322
+ wcElement[inputName] = value;
5323
+ }
5324
+ });
5325
+ });
5326
+ }
5327
+ }
5328
+ const outputsToSync = [
5329
+ 'ui5EditAccountsClick',
5330
+ 'ui5ManageAccountClick',
5331
+ ];
5332
+ // Synchronize outputs (events)
5333
+ for (const outputName of outputsToSync) {
5334
+ // Map Angular output name to UI5 web component event name
5335
+ const eventName = outputName.replace('ui5', '').replace(/([A-Z])/g, '-$1').toLowerCase().substring(1);
5336
+ // Ensure the output property exists and has an emit function before adding listener
5337
+ if (this[outputName] && typeof this[outputName].emit === 'function' && wcElement.addEventListener) {
5338
+ // Cast the listener to the correct type to satisfy TypeScript
5339
+ wcElement.addEventListener(eventName, (e) => {
5340
+ this[outputName].emit(e);
5341
+ });
5342
+ }
5343
+ }
5344
+ }
5345
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: UserSettingsAccountView, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5346
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.4", type: UserSettingsAccountView, isStandalone: true, selector: "ui5-user-settings-account-view, [ui5-user-settings-account-view]", inputs: { showManageAccount: { classPropertyName: "showManageAccount", publicName: "showManageAccount", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, secondary: { classPropertyName: "secondary", publicName: "secondary", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ui5EditAccountsClick: "ui5EditAccountsClick", ui5ManageAccountClick: "ui5ManageAccountClick" }, exportAs: ["ui5UserSettingsAccountView"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5347
+ }
5348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: UserSettingsAccountView, decorators: [{
5349
+ type: Component,
5350
+ args: [{
5351
+ standalone: true,
5352
+ selector: 'ui5-user-settings-account-view, [ui5-user-settings-account-view]',
5353
+ template: '<ng-content></ng-content>',
5354
+ exportAs: 'ui5UserSettingsAccountView',
5355
+ changeDetection: ChangeDetectionStrategy.OnPush,
5356
+ }]
5357
+ }] });
5358
+
5238
5359
  class UserSettingsDialog {
5239
5360
  constructor() {
5240
5361
  /**
@@ -5971,5 +6092,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
5971
6092
  * Generated bundle index. Do not edit.
5972
6093
  */
5973
6094
 
5974
- export { BarcodeScannerDialog, DynamicPage, DynamicPageHeader, DynamicPageTitle, DynamicSideContent, FilterItem, FilterItemOption, FlexibleColumnLayout, GenericControlValueAccessor, GroupItem, IllustratedMessage, MediaGallery, MediaGalleryItem, NavigationLayout, NotificationList, NotificationListGroupItem, NotificationListItem, Page, ProductSwitch, ProductSwitchItem, Search, SearchItem, SearchItemGroup, SearchItemShowMore, SearchMessageArea, SearchScope, ShellBar, ShellBarBranding, ShellBarItem, ShellBarSearch, ShellBarSpacer, SideNavigation, SideNavigationGroup, SideNavigationItem, SideNavigationSubItem, SortItem, Timeline, TimelineGroupItem, TimelineItem, Ui5WebcomponentsFioriThemingService, UploadCollection, UploadCollectionItem, UserMenu, UserMenuAccount, UserMenuItem, UserMenuItemGroup, UserSettingsDialog, UserSettingsItem, UserSettingsView, ViewSettingsDialog, Wizard, WizardStep };
6095
+ export { BarcodeScannerDialog, DynamicPage, DynamicPageHeader, DynamicPageTitle, DynamicSideContent, FilterItem, FilterItemOption, FlexibleColumnLayout, GenericControlValueAccessor, GroupItem, IllustratedMessage, MediaGallery, MediaGalleryItem, NavigationLayout, NotificationList, NotificationListGroupItem, NotificationListItem, Page, ProductSwitch, ProductSwitchItem, Search, SearchItem, SearchItemGroup, SearchItemShowMore, SearchMessageArea, SearchScope, ShellBar, ShellBarBranding, ShellBarItem, ShellBarSearch, ShellBarSpacer, SideNavigation, SideNavigationGroup, SideNavigationItem, SideNavigationSubItem, SortItem, Timeline, TimelineGroupItem, TimelineItem, Ui5WebcomponentsFioriThemingService, UploadCollection, UploadCollectionItem, UserMenu, UserMenuAccount, UserMenuItem, UserMenuItemGroup, UserSettingsAccountView, UserSettingsDialog, UserSettingsItem, UserSettingsView, ViewSettingsDialog, Wizard, WizardStep };
5975
6096
  //# sourceMappingURL=fundamental-ngx-ui5-webcomponents-fiori.mjs.map