@fundamental-ngx/ui5-webcomponents-ai 0.61.2 → 0.61.3

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.
Files changed (28) hide show
  1. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-button-state.mjs +106 -0
  2. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-button-state.mjs.map +1 -0
  3. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-button.mjs +172 -0
  4. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-button.mjs.map +1 -0
  5. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-input.mjs +341 -0
  6. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-input.mjs.map +1 -0
  7. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-prompt-input.mjs +207 -0
  8. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-prompt-input.mjs.map +1 -0
  9. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-text-area.mjs +298 -0
  10. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-text-area.mjs.map +1 -0
  11. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-theming.mjs +23 -0
  12. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-theming.mjs.map +1 -0
  13. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-toolbar-label.mjs +114 -0
  14. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-toolbar-label.mjs.map +1 -0
  15. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-versioning.mjs +142 -0
  16. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-versioning.mjs.map +1 -0
  17. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-writing-assistant.mjs +124 -0
  18. package/fesm2022/fundamental-ngx-ui5-webcomponents-ai-writing-assistant.mjs.map +1 -0
  19. package/package.json +40 -4
  20. package/types/fundamental-ngx-ui5-webcomponents-ai-button-state.d.ts +50 -0
  21. package/types/fundamental-ngx-ui5-webcomponents-ai-button.d.ts +100 -0
  22. package/types/fundamental-ngx-ui5-webcomponents-ai-input.d.ts +218 -0
  23. package/types/fundamental-ngx-ui5-webcomponents-ai-prompt-input.d.ts +128 -0
  24. package/types/fundamental-ngx-ui5-webcomponents-ai-text-area.d.ts +188 -0
  25. package/types/fundamental-ngx-ui5-webcomponents-ai-theming.d.ts +11 -0
  26. package/types/fundamental-ngx-ui5-webcomponents-ai-toolbar-label.d.ts +58 -0
  27. package/types/fundamental-ngx-ui5-webcomponents-ai-versioning.d.ts +71 -0
  28. package/types/fundamental-ngx-ui5-webcomponents-ai-writing-assistant.d.ts +54 -0
@@ -0,0 +1,142 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, booleanAttribute, output, inject, ElementRef, Injector, runInInjectionContext, effect, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import '@ui5/webcomponents-ai/dist/Versioning.js';
4
+ import { ContentDensityObserver, contentDensityObserverProviders, ContentDensityMode } from '@fundamental-ngx/core/content-density';
5
+
6
+ class Versioning {
7
+ constructor() {
8
+ /**
9
+ * Indicates the index of the currently displayed result version.
10
+
11
+ This property represents the current position in the version history.
12
+ */
13
+ this.currentStep = input(0, ...(ngDevMode ? [{ debugName: "currentStep" }] : []));
14
+ /**
15
+ * The total number of available result versions.
16
+
17
+ Note: Versioning is hidden if the value is `0`.
18
+ */
19
+ this.totalSteps = input(0, ...(ngDevMode ? [{ debugName: "totalSteps" }] : []));
20
+ /**
21
+ * Property used to define the access of the item to the overflow Popover. If "NeverOverflow" option is set,
22
+ the item never goes in the Popover, if "AlwaysOverflow" - it never comes out of it.
23
+ */
24
+ this.overflowPriority = input("Default", ...(ngDevMode ? [{ debugName: "overflowPriority" }] : []));
25
+ /**
26
+ * Defines if the toolbar overflow popup should close upon interaction with the item.
27
+ It will close by default.
28
+ */
29
+ this.preventOverflowClosing = input(false, { ...(ngDevMode ? { debugName: "preventOverflowClosing" } : {}), transform: booleanAttribute }); // className is now passed
30
+ /**
31
+ * Fired when the user clicks on version navigation buttons.
32
+ */
33
+ this.ui5VersionChange = output();
34
+ /**
35
+ * Available slots for content projection in this component.
36
+ *
37
+ * Slots allow you to insert custom content into predefined areas of the web component.
38
+ * Use the `slot` attribute on child elements to target specific slots.
39
+ *
40
+ * - **(default)**: Wrapped component slot.
41
+ *
42
+ * @example
43
+ * ```html
44
+ * <ui5-ai-versioning>
45
+ * <div slot="header">Custom header content</div>
46
+ * <p>Default slot content</p>
47
+ * </ui5-ai-versioning>
48
+ * ```
49
+ *
50
+ * @readonly
51
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots | MDN Web Components Slots}
52
+ */
53
+ this.slots = [
54
+ {
55
+ "name": "default",
56
+ "description": "Wrapped component slot.",
57
+ "since": "2.20.0"
58
+ }
59
+ ];
60
+ this.elementRef = inject(ElementRef);
61
+ this.injector = inject(Injector);
62
+ /**
63
+ * Content density observer is injected to activate automatic CSS class and
64
+ * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.
65
+ * @private
66
+ */
67
+ this._contentDensityObserver = inject(ContentDensityObserver);
68
+ }
69
+ get element() {
70
+ return this.elementRef.nativeElement;
71
+ }
72
+ ngAfterViewInit() {
73
+ const wcElement = this.element;
74
+ const inputsToSync = [
75
+ 'currentStep',
76
+ 'totalSteps',
77
+ 'overflowPriority',
78
+ 'preventOverflowClosing',
79
+ ];
80
+ // Synchronize inputs (properties)
81
+ for (const inputName of inputsToSync) {
82
+ // Find the corresponding camelCase signal property on the Angular component
83
+ const signalName = inputName.replace(/-./g, (x) => x[1].toUpperCase());
84
+ // Use the Injector to run the effect in the correct context
85
+ if (this[signalName] && typeof this[signalName] === 'function') {
86
+ runInInjectionContext(this.injector, () => {
87
+ effect(() => {
88
+ // Read the signal value
89
+ const value = this[signalName]();
90
+ if (wcElement) {
91
+ // Write the value to the Web Component's property
92
+ wcElement[inputName] = value;
93
+ }
94
+ });
95
+ });
96
+ }
97
+ }
98
+ const outputsToSync = [
99
+ 'ui5VersionChange',
100
+ ];
101
+ // Synchronize outputs (events)
102
+ for (const outputName of outputsToSync) {
103
+ // Map Angular output name to UI5 web component event name
104
+ const eventName = outputName.replace('ui5', '').replace(/([A-Z])/g, '-$1').toLowerCase().substring(1);
105
+ // Ensure the output property exists and has an emit function before adding listener
106
+ if (this[outputName] && typeof this[outputName].emit === 'function' && wcElement.addEventListener) {
107
+ // Cast the listener to the correct type to satisfy TypeScript
108
+ wcElement.addEventListener(eventName, (e) => {
109
+ this[outputName].emit(e);
110
+ });
111
+ }
112
+ }
113
+ }
114
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Versioning, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
115
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: Versioning, isStandalone: true, selector: "ui5-ai-versioning, [ui5-ai-versioning]", inputs: { currentStep: { classPropertyName: "currentStep", publicName: "currentStep", isSignal: true, isRequired: false, transformFunction: null }, totalSteps: { classPropertyName: "totalSteps", publicName: "totalSteps", isSignal: true, isRequired: false, transformFunction: null }, overflowPriority: { classPropertyName: "overflowPriority", publicName: "overflowPriority", isSignal: true, isRequired: false, transformFunction: null }, preventOverflowClosing: { classPropertyName: "preventOverflowClosing", publicName: "preventOverflowClosing", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ui5VersionChange: "ui5VersionChange" }, providers: [
116
+ contentDensityObserverProviders({
117
+ supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]
118
+ })
119
+ ], exportAs: ["ui5Versioning"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
120
+ }
121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Versioning, decorators: [{
122
+ type: Component,
123
+ args: [{
124
+ standalone: true,
125
+ selector: 'ui5-ai-versioning, [ui5-ai-versioning]',
126
+ template: '<ng-content></ng-content>',
127
+ exportAs: 'ui5Versioning',
128
+ providers: [
129
+ contentDensityObserverProviders({
130
+ supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]
131
+ })
132
+ ],
133
+ changeDetection: ChangeDetectionStrategy.OnPush,
134
+ }]
135
+ }], propDecorators: { currentStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentStep", required: false }] }], totalSteps: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalSteps", required: false }] }], overflowPriority: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowPriority", required: false }] }], preventOverflowClosing: [{ type: i0.Input, args: [{ isSignal: true, alias: "preventOverflowClosing", required: false }] }], ui5VersionChange: [{ type: i0.Output, args: ["ui5VersionChange"] }] } });
136
+
137
+ /**
138
+ * Generated bundle index. Do not edit.
139
+ */
140
+
141
+ export { Versioning };
142
+ //# sourceMappingURL=fundamental-ngx-ui5-webcomponents-ai-versioning.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fundamental-ngx-ui5-webcomponents-ai-versioning.mjs","sources":["../../../../libs/ui5-webcomponents-ai/versioning/index.ts","../../../../libs/ui5-webcomponents-ai/versioning/fundamental-ngx-ui5-webcomponents-ai-versioning.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-ai/dist/Versioning.js';\nimport { default as _Versioning } from '@ui5/webcomponents-ai/dist/Versioning.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 ToolbarItemOverflowBehavior } from '@ui5/webcomponents/dist/types/ToolbarItemOverflowBehavior.js';\n\n@Component({\n standalone: true,\n selector: 'ui5-ai-versioning, [ui5-ai-versioning]',\n template: '<ng-content></ng-content>',\n exportAs: 'ui5Versioning',\n providers: [\n contentDensityObserverProviders({\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]\n })\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Versioning implements AfterViewInit {\n\n /**\n * Indicates the index of the currently displayed result version.\n\nThis property represents the current position in the version history.\n */\n currentStep = input<typeof _Versioning.prototype.currentStep | undefined>(0);\n\n /**\n * The total number of available result versions.\n\nNote: Versioning is hidden if the value is `0`.\n */\n totalSteps = input<typeof _Versioning.prototype.totalSteps | undefined>(0);\n\n /**\n * Property used to define the access of the item to the overflow Popover. If \"NeverOverflow\" option is set,\nthe item never goes in the Popover, if \"AlwaysOverflow\" - it never comes out of it.\n */\n overflowPriority = input<typeof _Versioning.prototype.overflowPriority | undefined>(\"Default\");\n\n /**\n * Defines if the toolbar overflow popup should close upon interaction with the item.\nIt will close by default.\n */\n preventOverflowClosing = input(false, { transform: booleanAttribute }); // className is now passed\n\n\n\n /**\n * Fired when the user clicks on version navigation buttons.\n */\n ui5VersionChange = output<UI5CustomEvent<_Versioning, 'version-change'>>();\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)**: Wrapped component slot.\n *\n * @example\n * ```html\n * <ui5-ai-versioning>\n * <div slot=\"header\">Custom header content</div>\n * <p>Default slot content</p>\n * </ui5-ai-versioning>\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\": \"Wrapped component slot.\",\n \"since\": \"2.20.0\"\n }\n ];\n\n\n public elementRef: ElementRef<_Versioning> = 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(): _Versioning {\n return this.elementRef.nativeElement;\n }\n\n ngAfterViewInit(): void {\n const wcElement = this.element;\n \n const inputsToSync = [\n 'currentStep',\n 'totalSteps',\n 'overflowPriority',\n 'preventOverflowClosing',\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 'ui5VersionChange',\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,UAAU,CAAA;AAZvB,IAAA,WAAA,GAAA;AAcE;;;;AAIG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAuD,CAAC,uDAAC;AAE5E;;;;AAIG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAsD,CAAC,sDAAC;AAE1E;;;AAGG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAA4D,SAAS,4DAAC;AAE9F;;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AM;AAChD,iBAAA;;;ACtCD;;AAEG;;;;"}
@@ -0,0 +1,124 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, output, inject, ElementRef, Injector, runInInjectionContext, effect, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import '@ui5/webcomponents-ai/dist/WritingAssistant.js';
4
+ import { ContentDensityObserver, contentDensityObserverProviders, ContentDensityMode } from '@fundamental-ngx/core/content-density';
5
+
6
+ class WritingAssistant {
7
+ constructor() {
8
+ /**
9
+ * Indicates the index of the currently displayed result version.
10
+
11
+ The index is **0-based** (i.e. `0` represents the first result).
12
+ This property is synchronized with the parent AI TextArea component.
13
+ */
14
+ this.currentVersion = input(0, ...(ngDevMode ? [{ debugName: "currentVersion" }] : []));
15
+ /**
16
+ * Defines the prompt description of the Writing Assistant.
17
+
18
+ This text is displayed in the toolbar to indicate the current or last
19
+ performed AI action (e.g., "Generated text", "Simplified text").
20
+ */
21
+ this.promptDescription = input("", ...(ngDevMode ? [{ debugName: "promptDescription" }] : []));
22
+ /**
23
+ * Indicates the total number of result versions available.
24
+
25
+ This property determines whether version navigation controls are displayed.
26
+ When totalVersions > 0, previous/next buttons become available.
27
+ */
28
+ this.totalVersions = input(0, ...(ngDevMode ? [{ debugName: "totalVersions" }] : [])); // className is now passed
29
+ /**
30
+ * Fired when the user clicks on the AI button.
31
+ */
32
+ this.ui5ButtonClick = output();
33
+ /**
34
+ * Fired when the user clicks on the "Stop" button to stop ongoing AI text generation.
35
+ */
36
+ this.ui5StopGeneration = output();
37
+ /**
38
+ * Fired when the user clicks on version navigation buttons.
39
+ */
40
+ this.ui5VersionChange = output();
41
+ this.elementRef = inject(ElementRef);
42
+ this.injector = inject(Injector);
43
+ /**
44
+ * Content density observer is injected to activate automatic CSS class and
45
+ * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.
46
+ * @private
47
+ */
48
+ this._contentDensityObserver = inject(ContentDensityObserver);
49
+ }
50
+ get element() {
51
+ return this.elementRef.nativeElement;
52
+ }
53
+ ngAfterViewInit() {
54
+ const wcElement = this.element;
55
+ const inputsToSync = [
56
+ 'currentVersion',
57
+ 'promptDescription',
58
+ 'totalVersions',
59
+ ];
60
+ // Synchronize inputs (properties)
61
+ for (const inputName of inputsToSync) {
62
+ // Find the corresponding camelCase signal property on the Angular component
63
+ const signalName = inputName.replace(/-./g, (x) => x[1].toUpperCase());
64
+ // Use the Injector to run the effect in the correct context
65
+ if (this[signalName] && typeof this[signalName] === 'function') {
66
+ runInInjectionContext(this.injector, () => {
67
+ effect(() => {
68
+ // Read the signal value
69
+ const value = this[signalName]();
70
+ if (wcElement) {
71
+ // Write the value to the Web Component's property
72
+ wcElement[inputName] = value;
73
+ }
74
+ });
75
+ });
76
+ }
77
+ }
78
+ const outputsToSync = [
79
+ 'ui5ButtonClick',
80
+ 'ui5StopGeneration',
81
+ 'ui5VersionChange',
82
+ ];
83
+ // Synchronize outputs (events)
84
+ for (const outputName of outputsToSync) {
85
+ // Map Angular output name to UI5 web component event name
86
+ const eventName = outputName.replace('ui5', '').replace(/([A-Z])/g, '-$1').toLowerCase().substring(1);
87
+ // Ensure the output property exists and has an emit function before adding listener
88
+ if (this[outputName] && typeof this[outputName].emit === 'function' && wcElement.addEventListener) {
89
+ // Cast the listener to the correct type to satisfy TypeScript
90
+ wcElement.addEventListener(eventName, (e) => {
91
+ this[outputName].emit(e);
92
+ });
93
+ }
94
+ }
95
+ }
96
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: WritingAssistant, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
97
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: WritingAssistant, isStandalone: true, selector: "ui5-ai-writing-assistant, [ui5-ai-writing-assistant]", inputs: { currentVersion: { classPropertyName: "currentVersion", publicName: "currentVersion", isSignal: true, isRequired: false, transformFunction: null }, promptDescription: { classPropertyName: "promptDescription", publicName: "promptDescription", isSignal: true, isRequired: false, transformFunction: null }, totalVersions: { classPropertyName: "totalVersions", publicName: "totalVersions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ui5ButtonClick: "ui5ButtonClick", ui5StopGeneration: "ui5StopGeneration", ui5VersionChange: "ui5VersionChange" }, providers: [
98
+ contentDensityObserverProviders({
99
+ supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]
100
+ })
101
+ ], exportAs: ["ui5WritingAssistant"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
102
+ }
103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: WritingAssistant, decorators: [{
104
+ type: Component,
105
+ args: [{
106
+ standalone: true,
107
+ selector: 'ui5-ai-writing-assistant, [ui5-ai-writing-assistant]',
108
+ template: '<ng-content></ng-content>',
109
+ exportAs: 'ui5WritingAssistant',
110
+ providers: [
111
+ contentDensityObserverProviders({
112
+ supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]
113
+ })
114
+ ],
115
+ changeDetection: ChangeDetectionStrategy.OnPush,
116
+ }]
117
+ }], propDecorators: { currentVersion: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentVersion", required: false }] }], promptDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "promptDescription", required: false }] }], totalVersions: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalVersions", required: false }] }], ui5ButtonClick: [{ type: i0.Output, args: ["ui5ButtonClick"] }], ui5StopGeneration: [{ type: i0.Output, args: ["ui5StopGeneration"] }], ui5VersionChange: [{ type: i0.Output, args: ["ui5VersionChange"] }] } });
118
+
119
+ /**
120
+ * Generated bundle index. Do not edit.
121
+ */
122
+
123
+ export { WritingAssistant };
124
+ //# sourceMappingURL=fundamental-ngx-ui5-webcomponents-ai-writing-assistant.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fundamental-ngx-ui5-webcomponents-ai-writing-assistant.mjs","sources":["../../../../libs/ui5-webcomponents-ai/writing-assistant/index.ts","../../../../libs/ui5-webcomponents-ai/writing-assistant/fundamental-ngx-ui5-webcomponents-ai-writing-assistant.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-ai/dist/WritingAssistant.js';\nimport { default as _WritingAssistant } from '@ui5/webcomponents-ai/dist/WritingAssistant.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-ai-writing-assistant, [ui5-ai-writing-assistant]',\n template: '<ng-content></ng-content>',\n exportAs: 'ui5WritingAssistant',\n providers: [\n contentDensityObserverProviders({\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]\n })\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WritingAssistant implements AfterViewInit {\n\n /**\n * Indicates the index of the currently displayed result version.\n\nThe index is **0-based** (i.e. `0` represents the first result).\nThis property is synchronized with the parent AI TextArea component.\n */\n currentVersion = input<typeof _WritingAssistant.prototype.currentVersion | undefined>(0);\n\n /**\n * Defines the prompt description of the Writing Assistant.\n\nThis text is displayed in the toolbar to indicate the current or last\nperformed AI action (e.g., \"Generated text\", \"Simplified text\").\n */\n promptDescription = input<typeof _WritingAssistant.prototype.promptDescription | undefined>(\"\");\n\n /**\n * Indicates the total number of result versions available.\n\nThis property determines whether version navigation controls are displayed.\nWhen totalVersions > 0, previous/next buttons become available.\n */\n totalVersions = input<typeof _WritingAssistant.prototype.totalVersions | undefined>(0); // className is now passed\n\n\n\n /**\n * Fired when the user clicks on the AI button.\n */\n ui5ButtonClick = output<UI5CustomEvent<_WritingAssistant, 'button-click'>>();\n\n /**\n * Fired when the user clicks on the \"Stop\" button to stop ongoing AI text generation.\n */\n ui5StopGeneration = output<UI5CustomEvent<_WritingAssistant, 'stop-generation'>>();\n\n /**\n * Fired when the user clicks on version navigation buttons.\n */\n ui5VersionChange = output<UI5CustomEvent<_WritingAssistant, 'version-change'>>();\n\n\n public elementRef: ElementRef<_WritingAssistant> = 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(): _WritingAssistant {\n return this.elementRef.nativeElement;\n }\n\n ngAfterViewInit(): void {\n const wcElement = this.element;\n \n const inputsToSync = [\n 'currentVersion',\n 'promptDescription',\n 'totalVersions',\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 'ui5ButtonClick',\n 'ui5StopGeneration',\n 'ui5VersionChange',\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 */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,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,CAAC,IAAI;yBAC9E;AACF,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;ACtCD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fundamental-ngx/ui5-webcomponents-ai",
3
- "version": "0.61.2",
3
+ "version": "0.61.3",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "description": "Fundamental Library for Angular - UI5 Webcomponents AI",
6
6
  "license": "Apache-2.0",
@@ -20,14 +20,14 @@
20
20
  "@angular/forms": "^21.0.0",
21
21
  "@angular/platform-browser": "^21.0.0",
22
22
  "@angular/router": "^21.0.0",
23
- "@fundamental-ngx/core": "0.61.2",
24
- "@fundamental-ngx/ui5-webcomponents": "0.61.2",
23
+ "@fundamental-ngx/core": "0.61.3",
24
+ "@fundamental-ngx/ui5-webcomponents": "0.61.3",
25
25
  "@ui5/webcomponents-ai": "^2.20.0",
26
26
  "fundamental-styles": "0.40.1",
27
27
  "rxjs": "^7.8.0"
28
28
  },
29
29
  "dependencies": {
30
- "@fundamental-ngx/ui5-webcomponents-base": "0.61.2",
30
+ "@fundamental-ngx/ui5-webcomponents-base": "0.61.3",
31
31
  "@sap-theming/theming-base-content": "^11.32.0",
32
32
  "compare-versions": "^6.1.0",
33
33
  "fast-equals": "^6.0.0",
@@ -47,9 +47,45 @@
47
47
  "types": "./types/fundamental-ngx-ui5-webcomponents-ai.d.ts",
48
48
  "default": "./fesm2022/fundamental-ngx-ui5-webcomponents-ai.mjs"
49
49
  },
50
+ "./button": {
51
+ "types": "./types/fundamental-ngx-ui5-webcomponents-ai-button.d.ts",
52
+ "default": "./fesm2022/fundamental-ngx-ui5-webcomponents-ai-button.mjs"
53
+ },
54
+ "./button-state": {
55
+ "types": "./types/fundamental-ngx-ui5-webcomponents-ai-button-state.d.ts",
56
+ "default": "./fesm2022/fundamental-ngx-ui5-webcomponents-ai-button-state.mjs"
57
+ },
58
+ "./input": {
59
+ "types": "./types/fundamental-ngx-ui5-webcomponents-ai-input.d.ts",
60
+ "default": "./fesm2022/fundamental-ngx-ui5-webcomponents-ai-input.mjs"
61
+ },
62
+ "./prompt-input": {
63
+ "types": "./types/fundamental-ngx-ui5-webcomponents-ai-prompt-input.d.ts",
64
+ "default": "./fesm2022/fundamental-ngx-ui5-webcomponents-ai-prompt-input.mjs"
65
+ },
66
+ "./text-area": {
67
+ "types": "./types/fundamental-ngx-ui5-webcomponents-ai-text-area.d.ts",
68
+ "default": "./fesm2022/fundamental-ngx-ui5-webcomponents-ai-text-area.mjs"
69
+ },
70
+ "./theming": {
71
+ "types": "./types/fundamental-ngx-ui5-webcomponents-ai-theming.d.ts",
72
+ "default": "./fesm2022/fundamental-ngx-ui5-webcomponents-ai-theming.mjs"
73
+ },
74
+ "./toolbar-label": {
75
+ "types": "./types/fundamental-ngx-ui5-webcomponents-ai-toolbar-label.d.ts",
76
+ "default": "./fesm2022/fundamental-ngx-ui5-webcomponents-ai-toolbar-label.mjs"
77
+ },
50
78
  "./utils": {
51
79
  "types": "./types/fundamental-ngx-ui5-webcomponents-ai-utils.d.ts",
52
80
  "default": "./fesm2022/fundamental-ngx-ui5-webcomponents-ai-utils.mjs"
81
+ },
82
+ "./versioning": {
83
+ "types": "./types/fundamental-ngx-ui5-webcomponents-ai-versioning.d.ts",
84
+ "default": "./fesm2022/fundamental-ngx-ui5-webcomponents-ai-versioning.mjs"
85
+ },
86
+ "./writing-assistant": {
87
+ "types": "./types/fundamental-ngx-ui5-webcomponents-ai-writing-assistant.d.ts",
88
+ "default": "./fesm2022/fundamental-ngx-ui5-webcomponents-ai-writing-assistant.mjs"
53
89
  }
54
90
  },
55
91
  "sideEffects": false
@@ -0,0 +1,50 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { AfterViewInit, ElementRef, Injector } from '@angular/core';
3
+ import _ButtonState from '@ui5/webcomponents-ai/dist/ButtonState.js';
4
+
5
+ declare class ButtonState implements AfterViewInit {
6
+ /**
7
+ * Defines the icon to be displayed as graphical element within the component after the text.
8
+ The SAP-icons font provides numerous options.
9
+
10
+ **Example:**
11
+
12
+ See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).
13
+ */
14
+ endIcon: _angular_core.InputSignal<string | undefined>;
15
+ /**
16
+ * Defines the icon to be displayed as graphical element within the component before the text.
17
+ The SAP-icons font provides numerous options.
18
+
19
+ **Example:**
20
+
21
+ See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).
22
+ */
23
+ icon: _angular_core.InputSignal<string | undefined>;
24
+ /**
25
+ * Defines the name of the button state.
26
+ */
27
+ name: _angular_core.InputSignal<string | undefined>;
28
+ /**
29
+ * Defines if the component is in split button mode.
30
+ */
31
+ showArrowButton: _angular_core.InputSignalWithTransform<boolean, unknown>;
32
+ /**
33
+ * Defines the text of the button in this state.
34
+ */
35
+ text: _angular_core.InputSignal<string | undefined>;
36
+ elementRef: ElementRef<_ButtonState>;
37
+ injector: Injector;
38
+ /**
39
+ * Content density observer is injected to activate automatic CSS class and
40
+ * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.
41
+ * @private
42
+ */
43
+ private readonly _contentDensityObserver;
44
+ get element(): _ButtonState;
45
+ ngAfterViewInit(): void;
46
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonState, never>;
47
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonState, "ui5-ai-button-state, [ui5-ai-button-state]", ["ui5ButtonState"], { "endIcon": { "alias": "endIcon"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "showArrowButton": { "alias": "showArrowButton"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
48
+ }
49
+
50
+ export { ButtonState };
@@ -0,0 +1,100 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { AfterViewInit, ElementRef, Injector } from '@angular/core';
3
+ import _Button, { AIButtonAccessibilityAttributes } from '@ui5/webcomponents-ai/dist/Button.js';
4
+ export { AIButtonAccessibilityAttributes } from '@ui5/webcomponents-ai/dist/Button.js';
5
+ import { UI5CustomEvent } from '@ui5/webcomponents-base';
6
+
7
+ declare class Button implements AfterViewInit {
8
+ /**
9
+ * Defines the additional accessibility attributes that will be applied to the component.
10
+
11
+ This property allows for fine-tuned control of ARIA attributes for screen reader support.
12
+ It accepts an object with the following optional fields:
13
+
14
+ - **root**: Accessibility attributes that will be applied to the root element.
15
+ - **hasPopup**: Indicates the availability and type of interactive popup element (such as a menu or dialog).
16
+ Accepts string values: `"dialog"`, `"grid"`, `"listbox"`, `"menu"`, or `"tree"`.
17
+ - **roleDescription**: Defines a human-readable description for the button's role.
18
+ Accepts any string value.
19
+ - **title**: Specifies a tooltip or description for screen readers.
20
+ Accepts any string value.
21
+ - **ariaKeyShortcuts**: Defines keyboard shortcuts that activate or focus the button.
22
+
23
+ - **arrowButton**: Accessibility attributes that will be applied to the arrow (split) button element.
24
+ - **hasPopup**: Indicates the type of popup triggered by the arrow button.
25
+ Accepts string values: `"dialog"`, `"grid"`, `"listbox"`, `"menu"`, or `"tree"`.
26
+ - **expanded**: Indicates whether the popup controlled by the arrow button is currently expanded.
27
+ Accepts boolean values: `true` or `false`.
28
+ */
29
+ accessibilityAttributes: _angular_core.InputSignal<AIButtonAccessibilityAttributes | undefined>;
30
+ /**
31
+ * Defines the active state of the arrow button in split mode.
32
+ Set to true when the button is in split mode and a menu with additional options
33
+ is opened by the arrow button. Set back to false when the menu is closed.
34
+ */
35
+ arrowButtonPressed: _angular_core.InputSignalWithTransform<boolean, unknown>;
36
+ /**
37
+ * Defines the component design.
38
+ */
39
+ design: _angular_core.InputSignal<"Default" | "Positive" | "Negative" | "Transparent" | "Emphasized" | "Attention" | undefined>;
40
+ /**
41
+ * Defines whether the component is disabled.
42
+ A disabled component can't be pressed or
43
+ focused, and it is not in the tab chain.
44
+ */
45
+ disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
46
+ /**
47
+ * Defines the current state of the component.
48
+ */
49
+ state: _angular_core.InputSignal<string | undefined>;
50
+ /**
51
+ * Fired when the component is in split mode and after the arrow button
52
+ is activated either by clicking or tapping it or by using the [Arrow Up] / [Arrow Down],
53
+ [Alt] + [Arrow Up]/ [Arrow Down], or [F4] keyboard keys.
54
+ */
55
+ ui5ArrowButtonClick: _angular_core.OutputEmitterRef<UI5CustomEvent<_Button, "arrow-button-click">>;
56
+ /**
57
+ * Fired when the component is activated either with a
58
+ mouse/tap or by using the Enter or Space key.
59
+ */
60
+ ui5Click: _angular_core.OutputEmitterRef<UI5CustomEvent<_Button, "click">>;
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
+ * - **(default)**: Defines the available states of the component.
68
+ **Note:** Although this slot accepts HTML Elements, it is strongly recommended that
69
+ you only use `ui5-ai-button-state` components in order to preserve the intended design.
70
+ *
71
+ * @example
72
+ * ```html
73
+ * <ui5-ai-button>
74
+ * <div slot="header">Custom header content</div>
75
+ * <p>Default slot content</p>
76
+ * </ui5-ai-button>
77
+ * ```
78
+ *
79
+ * @readonly
80
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots | MDN Web Components Slots}
81
+ */
82
+ readonly slots: {
83
+ name: string;
84
+ description: string;
85
+ }[];
86
+ elementRef: ElementRef<_Button>;
87
+ injector: Injector;
88
+ /**
89
+ * Content density observer is injected to activate automatic CSS class and
90
+ * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.
91
+ * @private
92
+ */
93
+ private readonly _contentDensityObserver;
94
+ get element(): _Button;
95
+ ngAfterViewInit(): void;
96
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Button, never>;
97
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Button, "ui5-ai-button, [ui5-ai-button]", ["ui5Button"], { "accessibilityAttributes": { "alias": "accessibilityAttributes"; "required": false; "isSignal": true; }; "arrowButtonPressed": { "alias": "arrowButtonPressed"; "required": false; "isSignal": true; }; "design": { "alias": "design"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; }, { "ui5ArrowButtonClick": "ui5ArrowButtonClick"; "ui5Click": "ui5Click"; }, never, ["*"], true, never>;
98
+ }
99
+
100
+ export { Button };