+425
-280
lines changedFilter options
+425
-280
lines changed Original file line number Diff line number Diff line change
@@ -454,11 +454,20 @@ internal PinnedQueryFilterEmbedded FromXml(XElement p, IFromXmlContext ctx)
454
454
Label = p.Attribute("Label")?.Value;
455
455
Column = p.Attribute("Column")?.Value.ToInt();
456
456
Row = p.Attribute("Row")?.Value.ToInt();
457
-
Active = p.Attribute("Active")?.Value.ToEnum<PinnedFilterActive>() ?? (p.Attribute("DisableOnNull")?.Value.ToBool() == true ? PinnedFilterActive.WhenHasValue : PinnedFilterActive.Always);
457
+
Active = ModernizeActive(p.Attribute("Active")?.Value)?.ToEnum<PinnedFilterActive>() ?? PinnedFilterActive.Always;
458
458
SplitText = p.Attribute("SplitText")?.Value.ToBool() ?? false;
459
459
return this;
460
460
}
461
461
462
+
private string? ModernizeActive(string? str) => str switch
463
+
{
464
+
"Checkbox_StartChecked" => "Checkbox_Checked",
465
+
"Checkbox_StartUnchecked" => "Checkbox_Unchecked",
466
+
"NotCheckbox_StartChecked" => "NotCheckbox_Checked",
467
+
"NotCheckbox_StartUnchecked" => "NotCheckbox_Unchecked",
468
+
_ => str
469
+
};
470
+
462
471
internal XElement ToXml(IToXmlContext ctx)
463
472
{
464
473
return new XElement("Pinned",
@@ -488,10 +497,10 @@ public static List<Filter> ToFilterList(this IEnumerable<QueryFilterEmbedded> fi
488
497
489
498
if (filter.Pinned != null)
490
499
{
491
-
if (filter.Pinned.Active == PinnedFilterActive.Checkbox_StartUnchecked)
500
+
if (filter.Pinned.Active == PinnedFilterActive.Checkbox_Unchecked)
492
501
return null;
493
502
494
-
if (filter.Pinned.Active == PinnedFilterActive.NotCheckbox_StartChecked)
503
+
if (filter.Pinned.Active == PinnedFilterActive.NotCheckbox_Checked)
495
504
return null;
496
505
497
506
if (filter.Pinned.SplitText && !filter.ValueString.HasText())
Original file line number Diff line number Diff line change
@@ -379,24 +379,42 @@ public override IEnumerable<string> GetKeywords()
379
379
[InTypeScript(true), DescriptionOptions(DescriptionOptions.Members | DescriptionOptions.Description)]
380
380
public enum FilterOperation
381
381
{
382
+
[Description("equal to")]
382
383
EqualTo,
384
+
[Description("distinct to")]
383
385
DistinctTo,
386
+
[Description("greater than")]
384
387
GreaterThan,
388
+
[Description("greater than or equal")]
385
389
GreaterThanOrEqual,
390
+
[Description("less than")]
386
391
LessThan,
392
+
[Description("less than or equal")]
387
393
LessThanOrEqual,
394
+
[Description("contains")]
388
395
Contains,
396
+
[Description("starts with")]
389
397
StartsWith,
398
+
[Description("ends with")]
390
399
EndsWith,
400
+
[Description("like")]
391
401
Like,
402
+
[Description("not contains")]
392
403
NotContains,
404
+
[Description("not starts with")]
393
405
NotStartsWith,
406
+
[Description("not ends with")]
394
407
NotEndsWith,
408
+
[Description("not like")]
395
409
NotLike,
410
+
[Description("is in")]
396
411
IsIn,
412
+
[Description("is not in")]
397
413
IsNotIn,
398
414
415
+
[Description("complex condition")]
399
416
ComplexCondition, //Full Text Search
417
+
[Description("free text")]
400
418
FreeText, //Full Text Search
401
419
}
402
420
@@ -491,7 +509,7 @@ public override IEnumerable<string> GetKeywords()
491
509
return this.SearchCondition.Split(" ");
492
510
493
511
return this.SearchCondition.Split(new string[] { "AND", "OR", "NOT", "NEAR", "(", ")", "*" }, StringSplitOptions.RemoveEmptyEntries)
494
-
.Select(a => a.Trim(' ').Trim('\'', '"'))
512
+
.Select(a => a.Trim(' ', '\r', '\n', '\t').Trim('"'))
495
513
.Where(a => a.Length > 0);
496
514
}
497
515
}
@@ -533,14 +551,14 @@ public enum PinnedFilterActive
533
551
{
534
552
Always,
535
553
WhenHasValue,
536
-
[Description("Checkbox (start checked)")]
537
-
Checkbox_StartChecked,
538
-
[Description("Checkbox (start unchecked)")]
539
-
Checkbox_StartUnchecked,
540
-
[Description("Not Checkbox (start checked)")]
541
-
NotCheckbox_StartChecked,
542
-
[Description("Not Checkbox (start unchecked)")]
543
-
NotCheckbox_StartUnchecked,
554
+
[Description("Checkbox (checked)")]
555
+
Checkbox_Checked,
556
+
[Description("Checkbox (unchecked)")]
557
+
Checkbox_Unchecked,
558
+
[Description("Not Checkbox (checked)")]
559
+
NotCheckbox_Checked,
560
+
[Description("Not Checkbox (unchecked)")]
561
+
NotCheckbox_Unchecked,
544
562
}
545
563
546
564
[InTypeScript(true), DescriptionOptions(DescriptionOptions.Members | DescriptionOptions.Description)]
Original file line number Diff line number Diff line change
@@ -169,6 +169,10 @@ public enum SearchMessage
169
169
AddFilter,
170
170
[Description("Add group")]
171
171
AddGroup,
172
+
173
+
[Description("Group Prefix")]
174
+
GroupPrefix,
175
+
172
176
[Description("Add value")]
173
177
AddValue,
174
178
[Description("Delete filter")]
@@ -253,10 +257,20 @@ public enum SearchMessage
253
257
ReturnNewEntity,
254
258
[Description("Do you want to return the new {0} ({1})?")]
255
259
DoYouWantToSelectTheNew01_G,
256
-
[Description("Show pinned filter options")]
257
-
ShowPinnedFiltersOptions,
258
-
[Description("Hide pinned filter options")]
259
-
HidePinnedFiltersOptions,
260
+
[Description("Edit pinned filters")]
261
+
EditPinnedFilters,
262
+
263
+
[Description("Pin filter")]
264
+
PinFilter,
265
+
[Description("Unpin filter")]
266
+
UnpinFilter,
267
+
268
+
[Description("Is Active")]
269
+
IsActive,
270
+
271
+
[Description("Split")]
272
+
Split,
273
+
260
274
[Description("Summary header")]
261
275
SummaryHeader,
262
276
[Description("Summary header must be an aggregate (like Sum, Count, etc..)")]
@@ -275,8 +289,6 @@ public enum SearchMessage
275
289
MoreThanOne0Selected,
276
290
CombineRowsWith,
277
291
278
-
PinnFilter,
279
-
UnpinnFilter,
280
292
SwitchViewMode,
281
293
}
282
294
Original file line number Diff line number Diff line change
@@ -7,12 +7,6 @@
7
7
<Type Name="CollectionAnyAllType" />
8
8
<Type Name="CollectionElementType" />
9
9
<Type Name="ColumnOptionsMode" />
10
-
<Type Name="ComparisonType">
11
-
<Member Name="DistinctTo" Description="distinct to" />
12
-
<Member Name="EqualTo" Description="equal to" />
13
-
<Member Name="GreaterThan" Description="greater than" />
14
-
<Member Name="LessThan" Description="less than" />
15
-
</Type>
16
10
<Type Name="ConnectionMessage" />
17
11
<Type Name="CorruptMixin" />
18
12
<Type Name="DeleteLogParametersEmbedded" />
@@ -24,28 +18,8 @@
24
18
<Type Name="EnumEntity`1" />
25
19
<Type Name="ExceptionEntity" />
26
20
<Type Name="FilterGroupOperation" />
27
-
<Type Name="FilterOperation">
28
-
<Member Name="Contains" Description="contains" />
29
-
<Member Name="DistinctTo" Description="distinct to" />
30
-
<Member Name="EndsWith" Description="ends with" />
31
-
<Member Name="EqualTo" Description="equal to" />
32
-
<Member Name="GreaterThan" Description="greater than" />
33
-
<Member Name="GreaterThanOrEqual" Description="greater than or equal" />
34
-
<Member Name="IsIn" Description="is in" />
35
-
<Member Name="IsNotIn" Description="is not in" />
36
-
<Member Name="LessThan" Description="less than" />
37
-
<Member Name="LessThanOrEqual" Description="less than or equal" />
38
-
<Member Name="Like" Description="like" />
39
-
<Member Name="NotContains" Description="not contains" />
40
-
<Member Name="NotEndsWith" Description="not ends with" />
41
-
<Member Name="NotLike" Description="not like" />
42
-
<Member Name="NotStartsWith" Description="not starts with" />
43
-
<Member Name="StartsWith" Description="starts with" />
44
-
</Type>
21
+
45
22
<Type Name="IEntity" />
46
-
<Type Name="ImmutableEntity">
47
-
<Member Name="AllowChange" Description="Allow Change" />
48
-
</Type>
49
23
<Type Name="IUserEntity" />
50
24
<Type Name="JavascriptMessage" />
51
25
<Type Name="LiteMessage" />
@@ -67,14 +41,6 @@
67
41
<Type Name="QueryTokenMessage" />
68
42
<Type Name="QuickLinkMessage" />
69
43
<Type Name="RoundingType" />
70
-
<Type Name="SearchMessage">
71
-
<Member Name="DeleteFilter" Description="Delete Filter" />
72
-
<Member Name="NewColumnSName" Description="New Column's Name" />
73
-
</Type>
74
-
<Type Name="SelectorMessage">
75
-
<Member Name="PleaseChooseAValueToContinue" Description="Please, choose a value to continue:" />
76
-
<Member Name="PleaseSelectAConstructor" Description="Please Select a Constructor" />
77
-
</Type>
78
44
<Type Name="SemiSymbol" />
79
45
<Type Name="StringCase" />
80
46
<Type Name="Symbol" />
@@ -84,4 +50,4 @@
84
50
<Type Name="TypeEntity" />
85
51
<Type Name="ValidationMessage" />
86
52
<Type Name="VoidEnumMessage" />
87
-
</Translations>
53
+
</Translations>
Original file line number Diff line number Diff line change
@@ -97,7 +97,7 @@ export function start(options: { routes: RouteObject[], adGroups: boolean }) {
97
97
],
98
98
},
99
99
{
100
-
pinned: { label: () => ActiveDirectoryMessage.OnlyActiveUsers.niceToString(), active: "Checkbox_StartChecked", column: 2, row: 0 },
100
+
pinned: { label: () => ActiveDirectoryMessage.OnlyActiveUsers.niceToString(), active: "Checkbox_Checked", column: 2, row: 0 },
101
101
token: "AccountEnabled", operation: "EqualTo", value: true
102
102
},
103
103
{ token: "CreationType", operation: "DistinctTo", value: "Invitation" }
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ export function start(options: { routes: RouteObject[], types: boolean; properti
75
75
{
76
76
token: UserEntity.token(a => a.state),
77
77
value: UserState.value("Active"),
78
-
pinned: { label: () => AuthAdminMessage.OnlyActive.niceToString(), column: 2, active: "Checkbox_StartChecked" },
78
+
pinned: { label: () => AuthAdminMessage.OnlyActive.niceToString(), column: 2, active: "Checkbox_Checked" },
79
79
},
80
80
],
81
81
entityFormatter: new Finder.EntityFormatter((row, cols, sc) => !row.entity || !Navigator.isViewable(row.entity.EntityType, { isSearch: true }) ? undefined : <EntityLink lite={row.entity}
@@ -104,7 +104,7 @@ export function start(options: { routes: RouteObject[], types: boolean; properti
104
104
{
105
105
token: RoleEntity.token(a => a.entity.isTrivialMerge),
106
106
value: false,
107
-
pinned: { active: "NotCheckbox_StartUnchecked", label: ()=> AuthAdminMessage.IncludeTrivialMerges.niceToString(), column: 2 }
107
+
pinned: { active: "NotCheckbox_Unchecked", label: ()=> AuthAdminMessage.IncludeTrivialMerges.niceToString(), column: 2 }
108
108
}
109
109
],
110
110
extraButtons: scl => [isPermissionAuthorized(BasicPermission.AdminRules) && {
Original file line number Diff line number Diff line change
@@ -126,9 +126,10 @@ export default function ChartRequestView(p: ChartRequestViewProps) {
126
126
p.onFiltersChanged(cr.filterOptions);
127
127
}
128
128
129
-
function handlePinnedFilterChanged() {
129
+
function handlePinnedFilterChanged(fop: FilterOptionParsed[], avoidSearch?: boolean) {
130
130
handleFiltersChanged();
131
-
handleOnDrawClick();
131
+
if (!avoidSearch)
132
+
handleOnDrawClick();
132
133
}
133
134
134
135
function handleOnFullScreen(e: React.MouseEvent<any>) {
Original file line number Diff line number Diff line change
@@ -158,7 +158,7 @@ export default function CombinedUserChartPart(p: PanelPartContentProps<CombinedU
158
158
{infos.map((info, i) => <PinnedFilterBuilder key={i}
159
159
filterOptions={info.chartRequest!.filterOptions}
160
160
pinnedFilterVisible={fop => fop.dashboardBehaviour == null}
161
-
onFiltersChanged={() => info.makeQuery!()} extraSmall={true} />
161
+
onFiltersChanged={(fpo, avoidSearch) => !avoidSearch && info.makeQuery!()} extraSmall={true} />
162
162
)}
163
163
{p.content.allowChangeShowData &&
164
164
<label>
Original file line number Diff line number Diff line change
@@ -158,7 +158,7 @@ export default function UserChartPart(p: PanelPartContentProps<UserChartPartEnti
158
158
159
159
return (
160
160
<div className="d-flex flex-column flex-grow-1">
161
-
<PinnedFilterBuilder filterOptions={chartRequest.filterOptions} onFiltersChanged={() => reloadQuery()} pinnedFilterVisible={fop => fop.dashboardBehaviour == null} extraSmall={true} />
161
+
<PinnedFilterBuilder filterOptions={chartRequest.filterOptions} onFiltersChanged={(fops, avoidSearch) => !avoidSearch && reloadQuery()} pinnedFilterVisible={fop => fop.dashboardBehaviour == null} extraSmall={true} />
162
162
{p.content.allowChangeShowData &&
163
163
<label>
164
164
<input type="checkbox" className="form-check-input" checked={showData} onChange={e => setShowData(e.currentTarget.checked)} />
Original file line number Diff line number Diff line change
@@ -84,7 +84,7 @@ export default function CaseComponent(p: CaseComponentProps) {
84
84
queryName: CaseActivityEntity,
85
85
filterOptions: [
86
86
{ token: CaseActivityEntity.token(e => e.case), value: ctx.value },
87
-
{ token: CaseActivityEntity.token(e => e.doneDate), operation: "EqualTo", value: null, pinned: { active: "Checkbox_StartUnchecked", label: WorkflowActivityMessage.InprogressCaseActivities.niceToString(), column: 2 } },
87
+
{ token: CaseActivityEntity.token(e => e.doneDate), operation: "EqualTo", value: null, pinned: { active: "Checkbox_Unchecked", label: WorkflowActivityMessage.InprogressCaseActivities.niceToString(), column: 2 } },
88
88
],
89
89
columnOptionsMode: "ReplaceAll",
90
90
columnOptions: [
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4