@openui5/sap.ui.support 1.149.1 → 1.150.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/REUSE.toml +24 -0
  2. package/THIRDPARTY.txt +24 -5
  3. package/package.json +6 -6
  4. package/src/sap/ui/support/.library +1 -5
  5. package/src/sap/ui/support/RuleAnalyzer.js +7 -3
  6. package/src/sap/ui/support/jQuery.sap.support.js +9 -4
  7. package/src/sap/ui/support/library.js +2 -2
  8. package/src/sap/ui/support/supportRules/Constants.js +0 -18
  9. package/src/sap/ui/support/supportRules/Main.js +0 -57
  10. package/src/sap/ui/support/supportRules/RuleSerializer.js +2 -7
  11. package/src/sap/ui/support/supportRules/RuleSet.js +1 -1
  12. package/src/sap/ui/support/supportRules/RuleSetLoader.js +0 -13
  13. package/src/sap/ui/support/supportRules/Storage.js +2 -80
  14. package/src/sap/ui/support/supportRules/WCBChannels.js +0 -40
  15. package/src/sap/ui/support/supportRules/WindowCommunicationBus.js +1 -1
  16. package/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js +17 -494
  17. package/src/sap/ui/support/supportRules/ui/controllers/Main.controller.js +0 -22
  18. package/src/sap/ui/support/supportRules/ui/controllers/PresetsController.js +1 -1
  19. package/src/sap/ui/support/supportRules/ui/models/CustomJSONListSelection.js +0 -14
  20. package/src/sap/ui/support/supportRules/ui/models/SharedModel.js +1 -26
  21. package/src/sap/ui/support/supportRules/ui/views/Analysis.view.xml +1 -12
  22. package/src/sap/ui/support/supportRules/ui/views/StorageSettings.fragment.xml +1 -8
  23. package/src/sap/ui/support/supportRules/ui/views/RuleUpdate.fragment.xml +0 -320
  24. package/src/sap/ui/support/supportRules/util/EvalUtils.js +0 -41
@@ -69,20 +69,6 @@ sap.ui.define([
69
69
  SelectionUtils.getSelectedRules();
70
70
  if (Storage.readPersistenceCookie(Constants.COOKIE_NAME)) {
71
71
  SelectionUtils.persistSelection();
72
-
73
- var aTmpRules = Storage.getRules();
74
- SelectionUtils.getRulesSelectionState().forEach(function (oRule) {
75
- if (oRule.libName === "temporary"){
76
- aTmpRules.forEach(function (oTmpRule) {
77
- if (oRule.ruleId === oTmpRule.id) {
78
- oTmpRule.selected = oRule.selected;
79
- }
80
- });
81
- }
82
- });
83
-
84
- Storage.setRules(aTmpRules);
85
-
86
72
  }
87
73
  }
88
74
 
@@ -6,13 +6,9 @@
6
6
 
7
7
  sap.ui.define([
8
8
  "sap/ui/support/library",
9
- "sap/ui/support/supportRules/Storage",
10
- "sap/ui/support/supportRules/util/EvalUtils",
11
9
  "sap/ui/model/json/JSONModel"
12
10
  ], function (
13
11
  library,
14
- Storage,
15
- EvalUtils,
16
12
  JSONModel
17
13
  ) {
18
14
  "use strict";
@@ -48,12 +44,7 @@ sap.ui.define([
48
44
  coreStateChanged: true,
49
45
  analyzePressed: false,
50
46
  selectedRulePreviewKey: "ruleProperties",
51
- selectedRuleCreateKey: "ruleProperties",
52
- selectedRuleEditKey: "ruleProperties",
53
47
  selectedSetPreviewKey: "availableRules",
54
- newRule: {},
55
- newRuleStringified: "",
56
- updateRuleStringified: "",
57
48
  subtreeExecutionContextId: "",
58
49
  availableComponents: [],
59
50
  audiences: Audiences,
@@ -62,20 +53,6 @@ sap.ui.define([
62
53
  audiencesFilter : ["All"].concat(Object.keys(Audiences)),
63
54
  categoriesFilter : ["All"].concat(Object.keys(Categories)),
64
55
  severitiesFilter : ["All"].concat(Object.keys(Severity)),
65
- newEmptyRule: {
66
- libName: "",
67
- id: "",
68
- categories: [Categories.Other],
69
- audiences: [Audiences.Internal],
70
- title: "",
71
- description: "",
72
- resolution: "",
73
- resolutionurls: [],
74
- check: "function (oIssueManager, oCoreFacade, oScope) {\n\t/* \n\t oIssueManager - allows you to add new issues with the addIssue() method \n\t oCoreFacade - gives you access to state of the core: getMetadata(), getUIAreas(), getComponents(), getModels() \n\t oScope - retrieves elements in the scope with these methods: getElements(), getElementsByClassName(className), getLoggedObjects(type) \n\t fnResolve - optional, passed when the rule property async is set to true \n\t*/ \n}",
75
- selected: true,
76
- async: false
77
- },
78
- editRule: null,
79
56
  tempLink: {
80
57
  href: "",
81
58
  text: ""
@@ -113,9 +90,7 @@ sap.ui.define([
113
90
  customPresets: [
114
91
  // presets added by the user via import
115
92
  ],
116
- selectionPresetsCurrent: null,
117
- tempRulesDisabled: !EvalUtils.isEvalAllowed(),
118
- tempRulesDisabledWarned: !!Storage.getTempRulesDisabledWarned()
93
+ selectionPresetsCurrent: null
119
94
  });
120
95
 
121
96
  return model;
@@ -8,8 +8,7 @@
8
8
  xmlns:t="sap.ui.table"
9
9
  xmlns:layout="sap.ui.layout">
10
10
  <m:NavContainer
11
- id="rulesNavContainer"
12
- autoFocus="{= ${/tempRulesDisabled} === ${/tempRulesDisabledWarned} }">
11
+ id="rulesNavContainer">
13
12
  <l:Splitter id="rulesDisplayPage">
14
13
  <l:contentAreas>
15
14
  <m:Page
@@ -79,7 +78,6 @@
79
78
  id="createRuleBtn"
80
79
  text="Create Rule"
81
80
  icon="sap-icon://add"
82
- visible="{= !${/tempRulesDisabled}}"
83
81
  press=".createNewRulePress"/>
84
82
  </m:contentRight>
85
83
  </m:Bar>
@@ -140,15 +138,6 @@
140
138
  </t:template>
141
139
  </t:Column>
142
140
  </t:columns>
143
- <t:rowActionTemplate>
144
- <t:RowAction id="rowActionTemplate">
145
- <t:items>
146
- <t:RowActionItem icon="sap-icon://edit" text="Edit" press=".editRule" visible="{= ${ruleSets>libName} === 'temporary'}" />
147
- <t:RowActionItem icon="sap-icon://delete" text="Delete" press=".deleteTemporaryRule" visible="{= ${ruleSets>libName} === 'temporary'}" />
148
- <t:RowActionItem icon="sap-icon://copy" text="Copy" press=".duplicateRule" visible="{= !${/tempRulesDisabled} &amp;&amp; ${ruleSets>libName} !== 'temporary' &amp;&amp; ${ruleSets>type} !== 'lib'}" />
149
- </t:items>
150
- </t:RowAction>
151
- </t:rowActionTemplate>
152
141
  </t:TreeTable>
153
142
  <l:VerticalLayout id="librarySetContainer" width="100%" visible="{= ${/selectedSetPreviewKey} === 'additionalRulesets' }">
154
143
  <m:Text class="sapUiSupportToolAdditionRuleSetNote" text="The list of available rules is dynamic and changes based on the libraries currently required by your application.
@@ -7,18 +7,12 @@
7
7
  title="Settings"
8
8
  contentMinWidth="250px"
9
9
  class="sapUiContentPadding"
10
- placement="Bottom"
11
- afterClose=".onSettingsPopoverClose">
10
+ placement="Bottom">
12
11
  <content>
13
12
  <FlexBox
14
13
  alignContent="Center"
15
14
  justifyContent="Center">
16
15
  <l:VerticalLayout>
17
- <MessageStrip
18
- visible="{/tempRulesDisabled}"
19
- type="Warning"
20
- showIcon="true"
21
- text="Temporary rules cannot be used in the current environment due to CSP restrictions."/>
22
16
  <l:HorizontalLayout>
23
17
  <CheckBox
24
18
  id="persistChB"
@@ -31,7 +25,6 @@
31
25
  justifyContent="Start">
32
26
  <l:VerticalLayout class="customSettingsPadding">
33
27
  <Text text=" Execution Scope"></Text>
34
- <Text text=" Temporary Rules"></Text>
35
28
  <Text text=" Selected Rules and Presets"></Text>
36
29
  <Text text=" Filtered Columns in Rules"></Text>
37
30
  <Button text="Delete Persisted Data" press=".deletePersistedData"></Button>
@@ -1,320 +0,0 @@
1
- <c:FragmentDefinition
2
- xmlns:m="sap.m"
3
- xmlns:l="sap.ui.layout"
4
- xmlns:f="sap.ui.layout.form"
5
- xmlns:mvc="sap.ui.core.mvc"
6
- xmlns:t="sap.ui.table"
7
- xmlns:c="sap.ui.core"
8
- xmlns:tools="sap.ui.codeeditor">
9
- <m:Page
10
- id="ruleUpdatePage"
11
- showHeader="false">
12
- <m:content>
13
- <m:Bar>
14
- <m:contentLeft>
15
- <m:Button
16
- icon="sap-icon://arrow-left"
17
- press=".goToRuleProperties"
18
- text="Back"/>
19
- </m:contentLeft>
20
- <m:contentMiddle>
21
- <m:IconTabHeader
22
- select=".rulesToolbarEditITHSelect"
23
- selectedKey="{/selectedRuleEditKey}"
24
- class="customIconTabHeader">
25
- <m:items>
26
- <m:IconTabFilter key="ruleProperties" text="Rule properties" />
27
- <m:IconTabFilter key="checkFunction" text="Check function" />
28
- <m:IconTabFilter key="jsonOutput" text="Code" />
29
- </m:items>
30
- </m:IconTabHeader>
31
- </m:contentMiddle>
32
- </m:Bar>
33
- <f:Form
34
- editable="true"
35
- visible="{= ${/selectedRuleEditKey} === 'ruleProperties' }">
36
- <f:layout>
37
- <f:ColumnLayout />
38
- </f:layout>
39
- <f:formContainers>
40
- <f:FormContainer>
41
- <f:formElements>
42
- <f:FormElement label="ID">
43
- <f:fields>
44
- <m:Input value="{/editRule/id}" required = "true" />
45
- </f:fields>
46
- </f:FormElement>
47
- <f:FormElement label="Async">
48
- <f:fields>
49
- <m:RadioButton groupName="asyncEditContext" text="true" selected="{= ${/editRule/async} === true }" select=".onAsyncSwitch">
50
- <m:customData>
51
- <c:CustomData key="asyncEditContext" value="true" />
52
- </m:customData>
53
- </m:RadioButton>
54
- <m:RadioButton groupName="asyncEditContext" text="false" selected="{= ${/editRule/async} !== true }" select=".onAsyncSwitch">
55
- <m:customData>
56
- <c:CustomData key="asyncEditContext" value="false" />
57
- </m:customData>
58
- </m:RadioButton>
59
- <c:Icon
60
- src="sap-icon://message-warning"
61
- class="sapUiSmallMarginBegin sapUiTinyMarginEnd"
62
- color="#E09D00"
63
- visible="{= ${/editRule/async} === true }">
64
- <c:layoutData>
65
- <m:FlexItemData alignSelf="Center" />
66
- </c:layoutData>
67
- </c:Icon>
68
- <m:Text text="{/resolveDescription}" visible="{= ${/editRule/async} === true }">
69
- <m:layoutData>
70
- <m:FlexItemData alignSelf="Center" />
71
- </m:layoutData>
72
- </m:Text>
73
- </f:fields>
74
- </f:FormElement>
75
- <f:FormElement label="Categories">
76
- <f:fields>
77
- <m:MultiComboBox selectedKeys="{/editRule/categories}" items="{/categories}" required = "true">
78
- <c:Item key="{}" text="{}" />
79
- </m:MultiComboBox>
80
- </f:fields>
81
- </f:FormElement>
82
- <f:FormElement label="Audiences">
83
- <f:fields>
84
- <m:MultiComboBox selectedKeys="{/editRule/audiences}" items="{/audiences}" required = "true">
85
- <c:Item key="{}" text="{}" />
86
- </m:MultiComboBox>
87
- </f:fields>
88
- </f:FormElement>
89
- <f:FormElement label="Title">
90
- <f:fields>
91
- <m:Input value="{/editRule/title}" required = "true" />
92
- </f:fields>
93
- </f:FormElement>
94
- <f:FormElement label="Description">
95
- <f:fields>
96
- <m:TextArea value="{/editRule/description}" required = "true"/>
97
- </f:fields>
98
- </f:FormElement>
99
- <f:FormElement label="Resolution">
100
- <f:fields>
101
- <m:TextArea value="{/editRule/resolution}" required = "true"/>
102
- </f:fields>
103
- </f:FormElement>
104
- <f:FormElement label="Min version">
105
- <f:fields>
106
- <m:TextArea value="{/editRule/minversion}" required = "true"/>
107
- </f:fields>
108
- </f:FormElement>
109
- <f:FormElement label="Resolution URLS">
110
- <f:fields>
111
- <m:Input placeholder="Text" value="{/tempLink/text}" />
112
- <m:Input placeholder="Href" value="{/tempLink/href}" />
113
- <m:Button text="Add Link" press=".addLinkToRule" icon="sap-icon://add" />
114
- </f:fields>
115
- </f:FormElement>
116
- <f:FormElement label="" fields="{/editRule/resolutionurls}">
117
- <f:fields>
118
- <m:Link text="{text}" href="{href}" target="_blank">
119
- <m:layoutData>
120
- <f:ColumnElementData cellsLarge="8" cellsSmall="12" />
121
- </m:layoutData>
122
- </m:Link>
123
- </f:fields>
124
- </f:FormElement>
125
- </f:formElements>
126
- </f:FormContainer>
127
- </f:formContainers>
128
- </f:Form>
129
- <m:Panel width="100%"
130
- height="calc(100% - 2rem)"
131
- visible="{= ${/selectedRuleEditKey} === 'checkFunction' }">
132
- <tools:CodeEditor
133
- id="codeEditorUpdate"
134
- width="100%"
135
- height="100%"
136
- value="{/editRule/check}"
137
- editable="true">
138
- </tools:CodeEditor>
139
- </m:Panel>
140
- <m:Panel width="100%"
141
- height="calc(100% - 2rem)"
142
- visible="{= ${/selectedRuleEditKey} === 'jsonOutput' }">
143
- <tools:CodeEditor
144
- syntaxHints="false"
145
- width="100%"
146
- height="100%"
147
- value="{/updateRuleStringified}"
148
- editable="false"
149
- type="javascript">
150
- </tools:CodeEditor>
151
- </m:Panel>
152
- </m:content>
153
- <m:footer>
154
- <m:Bar>
155
- <m:contentRight>
156
- <m:Button
157
- press=".updateRule"
158
- text="Update"
159
- type="Emphasized" />
160
- </m:contentRight>
161
- </m:Bar>
162
- </m:footer>
163
- </m:Page>
164
- <m:Page
165
- id="rulesCreatePage"
166
- showHeader="false">
167
- <m:content>
168
- <m:Bar>
169
- <m:contentLeft>
170
- <m:Button
171
- icon="sap-icon://arrow-left"
172
- press=".goToRuleProperties"
173
- text="Back"/>
174
- </m:contentLeft>
175
- <m:contentMiddle>
176
- <m:IconTabHeader
177
- select=".rulesToolbarITHSelect"
178
- selectedKey="{/selectedRuleCreateKey}"
179
- class="customIconTabHeader">
180
- <m:items>
181
- <m:IconTabFilter key="ruleProperties" text="Rule properties" />
182
- <m:IconTabFilter key="checkFunction" text="Check function" />
183
- <m:IconTabFilter key="jsonOutput" text="Code" />
184
- </m:items>
185
- </m:IconTabHeader>
186
- </m:contentMiddle>
187
- </m:Bar>
188
- <f:Form
189
- editable="true"
190
- visible="{= ${/selectedRuleCreateKey} === 'ruleProperties' }">
191
- <f:layout>
192
- <f:ColumnLayout />
193
- </f:layout>
194
- <f:formContainers>
195
- <f:FormContainer>
196
- <f:formElements>
197
- <f:FormElement label="ID">
198
- <f:fields>
199
- <m:Input value="{/newRule/id}" required = "true" />
200
- </f:fields>
201
- </f:FormElement>
202
- <f:FormElement label="Async">
203
- <f:fields>
204
- <m:RadioButton groupName="asyncContext" text="true" selected="{= ${/newRule/async} === true }" select=".onAsyncSwitch">
205
- <m:customData>
206
- <c:CustomData key="asyncContext" value="true" />
207
- </m:customData>
208
- </m:RadioButton>
209
- <m:RadioButton groupName="asyncContext" text="false" selected="{= ${/newRule/async} !== true }" select=".onAsyncSwitch">
210
- <m:customData>
211
- <c:CustomData key="asyncContext" value="false" />
212
- </m:customData>
213
- </m:RadioButton>
214
- <c:Icon
215
- src="sap-icon://message-warning"
216
- class="sapUiSmallMarginBegin sapUiTinyMarginEnd"
217
- color="#E09D00"
218
- visible="{= ${/newRule/async} === true }">
219
- <c:layoutData>
220
- <m:FlexItemData alignSelf="Center" />
221
- </c:layoutData>
222
- </c:Icon>
223
- <m:Text text="{/resolveDescription}" visible="{= ${/newRule/async} === true }">
224
- <m:layoutData>
225
- <m:FlexItemData alignSelf="Center" />
226
- </m:layoutData>
227
- </m:Text>
228
- </f:fields>
229
- </f:FormElement>
230
- <f:FormElement label="Categories">
231
- <f:fields>
232
- <m:MultiComboBox selectedKeys="{/newRule/categories}" items="{/categories}" required = "true">
233
- <c:Item key="{}" text="{}" />
234
- </m:MultiComboBox>
235
- </f:fields>
236
- </f:FormElement>
237
- <f:FormElement label="Audiences">
238
- <f:fields>
239
- <m:MultiComboBox selectedKeys="{/newRule/audiences}" items="{/audiences}" required = "true">
240
- <c:Item key="{}" text="{}" />
241
- </m:MultiComboBox>
242
- </f:fields>
243
- </f:FormElement>
244
- <f:FormElement label="Title">
245
- <f:fields>
246
- <m:Input value="{/newRule/title}" required = "true" />
247
- </f:fields>
248
- </f:FormElement>
249
- <f:FormElement label="Description">
250
- <f:fields>
251
- <m:TextArea value="{/newRule/description}" required = "true"/>
252
- </f:fields>
253
- </f:FormElement>
254
- <f:FormElement label="Resolution">
255
- <f:fields>
256
- <m:TextArea value="{/newRule/resolution}" required = "true"/>
257
- </f:fields>
258
- </f:FormElement>
259
- <f:FormElement label="Min version">
260
- <f:fields>
261
- <m:TextArea value="{/newRule/minversion}" required = "true"/>
262
- </f:fields>
263
- </f:FormElement>
264
- <f:FormElement label="Resolution URLS">
265
- <f:fields>
266
- <m:Input placeholder="Text" value="{/tempLink/text}" />
267
- <m:Input placeholder="Href" value="{/tempLink/href}" />
268
- <m:Button text="Add" press=".addLinkToRule" icon="sap-icon://add" />
269
- </f:fields>
270
- </f:FormElement>
271
- <f:FormElement label="" fields="{/newRule/resolutionurls}">
272
- <f:fields>
273
- <m:Link text="{text}" >
274
- <m:layoutData>
275
- <f:ColumnElementData cellsLarge="8" cellsSmall="12" />
276
- </m:layoutData>
277
- </m:Link>
278
- </f:fields>
279
- </f:FormElement>
280
- </f:formElements>
281
- </f:FormContainer>
282
- </f:formContainers>
283
- </f:Form>
284
- <m:Panel width="100%"
285
- height="calc(100% - 2rem)"
286
- visible="{= ${/selectedRuleCreateKey} === 'checkFunction' }">
287
- <tools:CodeEditor
288
- id="codeEditorCreate"
289
- width="100%"
290
- height="100%"
291
- value="{/newRule/check}"
292
- editable="true">
293
- </tools:CodeEditor>
294
- </m:Panel>
295
- <m:Panel width="100%"
296
- height="calc(100% - 2rem)"
297
- visible="{= ${/selectedRuleCreateKey} === 'jsonOutput' }">
298
- <tools:CodeEditor
299
- id="codeEditorJson"
300
- syntaxHints="false"
301
- width="100%"
302
- height="100%"
303
- value="{/newRuleStringified}"
304
- editable="false"
305
- type="javascript">
306
- </tools:CodeEditor>
307
- </m:Panel>
308
- </m:content>
309
- <m:footer>
310
- <m:Bar>
311
- <m:contentRight>
312
- <m:Button
313
- press=".addNewRule"
314
- text="Add Rule"
315
- type="Emphasized" />
316
- </m:contentRight>
317
- </m:Bar>
318
- </m:footer>
319
- </m:Page>
320
- </c:FragmentDefinition>
@@ -1,41 +0,0 @@
1
- /* eslint-disable no-new-func */
2
-
3
- /*!
4
- * OpenUI5
5
- * (c) Copyright 2026 SAP SE or an SAP affiliate company.
6
- * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
7
- */
8
-
9
- sap.ui.define([], function () {
10
- "use strict";
11
-
12
- let bIsEvalAllowed;
13
-
14
- // Checks if the Function constructor can be used in the current platform (based on CSP restrictions)
15
- try {
16
- // eslint-disable-next-line no-new
17
- new Function("");
18
- bIsEvalAllowed = true;
19
- } catch (e) {
20
- bIsEvalAllowed = false;
21
- }
22
-
23
- return {
24
- /**
25
- * @returns {boolean} Whether eval can be used in the current environment
26
- */
27
- isEvalAllowed: function () {
28
- return bIsEvalAllowed;
29
- },
30
-
31
- /**
32
- * Evaluates a function string
33
- * @param {string} sFunction Function as string
34
- * @returns {function} Evaluated function
35
- * @throws Error why eval failed, for example invalid syntax
36
- */
37
- evalFunction: function (sFunction) {
38
- return new Function("return (" + sFunction + ")")();
39
- }
40
- };
41
- });