@sap-ux/preview-middleware 0.10.0 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,6 +33,10 @@ sap.ui.define(["sap/ui/core/library", "sap/ui/core/mvc/Controller"], function (s
33
33
  updateDialogState(ValueState.Error, 'The fragment name cannot contain white spaces or special characters.');
34
34
  return;
35
35
  }
36
+ if (fragmentName.length > 64) {
37
+ updateDialogState(ValueState.Error, 'A fragment file name cannot contain more than 64 characters.');
38
+ return;
39
+ }
36
40
  updateDialogState(ValueState.Success);
37
41
  this.model.setProperty('/newFragmentName', fragmentName);
38
42
  },
@@ -83,6 +83,11 @@ export default abstract class BaseDialog extends Controller {
83
83
  return;
84
84
  }
85
85
 
86
+ if(fragmentName.length > 64) {
87
+ updateDialogState(ValueState.Error, 'A fragment file name cannot contain more than 64 characters.');
88
+ return;
89
+ }
90
+
86
91
  updateDialogState(ValueState.Success);
87
92
  this.model.setProperty('/newFragmentName', fragmentName);
88
93
  }
@@ -56,6 +56,10 @@ sap.ui.define(["sap/m/MessageToast", "sap/ui/core/library", "sap/ui/model/json/J
56
56
  updateDialogState(ValueState.Error, 'The controller name cannot contain white spaces or special characters.');
57
57
  return;
58
58
  }
59
+ if (controllerName.length > 64) {
60
+ updateDialogState(ValueState.Error, 'A controller file name cannot contain more than 64 characters.');
61
+ return;
62
+ }
59
63
  updateDialogState(ValueState.Success);
60
64
  this.model.setProperty('/newControllerName', controllerName);
61
65
  },
@@ -100,10 +100,19 @@ export default class ControllerExtension extends BaseDialog {
100
100
  return;
101
101
  }
102
102
 
103
+ if(controllerName.length > 64) {
104
+ updateDialogState(
105
+ ValueState.Error,
106
+ 'A controller file name cannot contain more than 64 characters.'
107
+ );
108
+ return;
109
+ }
110
+
103
111
  updateDialogState(ValueState.Success);
104
112
  this.model.setProperty('/newControllerName', controllerName);
105
113
  }
106
114
 
115
+
107
116
  /**
108
117
  * Handles create button press
109
118
  *
@@ -13,6 +13,7 @@ sap.ui.define([
13
13
  const startPostMessageCommunication = ___sap_ux_private_control_property_editor_common['startPostMessageCommunication'];
14
14
  const iconsLoaded = ___sap_ux_private_control_property_editor_common['iconsLoaded'];
15
15
  const enableTelemetry = ___sap_ux_private_control_property_editor_common['enableTelemetry'];
16
+ const scenarioLoaded = ___sap_ux_private_control_property_editor_common['scenarioLoaded'];
16
17
  const initOutline = ___outline_index['initOutline'];
17
18
  const SelectionService = ___selection['SelectionService'];
18
19
  const ChangeService = ___changes_service['ChangeService'];
@@ -46,6 +47,7 @@ sap.ui.define([
46
47
  }
47
48
  }
48
49
  }, logger);
50
+ sendAction(scenarioLoaded(flexSettings.scenario));
49
51
  for (const service of services) {
50
52
  service.init(sendAction, subscribe);
51
53
  }
@@ -2,7 +2,8 @@ import type { ExternalAction } from '@sap-ux-private/control-property-editor-com
2
2
  import {
3
3
  startPostMessageCommunication,
4
4
  iconsLoaded,
5
- enableTelemetry
5
+ enableTelemetry,
6
+ scenarioLoaded
6
7
  } from '@sap-ux-private/control-property-editor-common';
7
8
  import type RuntimeAuthoring from 'sap/ui/rta/RuntimeAuthoring';
8
9
 
@@ -53,6 +54,8 @@ export default function init(rta: RuntimeAuthoring): Promise<void> {
53
54
  logger
54
55
  );
55
56
 
57
+ sendAction(scenarioLoaded(flexSettings.scenario));
58
+
56
59
  for (const service of services) {
57
60
  service.init(sendAction, subscribe);
58
61
  }
@@ -8,7 +8,7 @@ sap.ui.define((function () { 'use strict';
8
8
 
9
9
  (function (exports) {
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.changeStackModified = exports.propertyChangeFailed = exports.propertyChanged = exports.changeProperty = exports.outlineChanged = exports.deletePropertyChanges = exports.addExtensionPoint = exports.selectControl = exports.controlSelected = exports.iconsLoaded = exports.EXTERNAL_ACTION_PREFIX = exports.CHECKBOX_EDITOR_TYPE = exports.DROPDOWN_EDITOR_TYPE = exports.INPUT_EDITOR_TYPE = exports.STRING_VALUE_TYPE = exports.FLOAT_VALUE_TYPE = exports.INTEGER_VALUE_TYPE = exports.BOOLEAN_VALUE_TYPE = void 0;
11
+ exports.changeStackModified = exports.propertyChangeFailed = exports.propertyChanged = exports.changeProperty = exports.outlineChanged = exports.deletePropertyChanges = exports.addExtensionPoint = exports.selectControl = exports.controlSelected = exports.scenarioLoaded = exports.iconsLoaded = exports.EXTERNAL_ACTION_PREFIX = exports.scenario = exports.CHECKBOX_EDITOR_TYPE = exports.DROPDOWN_EDITOR_TYPE = exports.INPUT_EDITOR_TYPE = exports.STRING_VALUE_TYPE = exports.FLOAT_VALUE_TYPE = exports.INTEGER_VALUE_TYPE = exports.BOOLEAN_VALUE_TYPE = void 0;
12
12
  exports.BOOLEAN_VALUE_TYPE = 'boolean';
13
13
  exports.INTEGER_VALUE_TYPE = 'integer';
14
14
  exports.FLOAT_VALUE_TYPE = 'float';
@@ -16,6 +16,13 @@ sap.ui.define((function () { 'use strict';
16
16
  exports.INPUT_EDITOR_TYPE = 'input';
17
17
  exports.DROPDOWN_EDITOR_TYPE = 'dropdown';
18
18
  exports.CHECKBOX_EDITOR_TYPE = 'checkbox';
19
+ exports.scenario = {
20
+ AppVariant: 'APP_VARIANT',
21
+ VersionedAppVariant: 'VERSIONED_APP_VARIANT',
22
+ AdaptationProject: 'ADAPTATION_PROJECT',
23
+ FioriElementsFromScratch: 'FE_FROM_SCRATCH',
24
+ UiAdaptation: 'UI_ADAPTATION'
25
+ };
19
26
  /**
20
27
  * Create matcher.
21
28
  *
@@ -55,6 +62,7 @@ sap.ui.define((function () { 'use strict';
55
62
  exports.EXTERNAL_ACTION_PREFIX = '[ext]';
56
63
  const createExternalAction = createActionFactory(exports.EXTERNAL_ACTION_PREFIX);
57
64
  exports.iconsLoaded = createExternalAction('icons-loaded');
65
+ exports.scenarioLoaded = createExternalAction('scenario-loaded');
58
66
  exports.controlSelected = createExternalAction('control-selected');
59
67
  exports.selectControl = createExternalAction('select-control');
60
68
  exports.addExtensionPoint = createExternalAction('add-extension-point');
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.10.0",
12
+ "version": "0.10.2",
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.9",
26
26
  "@sap-ux/logger": "0.4.0",
27
27
  "@sap-ux/adp-tooling": "0.5.3",
28
- "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.4.0"
28
+ "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.4.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/ejs": "3.1.2",
@@ -36,8 +36,8 @@
36
36
  "npm-run-all": "4.1.5",
37
37
  "nock": "13.2.1",
38
38
  "supertest": "6.3.3",
39
- "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.7.0",
40
- "@sap-ux/project-access": "1.14.0",
39
+ "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.7.2",
40
+ "@sap-ux/project-access": "1.15.0",
41
41
  "@sap-ux/store": "0.4.0"
42
42
  },
43
43
  "peerDependencies": {