@openui5/sap.ui.rta 1.98.0 → 1.99.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 +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +1 -1
- package/src/sap/ui/rta/RuntimeAuthoring.js +48 -41
- package/src/sap/ui/rta/Utils.js +2 -2
- package/src/sap/ui/rta/appContexts/AppContextsOverviewDialog.js +76 -0
- package/src/sap/ui/rta/appContexts/Component.js +31 -0
- package/src/sap/ui/rta/appContexts/controller/ManageContexts.controller.js +323 -0
- package/src/sap/ui/rta/appContexts/controller/RestAPIConnector.js +22 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n.properties +47 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ar.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_bg.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ca.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_cs.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_cy.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_da.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_de.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_el.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_GB.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_sappsd.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_saprigi.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_saptrc.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_es.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_es_MX.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_et.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_fi.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_fr.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_fr_CA.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_hi.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_hr.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_hu.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_id.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_it.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_iw.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ja.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_kk.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ko.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_lt.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_lv.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ms.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_nl.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_no.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_pl.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_pt.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_pt_PT.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ro.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ru.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_sh.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_sk.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_sl.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_sv.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_th.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_tr.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_uk.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_vi.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_zh_CN.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_zh_TW.properties +23 -0
- package/src/sap/ui/rta/appContexts/index.html +25 -0
- package/src/sap/ui/rta/appContexts/manifest.json +52 -0
- package/src/sap/ui/rta/appContexts/view/EditContextsDialog.fragment.xml +76 -0
- package/src/sap/ui/rta/appContexts/view/ManageContexts.view.xml +103 -0
- package/src/sap/ui/rta/appContexts/view/SaveAsContextsDialog.fragment.xml +76 -0
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +6 -3
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +11 -11
- package/src/sap/ui/rta/appVariant/Feature.js +16 -6
- package/src/sap/ui/rta/command/AddIFrame.js +1 -1
- package/src/sap/ui/rta/command/AddProperty.js +1 -1
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
- package/src/sap/ui/rta/command/BaseCommand.js +1 -1
- package/src/sap/ui/rta/command/BindProperty.js +1 -1
- package/src/sap/ui/rta/command/Combine.js +5 -1
- package/src/sap/ui/rta/command/CommandFactory.js +15 -11
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/CreateContainer.js +1 -1
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +1 -1
- package/src/sap/ui/rta/command/LREPSerializer.js +1 -1
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -1
- package/src/sap/ui/rta/command/Settings.js +1 -1
- package/src/sap/ui/rta/command/Split.js +1 -1
- package/src/sap/ui/rta/command/Stack.js +1 -1
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +7 -4
- package/src/sap/ui/rta/messagebundle_ar.properties +5 -3
- package/src/sap/ui/rta/messagebundle_bg.properties +7 -5
- package/src/sap/ui/rta/messagebundle_ca.properties +5 -3
- package/src/sap/ui/rta/messagebundle_cs.properties +5 -3
- package/src/sap/ui/rta/messagebundle_cy.properties +5 -3
- package/src/sap/ui/rta/messagebundle_da.properties +5 -3
- package/src/sap/ui/rta/messagebundle_de.properties +5 -3
- package/src/sap/ui/rta/messagebundle_el.properties +5 -3
- package/src/sap/ui/rta/messagebundle_en.properties +5 -3
- package/src/sap/ui/rta/messagebundle_en_GB.properties +5 -3
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +5 -3
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +39 -20
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +5 -3
- package/src/sap/ui/rta/messagebundle_es.properties +5 -3
- package/src/sap/ui/rta/messagebundle_es_MX.properties +6 -4
- package/src/sap/ui/rta/messagebundle_et.properties +5 -3
- package/src/sap/ui/rta/messagebundle_fi.properties +5 -3
- package/src/sap/ui/rta/messagebundle_fr.properties +5 -3
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +5 -3
- package/src/sap/ui/rta/messagebundle_hi.properties +5 -3
- package/src/sap/ui/rta/messagebundle_hr.properties +5 -3
- package/src/sap/ui/rta/messagebundle_hu.properties +5 -3
- package/src/sap/ui/rta/messagebundle_id.properties +5 -3
- package/src/sap/ui/rta/messagebundle_it.properties +5 -3
- package/src/sap/ui/rta/messagebundle_iw.properties +5 -3
- package/src/sap/ui/rta/messagebundle_ja.properties +5 -3
- package/src/sap/ui/rta/messagebundle_kk.properties +5 -3
- package/src/sap/ui/rta/messagebundle_ko.properties +5 -3
- package/src/sap/ui/rta/messagebundle_lt.properties +5 -3
- package/src/sap/ui/rta/messagebundle_lv.properties +7 -5
- package/src/sap/ui/rta/messagebundle_ms.properties +5 -3
- package/src/sap/ui/rta/messagebundle_nl.properties +5 -3
- package/src/sap/ui/rta/messagebundle_no.properties +5 -3
- package/src/sap/ui/rta/messagebundle_pl.properties +5 -3
- package/src/sap/ui/rta/messagebundle_pt.properties +5 -3
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +5 -3
- package/src/sap/ui/rta/messagebundle_ro.properties +5 -3
- package/src/sap/ui/rta/messagebundle_ru.properties +5 -3
- package/src/sap/ui/rta/messagebundle_sh.properties +5 -3
- package/src/sap/ui/rta/messagebundle_sk.properties +6 -4
- package/src/sap/ui/rta/messagebundle_sl.properties +5 -3
- package/src/sap/ui/rta/messagebundle_sv.properties +5 -3
- package/src/sap/ui/rta/messagebundle_th.properties +5 -3
- package/src/sap/ui/rta/messagebundle_tr.properties +5 -3
- package/src/sap/ui/rta/messagebundle_uk.properties +4 -2
- package/src/sap/ui/rta/messagebundle_vi.properties +5 -3
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +5 -3
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +5 -3
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
- package/src/sap/ui/rta/plugin/Combine.js +10 -3
- package/src/sap/ui/rta/plugin/ControlVariant.js +3 -3
- package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
- package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
- package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
- package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
- package/src/sap/ui/rta/plugin/EasyRemove.js +1 -1
- package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
- package/src/sap/ui/rta/plugin/Plugin.js +1 -1
- package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
- package/src/sap/ui/rta/plugin/Remove.js +2 -2
- package/src/sap/ui/rta/plugin/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/RenameHandler.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +21 -8
- package/src/sap/ui/rta/plugin/Settings.js +1 -1
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +39 -38
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
- package/src/sap/ui/rta/service/Action.js +1 -1
- package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
- package/src/sap/ui/rta/service/Outline.js +1 -1
- package/src/sap/ui/rta/service/Property.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +1 -1
- package/src/sap/ui/rta/themes/base/ChangeVisualization.less +42 -53
- package/src/sap/ui/rta/toolbar/Adaptation.js +1 -1
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
- package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/translation/Translation.js +52 -31
- package/src/sap/ui/rta/util/PluginManager.js +1 -1
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +107 -59
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +6 -5
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +64 -60
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +37 -0
- package/src/sap/ui/rta/util/changeVisualization/categories/MoveVisualization.js +5 -2
- package/src/sap/ui/rta/util/changeVisualization/categories/RenameVisualization.js +14 -2
- package/src/sap/ui/rta/util/changeVisualization/categories/SplitVisualization.js +5 -2
|
@@ -1,50 +1,59 @@
|
|
|
1
1
|
/******************************************************************
|
|
2
2
|
Style of the RTA Change Visualization - base theme
|
|
3
3
|
*******************************************************************/
|
|
4
|
-
@
|
|
5
|
-
@
|
|
6
|
-
@
|
|
7
|
-
@
|
|
8
|
-
@_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorSolidBG: white;
|
|
9
|
-
@_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorSolidHover: #0f648b;
|
|
10
|
-
@_sap_ui_rta_ChangeVisualization_DependentIndicatorColor: rgba(219,149,51,0.75);
|
|
11
|
-
@_sap_ui_rta_ChangeVisualization_DependentIndicatorColorTransparent: rgba(219,149,51,0);
|
|
12
|
-
@_sap_ui_rta_ChangeVisualization_DependentIndicatorColorFocus: #a67026;
|
|
13
|
-
@_sap_ui_rta_ChangeVisualization_DependentIndicatorColorSolid: rgb(219, 149, 51);
|
|
14
|
-
@_sap_ui_rta_ChangeVisualization_DependentIndicatorColorSolidHover: #b67a26;
|
|
15
|
-
@_sap_ui_rta_ChangeVisualization_ChangeIndicatorTextColor: #1c678a;
|
|
4
|
+
@_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorLight: @sapUiChartPaletteSequentialHue1Light1;
|
|
5
|
+
@_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorMedium: @sapUiChartPaletteSequentialHue1Dark1;
|
|
6
|
+
@_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorDark: @sapUiChartPaletteSequentialHue11Dark2;
|
|
7
|
+
@_sap_ui_rta_ChangeVisualization_DependentIndicatorColorTransparent: @sapUiGroupTitleBackground;
|
|
16
8
|
|
|
17
9
|
.sapUiRtaChangeIndicator{
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
height: 0.8rem;
|
|
11
|
+
width: 0.8rem;
|
|
20
12
|
position: relative;
|
|
13
|
+
border-radius: 50%;
|
|
14
|
+
margin-top: 0.25rem;
|
|
15
|
+
margin-left: 0.25rem;
|
|
16
|
+
transition: width 0.3s, height 0.3s, box-shadow 0.3s;
|
|
21
17
|
cursor: pointer;
|
|
22
18
|
}
|
|
23
19
|
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
background: radial-gradient(circle, transparent 41%, @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColor 72%, @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorSolid 100%);
|
|
20
|
+
.sapUiRtaChangeIndicator:focus{
|
|
21
|
+
outline: 0;
|
|
22
|
+
}
|
|
28
23
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
.sapUiRtaChangeIndicatorColorLight{
|
|
25
|
+
background-color: @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorLight;
|
|
26
|
+
opacity: 0.6;
|
|
27
|
+
}
|
|
33
28
|
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
.sapUiRtaChangeIndicatorColorMedium{
|
|
30
|
+
background-color: @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorMedium;
|
|
31
|
+
opacity: 0.75;
|
|
32
|
+
}
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
.sapUiRtaChangeIndicatorColorDark{
|
|
35
|
+
background-color: @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorDark;
|
|
36
|
+
opacity: 0.75;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.sapUiRtaChangeIndicatorVerticallyCentered{
|
|
40
|
+
top: 50%;
|
|
41
|
+
transform: translateY(-50%);
|
|
42
|
+
margin-top: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.sapUiRtaHover{
|
|
46
|
+
height: 0.9rem;
|
|
47
|
+
width: 0.9rem;
|
|
48
|
+
box-shadow: 0 0 0.25rem @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorDark;
|
|
41
49
|
}
|
|
42
50
|
|
|
43
51
|
.sapUiRtaChangeIndicatorDependent{
|
|
44
52
|
height: 100%;
|
|
45
|
-
width:
|
|
53
|
+
width: auto;
|
|
54
|
+
display: block;
|
|
46
55
|
position: absolute;
|
|
47
|
-
outline: 3px solid @
|
|
56
|
+
outline: 3px solid @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorDark;
|
|
48
57
|
outline-offset: -3px;
|
|
49
58
|
box-shadow: @_sap_ui_rta_Overlay_BoxShadow;
|
|
50
59
|
animation: fadeOut linear 1.5s;
|
|
@@ -52,11 +61,11 @@
|
|
|
52
61
|
|
|
53
62
|
@keyframes fadeOut {
|
|
54
63
|
0% {
|
|
55
|
-
outline: 3px solid @
|
|
64
|
+
outline: 3px solid @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorDark;
|
|
56
65
|
outline-offset: -3px;
|
|
57
66
|
}
|
|
58
67
|
66%{
|
|
59
|
-
outline: 3px solid @
|
|
68
|
+
outline: 3px solid @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorDark;
|
|
60
69
|
outline-offset: -3px;
|
|
61
70
|
}
|
|
62
71
|
100% {
|
|
@@ -67,28 +76,8 @@
|
|
|
67
76
|
}
|
|
68
77
|
}
|
|
69
78
|
|
|
70
|
-
.sapUiRtaChangeIndicatorText{
|
|
71
|
-
top: 0;
|
|
72
|
-
left: 0;
|
|
73
|
-
position: absolute;
|
|
74
|
-
width: 50%;
|
|
75
|
-
height: 50%;
|
|
76
|
-
border-radius: 50%;
|
|
77
|
-
background: @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorSolid;
|
|
78
|
-
color: black;
|
|
79
|
-
display: flex;
|
|
80
|
-
justify-content: center;
|
|
81
|
-
align-items: center;
|
|
82
|
-
opacity: 0.8;
|
|
83
|
-
cursor: pointer;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
79
|
.sapUiRtaChangeIndicatorHovered {
|
|
87
|
-
|
|
88
|
-
-moz-transition: background 0.1s cubic-bezier(1,.01,1,0);
|
|
89
|
-
-o-transition: background 0.1s cubic-bezier(1,.01,1,0);
|
|
90
|
-
transition: background 0.1s cubic-bezier(1,.01,1,0);
|
|
91
|
-
|
|
80
|
+
cursor: pointer!important;
|
|
92
81
|
&:after {
|
|
93
82
|
content: " ";
|
|
94
83
|
border: 0.0625rem solid @_sap_ui_rta_Overlay_HoverBorder!important; //1px
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
/* global FormData */
|
|
8
|
+
|
|
7
9
|
sap.ui.define([
|
|
8
10
|
"sap/ui/base/ManagedObject",
|
|
9
11
|
"sap/ui/core/Fragment",
|
|
@@ -15,8 +17,7 @@ sap.ui.define([
|
|
|
15
17
|
"sap/ui/fl/write/api/TranslationAPI",
|
|
16
18
|
"sap/ui/fl/Layer",
|
|
17
19
|
"sap/ui/core/util/File"
|
|
18
|
-
],
|
|
19
|
-
function(
|
|
20
|
+
], function(
|
|
20
21
|
ManagedObject,
|
|
21
22
|
Fragment,
|
|
22
23
|
Utils,
|
|
@@ -30,6 +31,34 @@ function(
|
|
|
30
31
|
) {
|
|
31
32
|
"use strict";
|
|
32
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Controller for the <code>sap.ui.rta.toolbar.translation.Translation</code> controls.
|
|
36
|
+
* Contains implementation of translation functionality.
|
|
37
|
+
*
|
|
38
|
+
* @class
|
|
39
|
+
*
|
|
40
|
+
* @author SAP SE
|
|
41
|
+
* @version 1.99.0
|
|
42
|
+
*
|
|
43
|
+
* @constructor
|
|
44
|
+
* @private
|
|
45
|
+
* @since 1.93
|
|
46
|
+
* @alias sap.ui.rta.toolbar.translation.Translation
|
|
47
|
+
*/
|
|
48
|
+
var Translation = ManagedObject.extend("sap.ui.rta.toolbar.translation.Translation", {
|
|
49
|
+
metadata: {
|
|
50
|
+
properties: {
|
|
51
|
+
toolbar: {
|
|
52
|
+
type: "sap.ui.rta.toolbar.Base"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
constructor: function () {
|
|
57
|
+
ManagedObject.prototype.constructor.apply(this, arguments);
|
|
58
|
+
this._oTranslationModel = new JSONModel(getTranslationModelData());
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
33
62
|
function saveFiles(oEvent) {
|
|
34
63
|
this._oTranslationModel.setProperty("/file", oEvent.getParameter("files")[0]);
|
|
35
64
|
}
|
|
@@ -82,7 +111,8 @@ function(
|
|
|
82
111
|
onCancelUploadDialog: function () {
|
|
83
112
|
this._oDialogUpload.close();
|
|
84
113
|
}.bind(this),
|
|
85
|
-
saveFiles: saveFiles.bind(this)
|
|
114
|
+
saveFiles: saveFiles.bind(this),
|
|
115
|
+
handleUploadPress: handleUploadPress.bind(this, sUploadId)
|
|
86
116
|
}
|
|
87
117
|
}).then(function (oTranslationDialog) {
|
|
88
118
|
this._oDialogUpload = oTranslationDialog;
|
|
@@ -92,6 +122,25 @@ function(
|
|
|
92
122
|
}.bind(this));
|
|
93
123
|
}
|
|
94
124
|
|
|
125
|
+
|
|
126
|
+
function handleUploadPress(sUploadId) {
|
|
127
|
+
var oFileUploader = sap.ui.getCore().byId(sUploadId + "--fileUploader");
|
|
128
|
+
oFileUploader.checkFileReadable().then(function() {
|
|
129
|
+
if (this._oTranslationModel.getProperty("/file")) {
|
|
130
|
+
var mPropertyBag = {
|
|
131
|
+
layer: Layer.CUSTOMER,
|
|
132
|
+
payload: new FormData()
|
|
133
|
+
};
|
|
134
|
+
mPropertyBag.payload.append("file", this._oTranslationModel.getProperty("/file"), oFileUploader.getValue());
|
|
135
|
+
TranslationAPI.postTranslationTexts(mPropertyBag).then(function () {
|
|
136
|
+
MessageToast.show("Translation texts import successful");
|
|
137
|
+
}).catch(function (sError) {
|
|
138
|
+
MessageBox.error("Translation texts import failed: " + sError);
|
|
139
|
+
}).finally(oFileUploader.clear.bind(oFileUploader));
|
|
140
|
+
}
|
|
141
|
+
}.bind(this));
|
|
142
|
+
}
|
|
143
|
+
|
|
95
144
|
function getTranslationModelData() {
|
|
96
145
|
return Object.assign({}, {
|
|
97
146
|
sourceLanguage: "",
|
|
@@ -101,34 +150,6 @@ function(
|
|
|
101
150
|
});
|
|
102
151
|
}
|
|
103
152
|
|
|
104
|
-
/**
|
|
105
|
-
* Controller for the <code>sap.ui.rta.toolbar.translation.Translation</code> controls.
|
|
106
|
-
* Contains implementation of translation functionality.
|
|
107
|
-
*
|
|
108
|
-
* @class
|
|
109
|
-
*
|
|
110
|
-
* @author SAP SE
|
|
111
|
-
* @version 1.98.0
|
|
112
|
-
*
|
|
113
|
-
* @constructor
|
|
114
|
-
* @private
|
|
115
|
-
* @since 1.93
|
|
116
|
-
* @alias sap.ui.rta.toolbar.translation.Translation
|
|
117
|
-
*/
|
|
118
|
-
var Translation = ManagedObject.extend("sap.ui.rta.toolbar.translation.Translation", {
|
|
119
|
-
metadata: {
|
|
120
|
-
properties: {
|
|
121
|
-
toolbar: {
|
|
122
|
-
type: "sap.ui.rta.toolbar.Base"
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
constructor: function () {
|
|
127
|
-
ManagedObject.prototype.constructor.apply(this, arguments);
|
|
128
|
-
this._oTranslationModel = new JSONModel(getTranslationModelData());
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
|
|
132
153
|
Translation.prototype.showTranslationPopover = function (oEvent) {
|
|
133
154
|
var oTranslationButton = oEvent.getSource();
|
|
134
155
|
|
|
@@ -13,7 +13,9 @@ sap.ui.define([
|
|
|
13
13
|
"sap/ui/events/KeyCodes",
|
|
14
14
|
"sap/ui/rta/util/changeVisualization/categories/getVisualizationCategory",
|
|
15
15
|
"sap/ui/fl/Utils",
|
|
16
|
-
"sap/ui/fl/util/resolveBinding"
|
|
16
|
+
"sap/ui/fl/util/resolveBinding",
|
|
17
|
+
"sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils",
|
|
18
|
+
"sap/ui/core/Core"
|
|
17
19
|
], function(
|
|
18
20
|
Fragment,
|
|
19
21
|
JSONModel,
|
|
@@ -23,9 +25,20 @@ sap.ui.define([
|
|
|
23
25
|
KeyCodes,
|
|
24
26
|
getVisualizationCategory,
|
|
25
27
|
FlUtils,
|
|
26
|
-
resolveBinding
|
|
28
|
+
resolveBinding,
|
|
29
|
+
ChangeVisualizationUtils,
|
|
30
|
+
Core
|
|
27
31
|
) {
|
|
28
32
|
"use strict";
|
|
33
|
+
|
|
34
|
+
var CATEGORY_ICONS = {
|
|
35
|
+
add: "sap-icon://add",
|
|
36
|
+
move: "sap-icon://move",
|
|
37
|
+
rename: "sap-icon://edit",
|
|
38
|
+
combinesplit: "sap-icon://combine",
|
|
39
|
+
remove: "sap-icon://less"
|
|
40
|
+
};
|
|
41
|
+
|
|
29
42
|
/**
|
|
30
43
|
* @class
|
|
31
44
|
* Constructor for a new <code>sap.ui.rta.util.changeVisualization.ChangeIndicator</code> class.
|
|
@@ -35,7 +48,7 @@ sap.ui.define([
|
|
|
35
48
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
|
|
36
49
|
* @author SAP SE
|
|
37
50
|
* @since 1.84.0
|
|
38
|
-
* @version 1.
|
|
51
|
+
* @version 1.99.0
|
|
39
52
|
* @private
|
|
40
53
|
*/
|
|
41
54
|
var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
|
|
@@ -79,11 +92,6 @@ sap.ui.define([
|
|
|
79
92
|
type: "sap.m.Popover",
|
|
80
93
|
multiple: false,
|
|
81
94
|
visibility: "hidden"
|
|
82
|
-
},
|
|
83
|
-
_text: {
|
|
84
|
-
type: "sap.m.Text",
|
|
85
|
-
multiple: false,
|
|
86
|
-
visibility: "hidden"
|
|
87
95
|
}
|
|
88
96
|
},
|
|
89
97
|
events: {
|
|
@@ -115,59 +123,87 @@ sap.ui.define([
|
|
|
115
123
|
oRm.openStart("div", oControl);
|
|
116
124
|
oRm.class("sapUiRtaChangeIndicator");
|
|
117
125
|
oRm.class("sapUiRtaChangeIndicatorChange");
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
126
|
+
if (oControl.getChanges().length > 4) {
|
|
127
|
+
oRm.class("sapUiRtaChangeIndicatorColorDark");
|
|
128
|
+
} else if (oControl.getChanges().length > 1) {
|
|
129
|
+
oRm.class("sapUiRtaChangeIndicatorColorMedium");
|
|
130
|
+
} else {
|
|
131
|
+
oRm.class("sapUiRtaChangeIndicatorColorLight");
|
|
132
|
+
}
|
|
122
133
|
oRm.openEnd();
|
|
123
|
-
oRm.renderControl(oControl.getAggregation("_text"));
|
|
124
|
-
oRm.close("div");
|
|
125
134
|
oRm.close("div");
|
|
126
135
|
}
|
|
127
136
|
},
|
|
128
|
-
constructor: function
|
|
137
|
+
constructor: function() {
|
|
129
138
|
this._oDetailModel = new JSONModel();
|
|
130
139
|
this._oDetailModel.setDefaultBindingMode("OneWay");
|
|
131
140
|
|
|
132
141
|
Control.prototype.constructor.apply(this, arguments);
|
|
142
|
+
|
|
143
|
+
this._fnHoverTrue = this._toggleHoverStyleClasses.bind(this, true);
|
|
144
|
+
this._fnHoverFalse = this._toggleHoverStyleClasses.bind(this, false);
|
|
133
145
|
}
|
|
134
146
|
});
|
|
135
147
|
|
|
136
|
-
|
|
148
|
+
function handleBrowserEventsOnElement(oElement, sEventHandler) {
|
|
149
|
+
oElement[sEventHandler]("click", this._onSelect, this);
|
|
150
|
+
oElement[sEventHandler]("tap", this._onSelect, this);
|
|
151
|
+
oElement[sEventHandler]("keydown", this._onKeyDown, this);
|
|
152
|
+
oElement[sEventHandler]("mouseout", this._fnHoverFalse);
|
|
153
|
+
oElement[sEventHandler]("focusout", this._fnHoverFalse);
|
|
154
|
+
oElement[sEventHandler]("mouseover", this._fnHoverTrue);
|
|
155
|
+
oElement[sEventHandler]("focusin", this._fnHoverTrue);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function centerVertically(oIndicator) {
|
|
159
|
+
var oIndicatorDomRef = oIndicator.getDomRef();
|
|
160
|
+
var iOverlayHeight = document.getElementById(oIndicator.getOverlayId()).offsetHeight;
|
|
161
|
+
var iIndicatorHeight = oIndicatorDomRef.offsetHeight;
|
|
162
|
+
// the indicator should be centered only if the element has a small enough height to improve the design and visibility
|
|
163
|
+
if (iOverlayHeight < iIndicatorHeight * 5) {
|
|
164
|
+
oIndicator.addStyleClass("sapUiRtaChangeIndicatorVerticallyCentered");
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
ChangeIndicator.prototype.init = function() {
|
|
137
169
|
this._iOldTabIndex = 0;
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
visible: "{= (${changes} || []).length > 1}"
|
|
141
|
-
}).addStyleClass("sapUiRtaChangeIndicatorText"));
|
|
170
|
+
handleBrowserEventsOnElement.call(this, this, "attachBrowserEvent");
|
|
171
|
+
};
|
|
142
172
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
173
|
+
ChangeIndicator.prototype.setVisible = function(bVisible) {
|
|
174
|
+
Control.prototype.setVisible.apply(this, arguments);
|
|
175
|
+
var oOverlay = Core.byId(this.getOverlayId());
|
|
176
|
+
// needed because the change indicator cleanup is only triggered on save and exit
|
|
177
|
+
if (oOverlay) {
|
|
178
|
+
if (bVisible) {
|
|
179
|
+
handleBrowserEventsOnElement.call(this, oOverlay, "attachBrowserEvent");
|
|
180
|
+
} else {
|
|
181
|
+
handleBrowserEventsOnElement.call(this, oOverlay, "detachBrowserEvent");
|
|
182
|
+
if (this.getAggregation("_popover")) {
|
|
183
|
+
this.getAggregation("_popover").destroy();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return this;
|
|
150
188
|
};
|
|
151
189
|
|
|
152
|
-
ChangeIndicator.prototype.focus = function
|
|
190
|
+
ChangeIndicator.prototype.focus = function() {
|
|
153
191
|
if (this.getDomRef()) {
|
|
154
192
|
// Element is rendered, focus immediately
|
|
155
193
|
Control.prototype.focus.apply(this, arguments);
|
|
156
194
|
this._bScheduledForFocus = false;
|
|
195
|
+
return;
|
|
157
196
|
}
|
|
158
197
|
this._bScheduledForFocus = true;
|
|
159
198
|
};
|
|
160
199
|
|
|
161
|
-
ChangeIndicator.prototype.
|
|
162
|
-
var oOverlay = document.getElementById(this.getOverlayId());
|
|
163
|
-
var iSize = oOverlay.offsetHeight;
|
|
164
|
-
return (iSize > 50 ? 50 : iSize) - 2;
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
ChangeIndicator.prototype.onAfterRendering = function () {
|
|
168
|
-
// Attach to the overlay
|
|
200
|
+
ChangeIndicator.prototype.onAfterRendering = function() {
|
|
169
201
|
var oOverlay = document.getElementById(this.getOverlayId());
|
|
170
|
-
oOverlay
|
|
202
|
+
if (oOverlay) {
|
|
203
|
+
// Attach to the overlay
|
|
204
|
+
oOverlay.appendChild(this.getDomRef());
|
|
205
|
+
centerVertically(this);
|
|
206
|
+
}
|
|
171
207
|
// Restore the Tabindex if stored before; set to 0 as default
|
|
172
208
|
this.getDomRef().tabIndex = this._iOldTabIndex;
|
|
173
209
|
|
|
@@ -178,21 +214,27 @@ sap.ui.define([
|
|
|
178
214
|
}
|
|
179
215
|
};
|
|
180
216
|
|
|
181
|
-
ChangeIndicator.prototype.exit = function
|
|
217
|
+
ChangeIndicator.prototype.exit = function() {
|
|
182
218
|
var oDomRef = this.getDomRef();
|
|
219
|
+
var oOverlay = Core.byId(this.getOverlayId());
|
|
183
220
|
if (oDomRef) {
|
|
184
221
|
oDomRef.parentNode.removeChild(oDomRef);
|
|
185
222
|
}
|
|
186
|
-
|
|
187
|
-
|
|
223
|
+
if (oOverlay) {
|
|
224
|
+
if (this.getAggregation("_popover")) {
|
|
225
|
+
this.getAggregation("_popover").destroy();
|
|
226
|
+
}
|
|
227
|
+
handleBrowserEventsOnElement.call(this, oOverlay, "detachBrowserEvent");
|
|
228
|
+
}
|
|
229
|
+
handleBrowserEventsOnElement.call(this, this, "detachBrowserEvent");
|
|
188
230
|
};
|
|
189
231
|
|
|
190
|
-
ChangeIndicator.prototype.setChanges = function
|
|
232
|
+
ChangeIndicator.prototype.setChanges = function(aChanges) {
|
|
191
233
|
this.setProperty("changes", aChanges);
|
|
192
|
-
this._oDetailModel.setData((aChanges || []).map(this._formatChangesModelItem.bind(this)));
|
|
234
|
+
this._oDetailModel.setData((aChanges || []).reverse().map(this._formatChangesModelItem.bind(this)));
|
|
193
235
|
};
|
|
194
236
|
|
|
195
|
-
ChangeIndicator.prototype._onSelect = function
|
|
237
|
+
ChangeIndicator.prototype._onSelect = function(oEvent) {
|
|
196
238
|
this.focus();
|
|
197
239
|
oEvent.stopPropagation();
|
|
198
240
|
this._openDetailPopover();
|
|
@@ -208,19 +250,23 @@ sap.ui.define([
|
|
|
208
250
|
});
|
|
209
251
|
};
|
|
210
252
|
|
|
211
|
-
ChangeIndicator.prototype._toggleHoverStyleClasses = function(bAdd) {
|
|
212
|
-
|
|
253
|
+
ChangeIndicator.prototype._toggleHoverStyleClasses = function(bAdd, oEvent) {
|
|
254
|
+
if (oEvent) {
|
|
255
|
+
oEvent.stopPropagation();
|
|
256
|
+
oEvent.preventDefault();
|
|
257
|
+
}
|
|
258
|
+
var oOverlay = Core.byId(this.getOverlayId());
|
|
213
259
|
if (oOverlay.getMetadata().getName() !== "sap.ui.dt.ElementOverlay") {
|
|
214
260
|
return;
|
|
215
261
|
}
|
|
216
262
|
var sFunctionName = bAdd ? "addStyleClass" : "removeStyleClass";
|
|
217
|
-
oOverlay[sFunctionName]("sapUiRtaOverlayHover");
|
|
218
263
|
oOverlay[sFunctionName]("sapUiRtaChangeIndicatorHovered");
|
|
264
|
+
this[sFunctionName]("sapUiRtaHover");
|
|
219
265
|
};
|
|
220
266
|
|
|
221
|
-
ChangeIndicator.prototype._formatChangesModelItem = function
|
|
222
|
-
var oAffectedElement =
|
|
223
|
-
var mPayload = Object.keys(mChangeInformation.payload || {}).reduce(function
|
|
267
|
+
ChangeIndicator.prototype._formatChangesModelItem = function(mChangeInformation) {
|
|
268
|
+
var oAffectedElement = Core.byId(mChangeInformation.affectedElementId);
|
|
269
|
+
var mPayload = Object.keys(mChangeInformation.payload || {}).reduce(function(mPayload, sKey) {
|
|
224
270
|
var vOriginalValue = mChangeInformation.payload[sKey];
|
|
225
271
|
var bIsBinding = FlUtils.isBinding(vOriginalValue);
|
|
226
272
|
var vValue = bIsBinding
|
|
@@ -230,36 +276,38 @@ sap.ui.define([
|
|
|
230
276
|
return mPayload;
|
|
231
277
|
}, {});
|
|
232
278
|
|
|
233
|
-
var oOverlay =
|
|
279
|
+
var oOverlay = Core.byId(this.getOverlayId());
|
|
234
280
|
var sElementLabel = oOverlay.getDesignTimeMetadata().getLabel(oAffectedElement);
|
|
235
281
|
var oVisualizationUtil = getVisualizationCategory(mChangeInformation.commandName);
|
|
236
282
|
var oDescription = oVisualizationUtil && oVisualizationUtil.getDescription(mPayload, sElementLabel);
|
|
237
|
-
var oRtaResourceBundle =
|
|
238
|
-
var sChangeTitle = mChangeInformation.commandName.charAt(0).toUpperCase() + mChangeInformation.commandName.slice(1);
|
|
283
|
+
var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
|
|
239
284
|
sElementLabel = sElementLabel && "'" + sElementLabel + "'";
|
|
285
|
+
var sShortenedElementLabel = ChangeVisualizationUtils.shortenString(sElementLabel);
|
|
240
286
|
var sChangeTextKey = (
|
|
241
287
|
"TXT_CHANGEVISUALIZATION_CHANGE_"
|
|
242
288
|
+ mChangeInformation.commandName.toUpperCase()
|
|
243
289
|
);
|
|
244
|
-
var
|
|
290
|
+
var sDescriptionText = oDescription ? oDescription.descriptionText : oRtaResourceBundle.getText(sChangeTextKey, sShortenedElementLabel);
|
|
291
|
+
var sDescriptionTooltip = oDescription ? oDescription.descriptionTooltip : oRtaResourceBundle.getText(sChangeTextKey, sElementLabel);
|
|
245
292
|
var sCreationDate = mChangeInformation.change.getCreation();
|
|
246
293
|
var oDate = new Date(sCreationDate);
|
|
247
294
|
var sFallbackDate = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CREATED_IN_SESSION_DATE");
|
|
248
295
|
var sFullDate = sCreationDate ? DateFormat.getDateTimeInstance().format(oDate) : sFallbackDate;
|
|
249
|
-
var sRelativeDate = sCreationDate ? DateFormat.getDateTimeInstance({relative: "true"}).format(oDate) : sFallbackDate;
|
|
296
|
+
var sRelativeDate = sCreationDate ? DateFormat.getDateTimeInstance({ relative: "true" }).format(oDate) : sFallbackDate;
|
|
250
297
|
var sDetailButtonText = oDescription && oDescription.buttonText;
|
|
251
298
|
return {
|
|
252
299
|
id: mChangeInformation.id,
|
|
253
300
|
change: mChangeInformation,
|
|
254
|
-
|
|
255
|
-
|
|
301
|
+
description: sDescriptionText,
|
|
302
|
+
descriptionTooltip: sDescriptionTooltip && sDescriptionText.length < sDescriptionTooltip.length ? sDescriptionTooltip : null,
|
|
256
303
|
fullDate: sFullDate,
|
|
257
304
|
relativeDate: sRelativeDate,
|
|
258
|
-
detailButtonText: sDetailButtonText
|
|
305
|
+
detailButtonText: sDetailButtonText,
|
|
306
|
+
icon: CATEGORY_ICONS[mChangeInformation.commandCategory]
|
|
259
307
|
};
|
|
260
308
|
};
|
|
261
309
|
|
|
262
|
-
ChangeIndicator.prototype._openDetailPopover = function
|
|
310
|
+
ChangeIndicator.prototype._openDetailPopover = function() {
|
|
263
311
|
if (!this.getAggregation("_popover")) {
|
|
264
312
|
//store the tabindex (tabindex will be removed on opening the popover)
|
|
265
313
|
this._iOldTabIndex = this.getDomRef().getAttribute("tabindex");
|
|
@@ -280,7 +328,7 @@ sap.ui.define([
|
|
|
280
328
|
}
|
|
281
329
|
};
|
|
282
330
|
|
|
283
|
-
ChangeIndicator.prototype._showDependentElements = function
|
|
331
|
+
ChangeIndicator.prototype._showDependentElements = function(oEvent) {
|
|
284
332
|
this.getAggregation("_popover").close();
|
|
285
333
|
var sChangeId = this.getChanges().length > 1
|
|
286
334
|
? oEvent.getSource().getBindingContext("details").getObject().id
|