@sapui5/sap.ushell_abap 1.97.1 → 1.100.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.
- package/package.json +1 -1
- package/src/main/js/sap/ushell_abap/.library +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/AdapterContainer.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/ConfigurationDefaultsAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +16 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +37 -4
- package/src/main/js/sap/ushell_abap/adapters/abap/MenuAdapter.js +65 -15
- package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/PageBuildingAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/PagePersistenceAdapter.js +1577 -36
- package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/SearchAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/SupportTicketAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/Ui5ComponentLoaderAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/UserInfoAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/bootstrap/evo/XhrLogonEventHandler.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def-dev.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def-loader.js +7 -0
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def.js +13 -10
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.backend.config.requestor.js +198 -0
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.bootstrap.utils.js +6 -4
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +2 -2
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.constants.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.load.launchpad.js +2 -17
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.pageset.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.startup.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.theme.handler.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.ui5.boot.handler.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhr.handler.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/boottask.js +10 -16
- package/src/main/js/sap/ushell_abap/library.js +3 -3
- package/src/main/js/sap/ushell_abap/pbServices/ui2/AllCatalogs.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Bag.js +1 -6
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Catalog.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +172 -17
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipDefinition.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipInstance.js +14 -6
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Error.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Factory.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataService.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataWrapper.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Page.js +1 -8
- package/src/main/js/sap/ushell_abap/pbServices/ui2/PageBuildingService.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/PageSet.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/RemoteCatalogService.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Utils.js +1 -8
- package/src/main/js/sap/ushell_abap/pbServices/ui2/chipdefinition.xsd +0 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/actions.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/bag.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configuration.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configurationUi.js +48 -6
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/fullscreen.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/preview.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/refresh.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/search.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/types.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/url.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/visible.js +1 -1
- package/src/main/js/sap/ushell_abap/support/plugins/app-infra/AppInfraOnSapNetWeaverSupportPlugin.js +1 -1
- package/src/main/js/sap/ushell_abap/ui5appruntime/AppInfoAdapter.js +1 -1
- package/ui5.yaml +379 -32
- package/src/main/js/sap/ui2/srvc/ODataService.js +0 -267
- package/src/main/js/sap/ui2/srvc/ODataWrapper.js +0 -1283
- package/src/main/js/sap/ui2/srvc/PageBuildingService.js +0 -1508
- package/src/main/js/sap/ui2/srvc/RemoteCatalogService.js +0 -49
- package/src/main/js/sap/ui2/srvc/allcatalogs.js +0 -197
- package/src/main/js/sap/ui2/srvc/bag.js +0 -711
- package/src/main/js/sap/ui2/srvc/catalog.js +0 -946
- package/src/main/js/sap/ui2/srvc/chip.js +0 -1035
- package/src/main/js/sap/ui2/srvc/chipdefinition.js +0 -228
- package/src/main/js/sap/ui2/srvc/chipinstance.js +0 -944
- package/src/main/js/sap/ui2/srvc/contracts/actions.js +0 -239
- package/src/main/js/sap/ui2/srvc/contracts/bag.js +0 -145
- package/src/main/js/sap/ui2/srvc/contracts/configuration.js +0 -161
- package/src/main/js/sap/ui2/srvc/contracts/configurationUi.js +0 -326
- package/src/main/js/sap/ui2/srvc/contracts/fullscreen.js +0 -69
- package/src/main/js/sap/ui2/srvc/contracts/navigation.js +0 -48
- package/src/main/js/sap/ui2/srvc/contracts/preview.js +0 -289
- package/src/main/js/sap/ui2/srvc/contracts/refresh.js +0 -42
- package/src/main/js/sap/ui2/srvc/contracts/search.js +0 -109
- package/src/main/js/sap/ui2/srvc/contracts/searchProvider.js +0 -46
- package/src/main/js/sap/ui2/srvc/contracts/types.js +0 -9
- package/src/main/js/sap/ui2/srvc/contracts/url.js +0 -104
- package/src/main/js/sap/ui2/srvc/contracts/visible.js +0 -122
- package/src/main/js/sap/ui2/srvc/error.js +0 -54
- package/src/main/js/sap/ui2/srvc/factory.js +0 -656
- package/src/main/js/sap/ui2/srvc/page.js +0 -934
- package/src/main/js/sap/ui2/srvc/pageset.js +0 -466
- package/src/main/js/sap/ui2/srvc/utils.js +0 -923
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.get.server.config.Urls.js +0 -108
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.server.config.js +0 -69
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.validate.Url.js +0 -54
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/navigation.js +0 -50
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2009-2020 SAP SE, All Rights Reserved
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @fileOverview The <code>preview</code> contract.
|
|
5
|
-
*/
|
|
6
|
-
(function () {
|
|
7
|
-
"use strict";
|
|
8
|
-
|
|
9
|
-
// Note: jQuery might not yet be available!
|
|
10
|
-
if (typeof jQuery === "function" && jQuery.sap) {
|
|
11
|
-
jQuery.sap.declare("sap.ui2.srvc.contracts.preview");
|
|
12
|
-
jQuery.sap.require("sap.ui2.srvc.chip");
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
sap.ui2.srvc.contracts = sap.ui2.srvc.contracts || {};
|
|
16
|
-
sap.ui2.srvc.contracts.preview = sap.ui2.srvc.contracts.preview || {
|
|
17
|
-
environment: null
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Allows the page builder to set the global type of environment for the preview contract to either runtime or design time.
|
|
22
|
-
* Based on this a CHIP can decide what preview to be shown. For example, in preview mode at design time, no HTTP request should be made,
|
|
23
|
-
* while in preview mode at runtime the CHIP may request a minimum of data to make the CHIP identifiable.
|
|
24
|
-
*
|
|
25
|
-
* By default the environment is unspecified (null).
|
|
26
|
-
*
|
|
27
|
-
* @param {string} sEnvironment
|
|
28
|
-
* Specified if the page builder is a design time or an runtime. Accepts only the values 'runtime' or 'designtime'.
|
|
29
|
-
*
|
|
30
|
-
* @since 1.71.0
|
|
31
|
-
* @public
|
|
32
|
-
* @see chip.preview.getEnvironmentType
|
|
33
|
-
*/
|
|
34
|
-
sap.ui2.srvc.contracts.preview.setEnvironmentType = function (sEnvironment) {
|
|
35
|
-
if (sEnvironment !== "runtime" && sEnvironment !== "designtime") {
|
|
36
|
-
throw new Error("setEnvironmentType only accepts the values 'runtime' or 'designtime'");
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
this.environment = sEnvironment;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Returns the global type of environment for the preview contract. Based on this a CHIP can decide what
|
|
44
|
-
* preview to be shown. For example, in preview mode at design time, no HTTP request should be made,
|
|
45
|
-
* while in preview mode at runtime the CHIP may request a minimum of data to make the CHIP identifiable.
|
|
46
|
-
*
|
|
47
|
-
* By default the environment is unspecified (null).
|
|
48
|
-
*
|
|
49
|
-
* @returns {string} Returns null, which means unspecified, 'runtime' or 'designtime'.
|
|
50
|
-
*
|
|
51
|
-
* @since 1.71.0
|
|
52
|
-
* @private
|
|
53
|
-
*
|
|
54
|
-
* @see #setEnvironmentType
|
|
55
|
-
*/
|
|
56
|
-
sap.ui2.srvc.contracts.preview.getEnvironmentType = function () {
|
|
57
|
-
return this.environment;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* @namespace The namespace for the CHIP API's <code>preview</code> contract, which
|
|
62
|
-
* allows to display the CHIP in a preview mode.
|
|
63
|
-
* @name chip.preview
|
|
64
|
-
* @since 1.11.0
|
|
65
|
-
*/
|
|
66
|
-
|
|
67
|
-
sap.ui2.srvc.Chip.addContract("preview", /* @returns {object} */ function (oChipInstance) {
|
|
68
|
-
var bEnabled = false,
|
|
69
|
-
sPreviewIconUrl,
|
|
70
|
-
sPreviewSubtitle,
|
|
71
|
-
sPreviewTitle,
|
|
72
|
-
sTargetUrl;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Returns this CHIP's description. May be used by the CHIP for the UI it shows in preview
|
|
76
|
-
* mode.
|
|
77
|
-
*
|
|
78
|
-
* @name chip.preview.getDescription
|
|
79
|
-
* @function
|
|
80
|
-
* @since 1.11.0
|
|
81
|
-
* @returns {string}
|
|
82
|
-
* the CHIP description
|
|
83
|
-
*/
|
|
84
|
-
this.getDescription = function () {
|
|
85
|
-
return oChipInstance.getChip().getDescription();
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Returns this CHIP's title. May be used by the CHIP for the UI it shows in preview mode.
|
|
90
|
-
*
|
|
91
|
-
* @name chip.preview.getTitle
|
|
92
|
-
* @function
|
|
93
|
-
* @since 1.11.0
|
|
94
|
-
* @returns {string}
|
|
95
|
-
* the CHIP title
|
|
96
|
-
*/
|
|
97
|
-
this.getTitle = function () {
|
|
98
|
-
return oChipInstance.getTitle();
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Tells whether preview mode is enabled. Note that this value is constant throughout
|
|
103
|
-
* a CHIP's lifetime. If preview mode is enabled, CHIPs should provide a target URL for the
|
|
104
|
-
* embedding application to trigger navigation, see {@link chip.preview.setTargetUrl}.
|
|
105
|
-
* They should not display live data for performance reasons.
|
|
106
|
-
*
|
|
107
|
-
* @name chip.preview.isEnabled
|
|
108
|
-
* @function
|
|
109
|
-
* @since 1.11.0
|
|
110
|
-
* @returns {boolean}
|
|
111
|
-
* whether preview mode is enabled
|
|
112
|
-
*/
|
|
113
|
-
this.isEnabled = function () {
|
|
114
|
-
return bEnabled;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Returns the type of environment in which the preview mode maybe displayed.
|
|
119
|
-
*
|
|
120
|
-
* Based on this a CHIP can decide what preview to be shown. For example, in preview
|
|
121
|
-
* mode at design time, no HTTP request should be made, while in preview mode at runtime
|
|
122
|
-
* the CHIP may request a minimum of data to make the CHIP identifiable.
|
|
123
|
-
*
|
|
124
|
-
* @returns {string} Returns null, which means unspecified, 'runtime' or 'designtime'.
|
|
125
|
-
*
|
|
126
|
-
* @since 1.71.0
|
|
127
|
-
* @public
|
|
128
|
-
*
|
|
129
|
-
* @see sap.ui2.srvc.contracts.preview#setEnvironmentType
|
|
130
|
-
* @since 1.71.0
|
|
131
|
-
*/
|
|
132
|
-
this.getEnvironmentType = function () {
|
|
133
|
-
return sap.ui2.srvc.contracts.preview.getEnvironmentType();
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Determines the preview icon to be used by the embedding application for this CHIP.
|
|
138
|
-
*
|
|
139
|
-
* @name chip.preview.setPreviewIcon
|
|
140
|
-
* @function
|
|
141
|
-
* @since 1.11.0
|
|
142
|
-
* @param {string} sNewPreviewIconUrl
|
|
143
|
-
* the preview icon URL. It is recommended that this URL follows the rules defined for the
|
|
144
|
-
* <code>src</code> attribute of <code>sap.ui.core.Icon</code>.
|
|
145
|
-
*/
|
|
146
|
-
this.setPreviewIcon = function (sNewPreviewIconUrl) {
|
|
147
|
-
sPreviewIconUrl = sNewPreviewIconUrl;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Determines the preview subtitle to be used by the embedding application for this CHIP.
|
|
152
|
-
*
|
|
153
|
-
* @name chip.preview.setPreviewSubtitle
|
|
154
|
-
* @function
|
|
155
|
-
* @since 1.40.0
|
|
156
|
-
* @param {string} sNewPreviewSubtitle
|
|
157
|
-
* the preview subtitle.
|
|
158
|
-
*/
|
|
159
|
-
this.setPreviewSubtitle = function (sNewPreviewSubtitle) {
|
|
160
|
-
sPreviewSubtitle = sNewPreviewSubtitle;
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Determines the preview title to be used by the embedding application for this CHIP. If the
|
|
165
|
-
* CHIP has no specific preview title e.g. based on its configuration it may return the title
|
|
166
|
-
* from the <code>getTitle</code> method of this contract.
|
|
167
|
-
*
|
|
168
|
-
* @name chip.preview.setPreviewTitle
|
|
169
|
-
* @function
|
|
170
|
-
* @since 1.11.0
|
|
171
|
-
* @param {string} sNewPreviewTitle
|
|
172
|
-
* the preview title.
|
|
173
|
-
*
|
|
174
|
-
* @see chip.preview.getTitle
|
|
175
|
-
*/
|
|
176
|
-
this.setPreviewTitle = function (sNewPreviewTitle) {
|
|
177
|
-
sPreviewTitle = sNewPreviewTitle;
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Determines the target URL for navigation from this CHIP. May be used by the embedding
|
|
182
|
-
* application to trigger navigation to the CHIP's underlying application.
|
|
183
|
-
*
|
|
184
|
-
* @name chip.preview.setTargetUrl
|
|
185
|
-
* @function
|
|
186
|
-
* @since 1.11.0
|
|
187
|
-
* @param {string} sNewTargetUrl
|
|
188
|
-
* the target URL for navigation triggered in this CHIP
|
|
189
|
-
*/
|
|
190
|
-
this.setTargetUrl = function (sNewTargetUrl) {
|
|
191
|
-
sTargetUrl = sNewTargetUrl;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* @namespace The namespace for the contract interface (to be used by a page builder) for
|
|
196
|
-
* the <code>preview</code> contract, which allows you to display a CHIP in preview
|
|
197
|
-
* mode and to retrieve the URL of the CHIP's underlying application.
|
|
198
|
-
* "Preview mode" means that a CHIP does not retrieve and display live data, but displays a
|
|
199
|
-
* static preview in order to improve performance.
|
|
200
|
-
* The embedding application has two alternatives to display a CHIP preview:
|
|
201
|
-
* Either it embeds the CHIP UI and relies on the CHIP not rendering live data or it
|
|
202
|
-
* retrieves preview attributes like title and icon from the CHIP to create the preview UI
|
|
203
|
-
* itself.
|
|
204
|
-
*
|
|
205
|
-
* @name contract.preview
|
|
206
|
-
* @since 1.11.0
|
|
207
|
-
*/
|
|
208
|
-
return {
|
|
209
|
-
/**
|
|
210
|
-
* Returns the URL of the preview icon for this CHIP.
|
|
211
|
-
*
|
|
212
|
-
* @name contract.preview.getPreviewIcon
|
|
213
|
-
* @function
|
|
214
|
-
* @returns {string}
|
|
215
|
-
* the preview icon's URL
|
|
216
|
-
* @since 1.11.0
|
|
217
|
-
*
|
|
218
|
-
* @see chip.preview.setPreviewIcon
|
|
219
|
-
*/
|
|
220
|
-
getPreviewIcon: function () {
|
|
221
|
-
return sPreviewIconUrl;
|
|
222
|
-
},
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Returns the preview subtitle for this CHIP.
|
|
226
|
-
*
|
|
227
|
-
* @name contract.preview.getPreviewSubtitle
|
|
228
|
-
* @function
|
|
229
|
-
* @returns {string}
|
|
230
|
-
* the preview subtitle
|
|
231
|
-
* @since 1.40.0
|
|
232
|
-
*
|
|
233
|
-
* @see chip.preview.setPreviewSubtitle
|
|
234
|
-
*/
|
|
235
|
-
getPreviewSubtitle: function () {
|
|
236
|
-
return sPreviewSubtitle;
|
|
237
|
-
},
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Returns the preview title for this CHIP.
|
|
241
|
-
*
|
|
242
|
-
* @name contract.preview.getPreviewTitle
|
|
243
|
-
* @function
|
|
244
|
-
* @returns {string}
|
|
245
|
-
* the preview title
|
|
246
|
-
* @since 1.11.0
|
|
247
|
-
*
|
|
248
|
-
* @see chip.preview.setPreviewTitle
|
|
249
|
-
*/
|
|
250
|
-
getPreviewTitle: function () {
|
|
251
|
-
return sPreviewTitle;
|
|
252
|
-
},
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Returns the target URL for the CHIP's underlying application.
|
|
256
|
-
*
|
|
257
|
-
* @name contract.preview.getTargetUrl
|
|
258
|
-
* @function
|
|
259
|
-
* @returns {string}
|
|
260
|
-
* target URL
|
|
261
|
-
* @since 1.11.0
|
|
262
|
-
*
|
|
263
|
-
* @see chip.preview.setTargetUrl
|
|
264
|
-
*/
|
|
265
|
-
getTargetUrl: function () {
|
|
266
|
-
return sTargetUrl;
|
|
267
|
-
},
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* Determines whether preview mode for this CHIP instance is enabled by the page builder.
|
|
271
|
-
* <b>Note:</b> Changing this setting after <code>getImplementationAsSapui5()</code> has been
|
|
272
|
-
* called probably violates the contract of <code>chip.preview.isEnabled()</code>!
|
|
273
|
-
*
|
|
274
|
-
* @param {boolean} bNewEnabled
|
|
275
|
-
* whether preview mode for this CHIP instance is enabled by the page builder
|
|
276
|
-
*
|
|
277
|
-
* @name contract.preview.setEnabled
|
|
278
|
-
* @function
|
|
279
|
-
* @since 1.11.0
|
|
280
|
-
*
|
|
281
|
-
* @see sap.ui2.srvc.ChipInstance#getImplementationAsSapui5()
|
|
282
|
-
* @see chip.preview.isEnabled
|
|
283
|
-
*/
|
|
284
|
-
setEnabled: function (bNewEnabled) {
|
|
285
|
-
bEnabled = bNewEnabled;
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
});
|
|
289
|
-
}());
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2009-2020 SAP SE, All Rights Reserved
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @fileOverview The <code>refresh</code> contract.
|
|
5
|
-
*/
|
|
6
|
-
(function () {
|
|
7
|
-
"use strict";
|
|
8
|
-
|
|
9
|
-
// Note: jQuery might not yet be available!
|
|
10
|
-
if (typeof jQuery === "function" && jQuery.sap) {
|
|
11
|
-
jQuery.sap.declare("sap.ui2.srvc.contracts.refresh");
|
|
12
|
-
jQuery.sap.require("sap.ui2.srvc.chip");
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @namespace The namespace for the CHIP API's <code>refresh</code> contract, which allows you to
|
|
17
|
-
* handle refresh events.
|
|
18
|
-
* @name chip.refresh
|
|
19
|
-
* @since 1.2.0
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
sap.ui2.srvc.Chip.addContract("refresh", function (oChipInstance) {
|
|
23
|
-
/**
|
|
24
|
-
* Attaches the given event handler to the "refresh" event which is fired
|
|
25
|
-
* whenever the user requests a refresh of this CHIP's content.
|
|
26
|
-
*
|
|
27
|
-
* Use <code>Function.prototype.bind()</code> to determine the event handler's
|
|
28
|
-
* <code>this</code> or some of its arguments.
|
|
29
|
-
*
|
|
30
|
-
* Note: Without such an event handler, the CHIP will be recreated to enforce a refresh!
|
|
31
|
-
*
|
|
32
|
-
* @name chip.refresh.attachRefresh
|
|
33
|
-
* @function
|
|
34
|
-
* @since 1.2.0
|
|
35
|
-
* @param {function} fnEventHandler
|
|
36
|
-
* the event handler for the "refresh" event
|
|
37
|
-
*/
|
|
38
|
-
this.attachRefresh = function (fnEventHandler) {
|
|
39
|
-
oChipInstance.attachRefresh(fnEventHandler);
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
}());
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2009-2020 SAP SE, All Rights Reserved
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @fileOverview The <code>search</code> contract.
|
|
5
|
-
*/
|
|
6
|
-
(function () {
|
|
7
|
-
"use strict";
|
|
8
|
-
|
|
9
|
-
// Note: jQuery might not yet be available!
|
|
10
|
-
if (typeof jQuery === "function" && jQuery.sap) {
|
|
11
|
-
jQuery.sap.declare("sap.ui2.srvc.contracts.search");
|
|
12
|
-
jQuery.sap.require("sap.ui2.srvc.chip");
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @namespace The namespace for the CHIP API's <code>search</code> contract with
|
|
17
|
-
* CHIP search-related functionality. With this contract, the CHIP can provide CHIP-specific
|
|
18
|
-
* search keywords. In addition, it can highlight words from the search in its UI.
|
|
19
|
-
* @name chip.search
|
|
20
|
-
* @since 1.11.0
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
sap.ui2.srvc.Chip.addContract("search", function (oChipInstance) {
|
|
24
|
-
var fnHighlight,
|
|
25
|
-
aKeywords;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Determines specific keywords with which the CHIP wants to be found in a search over all
|
|
29
|
-
* CHIPs from the page builder. If not set, the page builder executing a CHIP search can only
|
|
30
|
-
* search based on CHIP metadata like the CHIP title.
|
|
31
|
-
*
|
|
32
|
-
* @name chip.search.setKeywords
|
|
33
|
-
* @function
|
|
34
|
-
* @since 1.11.0
|
|
35
|
-
* @param {string[]} aNewKeywords
|
|
36
|
-
* the keywords of this CHIP
|
|
37
|
-
*/
|
|
38
|
-
this.setKeywords = function (aNewKeywords) {
|
|
39
|
-
if (!sap.ui2.srvc.isArray(aNewKeywords)) {
|
|
40
|
-
throw new sap.ui2.srvc.Error("Not an array: " + aNewKeywords, "chip.search");
|
|
41
|
-
}
|
|
42
|
-
aKeywords = aNewKeywords.slice();
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Attaches the given event handler to the "highlight" event which is fired whenever the user
|
|
47
|
-
* executes a search over all CHIPs using specific search terms. The event handler takes a
|
|
48
|
-
* string array as parameter, containing the highlight words. These are derived from the
|
|
49
|
-
* search terms. The CHIP can then highlight these in its UI.
|
|
50
|
-
*
|
|
51
|
-
* @name chip.search.attachHighlight
|
|
52
|
-
* @function
|
|
53
|
-
* @since 1.11.0
|
|
54
|
-
* @param {function (string[])} fnEventHandler
|
|
55
|
-
* event handler for highlighting words in the CHIP UI which takes a string array with the
|
|
56
|
-
* highlight words as parameter
|
|
57
|
-
*/
|
|
58
|
-
this.attachHighlight = function (fnEventHandler) {
|
|
59
|
-
if (typeof fnEventHandler !== "function") {
|
|
60
|
-
throw new sap.ui2.srvc.Error("Not a function: " + fnEventHandler,
|
|
61
|
-
"chip.search");
|
|
62
|
-
}
|
|
63
|
-
fnHighlight = fnEventHandler;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @namespace The namespace for the contract interface (to be used by a page builder) for
|
|
68
|
-
* the <code>search</code> contract. This contract interface allows the pagebuilder to get
|
|
69
|
-
* the CHIP-specific search keywords. In addition, it can have the CHIP highlight words
|
|
70
|
-
* in its UI based on the search terms used.
|
|
71
|
-
* @name contract.search
|
|
72
|
-
* @since 1.11.0
|
|
73
|
-
*/
|
|
74
|
-
return {
|
|
75
|
-
/**
|
|
76
|
-
* Returns the CHIP-specific search keywords.
|
|
77
|
-
*
|
|
78
|
-
* @name contract.search.getKeywords
|
|
79
|
-
* @function
|
|
80
|
-
* @since 1.11.0
|
|
81
|
-
* @returns {string[]}
|
|
82
|
-
* CHIP-specific search keywords. Empty array if the CHIP has not set any keywords.
|
|
83
|
-
*
|
|
84
|
-
* @see chip.search.setKeywords
|
|
85
|
-
*/
|
|
86
|
-
getKeywords: function () {
|
|
87
|
-
return aKeywords ? aKeywords.slice() : [];
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Fires the "highlight" event which takes a string array with the words to
|
|
92
|
-
* be highlighted as parameters.
|
|
93
|
-
*
|
|
94
|
-
* @name contract.search.fireHighlight
|
|
95
|
-
* @function
|
|
96
|
-
* @since 1.11.0
|
|
97
|
-
* @param {string[]} aHighlightWords
|
|
98
|
-
* words to be highlighted
|
|
99
|
-
*
|
|
100
|
-
* @see chip.search.attachHighlight
|
|
101
|
-
*/
|
|
102
|
-
fireHighlight: function (aHighlightWords) {
|
|
103
|
-
if (fnHighlight) {
|
|
104
|
-
fnHighlight(aHighlightWords);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
});
|
|
109
|
-
}());
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2009-2020 SAP SE, All Rights Reserved
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @fileOverview The <code>searchProvider</code> contract.
|
|
5
|
-
*/
|
|
6
|
-
(function () {
|
|
7
|
-
"use strict";
|
|
8
|
-
|
|
9
|
-
// Note: jQuery might not yet be available!
|
|
10
|
-
if (typeof jQuery === "function" && jQuery.sap) {
|
|
11
|
-
jQuery.sap.declare("sap.ui2.srvc.contracts.searchProvider");
|
|
12
|
-
jQuery.sap.require("sap.ui2.srvc.chip");
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
var oSearchHandle;
|
|
16
|
-
if (typeof sap.ui2.shell === "object"
|
|
17
|
-
&& typeof sap.ui2.shell.getSearchHandle === "function") {
|
|
18
|
-
oSearchHandle = sap.ui2.shell.getSearchHandle();
|
|
19
|
-
if (typeof oSearchHandle === "object"
|
|
20
|
-
&& typeof oSearchHandle.addSearchProvider === "function") {
|
|
21
|
-
/**
|
|
22
|
-
* @namespace The namespace for the CHIP API's <code>searchProvider</code> contract, which
|
|
23
|
-
* allows you to add a search provider to a surrounding shell.
|
|
24
|
-
* @name chip.searchProvider
|
|
25
|
-
* @since 1.2.0
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
sap.ui2.srvc.Chip.addContract("searchProvider", function (oChipInstance) {
|
|
29
|
-
/**
|
|
30
|
-
* Adds a search provider with the given URL (if this feature is available).
|
|
31
|
-
*
|
|
32
|
-
* @name chip.searchProvider.addSearchProvider
|
|
33
|
-
* @function
|
|
34
|
-
* @since 1.2.0
|
|
35
|
-
* @param {string} sUrl
|
|
36
|
-
* the search provider's URL
|
|
37
|
-
*
|
|
38
|
-
* @see <code>sap.ui2.shell.getSearchHandle().addSearchProvider()<code>
|
|
39
|
-
*/
|
|
40
|
-
this.addSearchProvider = function (sUrl) {
|
|
41
|
-
oSearchHandle.addSearchProvider.apply(oSearchHandle, arguments);
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}());
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2009-2020 SAP SE, All Rights Reserved
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @fileOverview The <code>url</code> contract.
|
|
5
|
-
*/
|
|
6
|
-
(function () {
|
|
7
|
-
"use strict";
|
|
8
|
-
|
|
9
|
-
// Note: jQuery might not yet be available!
|
|
10
|
-
if (typeof jQuery === "function" && jQuery.sap) {
|
|
11
|
-
jQuery.sap.declare("sap.ui2.srvc.contracts.url");
|
|
12
|
-
jQuery.sap.require("sap.ui2.srvc.chip");
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @namespace The namespace for the CHIP API's <code>url</code> contract, which allows you
|
|
17
|
-
* convert relative URLs into absolute ones.
|
|
18
|
-
* @name chip.url
|
|
19
|
-
* @since 1.2.0
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
sap.ui2.srvc.Chip.addContract("url", function (oChipInstance) {
|
|
23
|
-
/**
|
|
24
|
-
* Makes the given server-relative service URL point to the system given as parameter
|
|
25
|
-
* <code>sSystem</code> or to the system of this CHIP's catalog if <code>sSystem</code>
|
|
26
|
-
* is empty.
|
|
27
|
-
* <em>Server-relative URL</em> means a URL starting with exactly one "/" (also known as
|
|
28
|
-
* absolute-path URL).
|
|
29
|
-
* <p>
|
|
30
|
-
* The function is typically used if the CHIP has been loaded from a remote catalog. In this
|
|
31
|
-
* case, a CHIP wants to perform service calls to the system providing the remote catalog:
|
|
32
|
-
* it must convert the corresponding URLs via this method. The function may also be used for
|
|
33
|
-
* CHIPs loaded from a local catalog to perform service calls to a different system.
|
|
34
|
-
* <p>
|
|
35
|
-
* The system is added via segment parameter <code>o</code> to the last URL segment of the
|
|
36
|
-
* service URL. It is also possible to make this function put the system to a different
|
|
37
|
-
* URL path segment of the service URL by specifying the empty segment parameter
|
|
38
|
-
* <code>o</code>. If both <code>sSystem</code> is empty and the CHIP is loaded from a local
|
|
39
|
-
* catalog, no system is added and the empty segment parameter <code>o</code> is removed.
|
|
40
|
-
* <br/>
|
|
41
|
-
* <b>Example 1:</b> <code>/sap/opu/odata/MyService/?p1=v1</code> is converted to
|
|
42
|
-
* <code>/sap/opu/odata/MyService;o=SYS/?p1=v1</code> if the corresponding CHIP has been loaded
|
|
43
|
-
* via a remote catalog with system ID "SYS".
|
|
44
|
-
* However it remains unchanged if the CHIP has been loaded from the logon system <em>and</em>
|
|
45
|
-
* the parameter <code>sSystem</code> is empty.<br/>
|
|
46
|
-
* <b>Example 2:</b> <code>/sap/opu/odata/MyService;o=/MyEntities/$count?p1=v1</code> is
|
|
47
|
-
* converted to <code>/sap/opu/odata/MyService;o=sid(SYS.123)/MyEntities/$count?p1=v1</code> if
|
|
48
|
-
* parameter <code>sSystem</code> is set to "sid(SYS.123)"</code>.
|
|
49
|
-
* <p>
|
|
50
|
-
* The URL is in no way normalized.
|
|
51
|
-
*
|
|
52
|
-
* @name chip.url.addSystemToServiceUrl
|
|
53
|
-
* @function
|
|
54
|
-
* @since 1.19.1
|
|
55
|
-
* @param {string} sServiceUrl
|
|
56
|
-
* a server-relative service URL (to be used when addressing the system directly)
|
|
57
|
-
* @param {string} [sSystem]
|
|
58
|
-
* a system specification like "SYS" or "sid(SYS.123)"; if empty the
|
|
59
|
-
* system of the CHIP's catalog is used
|
|
60
|
-
* @returns {string}
|
|
61
|
-
* the service URL pointing to the system specified in parameter <code>sSystem</code> or to
|
|
62
|
-
* the system from which the CHIP's catalog has been loaded
|
|
63
|
-
* @throws Error if the URL is not server-relative such as <code>./something</code>,
|
|
64
|
-
* <code>http://foo.bar/something</code>, ...)
|
|
65
|
-
*/
|
|
66
|
-
this.addSystemToServiceUrl = function (sServiceUrl, sSystem) {
|
|
67
|
-
return oChipInstance.getChip().getCatalog().addSystemToServiceUrl(sServiceUrl, sSystem);
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Returns the system of this CHIP's catalog where application data for this CHIP is typically
|
|
72
|
-
* located. This API is needed in scenarios where a CHIP navigates to another application and
|
|
73
|
-
* needs to transfer system information so that the application can use the same application
|
|
74
|
-
* system.
|
|
75
|
-
*
|
|
76
|
-
* @name chip.url.getApplicationSystem
|
|
77
|
-
* @function
|
|
78
|
-
* @since 1.19.1
|
|
79
|
-
* @returns {string}
|
|
80
|
-
* the system of this CHIP's catalog or <code>undefined</code> if there is no such catalog
|
|
81
|
-
* @see chip.url.addSystemToServiceUrl
|
|
82
|
-
*/
|
|
83
|
-
this.getApplicationSystem = function () {
|
|
84
|
-
return oChipInstance.getChip().getCatalog().getSystemAlias();
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Makes the given relative URL absolute. URLs containing host and/or protocol
|
|
89
|
-
* and URLs with an absolute path remain unchanged. The URL is in no way
|
|
90
|
-
* normalized; the function takes the URL of the CHIP definition XML as base.
|
|
91
|
-
*
|
|
92
|
-
* @name chip.url.toAbsoluteUrl
|
|
93
|
-
* @function
|
|
94
|
-
* @since 1.2.0
|
|
95
|
-
* @param {string} sUrl
|
|
96
|
-
* the (possibly server-relative) URL
|
|
97
|
-
* @returns {string}
|
|
98
|
-
* the absolute URL
|
|
99
|
-
*/
|
|
100
|
-
this.toAbsoluteUrl = function (sUrl) {
|
|
101
|
-
return oChipInstance.getChip().toAbsoluteUrl(sUrl);
|
|
102
|
-
};
|
|
103
|
-
});
|
|
104
|
-
}());
|