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
- autocomplete="new-password"
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" :id="dropdownId" role="listbox" :style="getDropdownPosition" :class="{'shadow-none': isTop, 'z-30': teleportToBody, 'z-[1000]': teleportToTop}"
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" :id="dropdownId" role="listbox" :style="dropdownStyle" :class="{'shadow-none': isTop}"
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
- // Opaque per-instance id/name: Chromium classifies fields for profile autofill by name/id heuristics,
186
- // so a shared static name like "afcl-select-input" lets it treat every Select on the page as the same
187
- // field and fill it with e.g. the saved email. Paired with autocomplete="new-password" on the input,
188
- // which Chromium honours for suppressing profile autofill (plain autocomplete="off" is ignored).
189
- const uid = useId();
190
- const inputId = `afs-${uid}`;
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="false"
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
  />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "3.24.2",
3
+ "version": "3.24.4",
4
4
  "description": "OpenSource Agent-Native forth-generation admin panel",
5
5
  "keywords": [
6
6
  "adminforth",