@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,341 @@
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/Input.js';
4
+ import { ContentDensityObserver, contentDensityObserverProviders, ContentDensityMode } from '@fundamental-ngx/core/content-density';
5
+ import * as i1 from '@fundamental-ngx/ui5-webcomponents-ai/utils';
6
+ import { CVA_CONFIG, GenericControlValueAccessor } from '@fundamental-ngx/ui5-webcomponents-ai/utils';
7
+
8
+ class Input {
9
+ constructor() {
10
+ /**
11
+ * Indicates the index of the currently displayed version.
12
+ */
13
+ this.currentVersion = input(0, ...(ngDevMode ? [{ debugName: "currentVersion" }] : []));
14
+ /**
15
+ * Defines whether the AI Writing Assistant is currently loading.
16
+
17
+ When `true`, indicates that an AI action is in progress.
18
+ */
19
+ this.loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : {}), transform: booleanAttribute });
20
+ /**
21
+ * Indicates the total number of result versions available.
22
+
23
+ When not set or set to 0, the versioning will be hidden.
24
+ */
25
+ this.totalVersions = input(0, ...(ngDevMode ? [{ debugName: "totalVersions" }] : []));
26
+ /**
27
+ * Defines the accessible description of the component.
28
+ */
29
+ this.accessibleDescription = input(...(ngDevMode ? [undefined, { debugName: "accessibleDescription" }] : []));
30
+ /**
31
+ * Receives id(or many ids) of the elements that describe the input.
32
+ */
33
+ this.accessibleDescriptionRef = input(...(ngDevMode ? [undefined, { debugName: "accessibleDescriptionRef" }] : []));
34
+ /**
35
+ * Defines the accessible ARIA name of the component.
36
+ */
37
+ this.accessibleName = input(...(ngDevMode ? [undefined, { debugName: "accessibleName" }] : []));
38
+ /**
39
+ * Receives id(or many ids) of the elements that label the input.
40
+ */
41
+ this.accessibleNameRef = input(...(ngDevMode ? [undefined, { debugName: "accessibleNameRef" }] : []));
42
+ /**
43
+ * Defines whether the component is in disabled state.
44
+
45
+ **Note:** A disabled component is completely noninteractive.
46
+ */
47
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
48
+ /**
49
+ * Defines the filter type of the component.
50
+ */
51
+ this.filter = input("None", ...(ngDevMode ? [{ debugName: "filter" }] : []));
52
+ /**
53
+ * Sets the maximum number of characters available in the input field.
54
+
55
+ **Note:** This property is not compatible with the ui5-input type InputType.Number. If the ui5-input type is set to Number, the maxlength value is ignored.
56
+ */
57
+ this.maxlength = input(...(ngDevMode ? [undefined, { debugName: "maxlength" }] : []));
58
+ /**
59
+ * Determines the name by which the component will be identified upon submission in an HTML form.
60
+
61
+ **Note:** This property is only applicable within the context of an HTML Form element.
62
+ */
63
+ this.name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : []));
64
+ /**
65
+ * Defines whether the value will be autcompleted to match an item
66
+ */
67
+ this.noTypeahead = input(false, { ...(ngDevMode ? { debugName: "noTypeahead" } : {}), transform: booleanAttribute });
68
+ /**
69
+ * Defines whether the suggestions picker is open.
70
+ The picker will not open if the `showSuggestions` property is set to `false`, the input is disabled or the input is readonly.
71
+ The picker will close automatically and `close` event will be fired if the input is not in the viewport.
72
+ */
73
+ this.open = input(false, { ...(ngDevMode ? { debugName: "open" } : {}), transform: booleanAttribute });
74
+ /**
75
+ * Defines a short hint intended to aid the user with data entry when the
76
+ component has no value.
77
+ */
78
+ this.placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : []));
79
+ /**
80
+ * Defines whether the component is read-only.
81
+
82
+ **Note:** A read-only component is not editable,
83
+ but still provides visual feedback upon user interaction.
84
+ */
85
+ this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
86
+ /**
87
+ * Defines whether the component is required.
88
+ */
89
+ this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : {}), transform: booleanAttribute });
90
+ /**
91
+ * Defines whether the clear icon of the input will be shown.
92
+ */
93
+ this.showClearIcon = input(false, { ...(ngDevMode ? { debugName: "showClearIcon" } : {}), transform: booleanAttribute });
94
+ /**
95
+ * Defines whether the component should show suggestions, if such are present.
96
+ */
97
+ this.showSuggestions = input(false, { ...(ngDevMode ? { debugName: "showSuggestions" } : {}), transform: booleanAttribute });
98
+ /**
99
+ * Defines the HTML type of the component.
100
+
101
+ **Notes:**
102
+
103
+ - The particular effect of this property differs depending on the browser
104
+ and the current language settings, especially for type `Number`.
105
+ - The property is mostly intended to be used with touch devices
106
+ that use different soft keyboard layouts depending on the given input type.
107
+ */
108
+ this.type = input("Text", ...(ngDevMode ? [{ debugName: "type" }] : []));
109
+ /**
110
+ * Defines the value of the component.
111
+
112
+ **Note:** The property is updated upon typing.
113
+ */
114
+ this.value = input("", ...(ngDevMode ? [{ debugName: "value" }] : []));
115
+ /**
116
+ * Defines the value state of the component.
117
+ */
118
+ this.valueState = input("None", ...(ngDevMode ? [{ debugName: "valueState" }] : [])); // className is now passed
119
+ /**
120
+ * Fired when the user selects the AI button.
121
+ */
122
+ this.ui5ButtonClick = output();
123
+ /**
124
+ * Fired when an item from the AI actions menu is clicked.
125
+ */
126
+ this.ui5ItemClick = output();
127
+ /**
128
+ * Fired when the user selects the "Stop" button to stop ongoing AI text generation.
129
+ */
130
+ this.ui5StopGeneration = output();
131
+ /**
132
+ * Fired when the user selects the version navigation buttons.
133
+ */
134
+ this.ui5VersionChange = output();
135
+ /**
136
+ * Fired when the input operation has finished by pressing Enter or on focusout.
137
+ */
138
+ this.ui5Change = output();
139
+ /**
140
+ * Fired when the suggestions picker is closed.
141
+ */
142
+ this.ui5Close = output();
143
+ /**
144
+ * Fired when the value of the component changes at each keystroke,
145
+ and when a suggestion item has been selected.
146
+ */
147
+ this.ui5Input = output();
148
+ /**
149
+ * Fired when the suggestions picker is open.
150
+ */
151
+ this.ui5Open = output();
152
+ /**
153
+ * Fired when some text has been selected.
154
+ */
155
+ this.ui5Select = output();
156
+ /**
157
+ * Fired when the user navigates to a suggestion item via the ARROW keys,
158
+ as a preview, before the final selection.
159
+ */
160
+ this.ui5SelectionChange = output();
161
+ /**
162
+ * Available slots for content projection in this component.
163
+ *
164
+ * Slots allow you to insert custom content into predefined areas of the web component.
165
+ * Use the `slot` attribute on child elements to target specific slots.
166
+ *
167
+ * - **actions**: Defines the items of the menu for the component.
168
+ * - **(default)**: Defines the suggestion items.
169
+
170
+ **Note:** The suggestions would be displayed only if the `showSuggestions`
171
+ property is set to `true`.
172
+
173
+ **Note:** The `<ui5-suggestion-item>`, `<ui5-suggestion-item-group>` and `ui5-suggestion-item-custom` are recommended to be used as suggestion items.
174
+ * - **icon**: Defines the icon to be displayed in the component.
175
+ * - **valueStateMessage**: Defines the value state message that will be displayed as pop up under the component.
176
+ The value state message slot should contain only one root element.
177
+
178
+ **Note:** If not specified, a default text (in the respective language) will be displayed.
179
+
180
+ **Note:** The `valueStateMessage` would be displayed,
181
+ when the component is in `Information`, `Critical` or `Negative` value state.
182
+
183
+ **Note:** If the component has `suggestionItems`,
184
+ the `valueStateMessage` would be displayed as part of the same popover, if used on desktop, or dialog - on phone.
185
+ *
186
+ * @example
187
+ * ```html
188
+ * <ui5-ai-input>
189
+ * <div slot="header">Custom header content</div>
190
+ * <p>Default slot content</p>
191
+ * </ui5-ai-input>
192
+ * ```
193
+ *
194
+ * @readonly
195
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots | MDN Web Components Slots}
196
+ */
197
+ this.slots = [
198
+ {
199
+ "name": "actions",
200
+ "description": "Defines the items of the menu for the component."
201
+ },
202
+ {
203
+ "name": "default",
204
+ "description": "Defines the suggestion items.\n\n**Note:** The suggestions would be displayed only if the `showSuggestions`\nproperty is set to `true`.\n\n**Note:** The `<ui5-suggestion-item>`, `<ui5-suggestion-item-group>` and `ui5-suggestion-item-custom` are recommended to be used as suggestion items."
205
+ },
206
+ {
207
+ "name": "icon",
208
+ "description": "Defines the icon to be displayed in the component."
209
+ },
210
+ {
211
+ "name": "valueStateMessage",
212
+ "description": "Defines the value state message that will be displayed as pop up under the component.\nThe value state message slot should contain only one root element.\n\n**Note:** If not specified, a default text (in the respective language) will be displayed.\n\n**Note:** The `valueStateMessage` would be displayed,\nwhen the component is in `Information`, `Critical` or `Negative` value state.\n\n**Note:** If the component has `suggestionItems`,\nthe `valueStateMessage` would be displayed as part of the same popover, if used on desktop, or dialog - on phone.",
213
+ "since": "1.0.0-rc.6"
214
+ }
215
+ ];
216
+ this.elementRef = inject(ElementRef);
217
+ this.injector = inject(Injector);
218
+ /**
219
+ * Content density observer is injected to activate automatic CSS class and
220
+ * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.
221
+ * @private
222
+ */
223
+ this._contentDensityObserver = inject(ContentDensityObserver);
224
+ }
225
+ get element() {
226
+ return this.elementRef.nativeElement;
227
+ }
228
+ ngAfterViewInit() {
229
+ const wcElement = this.element;
230
+ const inputsToSync = [
231
+ 'currentVersion',
232
+ 'loading',
233
+ 'totalVersions',
234
+ 'accessibleDescription',
235
+ 'accessibleDescriptionRef',
236
+ 'accessibleName',
237
+ 'accessibleNameRef',
238
+ 'disabled',
239
+ 'filter',
240
+ 'maxlength',
241
+ 'name',
242
+ 'noTypeahead',
243
+ 'open',
244
+ 'placeholder',
245
+ 'readonly',
246
+ 'required',
247
+ 'showClearIcon',
248
+ 'showSuggestions',
249
+ 'type',
250
+ 'value',
251
+ 'valueState',
252
+ ];
253
+ // Synchronize inputs (properties)
254
+ for (const inputName of inputsToSync) {
255
+ // Find the corresponding camelCase signal property on the Angular component
256
+ const signalName = inputName.replace(/-./g, (x) => x[1].toUpperCase());
257
+ // Use the Injector to run the effect in the correct context
258
+ if (this[signalName] && typeof this[signalName] === 'function') {
259
+ runInInjectionContext(this.injector, () => {
260
+ effect(() => {
261
+ // Read the signal value
262
+ const value = this[signalName]();
263
+ if (wcElement) {
264
+ // Write the value to the Web Component's property
265
+ wcElement[inputName] = value;
266
+ }
267
+ });
268
+ });
269
+ }
270
+ }
271
+ const outputsToSync = [
272
+ 'ui5ButtonClick',
273
+ 'ui5ItemClick',
274
+ 'ui5StopGeneration',
275
+ 'ui5VersionChange',
276
+ 'ui5Change',
277
+ 'ui5Close',
278
+ 'ui5Input',
279
+ 'ui5Open',
280
+ 'ui5Select',
281
+ 'ui5SelectionChange',
282
+ ];
283
+ // Synchronize outputs (events)
284
+ for (const outputName of outputsToSync) {
285
+ // Map Angular output name to UI5 web component event name
286
+ const eventName = outputName.replace('ui5', '').replace(/([A-Z])/g, '-$1').toLowerCase().substring(1);
287
+ // Ensure the output property exists and has an emit function before adding listener
288
+ if (this[outputName] && typeof this[outputName].emit === 'function' && wcElement.addEventListener) {
289
+ // Cast the listener to the correct type to satisfy TypeScript
290
+ wcElement.addEventListener(eventName, (e) => {
291
+ this[outputName].emit(e);
292
+ });
293
+ }
294
+ }
295
+ }
296
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Input, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
297
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: Input, isStandalone: true, selector: "ui5-ai-input, [ui5-ai-input]", inputs: { currentVersion: { classPropertyName: "currentVersion", publicName: "currentVersion", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, totalVersions: { classPropertyName: "totalVersions", publicName: "totalVersions", isSignal: true, isRequired: false, transformFunction: null }, accessibleDescription: { classPropertyName: "accessibleDescription", publicName: "accessibleDescription", isSignal: true, isRequired: false, transformFunction: null }, accessibleDescriptionRef: { classPropertyName: "accessibleDescriptionRef", publicName: "accessibleDescriptionRef", isSignal: true, isRequired: false, transformFunction: null }, accessibleName: { classPropertyName: "accessibleName", publicName: "accessibleName", isSignal: true, isRequired: false, transformFunction: null }, accessibleNameRef: { classPropertyName: "accessibleNameRef", publicName: "accessibleNameRef", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, noTypeahead: { classPropertyName: "noTypeahead", publicName: "noTypeahead", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, showClearIcon: { classPropertyName: "showClearIcon", publicName: "showClearIcon", isSignal: true, isRequired: false, transformFunction: null }, showSuggestions: { classPropertyName: "showSuggestions", publicName: "showSuggestions", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, valueState: { classPropertyName: "valueState", publicName: "valueState", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ui5ButtonClick: "ui5ButtonClick", ui5ItemClick: "ui5ItemClick", ui5StopGeneration: "ui5StopGeneration", ui5VersionChange: "ui5VersionChange", ui5Change: "ui5Change", ui5Close: "ui5Close", ui5Input: "ui5Input", ui5Open: "ui5Open", ui5Select: "ui5Select", ui5SelectionChange: "ui5SelectionChange" }, providers: [
298
+ contentDensityObserverProviders({
299
+ supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]
300
+ }),
301
+ {
302
+ provide: CVA_CONFIG,
303
+ useValue: {
304
+ property: 'value',
305
+ events: ['change', 'input'],
306
+ transformValue: (v) => v || ''
307
+ }
308
+ }
309
+ ], exportAs: ["ui5Input"], hostDirectives: [{ directive: i1.GenericControlValueAccessor }], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
310
+ }
311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: Input, decorators: [{
312
+ type: Component,
313
+ args: [{
314
+ standalone: true,
315
+ selector: 'ui5-ai-input, [ui5-ai-input]',
316
+ template: '<ng-content></ng-content>',
317
+ exportAs: 'ui5Input',
318
+ hostDirectives: [GenericControlValueAccessor],
319
+ providers: [
320
+ contentDensityObserverProviders({
321
+ supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]
322
+ }),
323
+ {
324
+ provide: CVA_CONFIG,
325
+ useValue: {
326
+ property: 'value',
327
+ events: ['change', 'input'],
328
+ transformValue: (v) => v || ''
329
+ }
330
+ }
331
+ ],
332
+ changeDetection: ChangeDetectionStrategy.OnPush,
333
+ }]
334
+ }], propDecorators: { currentVersion: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentVersion", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], totalVersions: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalVersions", required: false }] }], accessibleDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibleDescription", required: false }] }], accessibleDescriptionRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibleDescriptionRef", required: false }] }], accessibleName: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibleName", required: false }] }], accessibleNameRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibleNameRef", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], maxlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxlength", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], noTypeahead: [{ type: i0.Input, args: [{ isSignal: true, alias: "noTypeahead", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], showClearIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearIcon", required: false }] }], showSuggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSuggestions", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], valueState: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueState", required: false }] }], ui5ButtonClick: [{ type: i0.Output, args: ["ui5ButtonClick"] }], ui5ItemClick: [{ type: i0.Output, args: ["ui5ItemClick"] }], ui5StopGeneration: [{ type: i0.Output, args: ["ui5StopGeneration"] }], ui5VersionChange: [{ type: i0.Output, args: ["ui5VersionChange"] }], ui5Change: [{ type: i0.Output, args: ["ui5Change"] }], ui5Close: [{ type: i0.Output, args: ["ui5Close"] }], ui5Input: [{ type: i0.Output, args: ["ui5Input"] }], ui5Open: [{ type: i0.Output, args: ["ui5Open"] }], ui5Select: [{ type: i0.Output, args: ["ui5Select"] }], ui5SelectionChange: [{ type: i0.Output, args: ["ui5SelectionChange"] }] } });
335
+
336
+ /**
337
+ * Generated bundle index. Do not edit.
338
+ */
339
+
340
+ export { Input };
341
+ //# sourceMappingURL=fundamental-ngx-ui5-webcomponents-ai-input.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fundamental-ngx-ui5-webcomponents-ai-input.mjs","sources":["../../../../libs/ui5-webcomponents-ai/input/index.ts","../../../../libs/ui5-webcomponents-ai/input/fundamental-ngx-ui5-webcomponents-ai-input.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/Input.js';\nimport { default as _Input } from '@ui5/webcomponents-ai/dist/Input.js';\nimport { UI5CustomEvent } from '@ui5/webcomponents-base';\nimport {\n ContentDensityObserver,\n contentDensityObserverProviders,\n ContentDensityMode\n} from '@fundamental-ngx/core/content-density';\nimport { GenericControlValueAccessor, CVA_CONFIG } from '@fundamental-ngx/ui5-webcomponents-ai/utils';\nimport { default as InputSuggestionsFilter } from '@ui5/webcomponents/dist/types/InputSuggestionsFilter.js';\nimport { default as InputType } from '@ui5/webcomponents/dist/types/InputType.js';\nimport { default as ValueState } from '@ui5/webcomponents-base/dist/types/ValueState.js';\n\n@Component({\n standalone: true,\n selector: 'ui5-ai-input, [ui5-ai-input]',\n template: '<ng-content></ng-content>',\n exportAs: 'ui5Input',\n hostDirectives: [GenericControlValueAccessor],\n providers: [\n contentDensityObserverProviders({\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]\n }),\n {\n provide: CVA_CONFIG,\n useValue: {\n property: 'value',\n events: ['change', 'input'],\n transformValue: (v) => v || ''\n }\n }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Input implements AfterViewInit {\n\n /**\n * Indicates the index of the currently displayed version.\n */\n currentVersion = input<typeof _Input.prototype.currentVersion | undefined>(0);\n\n /**\n * Defines whether the AI Writing Assistant is currently loading.\n\nWhen `true`, indicates that an AI action is in progress.\n */\n loading = input(false, { transform: booleanAttribute });\n\n /**\n * Indicates the total number of result versions available.\n\nWhen not set or set to 0, the versioning will be hidden.\n */\n totalVersions = input<typeof _Input.prototype.totalVersions | undefined>(0);\n\n /**\n * Defines the accessible description of the component.\n */\n accessibleDescription = input<typeof _Input.prototype.accessibleDescription | undefined>();\n\n /**\n * Receives id(or many ids) of the elements that describe the input.\n */\n accessibleDescriptionRef = input<typeof _Input.prototype.accessibleDescriptionRef | undefined>();\n\n /**\n * Defines the accessible ARIA name of the component.\n */\n accessibleName = input<typeof _Input.prototype.accessibleName | undefined>();\n\n /**\n * Receives id(or many ids) of the elements that label the input.\n */\n accessibleNameRef = input<typeof _Input.prototype.accessibleNameRef | undefined>();\n\n /**\n * Defines whether the component is in disabled state.\n\n**Note:** A disabled component is completely noninteractive.\n */\n disabled = input(false, { transform: booleanAttribute });\n\n /**\n * Defines the filter type of the component.\n */\n filter = input<typeof _Input.prototype.filter | undefined>(\"None\");\n\n /**\n * Sets the maximum number of characters available in the input field.\n\n**Note:** This property is not compatible with the ui5-input type InputType.Number. If the ui5-input type is set to Number, the maxlength value is ignored.\n */\n maxlength = input<typeof _Input.prototype.maxlength | undefined>();\n\n /**\n * Determines the name by which the component will be identified upon submission in an HTML form.\n\n**Note:** This property is only applicable within the context of an HTML Form element.\n */\n name = input<typeof _Input.prototype.name | undefined>();\n\n /**\n * Defines whether the value will be autcompleted to match an item\n */\n noTypeahead = input(false, { transform: booleanAttribute });\n\n /**\n * Defines whether the suggestions picker is open.\nThe picker will not open if the `showSuggestions` property is set to `false`, the input is disabled or the input is readonly.\nThe picker will close automatically and `close` event will be fired if the input is not in the viewport.\n */\n open = input(false, { transform: booleanAttribute });\n\n /**\n * Defines a short hint intended to aid the user with data entry when the\ncomponent has no value.\n */\n placeholder = input<typeof _Input.prototype.placeholder | undefined>();\n\n /**\n * Defines whether the component is read-only.\n\n**Note:** A read-only component is not editable,\nbut still provides visual feedback upon user interaction.\n */\n readonly = input(false, { transform: booleanAttribute });\n\n /**\n * Defines whether the component is required.\n */\n required = input(false, { transform: booleanAttribute });\n\n /**\n * Defines whether the clear icon of the input will be shown.\n */\n showClearIcon = input(false, { transform: booleanAttribute });\n\n /**\n * Defines whether the component should show suggestions, if such are present.\n */\n showSuggestions = input(false, { transform: booleanAttribute });\n\n /**\n * Defines the HTML type of the component.\n\n**Notes:**\n\n- The particular effect of this property differs depending on the browser\nand the current language settings, especially for type `Number`.\n- The property is mostly intended to be used with touch devices\nthat use different soft keyboard layouts depending on the given input type.\n */\n type = input<typeof _Input.prototype.type | undefined>(\"Text\");\n\n /**\n * Defines the value of the component.\n\n**Note:** The property is updated upon typing.\n */\n value = input<typeof _Input.prototype.value | undefined>(\"\");\n\n /**\n * Defines the value state of the component.\n */\n valueState = input<typeof _Input.prototype.valueState | undefined>(\"None\"); // className is now passed\n\n\n\n /**\n * Fired when the user selects the AI button.\n */\n ui5ButtonClick = output<UI5CustomEvent<_Input, 'button-click'>>();\n\n /**\n * Fired when an item from the AI actions menu is clicked.\n */\n ui5ItemClick = output<UI5CustomEvent<_Input, 'item-click'>>();\n\n /**\n * Fired when the user selects the \"Stop\" button to stop ongoing AI text generation.\n */\n ui5StopGeneration = output<UI5CustomEvent<_Input, 'stop-generation'>>();\n\n /**\n * Fired when the user selects the version navigation buttons.\n */\n ui5VersionChange = output<UI5CustomEvent<_Input, 'version-change'>>();\n\n /**\n * Fired when the input operation has finished by pressing Enter or on focusout.\n */\n ui5Change = output<UI5CustomEvent<_Input, 'change'>>();\n\n /**\n * Fired when the suggestions picker is closed.\n */\n ui5Close = output<UI5CustomEvent<_Input, 'close'>>();\n\n /**\n * Fired when the value of the component changes at each keystroke,\nand when a suggestion item has been selected.\n */\n ui5Input = output<UI5CustomEvent<_Input, 'input'>>();\n\n /**\n * Fired when the suggestions picker is open.\n */\n ui5Open = output<UI5CustomEvent<_Input, 'open'>>();\n\n /**\n * Fired when some text has been selected.\n */\n ui5Select = output<UI5CustomEvent<_Input, 'select'>>();\n\n /**\n * Fired when the user navigates to a suggestion item via the ARROW keys,\nas a preview, before the final selection.\n */\n ui5SelectionChange = output<UI5CustomEvent<_Input, 'selection-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 * - **actions**: Defines the items of the menu for the component.\n * - **(default)**: Defines the suggestion items.\n\n**Note:** The suggestions would be displayed only if the `showSuggestions`\nproperty is set to `true`.\n\n**Note:** The `<ui5-suggestion-item>`, `<ui5-suggestion-item-group>` and `ui5-suggestion-item-custom` are recommended to be used as suggestion items.\n * - **icon**: Defines the icon to be displayed in the component.\n * - **valueStateMessage**: Defines the value state message that will be displayed as pop up under the component.\nThe value state message slot should contain only one root element.\n\n**Note:** If not specified, a default text (in the respective language) will be displayed.\n\n**Note:** The `valueStateMessage` would be displayed,\nwhen the component is in `Information`, `Critical` or `Negative` value state.\n\n**Note:** If the component has `suggestionItems`,\nthe `valueStateMessage` would be displayed as part of the same popover, if used on desktop, or dialog - on phone.\n *\n * @example\n * ```html\n * <ui5-ai-input>\n * <div slot=\"header\">Custom header content</div>\n * <p>Default slot content</p>\n * </ui5-ai-input>\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\": \"actions\",\n \"description\": \"Defines the items of the menu for the component.\"\n },\n {\n \"name\": \"default\",\n \"description\": \"Defines the suggestion items.\\n\\n**Note:** The suggestions would be displayed only if the `showSuggestions`\\nproperty is set to `true`.\\n\\n**Note:** The `<ui5-suggestion-item>`, `<ui5-suggestion-item-group>` and `ui5-suggestion-item-custom` are recommended to be used as suggestion items.\"\n },\n {\n \"name\": \"icon\",\n \"description\": \"Defines the icon to be displayed in the component.\"\n },\n {\n \"name\": \"valueStateMessage\",\n \"description\": \"Defines the value state message that will be displayed as pop up under the component.\\nThe value state message slot should contain only one root element.\\n\\n**Note:** If not specified, a default text (in the respective language) will be displayed.\\n\\n**Note:** The `valueStateMessage` would be displayed,\\nwhen the component is in `Information`, `Critical` or `Negative` value state.\\n\\n**Note:** If the component has `suggestionItems`,\\nthe `valueStateMessage` would be displayed as part of the same popover, if used on desktop, or dialog - on phone.\",\n \"since\": \"1.0.0-rc.6\"\n }\n ];\n\n\n public elementRef: ElementRef<_Input> = 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(): _Input {\n return this.elementRef.nativeElement;\n }\n\n ngAfterViewInit(): void {\n const wcElement = this.element;\n \n const inputsToSync = [\n 'currentVersion',\n 'loading',\n 'totalVersions',\n 'accessibleDescription',\n 'accessibleDescriptionRef',\n 'accessibleName',\n 'accessibleNameRef',\n 'disabled',\n 'filter',\n 'maxlength',\n 'name',\n 'noTypeahead',\n 'open',\n 'placeholder',\n 'readonly',\n 'required',\n 'showClearIcon',\n 'showSuggestions',\n 'type',\n 'value',\n 'valueState',\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 'ui5ItemClick',\n 'ui5StopGeneration',\n 'ui5VersionChange',\n 'ui5Change',\n 'ui5Close',\n 'ui5Input',\n 'ui5Open',\n 'ui5Select',\n 'ui5SelectionChange',\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":";;;;;;;MAkDa,KAAK,CAAA;AArBlB,IAAA,WAAA,GAAA;AAuBE;;AAEG;AACH,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAqD,CAAC,0DAAC;AAE7E;;;;AAIG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,KAAK,oDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEvD;;;;AAIG;AACH,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAoD,CAAC,yDAAC;AAE3E;;AAEG;QACH,IAAA,CAAA,qBAAqB,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,uBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAA6D;AAE1F;;AAEG;QACH,IAAA,CAAA,wBAAwB,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,0BAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAgE;AAEhG;;AAEG;QACH,IAAA,CAAA,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAsD;AAE5E;;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AAC;oBAC3B,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI;AAC7B;AACF;AACF,SAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,2BAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAfS,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAkB1B,KAAK,EAAA,UAAA,EAAA,CAAA;kBArBjB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,8BAA8B;AACxC,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,QAAQ,EAAE,UAAU;oBACpB,cAAc,EAAE,CAAC,2BAA2B,CAAC;AAC7C,oBAAA,SAAS,EAAE;AACT,wBAAA,+BAA+B,CAAC;4BAC9B,uBAAuB,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,CAAC,IAAI;yBAC9E,CAAC;AACF,wBAAA;AACE,4BAAA,OAAO,EAAE,UAAU;AACnB,4BAAA,QAAQ,EAAE;AACR,gCAAA,QAAQ,EAAE,OAAO;AACjB,gCAAA,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;gCAC3B,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI;AAC7B;AACF;AACF,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;ACjDD;;AAEG;;;;"}
@@ -0,0 +1,207 @@
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/PromptInput.js';
4
+ import { ContentDensityObserver, contentDensityObserverProviders, ContentDensityMode } from '@fundamental-ngx/core/content-density';
5
+
6
+ class PromptInput {
7
+ constructor() {
8
+ /**
9
+ * Defines whether the component is in disabled state.
10
+
11
+ **Note:** A disabled component is completely noninteractive.
12
+ */
13
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
14
+ /**
15
+ * Defines the label of the input field.
16
+ */
17
+ this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
18
+ /**
19
+ * Sets the maximum number of characters available in the input field.
20
+ */
21
+ this.maxlength = input(...(ngDevMode ? [undefined, { debugName: "maxlength" }] : []));
22
+ /**
23
+ * Defines a short hint intended to aid the user with data entry when the
24
+ component has no value.
25
+ */
26
+ this.placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : []));
27
+ /**
28
+ * Defines whether the component is read-only.
29
+
30
+ **Note:** A read-only component is not editable,
31
+ but still provides visual feedback upon user interaction.
32
+ */
33
+ this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
34
+ /**
35
+ * Defines whether the clear icon of the input will be shown.
36
+ */
37
+ this.showClearIcon = input(false, { ...(ngDevMode ? { debugName: "showClearIcon" } : {}), transform: booleanAttribute });
38
+ /**
39
+ * Determines whether the characters exceeding the maximum allowed character count are visible
40
+ in the component.
41
+
42
+ If set to `false`, the user is not allowed to enter more characters than what is set in the
43
+ `maxlength` property.
44
+ If set to `true` the characters exceeding the `maxlength` value are selected on
45
+ paste and the counter below the component displays their number.
46
+ */
47
+ this.showExceededText = input(false, { ...(ngDevMode ? { debugName: "showExceededText" } : {}), transform: booleanAttribute });
48
+ /**
49
+ * Defines whether the component should show suggestions, if such are present.
50
+ */
51
+ this.showSuggestions = input(false, { ...(ngDevMode ? { debugName: "showSuggestions" } : {}), transform: booleanAttribute });
52
+ /**
53
+ * Defines the value of the component.
54
+ */
55
+ this.value = input("", ...(ngDevMode ? [{ debugName: "value" }] : []));
56
+ /**
57
+ * Defines the value state of the component.
58
+ */
59
+ this.valueState = input("None", ...(ngDevMode ? [{ debugName: "valueState" }] : [])); // className is now passed
60
+ /**
61
+ * Fired when the input operation has finished by pressing Enter
62
+ or on focusout.
63
+ */
64
+ this.ui5Change = output();
65
+ /**
66
+ * Fired when the value of the component changes at each keystroke,
67
+ and when a suggestion item has been selected.
68
+ */
69
+ this.ui5Input = output();
70
+ /**
71
+ * Fired when the input operation has finished by pressing Enter
72
+ or AI button is clicked.
73
+ */
74
+ this.ui5Submit = output();
75
+ /**
76
+ * Available slots for content projection in this component.
77
+ *
78
+ * Slots allow you to insert custom content into predefined areas of the web component.
79
+ * Use the `slot` attribute on child elements to target specific slots.
80
+ *
81
+ * - **(default)**: Defines the suggestion items.
82
+
83
+ **Note:** The suggestions would be displayed only if the `showSuggestions`
84
+ property is set to `true`.
85
+
86
+ **Note:** The `<ui5-suggestion-item>`, `<ui5-suggestion-item-group>` and `ui5-suggestion-item-custom` are recommended to be used as suggestion items.
87
+ * - **valueStateMessage**: Defines the value state message that will be displayed as pop up under the component.
88
+ The value state message slot should contain only one root element.
89
+
90
+ **Note:** If not specified, a default text (in the respective language) will be displayed.
91
+
92
+ **Note:** The `valueStateMessage` would be displayed,
93
+ when the component is in `Information`, `Critical` or `Negative` value state.
94
+ *
95
+ * @example
96
+ * ```html
97
+ * <ui5-ai-prompt-input>
98
+ * <div slot="header">Custom header content</div>
99
+ * <p>Default slot content</p>
100
+ * </ui5-ai-prompt-input>
101
+ * ```
102
+ *
103
+ * @readonly
104
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots | MDN Web Components Slots}
105
+ */
106
+ this.slots = [
107
+ {
108
+ "name": "default",
109
+ "description": "Defines the suggestion items.\n\n**Note:** The suggestions would be displayed only if the `showSuggestions`\nproperty is set to `true`.\n\n**Note:** The `<ui5-suggestion-item>`, `<ui5-suggestion-item-group>` and `ui5-suggestion-item-custom` are recommended to be used as suggestion items."
110
+ },
111
+ {
112
+ "name": "valueStateMessage",
113
+ "description": "Defines the value state message that will be displayed as pop up under the component.\nThe value state message slot should contain only one root element.\n\n**Note:** If not specified, a default text (in the respective language) will be displayed.\n\n**Note:** The `valueStateMessage` would be displayed,\nwhen the component is in `Information`, `Critical` or `Negative` value state.",
114
+ "since": "2.0.0"
115
+ }
116
+ ];
117
+ this.elementRef = inject(ElementRef);
118
+ this.injector = inject(Injector);
119
+ /**
120
+ * Content density observer is injected to activate automatic CSS class and
121
+ * UI5 attribute application. The observer self-initializes, no explicit subscribe() needed.
122
+ * @private
123
+ */
124
+ this._contentDensityObserver = inject(ContentDensityObserver);
125
+ }
126
+ get element() {
127
+ return this.elementRef.nativeElement;
128
+ }
129
+ ngAfterViewInit() {
130
+ const wcElement = this.element;
131
+ const inputsToSync = [
132
+ 'disabled',
133
+ 'label',
134
+ 'maxlength',
135
+ 'placeholder',
136
+ 'readonly',
137
+ 'showClearIcon',
138
+ 'showExceededText',
139
+ 'showSuggestions',
140
+ 'value',
141
+ 'valueState',
142
+ ];
143
+ // Synchronize inputs (properties)
144
+ for (const inputName of inputsToSync) {
145
+ // Find the corresponding camelCase signal property on the Angular component
146
+ const signalName = inputName.replace(/-./g, (x) => x[1].toUpperCase());
147
+ // Use the Injector to run the effect in the correct context
148
+ if (this[signalName] && typeof this[signalName] === 'function') {
149
+ runInInjectionContext(this.injector, () => {
150
+ effect(() => {
151
+ // Read the signal value
152
+ const value = this[signalName]();
153
+ if (wcElement) {
154
+ // Write the value to the Web Component's property
155
+ wcElement[inputName] = value;
156
+ }
157
+ });
158
+ });
159
+ }
160
+ }
161
+ const outputsToSync = [
162
+ 'ui5Change',
163
+ 'ui5Input',
164
+ 'ui5Submit',
165
+ ];
166
+ // Synchronize outputs (events)
167
+ for (const outputName of outputsToSync) {
168
+ // Map Angular output name to UI5 web component event name
169
+ const eventName = outputName.replace('ui5', '').replace(/([A-Z])/g, '-$1').toLowerCase().substring(1);
170
+ // Ensure the output property exists and has an emit function before adding listener
171
+ if (this[outputName] && typeof this[outputName].emit === 'function' && wcElement.addEventListener) {
172
+ // Cast the listener to the correct type to satisfy TypeScript
173
+ wcElement.addEventListener(eventName, (e) => {
174
+ this[outputName].emit(e);
175
+ });
176
+ }
177
+ }
178
+ }
179
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PromptInput, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
180
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: PromptInput, isStandalone: true, selector: "ui5-ai-prompt-input, [ui5-ai-prompt-input]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, showClearIcon: { classPropertyName: "showClearIcon", publicName: "showClearIcon", isSignal: true, isRequired: false, transformFunction: null }, showExceededText: { classPropertyName: "showExceededText", publicName: "showExceededText", isSignal: true, isRequired: false, transformFunction: null }, showSuggestions: { classPropertyName: "showSuggestions", publicName: "showSuggestions", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, valueState: { classPropertyName: "valueState", publicName: "valueState", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ui5Change: "ui5Change", ui5Input: "ui5Input", ui5Submit: "ui5Submit" }, providers: [
181
+ contentDensityObserverProviders({
182
+ supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]
183
+ })
184
+ ], exportAs: ["ui5PromptInput"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
185
+ }
186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PromptInput, decorators: [{
187
+ type: Component,
188
+ args: [{
189
+ standalone: true,
190
+ selector: 'ui5-ai-prompt-input, [ui5-ai-prompt-input]',
191
+ template: '<ng-content></ng-content>',
192
+ exportAs: 'ui5PromptInput',
193
+ providers: [
194
+ contentDensityObserverProviders({
195
+ supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY]
196
+ })
197
+ ],
198
+ changeDetection: ChangeDetectionStrategy.OnPush,
199
+ }]
200
+ }], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], maxlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxlength", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], showClearIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearIcon", required: false }] }], showExceededText: [{ type: i0.Input, args: [{ isSignal: true, alias: "showExceededText", required: false }] }], showSuggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSuggestions", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], valueState: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueState", required: false }] }], ui5Change: [{ type: i0.Output, args: ["ui5Change"] }], ui5Input: [{ type: i0.Output, args: ["ui5Input"] }], ui5Submit: [{ type: i0.Output, args: ["ui5Submit"] }] } });
201
+
202
+ /**
203
+ * Generated bundle index. Do not edit.
204
+ */
205
+
206
+ export { PromptInput };
207
+ //# sourceMappingURL=fundamental-ngx-ui5-webcomponents-ai-prompt-input.mjs.map