This commit is contained in:
Josh Johnson 2019-11-07 13:33:18 +00:00
parent 067f904f1b
commit a0b98c4e11
4 changed files with 74 additions and 71 deletions

41
package-lock.json generated
View file

@ -5265,7 +5265,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@ -5286,12 +5287,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -5306,17 +5309,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@ -5433,7 +5439,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@ -5445,6 +5452,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -5459,6 +5467,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -5466,12 +5475,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@ -5490,6 +5501,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -5570,7 +5582,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@ -5582,6 +5595,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -5667,7 +5681,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@ -5703,6 +5718,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -5722,6 +5738,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -5765,12 +5782,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/assets/images/mstile-150x150.png"/>
<TileColor>#ffffff</TileColor>
</tile>
</msapplication>
</browserconfig>
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/assets/images/mstile-150x150.png"/>
<TileColor>#ffffff</TileColor>
</tile>
</msapplication>
</browserconfig>

View file

@ -1372,8 +1372,8 @@ var getAdjacentEl = function getAdjacentEl(startEl, selector, direction) {
return sibling;
};
/**
* @param {HTMLElement} element
* @param {HTMLElement} parent
* @param {Element} element
* @param {Element} parent
* @param {-1 | 1} direction
* @returns {boolean}
*/
@ -1412,7 +1412,7 @@ var sanitise = function sanitise(value) {
return value.replace(/&/g, '&amp;').replace(/>/g, '&rt;').replace(/</g, '&lt;').replace(/"/g, '&quot;');
};
/**
* @returns {function}
* @returns {() => (str: string) => Element}
*/
var strToEl = function () {
@ -1622,14 +1622,14 @@ function () {
}
/**
* Get group by group id
* @param {string} id Group ID
* @param {number} id Group ID
* @returns {Group | undefined} Group data
*/
;
_proto.getGroupById = function getGroupById(id) {
return this.groups.find(function (group) {
return group.id === parseInt(id, 10);
return group.id === id;
});
};
@ -2411,7 +2411,7 @@ function () {
this.element.scrollTop = 0;
}
/**
* @param {HTMLElement} element
* @param {Element} element
* @param {1 | -1} direction
*/
;
@ -3886,13 +3886,13 @@ function () {
this.containerOuter.removeLoadingState();
this._setLoading(true);
this._startLoading();
choicesArrayOrFetcher.forEach(function (groupOrChoice) {
if (groupOrChoice.choices) {
_this11._addGroup({
id: parseInt(groupOrChoice.id, 10) || null,
group: groupOrChoice,
id: groupOrChoice.id || null,
valueKey: value,
labelKey: label
});
@ -3908,7 +3908,7 @@ function () {
}
});
this._setLoading(false);
this._stopLoading();
return this;
};
@ -4339,8 +4339,12 @@ function () {
}
};
_proto._setLoading = function _setLoading(isLoading) {
this._store.dispatch(setIsLoading(isLoading));
_proto._startLoading = function _startLoading() {
this._store.dispatch(setIsLoading(true));
};
_proto._stopLoading = function _stopLoading() {
this._store.dispatch(setIsLoading(false));
};
_proto._handleLoadingState = function _handleLoadingState(setLoading) {
@ -4513,39 +4517,21 @@ function () {
documentElement.removeEventListener('keydown', this._onKeyDown, true);
documentElement.removeEventListener('touchend', this._onTouchEnd, true);
documentElement.removeEventListener('mousedown', this._onMouseDown, true);
documentElement.removeEventListener('keyup', this._onKeyUp, {
passive: true
});
documentElement.removeEventListener('click', this._onClick, {
passive: true
});
documentElement.removeEventListener('touchmove', this._onTouchMove, {
passive: true
});
documentElement.removeEventListener('mouseover', this._onMouseOver, {
passive: true
});
documentElement.removeEventListener('keyup', this._onKeyUp);
documentElement.removeEventListener('click', this._onClick);
documentElement.removeEventListener('touchmove', this._onTouchMove);
documentElement.removeEventListener('mouseover', this._onMouseOver);
if (this._isSelectOneElement) {
this.containerOuter.element.removeEventListener('focus', this._onFocus, {
passive: true
});
this.containerOuter.element.removeEventListener('blur', this._onBlur, {
passive: true
});
this.containerOuter.element.removeEventListener('focus', this._onFocus);
this.containerOuter.element.removeEventListener('blur', this._onBlur);
}
this.input.element.removeEventListener('focus', this._onFocus, {
passive: true
});
this.input.element.removeEventListener('blur', this._onBlur, {
passive: true
});
this.input.element.removeEventListener('focus', this._onFocus);
this.input.element.removeEventListener('blur', this._onBlur);
if (this.input.element.form) {
this.input.element.form.removeEventListener('reset', this._onFormReset, {
passive: true
});
this.input.element.form.removeEventListener('reset', this._onFormReset);
}
this.input.removeEventListeners();
@ -5035,7 +5021,7 @@ function () {
var passedCustomProperties = customProperties;
var items = this._store.items;
var passedLabel = label || passedValue;
var passedOptionId = parseInt(choiceId, 10) || -1;
var passedOptionId = choiceId || -1;
var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;
var id = items ? items.length + 1 : 1; // If a prepended value has been passed, prepend it
@ -5135,12 +5121,12 @@ function () {
var choiceElementId = this._baseId + "-" + this._idNames.itemChoice + "-" + choiceId;
this._store.dispatch(choices_addChoice({
value: value,
label: choiceLabel,
id: choiceId,
groupId: groupId,
disabled: isDisabled,
elementId: choiceElementId,
value: value,
label: choiceLabel,
disabled: isDisabled,
customProperties: customProperties,
placeholder: placeholder,
keyCode: keyCode
@ -5296,7 +5282,7 @@ function () {
this._highlightPosition = 0;
this._isSearching = false;
this._setLoading(true);
this._startLoading();
if (this._presetGroups.length) {
this._addPredefinedGroups(this._presetGroups);
@ -5304,7 +5290,7 @@ function () {
this._addPredefinedChoices(this._presetChoices);
}
this._setLoading(false);
this._stopLoading();
}
if (this._isTextElement) {
@ -5342,16 +5328,14 @@ function () {
// If sorting is enabled or the user is searching, filter choices
if (this.config.shouldSort) {
choices.sort(this.config.sorter);
} // Determine whether there is a selected choice
}
var hasSelectedChoice = choices.some(function (choice) {
return choice.selected;
});
var firstEnabledChoiceIndex = choices.findIndex(function (_choice) {
return _choice.disabled === undefined || !_choice.disabled;
}); // Add each choice
var firstEnabledChoiceIndex = choices.findIndex(function (choice) {
return choice.disabled === undefined || !choice.disabled;
});
choices.forEach(function (choice, index) {
var value = choice.value,
label = choice.label,

File diff suppressed because one or more lines are too long