adminforth 3.24.2 → 3.24.4
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.
|
@@ -16,16 +16,12 @@
|
|
|
16
16
|
:class="[{'cursor-pointer': searchDisabled}, classesForInput]"
|
|
17
17
|
:id="inputId"
|
|
18
18
|
:name="inputId"
|
|
19
|
-
|
|
19
|
+
form="afcl-select-detached"
|
|
20
|
+
autocomplete="off"
|
|
20
21
|
data-1p-ignore
|
|
21
22
|
data-lpignore="true"
|
|
22
23
|
data-bwignore
|
|
23
24
|
data-form-type="other"
|
|
24
|
-
role="combobox"
|
|
25
|
-
aria-haspopup="listbox"
|
|
26
|
-
:aria-expanded="showDropdown"
|
|
27
|
-
:aria-controls="dropdownId"
|
|
28
|
-
:aria-autocomplete="searchDisabled ? 'none' : 'list'"
|
|
29
25
|
:placeholder="
|
|
30
26
|
selectedItems.length && !multiple ? '' : (showDropdown ? $t('Search') : placeholder || $t('Select...'))
|
|
31
27
|
"
|
|
@@ -49,15 +45,13 @@
|
|
|
49
45
|
</div>
|
|
50
46
|
</div>
|
|
51
47
|
<teleport to="body" v-if="(teleportToBody || teleportToTop) && showDropdown">
|
|
52
|
-
<div ref="dropdownEl" :
|
|
48
|
+
<div ref="dropdownEl" :style="getDropdownPosition" :class="{'shadow-none': isTop, 'z-30': teleportToBody, 'z-[1000]': teleportToTop}"
|
|
53
49
|
class="fixed w-full bg-lightDropdownOptionsBackground shadow-lg dark:shadow-black dark:bg-darkDropdownOptionsBackground
|
|
54
50
|
dark:border-gray-600 rounded-default py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48"
|
|
55
51
|
@scroll="handleDropdownScroll">
|
|
56
52
|
<div
|
|
57
53
|
v-for="item in filteredItems"
|
|
58
54
|
:key="item.value"
|
|
59
|
-
role="option"
|
|
60
|
-
:aria-selected="selectedItems.includes(item)"
|
|
61
55
|
class="px-4 py-2 cursor-pointer hover:bg-lightDropdownOptionsHoverBackground dark:hover:bg-darkDropdownOptionsHoverBackground text-lightDropdownOptionsText dark:text-darkDropdownOptionsText"
|
|
62
56
|
:class="{ 'bg-lightDropdownPicked dark:bg-darkDropdownPicked': selectedItems.includes(item) }"
|
|
63
57
|
@click="toogleItem(item)"
|
|
@@ -75,15 +69,13 @@
|
|
|
75
69
|
</div>
|
|
76
70
|
</teleport>
|
|
77
71
|
|
|
78
|
-
<div v-if="!teleportToBody && !teleportToTop && showDropdown" ref="dropdownEl" :
|
|
72
|
+
<div v-if="!teleportToBody && !teleportToTop && showDropdown" ref="dropdownEl" :style="dropdownStyle" :class="{'shadow-none': isTop}"
|
|
79
73
|
class="afcl-select-content absolute z-10 mt-1 w-full bg-lightDropdownOptionsBackground shadow-lg text-lightDropdownButtonsText dark:shadow-black dark:bg-darkDropdownOptionsBackground
|
|
80
74
|
dark:border-gray-600 rounded-default py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48"
|
|
81
75
|
@scroll="handleDropdownScroll">
|
|
82
76
|
<div
|
|
83
77
|
v-for="item in filteredItems"
|
|
84
78
|
:key="item.value"
|
|
85
|
-
role="option"
|
|
86
|
-
:aria-selected="selectedItems.includes(item)"
|
|
87
79
|
class="px-4 py-2 cursor-pointer text-lightDropdownOptionsText hover:bg-lightDropdownOptionsHoverBackground dark:hover:bg-darkDropdownOptionsHoverBackground dark:text-darkDropdownOptionsText"
|
|
88
80
|
:class="{ 'bg-lightDropdownPicked dark:bg-darkDropdownPicked': selectedItems.includes(item) }"
|
|
89
81
|
@click="toogleItem(item)"
|
|
@@ -182,13 +174,12 @@ const props = defineProps({
|
|
|
182
174
|
|
|
183
175
|
const emit = defineEmits(['update:modelValue', 'scroll-near-end', 'search']);
|
|
184
176
|
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
|
|
190
|
-
const inputId = `afs-${
|
|
191
|
-
const dropdownId = `afs-list-${uid}`;
|
|
177
|
+
// Chrome's password manager picks the nearest preceding text input as the "username" field of a form
|
|
178
|
+
// containing <input type="password">, which made an enum Select sitting above a password column get
|
|
179
|
+
// filled with the saved email. form="afcl-select-detached" points at no existing form, which per spec
|
|
180
|
+
// leaves the input with no form owner, so it is no longer part of that password form. The unique
|
|
181
|
+
// id/name additionally stops every Select on the page from sharing one field identity.
|
|
182
|
+
const inputId = `afs-${useId()}`;
|
|
192
183
|
|
|
193
184
|
const search = ref('');
|
|
194
185
|
const showDropdown = ref(false);
|
|
@@ -142,8 +142,11 @@
|
|
|
142
142
|
:suffix="column.inputSuffix"
|
|
143
143
|
:modelValue="value"
|
|
144
144
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
145
|
-
autocomplete="
|
|
145
|
+
:autocomplete="column.masked ? 'new-password' : 'off'"
|
|
146
|
+
data-1p-ignore
|
|
146
147
|
data-lpignore="true"
|
|
148
|
+
data-bwignore
|
|
149
|
+
data-form-type="other"
|
|
147
150
|
:readonly="(column.editReadonly && source === 'edit') || readonly"
|
|
148
151
|
@focus="onFocusHandler($event, column, source)"
|
|
149
152
|
/>
|