Skip to content

Commit

Permalink
Compile JS files
Browse files Browse the repository at this point in the history
  • Loading branch information
Xon committed Dec 22, 2024
1 parent bb2e36b commit 47a45de
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 33 deletions.
14 changes: 9 additions & 5 deletions public/assets/scripts/choices.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@

var KeyCodeMap = {
TAB_KEY: 9,
SHIFT_KEY: 16,
BACK_KEY: 46,
DELETE_KEY: 8,
ENTER_KEY: 13,
Expand Down Expand Up @@ -4576,14 +4577,14 @@
(event.key.length === 2 && event.key.charCodeAt(0) >= 0xd800) ||
event.key === 'Unidentified';
/*
We do not show the dropdown if the keycode was tab or esc
as these one are used to focusOut of e.g. select choices.
We do not show the dropdown if focusing out with esc or navigating through input fields.
An activated search can still be opened with any other key.
*/
if (!this._isTextElement &&
!hasActiveDropdown &&
keyCode !== KeyCodeMap.ESC_KEY &&
keyCode !== KeyCodeMap.TAB_KEY) {
keyCode !== KeyCodeMap.TAB_KEY &&
keyCode !== KeyCodeMap.SHIFT_KEY) {
this.showDropdown();
if (!this.input.isFocussed && wasPrintableChar) {
/*
Expand Down Expand Up @@ -4886,14 +4887,17 @@
var containerOuter = this.containerOuter;
var blurWasWithinContainer = target && containerOuter.element.contains(target);
if (blurWasWithinContainer && !this._isScrollingOnIe) {
var targetIsInput = target === this.input.element;
if (targetIsInput) {
if (target === this.input.element) {
containerOuter.removeFocusState();
this.hideDropdown(true);
if (this._isTextElement || this._isSelectMultipleElement) {
this.unhighlightAll();
}
}
else if (target === this.containerOuter.element) {
// Remove the focus state when the past outerContainer was the target
containerOuter.removeFocusState();
}
}
else {
// On IE11, clicking the scollbar blurs our input and thus
Expand Down
2 changes: 1 addition & 1 deletion public/assets/scripts/choices.min.js

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions public/assets/scripts/choices.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ var EventType = {

var KeyCodeMap = {
TAB_KEY: 9,
SHIFT_KEY: 16,
BACK_KEY: 46,
DELETE_KEY: 8,
ENTER_KEY: 13,
Expand Down Expand Up @@ -4570,14 +4571,14 @@ var Choices = /** @class */ (function () {
(event.key.length === 2 && event.key.charCodeAt(0) >= 0xd800) ||
event.key === 'Unidentified';
/*
We do not show the dropdown if the keycode was tab or esc
as these one are used to focusOut of e.g. select choices.
We do not show the dropdown if focusing out with esc or navigating through input fields.
An activated search can still be opened with any other key.
*/
if (!this._isTextElement &&
!hasActiveDropdown &&
keyCode !== KeyCodeMap.ESC_KEY &&
keyCode !== KeyCodeMap.TAB_KEY) {
keyCode !== KeyCodeMap.TAB_KEY &&
keyCode !== KeyCodeMap.SHIFT_KEY) {
this.showDropdown();
if (!this.input.isFocussed && wasPrintableChar) {
/*
Expand Down Expand Up @@ -4880,14 +4881,17 @@ var Choices = /** @class */ (function () {
var containerOuter = this.containerOuter;
var blurWasWithinContainer = target && containerOuter.element.contains(target);
if (blurWasWithinContainer && !this._isScrollingOnIe) {
var targetIsInput = target === this.input.element;
if (targetIsInput) {
if (target === this.input.element) {
containerOuter.removeFocusState();
this.hideDropdown(true);
if (this._isTextElement || this._isSelectMultipleElement) {
this.unhighlightAll();
}
}
else if (target === this.containerOuter.element) {
// Remove the focus state when the past outerContainer was the target
containerOuter.removeFocusState();
}
}
else {
// On IE11, clicking the scollbar blurs our input and thus
Expand Down
14 changes: 9 additions & 5 deletions public/assets/scripts/choices.search-basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@

var KeyCodeMap = {
TAB_KEY: 9,
SHIFT_KEY: 16,
BACK_KEY: 46,
DELETE_KEY: 8,
ENTER_KEY: 13,
Expand Down Expand Up @@ -4094,14 +4095,14 @@
(event.key.length === 2 && event.key.charCodeAt(0) >= 0xd800) ||
event.key === 'Unidentified';
/*
We do not show the dropdown if the keycode was tab or esc
as these one are used to focusOut of e.g. select choices.
We do not show the dropdown if focusing out with esc or navigating through input fields.
An activated search can still be opened with any other key.
*/
if (!this._isTextElement &&
!hasActiveDropdown &&
keyCode !== KeyCodeMap.ESC_KEY &&
keyCode !== KeyCodeMap.TAB_KEY) {
keyCode !== KeyCodeMap.TAB_KEY &&
keyCode !== KeyCodeMap.SHIFT_KEY) {
this.showDropdown();
if (!this.input.isFocussed && wasPrintableChar) {
/*
Expand Down Expand Up @@ -4404,14 +4405,17 @@
var containerOuter = this.containerOuter;
var blurWasWithinContainer = target && containerOuter.element.contains(target);
if (blurWasWithinContainer && !this._isScrollingOnIe) {
var targetIsInput = target === this.input.element;
if (targetIsInput) {
if (target === this.input.element) {
containerOuter.removeFocusState();
this.hideDropdown(true);
if (this._isTextElement || this._isSelectMultipleElement) {
this.unhighlightAll();
}
}
else if (target === this.containerOuter.element) {
// Remove the focus state when the past outerContainer was the target
containerOuter.removeFocusState();
}
}
else {
// On IE11, clicking the scollbar blurs our input and thus
Expand Down
2 changes: 1 addition & 1 deletion public/assets/scripts/choices.search-basic.min.js

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions public/assets/scripts/choices.search-basic.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ var EventType = {

var KeyCodeMap = {
TAB_KEY: 9,
SHIFT_KEY: 16,
BACK_KEY: 46,
DELETE_KEY: 8,
ENTER_KEY: 13,
Expand Down Expand Up @@ -4088,14 +4089,14 @@ var Choices = /** @class */ (function () {
(event.key.length === 2 && event.key.charCodeAt(0) >= 0xd800) ||
event.key === 'Unidentified';
/*
We do not show the dropdown if the keycode was tab or esc
as these one are used to focusOut of e.g. select choices.
We do not show the dropdown if focusing out with esc or navigating through input fields.
An activated search can still be opened with any other key.
*/
if (!this._isTextElement &&
!hasActiveDropdown &&
keyCode !== KeyCodeMap.ESC_KEY &&
keyCode !== KeyCodeMap.TAB_KEY) {
keyCode !== KeyCodeMap.TAB_KEY &&
keyCode !== KeyCodeMap.SHIFT_KEY) {
this.showDropdown();
if (!this.input.isFocussed && wasPrintableChar) {
/*
Expand Down Expand Up @@ -4398,14 +4399,17 @@ var Choices = /** @class */ (function () {
var containerOuter = this.containerOuter;
var blurWasWithinContainer = target && containerOuter.element.contains(target);
if (blurWasWithinContainer && !this._isScrollingOnIe) {
var targetIsInput = target === this.input.element;
if (targetIsInput) {
if (target === this.input.element) {
containerOuter.removeFocusState();
this.hideDropdown(true);
if (this._isTextElement || this._isSelectMultipleElement) {
this.unhighlightAll();
}
}
else if (target === this.containerOuter.element) {
// Remove the focus state when the past outerContainer was the target
containerOuter.removeFocusState();
}
}
else {
// On IE11, clicking the scollbar blurs our input and thus
Expand Down
14 changes: 9 additions & 5 deletions public/assets/scripts/choices.search-prefix.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@

var KeyCodeMap = {
TAB_KEY: 9,
SHIFT_KEY: 16,
BACK_KEY: 46,
DELETE_KEY: 8,
ENTER_KEY: 13,
Expand Down Expand Up @@ -2936,14 +2937,14 @@
(event.key.length === 2 && event.key.charCodeAt(0) >= 0xd800) ||
event.key === 'Unidentified';
/*
We do not show the dropdown if the keycode was tab or esc
as these one are used to focusOut of e.g. select choices.
We do not show the dropdown if focusing out with esc or navigating through input fields.
An activated search can still be opened with any other key.
*/
if (!this._isTextElement &&
!hasActiveDropdown &&
keyCode !== KeyCodeMap.ESC_KEY &&
keyCode !== KeyCodeMap.TAB_KEY) {
keyCode !== KeyCodeMap.TAB_KEY &&
keyCode !== KeyCodeMap.SHIFT_KEY) {
this.showDropdown();
if (!this.input.isFocussed && wasPrintableChar) {
/*
Expand Down Expand Up @@ -3246,14 +3247,17 @@
var containerOuter = this.containerOuter;
var blurWasWithinContainer = target && containerOuter.element.contains(target);
if (blurWasWithinContainer && !this._isScrollingOnIe) {
var targetIsInput = target === this.input.element;
if (targetIsInput) {
if (target === this.input.element) {
containerOuter.removeFocusState();
this.hideDropdown(true);
if (this._isTextElement || this._isSelectMultipleElement) {
this.unhighlightAll();
}
}
else if (target === this.containerOuter.element) {
// Remove the focus state when the past outerContainer was the target
containerOuter.removeFocusState();
}
}
else {
// On IE11, clicking the scollbar blurs our input and thus
Expand Down
2 changes: 1 addition & 1 deletion public/assets/scripts/choices.search-prefix.min.js

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions public/assets/scripts/choices.search-prefix.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ var EventType = {

var KeyCodeMap = {
TAB_KEY: 9,
SHIFT_KEY: 16,
BACK_KEY: 46,
DELETE_KEY: 8,
ENTER_KEY: 13,
Expand Down Expand Up @@ -2930,14 +2931,14 @@ var Choices = /** @class */ (function () {
(event.key.length === 2 && event.key.charCodeAt(0) >= 0xd800) ||
event.key === 'Unidentified';
/*
We do not show the dropdown if the keycode was tab or esc
as these one are used to focusOut of e.g. select choices.
We do not show the dropdown if focusing out with esc or navigating through input fields.
An activated search can still be opened with any other key.
*/
if (!this._isTextElement &&
!hasActiveDropdown &&
keyCode !== KeyCodeMap.ESC_KEY &&
keyCode !== KeyCodeMap.TAB_KEY) {
keyCode !== KeyCodeMap.TAB_KEY &&
keyCode !== KeyCodeMap.SHIFT_KEY) {
this.showDropdown();
if (!this.input.isFocussed && wasPrintableChar) {
/*
Expand Down Expand Up @@ -3240,14 +3241,17 @@ var Choices = /** @class */ (function () {
var containerOuter = this.containerOuter;
var blurWasWithinContainer = target && containerOuter.element.contains(target);
if (blurWasWithinContainer && !this._isScrollingOnIe) {
var targetIsInput = target === this.input.element;
if (targetIsInput) {
if (target === this.input.element) {
containerOuter.removeFocusState();
this.hideDropdown(true);
if (this._isTextElement || this._isSelectMultipleElement) {
this.unhighlightAll();
}
}
else if (target === this.containerOuter.element) {
// Remove the focus state when the past outerContainer was the target
containerOuter.removeFocusState();
}
}
else {
// On IE11, clicking the scollbar blurs our input and thus
Expand Down
1 change: 1 addition & 0 deletions public/types/src/scripts/interfaces/keycode-map.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export declare const KeyCodeMap: {
readonly TAB_KEY: 9;
readonly SHIFT_KEY: 16;
readonly BACK_KEY: 46;
readonly DELETE_KEY: 8;
readonly ENTER_KEY: 13;
Expand Down

0 comments on commit 47a45de

Please sign in to comment.