@openui5/sap.ui.documentation 1.97.1 → 1.99.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.
- package/.reuse/dep5 +25 -30
- package/THIRDPARTY.txt +14 -21
- package/package.json +6 -6
- package/src/sap/ui/documentation/.library +1 -1
- package/src/sap/ui/documentation/library.js +2 -2
- package/src/sap/ui/documentation/messagebundle.properties +20 -8
- package/src/sap/ui/documentation/messagebundle_ar.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_bg.properties +15 -4
- package/src/sap/ui/documentation/messagebundle_ca.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_cs.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_cy.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_da.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_de.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_el.properties +15 -4
- package/src/sap/ui/documentation/messagebundle_en.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_en_GB.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_en_US_sappsd.properties +19 -8
- package/src/sap/ui/documentation/messagebundle_en_US_saprigi.properties +2 -2
- package/src/sap/ui/documentation/messagebundle_en_US_saptrc.properties +19 -8
- package/src/sap/ui/documentation/messagebundle_es.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_es_MX.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_et.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_fi.properties +17 -6
- package/src/sap/ui/documentation/messagebundle_fr.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_fr_CA.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_hi.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_hr.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_hu.properties +15 -4
- package/src/sap/ui/documentation/messagebundle_id.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_it.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_iw.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_ja.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_kk.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_ko.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_lt.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_lv.properties +15 -4
- package/src/sap/ui/documentation/messagebundle_ms.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_nl.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_no.properties +17 -6
- package/src/sap/ui/documentation/messagebundle_pl.properties +15 -4
- package/src/sap/ui/documentation/messagebundle_pt.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_pt_PT.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_ro.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_ru.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_sh.properties +17 -6
- package/src/sap/ui/documentation/messagebundle_sk.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_sl.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_sv.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_th.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_tr.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_uk.properties +17 -6
- package/src/sap/ui/documentation/messagebundle_vi.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_zh_CN.properties +16 -5
- package/src/sap/ui/documentation/messagebundle_zh_TW.properties +16 -5
- package/src/sap/ui/documentation/sdk/controller/ApiDetail.controller.js +2 -2
- package/src/sap/ui/documentation/sdk/controller/App.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/BaseController.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/ControlsMaster.controller.js +6 -5
- package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +246 -25
- package/src/sap/ui/documentation/sdk/controller/TopicDetail.controller.js +7 -7
- package/src/sap/ui/documentation/sdk/controller/config/sampleForwardingConfig.js +40 -0
- package/src/sap/ui/documentation/sdk/controller/util/datatable/filters/DataTableFilterDropDownRenderer.js +7 -1
- package/src/sap/ui/documentation/sdk/css/style.css +11 -2
- package/src/sap/ui/documentation/sdk/index.html +22 -8
- package/src/sap/ui/documentation/sdk/util/DocumentationRouter.js +3 -1
- package/src/sap/ui/documentation/sdk/view/NewsPopover.fragment.xml +2 -2
- package/src/sap/ui/documentation/sdk/view/Sample.view.xml +5 -1
- package/src/sap/ui/documentation/sdk/view/Welcome.view.xml +87 -39
- package/src/sap/ui/documentation/sdk/view/appSettingsDialog.fragment.xml +1 -0
|
@@ -17,8 +17,10 @@ sap.ui.define([
|
|
|
17
17
|
"sap/ui/core/HTML",
|
|
18
18
|
"sap/m/library",
|
|
19
19
|
"sap/base/Log",
|
|
20
|
+
"sap/base/util/UriParameters",
|
|
20
21
|
"sap/ui/core/Fragment",
|
|
21
|
-
"sap/ui/documentation/sdk/util/Resources"
|
|
22
|
+
"sap/ui/documentation/sdk/util/Resources",
|
|
23
|
+
"./config/sampleForwardingConfig"
|
|
22
24
|
], function(
|
|
23
25
|
jQuery,
|
|
24
26
|
SampleBaseController,
|
|
@@ -31,14 +33,20 @@ sap.ui.define([
|
|
|
31
33
|
HTML,
|
|
32
34
|
mobileLibrary,
|
|
33
35
|
Log,
|
|
36
|
+
UriParameters,
|
|
34
37
|
Fragment,
|
|
35
|
-
ResourcesUtil
|
|
38
|
+
ResourcesUtil,
|
|
39
|
+
sampleForwardingConfig
|
|
36
40
|
) {
|
|
37
41
|
"use strict";
|
|
38
42
|
|
|
39
43
|
// shortcut for sap.m.URLHelper
|
|
40
44
|
var URLHelper = mobileLibrary.URLHelper;
|
|
41
45
|
|
|
46
|
+
var COZY = "cozy",
|
|
47
|
+
COMPACT = "compact",
|
|
48
|
+
CONDENSED = "condensed";
|
|
49
|
+
|
|
42
50
|
return SampleBaseController.extend("sap.ui.documentation.sdk.controller.Sample", {
|
|
43
51
|
/* =========================================================== */
|
|
44
52
|
/* lifecycle methods */
|
|
@@ -54,15 +62,29 @@ sap.ui.define([
|
|
|
54
62
|
showNewTab: false,
|
|
55
63
|
rtaLoaded: false
|
|
56
64
|
});
|
|
65
|
+
this._oSampleIframeSettings = {
|
|
66
|
+
densityMode: COMPACT,
|
|
67
|
+
themeActive: "sap_fiori_3",
|
|
68
|
+
rtl: false
|
|
69
|
+
};
|
|
57
70
|
|
|
58
71
|
this._sId = null; // Used to hold sample ID
|
|
59
72
|
this._sEntityId = null; // Used to hold entity ID for the sample currently shown
|
|
73
|
+
this.router = this.getRouter();
|
|
60
74
|
|
|
61
75
|
// Load runtime authoring asynchronously
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
76
|
+
if (!ResourcesUtil.getHasProxy()) {
|
|
77
|
+
Promise.all([
|
|
78
|
+
sap.ui.getCore().loadLibrary("sap.ui.fl", {async: true}),
|
|
79
|
+
sap.ui.getCore().loadLibrary("sap.ui.rta", {async: true})
|
|
80
|
+
]).then(function () {
|
|
81
|
+
sap.ui.require([
|
|
82
|
+
"sap/ui/fl/Utils",
|
|
83
|
+
"sap/ui/fl/FakeLrepConnectorLocalStorage",
|
|
84
|
+
"sap/ui/core/util/reflection/JsControlTreeModifier"
|
|
85
|
+
], this._loadRTA.bind(this));
|
|
86
|
+
}.bind(this));
|
|
87
|
+
}
|
|
66
88
|
|
|
67
89
|
this.getView().setModel(this.oModel);
|
|
68
90
|
|
|
@@ -85,6 +107,14 @@ sap.ui.define([
|
|
|
85
107
|
this._sEntityId = event.getParameter("arguments").entityId;
|
|
86
108
|
|
|
87
109
|
this.byId("page").setBusy(true);
|
|
110
|
+
|
|
111
|
+
if (sampleForwardingConfig[this._sId]) {
|
|
112
|
+
return this.router.navTo("sample", {
|
|
113
|
+
entityId: sampleForwardingConfig[this._sId].entityId,
|
|
114
|
+
sampleId: sampleForwardingConfig[this._sId].sampleId
|
|
115
|
+
}, true);
|
|
116
|
+
}
|
|
117
|
+
|
|
88
118
|
this.getModel("appView").setProperty("/bHasMaster", false);
|
|
89
119
|
|
|
90
120
|
ControlsInfo.loadData().then(this._loadSample.bind(this));
|
|
@@ -145,11 +175,12 @@ sap.ui.define([
|
|
|
145
175
|
var oSampleConfig = oConfig && oConfig.sample || {};
|
|
146
176
|
|
|
147
177
|
// only have the option to run standalone if there is an iframe
|
|
148
|
-
oModelData.showNewTab = !!oSampleConfig.iframe || ResourcesUtil.getHasProxy();
|
|
178
|
+
oModelData.showNewTab = !!oSampleConfig.iframe || !!ResourcesUtil.getHasProxy();
|
|
149
179
|
oModelData.id = oSample.id;
|
|
150
180
|
oModelData.name = oSample.name;
|
|
151
181
|
oModelData.details = oSample.details;
|
|
152
182
|
oModelData.description = oSample.description;
|
|
183
|
+
oModelData.showSettings = !!ResourcesUtil.getHasProxy();
|
|
153
184
|
|
|
154
185
|
if (oSampleConfig) {
|
|
155
186
|
|
|
@@ -211,6 +242,141 @@ sap.ui.define([
|
|
|
211
242
|
});
|
|
212
243
|
},
|
|
213
244
|
|
|
245
|
+
/**
|
|
246
|
+
* Opens the View settings dialog
|
|
247
|
+
* @public
|
|
248
|
+
*/
|
|
249
|
+
handleSettings: function () {
|
|
250
|
+
var oSampleFrame = this._oHtmlControl.$()[0].contentWindow,
|
|
251
|
+
oSampleFrameCore = oSampleFrame.sap.ui.getCore(),
|
|
252
|
+
oView;
|
|
253
|
+
|
|
254
|
+
if (!this._oMessageBundle) {
|
|
255
|
+
this._oMessageBundle = new oSampleFrame.sap.ui.model.resource.ResourceModel({
|
|
256
|
+
bundleName: "sap.ui.documentation.messagebundle"
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (!this._oSettingsDialog) {
|
|
261
|
+
this._oSettingsDialog = new oSampleFrame.sap.ui.xmlfragment("sap.ui.documentation.sdk.view.appSettingsDialog", this);
|
|
262
|
+
|
|
263
|
+
oView = oSampleFrameCore.byId("__xmlview0");
|
|
264
|
+
oView.setModel(this._oMessageBundle, "i18n");
|
|
265
|
+
oView.addDependent(this._oSettingsDialog);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
setTimeout(function () {
|
|
269
|
+
var oAppSettings = oSampleFrameCore.getConfiguration(),
|
|
270
|
+
oThemeSelect = oSampleFrameCore.byId("ThemeSelect"),
|
|
271
|
+
sUriParamTheme = UriParameters.fromQuery(window.location.search).get("sap-theme"),
|
|
272
|
+
bDensityMode = this._oSampleIframeSettings.densityMode;
|
|
273
|
+
|
|
274
|
+
// Theme select
|
|
275
|
+
oThemeSelect.setSelectedKey(sUriParamTheme ? sUriParamTheme : oAppSettings.getTheme());
|
|
276
|
+
|
|
277
|
+
// RTL
|
|
278
|
+
oSampleFrameCore.byId("RTLSwitch").setState(oAppSettings.getRTL());
|
|
279
|
+
|
|
280
|
+
// Density mode select
|
|
281
|
+
oSampleFrameCore.byId("DensityModeSwitch").setSelectedKey(bDensityMode);
|
|
282
|
+
|
|
283
|
+
this._oSettingsDialog.open();
|
|
284
|
+
}.bind(this), 0);
|
|
285
|
+
},
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Closes the View settings dialog
|
|
289
|
+
* @public
|
|
290
|
+
*/
|
|
291
|
+
handleCloseAppSettings: function () {
|
|
292
|
+
this._oSettingsDialog.close();
|
|
293
|
+
},
|
|
294
|
+
|
|
295
|
+
handleSaveAppSettings: function () {
|
|
296
|
+
var oSampleFrame = this._oHtmlControl.$()[0].contentWindow,
|
|
297
|
+
oSampleFrameCore = oSampleFrame.sap.ui.getCore(),
|
|
298
|
+
sDensityMode = oSampleFrameCore.byId("DensityModeSwitch").getSelectedKey(),
|
|
299
|
+
sTheme = oSampleFrameCore.byId("ThemeSelect").getSelectedKey(),
|
|
300
|
+
bRTL = oSampleFrameCore.byId("RTLSwitch").getState(),
|
|
301
|
+
oView = oSampleFrameCore.byId("__xmlview0");
|
|
302
|
+
|
|
303
|
+
this._oSettingsDialog.close();
|
|
304
|
+
|
|
305
|
+
// Lazy loading of busy dialog
|
|
306
|
+
if (!this._oBusyDialog) {
|
|
307
|
+
oSampleFrame.sap.ui.require(["sap/m/BusyDialog"], function () {
|
|
308
|
+
this._oBusyDialog = new oSampleFrame.sap.m.BusyDialog();
|
|
309
|
+
oView.addDependent(this._oBusyDialog);
|
|
310
|
+
this._handleBusyDialog();
|
|
311
|
+
}.bind(this));
|
|
312
|
+
} else {
|
|
313
|
+
this._handleBusyDialog();
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// handle settings change
|
|
317
|
+
this._applyAppConfiguration(sTheme, sDensityMode, bRTL);
|
|
318
|
+
},
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Apply content configuration
|
|
322
|
+
* @param {string} sThemeActive name of the theme
|
|
323
|
+
* @param {string} sDensityMode content density mode
|
|
324
|
+
* @param {boolean} bRTL right to left mode
|
|
325
|
+
* @private
|
|
326
|
+
*/
|
|
327
|
+
_applyAppConfiguration: function(sThemeActive, sDensityMode, bRTL){
|
|
328
|
+
var oSampleFrame = this._oHtmlControl.$()[0].contentWindow,
|
|
329
|
+
oSampleFrameCore = oSampleFrame.sap.ui.getCore();
|
|
330
|
+
|
|
331
|
+
if (this._oSampleIframeSettings.densityMode !== sDensityMode) {
|
|
332
|
+
this._oSampleIframeSettings.densityMode = sDensityMode;
|
|
333
|
+
this._toggleContentDensityClasses(oSampleFrame.jQuery("body"), sDensityMode);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (this._oSampleIframeSettings.rtl !== bRTL) {
|
|
337
|
+
oSampleFrameCore.getConfiguration().setRTL(bRTL);
|
|
338
|
+
this._oSampleIframeSettings.rtl = bRTL;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
if (oSampleFrameCore.getConfiguration().getTheme() !== sThemeActive) {
|
|
342
|
+
oSampleFrameCore.applyTheme(sThemeActive);
|
|
343
|
+
this._oSampleIframeSettings.themeActive = sThemeActive;
|
|
344
|
+
} else if (this._oSampleIframeSettings.densityMode !== sDensityMode) {
|
|
345
|
+
// Notify Core for content density change only if no theme change happened
|
|
346
|
+
oSampleFrameCore.notifyContentDensityChanged();
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Toggles content density classes in the provided html body
|
|
352
|
+
* @param {object} oBody the html body to set the correct class on
|
|
353
|
+
* @param {string} sDensityMode content density mode
|
|
354
|
+
* @private
|
|
355
|
+
*/
|
|
356
|
+
_toggleContentDensityClasses: function(oBody, sDensityMode){
|
|
357
|
+
switch (sDensityMode) {
|
|
358
|
+
case COMPACT:
|
|
359
|
+
oBody.toggleClass("sapUiSizeCompact", true).toggleClass("sapUiSizeCozy", false).toggleClass("sapUiSizeCondensed", false);
|
|
360
|
+
break;
|
|
361
|
+
case CONDENSED:
|
|
362
|
+
oBody.toggleClass("sapUiSizeCondensed", true).toggleClass("sapUiSizeCozy", false).toggleClass("sapUiSizeCompact", true);
|
|
363
|
+
break;
|
|
364
|
+
default:
|
|
365
|
+
oBody.toggleClass("sapUiSizeCozy", true).toggleClass("sapUiSizeCondensed", false).toggleClass("sapUiSizeCompact", false);
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Handles View settings dialog
|
|
371
|
+
* @public
|
|
372
|
+
*/
|
|
373
|
+
_handleBusyDialog : function () {
|
|
374
|
+
this._oBusyDialog.open();
|
|
375
|
+
setTimeout(function () {
|
|
376
|
+
this._oBusyDialog.close();
|
|
377
|
+
}.bind(this), 1000);
|
|
378
|
+
},
|
|
379
|
+
|
|
214
380
|
_updateFileContent: function(sRef, sFile) {
|
|
215
381
|
this.fetchSourceFile(sRef + "/" + sFile).then(function(vContent) {
|
|
216
382
|
var aFiles = this.oModel.getProperty("/files");
|
|
@@ -267,7 +433,7 @@ sap.ui.define([
|
|
|
267
433
|
/**
|
|
268
434
|
* Extends the sSampleId with the relative path defined in sIframePath and returns the resulting path.
|
|
269
435
|
* @param {string} sSampleId
|
|
270
|
-
* @param {string}
|
|
436
|
+
* @param {string} sIframePath
|
|
271
437
|
* @returns {string}
|
|
272
438
|
* @private
|
|
273
439
|
*/
|
|
@@ -325,6 +491,20 @@ sap.ui.define([
|
|
|
325
491
|
}
|
|
326
492
|
|
|
327
493
|
if (!this._oHtmlControl) {
|
|
494
|
+
var oComponent = this.getOwnerComponent();
|
|
495
|
+
|
|
496
|
+
// Guarantees the sample initially to have the same content density, as the whole Demo Kit
|
|
497
|
+
switch (oComponent.getContentDensityClass()) {
|
|
498
|
+
case "sapUiSizeCompact":
|
|
499
|
+
this._oSampleIframeSettings.densityMode = COMPACT;
|
|
500
|
+
break;
|
|
501
|
+
case "sapUiSizeCondensed":
|
|
502
|
+
this._oSampleIframeSettings.densityMode = CONDENSED;
|
|
503
|
+
break;
|
|
504
|
+
default:
|
|
505
|
+
this._oSampleIframeSettings.densityMode = COZY;
|
|
506
|
+
}
|
|
507
|
+
|
|
328
508
|
this._oHtmlControl = new HTML({
|
|
329
509
|
id : "sampleFrame",
|
|
330
510
|
content : '<iframe src="' + this.sIFrameUrl + '" id="sampleFrame" frameBorder="0"></iframe>'
|
|
@@ -335,17 +515,58 @@ sap.ui.define([
|
|
|
335
515
|
if (!this._oHtmlControl._jQueryHTMLControlLoadEventAttached) {
|
|
336
516
|
this._oHtmlControl.$().on("load", function () {
|
|
337
517
|
var oSampleFrame = this._oHtmlControl.$()[0].contentWindow,
|
|
338
|
-
oSampleFrameCore = oSampleFrame.sap.ui.getCore()
|
|
518
|
+
oSampleFrameCore = oSampleFrame.sap.ui.getCore(),
|
|
519
|
+
oFrame = document.getElementById("sampleFrame");
|
|
520
|
+
|
|
521
|
+
this._oMessageBundle = null;
|
|
522
|
+
this._oSettingsDialog = null;
|
|
523
|
+
this._oBusyDialog = null;
|
|
524
|
+
|
|
525
|
+
if (this.oModel.getData().iframe) {
|
|
526
|
+
Promise.all([
|
|
527
|
+
oSampleFrameCore.loadLibrary("sap.ui.fl", {async: true}),
|
|
528
|
+
oSampleFrameCore.loadLibrary("sap.ui.rta", {async: true})
|
|
529
|
+
]).then(function () {
|
|
530
|
+
oSampleFrame.sap.ui.require([
|
|
531
|
+
"sap/ui/fl/Utils",
|
|
532
|
+
"sap/ui/fl/FakeLrepConnectorLocalStorage",
|
|
533
|
+
"sap/ui/core/util/reflection/JsControlTreeModifier"
|
|
534
|
+
], this._loadRTA.bind(this));
|
|
535
|
+
}.bind(this));
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
oFrame.onToggleAdaptationMode = function () {
|
|
539
|
+
oSampleFrame.sap.ui.require([
|
|
540
|
+
"sap/ui/rta/api/startKeyUserAdaptation"
|
|
541
|
+
], function (
|
|
542
|
+
startKeyUserAdaptation
|
|
543
|
+
) {
|
|
544
|
+
if (!this._oRTA) {
|
|
545
|
+
var oContainer = oSampleFrameCore.byId("__container0");
|
|
546
|
+
|
|
547
|
+
startKeyUserAdaptation({
|
|
548
|
+
rootControl : oContainer.getComponentInstance()
|
|
549
|
+
}).then(function(oRta) {
|
|
550
|
+
this._oRTA = oRta;
|
|
551
|
+
oContainer.$().css({"padding-top": "2.5rem", "box-sizing": "border-box"});
|
|
552
|
+
this._oRTA.attachStop(function () {
|
|
553
|
+
oContainer.$().css({"padding-top": "0", "box-sizing": "content-box"});
|
|
554
|
+
this._oRTA.destroy();
|
|
555
|
+
delete this._oRTA;
|
|
556
|
+
}.bind(this));
|
|
557
|
+
}.bind(this));
|
|
558
|
+
}
|
|
559
|
+
}.bind(this));
|
|
560
|
+
};
|
|
561
|
+
}
|
|
339
562
|
|
|
340
563
|
// Apply theme settings to iframe sample
|
|
341
564
|
oSampleFrame.sap.ui.getCore().attachInit(function () {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
oSampleFrameCore.
|
|
345
|
-
|
|
346
|
-
oSampleFrame.jQuery('body')
|
|
347
|
-
.toggleClass("sapUiSizeCompact", bCompact)
|
|
348
|
-
.toggleClass("sapUiSizeCozy", !bCompact);
|
|
565
|
+
oSampleFrameCore.applyTheme(ResourcesUtil.getHasProxy() ?
|
|
566
|
+
this._oSampleIframeSettings.themeActive : this._oCore.getConfiguration().getTheme());
|
|
567
|
+
oSampleFrameCore.getConfiguration().setRTL(ResourcesUtil.getHasProxy() ?
|
|
568
|
+
this._oSampleIframeSettings.rtl : this._oCore.getConfiguration().getRTL());
|
|
569
|
+
this._toggleContentDensityClasses(oSampleFrame.jQuery('body'), this._oSampleIframeSettings.densityMode);
|
|
349
570
|
|
|
350
571
|
// Notify Core for content density change
|
|
351
572
|
oSampleFrameCore.notifyContentDensityChanged();
|
|
@@ -395,7 +616,7 @@ sap.ui.define([
|
|
|
395
616
|
},
|
|
396
617
|
|
|
397
618
|
onDemoKitThemeChanged: function(sChannelId, sEventId, oData) {
|
|
398
|
-
if (this._oHtmlControl) {
|
|
619
|
+
if (this._oHtmlControl && !ResourcesUtil.getHasProxy()) {
|
|
399
620
|
this._oHtmlControl.$()[0].contentWindow.sap.ui.getCore().applyTheme(oData.sThemeActive);
|
|
400
621
|
}
|
|
401
622
|
this.setDefaultSampleTheme();
|
|
@@ -436,12 +657,7 @@ sap.ui.define([
|
|
|
436
657
|
this.sIFrameUrl = this.sIFrameUrl + decodeURI(oIFrameURL.search);
|
|
437
658
|
},
|
|
438
659
|
|
|
439
|
-
_loadRTA: function (
|
|
440
|
-
sap.ui.require([
|
|
441
|
-
"sap/ui/fl/Utils",
|
|
442
|
-
"sap/ui/fl/FakeLrepConnectorLocalStorage",
|
|
443
|
-
"sap/ui/core/util/reflection/JsControlTreeModifier"
|
|
444
|
-
], function (
|
|
660
|
+
_loadRTA: function (
|
|
445
661
|
Utils,
|
|
446
662
|
FakeLrepConnectorLocalStorage,
|
|
447
663
|
JsControlTreeModifier
|
|
@@ -469,18 +685,23 @@ sap.ui.define([
|
|
|
469
685
|
this._oRTA = null;
|
|
470
686
|
}
|
|
471
687
|
}, this);
|
|
472
|
-
}.bind(this));
|
|
473
688
|
},
|
|
474
689
|
|
|
475
690
|
onToggleAdaptationMode : function (oEvt) {
|
|
691
|
+
if (this.oModel.getData().iframe) {
|
|
692
|
+
window.document.getElementsByTagName("iframe")[0].onToggleAdaptationMode();
|
|
693
|
+
return;
|
|
694
|
+
}
|
|
476
695
|
sap.ui.require([
|
|
477
696
|
"sap/ui/rta/api/startKeyUserAdaptation"
|
|
478
697
|
], function (
|
|
479
698
|
startKeyUserAdaptation
|
|
480
699
|
) {
|
|
481
700
|
if (!this._oRTA) {
|
|
701
|
+
var oContainer = this.byId("page").getContent()[0];
|
|
702
|
+
|
|
482
703
|
startKeyUserAdaptation({
|
|
483
|
-
rootControl :
|
|
704
|
+
rootControl : oContainer.getComponentInstance()
|
|
484
705
|
}).then(function(oRta) {
|
|
485
706
|
this._oRTA = oRta;
|
|
486
707
|
this._oRTA.attachStop(function () {
|
|
@@ -405,7 +405,7 @@ sap.ui.define([
|
|
|
405
405
|
/**
|
|
406
406
|
* Iterates over all links marked as external and adds a icon and disclaimer proxy
|
|
407
407
|
*
|
|
408
|
-
* @param oElement
|
|
408
|
+
* @param {Element} oElement the DOM ref to the container
|
|
409
409
|
* @private
|
|
410
410
|
*/
|
|
411
411
|
_fixExternalLinks: function (oElement) {
|
|
@@ -432,7 +432,7 @@ sap.ui.define([
|
|
|
432
432
|
* 1. First loop - calculates the sum of all colgroup children
|
|
433
433
|
* 2. Second loop - transforms the origin values to percent
|
|
434
434
|
*
|
|
435
|
-
* @param oElement
|
|
435
|
+
* @param {Element} oElement the DOM ref to the container
|
|
436
436
|
* @private
|
|
437
437
|
*/
|
|
438
438
|
_computeColumnGroupValues: function (oElement) {
|
|
@@ -471,8 +471,8 @@ sap.ui.define([
|
|
|
471
471
|
* 1) The link is a non SAP and the icon image is link-external.png
|
|
472
472
|
* 2) The link is a SAP and the icon image is link-sap.png
|
|
473
473
|
*
|
|
474
|
-
* @param aDomRef
|
|
475
|
-
* @param sHref
|
|
474
|
+
* @param {Element} aDomRef the DOM ref to the external link
|
|
475
|
+
* @param {string} sHref the url string
|
|
476
476
|
* @private
|
|
477
477
|
*/
|
|
478
478
|
_addIconToExternalUrl: function (aDomRef, sHref) {
|
|
@@ -529,9 +529,9 @@ sap.ui.define([
|
|
|
529
529
|
* 3) The first seven symbols from the ID used in the Demo Kit URLs are added at the end
|
|
530
530
|
* 4) The file type is added at the end “.md”
|
|
531
531
|
*
|
|
532
|
-
* @param sUrl
|
|
533
|
-
* @param sTitle
|
|
534
|
-
* @returns {string}
|
|
532
|
+
* @param {string} sUrl the url of the file in the internal repo
|
|
533
|
+
* @param {string} sTitle the title of the file
|
|
534
|
+
* @returns {string} the url of the file in the GitHub repo
|
|
535
535
|
* @private
|
|
536
536
|
*/
|
|
537
537
|
_formatToGitHubUrl: function(sUrl, sTitle) {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([], function () {
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
"sap.f.sample.IllustratedMessageInCardNoActivities": {
|
|
12
|
+
entityId: "sap.m.IllustratedMessage",
|
|
13
|
+
sampleId: "sap.m.sample.IllustratedMessageInCardNoActivities"
|
|
14
|
+
},
|
|
15
|
+
"sap.f.sample.IllustratedMessageInCardNoEmail": {
|
|
16
|
+
entityId: "sap.m.IllustratedMessage",
|
|
17
|
+
sampleId: "sap.m.sample.IllustratedMessageInCardNoEmail"
|
|
18
|
+
},
|
|
19
|
+
"sap.f.sample.IllustratedMessageInDialog": {
|
|
20
|
+
entityId: "sap.m.IllustratedMessage",
|
|
21
|
+
sampleId: "sap.m.sample.IllustratedMessageInDialog"
|
|
22
|
+
},
|
|
23
|
+
"sap.f.sample.IllustratedMessageInPage": {
|
|
24
|
+
entityId: "sap.m.IllustratedMessage",
|
|
25
|
+
sampleId: "sap.m.sample.IllustratedMessageInPage"
|
|
26
|
+
},
|
|
27
|
+
"sap.f.sample.IllustratedMessageInPageTNT": {
|
|
28
|
+
entityId: "sap.m.IllustratedMessage",
|
|
29
|
+
sampleId: "sap.m.sample.IllustratedMessageInPageTNT"
|
|
30
|
+
},
|
|
31
|
+
"sap.f.sample.IllustratedMessageSessionTimeout": {
|
|
32
|
+
entityId: "sap.m.IllustratedMessage",
|
|
33
|
+
sampleId: "sap.m.sample.IllustratedMessageSessionTimeout"
|
|
34
|
+
},
|
|
35
|
+
"sap.f.sample.Avatar": {
|
|
36
|
+
entityId: "sap.m.Avatar",
|
|
37
|
+
sampleId: "sap.m.sample.Avatar"
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
});
|
|
@@ -34,6 +34,7 @@ sap.ui.define([],
|
|
|
34
34
|
oRm.text('Filter');
|
|
35
35
|
oRm.close('a');
|
|
36
36
|
oRm.openStart("ul", oControl.getId() + "-optionsList");
|
|
37
|
+
oRm.attr("tabindex", 0);
|
|
37
38
|
if (!oControl.getProperty("expanded")){
|
|
38
39
|
oRm.style("display", "none");
|
|
39
40
|
}
|
|
@@ -56,9 +57,14 @@ sap.ui.define([],
|
|
|
56
57
|
oRm.attr("checked", "true");
|
|
57
58
|
}
|
|
58
59
|
oRm.attr("type", "checkbox");
|
|
60
|
+
oRm.attr("id", "dropDownFilterOption" + index);
|
|
59
61
|
oRm.attr("index", index);
|
|
60
62
|
oRm.voidEnd();
|
|
61
|
-
|
|
63
|
+
oRm.openStart("label");
|
|
64
|
+
oRm.attr("for", "dropDownFilterOption" + index);
|
|
65
|
+
oRm.openEnd("label");
|
|
66
|
+
oRm.text(sOption);
|
|
67
|
+
oRm.close("label");
|
|
62
68
|
oRm.close("li");
|
|
63
69
|
});
|
|
64
70
|
|
|
@@ -1816,12 +1816,21 @@ html[dir="rtl"] .sapUiDemoKitTreeItemIcon {
|
|
|
1816
1816
|
.sapUiTheme-sap_fiori_3 .sapTntToolHeader .sapMSlt.menuSelect.sapUiDocumentationSelect .sapMSltLabel:after {
|
|
1817
1817
|
content: "";
|
|
1818
1818
|
position: absolute;
|
|
1819
|
-
bottom: 0;
|
|
1819
|
+
bottom: 0.188rem;
|
|
1820
1820
|
left: 0.5rem;
|
|
1821
1821
|
right: 2.5rem;
|
|
1822
1822
|
padding-right: 1rem;
|
|
1823
1823
|
border-bottom: 0.188rem solid #d1e8ff;
|
|
1824
|
-
border-radius: 0.125rem
|
|
1824
|
+
border-radius: 0.125rem;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
.sapUiTheme-sap_fiori_3.sapUiMedia-Std-Phone .sapTntToolHeader .sapMSlt.sapUiDocumentationSelect,
|
|
1828
|
+
.sap-phone .sapTntToolHeader .sapMSlt.sapUiDocumentationSelect {
|
|
1829
|
+
height: 2.75rem;
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
.sapUiTheme-sap_fiori_3 .sapTntToolHeader .sapMSlt.menuSelect.sapUiDocumentationSelect .sapMSltLabel {
|
|
1833
|
+
border: none;
|
|
1825
1834
|
}
|
|
1826
1835
|
|
|
1827
1836
|
/* SAP Quartz Light theme - end */
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval';"/>
|
|
6
7
|
<title>SAPUI5 Navigation</title>
|
|
7
8
|
<script>
|
|
8
9
|
|
|
@@ -10,24 +11,37 @@
|
|
|
10
11
|
sSamplePath = new window.URLSearchParams(window.location.search).get('sap-ui-xx-sample-path'),
|
|
11
12
|
sOrigin = new window.URLSearchParams(window.location.search).get('sap-ui-xx-sample-origin'),
|
|
12
13
|
sVersion = new window.URLSearchParams(window.location.search).get('sap-ui-xx-sample-version'),
|
|
13
|
-
|
|
14
|
+
sOriginEncoded,
|
|
15
|
+
oBaseTag,
|
|
16
|
+
oScriptTag,
|
|
14
17
|
oPath = {};
|
|
18
|
+
|
|
15
19
|
if (!sOrigin || sOrigin == ".") {
|
|
16
20
|
sOrigin = window.location.origin + (window.location.pathname.includes("testsuite") ? "/testsuite" : "");
|
|
17
21
|
} else {
|
|
18
|
-
sOrigin = sOrigin + sVersion;
|
|
22
|
+
sOrigin = new URL(sOrigin, document.baseURI).pathname + sVersion;
|
|
19
23
|
}
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
sOriginEncoded = encodeURI(sOrigin);
|
|
26
|
+
|
|
27
|
+
oPath[sSampleId.replace(/\./g, "/")] = encodeURI(sSamplePath);
|
|
28
|
+
oPath["sap/ui/demo/mock"] = sOriginEncoded + "/test-resources/sap/ui/documentation/sdk";
|
|
23
29
|
oPath["test-resources/sap/ui/documentation/sdk"] = ".";
|
|
24
|
-
oPath["sap/uxap/sample"] =
|
|
30
|
+
oPath["sap/uxap/sample"] = sOriginEncoded + "/test-resources/sap/uxap/demokit/sample";
|
|
25
31
|
|
|
32
|
+
oBaseTag = document.createElement("base");
|
|
33
|
+
oBaseTag.setAttribute("href", sOriginEncoded + "/");
|
|
34
|
+
document.head.appendChild(oBaseTag);
|
|
26
35
|
|
|
36
|
+
oScriptTag = document.createElement("script");
|
|
37
|
+
oScriptTag.setAttribute("src", sOriginEncoded + "/resources/sap-ui-core.js");
|
|
38
|
+
oScriptTag.setAttribute("id", "sap-ui-bootstrap");
|
|
39
|
+
oScriptTag.setAttribute("data-sap-ui-compatVersion", "edge");
|
|
40
|
+
oScriptTag.dataset.sapUiAsync = true;
|
|
41
|
+
oScriptTag.dataset.sapUiLibs = "sap.m";
|
|
42
|
+
oScriptTag.dataset.sapUiResourceroots = JSON.stringify(oPath);
|
|
27
43
|
|
|
28
|
-
document.write(
|
|
29
|
-
"data-sap-ui-libs='sap.m' data-sap-ui-bindingSyntax='complex' data-sap-ui-compatVersion='edge'></scr" + "ipt>");
|
|
30
|
-
document.write("<base href=" + sOrigin + "/>");
|
|
44
|
+
document.write(oScriptTag.outerHTML);
|
|
31
45
|
|
|
32
46
|
</script>
|
|
33
47
|
</head>
|
|
@@ -255,7 +255,9 @@ sap.ui.define([
|
|
|
255
255
|
bParsed = /^blob:/.test(sTarget)
|
|
256
256
|
|| /^https?:\/\//.test(sTarget)
|
|
257
257
|
|| /^test-resources\//.test(sTarget)
|
|
258
|
-
|| /^resources\//.test(sTarget)
|
|
258
|
+
|| /^resources\//.test(sTarget)
|
|
259
|
+
|| /^tel:/.test(sTarget)
|
|
260
|
+
|| /^mailto:/.test(sTarget);
|
|
259
261
|
|
|
260
262
|
// If we have no target by here we give up
|
|
261
263
|
if (sTarget && !bParsed) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
xmlns="sap.m"
|
|
3
3
|
xmlns:core="sap.ui.core">
|
|
4
4
|
<ResponsivePopover
|
|
5
|
-
id="
|
|
5
|
+
id="newsPopover"
|
|
6
6
|
placement="Bottom"
|
|
7
7
|
title="{i18n>APP_NEWS_BTN_TOOLTIP}">
|
|
8
8
|
<beginButton>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
items="{path: 'news>/items', templateShareable: false}"
|
|
25
25
|
>
|
|
26
26
|
<layoutData>
|
|
27
|
-
<FlexItemData maxHeight="450px" />
|
|
27
|
+
<FlexItemData maxHeight="450px" maxWidth="600px" />
|
|
28
28
|
</layoutData>
|
|
29
29
|
|
|
30
30
|
<NotificationListItem
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
class="sapUiHideOnPhone"
|
|
62
62
|
tooltip="{i18n>SAMPLE_ADAPT_BTN_TOOLTIP}"
|
|
63
63
|
press="onToggleAdaptationMode"
|
|
64
|
-
visible="{=
|
|
64
|
+
visible="{= ${/rtaLoaded}}" />
|
|
65
65
|
<Button
|
|
66
66
|
id="code"
|
|
67
67
|
icon="sap-icon://syntax"
|
|
@@ -72,6 +72,10 @@
|
|
|
72
72
|
tooltip="{i18n>SAMPLE_NEW_TAB_BTN_TOOLTIP}"
|
|
73
73
|
icon="sap-icon://inspect"
|
|
74
74
|
press="onNewTab" />
|
|
75
|
+
<Button id="sampleSettings"
|
|
76
|
+
visible="{= ${/showSettings}}"
|
|
77
|
+
icon="sap-icon://action-settings"
|
|
78
|
+
press="handleSettings" />
|
|
75
79
|
<Button
|
|
76
80
|
class="sapUiHideOnPhone"
|
|
77
81
|
text="{i18n>SAMPLE_DOWNLOAD_BTN_TOOLTIP}"
|