@shoper/phoenix_design_system 1.15.3-26 → 1.15.3-27
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/build/cjs/packages/phoenix/src/controllers/list_box_controller/list_box_keyboard_controller.js +9 -6
- package/build/cjs/packages/phoenix/src/controllers/list_box_controller/list_box_keyboard_controller.js.map +1 -1
- package/build/esm/packages/phoenix/src/controllers/list_box_controller/list_box_keyboard_controller.js +9 -6
- package/build/esm/packages/phoenix/src/controllers/list_box_controller/list_box_keyboard_controller.js.map +1 -1
- package/package.json +1 -1
|
@@ -92,6 +92,8 @@ class ListBoxKeyboardController {
|
|
|
92
92
|
const $availableOptions = tslib_es6.__classPrivateFieldGet(this, _ListBoxKeyboardController__$options, "f").filter(($option) => {
|
|
93
93
|
return !$option.getAttribute('inactive') && !$option.getAttribute('disabled') && !$option.hidden;
|
|
94
94
|
});
|
|
95
|
+
if (!!$availableOptions[tslib_es6.__classPrivateFieldGet(this, _ListBoxKeyboardController_currentOptionIndex, "f") - 1])
|
|
96
|
+
return tslib_es6.__classPrivateFieldGet(this, _ListBoxKeyboardController_currentOptionIndex, "f") - 1;
|
|
95
97
|
// bo ktoś wpisał coś w searcha i index obecnie wybranej opcji jest inny
|
|
96
98
|
const newIndexOfCurrentlySelectedOption = $availableOptions.findIndex(($option) => $option.selected);
|
|
97
99
|
if (newIndexOfCurrentlySelectedOption)
|
|
@@ -104,14 +106,15 @@ class ListBoxKeyboardController {
|
|
|
104
106
|
const $availableOptions = tslib_es6.__classPrivateFieldGet(this, _ListBoxKeyboardController__$options, "f").filter(($option) => {
|
|
105
107
|
return !$option.getAttribute('inactive') && !$option.getAttribute('disabled') && !$option.hidden;
|
|
106
108
|
});
|
|
107
|
-
// bo ktoś wpisał coś w searcha i index obecnie wybranej opcji jest inny
|
|
108
|
-
const newIndexOfCurrentlySelectedOption = $availableOptions.findIndex(($option) => $option.selected);
|
|
109
|
-
if (newIndexOfCurrentlySelectedOption)
|
|
110
|
-
return newIndexOfCurrentlySelectedOption + 1;
|
|
111
109
|
if (tslib_es6.__classPrivateFieldGet(this, _ListBoxKeyboardController_currentOptionIndex, "f") === $availableOptions.length - 1)
|
|
112
110
|
return tslib_es6.__classPrivateFieldGet(this, _ListBoxKeyboardController_currentOptionIndex, "f");
|
|
113
|
-
if (tslib_es6.__classPrivateFieldGet(this, _ListBoxKeyboardController_currentOptionIndex, "f") > $availableOptions.length - 1)
|
|
114
|
-
|
|
111
|
+
if (tslib_es6.__classPrivateFieldGet(this, _ListBoxKeyboardController_currentOptionIndex, "f") > $availableOptions.length - 1) {
|
|
112
|
+
// bo ktoś wpisał coś w searcha i index obecnie wybranej opcji jest inny
|
|
113
|
+
const newIndexOfCurrentlySelectedOption = $availableOptions.findIndex(($option) => $option.selected);
|
|
114
|
+
if (newIndexOfCurrentlySelectedOption)
|
|
115
|
+
return newIndexOfCurrentlySelectedOption + 1;
|
|
116
|
+
return 0;
|
|
117
|
+
}
|
|
115
118
|
return tslib_es6.__classPrivateFieldGet(this, _ListBoxKeyboardController_currentOptionIndex, "f") + 1;
|
|
116
119
|
}
|
|
117
120
|
hostDisconnected() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -88,6 +88,8 @@ class ListBoxKeyboardController {
|
|
|
88
88
|
const $availableOptions = __classPrivateFieldGet(this, _ListBoxKeyboardController__$options, "f").filter(($option) => {
|
|
89
89
|
return !$option.getAttribute('inactive') && !$option.getAttribute('disabled') && !$option.hidden;
|
|
90
90
|
});
|
|
91
|
+
if (!!$availableOptions[__classPrivateFieldGet(this, _ListBoxKeyboardController_currentOptionIndex, "f") - 1])
|
|
92
|
+
return __classPrivateFieldGet(this, _ListBoxKeyboardController_currentOptionIndex, "f") - 1;
|
|
91
93
|
// bo ktoś wpisał coś w searcha i index obecnie wybranej opcji jest inny
|
|
92
94
|
const newIndexOfCurrentlySelectedOption = $availableOptions.findIndex(($option) => $option.selected);
|
|
93
95
|
if (newIndexOfCurrentlySelectedOption)
|
|
@@ -100,14 +102,15 @@ class ListBoxKeyboardController {
|
|
|
100
102
|
const $availableOptions = __classPrivateFieldGet(this, _ListBoxKeyboardController__$options, "f").filter(($option) => {
|
|
101
103
|
return !$option.getAttribute('inactive') && !$option.getAttribute('disabled') && !$option.hidden;
|
|
102
104
|
});
|
|
103
|
-
// bo ktoś wpisał coś w searcha i index obecnie wybranej opcji jest inny
|
|
104
|
-
const newIndexOfCurrentlySelectedOption = $availableOptions.findIndex(($option) => $option.selected);
|
|
105
|
-
if (newIndexOfCurrentlySelectedOption)
|
|
106
|
-
return newIndexOfCurrentlySelectedOption + 1;
|
|
107
105
|
if (__classPrivateFieldGet(this, _ListBoxKeyboardController_currentOptionIndex, "f") === $availableOptions.length - 1)
|
|
108
106
|
return __classPrivateFieldGet(this, _ListBoxKeyboardController_currentOptionIndex, "f");
|
|
109
|
-
if (__classPrivateFieldGet(this, _ListBoxKeyboardController_currentOptionIndex, "f") > $availableOptions.length - 1)
|
|
110
|
-
|
|
107
|
+
if (__classPrivateFieldGet(this, _ListBoxKeyboardController_currentOptionIndex, "f") > $availableOptions.length - 1) {
|
|
108
|
+
// bo ktoś wpisał coś w searcha i index obecnie wybranej opcji jest inny
|
|
109
|
+
const newIndexOfCurrentlySelectedOption = $availableOptions.findIndex(($option) => $option.selected);
|
|
110
|
+
if (newIndexOfCurrentlySelectedOption)
|
|
111
|
+
return newIndexOfCurrentlySelectedOption + 1;
|
|
112
|
+
return 0;
|
|
113
|
+
}
|
|
111
114
|
return __classPrivateFieldGet(this, _ListBoxKeyboardController_currentOptionIndex, "f") + 1;
|
|
112
115
|
}
|
|
113
116
|
hostDisconnected() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,+DAA+D,4CAAgD;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,+DAA+D,4CAAgD;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|