1
+ < div class ="relative " [ngClass] ="dropdownOptions.buttonVersion == 'default' ? ' w-max' : '' ">
2
+ < button #dropdownOpenButton type ="button " [attr.data-tip] ="dropdownOptions.buttonTooltip " *ngIf ="dropdownOptions.buttonVersion == 'default' "
3
+ class ="inline-flex rounded-md border shadow-sm px-4 items-center text-xs font-semibold cursor-pointer focus:ring-offset-2 focus:ring-offset-gray-400 "
4
+ id ="menu-button " aria-expanded ="true " aria-haspopup ="true " [disabled] ="dropdownOptions.isDisabled "
5
+ [ngClass] ="buttonClassList " (isMenuOpen) ="toggleVisible($event, dropdownOptionsDiv) " appDropdown >
6
+ {{ dropdownOptions.hasCheckboxes?'':dropdownOptions.buttonCaption }}
7
+ < ng-template [ngIf] ="dropdownOptions.hasCheckboxes ">
8
+ < label class ="truncate cursor-pointer "> {{getDropdownDisplayText(dropdownOptions.optionArray,"EMPTY")}}
9
+ < span style ="color:#2563eb "> {{getDropdownDisplayText(dropdownOptions.optionArray,"NOT_NEGATED")}}</ span >
10
+ < span style ="color:#ef4444 "> {{getDropdownDisplayText(dropdownOptions.optionArray,"NEGATED")}}</ span >
11
+ </ label >
12
+ </ ng-template >
13
+ < svg class ="-mr-1 ml-auto h-5 w-5 " xmlns ="http://www.w3.org/2000/svg " viewBox ="0 0 20 20 " fill ="currentColor "
14
+ aria-hidden ="true ">
15
+ < path fill-rule ="evenodd "
16
+ d ="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z "
17
+ clip-rule ="evenodd " />
18
+ </ svg >
19
+ </ button >
20
+
21
+ < svg *ngIf ="dropdownOptions.buttonVersion== '...' " (isMenuOpen) ="toggleVisible($event, dropdownOptionsDiv) " appDropdown
22
+ xmlns ="http://www.w3.org/2000/svg "
23
+ class ="h-5 w-5 float-right cursor-pointer text-gray-500 " viewBox ="0 0 20 20 "
24
+ fill ="currentColor ">
25
+ < path
26
+ d ="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z " />
27
+ </ svg >
28
+ < a *ngIf ="dropdownOptions.buttonVersion== 'userIcon' " tabindex ="0 " class ="w-full cursor-pointer ">
29
+ < div data-intercom-target ="User Avatar Button " (isMenuOpen) ="toggleVisible($event, dropdownOptionsDiv) " appDropdown >
30
+ < img class ="h-8 w-8 " [src] ="dropdownOptions.avatarUri ">
31
+ </ div >
32
+ </ a >
33
+
34
+ < div #dropdownOptionsDiv
35
+ class ="origin-top-right absolute mt-2 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none hidden "
36
+ [ngClass] ="[dropdownClassList, dropdownOptions.isButtonSampleProjects ? 'width-sample-projects' : '', dropdownOptions.buttonVersion != '...' ? 'min-w-full': ''] "
37
+ role ="menu " aria-orientation ="vertical " aria-labelledby ="menu-button " tabindex ="-1 ">
38
+ < div class ="py-1 cursor-pointer " role ="none ">
39
+ < div *ngFor ="let caption of dropdownOptionCaptions;let i = index " (click) ="performActionOnOption($event,i) "
40
+ [ngClass] ="[dropdownOptions.textSize,dropdownOptions.textColor,dropdownOptions.optionDescriptions ? '' : 'flex' ,dropdownOptions.isOptionDisabled?.length && dropdownOptions.isOptionDisabled[i]?'opacity-50 cursor-not-allowed':'',!dropdownOptions.hasCheckboxes ? dropdownOptions.hoverColor + ' ' +dropdownOptions.textHoverColor:''] "
41
+ [ngStyle] ="{'border-bottom': dropdownOptions.isButtonSampleProjects && i%2 == 0 && i!=dropdownOptionCaptions.length-1 ? '1px dashed #e2e8f0' : (dropdownOptions.isButtonSampleProjects && i%2 != 0 && i!=dropdownOptionCaptions.length-1 ? '1px solid #e2e8f0' : null) } "
42
+ class ="block px-2 py-1.5 flex-row flex-nowrap items-center gap-x-2 w-max min-w-full "
43
+ role ="menuitem " tabindex ="-1 " id ="menu-item-0 ">
44
+ < ng-template [ngIf] ="dropdownOptions.hasCheckboxes ">
45
+ < div class ="h-4 w-4 border-gray-300 border rounded hover:bg-gray-200 "
46
+ [ngStyle] ="{'background-color':getActiveNegateGroupColor(dropdownOptions.optionArray[i]), 'border-color':getActiveNegateGroupColor(dropdownOptions.optionArray[i])} ">
47
+ </ div >
48
+ </ ng-template >
49
+ < ng-template [ngIf] ="dropdownOptions.optionIcons?.length ">
50
+ < ng-container [ngTemplateOutlet] ="icons "
51
+ [ngTemplateOutletContext] ="{iconName:dropdownOptions.optionIcons[i]} ">
52
+ </ ng-container >
53
+ </ ng-template >
54
+ {{ caption }}
55
+
56
+ < p *ngIf ="dropdownOptions.optionDescriptions && dropdownOptions.optionDescriptions[i] != '' " class ="mt-2 ">
57
+ {{dropdownOptions.optionDescriptions[i]}}
58
+ </ p >
59
+ </ div >
60
+ </ div >
61
+ </ div >
62
+ </ div >
63
+
64
+
65
+ < ng-template #icons let-iconName ="iconName ">
66
+ < ng-container [ngSwitch] ="iconName ">
67
+ < ng-template ngSwitchDefault >
68
+ </ ng-template >
69
+ < ng-template ngSwitchCase ="clickbait ">
70
+ < svg xmlns ="http://www.w3.org/2000/svg " class ="icon icon-tabler icon-tabler-fish-hook inline-block " width ="20 "
71
+ height ="20 " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentColor " fill ="none "
72
+ stroke-linecap ="round " stroke-linejoin ="round ">
73
+ < path stroke ="none " d ="M0 0h24v24H0z " fill ="none "> </ path >
74
+ < path d ="M16 9v6a5 5 0 0 1 -10 0v-4l3 3 "> </ path >
75
+ < circle cx ="16 " cy ="7 " r ="2 "> </ circle >
76
+ < path d ="M16 5v-2 "> </ path >
77
+ </ svg >
78
+ </ ng-template >
79
+ < ng-template ngSwitchCase ="conversational-ai ">
80
+ < svg xmlns ="http://www.w3.org/2000/svg " class ="icon icon-tabler icon-tabler-message-circle inline-block " width ="20 "
81
+ height ="20 " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentColor " fill ="none "
82
+ stroke-linecap ="round " stroke-linejoin ="round ">
83
+ < path stroke ="none " d ="M0 0h24v24H0z " fill ="none "> </ path >
84
+ < path d ="M3 20l1.3 -3.9a9 8 0 1 1 3.4 2.9l-4.7 1 "> </ path >
85
+ < line x1 ="12 " y1 ="12 " x2 ="12 " y2 ="12.01 "> </ line >
86
+ < line x1 ="8 " y1 ="12 " x2 ="8 " y2 ="12.01 "> </ line >
87
+ < line x1 ="16 " y1 ="12 " x2 ="16 " y2 ="12.01 "> </ line >
88
+ </ svg >
89
+ </ ng-template >
90
+ < ng-template ngSwitchCase ="ag-news ">
91
+ < svg xmlns ="http://www.w3.org/2000/svg " class ="icon icon-tabler icon-tabler-news inline-block " width ="20 " height ="20 "
92
+ viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentColor " fill ="none " stroke-linecap ="round "
93
+ stroke-linejoin ="round ">
94
+ < path stroke ="none " d ="M0 0h24v24H0z " fill ="none "> </ path >
95
+ < path
96
+ d ="M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11 ">
97
+ </ path >
98
+ < line x1 ="8 " y1 ="8 " x2 ="12 " y2 ="8 "> </ line >
99
+ < line x1 ="8 " y1 ="12 " x2 ="12 " y2 ="12 "> </ line >
100
+ < line x1 ="8 " y1 ="16 " x2 ="12 " y2 ="16 "> </ line >
101
+ </ svg >
102
+ </ ng-template >
103
+ < ng-template ngSwitchCase ="select-all ">
104
+ < svg xmlns ="http://www.w3.org/2000/svg " class ="icon icon-tabler icon-tabler-square-check inline-block "
105
+ width ="20 " height ="20 " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentColor " fill ="none "
106
+ stroke-linecap ="round " stroke-linejoin ="round ">
107
+ < path stroke ="none " d ="M0 0h24v24H0z " fill ="none "> </ path >
108
+ < rect x ="4 " y ="4 " width ="16 " height ="16 " rx ="2 "> </ rect >
109
+ < path d ="M9 12l2 2l4 -4 "> </ path >
110
+ </ svg >
111
+ </ ng-template >
112
+ < ng-template ngSwitchCase ="deselect-all ">
113
+ < svg xmlns ="http://www.w3.org/2000/svg " class ="icon icon-tabler icon-tabler-square inline-block " width ="20 "
114
+ height ="20 " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentColor " fill ="none "
115
+ stroke-linecap ="round " stroke-linejoin ="round ">
116
+ < path stroke ="none " d ="M0 0h24v24H0z " fill ="none "> </ path >
117
+ < rect x ="4 " y ="4 " width ="16 " height ="16 " rx ="2 "> </ rect >
118
+ </ svg >
119
+ </ ng-template >
120
+ < ng-template ngSwitchCase ="run ">
121
+ < svg xmlns ="http://www.w3.org/2000/svg " class ="h-5 w-5 inline-block " viewBox ="0 0 20 20 "
122
+ fill ="currentColor ">
123
+ < path fill-rule ="evenodd "
124
+ d ="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z "
125
+ clip-rule ="evenodd " />
126
+ </ svg >
127
+ </ ng-template >
128
+ < ng-template ngSwitchCase ="edit-term ">
129
+ < svg xmlns ="http://www.w3.org/2000/svg " class ="h-5 w-5 inline-block " viewBox ="0 0 20 20 "
130
+ fill ="currentColor ">
131
+ < path d ="M17.414 2.586a2 2 0 00-2.828 0L7 10.172V13h2.828l7.586-7.586a2 2 0 000-2.828z " />
132
+ < path fill-rule ="evenodd "
133
+ d ="M2 6a2 2 0 012-2h4a1 1 0 010 2H4v10h10v-4a1 1 0 112 0v4a2 2 0 01-2 2H4a2 2 0 01-2-2V6z "
134
+ clip-rule ="evenodd " />
135
+ </ svg >
136
+ </ ng-template >
137
+ < ng-template ngSwitchCase ="remove-term ">
138
+ < svg xmlns ="http://www.w3.org/2000/svg " class ="h-5 w-5 inline-block " viewBox ="0 0 20 20 "
139
+ fill ="currentColor ">
140
+ < path fill-rule ="evenodd "
141
+ d ="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z "
142
+ clip-rule ="evenodd " />
143
+ </ svg >
144
+ </ ng-template >
145
+ < ng-template ngSwitchCase ="whitelist-term ">
146
+ < svg xmlns ="http://www.w3.org/2000/svg " class ="h-5 w-5 inline-block " viewBox ="0 0 20 20 "
147
+ fill ="currentColor ">
148
+ < path fill-rule ="evenodd "
149
+ d ="M2.166 4.999A11.954 11.954 0 0010 1.944 11.954 11.954 0 0017.834 5c.11.65.166 1.32.166 2.001 0 5.225-3.34 9.67-8 11.317C5.34 16.67 2 12.225 2 7c0-.682.057-1.35.166-2.001zm11.541 3.708a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z "
150
+ clip-rule ="evenodd " />
151
+ </ svg >
152
+ </ ng-template >
153
+ < ng-template ngSwitchCase ="blacklist-term ">
154
+ < svg xmlns ="http://www.w3.org/2000/svg " class ="h-5 w-5 inline-block " viewBox ="0 0 20 20 "
155
+ fill ="currentColor ">
156
+ < path fill-rule ="evenodd "
157
+ d ="M10 1.944A11.954 11.954 0 012.166 5C2.056 5.649 2 6.319 2 7c0 5.225 3.34 9.67 8 11.317C14.66 16.67 18 12.225 18 7c0-.682-.057-1.35-.166-2.001A11.954 11.954 0 0110 1.944zM11 14a1 1 0 11-2 0 1 1 0 012 0zm0-7a1 1 0 10-2 0v3a1 1 0 102 0V7z "
158
+ clip-rule ="evenodd " />
159
+ </ svg >
160
+ </ ng-template >
161
+ < ng-template ngSwitchCase ="delete-selected ">
162
+ < svg xmlns ="http://www.w3.org/2000/svg " class ="h-5 w-5 inline-block " fill ="none "
163
+ viewBox ="0 0 24 24 " stroke ="currentColor " stroke-width ="2 ">
164
+ < path stroke-linecap ="round " stroke-linejoin ="round "
165
+ d ="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16 " />
166
+ </ svg >
167
+ </ ng-template >
168
+ < ng-template ngSwitchCase ="labeling-function ">
169
+ < svg xmlns ="http://www.w3.org/2000/svg " class ="h-5 w-5 inline-block "
170
+ viewBox ="0 0 20 20 " fill ="currentColor ">
171
+ < path fill-rule ="evenodd "
172
+ d ="M12.316 3.051a1 1 0 01.633 1.265l-4 12a1 1 0 11-1.898-.632l4-12a1 1 0 011.265-.633zM5.707 6.293a1 1 0 010 1.414L3.414 10l2.293 2.293a1 1 0 11-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0zm8.586 0a1 1 0 011.414 0l3 3a1 1 0 010 1.414l-3 3a1 1 0 11-1.414-1.414L16.586 10l-2.293-2.293a1 1 0 010-1.414z "
173
+ clip-rule ="evenodd " />
174
+ </ svg >
175
+ </ ng-template >
176
+
177
+ < ng-template ngSwitchCase ="active-learning ">
178
+ < svg xmlns ="http://www.w3.org/2000/svg " class ="h-5 w-5 inline-block "
179
+ viewBox ="0 0 20 20 " fill ="currentColor ">
180
+ < path fill-rule ="evenodd "
181
+ d ="M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z "
182
+ clip-rule ="evenodd " />
183
+ </ svg >
184
+ </ ng-template >
185
+
186
+ < ng-template ngSwitchCase ="zero-shot ">
187
+ < svg xmlns ="http://www.w3.org/2000/svg " class ="h-5 w-5 inline-block "
188
+ viewBox ="0 0 20 20 " fill ="currentColor ">
189
+ < path fill-rule ="evenodd "
190
+ d ="M5 2a1 1 0 011 1v1h1a1 1 0 010 2H6v1a1 1 0 01-2 0V6H3a1 1 0 010-2h1V3a1 1 0 011-1zm0 10a1 1 0 011 1v1h1a1 1 0 110 2H6v1a1 1 0 11-2 0v-1H3a1 1 0 110-2h1v-1a1 1 0 011-1zM12 2a1 1 0 01.967.744L14.146 7.2 17.5 9.134a1 1 0 010 1.732l-3.354 1.935-1.18 4.455a1 1 0 01-1.933 0L9.854 12.8 6.5 10.866a1 1 0 010-1.732l3.354-1.935 1.18-4.455A1 1 0 0112 2z "
191
+ clip-rule ="evenodd " />
192
+ </ svg >
193
+ </ ng-template >
194
+ </ ng-container >
195
+
196
+ </ ng-template >
0 commit comments