@sap-ux/preview-middleware 0.22.0 → 0.22.1

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.
@@ -4,18 +4,23 @@ sap.ui.define([
4
4
  'sap/ui/dt/OverlayRegistry',
5
5
  'sap/ui/rta/command/CommandFactory',
6
6
  '../../../utils/application',
7
+ '../../../utils/error',
7
8
  '../../../utils/fe-v4',
9
+ '../../../utils/info-center-message',
8
10
  '../../../utils/version',
9
11
  '../../api-handler',
10
12
  '../../dialog-factory',
11
13
  '../dialog-enablement-validator',
12
14
  '../fe-v2/utils',
13
15
  '../quick-action-base'
14
- ], function (___sap_ux_private_control_property_editor_common, OverlayRegistry, CommandFactory, _____utils_application, _____utils_fe_v4, _____utils_version, ____api_handler, ____dialog_factory, ___dialog_enablement_validator, ___fe_v2_utils, ___quick_action_base) {
16
+ ], function (___sap_ux_private_control_property_editor_common, OverlayRegistry, CommandFactory, _____utils_application, _____utils_error, _____utils_fe_v4, _____utils_info_center_message, _____utils_version, ____api_handler, ____dialog_factory, ___dialog_enablement_validator, ___fe_v2_utils, ___quick_action_base) {
15
17
  'use strict';
18
+ const MessageBarType = ___sap_ux_private_control_property_editor_common['MessageBarType'];
16
19
  const NESTED_QUICK_ACTION_KIND = ___sap_ux_private_control_property_editor_common['NESTED_QUICK_ACTION_KIND'];
17
20
  const getApplicationType = _____utils_application['getApplicationType'];
21
+ const getError = _____utils_error['getError'];
18
22
  const getV4AppComponent = _____utils_fe_v4['getV4AppComponent'];
23
+ const sendInfoCenterMessage = _____utils_info_center_message['sendInfoCenterMessage'];
19
24
  const getUi5Version = _____utils_version['getUi5Version'];
20
25
  const isLowerThanMinimalUi5Version = _____utils_version['isLowerThanMinimalUi5Version'];
21
26
  const getDataSourceAnnotationFileMap = ____api_handler['getDataSourceAnnotationFileMap'];
@@ -52,7 +57,17 @@ sap.ui.define([
52
57
  this.isApplicable = false;
53
58
  return;
54
59
  }
55
- this.annotationDataSourceData = await getDataSourceAnnotationFileMap();
60
+ try {
61
+ this.annotationDataSourceData = await getDataSourceAnnotationFileMap();
62
+ } catch (e) {
63
+ const error = getError(e);
64
+ await sendInfoCenterMessage({
65
+ title: { key: 'ADP_GET_ANNOTATION_ERROR_TITLE' },
66
+ description: error.message,
67
+ type: MessageBarType.error
68
+ });
69
+ throw error;
70
+ }
56
71
  const {annotationDataSourceMap} = this.annotationDataSourceData;
57
72
  if (!Object.keys(this.annotationDataSourceData.annotationDataSourceMap).length) {
58
73
  throw new Error('No data sources found in the manifest');
@@ -1,6 +1,7 @@
1
1
  import FlexCommand from 'sap/ui/rta/command/FlexCommand';
2
2
 
3
3
  import {
4
+ MessageBarType,
4
5
  NESTED_QUICK_ACTION_KIND,
5
6
  NestedQuickAction,
6
7
  NestedQuickActionChild
@@ -9,7 +10,9 @@ import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
9
10
  import CommandFactory from 'sap/ui/rta/command/CommandFactory';
10
11
  import { NestedQuickActionDefinition, QuickActionContext } from '../../../cpe/quick-actions/quick-action-definition';
11
12
  import { getApplicationType } from '../../../utils/application';
13
+ import { getError } from '../../../utils/error';
12
14
  import { getV4AppComponent } from '../../../utils/fe-v4';
15
+ import { sendInfoCenterMessage } from '../../../utils/info-center-message';
13
16
  import { getUi5Version, isLowerThanMinimalUi5Version } from '../../../utils/version';
14
17
  import type { AnnotationDataSourceResponse } from '../../api-handler';
15
18
  import { getDataSourceAnnotationFileMap } from '../../api-handler';
@@ -50,7 +53,17 @@ export class AddNewAnnotationFile
50
53
  this.isApplicable = false;
51
54
  return;
52
55
  }
53
- this.annotationDataSourceData = await getDataSourceAnnotationFileMap();
56
+ try {
57
+ this.annotationDataSourceData = await getDataSourceAnnotationFileMap();
58
+ } catch (e) {
59
+ const error = getError(e);
60
+ await sendInfoCenterMessage({
61
+ title: { key: 'ADP_GET_ANNOTATION_ERROR_TITLE' },
62
+ description: error.message,
63
+ type: MessageBarType.error
64
+ });
65
+ throw error;
66
+ }
54
67
  const { annotationDataSourceMap } = this.annotationDataSourceData;
55
68
  if (!Object.keys(this.annotationDataSourceData.annotationDataSourceMap).length) {
56
69
  throw new Error('No data sources found in the manifest');
@@ -11,6 +11,7 @@ sap.ui.define([
11
11
  const MessageBarType = ___sap_ux_private_control_property_editor_common['MessageBarType'];
12
12
  const sendInfoCenterMessage = ___utils_info_center_message['sendInfoCenterMessage'];
13
13
  const FetchError = ___utils_error['FetchError'];
14
+ const getError = ___utils_error['getError'];
14
15
  async function getUi5ApiDtMetadata(libName) {
15
16
  const libUrl = '/test-resources/' + libName.split('.').join('/') + '/designtime/api.json';
16
17
  const response = await fetch(libUrl);
@@ -35,6 +36,11 @@ sap.ui.define([
35
36
  });
36
37
  }).catch(reason => {
37
38
  Log.error('Loading Library Failed: ' + reason);
39
+ return sendInfoCenterMessage({
40
+ title: { key: 'LIBRARY_ERROR_TITLE' },
41
+ description: getError(reason).message,
42
+ type: MessageBarType.error
43
+ });
38
44
  });
39
45
  }
40
46
  function formatHtmlText(sHtml) {
@@ -51,6 +51,11 @@ export function loadDefaultLibraries(): void {
51
51
  })
52
52
  .catch((reason) => {
53
53
  Log.error('Loading Library Failed: ' + reason);
54
+ return sendInfoCenterMessage({
55
+ title: { key: 'LIBRARY_ERROR_TITLE' },
56
+ description: getError(reason).message,
57
+ type: MessageBarType.error
58
+ });
54
59
  });
55
60
  }
56
61
 
@@ -2,33 +2,36 @@
2
2
  sap.ui.define([
3
3
  'sap/base/Log',
4
4
  'open/ux/preview/client/thirdparty/@sap-ux-private/control-property-editor-common',
5
- '../utils/error',
5
+ './outline/service',
6
+ './selection',
6
7
  './changes/service',
7
- './communication-service',
8
- './connector-service',
9
- './context-menu-service',
10
8
  './documentation',
11
- './outline/service',
12
- './quick-actions/quick-action-service',
9
+ './ui5-utils',
10
+ './connector-service',
13
11
  './rta-service',
14
- './selection',
15
- './ui5-utils'
16
- ], function (Log, ___sap_ux_private_control_property_editor_common, ___utils_error, ___changes_service, ___communication_service, ___connector_service, ___context_menu_service, ___documentation, ___outline_service, ___quick_actions_quick_action_service, ___rta_service, ___selection, ___ui5_utils) {
12
+ '../utils/error',
13
+ './quick-actions/quick-action-service',
14
+ './communication-service',
15
+ './context-menu-service',
16
+ '../utils/info-center-message'
17
+ ], function (Log, ___sap_ux_private_control_property_editor_common, ___outline_service, ___selection, ___changes_service, ___documentation, ___ui5_utils, ___connector_service, ___rta_service, ___utils_error, ___quick_actions_quick_action_service, ___communication_service, ___context_menu_service, ___utils_info_center_message) {
17
18
  'use strict';
18
- const appLoaded = ___sap_ux_private_control_property_editor_common['appLoaded'];
19
- const enableTelemetry = ___sap_ux_private_control_property_editor_common['enableTelemetry'];
20
19
  const iconsLoaded = ___sap_ux_private_control_property_editor_common['iconsLoaded'];
21
- const getError = ___utils_error['getError'];
22
- const ChangeService = ___changes_service['ChangeService'];
23
- const CommunicationService = ___communication_service['CommunicationService'];
24
- const WorkspaceConnectorService = ___connector_service['WorkspaceConnectorService'];
25
- const ContextMenuService = ___context_menu_service['ContextMenuService'];
26
- const loadDefaultLibraries = ___documentation['loadDefaultLibraries'];
20
+ const enableTelemetry = ___sap_ux_private_control_property_editor_common['enableTelemetry'];
21
+ const appLoaded = ___sap_ux_private_control_property_editor_common['appLoaded'];
22
+ const MessageBarType = ___sap_ux_private_control_property_editor_common['MessageBarType'];
27
23
  const OutlineService = ___outline_service['OutlineService'];
28
- const QuickActionService = ___quick_actions_quick_action_service['QuickActionService'];
29
- const RtaService = ___rta_service['RtaService'];
30
24
  const SelectionService = ___selection['SelectionService'];
25
+ const ChangeService = ___changes_service['ChangeService'];
26
+ const loadDefaultLibraries = ___documentation['loadDefaultLibraries'];
31
27
  const getIcons = ___ui5_utils['getIcons'];
28
+ const WorkspaceConnectorService = ___connector_service['WorkspaceConnectorService'];
29
+ const RtaService = ___rta_service['RtaService'];
30
+ const getError = ___utils_error['getError'];
31
+ const QuickActionService = ___quick_actions_quick_action_service['QuickActionService'];
32
+ const CommunicationService = ___communication_service['CommunicationService'];
33
+ const ContextMenuService = ___context_menu_service['ContextMenuService'];
34
+ const sendInfoCenterMessage = ___utils_info_center_message['sendInfoCenterMessage'];
32
35
  function init(rta) {
33
36
  let registries = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
34
37
  Log.info('Initializing Control Property Editor');
@@ -59,16 +62,35 @@ sap.ui.define([
59
62
  loadDefaultLibraries();
60
63
  const allPromises = services.map(service => {
61
64
  return service.init(CommunicationService.sendAction, subscribe)?.catch(error => {
62
- Log.error('Service Initialization Failed: ', getError(error));
65
+ const extendedError = getError(error);
66
+ Log.error('Service Initialization Failed: ', extendedError);
67
+ return sendInfoCenterMessage({
68
+ title: { key: 'INIT_ERROR_TITLE' },
69
+ description: extendedError.message,
70
+ type: MessageBarType.error
71
+ });
63
72
  });
64
73
  });
65
74
  Promise.all(allPromises).then(() => {
66
75
  CommunicationService.sendAction(appLoaded());
67
- }).catch(Log.error);
76
+ }).catch(error => {
77
+ Log.error(error);
78
+ return sendInfoCenterMessage({
79
+ title: { key: 'INIT_ERROR_TITLE' },
80
+ description: getError(error).message,
81
+ type: MessageBarType.error
82
+ });
83
+ });
68
84
  const icons = getIcons();
69
85
  CommunicationService.sendAction(iconsLoaded(icons));
70
86
  } catch (error) {
71
- Log.error('Error during initialization of Control Property Editor', getError(error));
87
+ const extendedError = getError(error);
88
+ Log.error('Error during initialization of Control Property Editor', extendedError);
89
+ void sendInfoCenterMessage({
90
+ title: { key: 'INIT_ERROR_TITLE' },
91
+ description: extendedError.message,
92
+ type: MessageBarType.error
93
+ });
72
94
  }
73
95
  return Promise.resolve();
74
96
  }
@@ -2,24 +2,26 @@ import Log from 'sap/base/Log';
2
2
  import type RuntimeAuthoring from 'sap/ui/rta/RuntimeAuthoring';
3
3
 
4
4
  import {
5
- appLoaded,
5
+ iconsLoaded,
6
6
  enableTelemetry,
7
- iconsLoaded
7
+ appLoaded,
8
+ MessageBarType
8
9
  } from '@sap-ux-private/control-property-editor-common';
9
10
 
10
- import { getError } from '../utils/error';
11
+ import type { ActionHandler, Service } from './types';
12
+ import { OutlineService } from './outline/service';
13
+ import { SelectionService } from './selection';
11
14
  import { ChangeService } from './changes/service';
12
- import { CommunicationService } from './communication-service';
13
- import { WorkspaceConnectorService } from './connector-service';
14
- import { ContextMenuService } from './context-menu-service';
15
15
  import { loadDefaultLibraries } from './documentation';
16
- import { OutlineService } from './outline/service';
16
+ import { getIcons } from './ui5-utils';
17
+ import { WorkspaceConnectorService } from './connector-service';
18
+ import { RtaService } from './rta-service';
19
+ import { getError } from '../utils/error';
17
20
  import { QuickActionService } from './quick-actions/quick-action-service';
18
21
  import type { QuickActionDefinitionRegistry } from './quick-actions/registry';
19
- import { RtaService } from './rta-service';
20
- import { SelectionService } from './selection';
21
- import type { ActionHandler, Service } from './types';
22
- import { getIcons } from './ui5-utils';
22
+ import { CommunicationService } from './communication-service';
23
+ import { ContextMenuService } from './context-menu-service';
24
+ import { sendInfoCenterMessage } from '../utils/info-center-message';
23
25
 
24
26
  export default function init(
25
27
  rta: RuntimeAuthoring,
@@ -63,7 +65,13 @@ export default function init(
63
65
  loadDefaultLibraries();
64
66
  const allPromises = services.map((service) => {
65
67
  return service.init(CommunicationService.sendAction, subscribe)?.catch((error) => {
66
- Log.error('Service Initialization Failed: ', getError(error));
68
+ const extendedError = getError(error);
69
+ Log.error('Service Initialization Failed: ', extendedError);
70
+ return sendInfoCenterMessage({
71
+ title: { key: 'INIT_ERROR_TITLE' },
72
+ description: extendedError.message,
73
+ type: MessageBarType.error
74
+ });
67
75
  });
68
76
  });
69
77
  Promise.all(allPromises)
@@ -71,11 +79,24 @@ export default function init(
71
79
  CommunicationService.sendAction(appLoaded());
72
80
  })
73
81
  // eslint-disable-next-line @typescript-eslint/unbound-method
74
- .catch(Log.error);
82
+ .catch((error) => {
83
+ Log.error(error);
84
+ return sendInfoCenterMessage({
85
+ title: { key: 'INIT_ERROR_TITLE' },
86
+ description: getError(error).message,
87
+ type: MessageBarType.error
88
+ });
89
+ });
75
90
  const icons = getIcons();
76
91
  CommunicationService.sendAction(iconsLoaded(icons));
77
92
  } catch (error) {
78
- Log.error('Error during initialization of Control Property Editor', getError(error));
93
+ const extendedError = getError(error);
94
+ Log.error('Error during initialization of Control Property Editor', extendedError);
95
+ void sendInfoCenterMessage({
96
+ title: { key: 'INIT_ERROR_TITLE' },
97
+ description: extendedError.message,
98
+ type: MessageBarType.error
99
+ });
79
100
  }
80
101
 
81
102
  // * This is returned immediately to avoid promise deadlock, preventing services from waiting indefinitely.
@@ -3,12 +3,15 @@ sap.ui.define([
3
3
  'sap/base/Log',
4
4
  'open/ux/preview/client/thirdparty/@sap-ux-private/control-property-editor-common',
5
5
  '../../utils/error',
6
- './nodes'
7
- ], function (Log, ___sap_ux_private_control_property_editor_common, ____utils_error, ___nodes) {
6
+ './nodes',
7
+ '../../utils/info-center-message'
8
+ ], function (Log, ___sap_ux_private_control_property_editor_common, ____utils_error, ___nodes, ____utils_info_center_message) {
8
9
  'use strict';
10
+ const MessageBarType = ___sap_ux_private_control_property_editor_common['MessageBarType'];
9
11
  const outlineChanged = ___sap_ux_private_control_property_editor_common['outlineChanged'];
10
12
  const getError = ____utils_error['getError'];
11
13
  const transformNodes = ___nodes['transformNodes'];
14
+ const sendInfoCenterMessage = ____utils_info_center_message['sendInfoCenterMessage'];
12
15
  const OUTLINE_CHANGE_EVENT = 'OUTLINE_CHANGED';
13
16
  class OutlineService extends EventTarget {
14
17
  constructor(rta, changeService) {
@@ -30,7 +33,13 @@ sap.ui.define([
30
33
  sendAction(outlineChanged(outlineNodes));
31
34
  await this.changeService.updateConfigurationProps(configPropertyIdMap);
32
35
  } catch (error) {
33
- Log.error('Outline sync failed!', getError(error));
36
+ const extendError = getError(error);
37
+ Log.error('Outline sync failed!', extendError);
38
+ await sendInfoCenterMessage({
39
+ title: { key: 'OUTLINE_ERROR_TITLE' },
40
+ description: extendError.message,
41
+ type: MessageBarType.error
42
+ });
34
43
  }
35
44
  };
36
45
  await syncOutline();
@@ -3,12 +3,13 @@ import type RuntimeAuthoring from 'sap/ui/rta/RuntimeAuthoring';
3
3
  import type RTAOutlineService from 'sap/ui/rta/command/OutlineService';
4
4
 
5
5
  import type { ExternalAction } from '@sap-ux-private/control-property-editor-common';
6
- import { outlineChanged } from '@sap-ux-private/control-property-editor-common';
6
+ import { MessageBarType, outlineChanged } from '@sap-ux-private/control-property-editor-common';
7
7
 
8
8
  import { getError } from '../../utils/error';
9
- import { ChangeService } from '../changes';
10
9
  import { ControlTreeIndex } from '../types';
11
10
  import { transformNodes } from './nodes';
11
+ import { ChangeService } from '../changes';
12
+ import { sendInfoCenterMessage } from '../../utils/info-center-message';
12
13
 
13
14
  export const OUTLINE_CHANGE_EVENT = 'OUTLINE_CHANGED';
14
15
 
@@ -53,7 +54,13 @@ export class OutlineService extends EventTarget {
53
54
  sendAction(outlineChanged(outlineNodes));
54
55
  await this.changeService.updateConfigurationProps(configPropertyIdMap);
55
56
  } catch (error) {
56
- Log.error('Outline sync failed!', getError(error));
57
+ const extendError = getError(error);
58
+ Log.error('Outline sync failed!', extendError);
59
+ await sendInfoCenterMessage({
60
+ title: { key: 'OUTLINE_ERROR_TITLE' },
61
+ description: extendError.message,
62
+ type: MessageBarType.error
63
+ });
57
64
  }
58
65
  };
59
66
  await syncOutline();
@@ -4,26 +4,29 @@ sap.ui.define([
4
4
  './control-data',
5
5
  './utils',
6
6
  'sap/base/Log',
7
+ './documentation',
7
8
  'sap/ui/dt/OverlayRegistry',
8
9
  'sap/ui/dt/OverlayUtil',
9
10
  '../utils/core',
10
11
  '../utils/error',
11
- './documentation'
12
- ], function (___sap_ux_private_control_property_editor_common, ___control_data, ___utils, Log, OverlayRegistry, OverlayUtil, ___utils_core, ___utils_error, ___documentation) {
12
+ '../utils/info-center-message'
13
+ ], function (___sap_ux_private_control_property_editor_common, ___control_data, ___utils, Log, ___documentation, OverlayRegistry, OverlayUtil, ___utils_core, ___utils_error, ___utils_info_center_message) {
13
14
  'use strict';
14
- const changeProperty = ___sap_ux_private_control_property_editor_common['changeProperty'];
15
15
  const controlSelected = ___sap_ux_private_control_property_editor_common['controlSelected'];
16
16
  const propertyChanged = ___sap_ux_private_control_property_editor_common['propertyChanged'];
17
- const PropertyType = ___sap_ux_private_control_property_editor_common['PropertyType'];
18
- const reportTelemetry = ___sap_ux_private_control_property_editor_common['reportTelemetry'];
19
17
  const selectControl = ___sap_ux_private_control_property_editor_common['selectControl'];
18
+ const reportTelemetry = ___sap_ux_private_control_property_editor_common['reportTelemetry'];
19
+ const changeProperty = ___sap_ux_private_control_property_editor_common['changeProperty'];
20
+ const PropertyType = ___sap_ux_private_control_property_editor_common['PropertyType'];
21
+ const MessageBarType = ___sap_ux_private_control_property_editor_common['MessageBarType'];
20
22
  const buildControlData = ___control_data['buildControlData'];
21
23
  const getOverlay = ___utils['getOverlay'];
22
24
  const getRuntimeControl = ___utils['getRuntimeControl'];
25
+ const getDocumentation = ___documentation['getDocumentation'];
23
26
  const getComponent = ___utils_core['getComponent'];
24
27
  const getControlById = ___utils_core['getControlById'];
25
28
  const getError = ___utils_error['getError'];
26
- const getDocumentation = ___documentation['getDocumentation'];
29
+ const sendInfoCenterMessage = ___utils_info_center_message['sendInfoCenterMessage'];
27
30
  function propertyChangeId(controlId, propertyName) {
28
31
  return [
29
32
  controlId,
@@ -67,7 +70,15 @@ sap.ui.define([
67
70
  const eventOrigin = new Set();
68
71
  const onselectionChange = this.createOnSelectionChangeHandler(sendAction, eventOrigin);
69
72
  this.rta.attachSelectionChange(event => {
70
- onselectionChange(event).catch(error => Log.error('Event interrupted: ', getError(error)));
73
+ onselectionChange(event).catch(error => {
74
+ const extendedError = getError(error);
75
+ Log.error('Event interrupted: ', extendedError);
76
+ return sendInfoCenterMessage({
77
+ title: { key: 'CHANGE_SELECTION_ERROR_TITLE' },
78
+ description: extendedError.message,
79
+ type: MessageBarType.error
80
+ });
81
+ });
71
82
  });
72
83
  subscribe(async action => {
73
84
  if (changeProperty.match(action)) {
@@ -1,29 +1,31 @@
1
1
  import type { Control, ExternalAction } from '@sap-ux-private/control-property-editor-common';
2
2
  import {
3
- changeProperty,
4
3
  controlSelected,
5
- Properties,
6
4
  propertyChanged,
7
- PropertyType,
5
+ selectControl,
8
6
  reportTelemetry,
9
- selectControl
7
+ Properties,
8
+ changeProperty,
9
+ PropertyType,
10
+ MessageBarType
10
11
  } from '@sap-ux-private/control-property-editor-common';
11
12
  import { buildControlData } from './control-data';
12
- import type { ActionSenderFunction, Service, SubscribeFunction } from './types';
13
13
  import { getOverlay, getRuntimeControl, ManagedObjectMetadataProperties, PropertiesInfo } from './utils';
14
+ import type { ActionSenderFunction, Service, SubscribeFunction } from './types';
14
15
 
15
- import Log from 'sap/base/Log';
16
16
  import type Event from 'sap/ui/base/Event';
17
- import type ManagedObject from 'sap/ui/base/ManagedObject';
18
17
  import type ElementOverlay from 'sap/ui/dt/ElementOverlay';
18
+ import type ManagedObject from 'sap/ui/base/ManagedObject';
19
+ import type { SelectionChangeEvent } from 'sap/ui/rta/RuntimeAuthoring';
20
+ import type RuntimeAuthoring from 'sap/ui/rta/RuntimeAuthoring';
21
+ import Log from 'sap/base/Log';
22
+ import { getDocumentation } from './documentation';
19
23
  import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
20
24
  import OverlayUtil from 'sap/ui/dt/OverlayUtil';
21
- import type RuntimeAuthoring from 'sap/ui/rta/RuntimeAuthoring';
22
- import type { SelectionChangeEvent } from 'sap/ui/rta/RuntimeAuthoring';
23
25
  import { getComponent, getControlById } from '../utils/core';
24
26
  import { getError } from '../utils/error';
25
27
  import { ChangeService } from './changes';
26
- import { getDocumentation } from './documentation';
28
+ import { sendInfoCenterMessage } from '../utils/info-center-message';
27
29
 
28
30
  export interface PropertyChangeParams {
29
31
  name: string;
@@ -112,7 +114,15 @@ export class SelectionService implements Service {
112
114
  const eventOrigin: Set<string> = new Set();
113
115
  const onselectionChange = this.createOnSelectionChangeHandler(sendAction, eventOrigin);
114
116
  this.rta.attachSelectionChange((event) => {
115
- onselectionChange(event).catch((error) => Log.error('Event interrupted: ', getError(error)));
117
+ onselectionChange(event).catch((error) => {
118
+ const extendedError = getError(error);
119
+ Log.error('Event interrupted: ', extendedError);
120
+ return sendInfoCenterMessage({
121
+ title: { key: 'CHANGE_SELECTION_ERROR_TITLE' },
122
+ description: extendedError.message,
123
+ type: MessageBarType.error
124
+ });
125
+ });
116
126
  });
117
127
  subscribe(async (action: ExternalAction): Promise<void> => {
118
128
  if (changeProperty.match(action)) {
@@ -142,6 +142,11 @@ sap.ui.define([
142
142
  registerModules(await response.json());
143
143
  } catch (error) {
144
144
  Log.error(`Registering of reuse libs failed. Error:${ error }`);
145
+ await sendInfoCenterMessage({
146
+ title: { key: 'FLP_REGISTER_LIBS_FAILED_TITLE' },
147
+ description: getError(error).message,
148
+ type: MessageBarType.error
149
+ });
145
150
  }
146
151
  }
147
152
  }
@@ -254,6 +259,11 @@ sap.ui.define([
254
259
  });
255
260
  } else {
256
261
  Log.warning('Card generator is not supported for the current UI5 version.');
262
+ await sendInfoCenterMessage({
263
+ title: { key: 'FLP_CARD_GENERATOR_NOT_SUPPORTED_TITLE' },
264
+ description: { key: 'FLP_CARD_GENERATOR_NOT_SUPPORTED_DESCRIPTION' },
265
+ type: MessageBarType.warning
266
+ });
257
267
  }
258
268
  if (urlParams.get('fiori-tools-iapp-state')?.toLocaleLowerCase() !== 'true') {
259
269
  await resetAppState(container);
@@ -285,6 +295,11 @@ sap.ui.define([
285
295
  }).catch(e => {
286
296
  const error = getError(e);
287
297
  Log.error('Sandbox initialization failed: ' + error.message);
298
+ return sendInfoCenterMessage({
299
+ title: { key: 'FLP_SANDBOX_INIT_FAILED_TITLE' },
300
+ description: error.message,
301
+ type: MessageBarType.error
302
+ });
288
303
  });
289
304
  }
290
305
  async function handleHigherLayerChanges(error, ui5VersionInfo) {
@@ -196,6 +196,11 @@ export async function registerComponentDependencyPaths(appUrls: string[], urlPar
196
196
  registerModules((await response.json()) as AppIndexData);
197
197
  } catch (error) {
198
198
  Log.error(`Registering of reuse libs failed. Error:${error}`);
199
+ await sendInfoCenterMessage({
200
+ title: { key: 'FLP_REGISTER_LIBS_FAILED_TITLE' },
201
+ description: getError(error).message,
202
+ type: MessageBarType.error
203
+ });
199
204
  }
200
205
  }
201
206
  }
@@ -372,6 +377,11 @@ export async function init({
372
377
  });
373
378
  } else {
374
379
  Log.warning('Card generator is not supported for the current UI5 version.');
380
+ await sendInfoCenterMessage({
381
+ title: { key: 'FLP_CARD_GENERATOR_NOT_SUPPORTED_TITLE' },
382
+ description: { key: 'FLP_CARD_GENERATOR_NOT_SUPPORTED_DESCRIPTION' },
383
+ type: MessageBarType.warning
384
+ });
375
385
  }
376
386
 
377
387
  // reset app state if requested
@@ -420,6 +430,11 @@ if (bootstrapConfig) {
420
430
  }).catch((e) => {
421
431
  const error = getError(e);
422
432
  Log.error('Sandbox initialization failed: ' + error.message);
433
+ return sendInfoCenterMessage({
434
+ title: { key: 'FLP_SANDBOX_INIT_FAILED_TITLE' },
435
+ description: error.message,
436
+ type: MessageBarType.error
437
+ });
423
438
  });
424
439
  }
425
440
 
@@ -63,19 +63,28 @@ ADP_ADD_FRAGMENT_FAILURE_TITLE = Add Fragment Failed
63
63
  ADP_GET_FRAGMENTS_FAILURE_TITLE = Get Fragments Failed
64
64
  ADP_CONTROLLER_ERROR_TITLE = Controller Error
65
65
  ADP_EXTENSION_POINT_ERROR_TITLE = Extension Point Error
66
+ ADP_GET_ANNOTATION_ERROR_TITLE = Get Annotation Error
66
67
  ADP_CREATE_CONTROLLER_EXTENSION_TITLE = Create Controller Extension
67
68
  ADP_CREATE_CONTROLLER_EXTENSION_DESCRIPTION = Controller extension with name ''{0}'' was created.
68
69
  CHANGES_VISIBLE_AFTER_SAVE_AND_RELOAD_TITLE = Save and Reload Required
69
70
  CHANGES_VISIBLE_AFTER_SAVE_AND_RELOAD_DESCRIPTION = Note: The change will be visible after save and reload.
70
71
  CHANGE_CREATION_FAILED_TITLE = Change Creation Failed
72
+ OUTLINE_ERROR_TITLE = Outline Update Failed
71
73
  DOCUMENTATION_ERROR_TITLE = Documentation Error
72
74
  DOCUMENTATION_ERROR_DESCRIPTION = An error occurred in getting documentation for {0}. Check the control exists and try again.
75
+ LIBRARY_ERROR_TITLE = Library Error
76
+ INIT_ERROR_TITLE = Control Property Editor Initialization Failed
77
+ CHANGE_SELECTION_ERROR_TITLE = Change Selection Error
78
+ FLP_REGISTER_LIBS_FAILED_TITLE = Registering of Reuse Libraries Failed
73
79
  FLP_ADAPTATION_START_FAILED_TITLE = Adaptation Initialization Failed
80
+ FLP_SANDBOX_INIT_FAILED_TITLE = Sandbox Initialization Failed
74
81
  FLP_UI_VERSION_RETRIEVAL_FAILURE_TITLE = SAPUI5 Version Retrieval Failed
75
82
  FLP_UI_INVALID_UI5_VERSION_DESCRIPTION = Invalid version info
76
83
  FLP_UI_VERSION_RETRIEVAL_FAILURE_DESCRIPTION = Could not get the SAPUI5 version of the application. Using {0} as fallback.
77
84
  FLP_UI5_VERSION_WARNING_TITLE = SAPUI5 Version Warning
78
85
  FLP_UI5_VERSION_WARNING_DESCRIPTION = The current SAPUI5 version set for this adaptation project is {0}. The minimum version for SAPUI5 Adaptation Project and its SAPUI5 Adaptation Editor is {1}. Install version {1} or higher.
86
+ FLP_CARD_GENERATOR_NOT_SUPPORTED_TITLE = Card Generator Not Supported
87
+ FLP_CARD_GENERATOR_NOT_SUPPORTED_DESCRIPTION = The card generator is not supported by the SAPUI5 version you have installed. Install a supported version.
79
88
 
80
89
  TABLE_ROWS_NEEDED_TO_CREATE_CUSTOM_COLUMN=At least one table row is required to create a new custom column. Make sure the table data is loaded and try again.
81
90
 
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "bugs": {
10
10
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Apreview-middleware"
11
11
  },
12
- "version": "0.22.0",
12
+ "version": "0.22.1",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -25,7 +25,7 @@
25
25
  "ejs": "3.1.10",
26
26
  "mem-fs": "2.1.0",
27
27
  "mem-fs-editor": "9.4.0",
28
- "@sap-ux/adp-tooling": "0.15.18",
28
+ "@sap-ux/adp-tooling": "0.15.19",
29
29
  "@sap-ux/btp-utils": "1.1.0",
30
30
  "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.7.0",
31
31
  "@sap-ux/logger": "0.7.0",
@@ -52,8 +52,8 @@
52
52
  "supertest": "7.1.4",
53
53
  "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.16.0",
54
54
  "@sap-ux/axios-extension": "1.22.5",
55
- "@sap-ux/ui5-info": "0.12.1",
56
- "@sap-ux/store": "1.1.2"
55
+ "@sap-ux/store": "1.1.2",
56
+ "@sap-ux/ui5-info": "0.12.1"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "express": "4"