@sapui5/sap.cux.home 1.136.6 → 1.136.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.cux.home",
3
- "version": "1.136.6",
3
+ "version": "1.136.7",
4
4
  "description": "SAPUI5 Library sap.cux.home",
5
5
  "keywords": [
6
6
  "sapui5",
@@ -7,7 +7,7 @@
7
7
  SAP UI development toolkit for HTML5 (SAPUI5)
8
8
  (c) Copyright 2009-${currentYear} SAP SE. All rights reserved
9
9
  </copyright>
10
- <version>1.136.6</version>
10
+ <version>1.136.7</version>
11
11
 
12
12
  <documentation>UI5 library: sap.cux.home</documentation>
13
13
  <dependencies>
@@ -1 +1 @@
1
- {"version":3,"file":"AppsAdditionPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/AppsAdditionPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,gCAAgC,CAAC;IAgBhD,OAAO,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;IAG/D,OAAiB,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;IAgBpE,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;IAI/D,OAAO,EAA4C,cAAc,EAAE,MAAM,sCAAsC,CAAC;IAchH,MAAM,SAAS;;;;KAId,CAAC;IAEF,KAAK,YAAY;QAChB,IAAI,SAAS;QACb,SAAS,cAAc;QACvB,QAAQ,aAAa;KACrB;IAED,KAAK,SAAS;QACb,cAAc,mBAAmB;QACjC,YAAY,iBAAiB;KAC7B;IAED,KAAK,QAAQ;QACZ,MAAM,WAAW;KACjB;IAED,UAAU,UAAU;QACnB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,cAAc,EAAE,MAAM,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,QAAQ,CAAC;QACnB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AAa;QAuBrB;;;;;;WAMG;QACH,OAAO,CAAC,YAAY;QAKpB;;;;;;WAMG;gBACW,+BAA+B;QAY7C;;;;;;WAMG;gBACW,eAAe;QAU7B;;;;;;;WAOG;gBACW,mBAAmB;QAuBjC;;;;;;;WAOG;QACH,OAAO,CAAC,iBAAiB;QAuBzB;;;;;;;WAOG;QACH,OAAO,CAAC,oBAAoB;QAQ5B;;;;;;WAMG;QACI,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;QAU/C;;;;;WAKG;gBACW,cAAc;QA2B5B;;;;;WAKG;QACH,OAAO,CAAC,SAAS;QAIjB;;;;;WAKG;QACH,OAAO,CAAC,gBAAgB;QAMxB;;;;;WAKG;QACH,OAAO,CAAC,cAAc;QAMtB;;;;;WAKG;gBACW,mBAAmB;QAIjC;;;;;WAKG;QACH,OAAO,CAAC,oBAAoB;QAM5B;;;;;WAKG;gBACW,mBAAmB;QAIjC;;;;;WAKG;QACI,qBAAqB,CAAC,KAAK,EAAE,6BAA6B,GAAG,IAAI;QAcxE;;;;;WAKG;QACH,OAAO,CAAC,YAAY;QAUpB;;;;;;WAMG;QACH,OAAO,CAAC,aAAa;QAQrB;;;;;WAKG;QACI,0BAA0B,CAAC,KAAK,EAAE,wBAAwB;QAkBjE;;;;;WAKG;QACI,qBAAqB,IAAI,MAAM;QAKtC;;;;WAIG;QACH,OAAO,CAAC,aAAa;QAOrB;;;;WAIG;QACI,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;KAO/C;CAEA"}
@@ -493,8 +493,8 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
493
493
  if (!_this2.isPanelSupported) {
494
494
  _this2.removeActionButton(_this2.addAppsButton);
495
495
  const contentAdditionDialog = _this2.getParent();
496
- contentAdditionDialog.removePanel(_this2);
497
- contentAdditionDialog.updateActionButtons();
496
+ contentAdditionDialog?.removePanel(_this2);
497
+ contentAdditionDialog?.updateActionButtons();
498
498
  }
499
499
  return _this2.isPanelSupported;
500
500
  }
@@ -631,8 +631,9 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
631
631
  if (_temp4 && _temp4.then) return _temp4.then(function () {});
632
632
  }); // suggest apps if there are results and search is not cancelled
633
633
  }, function (err) {
634
- Log.error(err.message);
635
- _this3._handleError();
634
+ const message = err.message || "";
635
+ Log.error(message);
636
+ _this3._handleError(message);
636
637
  });
637
638
  }, function (_wasThrown, _result) {
638
639
  // update search status only if search is not cancelled
@@ -773,48 +774,39 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
773
774
  fetchAppsFromSearch: function _fetchAppsFromSearch(query) {
774
775
  try {
775
776
  const _this5 = this;
776
- return Promise.resolve(_catch(function () {
777
- return Promise.resolve(_this5._fetchCSRFToken()).then(function (token) {
778
- const headers = {
779
- "Content-Type": "application/json",
780
- ...(token && {
781
- "X-CSRF-Token": token
782
- })
783
- };
784
- return Promise.resolve(fetch(AI_APP_FINDER_API, {
785
- method: "POST",
786
- headers,
787
- body: JSON.stringify({
788
- UserInput: query
789
- })
790
- })).then(function (response) {
791
- let _exit = false;
792
- function _temp0(_result2) {
793
- return _exit ? _result2 : Promise.resolve(response.json()).then(function (_response$json2) {
794
- const queryResult = _response$json2;
795
- return queryResult.value || [];
777
+ return Promise.resolve(_this5._fetchCSRFToken()).then(function (token) {
778
+ const headers = {
779
+ "Content-Type": "application/json",
780
+ ...(token && {
781
+ "X-CSRF-Token": token
782
+ })
783
+ };
784
+ return Promise.resolve(fetch(AI_APP_FINDER_API, {
785
+ method: "POST",
786
+ headers,
787
+ body: JSON.stringify({
788
+ UserInput: query
789
+ })
790
+ })).then(function (response) {
791
+ let _exit = false;
792
+ function _temp9(_result2) {
793
+ return _exit ? _result2 : Promise.resolve(response.json()).then(function (_response$json2) {
794
+ const queryResult = _response$json2;
795
+ return queryResult.value || [];
796
+ });
797
+ }
798
+ const _temp8 = function () {
799
+ if (!response.ok) {
800
+ return Promise.resolve(response.json()).then(function (_response$json) {
801
+ const errorResponse = _response$json;
802
+ throw new Error(errorResponse.error?.message || "");
796
803
  });
797
804
  }
798
- const _temp9 = function () {
799
- if (!response.ok) {
800
- return Promise.resolve(response.json()).then(function (_response$json) {
801
- const errorResponse = _response$json;
802
- _this5._handleError(errorResponse.error?.message || "");
803
- const _temp8 = [];
804
- _exit = true;
805
- return _temp8;
806
- });
807
- }
808
- }();
809
- // handle error responses
810
- return _temp9 && _temp9.then ? _temp9.then(_temp0) : _temp0(_temp9);
811
- });
805
+ }();
806
+ // handle error responses
807
+ return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
812
808
  });
813
- }, function (error) {
814
- Log.error(error.message);
815
- _this5._handleError();
816
- return [];
817
- }));
809
+ });
818
810
  } catch (e) {
819
811
  return Promise.reject(e);
820
812
  }
@@ -886,37 +878,37 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
886
878
  onPressAddApps: function _onPressAddApps() {
887
879
  try {
888
880
  const _this6 = this;
889
- function _temp14() {
890
- function _temp12() {
891
- function _temp10() {
892
- _this6.getParent().close();
881
+ function _temp13() {
882
+ function _temp11() {
883
+ function _temp1() {
884
+ _this6.getParent()?.close();
893
885
  MessageToast.show(_this6._i18nBundle.getText("appAddedToFavorites"));
894
886
  _this6.resetPanel();
895
887
  }
896
- const _temp1 = function () {
888
+ const _temp0 = function () {
897
889
  if (dynamicAppsPresent) {
898
890
  return Promise.resolve(_this6.refreshInsightsApps()).then(function () {});
899
891
  }
900
892
  }();
901
- return _temp1 && _temp1.then ? _temp1.then(_temp10) : _temp10(_temp1);
893
+ return _temp0 && _temp0.then ? _temp0.then(_temp1) : _temp1(_temp0);
902
894
  }
903
- const _temp11 = function () {
895
+ const _temp10 = function () {
904
896
  if (staticAppsPresent) {
905
897
  return Promise.resolve(_this6.refreshFavoriteApps()).then(function () {});
906
898
  }
907
899
  }();
908
- return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
900
+ return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
909
901
  }
910
902
  const userSelectedApps = _this6.model.getProperty("/userSelectedApps");
911
903
  let staticAppsPresent = false;
912
904
  let dynamicAppsPresent = false;
913
- const _temp13 = _forOf(userSelectedApps, function (app) {
905
+ const _temp12 = _forOf(userSelectedApps, function (app) {
914
906
  const isStaticApp = app.getBindingContext()?.getProperty("isStaticApp");
915
907
  if (isStaticApp) staticAppsPresent = true;else dynamicAppsPresent = true;
916
908
  const vizId = app.getBindingContext()?.getProperty("chipID");
917
909
  return Promise.resolve(_this6.appManagerInstance.addVisualization(vizId, isStaticApp ? undefined : MYINSIGHT_SECTION_ID)).then(function () {});
918
910
  });
919
- return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13));
911
+ return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(_temp13) : _temp13(_temp12));
920
912
  } catch (e) {
921
913
  return Promise.reject(e);
922
914
  }
@@ -937,7 +929,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
937
929
  * @returns {AppsContainer | undefined} The AppsContainer instance or undefined if not found.
938
930
  */
939
931
  getAppsContainer: function _getAppsContainer() {
940
- return this.getLayout().getContent().find(container => container instanceof AppsContainer);
932
+ return this.getLayout()?.getContent().find(container => container instanceof AppsContainer);
941
933
  },
942
934
  /**
943
935
  * Retrieves the favorite apps panel from the AppsContainer.
@@ -969,7 +961,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
969
961
  * @returns {InsightsContainer | undefined} The AppsContainer instance or undefined if not found.
970
962
  */
971
963
  getInsightsContainer: function _getInsightsContainer() {
972
- return this.getLayout().getContent().find(container => container instanceof InsightsContainer);
964
+ return this.getLayout()?.getContent().find(container => container instanceof InsightsContainer);
973
965
  },
974
966
  /**
975
967
  * Refreshes the Insights tiles panel in the InsightsContainer.
@@ -1 +1 @@
1
- {"version":3,"file":"AppsAdditionPanel.js","names":["sap","ui","define","Log","Button","CustomListItem","ExpandableText","FlexBox","GenericTile","HBox","Label","sap_m_library","MessageToast","Text","VBox","Fragment","sap_ui_core_library","ChangeReason","JSONModel","ResourceModel","Sorter","Container","__AppsContainer","__BaseSettingsPanel","__FavAppPanel","__InsightsContainer","__AppManager","___utils_Constants","___utils_DataFormatUtils","___utils_FeatureUtils","___utils_FESRUtil","_interopRequireDefault","obj","__esModule","default","_catch","body","recover","result","e","then","ButtonType","_finallyRethrows","finalizer","bind","URLHelper","_iteratorSymbol","Symbol","iterator","_settle","pact","state","value","s","_Pact","v","o","observer","prototype","onFulfilled","onRejected","callback","_this","_isSettledPact","thenable","_forTo","array","check","i","reject","_cycle","length","ValueState","_forOf","target","step","next","done","return","_fixup","TypeError","values","push","AppsContainer","BaseSettingsPanel","FavAppPanel","InsightsContainer","AppManager","AI_APP_FINDER_API","AI_APP_FINDER_BASE_URL","CONTENT_ADDITION_PANEL_TYPES","FEATURE_TOGGLES","FESR_IDS","MYINSIGHT_SECTION_ID","recycleId","isNavigationSupportedForFeature","addFESRSemanticStepName","FESR_EVENTS","Constants","DeprecatedInfoText","MinQueryLength","MaxDescriptionLength","SearchStatus","ErrorType","TileType","AppsAdditionPanel","extend","constructor","apply","arguments","appManagerInstance","getInstance","resetSearch","userSelectedApps","clear","model","setProperty","Searching","appSuggestionList","removeSelections","resetFeedback","init","_init","BaseSettingsPanel.prototype.init.call","Set","AI_APP_FINDER","_i18nBundle","getText","_setupActions","_setupContent","attachEvent","resetPanel","addAppsButton","getId","text","type","Emphasized","press","onPressAddApps","bindProperty","parts","formatter","hasError","searchStatus","Complete","PRESS","ADD_AI_APP","addActionButton","Promise","resolve","getServiceAsync","_Container$getService","vizInstantiationService","load","id","name","controller","_Fragment$load","panelContent","addAggregation","query","errorType","NoResultsFound","errorDescription","Idle","loadingAnimations","_generateSearchingAnimations","suggestedAppsCount","suggestedApps","aiPolicyText","_generateAIPolicyText","invalidQuery","feedback","thumbsUp","thumbsDown","setModel","bundleName","byId","bindAggregation","path","factory","_generateListItem","sorter","comparator","firstApp","secondApp","getPriority","statusArray","hasAlreadyAdded","includes","hasDeprecated","firstPriority","secondPriority","attachUpdateFinished","getProperty","getItems","focus","searchTextArea","onsapenter","onPressGo","context","listItem","selected","content","renderType","direction","alignItems","items","_getAppPreviewContainer","_getAppDetailsContainer","addStyleClass","getMultiSelectControl","setEnabled","container","addItem","mode","frameType","width","header","subheader","tileIcon","visible","url","event","_persistDialog","getParent","redirect","getSource","getUrl","vizData","instance","instantiateVisualization","setActive","attachPress","gap","maxCharacters","showColon","_generateStatusTexts","isSupported","_isSupported","_this2","_temp3","isPanelSupported","removeActionButton","contentAdditionDialog","removePanel","updateActionButtons","appsIntent","semanticObject","action","_temp2","undefined","_temp","getFavAppPanel","AI_SMART_APPFINDER","_isNavigationSupporte","loadingShimmer","_resetPanel","defaultModelProperties","setData","getData","_onPressGo","_this3","isValidQuery","_temp5","fetchAppsFromSearch","rawApps","_temp4","fetchAllAvailableVisualizations","allVisualizations","fetchFavVizs","favoriteApps","fetchInsightApps","insightsApps","apps","_generateApps","_filterUnsupportedApps","_handleError","updateAggregation","Refresh","detailedReason","err","error","message","_wasThrown","_result","updatedApps","filter","app","isStaticApp","intents","map","navigationService","isNavigationSupported","supportedAppIndices","_","index","homePageVisualizations","find","viz","vizId","chipID","addedToHomePage","some","visualization","title","subTitle","description","appDescription","icon","iconUrl","tileType","Static","status","getAppStatusTexts","configuration","targetURL","_isValidQuery","trim","_fetchAllAvailableVisualizations","_this4","_temp7","allAvailableVisualizations","_temp6","searchableContentService","getApps","enableVisualizationPreview","allAvailableApps","reduce","visualizations","currentApp","concat","_fetchCSRFToken","fetch","method","headers","response","get","_fetchAppsFromSearch","_this5","token","JSON","stringify","UserInput","_exit","_temp0","_result2","json","_response$json2","queryResult","_temp9","ok","_response$json","errorResponse","_temp8","_getAppStatusTexts","statusTexts","parsedConfig","parse","tileConfig","tileConfiguration","infoText","display_info_text","toLowerCase","warning","stausTexts","applyStatusClass","_applyStatusClass","_onPressAddApps","_this6","_temp14","_temp12","_temp10","close","show","_temp1","dynamicAppsPresent","refreshInsightsApps","_temp11","staticAppsPresent","refreshFavoriteApps","_temp13","getBindingContext","addVisualization","getLayout","_getLayout","getAppsContainer","_getAppsContainer","getContent","_getFavAppPanel","panel","_refreshFavoriteApps","_this7","refreshPanel","getInsightsContainer","_getInsightsContainer","_refreshInsightsApps","_this8","refreshData","onListSelectionChange","_onListSelectionChange","getParameter","delete","add","Array","from","suggestedResponseCount","errorCode","match","_getErrorType","ServiceError","onSearchTextAreaLiveChange","_onSearchTextAreaLiveChange","textArea","getValue","setValueState","Information","setValueStateText","Warning","None","getValueState","linkText","_resetFeedback","sendFeedback","_sendFeedback","feedbackType"],"sources":["AppsAdditionPanel.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport Log from \"sap/base/Log\";\nimport Button from \"sap/m/Button\";\nimport CustomListItem from \"sap/m/CustomListItem\";\nimport ExpandableText from \"sap/m/ExpandableText\";\nimport FlexBox from \"sap/m/FlexBox\";\nimport GenericTile, { GenericTile$PressEvent } from \"sap/m/GenericTile\";\nimport HBox from \"sap/m/HBox\";\nimport Label from \"sap/m/Label\";\nimport { ButtonType, URLHelper } from \"sap/m/library\";\nimport List from \"sap/m/List\";\nimport { ListBase$SelectionChangeEvent } from \"sap/m/ListBase\";\nimport MessageToast from \"sap/m/MessageToast\";\nimport Text from \"sap/m/Text\";\nimport TextArea, { TextArea$LiveChangeEvent } from \"sap/m/TextArea\";\nimport VBox from \"sap/m/VBox\";\nimport Control from \"sap/ui/core/Control\";\nimport Fragment from \"sap/ui/core/Fragment\";\nimport { ValueState } from \"sap/ui/core/library\";\nimport ChangeReason from \"sap/ui/model/ChangeReason\";\nimport Context from \"sap/ui/model/Context\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport ResourceModel from \"sap/ui/model/resource/ResourceModel\";\nimport Sorter from \"sap/ui/model/Sorter\";\nimport Container from \"sap/ushell/Container\";\nimport Navigation, { Target } from \"sap/ushell/services/Navigation\";\nimport SearchableContent, { AppData } from \"sap/ushell/services/SearchableContent\";\nimport VisualizationInstantiation from \"sap/ushell/services/VisualizationInstantiation\";\nimport AppsContainer from \"./AppsContainer\";\nimport BaseLayout from \"./BaseLayout\";\nimport BaseSettingsPanel from \"./BaseSettingsPanel\";\nimport ContentAdditionDialog from \"./ContentAdditionDialog\";\nimport FavAppPanel from \"./FavAppPanel\";\nimport InsightsContainer from \"./InsightsContainer\";\nimport { ICustomVisualization, ICustomVizInstance, IVisualization } from \"./interface/AppsInterface\";\nimport AppManager from \"./utils/AppManager\";\nimport {\n\tAI_APP_FINDER_API,\n\tAI_APP_FINDER_BASE_URL,\n\tCONTENT_ADDITION_PANEL_TYPES,\n\tFEATURE_TOGGLES,\n\tFESR_IDS,\n\tMYINSIGHT_SECTION_ID\n} from \"./utils/Constants\";\nimport { recycleId } from \"./utils/DataFormatUtils\";\nimport { isNavigationSupportedForFeature } from \"./utils/FeatureUtils\";\nimport { addFESRSemanticStepName, FESR_EVENTS } from \"./utils/FESRUtil\";\n\nconst Constants = {\n\tDeprecatedInfoText: \"deprecated\",\n\tMinQueryLength: 2,\n\tMaxDescriptionLength: 500\n};\n\nenum SearchStatus {\n\tIdle = \"idle\",\n\tSearching = \"searching\",\n\tComplete = \"complete\"\n}\n\nenum ErrorType {\n\tNoResultsFound = \"noResultsFound\",\n\tServiceError = \"serviceError\"\n}\n\nenum TileType {\n\tStatic = \"STATIC\"\n}\n\ninterface RawAppData {\n\ttitle: string;\n\tsubTitle: string;\n\tappDescription: string;\n\tchipID: string;\n\ttileType: TileType;\n\ticonUrl: string;\n\tconfiguration: string;\n}\ninterface SuggestedApp {\n\ticon: string;\n\ttitle: string;\n\tchipID: string;\n\tstatus: string[];\n\tsubTitle: string;\n\tdescription: string;\n\tisStaticApp: boolean;\n\taddedToHomePage: boolean;\n\tvizData?: IVisualization;\n}\n\ninterface QueryResponse {\n\tvalue: RawAppData[];\n}\n\ninterface ErrorResponse {\n\terror: {\n\t\tcode: string;\n\t\tmessage: string;\n\t};\n}\n\ninterface Configuration {\n\ttileConfiguration: string;\n}\n\ninterface TileConfig {\n\tdisplay_info_text: string;\n\t[key: string]: string;\n}\n\n/**\n *\n * Class for Apps Addition Panel in MyHome.\n *\n * @extends BaseSettingsPanel\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.136\n *\n * @internal\n * @experimental Since 1.136\n * @private\n *\n * @alias sap.cux.home.AppsAdditionPanel\n */\nexport default class AppsAdditionPanel extends BaseSettingsPanel {\n\tprivate appManagerInstance: AppManager = AppManager.getInstance();\n\tprivate vizInstantiationService!: VisualizationInstantiation;\n\tprivate allAvailableVisualizations!: IVisualization[];\n\tprivate userSelectedApps!: Set<CustomListItem>;\n\tprivate appSuggestionList!: List;\n\tprivate model!: JSONModel;\n\tprivate addAppsButton!: Button;\n\tprivate isPanelSupported!: boolean;\n\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @public\n\t * @override\n\t */\n\tpublic init(): void {\n\t\tsuper.init();\n\t\tthis.userSelectedApps = new Set<CustomListItem>();\n\n\t\t//setup panel\n\t\tthis.setProperty(\"key\", CONTENT_ADDITION_PANEL_TYPES.AI_APP_FINDER);\n\t\tthis.setProperty(\"title\", this._i18nBundle.getText(\"addAppsAndTile\"));\n\n\t\t//setup actions\n\t\tthis._setupActions();\n\n\t\t//setup content\n\t\tvoid this._setupContent();\n\n\t\t//setup events\n\t\tthis.attachEvent(\"onDialogClose\", this.resetPanel.bind(this));\n\t}\n\n\t/**\n\t * Sets up the actions for the Apps Addition Panel.\n\t *\n\t * @private\n\t */\n\tprivate _setupActions(): void {\n\t\tthis.addAppsButton = new Button(recycleId(`${this.getId()}-add-app-btn`), {\n\t\t\ttext: this._i18nBundle.getText(\"addFromInsightsDialogBtn\"),\n\t\t\ttype: ButtonType.Emphasized,\n\t\t\tpress: () => {\n\t\t\t\tvoid this.onPressAddApps();\n\t\t\t}\n\t\t});\n\n\t\tthis.addAppsButton.bindProperty(\"enabled\", {\n\t\t\tparts: [\"/hasError\", \"/searchStatus\", \"/userSelectedApps\"],\n\t\t\tformatter: (hasError: boolean, searchStatus: SearchStatus, userSelectedApps: string[]) => {\n\t\t\t\treturn !hasError && searchStatus === SearchStatus.Complete && userSelectedApps.length > 0;\n\t\t\t}\n\t\t});\n\n\t\taddFESRSemanticStepName(this.addAppsButton, FESR_EVENTS.PRESS, FESR_IDS.ADD_AI_APP);\n\t\tthis.addActionButton(this.addAppsButton);\n\t}\n\n\t/**\n\t * Sets up the content for the Apps Addition Panel.\n\t *\n\t * @private\n\t * @async\n\t */\n\tprivate async _setupContent(): Promise<void> {\n\t\tthis.vizInstantiationService = await Container.getServiceAsync<VisualizationInstantiation>(\"VisualizationInstantiation\");\n\n\t\t//load ui fragment\n\t\tconst panelContent = (await Fragment.load({\n\t\t\tid: `${this.getId()}-content`,\n\t\t\tname: \"sap.cux.home.utils.fragment.appsAdditionContent\",\n\t\t\tcontroller: this\n\t\t})) as Control;\n\t\tthis.addAggregation(\"content\", panelContent);\n\n\t\t//initialize ui model\n\t\tthis.model = new JSONModel({\n\t\t\tquery: \"\",\n\t\t\thasError: false,\n\t\t\terrorType: ErrorType.NoResultsFound,\n\t\t\terrorDescription: \"\",\n\t\t\tsearchStatus: SearchStatus.Idle,\n\t\t\tloadingAnimations: this._generateSearchingAnimations(),\n\t\t\tsuggestedAppsCount: 0,\n\t\t\tuserSelectedApps: [],\n\t\t\tsuggestedApps: [],\n\t\t\taiPolicyText: this._generateAIPolicyText(),\n\t\t\tinvalidQuery: true,\n\t\t\tfeedback: {\n\t\t\t\tthumbsUp: false,\n\t\t\t\tthumbsDown: false\n\t\t\t}\n\t\t});\n\n\t\tpanelContent.setModel(this.model);\n\t\tpanelContent.setModel(new ResourceModel({ bundleName: \"sap.cux.home.i18n.messagebundle\" }), \"i18n\");\n\t\tthis.addAppsButton.setModel(this.model);\n\n\t\t//bind suggested apps list\n\t\tthis.appSuggestionList = Fragment.byId(`${this.getId()}-content`, \"appsList\") as List;\n\t\tthis.appSuggestionList.bindAggregation(\"items\", {\n\t\t\tpath: \"/suggestedApps\",\n\t\t\tfactory: this._generateListItem.bind(this),\n\t\t\tsorter: new Sorter({\n\t\t\t\tpath: \"status\",\n\t\t\t\tcomparator: (firstApp: string[], secondApp: string[]) => {\n\t\t\t\t\tconst getPriority = (statusArray: string[]) => {\n\t\t\t\t\t\tif (statusArray.length === 0) return 0; // Empty array has highest priority\n\n\t\t\t\t\t\tconst hasAlreadyAdded = statusArray.includes(this._i18nBundle.getText(\"alreadyAddedApp\") as string);\n\t\t\t\t\t\tconst hasDeprecated = statusArray.includes(this._i18nBundle.getText(\"deprecatedApp\") as string);\n\n\t\t\t\t\t\tif (hasAlreadyAdded && hasDeprecated) return 3; // Both statuses - lowest priority\n\t\t\t\t\t\tif (hasAlreadyAdded) return 1; // Only \"Already Added\"\n\t\t\t\t\t\tif (hasDeprecated) return 2; // Only \"Deprecated\"\n\n\t\t\t\t\t\treturn 4; // Any other combination (fallback)\n\t\t\t\t\t};\n\n\t\t\t\t\tconst firstPriority = getPriority(firstApp);\n\t\t\t\t\tconst secondPriority = getPriority(secondApp);\n\n\t\t\t\t\treturn firstPriority - secondPriority;\n\t\t\t\t}\n\t\t\t})\n\t\t});\n\n\t\t//focus on the first item when the list is updated\n\t\tthis.appSuggestionList.attachUpdateFinished(() => {\n\t\t\tif (this.model.getProperty(\"/suggestedAppsCount\") > 0 && this.model.getProperty(\"/searchStatus\") === SearchStatus.Complete) {\n\t\t\t\tthis.appSuggestionList.getItems()?.[0].focus();\n\t\t\t}\n\t\t});\n\n\t\t//bind search field\n\t\tconst searchTextArea = Fragment.byId(`${this.getId()}-content`, \"searchTextArea\") as TextArea;\n\t\tsearchTextArea.onsapenter = this.onPressGo.bind(this);\n\t}\n\n\t/**\n\t * Generates a list item for the Apps Addition Panel.\n\t *\n\t * @private\n\t * @param {string} id - The unique ID for the list item.\n\t * @param {Context} context - The binding context for the list item.\n\t * @returns {CustomListItem} The generated list item control.\n\t */\n\tprivate _generateListItem(id: string, context: Context): CustomListItem {\n\t\tconst listItem = new CustomListItem(id, {\n\t\t\tselected: context.getProperty(\"addedToHomePage\") as boolean,\n\t\t\tcontent: [\n\t\t\t\tnew FlexBox(recycleId(`${id}-result-container`), {\n\t\t\t\t\trenderType: \"Bare\",\n\t\t\t\t\tdirection: context.getProperty(\"isStaticApp\") ? \"Column\" : \"Row\",\n\t\t\t\t\talignItems: context.getProperty(\"isStaticApp\") ? \"Start\" : \"Center\",\n\t\t\t\t\titems: [this._getAppPreviewContainer(id, context), this._getAppDetailsContainer(id, context)]\n\t\t\t\t}).addStyleClass(\"sapUiSmallMargin\")\n\t\t\t]\n\t\t});\n\n\t\t//bind associated checkbox to disable it when the app is already added to home page\n\t\tlistItem.getMultiSelectControl(true).setEnabled(!context.getProperty(\"addedToHomePage\"));\n\n\t\treturn listItem;\n\t}\n\n\t/**\n\t * Creates a preview container for the suggested app.\n\t *\n\t * @private\n\t * @param {string} id - The unique ID for the container.\n\t * @param {Context} context - The binding context for the app.\n\t * @returns {HBox} The app preview container.\n\t */\n\tprivate _getAppPreviewContainer(id: string, context: Context): HBox {\n\t\tconst container = new HBox(recycleId(`${id}-suggestedAppContainer`), {\n\t\t\trenderType: \"Bare\"\n\t\t});\n\n\t\tif (context.getProperty(\"isStaticApp\") as boolean) {\n\t\t\t// create generic tile for static app\n\t\t\tcontainer.addItem(\n\t\t\t\tnew GenericTile(recycleId(`${id}-staticApp`), {\n\t\t\t\t\tmode: \"IconMode\",\n\t\t\t\t\tframeType: \"TwoByHalf\",\n\t\t\t\t\twidth: \"19rem\",\n\t\t\t\t\theader: context.getProperty(\"title\") as string,\n\t\t\t\t\tsubheader: context.getProperty(\"subTitle\") as string,\n\t\t\t\t\ttileIcon: context.getProperty(\"icon\") as string,\n\t\t\t\t\tvisible: context.getProperty(\"isStaticApp\") as boolean,\n\t\t\t\t\turl: context.getProperty(\"url\") as string,\n\t\t\t\t\tpress: (event: GenericTile$PressEvent) => {\n\t\t\t\t\t\tthis._persistDialog(this.getParent() as ContentAdditionDialog);\n\t\t\t\t\t\tURLHelper.redirect(event.getSource()?.getUrl(), false);\n\t\t\t\t\t}\n\t\t\t\t}).addStyleClass(\"suggestedTile\")\n\t\t\t);\n\t\t} else {\n\t\t\t// create custom visualization for other apps\n\t\t\tconst vizData = context.getProperty(\"vizData\") as ICustomVisualization;\n\t\t\tconst instance = this.vizInstantiationService.instantiateVisualization(vizData) as ICustomVizInstance;\n\t\t\tinstance?.setActive(true);\n\t\t\tinstance.attachPress(() => this._persistDialog(this.getParent() as ContentAdditionDialog));\n\t\t\tcontainer.addItem(instance);\n\t\t}\n\n\t\treturn container;\n\t}\n\n\t/**\n\t * Creates a details container for the suggested app.\n\t *\n\t * @private\n\t * @param {string} id - The unique ID for the container.\n\t * @param {Context} context - The binding context for the app.\n\t * @returns {VBox} The app details container.\n\t */\n\tprivate _getAppDetailsContainer(id: string, context: Context): VBox {\n\t\treturn new VBox(recycleId(`${id}-app-details-container`), {\n\t\t\trenderType: \"Bare\",\n\t\t\tgap: \"0.5rem\",\n\t\t\titems: [\n\t\t\t\tnew ExpandableText(recycleId(`${id}-description`), {\n\t\t\t\t\ttext: context.getProperty(\"description\") as string,\n\t\t\t\t\tmaxCharacters: Constants.MaxDescriptionLength\n\t\t\t\t}),\n\t\t\t\tnew HBox(recycleId(`${id}-app-status-container`), {\n\t\t\t\t\trenderType: \"Bare\",\n\t\t\t\t\tvisible: (context.getProperty(\"status\") as string[]).length > 0,\n\t\t\t\t\titems: [\n\t\t\t\t\t\tnew Label(recycleId(`${id}-appStatusLabel`), {\n\t\t\t\t\t\t\ttext: this._i18nBundle.getText(\"appStatus\"),\n\t\t\t\t\t\t\tshowColon: true\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tnew HBox(recycleId(`${id}-app-status-texts`), {\n\t\t\t\t\t\t\trenderType: \"Bare\",\n\t\t\t\t\t\t\titems: this._generateStatusTexts(id, context.getProperty(\"status\") as string[])\n\t\t\t\t\t\t}).addStyleClass(\"sapUiTinyMarginBegin statusTextsContainer\")\n\t\t\t\t\t]\n\t\t\t\t})\n\t\t\t]\n\t\t}).addStyleClass((context.getProperty(\"isStaticApp\") as boolean) ? \"sapUiSmallMarginTop\" : \"sapUiSmallMarginBegin\");\n\t}\n\n\t/**\n\t * Checks if the Apps Addition Panel is supported. Internally, it checks if the\n\t * AI Smart App Finder feature toggle is enabled and if the associated application\n\t * is accessible for the user.\n\t *\n\t * @public\n\t * @override\n\t * @async\n\t * @returns {Promise<boolean>} A promise that resolves to a boolean indicating support.\n\t */\n\tpublic async isSupported(): Promise<boolean> {\n\t\tconst appsIntent: Target = {\n\t\t\ttarget: {\n\t\t\t\tsemanticObject: \"IntelligentPrompt\",\n\t\t\t\taction: \"propose\"\n\t\t\t}\n\t\t};\n\t\tif (this.isPanelSupported === undefined) {\n\t\t\tthis.isPanelSupported = false;\n\n\t\t\tif (this.getFavAppPanel()) {\n\t\t\t\tthis.isPanelSupported = await isNavigationSupportedForFeature(FEATURE_TOGGLES.AI_SMART_APPFINDER, appsIntent);\n\t\t\t}\n\t\t}\n\n\t\t//remove panel if it's not supported\n\t\tif (!this.isPanelSupported) {\n\t\t\tthis.removeActionButton(this.addAppsButton);\n\t\t\tconst contentAdditionDialog = this.getParent() as ContentAdditionDialog;\n\t\t\tcontentAdditionDialog.removePanel(this);\n\t\t\tcontentAdditionDialog.updateActionButtons();\n\t\t}\n\n\t\treturn this.isPanelSupported;\n\t}\n\n\t/**\n\t * Generates the searching animation SVG as a string.\n\t *\n\t * @private\n\t * @returns {string} The SVG string for the loading animation.\n\t */\n\tprivate _generateSearchingAnimations(): string[] {\n\t\tconst loadingShimmer = `<defs>\n\t\t\t<linearGradient id=\"loadingShimmer\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n\t\t\t\t<stop offset=\"0%\" stop-color=\"var(--sapContent_Placeholderloading_Background)\" />\n\t\t\t\t<stop offset=\"20%\" stop-color=\"var(--sapContent_Placeholderloading_Background)\" />\n\t\t\t\t<stop offset=\"50%\" stop-color=\"var(--sapContent_Placeholderloading_Background_Dark)\" />\n\t\t\t\t<stop offset=\"80%\" stop-color=\"var(--sapContent_Placeholderloading_Background)\" />\n\t\t\t\t<stop offset=\"100%\" stop-color=\"var(--sapContent_Placeholderloading_Background)\" />\n\n\t\t\t\t<animate\n\t\t\t\t\tattributeName=\"x1\"\n\t\t\t\t\tvalues=\"-0.6;0.6\"\n\t\t\t\t\tdur=\"2.5s\"\n\t\t\t\t\trepeatCount=\"indefinite\" />\n\t\t\t\t<animate\n\t\t\t\t\tattributeName=\"x2\"\n\t\t\t\t\tvalues=\"0.4;1.6\"\n\t\t\t\t\tdur=\"2.5s\"\n\t\t\t\t\trepeatCount=\"indefinite\" />\n\t\t\t</linearGradient>\n\t\t</defs>`;\n\n\t\treturn [\n\t\t\t`<svg height=\"167\" fill=\"none\">\n\t\t\t\t${loadingShimmer}\n\t\t\t\t<rect x=\"16\" y=\"43\" width=\"16\" height=\"16\" rx=\"4\" fill=\"var(--sapContent_Placeholderloading_Background)\"/>\n\t\t\t\t<rect x=\"48\" y=\"16\" width=\"37%\" height=\"70\" rx=\"16\" fill=\"url(#loadingShimmer)\"/>\n\t\t\t\t<rect x=\"48\" y=\"102\" width=\"93%\" height=\"48\" rx=\"4\" fill=\"url(#loadingShimmer)\"/>\n\t\t\t</svg>`,\n\t\t\t`<svg height=\"180\" fill=\"none\">\n\t\t\t\t${loadingShimmer}\n\t\t\t\t<rect x=\"16\" y=\"82\" width=\"16\" height=\"16\" rx=\"4\" fill=\"var(--sapContent_Placeholderloading_Background)\"/>\n\t\t\t\t<rect x=\"48\" y=\"16\" width=\"148\" height=\"148\" rx=\"16\" fill=\"url(#loadingShimmer)\"/>\n\t\t\t\t<rect x=\"212\" y=\"54\" width=\"75%\" height=\"48\" rx=\"4\" fill=\"url(#loadingShimmer)\"/>\n\t\t\t\t<rect x=\"212\" y=\"110\" width=\"13%\" height=\"16\" rx=\"4\" fill=\"url(#loadingShimmer)\"/>\n\t\t\t</svg>`\n\t\t];\n\t}\n\n\t/**\n\t * Resets the search state in the Apps Addition Panel.\n\t *\n\t * @private\n\t */\n\tprivate resetSearch: () => void = () => {\n\t\tthis.userSelectedApps.clear();\n\t\tthis.model.setProperty(\"/hasError\", false);\n\t\tthis.model.setProperty(\"/suggestedApps\", []);\n\t\tthis.model.setProperty(\"/suggestedAppsCount\", 0);\n\t\tthis.model.setProperty(\"/searchStatus\", SearchStatus.Searching);\n\t\tthis.model.setProperty(\"/userSelectedApps\", []);\n\t\tthis.appSuggestionList.removeSelections(true);\n\t\tthis.resetFeedback();\n\t};\n\n\t/**\n\t * Resets the panel to its default state.\n\t *\n\t * @private\n\t */\n\tpublic resetPanel(): void {\n\t\tconst defaultModelProperties = {\n\t\t\tquery: \"\",\n\t\t\thasError: false,\n\t\t\tsearchStatus: SearchStatus.Idle,\n\t\t\tsuggestedAppsCount: 0,\n\t\t\tuserSelectedApps: [],\n\t\t\tsuggestedApps: [],\n\t\t\tfeedback: {\n\t\t\t\tthumbsUp: false,\n\t\t\t\tthumbsDown: false\n\t\t\t},\n\t\t\tinvalidQuery: true\n\t\t};\n\n\t\tthis.model.setData({ ...this.model.getData(), ...defaultModelProperties } as object);\n\t\tthis.userSelectedApps.clear();\n\t}\n\n\t/**\n\t * Handles the \"Go\" button press event for searching suggested apps.\n\t *\n\t * @private\n\t * @async\n\t */\n\tpublic async onPressGo(): Promise<void> {\n\t\t// validate query\n\t\tconst query = this.model.getProperty(\"/query\") as string;\n\t\tif (!this.isValidQuery(query)) return;\n\n\t\ttry {\n\t\t\t// initiate search\n\t\t\tthis.resetSearch();\n\n\t\t\tconst rawApps = await this.fetchAppsFromSearch(query);\n\t\t\t// suggest apps if there are results and search is not cancelled\n\t\t\tif (this.model.getProperty(\"/searchStatus\") === SearchStatus.Searching) {\n\t\t\t\tconst allVisualizations = await this.fetchAllAvailableVisualizations();\n\t\t\t\tconst favoriteApps = await this.appManagerInstance.fetchFavVizs(true, true);\n\t\t\t\tconst insightsApps = await this.appManagerInstance.fetchInsightApps(true, this._i18nBundle.getText(\"insights\") as string);\n\n\t\t\t\t// generate suggested apps\n\t\t\t\tconst apps = this._generateApps(rawApps, allVisualizations, [...favoriteApps, ...insightsApps]);\n\t\t\t\tconst suggestedApps = await this._filterUnsupportedApps(apps);\n\n\t\t\t\tif (suggestedApps.length === 0) {\n\t\t\t\t\tthis._handleError(\"\", suggestedApps.length);\n\t\t\t\t} else {\n\t\t\t\t\t// update model with filtered apps\n\t\t\t\t\tthis.model.setProperty(\"/suggestedApps\", suggestedApps);\n\t\t\t\t\tthis.model.setProperty(\"/suggestedAppsCount\", suggestedApps.length);\n\t\t\t\t\tthis.appSuggestionList.updateAggregation(\"items\", ChangeReason.Refresh, { detailedReason: ChangeReason.Refresh });\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tLog.error((err as Error).message);\n\t\t\tthis._handleError();\n\t\t} finally {\n\t\t\t// update search status only if search is not cancelled\n\t\t\tif (this.model.getProperty(\"/searchStatus\") === SearchStatus.Searching) {\n\t\t\t\tthis.model.setProperty(\"/searchStatus\", SearchStatus.Complete);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Filters out unsupported apps based on accessibility.\n\t *\n\t * @private\n\t * @param {SuggestedApp[]} apps - The list of suggested apps to filter.\n\t * @returns {Promise<SuggestedApp[]>} A promise that resolves to the filtered list of supported apps.\n\t */\n\tprivate async _filterUnsupportedApps(apps: SuggestedApp[]): Promise<SuggestedApp[]> {\n\t\tconst updatedApps = apps.filter((app) => (app.isStaticApp ? true : (app.vizData ?? false)));\n\t\tconst intents = updatedApps.map((app) => app.vizData?.target) || [];\n\t\tconst navigationService = await Container.getServiceAsync<Navigation>(\"Navigation\");\n\t\tconst supportedAppIndices = await navigationService.isNavigationSupported(intents as Target[]);\n\n\t\treturn updatedApps.filter((_, index) => supportedAppIndices[index]);\n\t}\n\n\t/**\n\t * Generates suggested apps from raw app data and visualizations.\n\t *\n\t * @private\n\t * @param {RawAppData[]} rawApps - The raw app data to process.\n\t * @param {IVisualization[]} allVisualizations - All available visualizations.\n\t * @param {ICustomVisualization[]} homePageVisualizations - Visualizations available in homepage.\n\t * @returns {SuggestedApp[]} The list of suggested apps.\n\t */\n\tprivate _generateApps(\n\t\trawApps: RawAppData[],\n\t\tallVisualizations: IVisualization[],\n\t\thomePageVisualizations: ICustomVisualization[]\n\t): SuggestedApp[] {\n\t\treturn rawApps.map((app) => {\n\t\t\tconst vizData = allVisualizations.find((viz) => viz.vizId === app.chipID);\n\t\t\tconst addedToHomePage = homePageVisualizations.some((viz) => viz.visualization?.vizId === app.chipID);\n\t\t\treturn {\n\t\t\t\ttitle: app.title,\n\t\t\t\tchipID: app.chipID,\n\t\t\t\tsubTitle: app.subTitle,\n\t\t\t\tdescription: app.appDescription,\n\t\t\t\ticon: app.iconUrl,\n\t\t\t\tvizData,\n\t\t\t\taddedToHomePage,\n\t\t\t\tisStaticApp: app.tileType === TileType.Static,\n\t\t\t\tstatus: this.getAppStatusTexts(app.configuration, addedToHomePage),\n\t\t\t\turl: vizData?.targetURL || \"\"\n\t\t\t};\n\t\t}) as SuggestedApp[];\n\t}\n\n\t/**\n\t * Validates the query string based on minimum length.\n\t *\n\t * @private\n\t * @param {string} query - The query string to validate.\n\t * @returns {boolean} True if the query is valid, otherwise false.\n\t */\n\tprivate isValidQuery(query: string = \"\"): boolean {\n\t\tquery = query?.trim();\n\t\treturn query.length >= Constants.MinQueryLength && query.length <= Constants.MaxDescriptionLength;\n\t}\n\n\t/**\n\t * Fetches all available visualizations for the user.\n\t *\n\t * @private\n\t * @async\n\t * @returns {Promise<IVisualization[]>} A promise that resolves to the list of visualizations.\n\t */\n\tprivate async fetchAllAvailableVisualizations(): Promise<IVisualization[]> {\n\t\tif (!this.allAvailableVisualizations) {\n\t\t\tconst searchableContentService = await Container.getServiceAsync<SearchableContent>(\"SearchableContent\");\n\t\t\tconst allAvailableApps = await searchableContentService.getApps({ enableVisualizationPreview: false });\n\t\t\tthis.allAvailableVisualizations = allAvailableApps.reduce((visualizations: IVisualization[], currentApp: AppData) => {\n\t\t\t\treturn visualizations.concat(currentApp.visualizations);\n\t\t\t}, []);\n\t\t}\n\n\t\treturn this.allAvailableVisualizations;\n\t}\n\n\t/**\n\t * Fetches a CSRF token for secure API requests.\n\t *\n\t * @private\n\t * @async\n\t * @returns {Promise<string | null>} A promise that resolves to the CSRF token or null if fetching fails.\n\t */\n\tprivate async _fetchCSRFToken(): Promise<string | null> {\n\t\ttry {\n\t\t\tconst response = await fetch(AI_APP_FINDER_BASE_URL, { method: \"GET\", headers: { \"X-CSRF-Token\": \"Fetch\" } });\n\t\t\treturn response.headers.get(\"X-CSRF-Token\");\n\t\t} catch (error) {\n\t\t\tLog.error(\"Failed to fetch CSRF token\", error as Error);\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/**\n\t * Fetches apps from the search API based on the query.\n\t *\n\t * @private\n\t * @async\n\t * @param {string} query - The search query string.\n\t * @returns {Promise<RawAppData[]>} A promise that resolves to the list of raw app data.\n\t */\n\tprivate async fetchAppsFromSearch(query: string): Promise<RawAppData[]> {\n\t\ttry {\n\t\t\tconst token = await this._fetchCSRFToken();\n\t\t\tconst headers = {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t...(token && { \"X-CSRF-Token\": token })\n\t\t\t};\n\n\t\t\tconst response = await fetch(AI_APP_FINDER_API, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders,\n\t\t\t\tbody: JSON.stringify({ UserInput: query })\n\t\t\t});\n\n\t\t\t// handle error responses\n\t\t\tif (!response.ok) {\n\t\t\t\tconst errorResponse = (await response.json()) as ErrorResponse;\n\t\t\t\tthis._handleError(errorResponse.error?.message || \"\");\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tconst queryResult = (await response.json()) as QueryResponse;\n\t\t\treturn queryResult.value || [];\n\t\t} catch (error) {\n\t\t\tLog.error((error as Error).message);\n\t\t\tthis._handleError();\n\t\t\treturn [];\n\t\t}\n\t}\n\n\t/**\n\t * Retrieves status texts for an app based on its configuration and homepage status.\n\t *\n\t * @private\n\t * @param {string} configuration - The app's configuration string.\n\t * @param {boolean} addedToHomePage - Indicates if the app is already added to the homepage.\n\t * @returns {string[]} An array of status texts for the app.\n\t */\n\tprivate getAppStatusTexts(configuration: string, addedToHomePage: boolean): string[] {\n\t\tlet statusTexts = [];\n\n\t\tif (configuration) {\n\t\t\ttry {\n\t\t\t\tconst parsedConfig = JSON.parse(configuration) as Configuration;\n\t\t\t\tconst tileConfig = JSON.parse(parsedConfig?.tileConfiguration) as TileConfig;\n\t\t\t\tconst infoText = (tileConfig?.display_info_text || \"\").toLowerCase();\n\t\t\t\tif (infoText === Constants.DeprecatedInfoText) {\n\t\t\t\t\tstatusTexts.push(this._i18nBundle.getText(\"deprecatedApp\") as string);\n\t\t\t\t}\n\t\t\t} catch (error: unknown) {\n\t\t\t\tLog.warning((error as Error).message);\n\t\t\t}\n\t\t}\n\n\t\tif (addedToHomePage) {\n\t\t\tstatusTexts.push(this._i18nBundle.getText(\"alreadyAddedApp\") as string);\n\t\t}\n\n\t\treturn statusTexts;\n\t}\n\n\t/**\n\t * Generates status text controls for the provided status texts.\n\t *\n\t * @private\n\t * @param {string} id - The id of the list item.\n\t * @param {string[]} stausTexts - The list of status texts.\n\t * @returns {Text[]} An array of Text controls with applied styles.\n\t */\n\tprivate _generateStatusTexts(id: string, stausTexts: string[]): Text[] {\n\t\treturn stausTexts.map((status, index) => {\n\t\t\treturn new Text(recycleId(`${id}-statusText-${index}`), {\n\t\t\t\ttext: status\n\t\t\t}).addStyleClass(this.applyStatusClass(status));\n\t\t});\n\t}\n\n\t/**\n\t * Applies a CSS class to the status text based on its type.\n\t *\n\t * @private\n\t * @param {string} status - The status text to classify.\n\t * @returns {string} The CSS class for the status text.\n\t */\n\tpublic applyStatusClass(status: string): string {\n\t\tif (status === this._i18nBundle.getText(\"alreadyAddedApp\")) {\n\t\t\treturn \"addedAppStatusText\";\n\t\t} else if (status === this._i18nBundle.getText(\"deprecatedApp\")) {\n\t\t\treturn \"deprecatedAppStatusText\";\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}\n\n\t/**\n\t * Handles the \"Add Apps\" button press event to add selected apps to favorites.\n\t *\n\t * @private\n\t * @async\n\t */\n\tprivate async onPressAddApps(): Promise<void> {\n\t\tconst userSelectedApps = this.model.getProperty(\"/userSelectedApps\") as CustomListItem[];\n\t\tlet staticAppsPresent = false;\n\t\tlet dynamicAppsPresent = false;\n\n\t\tfor (const app of userSelectedApps) {\n\t\t\tconst isStaticApp = app.getBindingContext()?.getProperty(\"isStaticApp\") as boolean;\n\t\t\tif (isStaticApp) staticAppsPresent = true;\n\t\t\telse dynamicAppsPresent = true;\n\n\t\t\tconst vizId = app.getBindingContext()?.getProperty(\"chipID\") as string;\n\t\t\tawait this.appManagerInstance.addVisualization(vizId, isStaticApp ? undefined : MYINSIGHT_SECTION_ID);\n\t\t}\n\n\t\tif (staticAppsPresent) {\n\t\t\tawait this.refreshFavoriteApps();\n\t\t}\n\n\t\tif (dynamicAppsPresent) {\n\t\t\tawait this.refreshInsightsApps();\n\t\t}\n\n\t\t(this.getParent() as ContentAdditionDialog).close();\n\t\tMessageToast.show(this._i18nBundle.getText(\"appAddedToFavorites\") as string);\n\t\tthis.resetPanel();\n\t}\n\n\t/**\n\t * Retrieves the parent BaseLayout instance for this panel.\n\t *\n\t * @private\n\t * @returns {BaseLayout} The parent BaseLayout instance.\n\t */\n\tprivate getLayout(): BaseLayout {\n\t\treturn this.getParent()?.getParent() as BaseLayout;\n\t}\n\n\t/**\n\t * Retrieves the AppsContainer instance from the parent layout.\n\t *\n\t * @private\n\t * @returns {AppsContainer | undefined} The AppsContainer instance or undefined if not found.\n\t */\n\tprivate getAppsContainer(): AppsContainer | undefined {\n\t\treturn this.getLayout()\n\t\t\t.getContent()\n\t\t\t.find((container) => container instanceof AppsContainer) as AppsContainer | undefined;\n\t}\n\n\t/**\n\t * Retrieves the favorite apps panel from the AppsContainer.\n\t *\n\t * @private\n\t * @returns {FavAppPanel | undefined} The favorite apps panel or undefined if not found.\n\t */\n\tprivate getFavAppPanel(): FavAppPanel | undefined {\n\t\treturn this.getAppsContainer()\n\t\t\t?.getContent()\n\t\t\t.find((panel) => panel instanceof FavAppPanel);\n\t}\n\n\t/**\n\t * Refreshes the favorite apps panel in the AppsContainer.\n\t *\n\t * @private\n\t * @async\n\t */\n\tprivate async refreshFavoriteApps(): Promise<void> {\n\t\tawait this.getAppsContainer()?.refreshPanel(this.getFavAppPanel() as FavAppPanel);\n\t}\n\n\t/**\n\t * Retrieves the InsightsContainer instance from the parent layout.\n\t *\n\t * @private\n\t * @returns {InsightsContainer | undefined} The AppsContainer instance or undefined if not found.\n\t */\n\tprivate getInsightsContainer(): InsightsContainer | undefined {\n\t\treturn this.getLayout()\n\t\t\t.getContent()\n\t\t\t.find((container) => container instanceof InsightsContainer);\n\t}\n\n\t/**\n\t * Refreshes the Insights tiles panel in the InsightsContainer.\n\t *\n\t * @private\n\t * @async\n\t */\n\tprivate async refreshInsightsApps(): Promise<void> {\n\t\tawait this.getInsightsContainer()?.refreshData(\"tiles\");\n\t}\n\n\t/**\n\t * Handles the selection change event for the suggested apps list.\n\t *\n\t * @public\n\t * @param {ListBase$SelectionChangeEvent} event - The selection change event.\n\t */\n\tpublic onListSelectionChange(event: ListBase$SelectionChangeEvent): void {\n\t\tconst listItem = event.getParameter(\"listItem\") as CustomListItem;\n\t\tconst selected = event.getParameter(\"selected\") as boolean;\n\n\t\tif (!selected) this.userSelectedApps.delete(listItem);\n\t\telse {\n\t\t\tconst context = listItem.getBindingContext();\n\t\t\tconst addedToHomePage = context?.getProperty(\"addedToHomePage\") as boolean;\n\t\t\tif (!addedToHomePage) this.userSelectedApps.add(listItem);\n\t\t}\n\n\t\tthis.model.setProperty(\"/userSelectedApps\", Array.from(this.userSelectedApps));\n\t}\n\n\t/**\n\t * Handles errors by updating the model with error details.\n\t *\n\t * @private\n\t * @param {string} [message=\"\"] - The error message to process.\n\t */\n\tprivate _handleError(message: string = \"\", suggestedResponseCount?: number): void {\n\t\tconst [, errorCode] = message.match(/\\((\\d{2})\\d*\\)\\s*(.*)/) || [];\n\t\tif (suggestedResponseCount === 0) {\n\t\t\tmessage = this._i18nBundle.getText(\"NoResultErrorDescription\") || \"\";\n\t\t}\n\t\tthis.model.setProperty(\"/hasError\", true);\n\t\tthis.model.setProperty(\"/errorType\", this._getErrorType(errorCode));\n\t\tthis.model.setProperty(\"/errorDescription\", message);\n\t}\n\n\t/**\n\t * Determines the error type based on the provided error code.\n\t *\n\t * @private\n\t * @param {string} [errorCode=\"\"] - The error code to evaluate.\n\t * @returns {ErrorType} The corresponding error type.\n\t */\n\tprivate _getErrorType(errorCode: string = \"\"): ErrorType {\n\t\tif (errorCode === \"10\") {\n\t\t\treturn ErrorType.ServiceError;\n\t\t} else {\n\t\t\treturn ErrorType.NoResultsFound;\n\t\t}\n\t}\n\n\t/**\n\t * Handles live change event for the search text area, updating value state and messages.\n\t *\n\t * @private\n\t * @param {TextArea$LiveChangeEvent} event - The live change event from the text area.\n\t */\n\tpublic onSearchTextAreaLiveChange(event: TextArea$LiveChangeEvent) {\n\t\tconst textArea = event.getSource();\n\t\tconst query = textArea.getValue().trim();\n\n\t\tif (query.length !== 0 && query.length < Constants.MinQueryLength) {\n\t\t\ttextArea.setValueState(ValueState.Information);\n\t\t\ttextArea.setValueStateText(this._i18nBundle.getText(\"minLengthRequired\"));\n\t\t} else if (query.length > Constants.MaxDescriptionLength) {\n\t\t\ttextArea.setValueState(ValueState.Warning);\n\t\t\ttextArea.setValueStateText(this._i18nBundle.getText(\"maxLengthExceeded\"));\n\t\t} else {\n\t\t\ttextArea.setValueState(ValueState.None);\n\t\t\ttextArea.setValueStateText(\"\");\n\t\t}\n\n\t\tthis.model.setProperty(\"/invalidQuery\", query.length === 0 || textArea.getValueState() !== ValueState.None);\n\t}\n\n\t/**\n\t * Generates the AI policy text with a link for display in the footer.\n\t *\n\t * @private\n\t * @returns {string} The formatted AI policy text.\n\t */\n\tpublic _generateAIPolicyText(): string {\n\t\tconst linkText = this._i18nBundle.getText(\"createdWithAI\");\n\t\treturn this._i18nBundle.getText(\"aiPolicyText\", [linkText])!;\n\t}\n\n\t/**\n\t * Resets the feedback state.\n\t *\n\t * @private\n\t */\n\tprivate resetFeedback(): void {\n\t\tthis.model.setProperty(\"/feedback\", {\n\t\t\tthumbsUp: false,\n\t\t\tthumbsDown: false\n\t\t});\n\t}\n\n\t/**\n\t * Marks feedback as provided and shows a confirmation message toast.\n\t *\n\t * @private\n\t */\n\tpublic sendFeedback(feedbackType: string): void {\n\t\tthis.resetFeedback();\n\t\tthis.model.setProperty(`/feedback/${feedbackType}`, true);\n\t\tMessageToast.show(this._i18nBundle.getText(\"feedBackSent\") as string, {\n\t\t\twidth: \"20em\"\n\t\t});\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,wmBAAAC,GAAA,EAAAC,MAAA,EAAAC,cAAA,EAAAC,cAAA,EAAAC,OAAA,EAAAC,WAAA,EAAAC,IAAA,EAAAC,KAAA,EAAAC,aAAA,EAAAC,YAAA,EAAAC,IAAA,EAAAC,IAAA,EAAAC,QAAA,EAAAC,mBAAA,EAAAC,YAAA,EAAAC,SAAA,EAAAC,aAAA,EAAAC,MAAA,EAAAC,SAAA,EAAAC,eAAA,EAAAC,mBAAA,EAAAC,aAAA,EAAAC,mBAAA,EAAAC,YAAA,EAAAC,kBAAA,EAAAC,wBAAA,EAAAC,qBAAA,EAAAC,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CAACC,WAAW,CAAC,aAAaqT,YAAY,EAAE,EAAE,IAAI,CAAC;MACzD7Z,YAAY,CAAC0W,IAAI,CAAC,IAAI,CAACxP,WAAW,CAACC,OAAO,CAAC,cAAc,CAAC,EAAY;QACrE0F,KAAK,EAAE;MACR,CAAC,CAAC;IACH;EAAC;EAAA,OAlzBmBhH,iBAAiB;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"AppsAdditionPanel.js","names":["sap","ui","define","Log","Button","CustomListItem","ExpandableText","FlexBox","GenericTile","HBox","Label","sap_m_library","MessageToast","Text","VBox","Fragment","sap_ui_core_library","ChangeReason","JSONModel","ResourceModel","Sorter","Container","__AppsContainer","__BaseSettingsPanel","__FavAppPanel","__InsightsContainer","__AppManager","___utils_Constants","___utils_DataFormatUtils","___utils_FeatureUtils","___utils_FESRUtil","_interopRequireDefault","obj","__esModule","default","_catch","body","recover","result","e","then","ButtonType","_finallyRethrows","finalizer","bind","URLHelper","_iteratorSymbol","Symbol","iterator","_settle","pact","state","value","s","_Pact","v","o","observer","prototype","onFulfilled","onRejected","callback","_this","_isSettledPact","thenable","_forTo","array","check","i","reject","_cycle","length","ValueState","_forOf","target","step","next","done","return","_fixup","TypeError","values","push","AppsContainer","BaseSettingsPanel","FavAppPanel","InsightsContainer","AppManager","AI_APP_FINDER_API","AI_APP_FINDER_BASE_URL","CONTENT_ADDITION_PANEL_TYPES","FEATURE_TOGGLES","FESR_IDS","MYINSIGHT_SECTION_ID","recycleId","isNavigationSupportedForFeature","addFESRSemanticStepName","FESR_EVENTS","Constants","DeprecatedInfoText","MinQueryLength","MaxDescriptionLength","SearchStatus","ErrorType","TileType","AppsAdditionPanel","extend","constructor","apply","arguments","appManagerInstance","getInstance","resetSearch","userSelectedApps","clear","model","setProperty","Searching","appSuggestionList","removeSelections","resetFeedback","init","_init","BaseSettingsPanel.prototype.init.call","Set","AI_APP_FINDER","_i18nBundle","getText","_setupActions","_setupContent","attachEvent","resetPanel","addAppsButton","getId","text","type","Emphasized","press","onPressAddApps","bindProperty","parts","formatter","hasError","searchStatus","Complete","PRESS","ADD_AI_APP","addActionButton","Promise","resolve","getServiceAsync","_Container$getService","vizInstantiationService","load","id","name","controller","_Fragment$load","panelContent","addAggregation","query","errorType","NoResultsFound","errorDescription","Idle","loadingAnimations","_generateSearchingAnimations","suggestedAppsCount","suggestedApps","aiPolicyText","_generateAIPolicyText","invalidQuery","feedback","thumbsUp","thumbsDown","setModel","bundleName","byId","bindAggregation","path","factory","_generateListItem","sorter","comparator","firstApp","secondApp","getPriority","statusArray","hasAlreadyAdded","includes","hasDeprecated","firstPriority","secondPriority","attachUpdateFinished","getProperty","getItems","focus","searchTextArea","onsapenter","onPressGo","context","listItem","selected","content","renderType","direction","alignItems","items","_getAppPreviewContainer","_getAppDetailsContainer","addStyleClass","getMultiSelectControl","setEnabled","container","addItem","mode","frameType","width","header","subheader","tileIcon","visible","url","event","_persistDialog","getParent","redirect","getSource","getUrl","vizData","instance","instantiateVisualization","setActive","attachPress","gap","maxCharacters","showColon","_generateStatusTexts","isSupported","_isSupported","_this2","_temp3","isPanelSupported","removeActionButton","contentAdditionDialog","removePanel","updateActionButtons","appsIntent","semanticObject","action","_temp2","undefined","_temp","getFavAppPanel","AI_SMART_APPFINDER","_isNavigationSupporte","loadingShimmer","_resetPanel","defaultModelProperties","setData","getData","_onPressGo","_this3","isValidQuery","_temp5","fetchAppsFromSearch","rawApps","_temp4","fetchAllAvailableVisualizations","allVisualizations","fetchFavVizs","favoriteApps","fetchInsightApps","insightsApps","apps","_generateApps","_filterUnsupportedApps","_handleError","updateAggregation","Refresh","detailedReason","err","message","error","_wasThrown","_result","updatedApps","filter","app","isStaticApp","intents","map","navigationService","isNavigationSupported","supportedAppIndices","_","index","homePageVisualizations","find","viz","vizId","chipID","addedToHomePage","some","visualization","title","subTitle","description","appDescription","icon","iconUrl","tileType","Static","status","getAppStatusTexts","configuration","targetURL","_isValidQuery","trim","_fetchAllAvailableVisualizations","_this4","_temp7","allAvailableVisualizations","_temp6","searchableContentService","getApps","enableVisualizationPreview","allAvailableApps","reduce","visualizations","currentApp","concat","_fetchCSRFToken","fetch","method","headers","response","get","_fetchAppsFromSearch","_this5","token","JSON","stringify","UserInput","_exit","_temp9","_result2","json","_response$json2","queryResult","_temp8","ok","_response$json","errorResponse","Error","_getAppStatusTexts","statusTexts","parsedConfig","parse","tileConfig","tileConfiguration","infoText","display_info_text","toLowerCase","warning","stausTexts","applyStatusClass","_applyStatusClass","_onPressAddApps","_this6","_temp13","_temp11","_temp1","close","show","_temp0","dynamicAppsPresent","refreshInsightsApps","_temp10","staticAppsPresent","refreshFavoriteApps","_temp12","getBindingContext","addVisualization","getLayout","_getLayout","getAppsContainer","_getAppsContainer","getContent","_getFavAppPanel","panel","_refreshFavoriteApps","_this7","refreshPanel","getInsightsContainer","_getInsightsContainer","_refreshInsightsApps","_this8","refreshData","onListSelectionChange","_onListSelectionChange","getParameter","delete","add","Array","from","suggestedResponseCount","errorCode","match","_getErrorType","ServiceError","onSearchTextAreaLiveChange","_onSearchTextAreaLiveChange","textArea","getValue","setValueState","Information","setValueStateText","Warning","None","getValueState","linkText","_resetFeedback","sendFeedback","_sendFeedback","feedbackType"],"sources":["AppsAdditionPanel.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport Log from \"sap/base/Log\";\nimport Button from \"sap/m/Button\";\nimport CustomListItem from \"sap/m/CustomListItem\";\nimport ExpandableText from \"sap/m/ExpandableText\";\nimport FlexBox from \"sap/m/FlexBox\";\nimport GenericTile, { GenericTile$PressEvent } from \"sap/m/GenericTile\";\nimport HBox from \"sap/m/HBox\";\nimport Label from \"sap/m/Label\";\nimport { ButtonType, URLHelper } from \"sap/m/library\";\nimport List from \"sap/m/List\";\nimport { ListBase$SelectionChangeEvent } from \"sap/m/ListBase\";\nimport MessageToast from \"sap/m/MessageToast\";\nimport Text from \"sap/m/Text\";\nimport TextArea, { TextArea$LiveChangeEvent } from \"sap/m/TextArea\";\nimport VBox from \"sap/m/VBox\";\nimport Control from \"sap/ui/core/Control\";\nimport Fragment from \"sap/ui/core/Fragment\";\nimport { ValueState } from \"sap/ui/core/library\";\nimport ChangeReason from \"sap/ui/model/ChangeReason\";\nimport Context from \"sap/ui/model/Context\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport ResourceModel from \"sap/ui/model/resource/ResourceModel\";\nimport Sorter from \"sap/ui/model/Sorter\";\nimport Container from \"sap/ushell/Container\";\nimport Navigation, { Target } from \"sap/ushell/services/Navigation\";\nimport SearchableContent, { AppData } from \"sap/ushell/services/SearchableContent\";\nimport VisualizationInstantiation from \"sap/ushell/services/VisualizationInstantiation\";\nimport AppsContainer from \"./AppsContainer\";\nimport BaseLayout from \"./BaseLayout\";\nimport BaseSettingsPanel from \"./BaseSettingsPanel\";\nimport ContentAdditionDialog from \"./ContentAdditionDialog\";\nimport FavAppPanel from \"./FavAppPanel\";\nimport InsightsContainer from \"./InsightsContainer\";\nimport { ICustomVisualization, ICustomVizInstance, IVisualization } from \"./interface/AppsInterface\";\nimport AppManager from \"./utils/AppManager\";\nimport {\n\tAI_APP_FINDER_API,\n\tAI_APP_FINDER_BASE_URL,\n\tCONTENT_ADDITION_PANEL_TYPES,\n\tFEATURE_TOGGLES,\n\tFESR_IDS,\n\tMYINSIGHT_SECTION_ID\n} from \"./utils/Constants\";\nimport { recycleId } from \"./utils/DataFormatUtils\";\nimport { isNavigationSupportedForFeature } from \"./utils/FeatureUtils\";\nimport { addFESRSemanticStepName, FESR_EVENTS } from \"./utils/FESRUtil\";\n\nconst Constants = {\n\tDeprecatedInfoText: \"deprecated\",\n\tMinQueryLength: 2,\n\tMaxDescriptionLength: 500\n};\n\nenum SearchStatus {\n\tIdle = \"idle\",\n\tSearching = \"searching\",\n\tComplete = \"complete\"\n}\n\nenum ErrorType {\n\tNoResultsFound = \"noResultsFound\",\n\tServiceError = \"serviceError\"\n}\n\nenum TileType {\n\tStatic = \"STATIC\"\n}\n\ninterface RawAppData {\n\ttitle: string;\n\tsubTitle: string;\n\tappDescription: string;\n\tchipID: string;\n\ttileType: TileType;\n\ticonUrl: string;\n\tconfiguration: string;\n}\ninterface SuggestedApp {\n\ticon: string;\n\ttitle: string;\n\tchipID: string;\n\tstatus: string[];\n\tsubTitle: string;\n\tdescription: string;\n\tisStaticApp: boolean;\n\taddedToHomePage: boolean;\n\tvizData?: IVisualization;\n}\n\ninterface QueryResponse {\n\tvalue: RawAppData[];\n}\n\ninterface ErrorResponse {\n\terror: {\n\t\tcode: string;\n\t\tmessage: string;\n\t};\n}\n\ninterface Configuration {\n\ttileConfiguration: string;\n}\n\ninterface TileConfig {\n\tdisplay_info_text: string;\n\t[key: string]: string;\n}\n\n/**\n *\n * Class for Apps Addition Panel in MyHome.\n *\n * @extends BaseSettingsPanel\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.136\n *\n * @internal\n * @experimental Since 1.136\n * @private\n *\n * @alias sap.cux.home.AppsAdditionPanel\n */\nexport default class AppsAdditionPanel extends BaseSettingsPanel {\n\tprivate appManagerInstance: AppManager = AppManager.getInstance();\n\tprivate vizInstantiationService!: VisualizationInstantiation;\n\tprivate allAvailableVisualizations!: IVisualization[];\n\tprivate userSelectedApps!: Set<CustomListItem>;\n\tprivate appSuggestionList!: List;\n\tprivate model!: JSONModel;\n\tprivate addAppsButton!: Button;\n\tprivate isPanelSupported!: boolean;\n\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @public\n\t * @override\n\t */\n\tpublic init(): void {\n\t\tsuper.init();\n\t\tthis.userSelectedApps = new Set<CustomListItem>();\n\n\t\t//setup panel\n\t\tthis.setProperty(\"key\", CONTENT_ADDITION_PANEL_TYPES.AI_APP_FINDER);\n\t\tthis.setProperty(\"title\", this._i18nBundle.getText(\"addAppsAndTile\"));\n\n\t\t//setup actions\n\t\tthis._setupActions();\n\n\t\t//setup content\n\t\tvoid this._setupContent();\n\n\t\t//setup events\n\t\tthis.attachEvent(\"onDialogClose\", this.resetPanel.bind(this));\n\t}\n\n\t/**\n\t * Sets up the actions for the Apps Addition Panel.\n\t *\n\t * @private\n\t */\n\tprivate _setupActions(): void {\n\t\tthis.addAppsButton = new Button(recycleId(`${this.getId()}-add-app-btn`), {\n\t\t\ttext: this._i18nBundle.getText(\"addFromInsightsDialogBtn\"),\n\t\t\ttype: ButtonType.Emphasized,\n\t\t\tpress: () => {\n\t\t\t\tvoid this.onPressAddApps();\n\t\t\t}\n\t\t});\n\n\t\tthis.addAppsButton.bindProperty(\"enabled\", {\n\t\t\tparts: [\"/hasError\", \"/searchStatus\", \"/userSelectedApps\"],\n\t\t\tformatter: (hasError: boolean, searchStatus: SearchStatus, userSelectedApps: string[]) => {\n\t\t\t\treturn !hasError && searchStatus === SearchStatus.Complete && userSelectedApps.length > 0;\n\t\t\t}\n\t\t});\n\n\t\taddFESRSemanticStepName(this.addAppsButton, FESR_EVENTS.PRESS, FESR_IDS.ADD_AI_APP);\n\t\tthis.addActionButton(this.addAppsButton);\n\t}\n\n\t/**\n\t * Sets up the content for the Apps Addition Panel.\n\t *\n\t * @private\n\t * @async\n\t */\n\tprivate async _setupContent(): Promise<void> {\n\t\tthis.vizInstantiationService = await Container.getServiceAsync<VisualizationInstantiation>(\"VisualizationInstantiation\");\n\n\t\t//load ui fragment\n\t\tconst panelContent = (await Fragment.load({\n\t\t\tid: `${this.getId()}-content`,\n\t\t\tname: \"sap.cux.home.utils.fragment.appsAdditionContent\",\n\t\t\tcontroller: this\n\t\t})) as Control;\n\t\tthis.addAggregation(\"content\", panelContent);\n\n\t\t//initialize ui model\n\t\tthis.model = new JSONModel({\n\t\t\tquery: \"\",\n\t\t\thasError: false,\n\t\t\terrorType: ErrorType.NoResultsFound,\n\t\t\terrorDescription: \"\",\n\t\t\tsearchStatus: SearchStatus.Idle,\n\t\t\tloadingAnimations: this._generateSearchingAnimations(),\n\t\t\tsuggestedAppsCount: 0,\n\t\t\tuserSelectedApps: [],\n\t\t\tsuggestedApps: [],\n\t\t\taiPolicyText: this._generateAIPolicyText(),\n\t\t\tinvalidQuery: true,\n\t\t\tfeedback: {\n\t\t\t\tthumbsUp: false,\n\t\t\t\tthumbsDown: false\n\t\t\t}\n\t\t});\n\n\t\tpanelContent.setModel(this.model);\n\t\tpanelContent.setModel(new ResourceModel({ bundleName: \"sap.cux.home.i18n.messagebundle\" }), \"i18n\");\n\t\tthis.addAppsButton.setModel(this.model);\n\n\t\t//bind suggested apps list\n\t\tthis.appSuggestionList = Fragment.byId(`${this.getId()}-content`, \"appsList\") as List;\n\t\tthis.appSuggestionList.bindAggregation(\"items\", {\n\t\t\tpath: \"/suggestedApps\",\n\t\t\tfactory: this._generateListItem.bind(this),\n\t\t\tsorter: new Sorter({\n\t\t\t\tpath: \"status\",\n\t\t\t\tcomparator: (firstApp: string[], secondApp: string[]) => {\n\t\t\t\t\tconst getPriority = (statusArray: string[]) => {\n\t\t\t\t\t\tif (statusArray.length === 0) return 0; // Empty array has highest priority\n\n\t\t\t\t\t\tconst hasAlreadyAdded = statusArray.includes(this._i18nBundle.getText(\"alreadyAddedApp\") as string);\n\t\t\t\t\t\tconst hasDeprecated = statusArray.includes(this._i18nBundle.getText(\"deprecatedApp\") as string);\n\n\t\t\t\t\t\tif (hasAlreadyAdded && hasDeprecated) return 3; // Both statuses - lowest priority\n\t\t\t\t\t\tif (hasAlreadyAdded) return 1; // Only \"Already Added\"\n\t\t\t\t\t\tif (hasDeprecated) return 2; // Only \"Deprecated\"\n\n\t\t\t\t\t\treturn 4; // Any other combination (fallback)\n\t\t\t\t\t};\n\n\t\t\t\t\tconst firstPriority = getPriority(firstApp);\n\t\t\t\t\tconst secondPriority = getPriority(secondApp);\n\n\t\t\t\t\treturn firstPriority - secondPriority;\n\t\t\t\t}\n\t\t\t})\n\t\t});\n\n\t\t//focus on the first item when the list is updated\n\t\tthis.appSuggestionList.attachUpdateFinished(() => {\n\t\t\tif (this.model.getProperty(\"/suggestedAppsCount\") > 0 && this.model.getProperty(\"/searchStatus\") === SearchStatus.Complete) {\n\t\t\t\tthis.appSuggestionList.getItems()?.[0].focus();\n\t\t\t}\n\t\t});\n\n\t\t//bind search field\n\t\tconst searchTextArea = Fragment.byId(`${this.getId()}-content`, \"searchTextArea\") as TextArea;\n\t\tsearchTextArea.onsapenter = this.onPressGo.bind(this);\n\t}\n\n\t/**\n\t * Generates a list item for the Apps Addition Panel.\n\t *\n\t * @private\n\t * @param {string} id - The unique ID for the list item.\n\t * @param {Context} context - The binding context for the list item.\n\t * @returns {CustomListItem} The generated list item control.\n\t */\n\tprivate _generateListItem(id: string, context: Context): CustomListItem {\n\t\tconst listItem = new CustomListItem(id, {\n\t\t\tselected: context.getProperty(\"addedToHomePage\") as boolean,\n\t\t\tcontent: [\n\t\t\t\tnew FlexBox(recycleId(`${id}-result-container`), {\n\t\t\t\t\trenderType: \"Bare\",\n\t\t\t\t\tdirection: context.getProperty(\"isStaticApp\") ? \"Column\" : \"Row\",\n\t\t\t\t\talignItems: context.getProperty(\"isStaticApp\") ? \"Start\" : \"Center\",\n\t\t\t\t\titems: [this._getAppPreviewContainer(id, context), this._getAppDetailsContainer(id, context)]\n\t\t\t\t}).addStyleClass(\"sapUiSmallMargin\")\n\t\t\t]\n\t\t});\n\n\t\t//bind associated checkbox to disable it when the app is already added to home page\n\t\tlistItem.getMultiSelectControl(true).setEnabled(!context.getProperty(\"addedToHomePage\"));\n\n\t\treturn listItem;\n\t}\n\n\t/**\n\t * Creates a preview container for the suggested app.\n\t *\n\t * @private\n\t * @param {string} id - The unique ID for the container.\n\t * @param {Context} context - The binding context for the app.\n\t * @returns {HBox} The app preview container.\n\t */\n\tprivate _getAppPreviewContainer(id: string, context: Context): HBox {\n\t\tconst container = new HBox(recycleId(`${id}-suggestedAppContainer`), {\n\t\t\trenderType: \"Bare\"\n\t\t});\n\n\t\tif (context.getProperty(\"isStaticApp\") as boolean) {\n\t\t\t// create generic tile for static app\n\t\t\tcontainer.addItem(\n\t\t\t\tnew GenericTile(recycleId(`${id}-staticApp`), {\n\t\t\t\t\tmode: \"IconMode\",\n\t\t\t\t\tframeType: \"TwoByHalf\",\n\t\t\t\t\twidth: \"19rem\",\n\t\t\t\t\theader: context.getProperty(\"title\") as string,\n\t\t\t\t\tsubheader: context.getProperty(\"subTitle\") as string,\n\t\t\t\t\ttileIcon: context.getProperty(\"icon\") as string,\n\t\t\t\t\tvisible: context.getProperty(\"isStaticApp\") as boolean,\n\t\t\t\t\turl: context.getProperty(\"url\") as string,\n\t\t\t\t\tpress: (event: GenericTile$PressEvent) => {\n\t\t\t\t\t\tthis._persistDialog(this.getParent() as ContentAdditionDialog);\n\t\t\t\t\t\tURLHelper.redirect(event.getSource()?.getUrl(), false);\n\t\t\t\t\t}\n\t\t\t\t}).addStyleClass(\"suggestedTile\")\n\t\t\t);\n\t\t} else {\n\t\t\t// create custom visualization for other apps\n\t\t\tconst vizData = context.getProperty(\"vizData\") as ICustomVisualization;\n\t\t\tconst instance = this.vizInstantiationService.instantiateVisualization(vizData) as ICustomVizInstance;\n\t\t\tinstance?.setActive(true);\n\t\t\tinstance.attachPress(() => this._persistDialog(this.getParent() as ContentAdditionDialog));\n\t\t\tcontainer.addItem(instance);\n\t\t}\n\n\t\treturn container;\n\t}\n\n\t/**\n\t * Creates a details container for the suggested app.\n\t *\n\t * @private\n\t * @param {string} id - The unique ID for the container.\n\t * @param {Context} context - The binding context for the app.\n\t * @returns {VBox} The app details container.\n\t */\n\tprivate _getAppDetailsContainer(id: string, context: Context): VBox {\n\t\treturn new VBox(recycleId(`${id}-app-details-container`), {\n\t\t\trenderType: \"Bare\",\n\t\t\tgap: \"0.5rem\",\n\t\t\titems: [\n\t\t\t\tnew ExpandableText(recycleId(`${id}-description`), {\n\t\t\t\t\ttext: context.getProperty(\"description\") as string,\n\t\t\t\t\tmaxCharacters: Constants.MaxDescriptionLength\n\t\t\t\t}),\n\t\t\t\tnew HBox(recycleId(`${id}-app-status-container`), {\n\t\t\t\t\trenderType: \"Bare\",\n\t\t\t\t\tvisible: (context.getProperty(\"status\") as string[]).length > 0,\n\t\t\t\t\titems: [\n\t\t\t\t\t\tnew Label(recycleId(`${id}-appStatusLabel`), {\n\t\t\t\t\t\t\ttext: this._i18nBundle.getText(\"appStatus\"),\n\t\t\t\t\t\t\tshowColon: true\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tnew HBox(recycleId(`${id}-app-status-texts`), {\n\t\t\t\t\t\t\trenderType: \"Bare\",\n\t\t\t\t\t\t\titems: this._generateStatusTexts(id, context.getProperty(\"status\") as string[])\n\t\t\t\t\t\t}).addStyleClass(\"sapUiTinyMarginBegin statusTextsContainer\")\n\t\t\t\t\t]\n\t\t\t\t})\n\t\t\t]\n\t\t}).addStyleClass((context.getProperty(\"isStaticApp\") as boolean) ? \"sapUiSmallMarginTop\" : \"sapUiSmallMarginBegin\");\n\t}\n\n\t/**\n\t * Checks if the Apps Addition Panel is supported. Internally, it checks if the\n\t * AI Smart App Finder feature toggle is enabled and if the associated application\n\t * is accessible for the user.\n\t *\n\t * @public\n\t * @override\n\t * @async\n\t * @returns {Promise<boolean>} A promise that resolves to a boolean indicating support.\n\t */\n\tpublic async isSupported(): Promise<boolean> {\n\t\tconst appsIntent: Target = {\n\t\t\ttarget: {\n\t\t\t\tsemanticObject: \"IntelligentPrompt\",\n\t\t\t\taction: \"propose\"\n\t\t\t}\n\t\t};\n\t\tif (this.isPanelSupported === undefined) {\n\t\t\tthis.isPanelSupported = false;\n\n\t\t\tif (this.getFavAppPanel()) {\n\t\t\t\tthis.isPanelSupported = await isNavigationSupportedForFeature(FEATURE_TOGGLES.AI_SMART_APPFINDER, appsIntent);\n\t\t\t}\n\t\t}\n\n\t\t//remove panel if it's not supported\n\t\tif (!this.isPanelSupported) {\n\t\t\tthis.removeActionButton(this.addAppsButton);\n\t\t\tconst contentAdditionDialog = this.getParent() as ContentAdditionDialog;\n\t\t\tcontentAdditionDialog?.removePanel(this);\n\t\t\tcontentAdditionDialog?.updateActionButtons();\n\t\t}\n\n\t\treturn this.isPanelSupported;\n\t}\n\n\t/**\n\t * Generates the searching animation SVG as a string.\n\t *\n\t * @private\n\t * @returns {string} The SVG string for the loading animation.\n\t */\n\tprivate _generateSearchingAnimations(): string[] {\n\t\tconst loadingShimmer = `<defs>\n\t\t\t<linearGradient id=\"loadingShimmer\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n\t\t\t\t<stop offset=\"0%\" stop-color=\"var(--sapContent_Placeholderloading_Background)\" />\n\t\t\t\t<stop offset=\"20%\" stop-color=\"var(--sapContent_Placeholderloading_Background)\" />\n\t\t\t\t<stop offset=\"50%\" stop-color=\"var(--sapContent_Placeholderloading_Background_Dark)\" />\n\t\t\t\t<stop offset=\"80%\" stop-color=\"var(--sapContent_Placeholderloading_Background)\" />\n\t\t\t\t<stop offset=\"100%\" stop-color=\"var(--sapContent_Placeholderloading_Background)\" />\n\n\t\t\t\t<animate\n\t\t\t\t\tattributeName=\"x1\"\n\t\t\t\t\tvalues=\"-0.6;0.6\"\n\t\t\t\t\tdur=\"2.5s\"\n\t\t\t\t\trepeatCount=\"indefinite\" />\n\t\t\t\t<animate\n\t\t\t\t\tattributeName=\"x2\"\n\t\t\t\t\tvalues=\"0.4;1.6\"\n\t\t\t\t\tdur=\"2.5s\"\n\t\t\t\t\trepeatCount=\"indefinite\" />\n\t\t\t</linearGradient>\n\t\t</defs>`;\n\n\t\treturn [\n\t\t\t`<svg height=\"167\" fill=\"none\">\n\t\t\t\t${loadingShimmer}\n\t\t\t\t<rect x=\"16\" y=\"43\" width=\"16\" height=\"16\" rx=\"4\" fill=\"var(--sapContent_Placeholderloading_Background)\"/>\n\t\t\t\t<rect x=\"48\" y=\"16\" width=\"37%\" height=\"70\" rx=\"16\" fill=\"url(#loadingShimmer)\"/>\n\t\t\t\t<rect x=\"48\" y=\"102\" width=\"93%\" height=\"48\" rx=\"4\" fill=\"url(#loadingShimmer)\"/>\n\t\t\t</svg>`,\n\t\t\t`<svg height=\"180\" fill=\"none\">\n\t\t\t\t${loadingShimmer}\n\t\t\t\t<rect x=\"16\" y=\"82\" width=\"16\" height=\"16\" rx=\"4\" fill=\"var(--sapContent_Placeholderloading_Background)\"/>\n\t\t\t\t<rect x=\"48\" y=\"16\" width=\"148\" height=\"148\" rx=\"16\" fill=\"url(#loadingShimmer)\"/>\n\t\t\t\t<rect x=\"212\" y=\"54\" width=\"75%\" height=\"48\" rx=\"4\" fill=\"url(#loadingShimmer)\"/>\n\t\t\t\t<rect x=\"212\" y=\"110\" width=\"13%\" height=\"16\" rx=\"4\" fill=\"url(#loadingShimmer)\"/>\n\t\t\t</svg>`\n\t\t];\n\t}\n\n\t/**\n\t * Resets the search state in the Apps Addition Panel.\n\t *\n\t * @private\n\t */\n\tprivate resetSearch: () => void = () => {\n\t\tthis.userSelectedApps.clear();\n\t\tthis.model.setProperty(\"/hasError\", false);\n\t\tthis.model.setProperty(\"/suggestedApps\", []);\n\t\tthis.model.setProperty(\"/suggestedAppsCount\", 0);\n\t\tthis.model.setProperty(\"/searchStatus\", SearchStatus.Searching);\n\t\tthis.model.setProperty(\"/userSelectedApps\", []);\n\t\tthis.appSuggestionList.removeSelections(true);\n\t\tthis.resetFeedback();\n\t};\n\n\t/**\n\t * Resets the panel to its default state.\n\t *\n\t * @private\n\t */\n\tpublic resetPanel(): void {\n\t\tconst defaultModelProperties = {\n\t\t\tquery: \"\",\n\t\t\thasError: false,\n\t\t\tsearchStatus: SearchStatus.Idle,\n\t\t\tsuggestedAppsCount: 0,\n\t\t\tuserSelectedApps: [],\n\t\t\tsuggestedApps: [],\n\t\t\tfeedback: {\n\t\t\t\tthumbsUp: false,\n\t\t\t\tthumbsDown: false\n\t\t\t},\n\t\t\tinvalidQuery: true\n\t\t};\n\n\t\tthis.model.setData({ ...this.model.getData(), ...defaultModelProperties } as object);\n\t\tthis.userSelectedApps.clear();\n\t}\n\n\t/**\n\t * Handles the \"Go\" button press event for searching suggested apps.\n\t *\n\t * @private\n\t * @async\n\t */\n\tpublic async onPressGo(): Promise<void> {\n\t\t// validate query\n\t\tconst query = this.model.getProperty(\"/query\") as string;\n\t\tif (!this.isValidQuery(query)) return;\n\n\t\ttry {\n\t\t\t// initiate search\n\t\t\tthis.resetSearch();\n\n\t\t\tconst rawApps = await this.fetchAppsFromSearch(query);\n\t\t\t// suggest apps if there are results and search is not cancelled\n\t\t\tif (this.model.getProperty(\"/searchStatus\") === SearchStatus.Searching) {\n\t\t\t\tconst allVisualizations = await this.fetchAllAvailableVisualizations();\n\t\t\t\tconst favoriteApps = await this.appManagerInstance.fetchFavVizs(true, true);\n\t\t\t\tconst insightsApps = await this.appManagerInstance.fetchInsightApps(true, this._i18nBundle.getText(\"insights\") as string);\n\n\t\t\t\t// generate suggested apps\n\t\t\t\tconst apps = this._generateApps(rawApps, allVisualizations, [...favoriteApps, ...insightsApps]);\n\t\t\t\tconst suggestedApps = await this._filterUnsupportedApps(apps);\n\n\t\t\t\tif (suggestedApps.length === 0) {\n\t\t\t\t\tthis._handleError(\"\", suggestedApps.length);\n\t\t\t\t} else {\n\t\t\t\t\t// update model with filtered apps\n\t\t\t\t\tthis.model.setProperty(\"/suggestedApps\", suggestedApps);\n\t\t\t\t\tthis.model.setProperty(\"/suggestedAppsCount\", suggestedApps.length);\n\t\t\t\t\tthis.appSuggestionList.updateAggregation(\"items\", ChangeReason.Refresh, { detailedReason: ChangeReason.Refresh });\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconst message = (err as Error).message || \"\";\n\t\t\tLog.error(message);\n\t\t\tthis._handleError(message);\n\t\t} finally {\n\t\t\t// update search status only if search is not cancelled\n\t\t\tif (this.model.getProperty(\"/searchStatus\") === SearchStatus.Searching) {\n\t\t\t\tthis.model.setProperty(\"/searchStatus\", SearchStatus.Complete);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Filters out unsupported apps based on accessibility.\n\t *\n\t * @private\n\t * @param {SuggestedApp[]} apps - The list of suggested apps to filter.\n\t * @returns {Promise<SuggestedApp[]>} A promise that resolves to the filtered list of supported apps.\n\t */\n\tprivate async _filterUnsupportedApps(apps: SuggestedApp[]): Promise<SuggestedApp[]> {\n\t\tconst updatedApps = apps.filter((app) => (app.isStaticApp ? true : (app.vizData ?? false)));\n\t\tconst intents = updatedApps.map((app) => app.vizData?.target) || [];\n\t\tconst navigationService = await Container.getServiceAsync<Navigation>(\"Navigation\");\n\t\tconst supportedAppIndices = await navigationService.isNavigationSupported(intents as Target[]);\n\n\t\treturn updatedApps.filter((_, index) => supportedAppIndices[index]);\n\t}\n\n\t/**\n\t * Generates suggested apps from raw app data and visualizations.\n\t *\n\t * @private\n\t * @param {RawAppData[]} rawApps - The raw app data to process.\n\t * @param {IVisualization[]} allVisualizations - All available visualizations.\n\t * @param {ICustomVisualization[]} homePageVisualizations - Visualizations available in homepage.\n\t * @returns {SuggestedApp[]} The list of suggested apps.\n\t */\n\tprivate _generateApps(\n\t\trawApps: RawAppData[],\n\t\tallVisualizations: IVisualization[],\n\t\thomePageVisualizations: ICustomVisualization[]\n\t): SuggestedApp[] {\n\t\treturn rawApps.map((app) => {\n\t\t\tconst vizData = allVisualizations.find((viz) => viz.vizId === app.chipID);\n\t\t\tconst addedToHomePage = homePageVisualizations.some((viz) => viz.visualization?.vizId === app.chipID);\n\t\t\treturn {\n\t\t\t\ttitle: app.title,\n\t\t\t\tchipID: app.chipID,\n\t\t\t\tsubTitle: app.subTitle,\n\t\t\t\tdescription: app.appDescription,\n\t\t\t\ticon: app.iconUrl,\n\t\t\t\tvizData,\n\t\t\t\taddedToHomePage,\n\t\t\t\tisStaticApp: app.tileType === TileType.Static,\n\t\t\t\tstatus: this.getAppStatusTexts(app.configuration, addedToHomePage),\n\t\t\t\turl: vizData?.targetURL || \"\"\n\t\t\t};\n\t\t}) as SuggestedApp[];\n\t}\n\n\t/**\n\t * Validates the query string based on minimum length.\n\t *\n\t * @private\n\t * @param {string} query - The query string to validate.\n\t * @returns {boolean} True if the query is valid, otherwise false.\n\t */\n\tprivate isValidQuery(query: string = \"\"): boolean {\n\t\tquery = query?.trim();\n\t\treturn query.length >= Constants.MinQueryLength && query.length <= Constants.MaxDescriptionLength;\n\t}\n\n\t/**\n\t * Fetches all available visualizations for the user.\n\t *\n\t * @private\n\t * @async\n\t * @returns {Promise<IVisualization[]>} A promise that resolves to the list of visualizations.\n\t */\n\tprivate async fetchAllAvailableVisualizations(): Promise<IVisualization[]> {\n\t\tif (!this.allAvailableVisualizations) {\n\t\t\tconst searchableContentService = await Container.getServiceAsync<SearchableContent>(\"SearchableContent\");\n\t\t\tconst allAvailableApps = await searchableContentService.getApps({ enableVisualizationPreview: false });\n\t\t\tthis.allAvailableVisualizations = allAvailableApps.reduce((visualizations: IVisualization[], currentApp: AppData) => {\n\t\t\t\treturn visualizations.concat(currentApp.visualizations);\n\t\t\t}, []);\n\t\t}\n\n\t\treturn this.allAvailableVisualizations;\n\t}\n\n\t/**\n\t * Fetches a CSRF token for secure API requests.\n\t *\n\t * @private\n\t * @async\n\t * @returns {Promise<string | null>} A promise that resolves to the CSRF token or null if fetching fails.\n\t */\n\tprivate async _fetchCSRFToken(): Promise<string | null> {\n\t\ttry {\n\t\t\tconst response = await fetch(AI_APP_FINDER_BASE_URL, { method: \"GET\", headers: { \"X-CSRF-Token\": \"Fetch\" } });\n\t\t\treturn response.headers.get(\"X-CSRF-Token\");\n\t\t} catch (error) {\n\t\t\tLog.error(\"Failed to fetch CSRF token\", error as Error);\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/**\n\t * Fetches apps from the search API based on the query.\n\t *\n\t * @private\n\t * @async\n\t * @param {string} query - The search query string.\n\t * @returns {Promise<RawAppData[]>} A promise that resolves to the list of raw app data.\n\t */\n\tprivate async fetchAppsFromSearch(query: string): Promise<RawAppData[]> {\n\t\tconst token = await this._fetchCSRFToken();\n\t\tconst headers = {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...(token && { \"X-CSRF-Token\": token })\n\t\t};\n\n\t\tconst response = await fetch(AI_APP_FINDER_API, {\n\t\t\tmethod: \"POST\",\n\t\t\theaders,\n\t\t\tbody: JSON.stringify({ UserInput: query })\n\t\t});\n\n\t\t// handle error responses\n\t\tif (!response.ok) {\n\t\t\tconst errorResponse = (await response.json()) as ErrorResponse;\n\t\t\tthrow new Error(errorResponse.error?.message || \"\");\n\t\t}\n\n\t\tconst queryResult = (await response.json()) as QueryResponse;\n\t\treturn queryResult.value || [];\n\t}\n\n\t/**\n\t * Retrieves status texts for an app based on its configuration and homepage status.\n\t *\n\t * @private\n\t * @param {string} configuration - The app's configuration string.\n\t * @param {boolean} addedToHomePage - Indicates if the app is already added to the homepage.\n\t * @returns {string[]} An array of status texts for the app.\n\t */\n\tprivate getAppStatusTexts(configuration: string, addedToHomePage: boolean): string[] {\n\t\tlet statusTexts = [];\n\n\t\tif (configuration) {\n\t\t\ttry {\n\t\t\t\tconst parsedConfig = JSON.parse(configuration) as Configuration;\n\t\t\t\tconst tileConfig = JSON.parse(parsedConfig?.tileConfiguration) as TileConfig;\n\t\t\t\tconst infoText = (tileConfig?.display_info_text || \"\").toLowerCase();\n\t\t\t\tif (infoText === Constants.DeprecatedInfoText) {\n\t\t\t\t\tstatusTexts.push(this._i18nBundle.getText(\"deprecatedApp\") as string);\n\t\t\t\t}\n\t\t\t} catch (error: unknown) {\n\t\t\t\tLog.warning((error as Error).message);\n\t\t\t}\n\t\t}\n\n\t\tif (addedToHomePage) {\n\t\t\tstatusTexts.push(this._i18nBundle.getText(\"alreadyAddedApp\") as string);\n\t\t}\n\n\t\treturn statusTexts;\n\t}\n\n\t/**\n\t * Generates status text controls for the provided status texts.\n\t *\n\t * @private\n\t * @param {string} id - The id of the list item.\n\t * @param {string[]} stausTexts - The list of status texts.\n\t * @returns {Text[]} An array of Text controls with applied styles.\n\t */\n\tprivate _generateStatusTexts(id: string, stausTexts: string[]): Text[] {\n\t\treturn stausTexts.map((status, index) => {\n\t\t\treturn new Text(recycleId(`${id}-statusText-${index}`), {\n\t\t\t\ttext: status\n\t\t\t}).addStyleClass(this.applyStatusClass(status));\n\t\t});\n\t}\n\n\t/**\n\t * Applies a CSS class to the status text based on its type.\n\t *\n\t * @private\n\t * @param {string} status - The status text to classify.\n\t * @returns {string} The CSS class for the status text.\n\t */\n\tpublic applyStatusClass(status: string): string {\n\t\tif (status === this._i18nBundle.getText(\"alreadyAddedApp\")) {\n\t\t\treturn \"addedAppStatusText\";\n\t\t} else if (status === this._i18nBundle.getText(\"deprecatedApp\")) {\n\t\t\treturn \"deprecatedAppStatusText\";\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}\n\n\t/**\n\t * Handles the \"Add Apps\" button press event to add selected apps to favorites.\n\t *\n\t * @private\n\t * @async\n\t */\n\tprivate async onPressAddApps(): Promise<void> {\n\t\tconst userSelectedApps = this.model.getProperty(\"/userSelectedApps\") as CustomListItem[];\n\t\tlet staticAppsPresent = false;\n\t\tlet dynamicAppsPresent = false;\n\n\t\tfor (const app of userSelectedApps) {\n\t\t\tconst isStaticApp = app.getBindingContext()?.getProperty(\"isStaticApp\") as boolean;\n\t\t\tif (isStaticApp) staticAppsPresent = true;\n\t\t\telse dynamicAppsPresent = true;\n\n\t\t\tconst vizId = app.getBindingContext()?.getProperty(\"chipID\") as string;\n\t\t\tawait this.appManagerInstance.addVisualization(vizId, isStaticApp ? undefined : MYINSIGHT_SECTION_ID);\n\t\t}\n\n\t\tif (staticAppsPresent) {\n\t\t\tawait this.refreshFavoriteApps();\n\t\t}\n\n\t\tif (dynamicAppsPresent) {\n\t\t\tawait this.refreshInsightsApps();\n\t\t}\n\n\t\t(this.getParent() as ContentAdditionDialog)?.close();\n\t\tMessageToast.show(this._i18nBundle.getText(\"appAddedToFavorites\") as string);\n\t\tthis.resetPanel();\n\t}\n\n\t/**\n\t * Retrieves the parent BaseLayout instance for this panel.\n\t *\n\t * @private\n\t * @returns {BaseLayout} The parent BaseLayout instance.\n\t */\n\tprivate getLayout(): BaseLayout {\n\t\treturn this.getParent()?.getParent() as BaseLayout;\n\t}\n\n\t/**\n\t * Retrieves the AppsContainer instance from the parent layout.\n\t *\n\t * @private\n\t * @returns {AppsContainer | undefined} The AppsContainer instance or undefined if not found.\n\t */\n\tprivate getAppsContainer(): AppsContainer | undefined {\n\t\treturn this.getLayout()\n\t\t\t?.getContent()\n\t\t\t.find((container) => container instanceof AppsContainer) as AppsContainer | undefined;\n\t}\n\n\t/**\n\t * Retrieves the favorite apps panel from the AppsContainer.\n\t *\n\t * @private\n\t * @returns {FavAppPanel | undefined} The favorite apps panel or undefined if not found.\n\t */\n\tprivate getFavAppPanel(): FavAppPanel | undefined {\n\t\treturn this.getAppsContainer()\n\t\t\t?.getContent()\n\t\t\t.find((panel) => panel instanceof FavAppPanel);\n\t}\n\n\t/**\n\t * Refreshes the favorite apps panel in the AppsContainer.\n\t *\n\t * @private\n\t * @async\n\t */\n\tprivate async refreshFavoriteApps(): Promise<void> {\n\t\tawait this.getAppsContainer()?.refreshPanel(this.getFavAppPanel() as FavAppPanel);\n\t}\n\n\t/**\n\t * Retrieves the InsightsContainer instance from the parent layout.\n\t *\n\t * @private\n\t * @returns {InsightsContainer | undefined} The AppsContainer instance or undefined if not found.\n\t */\n\tprivate getInsightsContainer(): InsightsContainer | undefined {\n\t\treturn this.getLayout()\n\t\t\t?.getContent()\n\t\t\t.find((container) => container instanceof InsightsContainer);\n\t}\n\n\t/**\n\t * Refreshes the Insights tiles panel in the InsightsContainer.\n\t *\n\t * @private\n\t * @async\n\t */\n\tprivate async refreshInsightsApps(): Promise<void> {\n\t\tawait this.getInsightsContainer()?.refreshData(\"tiles\");\n\t}\n\n\t/**\n\t * Handles the selection change event for the suggested apps list.\n\t *\n\t * @public\n\t * @param {ListBase$SelectionChangeEvent} event - The selection change event.\n\t */\n\tpublic onListSelectionChange(event: ListBase$SelectionChangeEvent): void {\n\t\tconst listItem = event.getParameter(\"listItem\") as CustomListItem;\n\t\tconst selected = event.getParameter(\"selected\") as boolean;\n\n\t\tif (!selected) this.userSelectedApps.delete(listItem);\n\t\telse {\n\t\t\tconst context = listItem.getBindingContext();\n\t\t\tconst addedToHomePage = context?.getProperty(\"addedToHomePage\") as boolean;\n\t\t\tif (!addedToHomePage) this.userSelectedApps.add(listItem);\n\t\t}\n\n\t\tthis.model.setProperty(\"/userSelectedApps\", Array.from(this.userSelectedApps));\n\t}\n\n\t/**\n\t * Handles errors by updating the model with error details.\n\t *\n\t * @private\n\t * @param {string} [message=\"\"] - The error message to process.\n\t */\n\tprivate _handleError(message: string = \"\", suggestedResponseCount?: number): void {\n\t\tconst [, errorCode] = message.match(/\\((\\d{2})\\d*\\)\\s*(.*)/) || [];\n\t\tif (suggestedResponseCount === 0) {\n\t\t\tmessage = this._i18nBundle.getText(\"NoResultErrorDescription\") || \"\";\n\t\t}\n\t\tthis.model.setProperty(\"/hasError\", true);\n\t\tthis.model.setProperty(\"/errorType\", this._getErrorType(errorCode));\n\t\tthis.model.setProperty(\"/errorDescription\", message);\n\t}\n\n\t/**\n\t * Determines the error type based on the provided error code.\n\t *\n\t * @private\n\t * @param {string} [errorCode=\"\"] - The error code to evaluate.\n\t * @returns {ErrorType} The corresponding error type.\n\t */\n\tprivate _getErrorType(errorCode: string = \"\"): ErrorType {\n\t\tif (errorCode === \"10\") {\n\t\t\treturn ErrorType.ServiceError;\n\t\t} else {\n\t\t\treturn ErrorType.NoResultsFound;\n\t\t}\n\t}\n\n\t/**\n\t * Handles live change event for the search text area, updating value state and messages.\n\t *\n\t * @private\n\t * @param {TextArea$LiveChangeEvent} event - The live change event from the text area.\n\t */\n\tpublic onSearchTextAreaLiveChange(event: TextArea$LiveChangeEvent) {\n\t\tconst textArea = event.getSource();\n\t\tconst query = textArea.getValue().trim();\n\n\t\tif (query.length !== 0 && query.length < Constants.MinQueryLength) {\n\t\t\ttextArea.setValueState(ValueState.Information);\n\t\t\ttextArea.setValueStateText(this._i18nBundle.getText(\"minLengthRequired\"));\n\t\t} else if (query.length > Constants.MaxDescriptionLength) {\n\t\t\ttextArea.setValueState(ValueState.Warning);\n\t\t\ttextArea.setValueStateText(this._i18nBundle.getText(\"maxLengthExceeded\"));\n\t\t} else {\n\t\t\ttextArea.setValueState(ValueState.None);\n\t\t\ttextArea.setValueStateText(\"\");\n\t\t}\n\n\t\tthis.model.setProperty(\"/invalidQuery\", query.length === 0 || textArea.getValueState() !== ValueState.None);\n\t}\n\n\t/**\n\t * Generates the AI policy text with a link for display in the footer.\n\t *\n\t * @private\n\t * @returns {string} The formatted AI policy text.\n\t */\n\tpublic _generateAIPolicyText(): string {\n\t\tconst linkText = this._i18nBundle.getText(\"createdWithAI\");\n\t\treturn this._i18nBundle.getText(\"aiPolicyText\", [linkText])!;\n\t}\n\n\t/**\n\t * Resets the feedback state.\n\t *\n\t * @private\n\t */\n\tprivate resetFeedback(): void {\n\t\tthis.model.setProperty(\"/feedback\", {\n\t\t\tthumbsUp: false,\n\t\t\tthumbsDown: false\n\t\t});\n\t}\n\n\t/**\n\t * Marks feedback as provided and shows a confirmation message toast.\n\t *\n\t * @private\n\t */\n\tpublic sendFeedback(feedbackType: string): void {\n\t\tthis.resetFeedback();\n\t\tthis.model.setProperty(`/feedback/${feedbackType}`, true);\n\t\tMessageToast.show(this._i18nBundle.getText(\"feedBackSent\") as string, {\n\t\t\twidth: \"20em\"\n\t\t});\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,wmBAAAC,GAAA,EAAAC,MAAA,EAAAC,cAAA,EAAAC,cAAA,EAAAC,OAAA,EAAAC,WAAA,EAAAC,IAAA,EAAAC,KAAA,EAAAC,aAAA,EAAAC,YAAA,EAAAC,IAAA,EAAAC,IAAA,EAAAC,QAAA,EAAAC,mBAAA,EAAAC,YAAA,EAAAC,SAAA,EAAAC,aAAA,EAAAC,MAAA,EAAAC,SAAA,EAAAC,eAAA,EAAAC,mBAAA,EAAAC,aAAA,EAAAC,mBAA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AAC,CAAC;IACH;EAAC;EAAA,OA5yBmBhH,iBAAiB;AAAA","ignoreList":[]}
@@ -402,8 +402,8 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
402
402
  if (!this.isPanelSupported) {
403
403
  this.removeActionButton(this.addAppsButton);
404
404
  const contentAdditionDialog = this.getParent() as ContentAdditionDialog;
405
- contentAdditionDialog.removePanel(this);
406
- contentAdditionDialog.updateActionButtons();
405
+ contentAdditionDialog?.removePanel(this);
406
+ contentAdditionDialog?.updateActionButtons();
407
407
  }
408
408
 
409
409
  return this.isPanelSupported;
@@ -530,8 +530,9 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
530
530
  }
531
531
  }
532
532
  } catch (err) {
533
- Log.error((err as Error).message);
534
- this._handleError();
533
+ const message = (err as Error).message || "";
534
+ Log.error(message);
535
+ this._handleError(message);
535
536
  } finally {
536
537
  // update search status only if search is not cancelled
537
538
  if (this.model.getProperty("/searchStatus") === SearchStatus.Searching) {
@@ -645,33 +646,26 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
645
646
  * @returns {Promise<RawAppData[]>} A promise that resolves to the list of raw app data.
646
647
  */
647
648
  private async fetchAppsFromSearch(query: string): Promise<RawAppData[]> {
648
- try {
649
- const token = await this._fetchCSRFToken();
650
- const headers = {
651
- "Content-Type": "application/json",
652
- ...(token && { "X-CSRF-Token": token })
653
- };
649
+ const token = await this._fetchCSRFToken();
650
+ const headers = {
651
+ "Content-Type": "application/json",
652
+ ...(token && { "X-CSRF-Token": token })
653
+ };
654
654
 
655
- const response = await fetch(AI_APP_FINDER_API, {
656
- method: "POST",
657
- headers,
658
- body: JSON.stringify({ UserInput: query })
659
- });
660
-
661
- // handle error responses
662
- if (!response.ok) {
663
- const errorResponse = (await response.json()) as ErrorResponse;
664
- this._handleError(errorResponse.error?.message || "");
665
- return [];
666
- }
655
+ const response = await fetch(AI_APP_FINDER_API, {
656
+ method: "POST",
657
+ headers,
658
+ body: JSON.stringify({ UserInput: query })
659
+ });
667
660
 
668
- const queryResult = (await response.json()) as QueryResponse;
669
- return queryResult.value || [];
670
- } catch (error) {
671
- Log.error((error as Error).message);
672
- this._handleError();
673
- return [];
661
+ // handle error responses
662
+ if (!response.ok) {
663
+ const errorResponse = (await response.json()) as ErrorResponse;
664
+ throw new Error(errorResponse.error?.message || "");
674
665
  }
666
+
667
+ const queryResult = (await response.json()) as QueryResponse;
668
+ return queryResult.value || [];
675
669
  }
676
670
 
677
671
  /**
@@ -766,7 +760,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
766
760
  await this.refreshInsightsApps();
767
761
  }
768
762
 
769
- (this.getParent() as ContentAdditionDialog).close();
763
+ (this.getParent() as ContentAdditionDialog)?.close();
770
764
  MessageToast.show(this._i18nBundle.getText("appAddedToFavorites") as string);
771
765
  this.resetPanel();
772
766
  }
@@ -789,7 +783,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
789
783
  */
790
784
  private getAppsContainer(): AppsContainer | undefined {
791
785
  return this.getLayout()
792
- .getContent()
786
+ ?.getContent()
793
787
  .find((container) => container instanceof AppsContainer) as AppsContainer | undefined;
794
788
  }
795
789
 
@@ -823,7 +817,7 @@ export default class AppsAdditionPanel extends BaseSettingsPanel {
823
817
  */
824
818
  private getInsightsContainer(): InsightsContainer | undefined {
825
819
  return this.getLayout()
826
- .getContent()
820
+ ?.getContent()
827
821
  .find((container) => container instanceof InsightsContainer);
828
822
  }
829
823
 
@@ -174,8 +174,8 @@ sap.ui.define(["sap/base/Log", "sap/insights/CardHelper", "sap/m/Button", "sap/m
174
174
  if (!_this3.isPanelSupported) {
175
175
  _this3.removeActionButton(_this3.addCardsButton);
176
176
  const contentAdditionDialog = _this3.getParent();
177
- contentAdditionDialog.removePanel(_this3);
178
- contentAdditionDialog.updateActionButtons();
177
+ contentAdditionDialog?.removePanel(_this3);
178
+ contentAdditionDialog?.updateActionButtons();
179
179
  }
180
180
  return _this3.isPanelSupported;
181
181
  }
@@ -1 +1 @@
1
- {"version":3,"file":"InsightsAdditionPanel.js","names":["sap","ui","define","Log","CardHelper","Button","sap_m_library","MessageBox","MessageToast","VBox","__BaseSettingsPanel","__CardsPanel","__InsightsContainer","___utils_Constants","___utils_FeatureUtils","___utils_FESRUtil","_interopRequireDefault","obj","__esModule","default","_catch","body","recover","result","e","then","BackgroundDesign","_finallyRethrows","finalizer","bind","ButtonType","BaseSettingsPanel","CardsPanel","InsightsContainer","CONTENT_ADDITION_PANEL_TYPES","FEATURE_TOGGLES","FESR_IDS","isNavigationSupportedForFeature","addFESRSemanticStepName","FESR_EVENTS","InsightsAdditionPanel","extend","init","_init","BaseSettingsPanel.prototype.init.call","setProperty","AI_INSIGHTS_CARDS","_i18nBundle","getText","addCardsButton","getId","text","type","Emphasized","enabled","press","onPressAddCards","PRESS","ADD_AI_CARD","addActionButton","_setupContent","dialogCloseHandler","resetAddCardInnerContent","attachEvent","enableAddButton","_enableAddButton","action","setEnabled","_this","_temp","Promise","resolve","_fetchAddCardDialogContent","dialogContent","wrapperVBox","items","backgroundDesign","Solid","height","addAggregation","error","getParent","removePanel","detachEvent","message","reject","_this2","getServiceAsync","_getServiceAsync","cardHelperInstance","fetchAddCardInnerContent","event","_latestGeneratedManifest","getParameters","isValidManifest","Object","keys","length","getInsightsContainer","_getInsightsContainer","layout","getContent","find","container","isSupported","_isSupported","_this3","_temp3","isPanelSupported","removeActionButton","contentAdditionDialog","updateActionButtons","insightsCardIntent","target","semanticObject","_temp2","undefined","AI_GENERATED_CARD","_isNavigationSupporte","_fetchCardsPanel","insightsContainer","panel","_onPressAddCards","_this4","addContentDialog","_temp4","setBusy","_createCard","createdCardResponse","show","close","visible","information","styleClass","cardsPanel","refreshData","_wasThrown","_result","_resetAddCardInnerContent"],"sources":["InsightsAdditionPanel.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport Log from \"sap/base/Log\";\nimport CardHelper from \"sap/insights/CardHelper\";\nimport Button from \"sap/m/Button\";\nimport { BackgroundDesign, ButtonType } from \"sap/m/library\";\nimport MessageBox from \"sap/m/MessageBox\";\nimport MessageToast from \"sap/m/MessageToast\";\nimport VBox from \"sap/m/VBox\";\nimport Control from \"sap/ui/core/Control\";\nimport { Target } from \"sap/ushell/services/Navigation\";\nimport BaseLayout from \"./BaseLayout\";\nimport BaseSettingsPanel from \"./BaseSettingsPanel\";\nimport CardsPanel from \"./CardsPanel\";\nimport ContentAdditionDialog from \"./ContentAdditionDialog\";\nimport InsightsContainer from \"./InsightsContainer\";\nimport { ICardHelper, ICardHelperInstance, ICardManifest } from \"./interface/CardsInterface\";\nimport { CONTENT_ADDITION_PANEL_TYPES, FEATURE_TOGGLES, FESR_IDS } from \"./utils/Constants\";\nimport { isNavigationSupportedForFeature } from \"./utils/FeatureUtils\";\nimport { addFESRSemanticStepName, FESR_EVENTS } from \"./utils/FESRUtil\";\n\n/**\n *\n * Class for Apps Addition Panel in MyHome.\n *\n * @extends BaseSettingsPanel\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.136\n *\n * @internal\n * @experimental Since 1.136\n * @private\n *\n * @alias sap.cux.home.InsightsAdditionPanel\n */\nexport default class InsightsAdditionPanel extends BaseSettingsPanel {\n\tprivate addCardsButton!: Button;\n\tprivate cardHelperInstance!: ICardHelperInstance;\n\tprivate isPanelSupported!: boolean;\n\tprivate _latestGeneratedManifest!: ICardManifest;\n\tprivate dialogCloseHandler!: () => void;\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @public\n\t * @override\n\t */\n\tpublic init() {\n\t\tsuper.init();\n\n\t\t//setup panel\n\t\tthis.setProperty(\"key\", CONTENT_ADDITION_PANEL_TYPES.AI_INSIGHTS_CARDS);\n\t\tthis.setProperty(\"title\", this._i18nBundle.getText(\"insightsCards\"));\n\n\t\t//setup actions\n\t\tthis.addCardsButton = new Button(`${this.getId()}-add-cards-btn`, {\n\t\t\ttext: this._i18nBundle.getText(\"addFromInsightsDialogBtn\"),\n\t\t\ttype: ButtonType.Emphasized,\n\t\t\tenabled: false,\n\t\t\tpress: this.onPressAddCards.bind(this)\n\t\t});\n\t\taddFESRSemanticStepName(this.addCardsButton, FESR_EVENTS.PRESS, FESR_IDS.ADD_AI_CARD);\n\t\tthis.addActionButton(this.addCardsButton);\n\t\t//setup content\n\t\tvoid this._setupContent();\n\t\tthis.dialogCloseHandler = this.resetAddCardInnerContent.bind(this);\n\t\tthis.attachEvent(\"onDialogClose\", this.dialogCloseHandler);\n\t}\n\n\t/**\n\t * Enables or disables the \"Add Cards\" button.\n\t *\n\t * @param {boolean} action - If true, the button is enabled; if false, it is disabled.\n\t */\n\tprivate enableAddButton(action: boolean) {\n\t\tthis.addCardsButton.setEnabled(action);\n\t}\n\n\t/**\n\t * It sets up the content for the \"Insights card\" dialog.\n\t * It fetches the inner dialog content for adding a card.\n\t * Adds the VBox to the panel's content aggregation.\n\t *\n\t * This also enables the \"Add\" button once content is fetched.\n\t *\n\t * @private\n\t * @returns {Promise<void>} A promise that resolves when setup is complete.\n\t */\n\tprivate async _setupContent(): Promise<void> {\n\t\ttry {\n\t\t\tconst dialogContent = await this._fetchAddCardDialogContent();\n\t\t\tif (dialogContent) {\n\t\t\t\tconst wrapperVBox = new VBox(`${this.getId()}-wrapperVBox`, {\n\t\t\t\t\titems: dialogContent,\n\t\t\t\t\tbackgroundDesign: BackgroundDesign.Solid,\n\t\t\t\t\theight: \"100%\"\n\t\t\t\t});\n\t\t\t\tthis.addAggregation(\"content\", wrapperVBox);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t(this.getParent() as ContentAdditionDialog)?.removePanel(this);\n\t\t\tthis.detachEvent(\"onDialogClose\", this.dialogCloseHandler);\n\t\t\tLog.error((error as Error).message);\n\t\t}\n\t}\n\n\t/**\n\t * Fetches the dialog content for adding a new card and sets up the callback\n\t * to handle the card generation event, storing the generated manifest and enabling the add button.\n\t *\n\t * @private\n\t * @returns {Promise<Control[]>} A promise that resolves with an array of dialog content controls.\n\t */\n\tprivate async _fetchAddCardDialogContent(): Promise<Control[]> {\n\t\tthis.cardHelperInstance = await (CardHelper as ICardHelper).getServiceAsync();\n\t\treturn this.cardHelperInstance.fetchAddCardInnerContent((event) => {\n\t\t\tthis._latestGeneratedManifest = event.getParameters();\n\t\t\tconst isValidManifest = Object.keys(this._latestGeneratedManifest).length > 1;\n\t\t\tthis.enableAddButton(isValidManifest);\n\t\t});\n\t}\n\n\t/**\n\t * Retrieves the InsightsContainer instance from the parent layout.\n\t *\n\t * @private\n\t * @returns {InsightsContainer | undefined} The InsightsContainer instance or undefined if not found.\n\t */\n\tprivate getInsightsContainer(): InsightsContainer | undefined {\n\t\tconst layout = this.getParent()?.getParent() as BaseLayout;\n\t\treturn layout.getContent().find((container) => container instanceof InsightsContainer);\n\t}\n\n\t/**\n\t * Checks if the Insights Addition Panel is supported.\n\t *\n\t * @public\n\t * @async\n\t * @returns {Promise<boolean>} A promise that resolves to true if supported.\n\t */\n\tpublic async isSupported(): Promise<boolean> {\n\t\tconst insightsCardIntent: Target = {\n\t\t\ttarget: {\n\t\t\t\tsemanticObject: \"IntelligentPrompt\",\n\t\t\t\taction: \"personalize\"\n\t\t\t}\n\t\t};\n\t\tif (this.isPanelSupported === undefined) {\n\t\t\tthis.isPanelSupported = false;\n\t\t\tthis.isPanelSupported = await isNavigationSupportedForFeature(FEATURE_TOGGLES.AI_GENERATED_CARD, insightsCardIntent);\n\t\t}\n\t\t//remove panel if it's not supported\n\t\tif (!this.isPanelSupported) {\n\t\t\tthis.removeActionButton(this.addCardsButton);\n\t\t\tconst contentAdditionDialog = this.getParent() as ContentAdditionDialog;\n\t\t\tcontentAdditionDialog.removePanel(this);\n\t\t\tcontentAdditionDialog.updateActionButtons();\n\t\t}\n\t\treturn this.isPanelSupported;\n\t}\n\n\t/**\n\t * Retrieves the `CardsPanel` instance from the `InsightsContainer`.\n\t *\n\t * @private\n\t * @returns {CardsPanel | undefined} The found `CardsPanel` instance, or `undefined` if not found.\n\t */\n\tprivate _fetchCardsPanel(): CardsPanel | undefined {\n\t\tconst insightsContainer = this.getInsightsContainer();\n\t\tif (!insightsContainer) {\n\t\t\treturn;\n\t\t}\n\t\treturn insightsContainer.getContent().find((panel): panel is CardsPanel => panel instanceof CardsPanel);\n\t}\n\n\t/**\n\t * Handles the logic for creating and adding a new insight card to cards Panel.\n\t *\n\t * - Sets the dialog to busy while the card creation is in progress.\n\t * - It adds a new card using the latest generated manifest.\n\t * - On success, shows a message toast and closes the dialog.\n\t * - Refreshes the insights cards panel data.\n\t *\n\t * @private\n\t * @returns {Promise<void>} A promise that resolves when the card creation flow completes.\n\t */\n\tprivate async onPressAddCards() {\n\t\tconst addContentDialog = this.getParent() as ContentAdditionDialog;\n\t\ttry {\n\t\t\taddContentDialog.setBusy(true);\n\n\t\t\tconst createdCardResponse = await this.cardHelperInstance._createCard(this._latestGeneratedManifest);\n\t\t\tMessageToast.show(this._i18nBundle.getText(\"Card_Created\") as string);\n\n\t\t\taddContentDialog.close();\n\t\t\tif (!createdCardResponse?.[\"sap.insights\"]?.visible) {\n\t\t\t\tMessageBox.information(this._i18nBundle.getText(\"INT_CARD_LIMIT_MESSAGEBOX\") as string, {\n\t\t\t\t\tstyleClass: \"msgBoxAlign\"\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst cardsPanel = this._fetchCardsPanel();\n\t\t\tawait cardsPanel?.refreshData();\n\t\t} catch (error) {\n\t\t\tLog.error((error as Error).message);\n\t\t} finally {\n\t\t\taddContentDialog.setBusy(false);\n\t\t}\n\t}\n\n\t/**\n\t * Resets the internal content related to card addition.\n\t * Disables the \"Add\" button.\n\t *\n\t * @private\n\t */\n\tprivate resetAddCardInnerContent() {\n\t\tthis.cardHelperInstance.resetAddCardInnerContent();\n\t\tthis.enableAddButton(false);\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,gRAAAC,GAAA,EAAAC,UAAA,EAA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AA,CAAAe,MAAA,CAAA7D,CAAA;MAAA;IAAA;IAED;AACD;AACA;AACA;AACA;AACA;IACSsC,wBAAwB,WAAA4E,0BAAA,EAAG;MAClC,IAAI,CAACjD,kBAAkB,CAAC3B,wBAAwB,CAAC,CAAC;MAClD,IAAI,CAACE,eAAe,CAAC,KAAK,CAAC;IAC5B;EAAC;EAAA,OAxLmBxB,qBAAqB;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"InsightsAdditionPanel.js","names":["sap","ui","define","Log","CardHelper","Button","sap_m_library","MessageBox","MessageToast","VBox","__BaseSettingsPanel","__CardsPanel","__InsightsContainer","___utils_Constants","___utils_FeatureUtils","___utils_FESRUtil","_interopRequireDefault","obj","__esModule","default","_catch","body","recover","result","e","then","BackgroundDesign","_finallyRethrows","finalizer","bind","ButtonType","BaseSettingsPanel","CardsPanel","InsightsContainer","CONTENT_ADDITION_PANEL_TYPES","FEATURE_TOGGLES","FESR_IDS","isNavigationSupportedForFeature","addFESRSemanticStepName","FESR_EVENTS","InsightsAdditionPanel","extend","init","_init","BaseSettingsPanel.prototype.init.call","setProperty","AI_INSIGHTS_CARDS","_i18nBundle","getText","addCardsButton","getId","text","type","Emphasized","enabled","press","onPressAddCards","PRESS","ADD_AI_CARD","addActionButton","_setupContent","dialogCloseHandler","resetAddCardInnerContent","attachEvent","enableAddButton","_enableAddButton","action","setEnabled","_this","_temp","Promise","resolve","_fetchAddCardDialogContent","dialogContent","wrapperVBox","items","backgroundDesign","Solid","height","addAggregation","error","getParent","removePanel","detachEvent","message","reject","_this2","getServiceAsync","_getServiceAsync","cardHelperInstance","fetchAddCardInnerContent","event","_latestGeneratedManifest","getParameters","isValidManifest","Object","keys","length","getInsightsContainer","_getInsightsContainer","layout","getContent","find","container","isSupported","_isSupported","_this3","_temp3","isPanelSupported","removeActionButton","contentAdditionDialog","updateActionButtons","insightsCardIntent","target","semanticObject","_temp2","undefined","AI_GENERATED_CARD","_isNavigationSupporte","_fetchCardsPanel","insightsContainer","panel","_onPressAddCards","_this4","addContentDialog","_temp4","setBusy","_createCard","createdCardResponse","show","close","visible","information","styleClass","cardsPanel","refreshData","_wasThrown","_result","_resetAddCardInnerContent"],"sources":["InsightsAdditionPanel.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport Log from \"sap/base/Log\";\nimport CardHelper from \"sap/insights/CardHelper\";\nimport Button from \"sap/m/Button\";\nimport { BackgroundDesign, ButtonType } from \"sap/m/library\";\nimport MessageBox from \"sap/m/MessageBox\";\nimport MessageToast from \"sap/m/MessageToast\";\nimport VBox from \"sap/m/VBox\";\nimport Control from \"sap/ui/core/Control\";\nimport { Target } from \"sap/ushell/services/Navigation\";\nimport BaseLayout from \"./BaseLayout\";\nimport BaseSettingsPanel from \"./BaseSettingsPanel\";\nimport CardsPanel from \"./CardsPanel\";\nimport ContentAdditionDialog from \"./ContentAdditionDialog\";\nimport InsightsContainer from \"./InsightsContainer\";\nimport { ICardHelper, ICardHelperInstance, ICardManifest } from \"./interface/CardsInterface\";\nimport { CONTENT_ADDITION_PANEL_TYPES, FEATURE_TOGGLES, FESR_IDS } from \"./utils/Constants\";\nimport { isNavigationSupportedForFeature } from \"./utils/FeatureUtils\";\nimport { addFESRSemanticStepName, FESR_EVENTS } from \"./utils/FESRUtil\";\n\n/**\n *\n * Class for Apps Addition Panel in MyHome.\n *\n * @extends BaseSettingsPanel\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.136\n *\n * @internal\n * @experimental Since 1.136\n * @private\n *\n * @alias sap.cux.home.InsightsAdditionPanel\n */\nexport default class InsightsAdditionPanel extends BaseSettingsPanel {\n\tprivate addCardsButton!: Button;\n\tprivate cardHelperInstance!: ICardHelperInstance;\n\tprivate isPanelSupported!: boolean;\n\tprivate _latestGeneratedManifest!: ICardManifest;\n\tprivate dialogCloseHandler!: () => void;\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @public\n\t * @override\n\t */\n\tpublic init() {\n\t\tsuper.init();\n\n\t\t//setup panel\n\t\tthis.setProperty(\"key\", CONTENT_ADDITION_PANEL_TYPES.AI_INSIGHTS_CARDS);\n\t\tthis.setProperty(\"title\", this._i18nBundle.getText(\"insightsCards\"));\n\n\t\t//setup actions\n\t\tthis.addCardsButton = new Button(`${this.getId()}-add-cards-btn`, {\n\t\t\ttext: this._i18nBundle.getText(\"addFromInsightsDialogBtn\"),\n\t\t\ttype: ButtonType.Emphasized,\n\t\t\tenabled: false,\n\t\t\tpress: this.onPressAddCards.bind(this)\n\t\t});\n\t\taddFESRSemanticStepName(this.addCardsButton, FESR_EVENTS.PRESS, FESR_IDS.ADD_AI_CARD);\n\t\tthis.addActionButton(this.addCardsButton);\n\t\t//setup content\n\t\tvoid this._setupContent();\n\t\tthis.dialogCloseHandler = this.resetAddCardInnerContent.bind(this);\n\t\tthis.attachEvent(\"onDialogClose\", this.dialogCloseHandler);\n\t}\n\n\t/**\n\t * Enables or disables the \"Add Cards\" button.\n\t *\n\t * @param {boolean} action - If true, the button is enabled; if false, it is disabled.\n\t */\n\tprivate enableAddButton(action: boolean) {\n\t\tthis.addCardsButton.setEnabled(action);\n\t}\n\n\t/**\n\t * It sets up the content for the \"Insights card\" dialog.\n\t * It fetches the inner dialog content for adding a card.\n\t * Adds the VBox to the panel's content aggregation.\n\t *\n\t * This also enables the \"Add\" button once content is fetched.\n\t *\n\t * @private\n\t * @returns {Promise<void>} A promise that resolves when setup is complete.\n\t */\n\tprivate async _setupContent(): Promise<void> {\n\t\ttry {\n\t\t\tconst dialogContent = await this._fetchAddCardDialogContent();\n\t\t\tif (dialogContent) {\n\t\t\t\tconst wrapperVBox = new VBox(`${this.getId()}-wrapperVBox`, {\n\t\t\t\t\titems: dialogContent,\n\t\t\t\t\tbackgroundDesign: BackgroundDesign.Solid,\n\t\t\t\t\theight: \"100%\"\n\t\t\t\t});\n\t\t\t\tthis.addAggregation(\"content\", wrapperVBox);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t(this.getParent() as ContentAdditionDialog)?.removePanel(this);\n\t\t\tthis.detachEvent(\"onDialogClose\", this.dialogCloseHandler);\n\t\t\tLog.error((error as Error).message);\n\t\t}\n\t}\n\n\t/**\n\t * Fetches the dialog content for adding a new card and sets up the callback\n\t * to handle the card generation event, storing the generated manifest and enabling the add button.\n\t *\n\t * @private\n\t * @returns {Promise<Control[]>} A promise that resolves with an array of dialog content controls.\n\t */\n\tprivate async _fetchAddCardDialogContent(): Promise<Control[]> {\n\t\tthis.cardHelperInstance = await (CardHelper as ICardHelper).getServiceAsync();\n\t\treturn this.cardHelperInstance.fetchAddCardInnerContent((event) => {\n\t\t\tthis._latestGeneratedManifest = event.getParameters();\n\t\t\tconst isValidManifest = Object.keys(this._latestGeneratedManifest).length > 1;\n\t\t\tthis.enableAddButton(isValidManifest);\n\t\t});\n\t}\n\n\t/**\n\t * Retrieves the InsightsContainer instance from the parent layout.\n\t *\n\t * @private\n\t * @returns {InsightsContainer | undefined} The InsightsContainer instance or undefined if not found.\n\t */\n\tprivate getInsightsContainer(): InsightsContainer | undefined {\n\t\tconst layout = this.getParent()?.getParent() as BaseLayout;\n\t\treturn layout.getContent().find((container) => container instanceof InsightsContainer);\n\t}\n\n\t/**\n\t * Checks if the Insights Addition Panel is supported.\n\t *\n\t * @public\n\t * @async\n\t * @returns {Promise<boolean>} A promise that resolves to true if supported.\n\t */\n\tpublic async isSupported(): Promise<boolean> {\n\t\tconst insightsCardIntent: Target = {\n\t\t\ttarget: {\n\t\t\t\tsemanticObject: \"IntelligentPrompt\",\n\t\t\t\taction: \"personalize\"\n\t\t\t}\n\t\t};\n\t\tif (this.isPanelSupported === undefined) {\n\t\t\tthis.isPanelSupported = false;\n\t\t\tthis.isPanelSupported = await isNavigationSupportedForFeature(FEATURE_TOGGLES.AI_GENERATED_CARD, insightsCardIntent);\n\t\t}\n\t\t//remove panel if it's not supported\n\t\tif (!this.isPanelSupported) {\n\t\t\tthis.removeActionButton(this.addCardsButton);\n\t\t\tconst contentAdditionDialog = this.getParent() as ContentAdditionDialog;\n\t\t\tcontentAdditionDialog?.removePanel(this);\n\t\t\tcontentAdditionDialog?.updateActionButtons();\n\t\t}\n\t\treturn this.isPanelSupported;\n\t}\n\n\t/**\n\t * Retrieves the `CardsPanel` instance from the `InsightsContainer`.\n\t *\n\t * @private\n\t * @returns {CardsPanel | undefined} The found `CardsPanel` instance, or `undefined` if not found.\n\t */\n\tprivate _fetchCardsPanel(): CardsPanel | undefined {\n\t\tconst insightsContainer = this.getInsightsContainer();\n\t\tif (!insightsContainer) {\n\t\t\treturn;\n\t\t}\n\t\treturn insightsContainer.getContent().find((panel): panel is CardsPanel => panel instanceof CardsPanel);\n\t}\n\n\t/**\n\t * Handles the logic for creating and adding a new insight card to cards Panel.\n\t *\n\t * - Sets the dialog to busy while the card creation is in progress.\n\t * - It adds a new card using the latest generated manifest.\n\t * - On success, shows a message toast and closes the dialog.\n\t * - Refreshes the insights cards panel data.\n\t *\n\t * @private\n\t * @returns {Promise<void>} A promise that resolves when the card creation flow completes.\n\t */\n\tprivate async onPressAddCards() {\n\t\tconst addContentDialog = this.getParent() as ContentAdditionDialog;\n\t\ttry {\n\t\t\taddContentDialog.setBusy(true);\n\n\t\t\tconst createdCardResponse = await this.cardHelperInstance._createCard(this._latestGeneratedManifest);\n\t\t\tMessageToast.show(this._i18nBundle.getText(\"Card_Created\") as string);\n\n\t\t\taddContentDialog.close();\n\t\t\tif (!createdCardResponse?.[\"sap.insights\"]?.visible) {\n\t\t\t\tMessageBox.information(this._i18nBundle.getText(\"INT_CARD_LIMIT_MESSAGEBOX\") as string, {\n\t\t\t\t\tstyleClass: \"msgBoxAlign\"\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst cardsPanel = this._fetchCardsPanel();\n\t\t\tawait cardsPanel?.refreshData();\n\t\t} catch (error) {\n\t\t\tLog.error((error as Error).message);\n\t\t} finally {\n\t\t\taddContentDialog.setBusy(false);\n\t\t}\n\t}\n\n\t/**\n\t * Resets the internal content related to card addition.\n\t * Disables the \"Add\" button.\n\t *\n\t * @private\n\t */\n\tprivate resetAddCardInnerContent() {\n\t\tthis.cardHelperInstance.resetAddCardInnerContent();\n\t\tthis.enableAddButton(false);\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,gRAAAC,GAAA,EAAAC,UAAA,EAAAC,MAAA,EAAAC,aAAA,EAAAC,UAAA,EAAAC,YAAA,EAAAC,IAAA,EAAAC,mBAAA,EAAAC,YAAA,EAAAC,mBAAA,EAAAC,kBAAA,EAAAC,qBAAA,EAAAC,iBAAA;EAAA;;EAAA,SAAAC,uBAAAC,GAAA;IAAA,OAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,CAAAE,OAAA,mBAAAF,GAAA,CAAAE,OAAA,GAAAF,GAAA;EAAA;EAkjBO,SAAAG,OAAgBC,IAAI,EAAEC,OAAO,EAAE;IACrC,IAAI;MACH,IAAIC,MAAM,GAAGF,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC,OAAMG,CAAC,EAAE;MACV,OAAOF,OAAO,CAACE,CAAC,CAAC;IAClB;IACA,IAAID,MAAM,IAAIA,MAAM,CAACE,IAAI,EAAE;MAC1B,OAAOF,MAAM,CAACE,IAAI,CAAC,KAAK,CAAC,EAAEH,OAAO,CAAC;IACpC;IACA,OAAOC,MAAM;EACd;EAAC,MApjBQG,gBAAgB,GAAApB,aAAA;EAujBlB,SAASqB,gBAAgBA,CAACN,IAAI,EAAEO,SAAS,EAAE;IACjD,IAAI;MACH,IAAIL,MAAM,GAAGF,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC,OAAOG,CAAC,EAAE;MACX,OAAOI,SAAS,CAAC,IAAI,EAAEJ,CAAC,CAAC;IAC1B;IACA,IAAID,MAAM,IAAIA,MAAM,CAACE,IAAI,EAAE;MAC1B,OAAOF,MAAM,CAACE,IAAI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AA,aAAAoD,UAAA,EAAAC,OAAA;UACAb,gBAAgB,CAACE,OAAO,CAAC,KAAK,CAAC;UAAC,IAAAU,UAAA,QAAAC,OAAA;UAAA,OAAAA,OAAA;QAAA;QAAA,OAAAnE,OAAA,CAAAC,OAAA,CAAAsD,MAAA,IAAAA,MAAA,CAAApG,IAAA,GAAAoG,MAAA,CAAApG,IAAA;MAElC,CAAC,QAAAD,CAAA;QAAA,OAAA8C,OAAA,CAAAe,MAAA,CAAA7D,CAAA;MAAA;IAAA;IAED;AACD;AACA;AACA;AACA;AACA;IACSsC,wBAAwB,WAAA4E,0BAAA,EAAG;MAClC,IAAI,CAACjD,kBAAkB,CAAC3B,wBAAwB,CAAC,CAAC;MAClD,IAAI,CAACE,eAAe,CAAC,KAAK,CAAC;IAC5B;EAAC;EAAA,OAxLmBxB,qBAAqB;AAAA","ignoreList":[]}
@@ -158,8 +158,8 @@ export default class InsightsAdditionPanel extends BaseSettingsPanel {
158
158
  if (!this.isPanelSupported) {
159
159
  this.removeActionButton(this.addCardsButton);
160
160
  const contentAdditionDialog = this.getParent() as ContentAdditionDialog;
161
- contentAdditionDialog.removePanel(this);
162
- contentAdditionDialog.updateActionButtons();
161
+ contentAdditionDialog?.removePanel(this);
162
+ contentAdditionDialog?.updateActionButtons();
163
163
  }
164
164
  return this.isPanelSupported;
165
165
  }