@sapui5/sap.rules.ui 1.106.0 → 1.108.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/sap/rules/ui/.library +1 -1
- package/src/sap/rules/ui/AstExpressionBasic.js +27 -6
- package/src/sap/rules/ui/AstExpressionBasicRenderer.js +71 -55
- package/src/sap/rules/ui/AutoCompleteSuggestionContent.js +5 -3
- package/src/sap/rules/ui/AutoCompleteSuggestionContentRenderer.js +39 -40
- package/src/sap/rules/ui/BindingSpy.js +1 -1
- package/src/sap/rules/ui/DecisionTable.js +2157 -2154
- package/src/sap/rules/ui/DecisionTableCell.js +7 -4
- package/src/sap/rules/ui/DecisionTableCellAstExpressionBasic.js +7 -4
- package/src/sap/rules/ui/DecisionTableCellAstExpressionBasicRenderer.js +5 -3
- package/src/sap/rules/ui/DecisionTableCellExpressionAdvanced.js +238 -236
- package/src/sap/rules/ui/DecisionTableCellExpressionAdvancedRenderer.js +6 -4
- package/src/sap/rules/ui/DecisionTableCellExpressionBasic.js +7 -4
- package/src/sap/rules/ui/DecisionTableCellExpressionBasicRenderer.js +6 -4
- package/src/sap/rules/ui/DecisionTableCellRenderer.js +10 -10
- package/src/sap/rules/ui/DecisionTableConfiguration.js +1 -1
- package/src/sap/rules/ui/DecisionTableRenderer.js +163 -161
- package/src/sap/rules/ui/DecisionTableSettings.js +6 -4
- package/src/sap/rules/ui/DecisionTableSettingsOld.js +963 -961
- package/src/sap/rules/ui/DecisionTableSettingsOldRenderer.js +9 -10
- package/src/sap/rules/ui/DecisionTableSettingsRenderer.js +9 -10
- package/src/sap/rules/ui/ExpressionAdvanced.js +1726 -1724
- package/src/sap/rules/ui/ExpressionAdvancedRenderer.js +8 -8
- package/src/sap/rules/ui/ExpressionBase.js +1 -1
- package/src/sap/rules/ui/ExpressionBasic.js +7 -4
- package/src/sap/rules/ui/ExpressionBasicRenderer.js +8 -7
- package/src/sap/rules/ui/InstructionRenderer.js +73 -33
- package/src/sap/rules/ui/RuleBase.js +1 -1
- package/src/sap/rules/ui/RuleBuilder.js +433 -430
- package/src/sap/rules/ui/RuleBuilderRenderer.js +8 -9
- package/src/sap/rules/ui/TextRule.js +7 -4
- package/src/sap/rules/ui/TextRuleConfiguration.js +1 -1
- package/src/sap/rules/ui/TextRuleRenderer.js +45 -44
- package/src/sap/rules/ui/TextRuleSettings.js +6 -4
- package/src/sap/rules/ui/TextRuleSettingsRenderer.js +9 -9
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAdvancedFunctionPanel.js +4 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAdvancedFunctionPanelRenderer.js +10 -11
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAggregateFunctionPanel.js +100 -98
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAggregateFunctionPanelRenderer.js +9 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionArrayOperatorPanel.js +4 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionArrayOperatorPanelRenderer.js +10 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionComparisionOperatorPanel.js +109 -107
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionComparisionOperatorPanelRenderer.js +39 -40
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionDateAndTimePanel.js +5 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionDateAndTimePanelRenderer.js +10 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFixedValuePanel.js +840 -838
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFixedValuePanelRenderer.js +40 -40
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFunctionalOperatorPanel.js +4 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFunctionalOperatorPanelRenderer.js +10 -11
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLogicalOperatorPanel.js +112 -110
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLogicalOperatorPanelRenderer.js +39 -40
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLoopFunctionPanel.js +100 -98
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLoopFunctionPanelRenderer.js +9 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMathematicalOperatorPanel.js +122 -119
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMathematicalOperatorPanelRenderer.js +39 -40
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMiscellaneousOperatorPanel.js +5 -2
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMiscellaneousOperatorPanelRenderer.js +10 -11
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionOperationsPanel.js +4 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionOperationsPanelRenderer.js +10 -11
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionRangeOperatorPanel.js +4 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionRangeOperatorPanelRenderer.js +10 -11
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionSelectFunctionPanel.js +108 -106
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionSelectFunctionPanelRenderer.js +40 -40
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionTimeAndDurationFunctionPanel.js +254 -252
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionTimeAndDurationFunctionPanelRenderer.js +40 -40
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionVocabularyPanel.js +631 -629
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionVocabularyPanelRenderer.js +40 -40
- package/src/sap/rules/ui/library.js +31 -10
- package/src/sap/rules/ui/type/ExpressionAbs.js +1 -1
|
@@ -1,629 +1,631 @@
|
|
|
1
|
-
sap.ui.define([
|
|
2
|
-
"sap/ui/thirdparty/jquery",
|
|
3
|
-
"../../library",
|
|
4
|
-
"sap/ui/core/Control",
|
|
5
|
-
"sap/m/List",
|
|
6
|
-
"sap/ui/model/json/JSONModel",
|
|
7
|
-
"sap/m/ListMode",
|
|
8
|
-
"sap/ui/core/CustomData",
|
|
9
|
-
"sap/ui/model/Sorter",
|
|
10
|
-
"sap/rules/ui/parser/infrastructure/util/utilsBase"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
this.
|
|
47
|
-
this.
|
|
48
|
-
this.
|
|
49
|
-
this.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
this.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.
|
|
57
|
-
this.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
var
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
//
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
that.
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
var
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
that.
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
var
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
var
|
|
280
|
-
var
|
|
281
|
-
|
|
282
|
-
this.
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
that.
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
var
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
this.
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
that.
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
var
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
that.
|
|
363
|
-
that.
|
|
364
|
-
that.
|
|
365
|
-
that.searchField.
|
|
366
|
-
that.
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
that.
|
|
375
|
-
that.
|
|
376
|
-
that.
|
|
377
|
-
that.searchField.
|
|
378
|
-
that.
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
var
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
oList.
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
var
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
oList.
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
var
|
|
452
|
-
var
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
oList.
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
that.
|
|
479
|
-
that.
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
this.
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
var
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
filterArray.push(new sap.ui.model.Filter(filterProperty, sap.ui.model.FilterOperator.Contains,
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
new sap.ui.model.Filter("
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
new sap.ui.model.Filter("
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
new sap.ui.model.Filter("
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
var
|
|
604
|
-
var
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
vocabularylist.
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
1
|
+
sap.ui.define([
|
|
2
|
+
"sap/ui/thirdparty/jquery",
|
|
3
|
+
"../../library",
|
|
4
|
+
"sap/ui/core/Control",
|
|
5
|
+
"sap/m/List",
|
|
6
|
+
"sap/ui/model/json/JSONModel",
|
|
7
|
+
"sap/m/ListMode",
|
|
8
|
+
"sap/ui/core/CustomData",
|
|
9
|
+
"sap/ui/model/Sorter",
|
|
10
|
+
"sap/rules/ui/parser/infrastructure/util/utilsBase",
|
|
11
|
+
"./AutoSuggestionVocabularyPanelRenderer"
|
|
12
|
+
], function (jQuery, library, Control, List, JSONModel, ListMode, CustomData, Sorter, infraUtils, AutoSuggestionVocabularyPanelRenderer) {
|
|
13
|
+
"use strict";
|
|
14
|
+
|
|
15
|
+
var autoSuggestionVocabularyPanel = Control.extend("sap.rules.ui.ast.autoCompleteContent.AutoSuggestionVocabularyPanel", {
|
|
16
|
+
metadata: {
|
|
17
|
+
library: "sap.rules.ui",
|
|
18
|
+
properties: {
|
|
19
|
+
reference: {
|
|
20
|
+
type: "object",
|
|
21
|
+
defaultValue: null,
|
|
22
|
+
},
|
|
23
|
+
dialogOpenedCallbackReference: {
|
|
24
|
+
type: "object",
|
|
25
|
+
defaultValue: null,
|
|
26
|
+
},
|
|
27
|
+
data: {
|
|
28
|
+
type: "object",
|
|
29
|
+
defaultValue: null
|
|
30
|
+
},
|
|
31
|
+
context: {
|
|
32
|
+
type: "string",
|
|
33
|
+
defaultValue: ""
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
aggregations: {
|
|
37
|
+
PanelLayout: {
|
|
38
|
+
type: "sap.m.Panel",
|
|
39
|
+
multiple: false
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
events: {}
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
init: function () {
|
|
46
|
+
this.oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
|
|
47
|
+
this.infraUtils = new sap.rules.ui.parser.infrastructure.util.utilsBase.utilsBaseLib();
|
|
48
|
+
this.needCreateLayout = true;
|
|
49
|
+
this.AttributeSegmentSelected = true;
|
|
50
|
+
this.dataObjectName = "";
|
|
51
|
+
},
|
|
52
|
+
onBeforeRendering: function () {
|
|
53
|
+
this._reference = this.getReference();
|
|
54
|
+
this._dialogOpenedCallbackReference = this.getDialogOpenedCallbackReference();
|
|
55
|
+
if (this.needCreateLayout) {
|
|
56
|
+
var layout = this._createLayout();
|
|
57
|
+
this.setAggregation("PanelLayout", layout, true);
|
|
58
|
+
this.needCreateLayout = false;
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
initializeVariables: function () {
|
|
63
|
+
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
_createAggregateFunctionSection: function () {
|
|
67
|
+
var AggregateFunctionsPanel = new sap.m.Panel({
|
|
68
|
+
expandable: false,
|
|
69
|
+
expanded: true,
|
|
70
|
+
width: "auto",
|
|
71
|
+
content: [new sap.m.Link({
|
|
72
|
+
wrapping: true,
|
|
73
|
+
text: this.oBundle.getText("aggregateFunctionPanelTitle"),
|
|
74
|
+
press: function (oEvent) {
|
|
75
|
+
var functionAndOfLayout = new sap.ui.layout.HorizontalLayout({
|
|
76
|
+
content: [
|
|
77
|
+
new sap.m.Label({
|
|
78
|
+
text: this.oBundle.getText("function") + ": "
|
|
79
|
+
}),
|
|
80
|
+
new sap.m.Select({
|
|
81
|
+
width: "200px",
|
|
82
|
+
height: "60px"
|
|
83
|
+
}),
|
|
84
|
+
new sap.m.Label({
|
|
85
|
+
text: " " + this.oBundle.getText("oflabel") + " "
|
|
86
|
+
}),
|
|
87
|
+
new sap.m.TextArea({
|
|
88
|
+
value: "",
|
|
89
|
+
showExceededText: true,
|
|
90
|
+
width: "150%",
|
|
91
|
+
height: "65px"
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
var whereLayout = new sap.ui.layout.HorizontalLayout({
|
|
97
|
+
content: [
|
|
98
|
+
new sap.m.Label({
|
|
99
|
+
text: this.oBundle.getText("where_label") + ":"
|
|
100
|
+
}),
|
|
101
|
+
new sap.m.TextArea({
|
|
102
|
+
value: "",
|
|
103
|
+
showExceededText: true,
|
|
104
|
+
width: "300px"
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
var GroupByLayout = new sap.ui.layout.HorizontalLayout({
|
|
110
|
+
content: [
|
|
111
|
+
new sap.m.Label({
|
|
112
|
+
text: this.oBundle.getText("group_by") + ": "
|
|
113
|
+
}),
|
|
114
|
+
new sap.m.TextArea({
|
|
115
|
+
value: "",
|
|
116
|
+
showExceededText: true,
|
|
117
|
+
width: "300px"
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
var FunctionLabelLayout = new sap.ui.layout.HorizontalLayout({
|
|
123
|
+
content: [
|
|
124
|
+
new sap.m.Label({
|
|
125
|
+
text: this.oBundle.getText("function_label") + ":",
|
|
126
|
+
}),
|
|
127
|
+
new sap.m.TextArea({
|
|
128
|
+
value: "",
|
|
129
|
+
enabled: false,
|
|
130
|
+
width: "300px"
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
var verticalLayoutForAggregateFunction = new sap.ui.layout.VerticalLayout({
|
|
136
|
+
content: [functionAndOfLayout, whereLayout, GroupByLayout, FunctionLabelLayout]
|
|
137
|
+
});
|
|
138
|
+
var that = this;
|
|
139
|
+
var aggregateFunctionsDialog = new sap.m.Dialog({
|
|
140
|
+
title: this.oBundle.getText("configure_aggr_title"),
|
|
141
|
+
contentWidth: "800px",
|
|
142
|
+
contentHeight: "500px",
|
|
143
|
+
showHeader: true,
|
|
144
|
+
content: [verticalLayoutForAggregateFunction],
|
|
145
|
+
afterClose: function () {
|
|
146
|
+
that._dialogOpenedCallbackReference(false);
|
|
147
|
+
},
|
|
148
|
+
buttons: [
|
|
149
|
+
new sap.m.Button({
|
|
150
|
+
text: this.oBundle.getText("applyChangesBtn"),
|
|
151
|
+
tooltip: this.oBundle.getText("applyChangesBtn"),
|
|
152
|
+
press: function (event) {
|
|
153
|
+
aggregateFunctionsDialog.close();
|
|
154
|
+
}
|
|
155
|
+
}),
|
|
156
|
+
new sap.m.Button({
|
|
157
|
+
text: this.oBundle.getText("cancelBtn"),
|
|
158
|
+
tooltip: this.oBundle.getText("cancelBtn"),
|
|
159
|
+
press: function (event) {
|
|
160
|
+
aggregateFunctionsDialog.close();
|
|
161
|
+
}
|
|
162
|
+
})
|
|
163
|
+
]
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
aggregateFunctionsDialog.open();
|
|
167
|
+
}
|
|
168
|
+
})]
|
|
169
|
+
})
|
|
170
|
+
|
|
171
|
+
var AggregateFunctionsItem = new sap.m.CustomListItem({
|
|
172
|
+
content: AggregateFunctionsPanel
|
|
173
|
+
})
|
|
174
|
+
return AggregateFunctionsItem;
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
_createLayout: function () {
|
|
178
|
+
var that = this;
|
|
179
|
+
this.VocabularyTerms = this.getData();
|
|
180
|
+
// create a Model with this data
|
|
181
|
+
var model = new sap.ui.model.json.JSONModel();
|
|
182
|
+
|
|
183
|
+
/*Setting growing shows the growing trigger button with text as 2/14 which we do not need
|
|
184
|
+
Hence, setting to top 5 and the rest will be shown in More link */
|
|
185
|
+
var topFiveVocabularyData = [];
|
|
186
|
+
for (var termCount = 0; termCount < 5 && termCount < this.VocabularyTerms.length; termCount++) {
|
|
187
|
+
topFiveVocabularyData.push(this.VocabularyTerms[termCount]);
|
|
188
|
+
}
|
|
189
|
+
model.setData(topFiveVocabularyData);
|
|
190
|
+
|
|
191
|
+
// create a list
|
|
192
|
+
this.vocabularylist = new sap.m.List({
|
|
193
|
+
growingScrollToLoad: true,
|
|
194
|
+
enableBusyIndicator: true
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
//for every item, add relevant icon and description and add item to the list
|
|
198
|
+
// bind the List items to the data collection
|
|
199
|
+
this.vocabularylist.bindItems({
|
|
200
|
+
path: "/",
|
|
201
|
+
sorter: new sap.ui.model.Sorter("label"),
|
|
202
|
+
rememberSelections: false,
|
|
203
|
+
mode: ListMode.SingleSelectMaster,
|
|
204
|
+
template: new sap.m.DisplayListItem({
|
|
205
|
+
label: "{label}",
|
|
206
|
+
type: "Active",
|
|
207
|
+
press: function (oEvent) {
|
|
208
|
+
that._setModal(false);
|
|
209
|
+
that._reference(oEvent);
|
|
210
|
+
}
|
|
211
|
+
})
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
// set the model to the List, so it knows which data to use
|
|
215
|
+
this.vocabularylist.setModel(model);
|
|
216
|
+
var moreVocabularyLink = this.getMoreVocabulariesLink();
|
|
217
|
+
|
|
218
|
+
// add list to the panel
|
|
219
|
+
var vocabularyListPanel = new sap.m.Panel({
|
|
220
|
+
headerText: this.oBundle.getText("vocabularyPanelTitle"),
|
|
221
|
+
expandable: true,
|
|
222
|
+
expanded: true,
|
|
223
|
+
// expand: this.onExpand,
|
|
224
|
+
content: this.vocabularylist,
|
|
225
|
+
width: "auto"
|
|
226
|
+
});
|
|
227
|
+
if (this.VocabularyTerms.length >= 5){
|
|
228
|
+
vocabularyListPanel.addContent(moreVocabularyLink);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
return vocabularyListPanel;
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
_setModal: function (value) {
|
|
235
|
+
var pop = sap.ui.getCore().byId("popover");
|
|
236
|
+
if (pop) {
|
|
237
|
+
pop.setModal(value);
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
getMoreVocabulariesLink: function () {
|
|
242
|
+
var that = this;
|
|
243
|
+
var moreVocabularyLink = new sap.m.Link({
|
|
244
|
+
text: this.oBundle.getText("more_link"),
|
|
245
|
+
tooltip: this.oBundle.getText("more_link_tooltip"),
|
|
246
|
+
enabled: true,
|
|
247
|
+
press: function (oEvent) {
|
|
248
|
+
that._setModal(true);
|
|
249
|
+
that._dialogOpenedCallbackReference(true);
|
|
250
|
+
var bDoAndAttrsPresent = that.isDoAndAttrsPresent(that.VocabularyTerms);
|
|
251
|
+
if (bDoAndAttrsPresent || that.VocabularyTerms[0].isParentEntity) {
|
|
252
|
+
that.getDataObjectsDialog();
|
|
253
|
+
} else {
|
|
254
|
+
that.getAttributesDialog(that.dataObjectName);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
return moreVocabularyLink;
|
|
259
|
+
|
|
260
|
+
},
|
|
261
|
+
|
|
262
|
+
isDoAndAttrsPresent : function(aTerms){
|
|
263
|
+
if(aTerms){
|
|
264
|
+
var doPresent = false;
|
|
265
|
+
var attrPresent = false;
|
|
266
|
+
for(var index = 0 ; index < aTerms.length ; index++){
|
|
267
|
+
if(aTerms[index].isParentEntity && aTerms[index].type !== "AO" && aTerms[index].type !== "R"){
|
|
268
|
+
doPresent = true;
|
|
269
|
+
}else{
|
|
270
|
+
attrPresent = true;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return doPresent && attrPresent;
|
|
274
|
+
}
|
|
275
|
+
return false;
|
|
276
|
+
},
|
|
277
|
+
|
|
278
|
+
getDataObjectsDialog: function () {
|
|
279
|
+
var that = this;
|
|
280
|
+
var searchFieldText = this.oBundle.getText("searchTextVocabulary");
|
|
281
|
+
var searchField = this.getSearchField(searchFieldText);
|
|
282
|
+
this.detailedVocabularyList = this.initializeVocabularyList(this.VocabularyTerms);
|
|
283
|
+
this.bindFilteredTermsToList(this.detailedVocabularyList, "DataObjects", "", false);
|
|
284
|
+
var verticalLayoutForVocabularyFunction = new sap.ui.layout.VerticalLayout({
|
|
285
|
+
content: [searchField, that.detailedVocabularyList]
|
|
286
|
+
}).addStyleClass("sapAstVocabularyPanel");
|
|
287
|
+
|
|
288
|
+
this.dataObjectsDialog = new sap.m.Dialog({
|
|
289
|
+
title: this.oBundle.getText("selectVocabularyTitle"),
|
|
290
|
+
contentWidth: "500px",
|
|
291
|
+
contentHeight: "500px",
|
|
292
|
+
showHeader: true,
|
|
293
|
+
content: [verticalLayoutForVocabularyFunction],
|
|
294
|
+
afterClose: function () {
|
|
295
|
+
that._dialogOpenedCallbackReference(false);
|
|
296
|
+
},
|
|
297
|
+
buttons: [
|
|
298
|
+
new sap.m.Button({
|
|
299
|
+
text: this.oBundle.getText("cancelBtn"),
|
|
300
|
+
tooltip: this.oBundle.getText("cancelBtn"),
|
|
301
|
+
press: function (event) {
|
|
302
|
+
that._setModal(false);
|
|
303
|
+
that.dataObjectsDialog.close();
|
|
304
|
+
}
|
|
305
|
+
})
|
|
306
|
+
]
|
|
307
|
+
});
|
|
308
|
+
that.dataObjectsDialog.open();
|
|
309
|
+
|
|
310
|
+
},
|
|
311
|
+
|
|
312
|
+
getAttributesDialog: function (dataObjectName) {
|
|
313
|
+
var that = this;
|
|
314
|
+
var segmentedButton = this.getAttributesSegmentedButtons();
|
|
315
|
+
//deafault
|
|
316
|
+
var searchFieldText = this.oBundle.getText("searchTextAttr");
|
|
317
|
+
if (this.AttributeSegmentSelected) {
|
|
318
|
+
searchFieldText = this.oBundle.getText("searchTextAttr");
|
|
319
|
+
}
|
|
320
|
+
if (this.AssociationSegmentSelected) {
|
|
321
|
+
searchFieldText = this.oBundle.getText("searchTextAssoc");
|
|
322
|
+
}
|
|
323
|
+
var searchField = this.getSearchField(searchFieldText);
|
|
324
|
+
this.detailedVocabularyList = this.initializeVocabularyList(this.VocabularyTerms);
|
|
325
|
+
this.bindFilteredAttributesAndAssociationsToList(this.detailedVocabularyList, "Attributes", "E", false);
|
|
326
|
+
|
|
327
|
+
var verticalLayoutForAttributesFunction = new sap.ui.layout.VerticalLayout({
|
|
328
|
+
content: [segmentedButton, searchField, that.detailedVocabularyList]
|
|
329
|
+
}).addStyleClass("sapAstVocabularyPanel");
|
|
330
|
+
that.attributesDialog = new sap.m.Dialog({
|
|
331
|
+
title: this.oBundle.getText("selectAttrAssocTitle"),
|
|
332
|
+
contentWidth: "500px",
|
|
333
|
+
contentHeight: "500px",
|
|
334
|
+
showHeader: true,
|
|
335
|
+
content: [verticalLayoutForAttributesFunction],
|
|
336
|
+
afterClose: function () {
|
|
337
|
+
that._dialogOpenedCallbackReference(false);
|
|
338
|
+
},
|
|
339
|
+
buttons: [
|
|
340
|
+
new sap.m.Button({
|
|
341
|
+
text: this.oBundle.getText("cancelBtn"),
|
|
342
|
+
tooltip: this.oBundle.getText("cancelBtn"),
|
|
343
|
+
press: function (event) {
|
|
344
|
+
that._setModal(false);
|
|
345
|
+
that.attributesDialog.close();
|
|
346
|
+
}
|
|
347
|
+
})
|
|
348
|
+
]
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
that.attributesDialog.open();
|
|
352
|
+
|
|
353
|
+
},
|
|
354
|
+
|
|
355
|
+
getAttributesSegmentedButtons: function () {
|
|
356
|
+
var that = this;
|
|
357
|
+
var SegmentedButton = new sap.m.SegmentedButton({
|
|
358
|
+
items: [new sap.m.SegmentedButtonItem({
|
|
359
|
+
text: this.oBundle.getText("attributes"),
|
|
360
|
+
width: "230px",
|
|
361
|
+
press: function () {
|
|
362
|
+
that._setModal(false);
|
|
363
|
+
that.AttributeSegmentSelected = true;
|
|
364
|
+
that.AssociationSegmentSelected = false;
|
|
365
|
+
that.searchField.setValue("")
|
|
366
|
+
that.searchField.setPlaceholder(that.oBundle.getText("searchTextAttr"));
|
|
367
|
+
that.bindFilteredAttributesAndAssociationsToList(that.detailedVocabularyList, "Attributes", "E", false);
|
|
368
|
+
}
|
|
369
|
+
}),
|
|
370
|
+
new sap.m.SegmentedButtonItem({
|
|
371
|
+
text: this.oBundle.getText("associations"),
|
|
372
|
+
width: "230px",
|
|
373
|
+
press: function () {
|
|
374
|
+
that._setModal(false);
|
|
375
|
+
that.AttributeSegmentSelected = false;
|
|
376
|
+
that.AssociationSegmentSelected = true;
|
|
377
|
+
that.searchField.setValue("")
|
|
378
|
+
that.searchField.setPlaceholder(that.oBundle.getText("searchTextAssoc"));
|
|
379
|
+
that.bindFilteredAttributesAndAssociationsToList(that.detailedVocabularyList, "Association", "AO", false);
|
|
380
|
+
}
|
|
381
|
+
})
|
|
382
|
+
]
|
|
383
|
+
});
|
|
384
|
+
return SegmentedButton;
|
|
385
|
+
},
|
|
386
|
+
|
|
387
|
+
bindFilteredTermsToList: function (oList, objectPath, searchText, requireSearch) {
|
|
388
|
+
var model = new sap.ui.model.json.JSONModel(this.VocabularyTerms);
|
|
389
|
+
for (var entry in model.oData) {
|
|
390
|
+
if (model.oData[entry].type === "T") {
|
|
391
|
+
model.oData[entry].displayType = "Table";
|
|
392
|
+
} else if (model.oData[entry].type === "S") {
|
|
393
|
+
model.oData[entry].displayType = "Structure";
|
|
394
|
+
} else if (model.oData[entry].type === "E") {
|
|
395
|
+
if(model.oData[entry].isParentEntity){
|
|
396
|
+
model.oData[entry].displayType = "Element";
|
|
397
|
+
}else{
|
|
398
|
+
var displayType = "Attribute";
|
|
399
|
+
model.oData[entry].displayType = model.oData[entry].bussinessDataType ? displayType +
|
|
400
|
+
" (" + model.oData[entry].bussinessDataType +")" : displayType;
|
|
401
|
+
}
|
|
402
|
+
} else if (model.oData[entry].type === "AO") {
|
|
403
|
+
model.oData[entry].displayType = "Association";
|
|
404
|
+
} else if (model.oData[entry].ResultDataObjectId && !model.oData[entry].type) {
|
|
405
|
+
model.oData[entry].displayType = "Rule";
|
|
406
|
+
} else {
|
|
407
|
+
model.oData[entry].displayType = model.oData[entry].type;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
var that = this;
|
|
411
|
+
var datapath = "/";
|
|
412
|
+
if (!oList) {
|
|
413
|
+
oList = new sap.m.List({});
|
|
414
|
+
}
|
|
415
|
+
oList.setModel(model);
|
|
416
|
+
oList.bindItems({
|
|
417
|
+
path: datapath,
|
|
418
|
+
sorter: new sap.ui.model.Sorter("type"),
|
|
419
|
+
template: new sap.m.DisplayListItem({
|
|
420
|
+
label: "{label}",
|
|
421
|
+
value: "{displayType}",
|
|
422
|
+
type: "Active",
|
|
423
|
+
customData: [new CustomData({
|
|
424
|
+
Type: "sap.ui.core.CustomData",
|
|
425
|
+
key: "id",
|
|
426
|
+
value: "{id}"
|
|
427
|
+
})],
|
|
428
|
+
press: function (oEvent) {
|
|
429
|
+
that._setModal(false);
|
|
430
|
+
if (that.dataObjectsDialog.isOpen()) {
|
|
431
|
+
that.dataObjectsDialog.close();
|
|
432
|
+
} else {
|
|
433
|
+
that.attributesDialog.close()
|
|
434
|
+
}
|
|
435
|
+
that._reference(oEvent);
|
|
436
|
+
}
|
|
437
|
+
}),
|
|
438
|
+
rememberSelections: false,
|
|
439
|
+
mode: ListMode.SingleSelectMaster
|
|
440
|
+
});
|
|
441
|
+
if (requireSearch) {
|
|
442
|
+
var filterArray = [];
|
|
443
|
+
var filterProperty = "label";
|
|
444
|
+
filterArray.push(new sap.ui.model.Filter(filterProperty, sap.ui.model.FilterOperator.Contains, searchText));
|
|
445
|
+
oList.getBinding("items").filter(filterArray);
|
|
446
|
+
oList.getModel().refresh(true);
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
|
|
450
|
+
bindFilteredAttributesAndAssociationsToList: function (oList, objectPath, searchText, requireSearch) {
|
|
451
|
+
var model = new sap.ui.model.json.JSONModel(this.VocabularyTerms);
|
|
452
|
+
var that = this;
|
|
453
|
+
var datapath = "/";
|
|
454
|
+
if (!oList) {
|
|
455
|
+
oList = new sap.m.List({});
|
|
456
|
+
}
|
|
457
|
+
if(model && model.oData){
|
|
458
|
+
for (var entry in model.oData) {
|
|
459
|
+
if (model.oData[entry].type === "E") {
|
|
460
|
+
var displayType = "Attribute";
|
|
461
|
+
model.oData[entry].displayType = model.oData[entry].bussinessDataType ? displayType +
|
|
462
|
+
" (" + model.oData[entry].bussinessDataType +")" : displayType;
|
|
463
|
+
} else if (model.oData[entry].type === "R") {
|
|
464
|
+
var displayType = "Reference";
|
|
465
|
+
model.oData[entry].displayType = displayType;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
oList.setModel(model);
|
|
470
|
+
oList.bindItems({
|
|
471
|
+
path: datapath,
|
|
472
|
+
sorter: new sap.ui.model.Sorter("label"),
|
|
473
|
+
template: new sap.m.DisplayListItem({
|
|
474
|
+
label: "{label}",
|
|
475
|
+
value: "{displayType}",
|
|
476
|
+
type: "Active",
|
|
477
|
+
press: function (oEvent) {
|
|
478
|
+
that._setModal(false);
|
|
479
|
+
that.attributesDialog.close();
|
|
480
|
+
that._reference(oEvent);
|
|
481
|
+
}
|
|
482
|
+
}),
|
|
483
|
+
rememberSelections: false,
|
|
484
|
+
mode: ListMode.SingleSelectMaster
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
if (requireSearch) {
|
|
488
|
+
if(objectPath === "AO") {
|
|
489
|
+
oList.getBinding("items").filter(new sap.ui.model.Filter({
|
|
490
|
+
filters: [
|
|
491
|
+
this.getSearchFiltersAttributesAssociation(searchText,objectPath)
|
|
492
|
+
],
|
|
493
|
+
and: true
|
|
494
|
+
}));
|
|
495
|
+
} else {
|
|
496
|
+
oList.getBinding("items").filter(new sap.ui.model.Filter({
|
|
497
|
+
filters: [
|
|
498
|
+
this.getSearchFiltersReference(searchText),
|
|
499
|
+
this.getSearchFiltersAttributesAssociation(searchText,objectPath)
|
|
500
|
+
],
|
|
501
|
+
and: false
|
|
502
|
+
}));
|
|
503
|
+
}
|
|
504
|
+
} else {
|
|
505
|
+
var filterArray = [];
|
|
506
|
+
var filterProperty = "type";
|
|
507
|
+
if (searchText === "E") {
|
|
508
|
+
filterArray.push(new sap.ui.model.Filter(filterProperty, sap.ui.model.FilterOperator.Contains, searchText));
|
|
509
|
+
filterArray.push(new sap.ui.model.Filter(filterProperty, sap.ui.model.FilterOperator.Contains, "R"));
|
|
510
|
+
} else {
|
|
511
|
+
filterArray.push(new sap.ui.model.Filter(filterProperty, sap.ui.model.FilterOperator.Contains, searchText));
|
|
512
|
+
}
|
|
513
|
+
oList.getBinding("items").filter(new sap.ui.model.Filter({
|
|
514
|
+
filters: filterArray,
|
|
515
|
+
and: false
|
|
516
|
+
}));
|
|
517
|
+
oList.getModel().refresh(true);
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
|
|
521
|
+
getSearchFiltersReference: function(searchText) {
|
|
522
|
+
return new sap.ui.model.Filter({
|
|
523
|
+
filters: [
|
|
524
|
+
new sap.ui.model.Filter("type", sap.ui.model.FilterOperator.Contains, "R"),
|
|
525
|
+
new sap.ui.model.Filter("label", sap.ui.model.FilterOperator.Contains, searchText)
|
|
526
|
+
],
|
|
527
|
+
and: true,
|
|
528
|
+
});
|
|
529
|
+
},
|
|
530
|
+
|
|
531
|
+
getSearchFiltersAttributesAssociation: function(searchText,type) {
|
|
532
|
+
return new sap.ui.model.Filter({
|
|
533
|
+
filters: [
|
|
534
|
+
new sap.ui.model.Filter("type", sap.ui.model.FilterOperator.Contains, type),
|
|
535
|
+
new sap.ui.model.Filter("label", sap.ui.model.FilterOperator.Contains, searchText)
|
|
536
|
+
],
|
|
537
|
+
and: true,
|
|
538
|
+
});
|
|
539
|
+
},
|
|
540
|
+
|
|
541
|
+
getDataObjectFilter: function () {
|
|
542
|
+
if (this.AttributeSegmentSelected) {
|
|
543
|
+
return new sap.ui.model.Filter("DataObjectId", sap.ui.model.FilterOperator.Contains, this.dataObjectId)
|
|
544
|
+
}
|
|
545
|
+
if (this.AssociationSegmentSelected) {
|
|
546
|
+
return new sap.ui.model.Filter("SourceDataObjectId", sap.ui.model.FilterOperator.Contains, this.dataObjectId)
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
|
|
550
|
+
getSearchFilters: function (searchText) {
|
|
551
|
+
return new sap.ui.model.Filter({
|
|
552
|
+
filters: [
|
|
553
|
+
new sap.ui.model.Filter("name", sap.ui.model.FilterOperator.Contains, searchText),
|
|
554
|
+
new sap.ui.model.Filter("label", sap.ui.model.FilterOperator.Contains, searchText)
|
|
555
|
+
],
|
|
556
|
+
and: false
|
|
557
|
+
});
|
|
558
|
+
},
|
|
559
|
+
|
|
560
|
+
getSearchField: function (placeHolderText) {
|
|
561
|
+
var that = this;
|
|
562
|
+
this.searchField = new sap.m.SearchField({
|
|
563
|
+
showSearchButton: false,
|
|
564
|
+
width: "462px",
|
|
565
|
+
placeholder: placeHolderText, //searchType,
|
|
566
|
+
liveChange: function (oEvent) {
|
|
567
|
+
if (that.dataObjectsDialog) {
|
|
568
|
+
that.searchTheValueInDataObjects(oEvent.getParameter("newValue"), searchType);
|
|
569
|
+
} else {
|
|
570
|
+
// Deafult case when no tab is selected by the user, we search on the first tab which is "Attribute"
|
|
571
|
+
var searchType = "Attributes";
|
|
572
|
+
if (that.AttributeSegmentSelected) {
|
|
573
|
+
searchType = "Attributes";
|
|
574
|
+
}
|
|
575
|
+
if (that.AssociationSegmentSelected) {
|
|
576
|
+
searchType = "Association";
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
//if Attributes or Association is selected, we will have to search in them
|
|
580
|
+
that.searchValueInAttributesAndAssociation(oEvent.getParameter("newValue"), searchType);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
}
|
|
584
|
+
})
|
|
585
|
+
return this.searchField;
|
|
586
|
+
},
|
|
587
|
+
|
|
588
|
+
searchTheValueInDataObjects: function (searchText, searchType) {
|
|
589
|
+
this.bindFilteredTermsToList(this.detailedVocabularyList, searchType, searchText, true);
|
|
590
|
+
},
|
|
591
|
+
|
|
592
|
+
searchValueInAttributesAndAssociation: function (searchText, searchType) {
|
|
593
|
+
if (this.AttributeSegmentSelected) {
|
|
594
|
+
searchType = "E";
|
|
595
|
+
}
|
|
596
|
+
if (this.AssociationSegmentSelected) {
|
|
597
|
+
searchType = "AO";
|
|
598
|
+
}
|
|
599
|
+
this.bindFilteredAttributesAndAssociationsToList(this.detailedVocabularyList, searchType, searchText, true);
|
|
600
|
+
},
|
|
601
|
+
|
|
602
|
+
initializeVocabularyList: function (vocabularyData) {
|
|
603
|
+
var model = new sap.ui.model.json.JSONModel(vocabularyData);
|
|
604
|
+
var datapath = "/";
|
|
605
|
+
var vocabularylist = new sap.m.List({
|
|
606
|
+
headerText: this.oBundle.getText("vocabulary")
|
|
607
|
+
});
|
|
608
|
+
vocabularylist.setModel(model);
|
|
609
|
+
vocabularylist.bindItems({
|
|
610
|
+
path: datapath,
|
|
611
|
+
sorter: new sap.ui.model.Sorter("label"),
|
|
612
|
+
template: new sap.m.DisplayListItem({
|
|
613
|
+
label: "{label}",
|
|
614
|
+
value: "{type}",
|
|
615
|
+
type: "Active",
|
|
616
|
+
customData: [new CustomData({
|
|
617
|
+
Type: "sap.ui.core.CustomData",
|
|
618
|
+
key: "id",
|
|
619
|
+
value: "{id}"
|
|
620
|
+
})]
|
|
621
|
+
})
|
|
622
|
+
|
|
623
|
+
});
|
|
624
|
+
return vocabularylist;
|
|
625
|
+
},
|
|
626
|
+
renderer: AutoSuggestionVocabularyPanelRenderer
|
|
627
|
+
|
|
628
|
+
});
|
|
629
|
+
|
|
630
|
+
return autoSuggestionVocabularyPanel;
|
|
631
|
+
}, /* bExport= */ true);
|