@sapui5/sap.suite.ui.generic.template 1.148.0 → 1.148.2

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 (81) hide show
  1. package/package.json +1 -1
  2. package/src/sap/suite/ui/generic/template/.library +1 -1
  3. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_fr_CA.properties +2 -2
  4. package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
  5. package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
  6. package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +6 -3
  7. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr.properties +1 -1
  8. package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
  9. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
  10. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Actions.fragment.xml +13 -13
  11. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  12. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  13. package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartFilterBarWrapper.js +20 -1
  14. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
  15. package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +0 -7
  16. package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +57 -6
  17. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillAIOrchestrator.js +216 -0
  18. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillApplyHandler.js +325 -0
  19. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillDialogController.js +358 -0
  20. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFieldCollector.js +848 -0
  21. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFormRenderer.js +292 -0
  22. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillHandler.js +652 -1071
  23. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillTableRenderer.js +940 -0
  24. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillDialog.fragment.xml +41 -26
  25. package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +90 -73
  26. package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +35 -8
  27. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +29 -7
  28. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +29 -7
  29. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +29 -7
  30. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +29 -7
  31. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +29 -7
  32. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +29 -7
  33. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +29 -7
  34. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +29 -7
  35. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +29 -7
  36. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +29 -7
  37. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +29 -7
  38. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +29 -7
  39. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +29 -7
  40. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +29 -7
  41. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +29 -7
  42. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +29 -7
  43. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +30 -8
  44. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +31 -9
  45. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +29 -7
  46. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +30 -8
  47. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +29 -7
  48. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +29 -7
  49. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +29 -7
  50. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +29 -7
  51. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +29 -7
  52. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +29 -7
  53. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +29 -7
  54. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +29 -7
  55. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +29 -7
  56. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +29 -7
  57. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +29 -7
  58. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +30 -8
  59. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +29 -7
  60. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +29 -7
  61. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +29 -7
  62. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +29 -7
  63. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +29 -7
  64. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +29 -7
  65. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +29 -7
  66. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +29 -7
  67. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +29 -7
  68. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +29 -7
  69. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +29 -7
  70. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +29 -7
  71. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +29 -7
  72. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +29 -7
  73. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +29 -7
  74. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +29 -7
  75. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +29 -7
  76. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
  77. package/src/sap/suite/ui/generic/template/library.js +1 -1
  78. package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +30 -4
  79. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/ObjectPageSectionHandler.js +0 -282
  80. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillNonUpdatableSmartForm.fragment.xml +0 -18
  81. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillUpdatebleSmartForm.fragment.xml +0 -15
@@ -0,0 +1,358 @@
1
+ sap.ui.define([
2
+ "sap/ui/model/json/JSONModel",
3
+ "sap/m/MessageToast",
4
+ "sap/suite/ui/generic/template/genericUtilities/FeLogger",
5
+ "sap/suite/ui/generic/template/genericUtilities/FeError",
6
+ "sap/ui/core/ResizeHandler"
7
+ ], function(JSONModel, MessageToast, FeLogger, FeError, ResizeHandler) {
8
+ "use strict";
9
+
10
+ var sClassName = "lib.ai.EasyFill.EasyFillDialogController";
11
+ var oLogger = new FeLogger(sClassName).getLogger();
12
+
13
+ /**
14
+ * EasyFillDialogController
15
+ *
16
+ * Responsible for all EasyFill dialog lifecycle concerns:
17
+ * 1. Initializing and registering the easyFillDialogModel on the view (once per view lifetime).
18
+ * 2. Loading and opening the EasyFillDialog fragment with all event handler and formatter bindings.
19
+ * 3. Handling pure UI events: mode toggle, fullscreen, feedback, cancel, clear, AI Notice popover.
20
+ * 4. Providing formatter functions used by XML bindings in the dialog fragment.
21
+ *
22
+ * This module contains no OData, field collection, or AI call logic.
23
+ * All data operations are delegated to EasyFillAIOrchestrator, EasyFillFormRenderer,
24
+ * EasyFillTableRenderer, and EasyFillApplyHandler.
25
+ */
26
+ return {
27
+
28
+ /**
29
+ * Initializes the easyFillDialogModel on the view if it has not already been created.
30
+ * Also registers the "EasyFillFETransientChanges" deferred group on the OData model
31
+ * so that no batch calls are triggered until the user explicitly confirms.
32
+ *
33
+ * Should be called once before the dialog is opened for the first time.
34
+ *
35
+ * @param {object} oController - MVC controller (used to get the view and set the model)
36
+ * @param {object} oObjectPageModel - the OData model (used to register the deferred group)
37
+ * @param {object} oEasyFillLayoutMode - EasyFillLayoutMode enum
38
+ */
39
+ initDialogModel: function(oController, oObjectPageModel, oEasyFillLayoutMode) {
40
+ var bIsModelCreated = !!oController.getView().getModel("easyFillDialogModel");
41
+ if (bIsModelCreated) {
42
+ return; // Already initialized — nothing to do
43
+ }
44
+
45
+ // Register a deferred group so AI-staged changes are not submitted until confirmaton
46
+ var aDeferredGroups = oObjectPageModel.getDeferredGroups();
47
+ aDeferredGroups.push("EasyFillFETransientChanges");
48
+ oObjectPageModel.setDeferredGroups(aDeferredGroups);
49
+
50
+ // Initial model state — all fields set to their "empty / waiting for AI" defaults
51
+ var oData = {
52
+ isBusy: false,
53
+ isFormVisible: false,
54
+ isIllustrationVisible: true,
55
+ isSaveEnabled: false,
56
+ stateType: "Initial",
57
+ feedbackEnabled: true,
58
+ feedbackPressedUp: false,
59
+ feedbackPressedDown: false,
60
+ isEasyFillButtonEnabled: false,
61
+ llmData: {},
62
+ updatableFields: {},
63
+ nonUpdatableFields: {},
64
+ hasNonUpdatableFields: false,
65
+ easyFillMode: oEasyFillLayoutMode.CondensedMode,
66
+ sections: [],
67
+ isFullScreen: true,
68
+ hasTableUpdates: false,
69
+ attemptedMultipleNewRows: false,
70
+ isSplitterPageMode: false
71
+ };
72
+
73
+ oController.getView().setModel(new JSONModel(oData), "easyFillDialogModel");
74
+ oLogger.debug("initDialogModel: easyFillDialogModel created and registered on view");
75
+ },
76
+
77
+ /**
78
+ * Loads the EasyFillDialog fragment (if not already loaded) and opens it.
79
+ * Registers all event handlers and formatters on the fragment controller object.
80
+ *
81
+ * The dialog is kept alive after first open (not destroyed on close) so that the
82
+ * ObjectPageLayout and SmartForm structures are preserved between invocations.
83
+ *
84
+ * @param {object} oController - MVC controller
85
+ * @param {object} oTemplateUtils - FE template utilities (used for getDialogFragmentAsync)
86
+ * @param {object} oHandlers - map of event handler and formatter functions to bind to the fragment
87
+ * @returns {Promise<void>}
88
+ */
89
+ openDialog: function(oController, oTemplateUtils, oHandlers) {
90
+ var sFragmentName = "sap.suite.ui.generic.template.lib.ai.EasyFill.fragments.EasyFillDialog";
91
+
92
+ return oTemplateUtils.oCommonUtils.getDialogFragmentAsync(
93
+ sFragmentName,
94
+ oHandlers,
95
+ "easyFillPopup",
96
+ undefined,
97
+ true, // keep alive — do not destroy on close
98
+ true // use view as parent
99
+ ).then(function(oDialog) {
100
+ oDialog.open();
101
+
102
+ // Register a ResizeHandler on the ResponsiveSplitter
103
+ // The dialog is kept alive across opens so we must not register more than once.
104
+ if (!oDialog._easyFillResizeHandlerId) {
105
+ oDialog.attachEventOnce("afterOpen", function() {
106
+ // Locate the splitter by its stable fragment ID
107
+ var oSplitter = oController.byId("EasyFillMainFlex") &&
108
+ oController.byId("EasyFillMainFlex").findAggregatedObjects(true, function(o) {
109
+ return o.isA("sap.ui.layout.ResponsiveSplitter");
110
+ })[0];
111
+
112
+ if (oSplitter) {
113
+ var oDialogModel = oController.getView().getModel("easyFillDialogModel");
114
+ // sapUiRSVisiblePaginator is added/removed by the splitter itself on resize
115
+ oDialog._easyFillResizeHandlerId = ResizeHandler.register(oSplitter, function() {
116
+ var bInPageMode = oSplitter.$().hasClass("sapUiRSVisiblePaginator");
117
+ oDialogModel.setProperty("/isSplitterPageMode", bInPageMode);
118
+ if (bInPageMode && !oDialogModel.getProperty("/isFullScreen")) {
119
+ // Reset fullscreen state so pane sizes are correct when dialog is widened again
120
+ oDialogModel.setProperty("/isFullScreen", true);
121
+ oController.byId("inputAreaSplitPane").getLayoutData().setSize("40%");
122
+ oController.byId("reviewAreaSplitPane").getLayoutData().setSize("60%");
123
+ }
124
+ });
125
+ }
126
+ });
127
+ }
128
+
129
+ oLogger.debug("openDialog: EasyFillDialog opened");
130
+ });
131
+ },
132
+
133
+ /**
134
+ * Closes the EasyFill dialog if it is currently open.
135
+ *
136
+ * @param {object} oController - MVC controller
137
+ */
138
+ closeDialog: function(oController) {
139
+ var oDialog = oController.byId("EasyFillDialog");
140
+ if (oDialog && oDialog.isOpen()) {
141
+ oDialog.close();
142
+ // Reset page-mode flag so the button is visible on the next open
143
+ oController.getView().getModel("easyFillDialogModel").setProperty("/isSplitterPageMode", false);
144
+ oLogger.debug("closeDialog: EasyFillDialog closed");
145
+ }
146
+ },
147
+
148
+ // ─── Event Handlers (bound to the fragment controller object) ────────────
149
+
150
+ /**
151
+ * Handles the layout mode SegmentedButton selection change (Condensed ↔ ObjectPage view).
152
+ * Re-builds the sections array in the dialog model for the selected mode.
153
+ *
154
+ * @param {sap.ui.base.Event} oEvent
155
+ * @param {object} oController - MVC controller
156
+ * @param {object} oTemplateUtils - FE template utilities (for entity type lookup)
157
+ * @param {object} oRb - i18n resource bundle
158
+ * @param {object} oFieldCollector - EasyFillFieldCollector
159
+ * @param {object} oEasyFillLayoutMode - EasyFillLayoutMode enum
160
+ */
161
+ onSelectionChange: function(oEvent, oController, oTemplateUtils, oRb, oFieldCollector, oEasyFillLayoutMode) {
162
+ var sSelectedKey = oEvent.getSource().getSelectedKey();
163
+ var oDialogModel = oController.getView().getModel("easyFillDialogModel");
164
+ var oEntityType = oTemplateUtils.oCommonUtils.getMetaModelEntityType(
165
+ oController.getOwnerComponent().getEntitySet()
166
+ );
167
+ oDialogModel.setProperty("/easyFillMode", sSelectedKey);
168
+ var oLLMResult = oDialogModel.getProperty("/llmData") || {};
169
+ // Use stored updatable subset when available; fall back to full LLM result
170
+ // only when it is absent (e.g. before the first AI submit).
171
+ // Important: an empty map is a valid state (all fields are non-updatable)
172
+ // and must not trigger fallback, otherwise non-updatable fields appear as filled.
173
+ var oStoredUpdatable = oDialogModel.getProperty("/updatableFields");
174
+ var oUpdatableFields = (oStoredUpdatable !== undefined && oStoredUpdatable !== null)
175
+ ? oStoredUpdatable
176
+ : oLLMResult;
177
+ var oNonUpdatableFields = oDialogModel.getProperty("/nonUpdatableFields") || {};
178
+ var aData = (sSelectedKey === oEasyFillLayoutMode.CondensedMode)
179
+ ? oFieldCollector.getSectionsForCondensedView(oLLMResult, oUpdatableFields, oNonUpdatableFields)
180
+ : oFieldCollector.getSectionsForObjectPageView(oEntityType, oLLMResult, oRb, oNonUpdatableFields);
181
+ oDialogModel.setProperty("/sections", aData);
182
+ },
183
+
184
+ /**
185
+ * Handles the feedback button press.
186
+ * Disables the feedback buttons and shows a thank-you toast.
187
+ *
188
+ * @param {object} oController - MVC controller
189
+ * @param {object} oRb - i18n resource bundle
190
+ */
191
+ onFeedbackPress: function(oController, oRb) {
192
+ var oDialogModel = oController.getView().getModel("easyFillDialogModel");
193
+ oDialogModel.setProperty("/feedbackEnabled", false);
194
+ MessageToast.show(oRb.getText("EASYFILL_RESULT_FEEDBACK"));
195
+ },
196
+
197
+ /**
198
+ * Handles the live change event on the input text area.
199
+ * Enforces the 2000 character limit by truncating excess input.
200
+ * Enables/disables the "Easy Fill" submit button based on whether there is any input.
201
+ *
202
+ * @param {sap.ui.base.Event} oEvent
203
+ * @param {object} oController - MVC controller
204
+ */
205
+ onLiveChange: function(oEvent, oController) {
206
+ var oTextArea = oEvent.getSource();
207
+ var sValue = oTextArea.getValue();
208
+ var iMaxLength = 2000;
209
+
210
+ // Enforce character limit by truncating excess input
211
+ if (sValue && sValue.length > iMaxLength) {
212
+ sValue = sValue.substring(0, iMaxLength);
213
+ oTextArea.setValue(sValue);
214
+ }
215
+
216
+ var oDialogModel = oController.getView().getModel("easyFillDialogModel");
217
+ oDialogModel.setProperty("/isEasyFillButtonEnabled", !!sValue);
218
+ },
219
+
220
+ /**
221
+ * Handles the fullscreen toggle button press.
222
+ * Adjusts the SplitPane layout data sizes to show only the review area or both panes.
223
+ *
224
+ * @param {object} oController - MVC controller
225
+ */
226
+ onToggleFullScreen: function(oController) {
227
+ var oDialogModel = oController.getView().getModel("easyFillDialogModel");
228
+ var bIsFullScreen = oDialogModel.getProperty("/isFullScreen");
229
+ oDialogModel.setProperty("/isFullScreen", !bIsFullScreen);
230
+
231
+ if (bIsFullScreen) {
232
+ // Collapse input pane to show only the review area
233
+ oController.byId("inputAreaSplitPane").getLayoutData().setSize("0%");
234
+ oController.byId("reviewAreaSplitPane").getLayoutData().setSize("100%");
235
+ } else {
236
+ // Restore split view
237
+ oController.byId("inputAreaSplitPane").getLayoutData().setSize("40%");
238
+ oController.byId("reviewAreaSplitPane").getLayoutData().setSize("60%");
239
+ }
240
+ },
241
+
242
+ /**
243
+ * Handles the "AI Notice" link press by lazily loading and opening the AINotice popover.
244
+ *
245
+ * @param {sap.ui.base.Event} oEvent
246
+ * @param {object} oTemplateUtils - FE template utilities (for fragment loading)
247
+ * @param {object} oAIPopoverRef - mutable ref object: { popover: null } — used to cache the popover
248
+ * @returns {Promise<void>}
249
+ */
250
+ onLinkPress: async function(oEvent, oTemplateUtils, oAIPopoverRef) {
251
+ if (!oAIPopoverRef.popover) {
252
+ oAIPopoverRef.popover = await this.getAIPopover(oTemplateUtils);
253
+ }
254
+ oAIPopoverRef.popover.openBy(oEvent.getSource());
255
+ },
256
+
257
+ // ─── Fragment / Popover Loading ───────────────────────────────────────────
258
+
259
+ /**
260
+ * Lazily loads the AINotice popover fragment and returns it.
261
+ * The popover is kept alive after first creation.
262
+ *
263
+ * @param {object} oTemplateUtils - FE template utilities (for getDialogFragmentAsync)
264
+ * @returns {Promise<sap.m.Popover>}
265
+ */
266
+ getAIPopover: function(oTemplateUtils) {
267
+ return oTemplateUtils.oCommonUtils.getDialogFragmentAsync(
268
+ "sap.suite.ui.generic.template.fragments.AINotice",
269
+ {
270
+ onCloseAiPopover: function(oEvent) {
271
+ var oControl = oEvent && oEvent.getSource && oEvent.getSource();
272
+ while (oControl && !(oControl.isA && oControl.isA("sap.m.Popover"))) {
273
+ oControl = oControl.getParent && oControl.getParent();
274
+ }
275
+ if (oControl && oControl.close) {
276
+ oControl.close();
277
+ }
278
+ }
279
+ },
280
+ "aiPopover",
281
+ undefined,
282
+ true // keep alive
283
+ );
284
+ },
285
+
286
+ // ─── Formatters (used in XML fragment bindings) ───────────────────────────
287
+
288
+ /**
289
+ * Resolves an i18n key pattern in a section title string.
290
+ * Matches {@i18n>SomeKey} or {i18n>SomeKey} patterns and replaces them with the translated text.
291
+ * Returns the title as-is if no i18n pattern is found.
292
+ *
293
+ * @param {string} sTitle - raw title string (may contain i18n pattern)
294
+ * @param {object} oController - MVC controller (used to access the i18n model)
295
+ * @returns {string}
296
+ */
297
+ formatSectionTitle: function(sTitle, oController) {
298
+ if (!sTitle) { return ""; }
299
+
300
+ var oResourceBundle = oController.getView().getModel("i18n").getResourceBundle();
301
+
302
+ // Handle i18n pattern in title
303
+ var oMatch = sTitle.match(/\{@?i18n>([^}]+)\}/);
304
+ if (oMatch) {
305
+ var sKey = oMatch[1];
306
+ return oResourceBundle.getText(sKey);
307
+ }
308
+ return sTitle;
309
+ },
310
+
311
+ /**
312
+ * Returns the IllustratedMessage illustration type string for a given dialog state.
313
+ *
314
+ * @param {string} sState - one of "Initial" | "NoEntries" | "Error"
315
+ * @returns {string} SAP illustration type string
316
+ */
317
+ formatIllustrationType: function(sState) {
318
+ switch (sState) {
319
+ case "Initial": return "sapIllus-NoSearchResults";
320
+ case "NoEntries": return "sapIllus-NoEntries";
321
+ case "Error": return "sapIllus-UnableToLoad";
322
+ default: return "sapIllus-NoSearchResults";
323
+ }
324
+ },
325
+
326
+ /**
327
+ * Returns the IllustratedMessage title i18n text for a given dialog state.
328
+ *
329
+ * @param {string} sState - one of "Initial" | "NoEntries" | "Error"
330
+ * @param {object} oRb - i18n resource bundle
331
+ * @returns {string}
332
+ */
333
+ formatIllustrationTitle: function(sState, oRb) {
334
+ switch (sState) {
335
+ case "Initial": return oRb.getText("EASY_FILL_ILLUSTRATION_TITLE_INITIAL");
336
+ case "NoEntries": return oRb.getText("EASY_FILL_ILLUSTRATION_TITLE_NO_ENTRIES");
337
+ case "Error": return oRb.getText("EASY_FILL_ILLUSTRATION_TITLE_ERROR");
338
+ default: return oRb.getText("EASY_FILL_ILLUSTRATION_TITLE_INITIAL");
339
+ }
340
+ },
341
+
342
+ /**
343
+ * Returns the IllustratedMessage description i18n text for a given dialog state.
344
+ *
345
+ * @param {string} sState - one of "Initial" | "NoEntries" | "Error"
346
+ * @param {object} oRb - i18n resource bundle
347
+ * @returns {string}
348
+ */
349
+ formatIllustrationDescription: function(sState, oRb) {
350
+ switch (sState) {
351
+ case "Initial": return oRb.getText("EASY_FILL_ILLUSTRATION_DESCRIPTION_INITIAL");
352
+ case "NoEntries": return oRb.getText("EASY_FILL_ILLUSTRATION_DESCRIPTION_NO_ENTRIES");
353
+ case "Error": return oRb.getText("EASY_FILL_ILLUSTRATION_DESCRIPTION_ERROR");
354
+ default: return oRb.getText("EASY_FILL_ILLUSTRATION_DESCRIPTION_INITIAL");
355
+ }
356
+ }
357
+ };
358
+ });