@sap-ux/preview-middleware 0.11.35 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/base/flp.d.ts +8 -2
  2. package/dist/base/flp.js +28 -19
  3. package/dist/client/adp/api-handler.js +141 -141
  4. package/dist/client/adp/command-executor.js +54 -41
  5. package/dist/client/adp/command-executor.ts +18 -4
  6. package/dist/client/adp/control-utils.js +44 -44
  7. package/dist/client/adp/controllers/AddFragment.controller.js +206 -203
  8. package/dist/client/adp/controllers/AddFragment.controller.ts +11 -5
  9. package/dist/client/adp/controllers/BaseDialog.controller.js +57 -57
  10. package/dist/client/adp/controllers/BaseDialog.controller.ts +8 -2
  11. package/dist/client/adp/controllers/ControllerExtension.controller.js +174 -173
  12. package/dist/client/adp/controllers/ControllerExtension.controller.ts +10 -6
  13. package/dist/client/adp/controllers/ExtensionPoint.controller.js +100 -100
  14. package/dist/client/adp/controllers/ExtensionPoint.controller.ts +8 -6
  15. package/dist/client/adp/init-dialogs.js +74 -73
  16. package/dist/client/adp/init-dialogs.ts +13 -8
  17. package/dist/client/adp/init.js +23 -7
  18. package/dist/client/adp/init.ts +14 -6
  19. package/dist/client/adp/ui/AddFragment.fragment.xml +69 -0
  20. package/dist/client/adp/ui/ControllerExtension.fragment.xml +51 -0
  21. package/dist/client/adp/ui/ExtensionPoint.fragment.xml +51 -0
  22. package/dist/client/adp/ui5-version-utils.js +63 -63
  23. package/dist/client/adp/utils.js +33 -33
  24. package/dist/client/cpe/changes/flex-change.js +51 -51
  25. package/dist/client/cpe/changes/index.js +10 -10
  26. package/dist/client/cpe/changes/validator.js +35 -35
  27. package/dist/client/cpe/documentation.js +164 -164
  28. package/dist/client/cpe/logger.js +30 -30
  29. package/dist/client/cpe/outline/nodes.js +84 -84
  30. package/dist/client/cpe/outline/utils.js +37 -37
  31. package/dist/client/cpe/types.js +4 -4
  32. package/dist/client/cpe/ui5-utils.js +49 -49
  33. package/dist/client/cpe/utils.js +48 -48
  34. package/dist/client/flp/WorkspaceConnector.js +69 -77
  35. package/dist/client/flp/WorkspaceConnector.ts +5 -25
  36. package/dist/client/flp/common.js +30 -0
  37. package/dist/client/flp/common.ts +26 -0
  38. package/dist/client/flp/enableFakeConnector.js +79 -0
  39. package/dist/client/flp/enableFakeConnector.ts +93 -0
  40. package/dist/client/flp/init.js +212 -204
  41. package/dist/client/flp/init.ts +27 -11
  42. package/dist/client/flp/initConnectors.js +35 -0
  43. package/dist/client/flp/initConnectors.ts +30 -0
  44. package/dist/client/flp/initRta.js +180 -0
  45. package/dist/client/flp/initRta.ts +193 -0
  46. package/package.json +4 -3
  47. package/templates/flp/sandbox.html +7 -1
  48. package/dist/client/adp/ui/AddFragment.view.xml +0 -68
  49. package/dist/client/adp/ui/ControllerExtension.view.xml +0 -49
  50. package/dist/client/adp/ui/ExtensionPoint.view.xml +0 -49
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/base/util/merge", "sap/ui/core/Control", "sap/ui/core/UIComponent", "sap/ui/fl/Utils", "sap/ui/fl/write/api/FeaturesAPI", "sap/ui/rta/RuntimeAuthoring"], function (merge, Control, UIComponent, Utils, FeaturesAPI, RuntimeAuthoring) {
4
+ "use strict";
5
+
6
+ const defaultOptions = {
7
+ flexSettings: {
8
+ developerMode: false,
9
+ layer: 'CUSTOMER'
10
+ }
11
+ };
12
+ const layers = {
13
+ BASE: 'BASE',
14
+ CUSTOMER: 'CUSTOMER',
15
+ CUSTOMER_BASE: 'CUSTOMER_BASE',
16
+ PARTNER: 'PARTNER',
17
+ PUBLIC: 'PUBLIC',
18
+ USER: 'USER',
19
+ VENDOR: 'VENDOR'
20
+ };
21
+
22
+ /**
23
+ * Checks if the given layer is a valid layer.
24
+ *
25
+ * @param {string} layer - The layer name to be validated.
26
+ * @returns {boolean} Returns true if the layer is valid, otherwise false.
27
+ */
28
+ function isValidLayer(layer) {
29
+ return Object.keys(layers).some(existingLayer => existingLayer === layer);
30
+ }
31
+
32
+ /**
33
+ * Validates a given layer and throws an error if it is invalid.
34
+ *
35
+ * @param {string} layer - The layer name to be checked.
36
+ * @throws {Error} Throws an error if the layer is not valid.
37
+ */
38
+ function checkLayer(layer) {
39
+ if (!isValidLayer(layer)) {
40
+ throw new Error('An invalid layer is passed');
41
+ }
42
+ }
43
+
44
+ /**
45
+ * Checks if the given root control is an instance of Control or UIComponent.
46
+ *
47
+ * @param {Control | UIComponent} rootControl - The root control to be checked.
48
+ * @throws {Error} Throws an error if the root control is not an instance of Control or UIComponent.
49
+ */
50
+ function checkRootControl(rootControl) {
51
+ if (!(rootControl instanceof Control) && !(rootControl instanceof UIComponent)) {
52
+ throw new Error('An invalid root control was passed');
53
+ }
54
+ }
55
+
56
+ /**
57
+ * Checks if key user adaptation is enabled for the specified component.
58
+ * Fiori tools mode is considered a developer scenario where the `flexEnabled` flag should not be evaluated.
59
+ *
60
+ * @param {Control} component - The UI5 control component to check for flex (key user adaptation) enabled status.
61
+ * @throws {Error} Throws an error if key user adaptation is explicitly disabled in the component's manifest.
62
+ */
63
+ function checkFlexEnabled(component) {
64
+ // fiori tools is always a developer scenario where the flexEnabled flag should not be evaluated
65
+ const fioriToolsMode = new URLSearchParams(window.location.search).get('fiori-tools-rta-mode');
66
+ if (!fioriToolsMode || fioriToolsMode === 'false') {
67
+ const manifest = component.getManifest() || {};
68
+ const flexEnabled = manifest['sap.ui5']?.flexEnabled;
69
+ if (flexEnabled === false) {
70
+ throw new Error('This app is not enabled for key user adaptation');
71
+ }
72
+ }
73
+ }
74
+
75
+ /**
76
+ * Checks if the current user is a key user for the given layer.
77
+ * Specifically, it checks for key user rights if the layer is the CUSTOMER layer.
78
+ * If the user is not a key user and the layer is CUSTOMER, an error is thrown.
79
+ *
80
+ * Note: The function assumes the presence of 'layers.CUSTOMER'. In case of non-CUSTOMER layers,
81
+ * it simply resolves the promise without any additional checks.
82
+ *
83
+ * @param {string} layer - The layer for which to check key user rights.
84
+ * @returns {Promise<void>} A promise that resolves if the user is a key user or the layer is not CUSTOMER.
85
+ * Rejects with an error if the user is not a key user for the CUSTOMER layer.
86
+ * @throws {Error} Throws an error with the message 'No key user rights found' if the user lacks key user rights.
87
+ */
88
+ async function checkKeyUser(layer) {
89
+ if (layers.CUSTOMER === layer) {
90
+ const isKeyUser = await FeaturesAPI.isKeyUser();
91
+ if (!isKeyUser) {
92
+ throw new Error('No key user rights found');
93
+ }
94
+ }
95
+ }
96
+
97
+ /**
98
+ * Checks the validity of the specified layer and root control.
99
+ * It ensures that the layer is valid and the root control is an instance of Control or UIComponent.
100
+ * Additionally, it checks key user permissions for the specified layer.
101
+ *
102
+ * @param {Control} rootControl - The root control to be validated.
103
+ * @param {string} layer - The layer name to be validated.
104
+ * @returns {Promise<void>} A promise that resolves when all checks pass without errors.
105
+ * @throws {Error} Throws an error if any of the checks fail.
106
+ */
107
+ async function checkLayerAndControl(rootControl, layer) {
108
+ checkLayer(layer);
109
+ checkRootControl(rootControl);
110
+ await checkKeyUser(layer);
111
+ }
112
+
113
+ /**
114
+ * Retrieves the first HTML element with the specified title attribute.
115
+ *
116
+ * @param {string} title - The title attribute value to search for in the HTML elements.
117
+ * @param {Element | null} element - The target element that will be searched.
118
+ * @returns {Element | null} The first HTML element that matches the given title attribute value, or null if no such element is found.
119
+ */
120
+ function getElementByTitle(title, element) {
121
+ const selector = `[title="${title}"]`;
122
+ return element ? element.querySelector(selector) : document.querySelector(selector);
123
+ }
124
+
125
+ /**
126
+ * Hides a UI5 Button control with the specified ID.
127
+ *
128
+ * This function attempts to find a UI5 Button control by its ID and then sets its visibility to false.
129
+ *
130
+ * @param {string | undefined} buttonId - The ID of the Button control to hide. If undefined, no action is taken.
131
+ * @returns {void}
132
+ */
133
+ function hideButtonById(buttonId) {
134
+ const button = sap.ui.getCore().byId(buttonId);
135
+ button?.setVisible(false);
136
+ }
137
+
138
+ /**
139
+ * Hides specific buttons by ID from the RTA toolbar.
140
+ * This function specifically targets buttons 'Reset' and 'Publish'.
141
+ */
142
+ function removeExtraBtnsFromToolbar() {
143
+ const rtaToolbarEl = document.querySelector('.sapUiRtaToolbar');
144
+ const resetEl = getElementByTitle('Reset', rtaToolbarEl);
145
+ const publishEl = getElementByTitle('Publish', rtaToolbarEl);
146
+ hideButtonById(resetEl?.id);
147
+ hideButtonById(publishEl?.id);
148
+ }
149
+
150
+ /**
151
+ * Initializes custom RuntimeAuthoring for UI5 Versions < 1.72 and start UI Adaptation.
152
+ * Ensures that the passed options are valid.
153
+ *
154
+ * @param {RTAOptions} options - Options Options that are passed to RuntimeAuthoring upon initialization.
155
+ * @param {RTAPlugin} loadPlugins - Script that needs to be executed after rta is initialized.
156
+ * @returns {Promise<void>} A promise that resolves when all the checks have passed and RuntimeAuthoring is started.
157
+ */
158
+ var __exports = async function (options, loadPlugins) {
159
+ options = merge(defaultOptions, options);
160
+ const layer = options.flexSettings.layer;
161
+ const rootControl = options.rootControl;
162
+ await checkLayerAndControl(rootControl, layer);
163
+ options.rootControl = Utils.getAppComponentForControl(rootControl);
164
+ checkFlexEnabled(options.rootControl);
165
+ const rta = new RuntimeAuthoring(options);
166
+ rta.attachEvent('stop', () => rta.destroy());
167
+ if (loadPlugins) {
168
+ await loadPlugins(rta);
169
+ }
170
+ await rta.start();
171
+ removeExtraBtnsFromToolbar();
172
+ };
173
+ __exports.isValidLayer = isValidLayer;
174
+ __exports.checkLayer = checkLayer;
175
+ __exports.checkRootControl = checkRootControl;
176
+ __exports.checkFlexEnabled = checkFlexEnabled;
177
+ __exports.checkKeyUser = checkKeyUser;
178
+ return __exports;
179
+ });
180
+ //# sourceMappingURL=initRta.js.map
@@ -0,0 +1,193 @@
1
+ import Button from 'sap/m/Button';
2
+
3
+ import merge from 'sap/base/util/merge';
4
+
5
+ import Control from 'sap/ui/core/Control';
6
+ import UIComponent from 'sap/ui/core/UIComponent';
7
+
8
+ import Utils from 'sap/ui/fl/Utils';
9
+ import FeaturesAPI from 'sap/ui/fl/write/api/FeaturesAPI';
10
+
11
+ import type { RTAPlugin } from 'sap/ui/rta/api/startAdaptation';
12
+ import RuntimeAuthoring, { Manifest, type RTAOptions } from 'sap/ui/rta/RuntimeAuthoring';
13
+
14
+ const defaultOptions = {
15
+ flexSettings: {
16
+ developerMode: false,
17
+ layer: 'CUSTOMER'
18
+ }
19
+ };
20
+
21
+ const layers = {
22
+ BASE: 'BASE',
23
+ CUSTOMER: 'CUSTOMER',
24
+ CUSTOMER_BASE: 'CUSTOMER_BASE',
25
+ PARTNER: 'PARTNER',
26
+ PUBLIC: 'PUBLIC',
27
+ USER: 'USER',
28
+ VENDOR: 'VENDOR'
29
+ };
30
+
31
+ /**
32
+ * Checks if the given layer is a valid layer.
33
+ *
34
+ * @param {string} layer - The layer name to be validated.
35
+ * @returns {boolean} Returns true if the layer is valid, otherwise false.
36
+ */
37
+ export function isValidLayer(layer: string): boolean {
38
+ return Object.keys(layers).some((existingLayer) => existingLayer === layer);
39
+ }
40
+
41
+ /**
42
+ * Validates a given layer and throws an error if it is invalid.
43
+ *
44
+ * @param {string} layer - The layer name to be checked.
45
+ * @throws {Error} Throws an error if the layer is not valid.
46
+ */
47
+ export function checkLayer(layer: string): void {
48
+ if (!isValidLayer(layer)) {
49
+ throw new Error('An invalid layer is passed');
50
+ }
51
+ }
52
+
53
+ /**
54
+ * Checks if the given root control is an instance of Control or UIComponent.
55
+ *
56
+ * @param {Control | UIComponent} rootControl - The root control to be checked.
57
+ * @throws {Error} Throws an error if the root control is not an instance of Control or UIComponent.
58
+ */
59
+ export function checkRootControl(rootControl: Control | UIComponent): void {
60
+ if (!(rootControl instanceof Control) && !(rootControl instanceof UIComponent)) {
61
+ throw new Error('An invalid root control was passed');
62
+ }
63
+ }
64
+
65
+ /**
66
+ * Checks if key user adaptation is enabled for the specified component.
67
+ * Fiori tools mode is considered a developer scenario where the `flexEnabled` flag should not be evaluated.
68
+ *
69
+ * @param {Control} component - The UI5 control component to check for flex (key user adaptation) enabled status.
70
+ * @throws {Error} Throws an error if key user adaptation is explicitly disabled in the component's manifest.
71
+ */
72
+ export function checkFlexEnabled(component: Control): void {
73
+ // fiori tools is always a developer scenario where the flexEnabled flag should not be evaluated
74
+ const fioriToolsMode = new URLSearchParams(window.location.search).get('fiori-tools-rta-mode');
75
+ if (!fioriToolsMode || fioriToolsMode === 'false') {
76
+ const manifest = (component as Control & { getManifest: () => Manifest }).getManifest() || {};
77
+ const flexEnabled = manifest['sap.ui5']?.flexEnabled;
78
+
79
+ if (flexEnabled === false) {
80
+ throw new Error('This app is not enabled for key user adaptation');
81
+ }
82
+ }
83
+ }
84
+
85
+ /**
86
+ * Checks if the current user is a key user for the given layer.
87
+ * Specifically, it checks for key user rights if the layer is the CUSTOMER layer.
88
+ * If the user is not a key user and the layer is CUSTOMER, an error is thrown.
89
+ *
90
+ * Note: The function assumes the presence of 'layers.CUSTOMER'. In case of non-CUSTOMER layers,
91
+ * it simply resolves the promise without any additional checks.
92
+ *
93
+ * @param {string} layer - The layer for which to check key user rights.
94
+ * @returns {Promise<void>} A promise that resolves if the user is a key user or the layer is not CUSTOMER.
95
+ * Rejects with an error if the user is not a key user for the CUSTOMER layer.
96
+ * @throws {Error} Throws an error with the message 'No key user rights found' if the user lacks key user rights.
97
+ */
98
+ export async function checkKeyUser(layer: string): Promise<void> {
99
+ if (layers.CUSTOMER === layer) {
100
+ const isKeyUser = await FeaturesAPI.isKeyUser();
101
+ if (!isKeyUser) {
102
+ throw new Error('No key user rights found');
103
+ }
104
+ }
105
+ }
106
+
107
+ /**
108
+ * Checks the validity of the specified layer and root control.
109
+ * It ensures that the layer is valid and the root control is an instance of Control or UIComponent.
110
+ * Additionally, it checks key user permissions for the specified layer.
111
+ *
112
+ * @param {Control} rootControl - The root control to be validated.
113
+ * @param {string} layer - The layer name to be validated.
114
+ * @returns {Promise<void>} A promise that resolves when all checks pass without errors.
115
+ * @throws {Error} Throws an error if any of the checks fail.
116
+ */
117
+ async function checkLayerAndControl(rootControl: Control, layer: string): Promise<void> {
118
+ checkLayer(layer);
119
+
120
+ checkRootControl(rootControl);
121
+
122
+ await checkKeyUser(layer);
123
+ }
124
+
125
+ /**
126
+ * Retrieves the first HTML element with the specified title attribute.
127
+ *
128
+ * @param {string} title - The title attribute value to search for in the HTML elements.
129
+ * @param {Element | null} element - The target element that will be searched.
130
+ * @returns {Element | null} The first HTML element that matches the given title attribute value, or null if no such element is found.
131
+ */
132
+ function getElementByTitle(title: string, element?: Element | null): Element | null {
133
+ const selector = `[title="${title}"]`;
134
+ return element ? element.querySelector(selector) : document.querySelector(selector);
135
+ }
136
+
137
+ /**
138
+ * Hides a UI5 Button control with the specified ID.
139
+ *
140
+ * This function attempts to find a UI5 Button control by its ID and then sets its visibility to false.
141
+ *
142
+ * @param {string | undefined} buttonId - The ID of the Button control to hide. If undefined, no action is taken.
143
+ * @returns {void}
144
+ */
145
+ function hideButtonById(buttonId: string | undefined): void {
146
+ const button = sap.ui.getCore().byId(buttonId) as Button;
147
+ button?.setVisible(false);
148
+ }
149
+
150
+ /**
151
+ * Hides specific buttons by ID from the RTA toolbar.
152
+ * This function specifically targets buttons 'Reset' and 'Publish'.
153
+ */
154
+ function removeExtraBtnsFromToolbar(): void {
155
+ const rtaToolbarEl = document.querySelector('.sapUiRtaToolbar');
156
+ const resetEl = getElementByTitle('Reset', rtaToolbarEl);
157
+ const publishEl = getElementByTitle('Publish', rtaToolbarEl);
158
+
159
+ hideButtonById(resetEl?.id);
160
+ hideButtonById(publishEl?.id);
161
+ }
162
+
163
+ /**
164
+ * Initializes custom RuntimeAuthoring for UI5 Versions < 1.72 and start UI Adaptation.
165
+ * Ensures that the passed options are valid.
166
+ *
167
+ * @param {RTAOptions} options - Options Options that are passed to RuntimeAuthoring upon initialization.
168
+ * @param {RTAPlugin} loadPlugins - Script that needs to be executed after rta is initialized.
169
+ * @returns {Promise<void>} A promise that resolves when all the checks have passed and RuntimeAuthoring is started.
170
+ */
171
+ export default async function (options: RTAOptions, loadPlugins: RTAPlugin): Promise<void> {
172
+ options = merge(defaultOptions, options) as RTAOptions;
173
+
174
+ const layer = options.flexSettings.layer;
175
+ const rootControl = options.rootControl;
176
+
177
+ await checkLayerAndControl(rootControl, layer);
178
+
179
+ options.rootControl = Utils.getAppComponentForControl(rootControl);
180
+
181
+ checkFlexEnabled(options.rootControl);
182
+
183
+ const rta = new RuntimeAuthoring(options);
184
+ rta.attachEvent('stop', () => rta.destroy());
185
+
186
+ if (loadPlugins) {
187
+ await loadPlugins(rta);
188
+ }
189
+
190
+ await rta.start();
191
+
192
+ removeExtraBtnsFromToolbar();
193
+ }
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.11.35",
12
+ "version": "0.12.0",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -24,7 +24,7 @@
24
24
  "dependencies": {
25
25
  "ejs": "3.1.9",
26
26
  "@sap-ux/logger": "0.5.0",
27
- "@sap-ux/adp-tooling": "0.8.6",
27
+ "@sap-ux/adp-tooling": "0.8.8",
28
28
  "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.4.13"
29
29
  },
30
30
  "devDependencies": {
@@ -39,8 +39,9 @@
39
39
  "supertest": "6.3.3",
40
40
  "@sap-ux-private/playwright": "0.0.2",
41
41
  "dotenv": "16.3.1",
42
- "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.8.14",
42
+ "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.9.0",
43
43
  "@sap-ux/project-access": "1.17.2",
44
+ "@sap-ux/axios-extension": "1.11.1",
44
45
  "@sap-ux/store": "0.4.2"
45
46
  },
46
47
  "peerDependencies": {
@@ -58,7 +58,13 @@
58
58
  data-sap-ui-oninit="module:open/ux/preview/client/flp/init"<% if (locals.flex) { %>
59
59
  data-open-ux-preview-flex-settings='<%- JSON.stringify(flex) %>'<% } if (locals.locateReuseLibsScript) { %>
60
60
  data-open-ux-preview-libs-manifests='<%- JSON.stringify(Object.values(apps).map(app => app.url)) %>'<% } %>>
61
- </script><% if (locals.flex && flex?.scenario === 'ADAPTATION_PROJECT') { %>
61
+ </script>
62
+
63
+ <script type="text/javascript">
64
+ (() => sap.ui.require(['open/ux/preview/client/flp/initConnectors']))()
65
+ </script>
66
+
67
+ <% if (locals.flex && flex?.scenario === 'ADAPTATION_PROJECT') { %>
62
68
  <!-- Temporary fix until RTA provides api for enable/disable buttons in main RTA navigation menu -->
63
69
  <style>
64
70
  .sapUiRtaToolbarActionsSection button[aria-label="Exit"],
@@ -1,68 +0,0 @@
1
- <mvc:View xmlns:mvc="sap.ui.core.mvc"
2
- xmlns="sap.m"
3
- xmlns:core="sap.ui.core"
4
- xmlns:f="sap.ui.layout.form">
5
- <Dialog id="addNewFragmentDialog" title="Add XML Fragment" contentWidth="500px" class="sapUiRTABorder">
6
- <content>
7
- <f:SimpleForm id="addNewFragmentDialog_Form"
8
- editable="true"
9
- layout="ResponsiveGridLayout"
10
- labelSpanS="4"
11
- singleContainerFullSize="false">
12
- <f:content>
13
- <Label text="Control Type" />
14
- <Text text="{/selectedControlName}" />
15
- <Label text="Target Aggregation" />
16
- <Select
17
- change="onAggregationChanged"
18
- selectedKey="{/selectedAggregation/key}"
19
- items="{
20
- path: '/targetAggregation',
21
- sorter: { path: 'text' }
22
- }">
23
- <core:Item key="{key}" text="{value}" />
24
- </Select>
25
- <Label text="Index" />
26
- <HBox alignItems="Center">
27
- <Select
28
- enabled="{/indexHandlingFlag}"
29
- selectedKey='{/selectedIndex}'
30
- items="{
31
- path: '/index',
32
- sorter: { path: 'text' }
33
- }">
34
- <core:Item key="{key}" text="{value}" />
35
- </Select>
36
- <core:Icon
37
- useIconTooltip="false"
38
- visible="{/specialIndexHandlingIcon}"
39
- src="sap-icon://message-information"
40
- class= "sapUiTinyMarginBegin"
41
- tooltip="{/iconTooltip}" />
42
- </HBox>
43
- <Label text="Fragment Name" />
44
- <Input
45
- description=".fragment.xml"
46
- value="{/newFragmentName}"
47
- liveChange="onFragmentNameInputChange">
48
- </Input>
49
- </f:content>
50
- </f:SimpleForm>
51
- </content>
52
- <beginButton>
53
- <Button
54
- id="createDialogBtn"
55
- text="Create"
56
- press="onCreateBtnPress"
57
- enabled="false"
58
- type="Emphasized" />
59
- </beginButton>
60
- <endButton>
61
- <Button
62
- id="closeDialogBtn"
63
- text="Cancel"
64
- press="handleDialogClose"
65
- type="Reject" />
66
- </endButton>
67
- </Dialog>
68
- </mvc:View>
@@ -1,49 +0,0 @@
1
- <mvc:View xmlns:mvc="sap.ui.core.mvc"
2
- xmlns="sap.m"
3
- xmlns:core="sap.ui.core"
4
- xmlns:f="sap.ui.layout.form">
5
- <Dialog id="controllerExtensionDialog" title="Extend With Controller" contentWidth="450px" class="sapUiRTABorder">
6
- <content>
7
- <f:SimpleForm id="controllerExtensionDialog_Form"
8
- editable="true"
9
- layout="ResponsiveGridLayout"
10
- labelSpanS="4"
11
- singleContainerFullSize="false">
12
- <f:content>
13
- <Label text="Controller Name" />
14
- <Input
15
- description=".js"
16
- value="{/newControllerName}"
17
- liveChange="onControllerNameInputChange">
18
- </Input>
19
- </f:content>
20
- </f:SimpleForm>
21
- <f:SimpleForm id="controllerExtensionDialog_Form--existingController"
22
- editable="true"
23
- layout="ResponsiveGridLayout"
24
- labelSpanS="12"
25
- visible="false"
26
- singleContainerFullSize="false">
27
- <f:content>
28
- <Label text="An existing controller extension has been found. Please use the previously created extension controller" />
29
- <Text text="{/controllerPathFromRoot}" />
30
- </f:content>
31
- </f:SimpleForm>
32
- </content>
33
- <beginButton>
34
- <Button
35
- id="createDialogBtn"
36
- text="Create"
37
- press="onCreateBtnPress"
38
- enabled="false"
39
- type="Emphasized" />
40
- </beginButton>
41
- <endButton>
42
- <Button
43
- id="closeDialogBtn"
44
- text="Cancel"
45
- press="handleDialogClose"
46
- type="Reject" />
47
- </endButton>
48
- </Dialog>
49
- </mvc:View>
@@ -1,49 +0,0 @@
1
- <mvc:View xmlns:mvc="sap.ui.core.mvc"
2
- xmlns="sap.m"
3
- xmlns:core="sap.ui.core"
4
- xmlns:f="sap.ui.layout.form">
5
- <Dialog id="addFragmentAtExtPointDialog" title="Add XML Fragment at Extension Point" contentWidth="500px" class="sapUiRTABorder">
6
- <content>
7
- <f:SimpleForm id="addFragmentAtExtPointDialog_Form"
8
- editable="true"
9
- layout="ResponsiveGridLayout"
10
- labelSpanS="4"
11
- singleContainerFullSize="false">
12
- <f:content>
13
- <Label text="Extension Point" />
14
- <Select
15
- enabled="{/extensionListEnabled}"
16
- change="onExtensionPointHandler"
17
- selectedKey='{/extensionPointKey}'
18
- items="{
19
- path: '/extensionPointList',
20
- sorter: { path: 'text' }
21
- }">
22
- <core:Item key="{key}" text="{value}" />
23
- </Select>
24
- <Label text="Fragment Name" />
25
- <Input
26
- description=".fragment.xml"
27
- value="{/newFragmentName}"
28
- liveChange="onFragmentNameInputChange">
29
- </Input>
30
- </f:content>
31
- </f:SimpleForm>
32
- </content>
33
- <beginButton>
34
- <Button
35
- id="createDialogBtn"
36
- text="Create"
37
- press="onCreateBtnPress"
38
- enabled="false"
39
- type="Emphasized" />
40
- </beginButton>
41
- <endButton>
42
- <Button
43
- id="closeDialogBtn"
44
- text="Cancel"
45
- press="handleDialogClose"
46
- type="Reject" />
47
- </endButton>
48
- </Dialog>
49
- </mvc:View>