@fundamental-ngx/ui5-webcomponents 0.63.0-rc.22 → 0.63.0-rc.24
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/fesm2022/fundamental-ngx-ui5-webcomponents-combo-box-item.mjs +24 -3
- package/fesm2022/fundamental-ngx-ui5-webcomponents-combo-box-item.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-form-group.mjs +11 -2
- package/fesm2022/fundamental-ngx-ui5-webcomponents-form-group.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-form.mjs +4 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-form.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-icon.mjs +37 -0
- package/fesm2022/fundamental-ngx-ui5-webcomponents-icon.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-list-item-custom.mjs +18 -2
- package/fesm2022/fundamental-ngx-ui5-webcomponents-list-item-custom.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-list-item-group-header.mjs +24 -3
- package/fesm2022/fundamental-ngx-ui5-webcomponents-list-item-group-header.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-list-item-standard.mjs +18 -2
- package/fesm2022/fundamental-ngx-ui5-webcomponents-list-item-standard.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-menu-item.mjs +18 -2
- package/fesm2022/fundamental-ngx-ui5-webcomponents-menu-item.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-menu-separator.mjs +24 -3
- package/fesm2022/fundamental-ngx-ui5-webcomponents-menu-separator.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-multi-combo-box-item.mjs +24 -3
- package/fesm2022/fundamental-ngx-ui5-webcomponents-multi-combo-box-item.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-option-custom.mjs +24 -3
- package/fesm2022/fundamental-ngx-ui5-webcomponents-option-custom.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-option.mjs +24 -3
- package/fesm2022/fundamental-ngx-ui5-webcomponents-option.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-range-slider.mjs +22 -3
- package/fesm2022/fundamental-ngx-ui5-webcomponents-range-slider.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-slider.mjs +21 -2
- package/fesm2022/fundamental-ngx-ui5-webcomponents-slider.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-suggestion-item-custom.mjs +24 -3
- package/fesm2022/fundamental-ngx-ui5-webcomponents-suggestion-item-custom.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-suggestion-item.mjs +24 -3
- package/fesm2022/fundamental-ngx-ui5-webcomponents-suggestion-item.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-suggestion-list-item.mjs +18 -2
- package/fesm2022/fundamental-ngx-ui5-webcomponents-suggestion-list-item.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-tab.mjs +22 -3
- package/fesm2022/fundamental-ngx-ui5-webcomponents-tab.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-table-group-row.mjs +133 -0
- package/fesm2022/fundamental-ngx-ui5-webcomponents-table-group-row.mjs.map +1 -0
- package/fesm2022/fundamental-ngx-ui5-webcomponents-tree-item-custom.mjs +18 -2
- package/fesm2022/fundamental-ngx-ui5-webcomponents-tree-item-custom.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents-tree-item.mjs +18 -2
- package/fesm2022/fundamental-ngx-ui5-webcomponents-tree-item.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-ui5-webcomponents.mjs +532 -39
- package/fesm2022/fundamental-ngx-ui5-webcomponents.mjs.map +1 -1
- package/package.json +8 -4
- package/types/fundamental-ngx-ui5-webcomponents-combo-box-item.d.ts +8 -1
- package/types/fundamental-ngx-ui5-webcomponents-form-group.d.ts +9 -1
- package/types/fundamental-ngx-ui5-webcomponents-form.d.ts +3 -0
- package/types/fundamental-ngx-ui5-webcomponents-icon.d.ts +35 -0
- package/types/fundamental-ngx-ui5-webcomponents-list-item-custom.d.ts +15 -1
- package/types/fundamental-ngx-ui5-webcomponents-list-item-group-header.d.ts +8 -1
- package/types/fundamental-ngx-ui5-webcomponents-list-item-standard.d.ts +15 -1
- package/types/fundamental-ngx-ui5-webcomponents-menu-item.d.ts +15 -1
- package/types/fundamental-ngx-ui5-webcomponents-menu-separator.d.ts +8 -1
- package/types/fundamental-ngx-ui5-webcomponents-multi-combo-box-item.d.ts +8 -1
- package/types/fundamental-ngx-ui5-webcomponents-option-custom.d.ts +8 -1
- package/types/fundamental-ngx-ui5-webcomponents-option.d.ts +8 -1
- package/types/fundamental-ngx-ui5-webcomponents-range-slider.d.ts +20 -1
- package/types/fundamental-ngx-ui5-webcomponents-slider.d.ts +20 -1
- package/types/fundamental-ngx-ui5-webcomponents-suggestion-item-custom.d.ts +11 -4
- package/types/fundamental-ngx-ui5-webcomponents-suggestion-item.d.ts +8 -1
- package/types/fundamental-ngx-ui5-webcomponents-suggestion-list-item.d.ts +15 -1
- package/types/fundamental-ngx-ui5-webcomponents-tab.d.ts +6 -1
- package/types/fundamental-ngx-ui5-webcomponents-table-group-row.d.ts +75 -0
- package/types/fundamental-ngx-ui5-webcomponents-tree-item-custom.d.ts +15 -1
- package/types/fundamental-ngx-ui5-webcomponents-tree-item.d.ts +15 -1
- package/types/fundamental-ngx-ui5-webcomponents.d.ts +309 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, inject, ElementRef, Injector, runInInjectionContext, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { input, output, inject, ElementRef, Injector, runInInjectionContext, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import '@ui5/webcomponents/dist/ComboBoxItem.js';
|
|
4
4
|
import { ContentDensityObserver, contentDensityObserverProviders, ContentDensityMode } from '@fundamental-ngx/core/content-density';
|
|
5
5
|
|
|
@@ -35,6 +35,12 @@ class ComboBoxItem {
|
|
|
35
35
|
```
|
|
36
36
|
*/
|
|
37
37
|
this.value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : [])); // className is now passed
|
|
38
|
+
/**
|
|
39
|
+
* Fired when the component is activated either with a mouse/tap or by using the Enter or Space key.
|
|
40
|
+
|
|
41
|
+
**Note:** The event will not be fired if the `disabled` property is set to `true`.
|
|
42
|
+
*/
|
|
43
|
+
this.ui5Click = output();
|
|
38
44
|
this.elementRef = inject(ElementRef);
|
|
39
45
|
this.injector = inject(Injector);
|
|
40
46
|
/**
|
|
@@ -72,9 +78,24 @@ class ComboBoxItem {
|
|
|
72
78
|
});
|
|
73
79
|
}
|
|
74
80
|
}
|
|
81
|
+
const outputsToSync = [
|
|
82
|
+
'ui5Click',
|
|
83
|
+
];
|
|
84
|
+
// Synchronize outputs (events)
|
|
85
|
+
for (const outputName of outputsToSync) {
|
|
86
|
+
// Map Angular output name to UI5 web component event name
|
|
87
|
+
const eventName = outputName.replace('ui5', '').replace(/([A-Z])/g, '-$1').toLowerCase().substring(1);
|
|
88
|
+
// Ensure the output property exists and has an emit function before adding listener
|
|
89
|
+
if (this[outputName] && typeof this[outputName].emit === 'function' && wcElement.addEventListener) {
|
|
90
|
+
// Cast the listener to the correct type to satisfy TypeScript
|
|
91
|
+
wcElement.addEventListener(eventName, (e) => {
|
|
92
|
+
this[outputName].emit(e);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
75
96
|
}
|
|
76
97
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ComboBoxItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
77
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: ComboBoxItem, isStandalone: true, selector: "ui5-cb-item, [ui5-cb-item]", inputs: { additionalText: { classPropertyName: "additionalText", publicName: "additionalText", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
98
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: ComboBoxItem, isStandalone: true, selector: "ui5-cb-item, [ui5-cb-item]", inputs: { additionalText: { classPropertyName: "additionalText", publicName: "additionalText", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ui5Click: "ui5Click" }, providers: [
|
|
78
99
|
contentDensityObserverProviders({
|
|
79
100
|
supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]
|
|
80
101
|
})
|
|
@@ -94,7 +115,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
94
115
|
],
|
|
95
116
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
96
117
|
}]
|
|
97
|
-
}], propDecorators: { additionalText: [{ type: i0.Input, args: [{ isSignal: true, alias: "additionalText", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
|
|
118
|
+
}], propDecorators: { additionalText: [{ type: i0.Input, args: [{ isSignal: true, alias: "additionalText", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], ui5Click: [{ type: i0.Output, args: ["ui5Click"] }] } });
|
|
98
119
|
|
|
99
120
|
/**
|
|
100
121
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-ui5-webcomponents-combo-box-item.mjs","sources":["../../../../libs/ui5-webcomponents/combo-box-item/index.ts","../../../../libs/ui5-webcomponents/combo-box-item/fundamental-ngx-ui5-webcomponents-combo-box-item.ts"],"sourcesContent":["\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n input,\n output,\n AfterViewInit,\n effect,\n runInInjectionContext,\n inject,\n Injector,\n booleanAttribute,\n computed,\n signal\n} from '@angular/core';\nimport '@ui5/webcomponents/dist/ComboBoxItem.js';\nimport { default as _ComboBoxItem } from '@ui5/webcomponents/dist/ComboBoxItem.js';\nimport { UI5CustomEvent } from '@ui5/webcomponents-base';\nimport {\n ContentDensityObserver,\n contentDensityObserverProviders,\n ContentDensityMode\n} from '@fundamental-ngx/core/content-density';\n\n\n\n@Component({\n standalone: true,\n selector: 'ui5-cb-item, [ui5-cb-item]',\n template: '<ng-content></ng-content>',\n exportAs: 'ui5ComboBoxItem',\n providers: [\n contentDensityObserverProviders({\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]\n })\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComboBoxItem implements AfterViewInit {\n\n /**\n * Defines the additional text of the component.\n */\n additionalText = input<typeof _ComboBoxItem.prototype.additionalText | undefined>();\n\n /**\n * Defines the text of the component.\n */\n text = input<typeof _ComboBoxItem.prototype.text | undefined>();\n\n /**\n * Defines the value of the `ui5-cb-item`.\n\nUse this property to associate a unique identifier or machine-readable value with the item,\nseparate from the display text. This enables:\n- Selecting items programmatically via `selectedValue` on the ComboBox\n- Submitting machine-readable values in forms\n- Distinguishing between items with identical display text\n\n**When to use:**\n- **Recommended:** Use the `value` property on items together with `selectedValue` on the ComboBox when you need unique identifiers\n- Omit `value` if the display text (`text` property) is sufficient for your use case\n\n**Example:**\n```html\n<ui5-combobox selected-value=\"DE\">\n <ui5-cb-item text=\"Germany\" value=\"DE\"></ui5-cb-item>\n <ui5-cb-item text=\"France\" value=\"FR\"></ui5-cb-item>\n</ui5-combobox>\n```\n */\n value = input<typeof _ComboBoxItem.prototype.value | undefined>(); // className is now passed\n\n\n\n\n\n public elementRef: ElementRef<_ComboBoxItem> = inject(ElementRef);\n public injector = inject(Injector);\n\n /**\n * Content density observer is injected to activate automatic CSS class and\n * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.\n * @private\n */\n private readonly _contentDensityObserver = inject(ContentDensityObserver);\n\n get element(): _ComboBoxItem {\n return this.elementRef.nativeElement;\n }\n\n ngAfterViewInit(): void {\n const wcElement = this.element;\n \n const inputsToSync = [\n 'additionalText',\n 'text',\n 'value',\n ];\n \n // Synchronize inputs (properties)\n for (const inputName of inputsToSync) {\n // Find the corresponding camelCase signal property on the Angular component\n const signalName = inputName.replace(/-./g, (x: string) => x[1].toUpperCase());\n\n // Use the Injector to run the effect in the correct context\n if (this[signalName] && typeof this[signalName] === 'function') {\n runInInjectionContext(this.injector, () => {\n effect(() => {\n // Read the signal value\n const value = this[signalName]();\n if (wcElement) {\n // Write the value to the Web Component's property\n wcElement[inputName] = value;\n }\n });\n });\n }\n }\n \n \n \n\n }\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAuCa,YAAY,CAAA;AAZzB,IAAA,WAAA,GAAA;AAcE;;AAEG;QACH,IAAA,CAAA,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAA6D;AAEnF;;AAEG;QACH,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAmD;AAE/D;;;;;;;;;;;;;;;;;;;;AAoBG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAoD,CAAC;
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-ui5-webcomponents-combo-box-item.mjs","sources":["../../../../libs/ui5-webcomponents/combo-box-item/index.ts","../../../../libs/ui5-webcomponents/combo-box-item/fundamental-ngx-ui5-webcomponents-combo-box-item.ts"],"sourcesContent":["\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n input,\n output,\n AfterViewInit,\n effect,\n runInInjectionContext,\n inject,\n Injector,\n booleanAttribute,\n computed,\n signal\n} from '@angular/core';\nimport '@ui5/webcomponents/dist/ComboBoxItem.js';\nimport { default as _ComboBoxItem } from '@ui5/webcomponents/dist/ComboBoxItem.js';\nimport { UI5CustomEvent } from '@ui5/webcomponents-base';\nimport {\n ContentDensityObserver,\n contentDensityObserverProviders,\n ContentDensityMode\n} from '@fundamental-ngx/core/content-density';\n\n\n\n@Component({\n standalone: true,\n selector: 'ui5-cb-item, [ui5-cb-item]',\n template: '<ng-content></ng-content>',\n exportAs: 'ui5ComboBoxItem',\n providers: [\n contentDensityObserverProviders({\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]\n })\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComboBoxItem implements AfterViewInit {\n\n /**\n * Defines the additional text of the component.\n */\n additionalText = input<typeof _ComboBoxItem.prototype.additionalText | undefined>();\n\n /**\n * Defines the text of the component.\n */\n text = input<typeof _ComboBoxItem.prototype.text | undefined>();\n\n /**\n * Defines the value of the `ui5-cb-item`.\n\nUse this property to associate a unique identifier or machine-readable value with the item,\nseparate from the display text. This enables:\n- Selecting items programmatically via `selectedValue` on the ComboBox\n- Submitting machine-readable values in forms\n- Distinguishing between items with identical display text\n\n**When to use:**\n- **Recommended:** Use the `value` property on items together with `selectedValue` on the ComboBox when you need unique identifiers\n- Omit `value` if the display text (`text` property) is sufficient for your use case\n\n**Example:**\n```html\n<ui5-combobox selected-value=\"DE\">\n <ui5-cb-item text=\"Germany\" value=\"DE\"></ui5-cb-item>\n <ui5-cb-item text=\"France\" value=\"FR\"></ui5-cb-item>\n</ui5-combobox>\n```\n */\n value = input<typeof _ComboBoxItem.prototype.value | undefined>(); // className is now passed\n\n\n\n /**\n * Fired when the component is activated either with a mouse/tap or by using the Enter or Space key.\n\n**Note:** The event will not be fired if the `disabled` property is set to `true`.\n */\n ui5Click = output<UI5CustomEvent<_ComboBoxItem, 'click'>>();\n\n\n public elementRef: ElementRef<_ComboBoxItem> = inject(ElementRef);\n public injector = inject(Injector);\n\n /**\n * Content density observer is injected to activate automatic CSS class and\n * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.\n * @private\n */\n private readonly _contentDensityObserver = inject(ContentDensityObserver);\n\n get element(): _ComboBoxItem {\n return this.elementRef.nativeElement;\n }\n\n ngAfterViewInit(): void {\n const wcElement = this.element;\n \n const inputsToSync = [\n 'additionalText',\n 'text',\n 'value',\n ];\n \n // Synchronize inputs (properties)\n for (const inputName of inputsToSync) {\n // Find the corresponding camelCase signal property on the Angular component\n const signalName = inputName.replace(/-./g, (x: string) => x[1].toUpperCase());\n\n // Use the Injector to run the effect in the correct context\n if (this[signalName] && typeof this[signalName] === 'function') {\n runInInjectionContext(this.injector, () => {\n effect(() => {\n // Read the signal value\n const value = this[signalName]();\n if (wcElement) {\n // Write the value to the Web Component's property\n wcElement[inputName] = value;\n }\n });\n });\n }\n }\n \n \n const outputsToSync = [\n 'ui5Click',\n ];\n \n // Synchronize outputs (events)\n for (const outputName of outputsToSync) {\n // Map Angular output name to UI5 web component event name\n const eventName = outputName.replace('ui5', '').replace(/([A-Z])/g, '-$1').toLowerCase().substring(1);\n // Ensure the output property exists and has an emit function before adding listener\n if (this[outputName] && typeof this[outputName].emit === 'function' && wcElement.addEventListener) {\n // Cast the listener to the correct type to satisfy TypeScript\n wcElement.addEventListener(eventName, (e) => {\n\n this[outputName].emit(e as CustomEvent<any>);\n });\n }\n }\n \n\n }\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAuCa,YAAY,CAAA;AAZzB,IAAA,WAAA,GAAA;AAcE;;AAEG;QACH,IAAA,CAAA,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAA6D;AAEnF;;AAEG;QACH,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAmD;AAE/D;;;;;;;;;;;;;;;;;;;;AAoBG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAoD,CAAC;AAIlE;;;;AAIG;QACH,IAAA,CAAA,QAAQ,GAAG,MAAM,EAA0C;AAGpD,QAAA,IAAA,CAAA,UAAU,GAA8B,MAAM,CAAC,UAAU,CAAC;AAC1D,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAElC;;;;AAIG;AACc,QAAA,IAAA,CAAA,uBAAuB,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAwD1E,IAAA;AAtDC,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa;IACtC;IAEA,eAAe,GAAA;AACb,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO;AAE9B,QAAA,MAAM,YAAY,GAAG;YACnB,gBAAgB;YAChB,MAAM;YACN,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C,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,SAAS,EAAE;AACT,wBAAA,+BAA+B,CAAC;4BAC9B,uBAAuB,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,CAAC,IAAI;yBAC9E;AACF,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;ACtCD;;AAEG;;;;"}
|
|
@@ -13,9 +13,17 @@ class FormGroup {
|
|
|
13
13
|
* Defines id (or many ids) of the element (or elements) that label the component.
|
|
14
14
|
*/
|
|
15
15
|
this.accessibleNameRef = input(...(ngDevMode ? [undefined, { debugName: "accessibleNameRef" }] : []));
|
|
16
|
+
/**
|
|
17
|
+
* Defines the number of columns to distribute the form content by breakpoint (S1 M2 L3 XL4 for example).
|
|
18
|
+
|
|
19
|
+
**Note:** This property is ignored if `columnSpan` is set, as it is expected that the column span is defined.
|
|
20
|
+
*/
|
|
21
|
+
this.colSpan = input(...(ngDevMode ? [undefined, { debugName: "colSpan" }] : []));
|
|
16
22
|
/**
|
|
17
23
|
* Defines column span of the component,
|
|
18
24
|
e.g how many columns the group should span to.
|
|
25
|
+
|
|
26
|
+
**Note:** If this property is set, it has higher priority than `colSpan` and `colSpan` will be ignored.
|
|
19
27
|
*/
|
|
20
28
|
this.columnSpan = input(...(ngDevMode ? [undefined, { debugName: "columnSpan" }] : []));
|
|
21
29
|
/**
|
|
@@ -69,6 +77,7 @@ class FormGroup {
|
|
|
69
77
|
const inputsToSync = [
|
|
70
78
|
'accessibleName',
|
|
71
79
|
'accessibleNameRef',
|
|
80
|
+
'colSpan',
|
|
72
81
|
'columnSpan',
|
|
73
82
|
'headerLevel',
|
|
74
83
|
'headerText',
|
|
@@ -93,7 +102,7 @@ class FormGroup {
|
|
|
93
102
|
}
|
|
94
103
|
}
|
|
95
104
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FormGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
96
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: FormGroup, isStandalone: true, selector: "ui5-form-group, [ui5-form-group]", inputs: { accessibleName: { classPropertyName: "accessibleName", publicName: "accessibleName", isSignal: true, isRequired: false, transformFunction: null }, accessibleNameRef: { classPropertyName: "accessibleNameRef", publicName: "accessibleNameRef", isSignal: true, isRequired: false, transformFunction: null }, columnSpan: { classPropertyName: "columnSpan", publicName: "columnSpan", isSignal: true, isRequired: false, transformFunction: null }, headerLevel: { classPropertyName: "headerLevel", publicName: "headerLevel", isSignal: true, isRequired: false, transformFunction: null }, headerText: { classPropertyName: "headerText", publicName: "headerText", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
105
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: FormGroup, isStandalone: true, selector: "ui5-form-group, [ui5-form-group]", inputs: { accessibleName: { classPropertyName: "accessibleName", publicName: "accessibleName", isSignal: true, isRequired: false, transformFunction: null }, accessibleNameRef: { classPropertyName: "accessibleNameRef", publicName: "accessibleNameRef", isSignal: true, isRequired: false, transformFunction: null }, colSpan: { classPropertyName: "colSpan", publicName: "colSpan", isSignal: true, isRequired: false, transformFunction: null }, columnSpan: { classPropertyName: "columnSpan", publicName: "columnSpan", isSignal: true, isRequired: false, transformFunction: null }, headerLevel: { classPropertyName: "headerLevel", publicName: "headerLevel", isSignal: true, isRequired: false, transformFunction: null }, headerText: { classPropertyName: "headerText", publicName: "headerText", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
97
106
|
contentDensityObserverProviders({
|
|
98
107
|
supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]
|
|
99
108
|
})
|
|
@@ -113,7 +122,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
113
122
|
],
|
|
114
123
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
115
124
|
}]
|
|
116
|
-
}], propDecorators: { accessibleName: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibleName", required: false }] }], accessibleNameRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibleNameRef", required: false }] }], columnSpan: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnSpan", required: false }] }], headerLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerLevel", required: false }] }], headerText: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerText", required: false }] }] } });
|
|
125
|
+
}], propDecorators: { accessibleName: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibleName", required: false }] }], accessibleNameRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibleNameRef", required: false }] }], colSpan: [{ type: i0.Input, args: [{ isSignal: true, alias: "colSpan", required: false }] }], columnSpan: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnSpan", required: false }] }], headerLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerLevel", required: false }] }], headerText: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerText", required: false }] }] } });
|
|
117
126
|
|
|
118
127
|
/**
|
|
119
128
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-ui5-webcomponents-form-group.mjs","sources":["../../../../libs/ui5-webcomponents/form-group/index.ts","../../../../libs/ui5-webcomponents/form-group/fundamental-ngx-ui5-webcomponents-form-group.ts"],"sourcesContent":["\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n input,\n output,\n AfterViewInit,\n effect,\n runInInjectionContext,\n inject,\n Injector,\n booleanAttribute,\n computed,\n signal\n} from '@angular/core';\nimport '@ui5/webcomponents/dist/FormGroup.js';\nimport { default as _FormGroup } from '@ui5/webcomponents/dist/FormGroup.js';\nimport { UI5CustomEvent } from '@ui5/webcomponents-base';\nimport {\n ContentDensityObserver,\n contentDensityObserverProviders,\n ContentDensityMode\n} from '@fundamental-ngx/core/content-density';\n\nimport { default as TitleLevel } from '@ui5/webcomponents/dist/types/TitleLevel.js';\n\n@Component({\n standalone: true,\n selector: 'ui5-form-group, [ui5-form-group]',\n template: '<ng-content></ng-content>',\n exportAs: 'ui5FormGroup',\n providers: [\n contentDensityObserverProviders({\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]\n })\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormGroup implements AfterViewInit {\n\n /**\n * Defines the accessible ARIA name of the component.\n */\n accessibleName = input<typeof _FormGroup.prototype.accessibleName | undefined>();\n\n /**\n * Defines id (or many ids) of the element (or elements) that label the component.\n */\n accessibleNameRef = input<typeof _FormGroup.prototype.accessibleNameRef | undefined>();\n\n /**\n * Defines column span of the component,\ne.g how many columns the group should span to.\n */\n columnSpan = input<typeof _FormGroup.prototype.columnSpan | undefined>();\n\n /**\n * Defines the compoennt heading level,\nset by the `headerText`.\n */\n headerLevel = input<typeof _FormGroup.prototype.headerLevel | undefined>(\"H3\");\n\n /**\n * Defines header text of the component.\n */\n headerText = input<typeof _FormGroup.prototype.headerText | undefined>(); // className is now passed\n\n\n\n\n /**\n * Available slots for content projection in this component.\n *\n * Slots allow you to insert custom content into predefined areas of the web component.\n * Use the `slot` attribute on child elements to target specific slots.\n *\n * - **(default)**: Defines the items of the component.\n *\n * @example\n * ```html\n * <ui5-form-group>\n * <div slot=\"header\">Custom header content</div>\n * <p>Default slot content</p>\n * </ui5-form-group>\n * ```\n *\n * @readonly\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots | MDN Web Components Slots}\n */\n readonly slots = [\n {\n \"name\": \"default\",\n \"description\": \"Defines the items of the component.\"\n }\n ];\n\n\n public elementRef: ElementRef<_FormGroup> = inject(ElementRef);\n public injector = inject(Injector);\n\n /**\n * Content density observer is injected to activate automatic CSS class and\n * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.\n * @private\n */\n private readonly _contentDensityObserver = inject(ContentDensityObserver);\n\n get element(): _FormGroup {\n return this.elementRef.nativeElement;\n }\n\n ngAfterViewInit(): void {\n const wcElement = this.element;\n \n const inputsToSync = [\n 'accessibleName',\n 'accessibleNameRef',\n 'columnSpan',\n 'headerLevel',\n 'headerText',\n ];\n \n // Synchronize inputs (properties)\n for (const inputName of inputsToSync) {\n // Find the corresponding camelCase signal property on the Angular component\n const signalName = inputName.replace(/-./g, (x: string) => x[1].toUpperCase());\n\n // Use the Injector to run the effect in the correct context\n if (this[signalName] && typeof this[signalName] === 'function') {\n runInInjectionContext(this.injector, () => {\n effect(() => {\n // Read the signal value\n const value = this[signalName]();\n if (wcElement) {\n // Write the value to the Web Component's property\n wcElement[inputName] = value;\n }\n });\n });\n }\n }\n \n \n \n\n }\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAuCa,SAAS,CAAA;AAZtB,IAAA,WAAA,GAAA;AAcE;;AAEG;QACH,IAAA,CAAA,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAA0D;AAEhF;;AAEG;QACH,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,mBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAA6D;AAEtF
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-ui5-webcomponents-form-group.mjs","sources":["../../../../libs/ui5-webcomponents/form-group/index.ts","../../../../libs/ui5-webcomponents/form-group/fundamental-ngx-ui5-webcomponents-form-group.ts"],"sourcesContent":["\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n input,\n output,\n AfterViewInit,\n effect,\n runInInjectionContext,\n inject,\n Injector,\n booleanAttribute,\n computed,\n signal\n} from '@angular/core';\nimport '@ui5/webcomponents/dist/FormGroup.js';\nimport { default as _FormGroup } from '@ui5/webcomponents/dist/FormGroup.js';\nimport { UI5CustomEvent } from '@ui5/webcomponents-base';\nimport {\n ContentDensityObserver,\n contentDensityObserverProviders,\n ContentDensityMode\n} from '@fundamental-ngx/core/content-density';\n\nimport { default as TitleLevel } from '@ui5/webcomponents/dist/types/TitleLevel.js';\n\n@Component({\n standalone: true,\n selector: 'ui5-form-group, [ui5-form-group]',\n template: '<ng-content></ng-content>',\n exportAs: 'ui5FormGroup',\n providers: [\n contentDensityObserverProviders({\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]\n })\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormGroup implements AfterViewInit {\n\n /**\n * Defines the accessible ARIA name of the component.\n */\n accessibleName = input<typeof _FormGroup.prototype.accessibleName | undefined>();\n\n /**\n * Defines id (or many ids) of the element (or elements) that label the component.\n */\n accessibleNameRef = input<typeof _FormGroup.prototype.accessibleNameRef | undefined>();\n\n /**\n * Defines the number of columns to distribute the form content by breakpoint (S1 M2 L3 XL4 for example).\n\n**Note:** This property is ignored if `columnSpan` is set, as it is expected that the column span is defined.\n */\n colSpan = input<typeof _FormGroup.prototype.colSpan | undefined>();\n\n /**\n * Defines column span of the component,\ne.g how many columns the group should span to.\n\n**Note:** If this property is set, it has higher priority than `colSpan` and `colSpan` will be ignored.\n */\n columnSpan = input<typeof _FormGroup.prototype.columnSpan | undefined>();\n\n /**\n * Defines the compoennt heading level,\nset by the `headerText`.\n */\n headerLevel = input<typeof _FormGroup.prototype.headerLevel | undefined>(\"H3\");\n\n /**\n * Defines header text of the component.\n */\n headerText = input<typeof _FormGroup.prototype.headerText | undefined>(); // className is now passed\n\n\n\n\n /**\n * Available slots for content projection in this component.\n *\n * Slots allow you to insert custom content into predefined areas of the web component.\n * Use the `slot` attribute on child elements to target specific slots.\n *\n * - **(default)**: Defines the items of the component.\n *\n * @example\n * ```html\n * <ui5-form-group>\n * <div slot=\"header\">Custom header content</div>\n * <p>Default slot content</p>\n * </ui5-form-group>\n * ```\n *\n * @readonly\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots | MDN Web Components Slots}\n */\n readonly slots = [\n {\n \"name\": \"default\",\n \"description\": \"Defines the items of the component.\"\n }\n ];\n\n\n public elementRef: ElementRef<_FormGroup> = inject(ElementRef);\n public injector = inject(Injector);\n\n /**\n * Content density observer is injected to activate automatic CSS class and\n * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.\n * @private\n */\n private readonly _contentDensityObserver = inject(ContentDensityObserver);\n\n get element(): _FormGroup {\n return this.elementRef.nativeElement;\n }\n\n ngAfterViewInit(): void {\n const wcElement = this.element;\n \n const inputsToSync = [\n 'accessibleName',\n 'accessibleNameRef',\n 'colSpan',\n 'columnSpan',\n 'headerLevel',\n 'headerText',\n ];\n \n // Synchronize inputs (properties)\n for (const inputName of inputsToSync) {\n // Find the corresponding camelCase signal property on the Angular component\n const signalName = inputName.replace(/-./g, (x: string) => x[1].toUpperCase());\n\n // Use the Injector to run the effect in the correct context\n if (this[signalName] && typeof this[signalName] === 'function') {\n runInInjectionContext(this.injector, () => {\n effect(() => {\n // Read the signal value\n const value = this[signalName]();\n if (wcElement) {\n // Write the value to the Web Component's property\n wcElement[inputName] = value;\n }\n });\n });\n }\n }\n \n \n \n\n }\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAuCa,SAAS,CAAA;AAZtB,IAAA,WAAA,GAAA;AAcE;;AAEG;QACH,IAAA,CAAA,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAA0D;AAEhF;;AAEG;QACH,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SA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AAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;ACtCD;;AAEG;;;;"}
|
|
@@ -85,6 +85,9 @@ class Form {
|
|
|
85
85
|
|
|
86
86
|
**Note:** Mixing FormGroups and standalone FormItems (not belonging to a group) is not supported.
|
|
87
87
|
Either use FormGroups and make sure all FormItems are part of a FormGroup, or use just FormItems without any FormGroups.
|
|
88
|
+
|
|
89
|
+
**Note:** As of version 2.23.0 the support for standalone FormItems (not belonging to a group) is deprecated.
|
|
90
|
+
We recommend using FormGroups, as they provide better accessibility and layout options.
|
|
88
91
|
* - **header**: Defines the component header area.
|
|
89
92
|
|
|
90
93
|
**Note:** When a `header` is provided, the `headerText` property is ignored.
|
|
@@ -103,7 +106,7 @@ class Form {
|
|
|
103
106
|
this.slots = [
|
|
104
107
|
{
|
|
105
108
|
"name": "default",
|
|
106
|
-
"description": "Defines the component content - FormGroups or FormItems.\n\n**Note:** Mixing FormGroups and standalone FormItems (not belonging to a group) is not supported.\nEither use FormGroups and make sure all FormItems are part of a FormGroup, or use just FormItems without any FormGroups."
|
|
109
|
+
"description": "Defines the component content - FormGroups or FormItems.\n\n**Note:** Mixing FormGroups and standalone FormItems (not belonging to a group) is not supported.\nEither use FormGroups and make sure all FormItems are part of a FormGroup, or use just FormItems without any FormGroups.\n\n**Note:** As of version 2.23.0 the support for standalone FormItems (not belonging to a group) is deprecated.\nWe recommend using FormGroups, as they provide better accessibility and layout options."
|
|
107
110
|
},
|
|
108
111
|
{
|
|
109
112
|
"name": "header",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-ui5-webcomponents-form.mjs","sources":["../../../../libs/ui5-webcomponents/form/index.ts","../../../../libs/ui5-webcomponents/form/fundamental-ngx-ui5-webcomponents-form.ts"],"sourcesContent":["\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n input,\n output,\n AfterViewInit,\n effect,\n runInInjectionContext,\n inject,\n Injector,\n booleanAttribute,\n computed,\n signal\n} from '@angular/core';\nimport '@ui5/webcomponents/dist/Form.js';\nimport { default as _Form } from '@ui5/webcomponents/dist/Form.js';\nimport { UI5CustomEvent } from '@ui5/webcomponents-base';\nimport {\n ContentDensityObserver,\n contentDensityObserverProviders,\n ContentDensityMode\n} from '@fundamental-ngx/core/content-density';\n\nimport { default as FormAccessibleMode } from '@ui5/webcomponents/dist/types/FormAccessibleMode.js';\nimport { default as TitleLevel } from '@ui5/webcomponents/dist/types/TitleLevel.js';\nimport { default as FormItemSpacing } from '@ui5/webcomponents/dist/types/FormItemSpacing.js';\n\n@Component({\n standalone: true,\n selector: 'ui5-form, [ui5-form]',\n template: '<ng-content></ng-content>',\n exportAs: 'ui5Form',\n providers: [\n contentDensityObserverProviders({\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]\n })\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Form implements AfterViewInit {\n\n /**\n * Defines the accessibility mode of the component in \"edit\" and \"display\" use-cases.\n\nBased on the mode, the component renders different HTML elements and ARIA attributes,\nwhich are appropriate for the use-case.\n\n**Usage:**\n- Set this property to \"Display\", when the form consists of non-editable (e.g. texts) form items.\n- Set this property to \"Edit\", when the form consists of editable (e.g. input fields) form items.\n */\n accessibleMode = input<typeof _Form.prototype.accessibleMode | undefined>(\"Display\");\n\n /**\n * Defines the accessible ARIA name of the component.\n */\n accessibleName = input<typeof _Form.prototype.accessibleName | undefined>();\n\n /**\n * Defines id (or many ids) of the element (or elements) that label the component.\n */\n accessibleNameRef = input<typeof _Form.prototype.accessibleNameRef | undefined>();\n\n /**\n * Defines the number of cells that are empty at the end of each form item, configurable by breakpoint.\n\nBy default, a form item spans 12 cells, fully divided between its label (4 cells) and field (8 cells), with no empty space at the end.\nThe `emptySpan` provides additional layout flexibility by defining empty space at the form item’s end.\n\n**Note:**\n- The maximum allowable empty space is 10 cells. At least 1 cell each must remain for the label and the field.\n- When `emptySpan` is specified (greater than 0), ensure that the combined value of `emptySpan` and `labelSpan` does not exceed 11. This guarantees a minimum of 1 cell for the field.\n */\n emptySpan = input<typeof _Form.prototype.emptySpan | undefined>(\"S0 M0 L0 XL0\");\n\n /**\n * Defines the compoennt heading level,\nset by the `headerText`.\n */\n headerLevel = input<typeof _Form.prototype.headerLevel | undefined>(\"H2\");\n\n /**\n * Defines the header text of the component.\n\n**Note:** The property gets overridden by the `header` slot.\n */\n headerText = input<typeof _Form.prototype.headerText | undefined>();\n\n /**\n * Defines the vertical spacing between form items.\n\n**Note:** If the Form is meant to be switched between \"display\"(\"non-edit\") and \"edit\" modes,\nwe recommend using \"Large\" item spacing in \"display\"(\"non-edit\") mode, and \"Normal\" - for \"edit\" mode,\nto avoid \"jumping\" effect, caused by the hight difference between texts in \"display\"(\"non-edit\") mode and the input fields in \"edit\" mode.\n */\n itemSpacing = input<typeof _Form.prototype.itemSpacing | undefined>(\"Normal\");\n\n /**\n * Defines the width proportion of the labels and fields of a form item by breakpoint.\n\nBy default, the labels take 4/12 (or 1/3) of the form item in M,L and XL sizes,\nand 12/12 in S size, e.g in S the label is on top of its associated field.\n\nThe supported values are between 1 and 12. Greater the number, more space the label will use.\n\n**Note:** If \"12\" is set, the label will be displayed on top of its assosiated field.\n */\n labelSpan = input<typeof _Form.prototype.labelSpan | undefined>(\"S12 M4 L4 XL4\");\n\n /**\n * Defines the number of columns to distribute the form content by breakpoint.\n\nSupported values:\n- `S` - 1 column by default (1 column is recommended)\n- `M` - 1 column by default (up to 2 columns are recommended)\n- `L` - 2 columns by default (up to 3 columns are recommended)\n- `XL` - 3 columns by default (up to 6 columns are recommended)\n */\n layout = input<typeof _Form.prototype.layout | undefined>(\"S1 M1 L2 XL3\"); // className is now passed\n\n\n\n\n /**\n * Available slots for content projection in this component.\n *\n * Slots allow you to insert custom content into predefined areas of the web component.\n * Use the `slot` attribute on child elements to target specific slots.\n *\n * - **(default)**: Defines the component content - FormGroups or FormItems.\n\n**Note:** Mixing FormGroups and standalone FormItems (not belonging to a group) is not supported.\nEither use FormGroups and make sure all FormItems are part of a FormGroup, or use just FormItems without any FormGroups.\n * - **header**: Defines the component header area.\n\n**Note:** When a `header` is provided, the `headerText` property is ignored.\n *\n * @example\n * ```html\n * <ui5-form>\n * <div slot=\"header\">Custom header content</div>\n * <p>Default slot content</p>\n * </ui5-form>\n * ```\n *\n * @readonly\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots | MDN Web Components Slots}\n */\n readonly slots = [\n {\n \"name\": \"default\",\n \"description\": \"Defines the component content - FormGroups or FormItems.\\n\\n**Note:** Mixing FormGroups and standalone FormItems (not belonging to a group) is not supported.\\nEither use FormGroups and make sure all FormItems are part of a FormGroup, or use just FormItems without any FormGroups.\"\n },\n {\n \"name\": \"header\",\n \"description\": \"Defines the component header area.\\n\\n**Note:** When a `header` is provided, the `headerText` property is ignored.\"\n }\n ];\n\n\n public elementRef: ElementRef<_Form> = inject(ElementRef);\n public injector = inject(Injector);\n\n /**\n * Content density observer is injected to activate automatic CSS class and\n * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.\n * @private\n */\n private readonly _contentDensityObserver = inject(ContentDensityObserver);\n\n get element(): _Form {\n return this.elementRef.nativeElement;\n }\n\n ngAfterViewInit(): void {\n const wcElement = this.element;\n \n const inputsToSync = [\n 'accessibleMode',\n 'accessibleName',\n 'accessibleNameRef',\n 'emptySpan',\n 'headerLevel',\n 'headerText',\n 'itemSpacing',\n 'labelSpan',\n 'layout',\n ];\n \n // Synchronize inputs (properties)\n for (const inputName of inputsToSync) {\n // Find the corresponding camelCase signal property on the Angular component\n const signalName = inputName.replace(/-./g, (x: string) => x[1].toUpperCase());\n\n // Use the Injector to run the effect in the correct context\n if (this[signalName] && typeof this[signalName] === 'function') {\n runInInjectionContext(this.injector, () => {\n effect(() => {\n // Read the signal value\n const value = this[signalName]();\n if (wcElement) {\n // Write the value to the Web Component's property\n wcElement[inputName] = value;\n }\n });\n });\n }\n }\n \n \n \n\n }\n}\n\n","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.mjs","sources":["../../../../libs/ui5-webcomponents/form/index.ts","../../../../libs/ui5-webcomponents/form/fundamental-ngx-ui5-webcomponents-form.ts"],"sourcesContent":["\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n input,\n output,\n AfterViewInit,\n effect,\n runInInjectionContext,\n inject,\n Injector,\n booleanAttribute,\n computed,\n signal\n} from '@angular/core';\nimport '@ui5/webcomponents/dist/Form.js';\nimport { default as _Form } from '@ui5/webcomponents/dist/Form.js';\nimport { UI5CustomEvent } from '@ui5/webcomponents-base';\nimport {\n ContentDensityObserver,\n contentDensityObserverProviders,\n ContentDensityMode\n} from '@fundamental-ngx/core/content-density';\n\nimport { default as FormAccessibleMode } from '@ui5/webcomponents/dist/types/FormAccessibleMode.js';\nimport { default as TitleLevel } from '@ui5/webcomponents/dist/types/TitleLevel.js';\nimport { default as FormItemSpacing } from '@ui5/webcomponents/dist/types/FormItemSpacing.js';\n\n@Component({\n standalone: true,\n selector: 'ui5-form, [ui5-form]',\n template: '<ng-content></ng-content>',\n exportAs: 'ui5Form',\n providers: [\n contentDensityObserverProviders({\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]\n })\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Form implements AfterViewInit {\n\n /**\n * Defines the accessibility mode of the component in \"edit\" and \"display\" use-cases.\n\nBased on the mode, the component renders different HTML elements and ARIA attributes,\nwhich are appropriate for the use-case.\n\n**Usage:**\n- Set this property to \"Display\", when the form consists of non-editable (e.g. texts) form items.\n- Set this property to \"Edit\", when the form consists of editable (e.g. input fields) form items.\n */\n accessibleMode = input<typeof _Form.prototype.accessibleMode | undefined>(\"Display\");\n\n /**\n * Defines the accessible ARIA name of the component.\n */\n accessibleName = input<typeof _Form.prototype.accessibleName | undefined>();\n\n /**\n * Defines id (or many ids) of the element (or elements) that label the component.\n */\n accessibleNameRef = input<typeof _Form.prototype.accessibleNameRef | undefined>();\n\n /**\n * Defines the number of cells that are empty at the end of each form item, configurable by breakpoint.\n\nBy default, a form item spans 12 cells, fully divided between its label (4 cells) and field (8 cells), with no empty space at the end.\nThe `emptySpan` provides additional layout flexibility by defining empty space at the form item’s end.\n\n**Note:**\n- The maximum allowable empty space is 10 cells. At least 1 cell each must remain for the label and the field.\n- When `emptySpan` is specified (greater than 0), ensure that the combined value of `emptySpan` and `labelSpan` does not exceed 11. This guarantees a minimum of 1 cell for the field.\n */\n emptySpan = input<typeof _Form.prototype.emptySpan | undefined>(\"S0 M0 L0 XL0\");\n\n /**\n * Defines the compoennt heading level,\nset by the `headerText`.\n */\n headerLevel = input<typeof _Form.prototype.headerLevel | undefined>(\"H2\");\n\n /**\n * Defines the header text of the component.\n\n**Note:** The property gets overridden by the `header` slot.\n */\n headerText = input<typeof _Form.prototype.headerText | undefined>();\n\n /**\n * Defines the vertical spacing between form items.\n\n**Note:** If the Form is meant to be switched between \"display\"(\"non-edit\") and \"edit\" modes,\nwe recommend using \"Large\" item spacing in \"display\"(\"non-edit\") mode, and \"Normal\" - for \"edit\" mode,\nto avoid \"jumping\" effect, caused by the hight difference between texts in \"display\"(\"non-edit\") mode and the input fields in \"edit\" mode.\n */\n itemSpacing = input<typeof _Form.prototype.itemSpacing | undefined>(\"Normal\");\n\n /**\n * Defines the width proportion of the labels and fields of a form item by breakpoint.\n\nBy default, the labels take 4/12 (or 1/3) of the form item in M,L and XL sizes,\nand 12/12 in S size, e.g in S the label is on top of its associated field.\n\nThe supported values are between 1 and 12. Greater the number, more space the label will use.\n\n**Note:** If \"12\" is set, the label will be displayed on top of its assosiated field.\n */\n labelSpan = input<typeof _Form.prototype.labelSpan | undefined>(\"S12 M4 L4 XL4\");\n\n /**\n * Defines the number of columns to distribute the form content by breakpoint.\n\nSupported values:\n- `S` - 1 column by default (1 column is recommended)\n- `M` - 1 column by default (up to 2 columns are recommended)\n- `L` - 2 columns by default (up to 3 columns are recommended)\n- `XL` - 3 columns by default (up to 6 columns are recommended)\n */\n layout = input<typeof _Form.prototype.layout | undefined>(\"S1 M1 L2 XL3\"); // className is now passed\n\n\n\n\n /**\n * Available slots for content projection in this component.\n *\n * Slots allow you to insert custom content into predefined areas of the web component.\n * Use the `slot` attribute on child elements to target specific slots.\n *\n * - **(default)**: Defines the component content - FormGroups or FormItems.\n\n**Note:** Mixing FormGroups and standalone FormItems (not belonging to a group) is not supported.\nEither use FormGroups and make sure all FormItems are part of a FormGroup, or use just FormItems without any FormGroups.\n\n**Note:** As of version 2.23.0 the support for standalone FormItems (not belonging to a group) is deprecated.\nWe recommend using FormGroups, as they provide better accessibility and layout options.\n * - **header**: Defines the component header area.\n\n**Note:** When a `header` is provided, the `headerText` property is ignored.\n *\n * @example\n * ```html\n * <ui5-form>\n * <div slot=\"header\">Custom header content</div>\n * <p>Default slot content</p>\n * </ui5-form>\n * ```\n *\n * @readonly\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots | MDN Web Components Slots}\n */\n readonly slots = [\n {\n \"name\": \"default\",\n \"description\": \"Defines the component content - FormGroups or FormItems.\\n\\n**Note:** Mixing FormGroups and standalone FormItems (not belonging to a group) is not supported.\\nEither use FormGroups and make sure all FormItems are part of a FormGroup, or use just FormItems without any FormGroups.\\n\\n**Note:** As of version 2.23.0 the support for standalone FormItems (not belonging to a group) is deprecated.\\nWe recommend using FormGroups, as they provide better accessibility and layout options.\"\n },\n {\n \"name\": \"header\",\n \"description\": \"Defines the component header area.\\n\\n**Note:** When a `header` is provided, the `headerText` property is ignored.\"\n }\n ];\n\n\n public elementRef: ElementRef<_Form> = inject(ElementRef);\n public injector = inject(Injector);\n\n /**\n * Content density observer is injected to activate automatic CSS class and\n * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.\n * @private\n */\n private readonly _contentDensityObserver = inject(ContentDensityObserver);\n\n get element(): _Form {\n return this.elementRef.nativeElement;\n }\n\n ngAfterViewInit(): void {\n const wcElement = this.element;\n \n const inputsToSync = [\n 'accessibleMode',\n 'accessibleName',\n 'accessibleNameRef',\n 'emptySpan',\n 'headerLevel',\n 'headerText',\n 'itemSpacing',\n 'labelSpan',\n 'layout',\n ];\n \n // Synchronize inputs (properties)\n for (const inputName of inputsToSync) {\n // Find the corresponding camelCase signal property on the Angular component\n const signalName = inputName.replace(/-./g, (x: string) => x[1].toUpperCase());\n\n // Use the Injector to run the effect in the correct context\n if (this[signalName] && typeof this[signalName] === 'function') {\n runInInjectionContext(this.injector, () => {\n effect(() => {\n // Read the signal value\n const value = this[signalName]();\n if (wcElement) {\n // Write the value to the Web Component's property\n wcElement[inputName] = value;\n }\n });\n });\n }\n }\n \n \n \n\n }\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAyCa,IAAI,CAAA;AAZjB,IAAA,WAAA,GAAA;AAcE;;;;;;;;;AASG;AACH,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAoD,SAAS,0DAAC;AAEpF;;AAEG;QACH,IAAA,CAAA,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAqD;AAE3E;;AAEG;QACH,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,mBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAwD;AAEjF;;;;;;;;;AASG;AACH,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAA+C,cAAc,qDAAC;AAE/E;;;AAGG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAiD,IAAI,uDAAC;AAEzE;;;;AAIG;QACH,IAAA,CAAA,UAAU,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAiD;AAEnE;;;;;;AAMG;A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,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,QAAQ,EAAE,SAAS;AACnB,oBAAA,SAAS,EAAE;AACT,wBAAA,+BAA+B,CAAC;4BAC9B,uBAAuB,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,CAAC,IAAI;yBAC9E;AACF,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;ACxCD;;AAEG;;;;"}
|
|
@@ -58,6 +58,43 @@ class Icon {
|
|
|
58
58
|
**Note:** The event will not be fired if the `mode` property is set to `Decorative` or `Image`.
|
|
59
59
|
*/
|
|
60
60
|
this.ui5Click = output();
|
|
61
|
+
/**
|
|
62
|
+
* Available slots for content projection in this component.
|
|
63
|
+
*
|
|
64
|
+
* Slots allow you to insert custom content into predefined areas of the web component.
|
|
65
|
+
* Use the `slot` attribute on child elements to target specific slots.
|
|
66
|
+
*
|
|
67
|
+
* - **fontIcon**: Defines the font icon to be used as an icon.
|
|
68
|
+
Intended for font-based icon libraries where
|
|
69
|
+
the application loads the font and provides a slotted element with the unicode character.
|
|
70
|
+
When this slot is used, the component renders a `<span>` instead of an `<svg>`.
|
|
71
|
+
Accessibility is fully delegated to the application — set `accessible-name` and `mode` explicitly.
|
|
72
|
+
|
|
73
|
+
**Example:**
|
|
74
|
+
```html
|
|
75
|
+
<ui5-icon mode="Image" accessible-name="Home">
|
|
76
|
+
<i class="fa fa-home" slot="fontIcon"></i>
|
|
77
|
+
</ui5-icon>
|
|
78
|
+
```
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```html
|
|
82
|
+
* <ui5-icon>
|
|
83
|
+
* <div slot="header">Custom header content</div>
|
|
84
|
+
* <p>Default slot content</p>
|
|
85
|
+
* </ui5-icon>
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* @readonly
|
|
89
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots | MDN Web Components Slots}
|
|
90
|
+
*/
|
|
91
|
+
this.slots = [
|
|
92
|
+
{
|
|
93
|
+
"name": "fontIcon",
|
|
94
|
+
"description": "Defines the font icon to be used as an icon.\nIntended for font-based icon libraries where\nthe application loads the font and provides a slotted element with the unicode character.\nWhen this slot is used, the component renders a `<span>` instead of an `<svg>`.\nAccessibility is fully delegated to the application — set `accessible-name` and `mode` explicitly.\n\n**Example:**\n```html\n<ui5-icon mode=\"Image\" accessible-name=\"Home\">\n <i class=\"fa fa-home\" slot=\"fontIcon\"></i>\n</ui5-icon>\n```",
|
|
95
|
+
"since": "2.23.0"
|
|
96
|
+
}
|
|
97
|
+
];
|
|
61
98
|
this.elementRef = inject(ElementRef);
|
|
62
99
|
this.injector = inject(Injector);
|
|
63
100
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-ui5-webcomponents-icon.mjs","sources":["../../../../libs/ui5-webcomponents/icon/index.ts","../../../../libs/ui5-webcomponents/icon/fundamental-ngx-ui5-webcomponents-icon.ts"],"sourcesContent":["\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n input,\n output,\n AfterViewInit,\n effect,\n runInInjectionContext,\n inject,\n Injector,\n booleanAttribute,\n computed,\n signal\n} from '@angular/core';\nimport '@ui5/webcomponents/dist/Icon.js';\nimport { default as _Icon } from '@ui5/webcomponents/dist/Icon.js';\nimport { UI5CustomEvent } from '@ui5/webcomponents-base';\nimport {\n ContentDensityObserver,\n contentDensityObserverProviders,\n ContentDensityMode\n} from '@fundamental-ngx/core/content-density';\n\nimport { default as IconDesign } from '@ui5/webcomponents/dist/types/IconDesign.js';\nimport { default as IconMode } from '@ui5/webcomponents/dist/types/IconMode.js';\n\n@Component({\n standalone: true,\n selector: 'ui5-icon, [ui5-icon]',\n template: '<ng-content></ng-content>',\n exportAs: 'ui5Icon',\n providers: [\n contentDensityObserverProviders({\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]\n })\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Icon implements AfterViewInit {\n\n /**\n * Defines the text alternative of the component.\nIf not provided a default text alternative will be set, if present.\n\n**Note:** Every icon should have a text alternative in order to\ncalculate its accessible name.\n */\n accessibleName = input<typeof _Icon.prototype.accessibleName | undefined>();\n\n /**\n * Defines the component semantic design.\n */\n design = input<typeof _Icon.prototype.design | undefined>(\"Default\");\n\n /**\n * Defines the mode of the component.\n */\n mode = input<typeof _Icon.prototype.mode | undefined>(\"Decorative\");\n\n /**\n * Defines the unique identifier (icon name) of the component.\n\nTo browse all available icons, see the\n[SAP Icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html),\n[SAP Fiori Tools](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT) and\n[SAP Business Suite](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html)\n\nExample:\n`name='add'`, `name='delete'`, `name='employee'`.\n\n**Note:** To use the SAP Fiori Tools icons,\nyou need to set the `tnt` prefix in front of the icon's name.\n\nExample:\n`name='tnt/antenna'`, `name='tnt/actor'`, `name='tnt/api'`.\n\n**Note:** To use the SAP Business Suite icons,\nyou need to set the `business-suite` prefix in front of the icon's name.\n\nExample:\n`name='business-suite/3d'`, `name='business-suite/1x2-grid-layout'`, `name='business-suite/4x4-grid-layout'`.\n */\n name = input<typeof _Icon.prototype.name | undefined>();\n\n /**\n * Defines whether the component should have a tooltip.\n\n**Note:** The tooltip text should be provided via the `accessible-name` property.\n */\n showTooltip = input(false, { transform: booleanAttribute }); // className is now passed\n\n\n\n /**\n * Fired when the component is activated by mouse/touch, keyboard (Enter or Space),\nor screen reader virtual cursor activation.\n\n**Note:** The event will not be fired if the `mode` property is set to `Decorative` or `Image`.\n */\n ui5Click = output<UI5CustomEvent<_Icon, 'click'>>();\n\n\n public elementRef: ElementRef<_Icon> = inject(ElementRef);\n public injector = inject(Injector);\n\n /**\n * Content density observer is injected to activate automatic CSS class and\n * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.\n * @private\n */\n private readonly _contentDensityObserver = inject(ContentDensityObserver);\n\n get element(): _Icon {\n return this.elementRef.nativeElement;\n }\n\n ngAfterViewInit(): void {\n const wcElement = this.element;\n \n const inputsToSync = [\n 'accessibleName',\n 'design',\n 'mode',\n 'name',\n 'showTooltip',\n ];\n \n // Synchronize inputs (properties)\n for (const inputName of inputsToSync) {\n // Find the corresponding camelCase signal property on the Angular component\n const signalName = inputName.replace(/-./g, (x: string) => x[1].toUpperCase());\n\n // Use the Injector to run the effect in the correct context\n if (this[signalName] && typeof this[signalName] === 'function') {\n runInInjectionContext(this.injector, () => {\n effect(() => {\n // Read the signal value\n const value = this[signalName]();\n if (wcElement) {\n // Write the value to the Web Component's property\n wcElement[inputName] = value;\n }\n });\n });\n }\n }\n \n \n const outputsToSync = [\n 'ui5Click',\n ];\n \n // Synchronize outputs (events)\n for (const outputName of outputsToSync) {\n // Map Angular output name to UI5 web component event name\n const eventName = outputName.replace('ui5', '').replace(/([A-Z])/g, '-$1').toLowerCase().substring(1);\n // Ensure the output property exists and has an emit function before adding listener\n if (this[outputName] && typeof this[outputName].emit === 'function' && wcElement.addEventListener) {\n // Cast the listener to the correct type to satisfy TypeScript\n wcElement.addEventListener(eventName, (e) => {\n\n this[outputName].emit(e as CustomEvent<any>);\n });\n }\n }\n \n\n }\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAwCa,IAAI,CAAA;AAZjB,IAAA,WAAA,GAAA;AAcE;;;;;;AAMG;QACH,IAAA,CAAA,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAqD;AAE3E;;AAEG;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AI;AAChB,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,QAAQ,EAAE,SAAS;AACnB,oBAAA,SAAS,EAAE;AACT,wBAAA,+BAA+B,CAAC;4BAC9B,uBAAuB,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,CAAC,IAAI;yBAC9E;AACF,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;ACvCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-ui5-webcomponents-icon.mjs","sources":["../../../../libs/ui5-webcomponents/icon/index.ts","../../../../libs/ui5-webcomponents/icon/fundamental-ngx-ui5-webcomponents-icon.ts"],"sourcesContent":["\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n input,\n output,\n AfterViewInit,\n effect,\n runInInjectionContext,\n inject,\n Injector,\n booleanAttribute,\n computed,\n signal\n} from '@angular/core';\nimport '@ui5/webcomponents/dist/Icon.js';\nimport { default as _Icon } from '@ui5/webcomponents/dist/Icon.js';\nimport { UI5CustomEvent } from '@ui5/webcomponents-base';\nimport {\n ContentDensityObserver,\n contentDensityObserverProviders,\n ContentDensityMode\n} from '@fundamental-ngx/core/content-density';\n\nimport { default as IconDesign } from '@ui5/webcomponents/dist/types/IconDesign.js';\nimport { default as IconMode } from '@ui5/webcomponents/dist/types/IconMode.js';\n\n@Component({\n standalone: true,\n selector: 'ui5-icon, [ui5-icon]',\n template: '<ng-content></ng-content>',\n exportAs: 'ui5Icon',\n providers: [\n contentDensityObserverProviders({\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]\n })\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Icon implements AfterViewInit {\n\n /**\n * Defines the text alternative of the component.\nIf not provided a default text alternative will be set, if present.\n\n**Note:** Every icon should have a text alternative in order to\ncalculate its accessible name.\n */\n accessibleName = input<typeof _Icon.prototype.accessibleName | undefined>();\n\n /**\n * Defines the component semantic design.\n */\n design = input<typeof _Icon.prototype.design | undefined>(\"Default\");\n\n /**\n * Defines the mode of the component.\n */\n mode = input<typeof _Icon.prototype.mode | undefined>(\"Decorative\");\n\n /**\n * Defines the unique identifier (icon name) of the component.\n\nTo browse all available icons, see the\n[SAP Icons](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html),\n[SAP Fiori Tools](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html#/overview/SAP-icons-TNT) and\n[SAP Business Suite](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html)\n\nExample:\n`name='add'`, `name='delete'`, `name='employee'`.\n\n**Note:** To use the SAP Fiori Tools icons,\nyou need to set the `tnt` prefix in front of the icon's name.\n\nExample:\n`name='tnt/antenna'`, `name='tnt/actor'`, `name='tnt/api'`.\n\n**Note:** To use the SAP Business Suite icons,\nyou need to set the `business-suite` prefix in front of the icon's name.\n\nExample:\n`name='business-suite/3d'`, `name='business-suite/1x2-grid-layout'`, `name='business-suite/4x4-grid-layout'`.\n */\n name = input<typeof _Icon.prototype.name | undefined>();\n\n /**\n * Defines whether the component should have a tooltip.\n\n**Note:** The tooltip text should be provided via the `accessible-name` property.\n */\n showTooltip = input(false, { transform: booleanAttribute }); // className is now passed\n\n\n\n /**\n * Fired when the component is activated by mouse/touch, keyboard (Enter or Space),\nor screen reader virtual cursor activation.\n\n**Note:** The event will not be fired if the `mode` property is set to `Decorative` or `Image`.\n */\n ui5Click = output<UI5CustomEvent<_Icon, 'click'>>();\n\n /**\n * Available slots for content projection in this component.\n *\n * Slots allow you to insert custom content into predefined areas of the web component.\n * Use the `slot` attribute on child elements to target specific slots.\n *\n * - **fontIcon**: Defines the font icon to be used as an icon.\nIntended for font-based icon libraries where\nthe application loads the font and provides a slotted element with the unicode character.\nWhen this slot is used, the component renders a `<span>` instead of an `<svg>`.\nAccessibility is fully delegated to the application — set `accessible-name` and `mode` explicitly.\n\n**Example:**\n```html\n<ui5-icon mode=\"Image\" accessible-name=\"Home\">\n <i class=\"fa fa-home\" slot=\"fontIcon\"></i>\n</ui5-icon>\n```\n *\n * @example\n * ```html\n * <ui5-icon>\n * <div slot=\"header\">Custom header content</div>\n * <p>Default slot content</p>\n * </ui5-icon>\n * ```\n *\n * @readonly\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots | MDN Web Components Slots}\n */\n readonly slots = [\n {\n \"name\": \"fontIcon\",\n \"description\": \"Defines the font icon to be used as an icon.\\nIntended for font-based icon libraries where\\nthe application loads the font and provides a slotted element with the unicode character.\\nWhen this slot is used, the component renders a `<span>` instead of an `<svg>`.\\nAccessibility is fully delegated to the application — set `accessible-name` and `mode` explicitly.\\n\\n**Example:**\\n```html\\n<ui5-icon mode=\\\"Image\\\" accessible-name=\\\"Home\\\">\\n <i class=\\\"fa fa-home\\\" slot=\\\"fontIcon\\\"></i>\\n</ui5-icon>\\n```\",\n \"since\": \"2.23.0\"\n }\n ];\n\n\n public elementRef: ElementRef<_Icon> = inject(ElementRef);\n public injector = inject(Injector);\n\n /**\n * Content density observer is injected to activate automatic CSS class and\n * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.\n * @private\n */\n private readonly _contentDensityObserver = inject(ContentDensityObserver);\n\n get element(): _Icon {\n return this.elementRef.nativeElement;\n }\n\n ngAfterViewInit(): void {\n const wcElement = this.element;\n \n const inputsToSync = [\n 'accessibleName',\n 'design',\n 'mode',\n 'name',\n 'showTooltip',\n ];\n \n // Synchronize inputs (properties)\n for (const inputName of inputsToSync) {\n // Find the corresponding camelCase signal property on the Angular component\n const signalName = inputName.replace(/-./g, (x: string) => x[1].toUpperCase());\n\n // Use the Injector to run the effect in the correct context\n if (this[signalName] && typeof this[signalName] === 'function') {\n runInInjectionContext(this.injector, () => {\n effect(() => {\n // Read the signal value\n const value = this[signalName]();\n if (wcElement) {\n // Write the value to the Web Component's property\n wcElement[inputName] = value;\n }\n });\n });\n }\n }\n \n \n const outputsToSync = [\n 'ui5Click',\n ];\n \n // Synchronize outputs (events)\n for (const outputName of outputsToSync) {\n // Map Angular output name to UI5 web component event name\n const eventName = outputName.replace('ui5', '').replace(/([A-Z])/g, '-$1').toLowerCase().substring(1);\n // Ensure the output property exists and has an emit function before adding listener\n if (this[outputName] && typeof this[outputName].emit === 'function' && wcElement.addEventListener) {\n // Cast the listener to the correct type to satisfy TypeScript\n wcElement.addEventListener(eventName, (e) => {\n\n this[outputName].emit(e as CustomEvent<any>);\n });\n }\n }\n \n\n }\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAwCa,IAAI,CAAA;AAZjB,IAAA,WAAA,GAAA;AAcE;;;;;;AAMG;QACH,IAAA,CAAA,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAqD;AAE3E;;AAEG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAA4C,SAAS,kDAAC;AAEpE;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAA0C,YAAY,gDAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;AAsBG;QACH,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAA2C;AAEvD;;;;AAIG;QACH,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,KAAK,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,aAAA,EAAA,GAAA,EAAA,CAAA,EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG,CAAC;AAI5D;;;;;AAKG;QACH,IAAA,CAAA,QAAQ,GAAG,MAAM,EAAkC;AAEnD;;;;;;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**Note**: If not provided a default text alternative will be set, if present.
|
|
23
23
|
*/
|
|
24
24
|
this.accessibleName = input(...(ngDevMode ? [undefined, { debugName: "accessibleName" }] : []));
|
|
25
|
+
/**
|
|
26
|
+
* Used to define the role of the list item.
|
|
27
|
+
|
|
28
|
+
**Note:** If not set, the role is automatically inherited from the parent `ui5-list` based on its `accessible-role` property
|
|
29
|
+
(e.g. `Menu` -> `MenuItem`, `Tree` -> `TreeItem`, `ListBox` -> `Option`).
|
|
30
|
+
An explicitly set `accessible-role` on the list item takes precedence over the inherited role.
|
|
31
|
+
*/
|
|
32
|
+
this.accessibleRole = input(...(ngDevMode ? [undefined, { debugName: "accessibleRole" }] : []));
|
|
25
33
|
/**
|
|
26
34
|
* Defines the highlight state of the list items.
|
|
27
35
|
Available options are: `"None"` (by default), `"Positive"`, `"Critical"`, `"Information"` and `"Negative"`.
|
|
@@ -52,6 +60,12 @@ class ListItemCustom {
|
|
|
52
60
|
while with type `Inactive` and `Detail` - will not.
|
|
53
61
|
*/
|
|
54
62
|
this.type = input("Active", ...(ngDevMode ? [{ debugName: "type" }] : [])); // className is now passed
|
|
63
|
+
/**
|
|
64
|
+
* Fired when the component is activated either with a mouse/tap or by using the Enter or Space key.
|
|
65
|
+
|
|
66
|
+
**Note:** The event will not be fired if the `disabled` property is set to `true`.
|
|
67
|
+
*/
|
|
68
|
+
this.ui5Click = output();
|
|
55
69
|
/**
|
|
56
70
|
* Fired when the user clicks on the detail button when type is `Detail`.
|
|
57
71
|
*/
|
|
@@ -107,6 +121,7 @@ class ListItemCustom {
|
|
|
107
121
|
const inputsToSync = [
|
|
108
122
|
'accessibilityAttributes',
|
|
109
123
|
'accessibleName',
|
|
124
|
+
'accessibleRole',
|
|
110
125
|
'highlight',
|
|
111
126
|
'movable',
|
|
112
127
|
'navigated',
|
|
@@ -133,6 +148,7 @@ class ListItemCustom {
|
|
|
133
148
|
}
|
|
134
149
|
}
|
|
135
150
|
const outputsToSync = [
|
|
151
|
+
'ui5Click',
|
|
136
152
|
'ui5DetailClick',
|
|
137
153
|
];
|
|
138
154
|
// Synchronize outputs (events)
|
|
@@ -149,7 +165,7 @@ class ListItemCustom {
|
|
|
149
165
|
}
|
|
150
166
|
}
|
|
151
167
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ListItemCustom, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
152
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: ListItemCustom, isStandalone: true, selector: "ui5-li-custom, [ui5-li-custom]", inputs: { accessibilityAttributes: { classPropertyName: "accessibilityAttributes", publicName: "accessibilityAttributes", isSignal: true, isRequired: false, transformFunction: null }, accessibleName: { classPropertyName: "accessibleName", publicName: "accessibleName", isSignal: true, isRequired: false, transformFunction: null }, highlight: { classPropertyName: "highlight", publicName: "highlight", isSignal: true, isRequired: false, transformFunction: null }, movable: { classPropertyName: "movable", publicName: "movable", isSignal: true, isRequired: false, transformFunction: null }, navigated: { classPropertyName: "navigated", publicName: "navigated", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ui5DetailClick: "ui5DetailClick" }, providers: [
|
|
168
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: ListItemCustom, isStandalone: true, selector: "ui5-li-custom, [ui5-li-custom]", inputs: { accessibilityAttributes: { classPropertyName: "accessibilityAttributes", publicName: "accessibilityAttributes", isSignal: true, isRequired: false, transformFunction: null }, accessibleName: { classPropertyName: "accessibleName", publicName: "accessibleName", isSignal: true, isRequired: false, transformFunction: null }, accessibleRole: { classPropertyName: "accessibleRole", publicName: "accessibleRole", isSignal: true, isRequired: false, transformFunction: null }, highlight: { classPropertyName: "highlight", publicName: "highlight", isSignal: true, isRequired: false, transformFunction: null }, movable: { classPropertyName: "movable", publicName: "movable", isSignal: true, isRequired: false, transformFunction: null }, navigated: { classPropertyName: "navigated", publicName: "navigated", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ui5Click: "ui5Click", ui5DetailClick: "ui5DetailClick" }, providers: [
|
|
153
169
|
contentDensityObserverProviders({
|
|
154
170
|
supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]
|
|
155
171
|
})
|
|
@@ -169,7 +185,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
169
185
|
],
|
|
170
186
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
171
187
|
}]
|
|
172
|
-
}], propDecorators: { accessibilityAttributes: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibilityAttributes", required: false }] }], accessibleName: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibleName", required: false }] }], highlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlight", required: false }] }], movable: [{ type: i0.Input, args: [{ isSignal: true, alias: "movable", required: false }] }], navigated: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigated", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], ui5DetailClick: [{ type: i0.Output, args: ["ui5DetailClick"] }] } });
|
|
188
|
+
}], propDecorators: { accessibilityAttributes: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibilityAttributes", required: false }] }], accessibleName: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibleName", required: false }] }], accessibleRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibleRole", required: false }] }], highlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlight", required: false }] }], movable: [{ type: i0.Input, args: [{ isSignal: true, alias: "movable", required: false }] }], navigated: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigated", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], ui5Click: [{ type: i0.Output, args: ["ui5Click"] }], ui5DetailClick: [{ type: i0.Output, args: ["ui5DetailClick"] }] } });
|
|
173
189
|
|
|
174
190
|
/**
|
|
175
191
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-ui5-webcomponents-list-item-custom.mjs","sources":["../../../../libs/ui5-webcomponents/list-item-custom/index.ts","../../../../libs/ui5-webcomponents/list-item-custom/fundamental-ngx-ui5-webcomponents-list-item-custom.ts"],"sourcesContent":["\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n input,\n output,\n AfterViewInit,\n effect,\n runInInjectionContext,\n inject,\n Injector,\n booleanAttribute,\n computed,\n signal\n} from '@angular/core';\nimport '@ui5/webcomponents/dist/ListItemCustom.js';\nimport { default as _ListItemCustom } from '@ui5/webcomponents/dist/ListItemCustom.js';\nimport { UI5CustomEvent } from '@ui5/webcomponents-base';\nimport {\n ContentDensityObserver,\n contentDensityObserverProviders,\n ContentDensityMode\n} from '@fundamental-ngx/core/content-density';\n\nimport { ListItemAccessibilityAttributes } from '@ui5/webcomponents/dist/ListItem.js';\nimport { default as Highlight } from '@ui5/webcomponents/dist/types/Highlight.js';\nimport { default as ListItemType } from '@ui5/webcomponents/dist/types/ListItemType.js';\n\n@Component({\n standalone: true,\n selector: 'ui5-li-custom, [ui5-li-custom]',\n template: '<ng-content></ng-content>',\n exportAs: 'ui5ListItemCustom',\n providers: [\n contentDensityObserverProviders({\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]\n })\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ListItemCustom implements AfterViewInit {\n\n /**\n * Defines the additional accessibility attributes that will be applied to the component.\nThe following fields are supported:\n\n- **ariaSetsize**: Defines the number of items in the current set when not all items in the set are present in the DOM.\n**Note:** The value is an integer reflecting the number of items in the complete set. If the size of the entire set is unknown, set `-1`.\n\n\t- **ariaPosinset**: Defines an element's number or position in the current set when not all items are present in the DOM.\n\t**Note:** The value is an integer greater than or equal to 1, and less than or equal to the size of the set when that size is known.\n */\n accessibilityAttributes = input<typeof _ListItemCustom.prototype.accessibilityAttributes | undefined>({});\n\n /**\n * Defines the text alternative of the component.\n\n**Note**: If not provided a default text alternative will be set, if present.\n */\n accessibleName = input<typeof _ListItemCustom.prototype.accessibleName | undefined>();\n\n /**\n * Defines the highlight state of the list items.\nAvailable options are: `\"None\"` (by default), `\"Positive\"`, `\"Critical\"`, `\"Information\"` and `\"Negative\"`.\n */\n highlight = input<typeof _ListItemCustom.prototype.highlight | undefined>(\"None\");\n\n /**\n * Defines whether the item is movable.\n */\n movable = input(false, { transform: booleanAttribute });\n\n /**\n * The navigated state of the list item.\nIf set to `true`, a navigation indicator is displayed at the end of the list item.\n */\n navigated = input(false, { transform: booleanAttribute });\n\n /**\n * Defines the selected state of the component.\n */\n selected = input(false, { transform: booleanAttribute });\n\n /**\n * Defines the text of the tooltip that would be displayed for the list item.\n */\n tooltip = input<typeof _ListItemCustom.prototype.tooltip | undefined>();\n\n /**\n * Defines the visual indication and behavior of the list items.\nAvailable options are `Active` (by default), `Inactive`, `Detail` and `Navigation`.\n\n**Note:** When set to `Active` or `Navigation`, the item will provide visual response upon press and hover,\nwhile with type `Inactive` and `Detail` - will not.\n */\n type = input<typeof _ListItemCustom.prototype.type | undefined>(\"Active\"); // className is now passed\n\n\n\n /**\n * Fired when the user clicks on the detail button when type is `Detail`.\n */\n ui5DetailClick = output<UI5CustomEvent<_ListItemCustom, 'detail-click'>>();\n\n /**\n * Available slots for content projection in this component.\n *\n * Slots allow you to insert custom content into predefined areas of the web component.\n * Use the `slot` attribute on child elements to target specific slots.\n *\n * - **(default)**: Defines the content of the component.\n * - **deleteButton**: Defines the delete button, displayed in \"Delete\" mode.\n**Note:** While the slot allows custom buttons, to match\ndesign guidelines, please use the `ui5-button` component.\n**Note:** When the slot is not present, a built-in delete button will be displayed.\n *\n * @example\n * ```html\n * <ui5-li-custom>\n * <div slot=\"header\">Custom header content</div>\n * <p>Default slot content</p>\n * </ui5-li-custom>\n * ```\n *\n * @readonly\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots | MDN Web Components Slots}\n */\n readonly slots = [\n {\n \"name\": \"default\",\n \"description\": \"Defines the content of the component.\"\n },\n {\n \"name\": \"deleteButton\",\n \"description\": \"Defines the delete button, displayed in \\\"Delete\\\" mode.\\n**Note:** While the slot allows custom buttons, to match\\ndesign guidelines, please use the `ui5-button` component.\\n**Note:** When the slot is not present, a built-in delete button will be displayed.\",\n \"since\": \"1.9.0\"\n }\n ];\n\n\n public elementRef: ElementRef<_ListItemCustom> = inject(ElementRef);\n public injector = inject(Injector);\n\n /**\n * Content density observer is injected to activate automatic CSS class and\n * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.\n * @private\n */\n private readonly _contentDensityObserver = inject(ContentDensityObserver);\n\n get element(): _ListItemCustom {\n return this.elementRef.nativeElement;\n }\n\n ngAfterViewInit(): void {\n const wcElement = this.element;\n \n const inputsToSync = [\n 'accessibilityAttributes',\n 'accessibleName',\n 'highlight',\n 'movable',\n 'navigated',\n 'selected',\n 'tooltip',\n 'type',\n ];\n \n // Synchronize inputs (properties)\n for (const inputName of inputsToSync) {\n // Find the corresponding camelCase signal property on the Angular component\n const signalName = inputName.replace(/-./g, (x: string) => x[1].toUpperCase());\n\n // Use the Injector to run the effect in the correct context\n if (this[signalName] && typeof this[signalName] === 'function') {\n runInInjectionContext(this.injector, () => {\n effect(() => {\n // Read the signal value\n const value = this[signalName]();\n if (wcElement) {\n // Write the value to the Web Component's property\n wcElement[inputName] = value;\n }\n });\n });\n }\n }\n \n \n const outputsToSync = [\n 'ui5DetailClick',\n ];\n \n // Synchronize outputs (events)\n for (const outputName of outputsToSync) {\n // Map Angular output name to UI5 web component event name\n const eventName = outputName.replace('ui5', '').replace(/([A-Z])/g, '-$1').toLowerCase().substring(1);\n // Ensure the output property exists and has an emit function before adding listener\n if (this[outputName] && typeof this[outputName].emit === 'function' && wcElement.addEventListener) {\n // Cast the listener to the correct type to satisfy TypeScript\n wcElement.addEventListener(eventName, (e) => {\n\n this[outputName].emit(e as CustomEvent<any>);\n });\n }\n }\n \n\n }\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAyCa,cAAc,CAAA;AAZ3B,IAAA,WAAA,GAAA;AAcE;;;;;;;;;AASG;AACH,QAAA,IAAA,CAAA,uBAAuB,GAAG,KAAK,CAAuE,EAAE,mEAAC;AAEzG;;;;AAIG;QACH,IAAA,CAAA,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAA+D;AAErF;;;AAGG;AACH,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAyD,MAAM,qDAAC;AAEjF;;AAEG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,KAAK,oDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEvD;;;AAGG;QACH,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,KAAK,sDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG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A,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,EAAA,SAAA,EAPd;AACT,YAAA,+BAA+B,CAAC;gBAC9B,uBAAuB,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,CAAC,IAAI;aAC9E;AACF,SAAA,EAAA,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EANS,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAS1B,cAAc,EAAA,UAAA,EAAA,CAAA;kBAZ1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,gCAAgC;AAC1C,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,SAAS,EAAE;AACT,wBAAA,+BAA+B,CAAC;4BAC9B,uBAAuB,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,CAAC,IAAI;yBAC9E;AACF,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;ACxCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-ui5-webcomponents-list-item-custom.mjs","sources":["../../../../libs/ui5-webcomponents/list-item-custom/index.ts","../../../../libs/ui5-webcomponents/list-item-custom/fundamental-ngx-ui5-webcomponents-list-item-custom.ts"],"sourcesContent":["\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n input,\n output,\n AfterViewInit,\n effect,\n runInInjectionContext,\n inject,\n Injector,\n booleanAttribute,\n computed,\n signal\n} from '@angular/core';\nimport '@ui5/webcomponents/dist/ListItemCustom.js';\nimport { default as _ListItemCustom } from '@ui5/webcomponents/dist/ListItemCustom.js';\nimport { UI5CustomEvent } from '@ui5/webcomponents-base';\nimport {\n ContentDensityObserver,\n contentDensityObserverProviders,\n ContentDensityMode\n} from '@fundamental-ngx/core/content-density';\n\nimport { ListItemAccessibilityAttributes } from '@ui5/webcomponents/dist/ListItem.js';\nimport { default as ListItemAccessibleRole } from '@ui5/webcomponents/dist/types/ListItemAccessibleRole.js';\nimport { default as Highlight } from '@ui5/webcomponents/dist/types/Highlight.js';\nimport { default as ListItemType } from '@ui5/webcomponents/dist/types/ListItemType.js';\n\n@Component({\n standalone: true,\n selector: 'ui5-li-custom, [ui5-li-custom]',\n template: '<ng-content></ng-content>',\n exportAs: 'ui5ListItemCustom',\n providers: [\n contentDensityObserverProviders({\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]\n })\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ListItemCustom implements AfterViewInit {\n\n /**\n * Defines the additional accessibility attributes that will be applied to the component.\nThe following fields are supported:\n\n- **ariaSetsize**: Defines the number of items in the current set when not all items in the set are present in the DOM.\n**Note:** The value is an integer reflecting the number of items in the complete set. If the size of the entire set is unknown, set `-1`.\n\n\t- **ariaPosinset**: Defines an element's number or position in the current set when not all items are present in the DOM.\n\t**Note:** The value is an integer greater than or equal to 1, and less than or equal to the size of the set when that size is known.\n */\n accessibilityAttributes = input<typeof _ListItemCustom.prototype.accessibilityAttributes | undefined>({});\n\n /**\n * Defines the text alternative of the component.\n\n**Note**: If not provided a default text alternative will be set, if present.\n */\n accessibleName = input<typeof _ListItemCustom.prototype.accessibleName | undefined>();\n\n /**\n * Used to define the role of the list item.\n\n**Note:** If not set, the role is automatically inherited from the parent `ui5-list` based on its `accessible-role` property\n(e.g. `Menu` -> `MenuItem`, `Tree` -> `TreeItem`, `ListBox` -> `Option`).\nAn explicitly set `accessible-role` on the list item takes precedence over the inherited role.\n */\n accessibleRole = input<typeof _ListItemCustom.prototype.accessibleRole | undefined>();\n\n /**\n * Defines the highlight state of the list items.\nAvailable options are: `\"None\"` (by default), `\"Positive\"`, `\"Critical\"`, `\"Information\"` and `\"Negative\"`.\n */\n highlight = input<typeof _ListItemCustom.prototype.highlight | undefined>(\"None\");\n\n /**\n * Defines whether the item is movable.\n */\n movable = input(false, { transform: booleanAttribute });\n\n /**\n * The navigated state of the list item.\nIf set to `true`, a navigation indicator is displayed at the end of the list item.\n */\n navigated = input(false, { transform: booleanAttribute });\n\n /**\n * Defines the selected state of the component.\n */\n selected = input(false, { transform: booleanAttribute });\n\n /**\n * Defines the text of the tooltip that would be displayed for the list item.\n */\n tooltip = input<typeof _ListItemCustom.prototype.tooltip | undefined>();\n\n /**\n * Defines the visual indication and behavior of the list items.\nAvailable options are `Active` (by default), `Inactive`, `Detail` and `Navigation`.\n\n**Note:** When set to `Active` or `Navigation`, the item will provide visual response upon press and hover,\nwhile with type `Inactive` and `Detail` - will not.\n */\n type = input<typeof _ListItemCustom.prototype.type | undefined>(\"Active\"); // className is now passed\n\n\n\n /**\n * Fired when the component is activated either with a mouse/tap or by using the Enter or Space key.\n\n**Note:** The event will not be fired if the `disabled` property is set to `true`.\n */\n ui5Click = output<UI5CustomEvent<_ListItemCustom, 'click'>>();\n\n /**\n * Fired when the user clicks on the detail button when type is `Detail`.\n */\n ui5DetailClick = output<UI5CustomEvent<_ListItemCustom, 'detail-click'>>();\n\n /**\n * Available slots for content projection in this component.\n *\n * Slots allow you to insert custom content into predefined areas of the web component.\n * Use the `slot` attribute on child elements to target specific slots.\n *\n * - **(default)**: Defines the content of the component.\n * - **deleteButton**: Defines the delete button, displayed in \"Delete\" mode.\n**Note:** While the slot allows custom buttons, to match\ndesign guidelines, please use the `ui5-button` component.\n**Note:** When the slot is not present, a built-in delete button will be displayed.\n *\n * @example\n * ```html\n * <ui5-li-custom>\n * <div slot=\"header\">Custom header content</div>\n * <p>Default slot content</p>\n * </ui5-li-custom>\n * ```\n *\n * @readonly\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots | MDN Web Components Slots}\n */\n readonly slots = [\n {\n \"name\": \"default\",\n \"description\": \"Defines the content of the component.\"\n },\n {\n \"name\": \"deleteButton\",\n \"description\": \"Defines the delete button, displayed in \\\"Delete\\\" mode.\\n**Note:** While the slot allows custom buttons, to match\\ndesign guidelines, please use the `ui5-button` component.\\n**Note:** When the slot is not present, a built-in delete button will be displayed.\",\n \"since\": \"1.9.0\"\n }\n ];\n\n\n public elementRef: ElementRef<_ListItemCustom> = inject(ElementRef);\n public injector = inject(Injector);\n\n /**\n * Content density observer is injected to activate automatic CSS class and\n * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.\n * @private\n */\n private readonly _contentDensityObserver = inject(ContentDensityObserver);\n\n get element(): _ListItemCustom {\n return this.elementRef.nativeElement;\n }\n\n ngAfterViewInit(): void {\n const wcElement = this.element;\n \n const inputsToSync = [\n 'accessibilityAttributes',\n 'accessibleName',\n 'accessibleRole',\n 'highlight',\n 'movable',\n 'navigated',\n 'selected',\n 'tooltip',\n 'type',\n ];\n \n // Synchronize inputs (properties)\n for (const inputName of inputsToSync) {\n // Find the corresponding camelCase signal property on the Angular component\n const signalName = inputName.replace(/-./g, (x: string) => x[1].toUpperCase());\n\n // Use the Injector to run the effect in the correct context\n if (this[signalName] && typeof this[signalName] === 'function') {\n runInInjectionContext(this.injector, () => {\n effect(() => {\n // Read the signal value\n const value = this[signalName]();\n if (wcElement) {\n // Write the value to the Web Component's property\n wcElement[inputName] = value;\n }\n });\n });\n }\n }\n \n \n const outputsToSync = [\n 'ui5Click',\n 'ui5DetailClick',\n ];\n \n // Synchronize outputs (events)\n for (const outputName of outputsToSync) {\n // Map Angular output name to UI5 web component event name\n const eventName = outputName.replace('ui5', '').replace(/([A-Z])/g, '-$1').toLowerCase().substring(1);\n // Ensure the output property exists and has an emit function before adding listener\n if (this[outputName] && typeof this[outputName].emit === 'function' && wcElement.addEventListener) {\n // Cast the listener to the correct type to satisfy TypeScript\n wcElement.addEventListener(eventName, (e) => {\n\n this[outputName].emit(e as CustomEvent<any>);\n });\n }\n }\n \n\n }\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MA0Ca,cAAc,CAAA;AAZ3B,IAAA,WAAA,GAAA;AAcE;;;;;;;;;AASG;AACH,QAAA,IAAA,CAAA,uBAAuB,GAAG,KAAK,CAAuE,EAAE,mEAAC;AAEzG;;;;AAIG;QACH,IAAA,CAAA,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAA+D;AAErF;;;;;;AAMG;QACH,IAAA,CAAA,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAA+D;AAErF;;;AAGG;AACH,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAyD,MAAM,qDAAC;AAEjF;;AAEG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,KAAK,oDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEvD;;;AAGG;QACH,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,KAAK,sDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEzD;;AAEG;QACH,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,qDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExD;;AAEG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA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A,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,EAAA,SAAA,EAPd;AACT,YAAA,+BAA+B,CAAC;gBAC9B,uBAAuB,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,CAAC,IAAI;aAC9E;AACF,SAAA,EAAA,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EANS,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAS1B,cAAc,EAAA,UAAA,EAAA,CAAA;kBAZ1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,gCAAgC;AAC1C,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,SAAS,EAAE;AACT,wBAAA,+BAA+B,CAAC;4BAC9B,uBAAuB,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,CAAC,IAAI;yBAC9E;AACF,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;ACzCD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, inject, ElementRef, Injector, runInInjectionContext, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { input, output, inject, ElementRef, Injector, runInInjectionContext, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import '@ui5/webcomponents/dist/ListItemGroupHeader.js';
|
|
4
4
|
import { ContentDensityObserver, contentDensityObserverProviders, ContentDensityMode } from '@fundamental-ngx/core/content-density';
|
|
5
5
|
|
|
@@ -25,6 +25,12 @@ class ListItemGroupHeader {
|
|
|
25
25
|
- `Normal` - The text will wrap (without truncation).
|
|
26
26
|
*/
|
|
27
27
|
this.wrappingType = input("None", ...(ngDevMode ? [{ debugName: "wrappingType" }] : [])); // className is now passed
|
|
28
|
+
/**
|
|
29
|
+
* Fired when the component is activated either with a mouse/tap or by using the Enter or Space key.
|
|
30
|
+
|
|
31
|
+
**Note:** The event will not be fired if the `disabled` property is set to `true`.
|
|
32
|
+
*/
|
|
33
|
+
this.ui5Click = output();
|
|
28
34
|
/**
|
|
29
35
|
* Available slots for content projection in this component.
|
|
30
36
|
*
|
|
@@ -88,9 +94,24 @@ class ListItemGroupHeader {
|
|
|
88
94
|
});
|
|
89
95
|
}
|
|
90
96
|
}
|
|
97
|
+
const outputsToSync = [
|
|
98
|
+
'ui5Click',
|
|
99
|
+
];
|
|
100
|
+
// Synchronize outputs (events)
|
|
101
|
+
for (const outputName of outputsToSync) {
|
|
102
|
+
// Map Angular output name to UI5 web component event name
|
|
103
|
+
const eventName = outputName.replace('ui5', '').replace(/([A-Z])/g, '-$1').toLowerCase().substring(1);
|
|
104
|
+
// Ensure the output property exists and has an emit function before adding listener
|
|
105
|
+
if (this[outputName] && typeof this[outputName].emit === 'function' && wcElement.addEventListener) {
|
|
106
|
+
// Cast the listener to the correct type to satisfy TypeScript
|
|
107
|
+
wcElement.addEventListener(eventName, (e) => {
|
|
108
|
+
this[outputName].emit(e);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
91
112
|
}
|
|
92
113
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ListItemGroupHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
93
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: ListItemGroupHeader, isStandalone: true, selector: "ui5-li-group-header, [ui5-li-group-header]", inputs: { accessibleName: { classPropertyName: "accessibleName", publicName: "accessibleName", isSignal: true, isRequired: false, transformFunction: null }, wrappingType: { classPropertyName: "wrappingType", publicName: "wrappingType", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
114
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: ListItemGroupHeader, isStandalone: true, selector: "ui5-li-group-header, [ui5-li-group-header]", inputs: { accessibleName: { classPropertyName: "accessibleName", publicName: "accessibleName", isSignal: true, isRequired: false, transformFunction: null }, wrappingType: { classPropertyName: "wrappingType", publicName: "wrappingType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ui5Click: "ui5Click" }, providers: [
|
|
94
115
|
contentDensityObserverProviders({
|
|
95
116
|
supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]
|
|
96
117
|
})
|
|
@@ -110,7 +131,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
110
131
|
],
|
|
111
132
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
112
133
|
}]
|
|
113
|
-
}], propDecorators: { accessibleName: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibleName", required: false }] }], wrappingType: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrappingType", required: false }] }] } });
|
|
134
|
+
}], propDecorators: { accessibleName: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibleName", required: false }] }], wrappingType: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrappingType", required: false }] }], ui5Click: [{ type: i0.Output, args: ["ui5Click"] }] } });
|
|
114
135
|
|
|
115
136
|
/**
|
|
116
137
|
* Generated bundle index. Do not edit.
|