@sap-ux/preview-middleware 0.18.20 → 0.18.23

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 (72) hide show
  1. package/dist/client/adp/api-handler.js +153 -153
  2. package/dist/client/adp/api-handler.ts +2 -2
  3. package/dist/client/adp/command-executor.js +75 -75
  4. package/dist/client/adp/control-utils.js +44 -44
  5. package/dist/client/adp/controllers/BaseDialog.controller.js +187 -187
  6. package/dist/client/adp/controllers/ControllerExtension.controller.js +209 -209
  7. package/dist/client/adp/controllers/ExtensionPoint.controller.js +138 -138
  8. package/dist/client/adp/controllers/FileExistsDialog.controller.js +66 -66
  9. package/dist/client/adp/dialog-factory.js +133 -133
  10. package/dist/client/adp/init-dialogs.js +107 -107
  11. package/dist/client/adp/quick-actions/common/add-controller-to-page.js +55 -55
  12. package/dist/client/adp/quick-actions/common/add-new-annotation-file.js +24 -7
  13. package/dist/client/adp/quick-actions/common/add-new-annotation-file.ts +25 -7
  14. package/dist/client/adp/quick-actions/common/add-new-subpage.js +134 -138
  15. package/dist/client/adp/quick-actions/common/add-new-subpage.ts +0 -5
  16. package/dist/client/adp/quick-actions/common/create-page-action.js +51 -51
  17. package/dist/client/adp/quick-actions/common/op-add-custom-section.js +36 -36
  18. package/dist/client/adp/quick-actions/common/op-add-header-field.js +61 -61
  19. package/dist/client/adp/quick-actions/common/utils.js +18 -18
  20. package/dist/client/adp/quick-actions/control-types.js +21 -21
  21. package/dist/client/adp/quick-actions/dialog-enablement-validator.js +24 -24
  22. package/dist/client/adp/quick-actions/enablement-validator.js +4 -4
  23. package/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +101 -101
  24. package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +104 -104
  25. package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +96 -96
  26. package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +78 -78
  27. package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +77 -77
  28. package/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.js +69 -69
  29. package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +59 -59
  30. package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +93 -93
  31. package/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.js +84 -84
  32. package/dist/client/adp/quick-actions/fe-v2/registry.js +76 -76
  33. package/dist/client/adp/quick-actions/fe-v2/utils.js +116 -116
  34. package/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +73 -73
  35. package/dist/client/adp/quick-actions/fe-v4/create-table-action.js +50 -50
  36. package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column.js +46 -46
  37. package/dist/client/adp/quick-actions/fe-v4/enable-variant-management.js +81 -81
  38. package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +56 -56
  39. package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +82 -82
  40. package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +53 -53
  41. package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +89 -89
  42. package/dist/client/adp/quick-actions/fe-v4/registry.js +58 -58
  43. package/dist/client/adp/quick-actions/fe-v4/utils.js +47 -47
  44. package/dist/client/adp/quick-actions/load.js +44 -44
  45. package/dist/client/adp/quick-actions/quick-action-base.js +53 -53
  46. package/dist/client/adp/utils.js +160 -160
  47. package/dist/client/cpe/changes/index.js +10 -10
  48. package/dist/client/cpe/changes/validator.js +39 -39
  49. package/dist/client/cpe/documentation.js +164 -164
  50. package/dist/client/cpe/feature-service.js +36 -36
  51. package/dist/client/cpe/logger.js +30 -30
  52. package/dist/client/cpe/outline/editable.js +37 -37
  53. package/dist/client/cpe/outline/nodes.js +222 -222
  54. package/dist/client/cpe/quick-actions/quick-action-definition.js +4 -4
  55. package/dist/client/cpe/quick-actions/registry.js +143 -143
  56. package/dist/client/cpe/quick-actions/utils.js +92 -92
  57. package/dist/client/cpe/types.js +4 -4
  58. package/dist/client/cpe/ui5-utils.js +33 -33
  59. package/dist/client/cpe/utils.js +138 -138
  60. package/dist/client/flp/WorkspaceConnector.js +86 -86
  61. package/dist/client/flp/common.js +28 -28
  62. package/dist/client/flp/enableFakeConnector.js +83 -83
  63. package/dist/client/flp/initConnectors.js +28 -28
  64. package/dist/client/flp/initRta.js +178 -178
  65. package/dist/client/i18n.js +56 -56
  66. package/dist/client/utils/application.js +32 -32
  67. package/dist/client/utils/core.js +68 -68
  68. package/dist/client/utils/error.js +19 -19
  69. package/dist/client/utils/fe-v2.js +56 -56
  70. package/dist/client/utils/fe-v4.js +141 -141
  71. package/dist/client/utils/version.js +104 -104
  72. package/package.json +6 -6
@@ -1,140 +1,140 @@
1
- "use strict";
2
-
3
- sap.ui.define(["sap/ui/model/json/JSONModel", "../api-handler", "./BaseDialog.controller", "../utils"], function (JSONModel, ___api_handler, __BaseDialog, ___utils) {
4
- "use strict";
5
-
6
- function _interopRequireDefault(obj) {
7
- return obj && obj.__esModule && typeof obj.default !== "undefined" ? obj.default : obj;
8
- }
9
- const getFragments = ___api_handler["getFragments"];
10
- const BaseDialog = _interopRequireDefault(__BaseDialog);
11
- const notifyUser = ___utils["notifyUser"];
12
- /**
13
- * @namespace open.ux.preview.client.adp.controllers
14
- */
15
- const ExtensionPoint = BaseDialog.extend("open.ux.preview.client.adp.controllers.ExtensionPoint", {
16
- constructor: function _constructor(name, _overlays, rta, data) {
17
- BaseDialog.prototype.constructor.call(this, name);
18
- this.model = new JSONModel();
19
- this.data = data;
20
- this.rta = rta;
21
- },
22
- /**
23
- * Setups the Dialog and the JSON Model
24
- *
25
- * @param {Dialog} dialog - Dialog instance
26
- */
27
- setup: async function _setup(dialog) {
28
- this.dialog = dialog;
29
- this.setEscapeHandler();
30
- await this.buildDialogData();
31
- this.dialog.setModel(this.model);
32
- this.dialog.open();
33
- },
34
- /**
35
- * Handles create button press
36
- *
37
- * @param event Event
38
- */
39
- onCreateBtnPress: function _onCreateBtnPress(event) {
40
- const source = event.getSource();
41
- source.setEnabled(false);
42
- const fragmentName = this.model.getProperty('/newFragmentName');
43
- this.createExtensionPointFragmentChange(fragmentName);
44
- notifyUser(`Note: The '${fragmentName}.fragment.xml' fragment will be created once you save the change.`, 8000);
45
- this.handleDialogClose();
46
- },
47
- /**
48
- * Handler for extension point select control
49
- *
50
- * @param event Select control change event
51
- */
52
- onExtensionPointHandler: function _onExtensionPointHandler(event) {
53
- const source = event.getSource();
54
- const selectedItem = source.getSelectedItem();
55
- let extensionPointName = '';
56
- if (selectedItem) {
57
- extensionPointName = selectedItem.getText();
58
- }
59
- this.model.setProperty('/extensionPointName', extensionPointName);
60
- const hasDefaultContent = this.hasDefaultContentForName(extensionPointName);
61
- this.model.setProperty('/hasDefaultContent', hasDefaultContent);
62
- },
63
- /**
64
- * Determines whether there is default content associated with the given name.
65
- *
66
- * @param {string} name - The name to check for associated default content.
67
- * @returns {boolean} - True if there is non-empty default content associated with the name, false otherwise.
68
- */
69
- hasDefaultContentForName: function _hasDefaultContentForName(name) {
70
- const defaultContent = this.data?.info.find(v => v.name === name)?.defaultContent;
71
- return defaultContent ? defaultContent.length > 0 : false;
72
- },
73
- /**
74
- * Builds data that is used in the dialog
75
- */
76
- buildDialogData: async function _buildDialogData() {
77
- const name = this.data?.name;
78
- if (name) {
79
- const hasDefaultContent = this.hasDefaultContentForName(name);
80
- const extensionPointList = [{
81
- key: 0,
82
- value: name
83
- }];
84
- this.updateModel(name, 0, extensionPointList, false, hasDefaultContent);
85
- } else {
86
- // In this case we are selecting from the application. There can be many extension points under one control.
87
- const extensionPointList = this.data.info.map((v, idx) => {
88
- return {
89
- key: idx,
90
- value: v.name
91
- };
92
- });
93
- const firstElName = extensionPointList[0].value;
94
- const enabled = extensionPointList.length > 1;
95
- const hasDefaultContent = this.hasDefaultContentForName(firstElName);
96
- this.updateModel(firstElName, 0, extensionPointList, enabled, hasDefaultContent);
97
- }
98
- try {
99
- const {
100
- fragments
101
- } = await getFragments();
102
- this.model.setProperty('/fragmentList', fragments);
103
- } catch (e) {
104
- this.handleError(e);
105
- }
106
- },
107
- /**
108
- * Updates the Select control according to provided values
109
- *
110
- * @param name Extension point name
111
- * @param key Selected extension point key
112
- * @param list All of the extension points that are under a view
113
- * @param enabled Enables the select control
114
- * @param hasDefaultContent Whether there is default content associated with the extension name
115
- */
116
- updateModel: function _updateModel(name, key, list, enabled, hasDefaultContent) {
117
- this.model.setProperty('/extensionPointName', name);
118
- this.model.setProperty('/extensionPointKey', key);
119
- this.model.setProperty('/extensionPointList', list);
120
- this.model.setProperty('/extensionListEnabled', enabled);
121
- this.model.setProperty('/hasDefaultContent', hasDefaultContent);
122
- },
123
- /**
124
- * Creates add xml at extension point changes
125
- *
126
- * @param fragmentName Fragment name
127
- */
128
- createExtensionPointFragmentChange: function _createExtensionPointFragmentChange(fragmentName) {
129
- const extensionPointName = this.model.getProperty('/extensionPointName');
130
- const modifiedValue = {
131
- fragment: `<core:FragmentDefinition xmlns:core='sap.ui.core'></core:FragmentDefinition>`,
132
- fragmentPath: `fragments/${fragmentName}.fragment.xml`,
133
- extensionPointName
134
- };
135
- this.data.deferred.resolve(modifiedValue);
136
- }
137
- });
138
- return ExtensionPoint;
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/ui/model/json/JSONModel", "../api-handler", "./BaseDialog.controller", "../utils"], function (JSONModel, ___api_handler, __BaseDialog, ___utils) {
4
+ "use strict";
5
+
6
+ function _interopRequireDefault(obj) {
7
+ return obj && obj.__esModule && typeof obj.default !== "undefined" ? obj.default : obj;
8
+ }
9
+ const getFragments = ___api_handler["getFragments"];
10
+ const BaseDialog = _interopRequireDefault(__BaseDialog);
11
+ const notifyUser = ___utils["notifyUser"];
12
+ /**
13
+ * @namespace open.ux.preview.client.adp.controllers
14
+ */
15
+ const ExtensionPoint = BaseDialog.extend("open.ux.preview.client.adp.controllers.ExtensionPoint", {
16
+ constructor: function _constructor(name, _overlays, rta, data) {
17
+ BaseDialog.prototype.constructor.call(this, name);
18
+ this.model = new JSONModel();
19
+ this.data = data;
20
+ this.rta = rta;
21
+ },
22
+ /**
23
+ * Setups the Dialog and the JSON Model
24
+ *
25
+ * @param {Dialog} dialog - Dialog instance
26
+ */
27
+ setup: async function _setup(dialog) {
28
+ this.dialog = dialog;
29
+ this.setEscapeHandler();
30
+ await this.buildDialogData();
31
+ this.dialog.setModel(this.model);
32
+ this.dialog.open();
33
+ },
34
+ /**
35
+ * Handles create button press
36
+ *
37
+ * @param event Event
38
+ */
39
+ onCreateBtnPress: function _onCreateBtnPress(event) {
40
+ const source = event.getSource();
41
+ source.setEnabled(false);
42
+ const fragmentName = this.model.getProperty('/newFragmentName');
43
+ this.createExtensionPointFragmentChange(fragmentName);
44
+ notifyUser(`Note: The '${fragmentName}.fragment.xml' fragment will be created once you save the change.`, 8000);
45
+ this.handleDialogClose();
46
+ },
47
+ /**
48
+ * Handler for extension point select control
49
+ *
50
+ * @param event Select control change event
51
+ */
52
+ onExtensionPointHandler: function _onExtensionPointHandler(event) {
53
+ const source = event.getSource();
54
+ const selectedItem = source.getSelectedItem();
55
+ let extensionPointName = '';
56
+ if (selectedItem) {
57
+ extensionPointName = selectedItem.getText();
58
+ }
59
+ this.model.setProperty('/extensionPointName', extensionPointName);
60
+ const hasDefaultContent = this.hasDefaultContentForName(extensionPointName);
61
+ this.model.setProperty('/hasDefaultContent', hasDefaultContent);
62
+ },
63
+ /**
64
+ * Determines whether there is default content associated with the given name.
65
+ *
66
+ * @param {string} name - The name to check for associated default content.
67
+ * @returns {boolean} - True if there is non-empty default content associated with the name, false otherwise.
68
+ */
69
+ hasDefaultContentForName: function _hasDefaultContentForName(name) {
70
+ const defaultContent = this.data?.info.find(v => v.name === name)?.defaultContent;
71
+ return defaultContent ? defaultContent.length > 0 : false;
72
+ },
73
+ /**
74
+ * Builds data that is used in the dialog
75
+ */
76
+ buildDialogData: async function _buildDialogData() {
77
+ const name = this.data?.name;
78
+ if (name) {
79
+ const hasDefaultContent = this.hasDefaultContentForName(name);
80
+ const extensionPointList = [{
81
+ key: 0,
82
+ value: name
83
+ }];
84
+ this.updateModel(name, 0, extensionPointList, false, hasDefaultContent);
85
+ } else {
86
+ // In this case we are selecting from the application. There can be many extension points under one control.
87
+ const extensionPointList = this.data.info.map((v, idx) => {
88
+ return {
89
+ key: idx,
90
+ value: v.name
91
+ };
92
+ });
93
+ const firstElName = extensionPointList[0].value;
94
+ const enabled = extensionPointList.length > 1;
95
+ const hasDefaultContent = this.hasDefaultContentForName(firstElName);
96
+ this.updateModel(firstElName, 0, extensionPointList, enabled, hasDefaultContent);
97
+ }
98
+ try {
99
+ const {
100
+ fragments
101
+ } = await getFragments();
102
+ this.model.setProperty('/fragmentList', fragments);
103
+ } catch (e) {
104
+ this.handleError(e);
105
+ }
106
+ },
107
+ /**
108
+ * Updates the Select control according to provided values
109
+ *
110
+ * @param name Extension point name
111
+ * @param key Selected extension point key
112
+ * @param list All of the extension points that are under a view
113
+ * @param enabled Enables the select control
114
+ * @param hasDefaultContent Whether there is default content associated with the extension name
115
+ */
116
+ updateModel: function _updateModel(name, key, list, enabled, hasDefaultContent) {
117
+ this.model.setProperty('/extensionPointName', name);
118
+ this.model.setProperty('/extensionPointKey', key);
119
+ this.model.setProperty('/extensionPointList', list);
120
+ this.model.setProperty('/extensionListEnabled', enabled);
121
+ this.model.setProperty('/hasDefaultContent', hasDefaultContent);
122
+ },
123
+ /**
124
+ * Creates add xml at extension point changes
125
+ *
126
+ * @param fragmentName Fragment name
127
+ */
128
+ createExtensionPointFragmentChange: function _createExtensionPointFragmentChange(fragmentName) {
129
+ const extensionPointName = this.model.getProperty('/extensionPointName');
130
+ const modifiedValue = {
131
+ fragment: `<core:FragmentDefinition xmlns:core='sap.ui.core'></core:FragmentDefinition>`,
132
+ fragmentPath: `fragments/${fragmentName}.fragment.xml`,
133
+ extensionPointName
134
+ };
135
+ this.data.deferred.resolve(modifiedValue);
136
+ }
137
+ });
138
+ return ExtensionPoint;
139
139
  });
140
140
  //# sourceMappingURL=ExtensionPoint.controller.js.map
@@ -1,68 +1,68 @@
1
- "use strict";
2
-
3
- sap.ui.define(["sap/ui/model/json/JSONModel", "./BaseDialog.controller", "../../i18n"], function (JSONModel, __BaseDialog, ____i18n) {
4
- "use strict";
5
-
6
- function _interopRequireDefault(obj) {
7
- return obj && obj.__esModule && typeof obj.default !== "undefined" ? obj.default : obj;
8
- }
9
- const BaseDialog = _interopRequireDefault(__BaseDialog);
10
- const getResourceModel = ____i18n["getResourceModel"];
11
- /**
12
- * @namespace open.ux.preview.client.adp.controllers
13
- */
14
- const FileExistsDialog = BaseDialog.extend("open.ux.preview.client.adp.controllers.FileExistsDialog", {
15
- constructor: function _constructor(name, options) {
16
- BaseDialog.prototype.constructor.call(this, name);
17
- this.model = new JSONModel();
18
- this.options = options;
19
- },
20
- /**
21
- * Setups the Dialog and the JSON Model
22
- *
23
- * @param {Dialog} dialog - Dialog instance
24
- */
25
- setup: async function _setup(dialog) {
26
- this.dialog = dialog;
27
- this.setEscapeHandler();
28
- this.model.setProperty('/filePath', this.options.filePath);
29
- this.model.setProperty('/filePathFromRoot', this.options.fileName);
30
- this.model.setProperty('/isRunningInBAS', this.options.isRunningInBAS);
31
- this.buildDialogData();
32
- const resourceModel = await getResourceModel();
33
- this.dialog.setModel(this.model);
34
- this.dialog.setModel(resourceModel, 'i18n');
35
- this.dialog.open();
36
- },
37
- /**
38
- * Handles create button press
39
- *
40
- * @param _event Event
41
- */
42
- onShowFileInVscodeBtn: function _onShowFileInVscodeBtn(_event) {
43
- const annotationPath = this.model.getProperty('/filePath');
44
- window.open(`vscode://file${annotationPath}`);
45
- this.handleDialogClose();
46
- },
47
- /**
48
- * Builds data that is used in the dialog.
49
- */
50
- buildDialogData: function _buildDialogData() {
51
- const content = this.dialog.getContent();
52
- const messageForm = content[0];
53
- messageForm.setVisible(true);
54
- const isRunningInBAS = this.model.getProperty('/isRunningInBAS');
55
- if (isRunningInBAS) {
56
- this.dialog.getBeginButton().setVisible(false);
57
- }
58
- },
59
- /**
60
- * Handles create button press
61
- *
62
- * @param _event Event
63
- */
64
- onCreateBtnPress: function _onCreateBtnPress(_event) {}
65
- });
66
- return FileExistsDialog;
1
+ "use strict";
2
+
3
+ sap.ui.define(["sap/ui/model/json/JSONModel", "./BaseDialog.controller", "../../i18n"], function (JSONModel, __BaseDialog, ____i18n) {
4
+ "use strict";
5
+
6
+ function _interopRequireDefault(obj) {
7
+ return obj && obj.__esModule && typeof obj.default !== "undefined" ? obj.default : obj;
8
+ }
9
+ const BaseDialog = _interopRequireDefault(__BaseDialog);
10
+ const getResourceModel = ____i18n["getResourceModel"];
11
+ /**
12
+ * @namespace open.ux.preview.client.adp.controllers
13
+ */
14
+ const FileExistsDialog = BaseDialog.extend("open.ux.preview.client.adp.controllers.FileExistsDialog", {
15
+ constructor: function _constructor(name, options) {
16
+ BaseDialog.prototype.constructor.call(this, name);
17
+ this.model = new JSONModel();
18
+ this.options = options;
19
+ },
20
+ /**
21
+ * Setups the Dialog and the JSON Model
22
+ *
23
+ * @param {Dialog} dialog - Dialog instance
24
+ */
25
+ setup: async function _setup(dialog) {
26
+ this.dialog = dialog;
27
+ this.setEscapeHandler();
28
+ this.model.setProperty('/filePath', this.options.filePath);
29
+ this.model.setProperty('/filePathFromRoot', this.options.fileName);
30
+ this.model.setProperty('/isRunningInBAS', this.options.isRunningInBAS);
31
+ this.buildDialogData();
32
+ const resourceModel = await getResourceModel();
33
+ this.dialog.setModel(this.model);
34
+ this.dialog.setModel(resourceModel, 'i18n');
35
+ this.dialog.open();
36
+ },
37
+ /**
38
+ * Handles create button press
39
+ *
40
+ * @param _event Event
41
+ */
42
+ onShowFileInVscodeBtn: function _onShowFileInVscodeBtn(_event) {
43
+ const annotationPath = this.model.getProperty('/filePath');
44
+ window.open(`vscode://file${annotationPath}`);
45
+ this.handleDialogClose();
46
+ },
47
+ /**
48
+ * Builds data that is used in the dialog.
49
+ */
50
+ buildDialogData: function _buildDialogData() {
51
+ const content = this.dialog.getContent();
52
+ const messageForm = content[0];
53
+ messageForm.setVisible(true);
54
+ const isRunningInBAS = this.model.getProperty('/isRunningInBAS');
55
+ if (isRunningInBAS) {
56
+ this.dialog.getBeginButton().setVisible(false);
57
+ }
58
+ },
59
+ /**
60
+ * Handles create button press
61
+ *
62
+ * @param _event Event
63
+ */
64
+ onCreateBtnPress: function _onCreateBtnPress(_event) {}
65
+ });
66
+ return FileExistsDialog;
67
67
  });
68
68
  //# sourceMappingURL=FileExistsDialog.controller.js.map