primereact 10.4.0 → 10.5.0
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/calendar/calendar.cjs.js +12 -4
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +12 -4
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +12 -4
- package/calendar/calendar.min.js +1 -1
- package/checkbox/checkbox.cjs.js +2 -0
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +2 -0
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +2 -0
- package/checkbox/checkbox.min.js +1 -1
- package/chips/chips.cjs.js +109 -20
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +109 -20
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +109 -20
- package/chips/chips.min.js +1 -1
- package/core/core.js +643 -465
- package/core/core.min.js +4 -4
- package/dropdown/dropdown.cjs.js +313 -141
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +313 -141
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +313 -141
- package/dropdown/dropdown.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +21 -17
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +21 -17
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +21 -17
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +3 -1
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +3 -1
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +3 -1
- package/inputswitch/inputswitch.min.js +1 -1
- package/knob/knob.cjs.js +62 -0
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +62 -0
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +62 -0
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +362 -92
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +363 -93
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +362 -92
- package/listbox/listbox.min.js +1 -1
- package/menu/menu.cjs.js +4 -2
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +4 -2
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +5 -4
- package/menu/menu.min.js +1 -1
- package/multiselect/multiselect.cjs.js +377 -107
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +377 -107
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +377 -107
- package/multiselect/multiselect.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +251 -251
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +258 -258
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +251 -251
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +2 -1
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +2 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +3 -3
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +3 -2
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +3 -2
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +3 -2
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +22 -20
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +22 -20
- package/password/password.esm.min.js +1 -1
- package/password/password.js +22 -20
- package/password/password.min.js +1 -1
- package/primereact.all.cjs.js +1473 -485
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +1473 -485
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +1473 -485
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +1 -0
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +1 -0
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +1 -0
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +103 -4
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +103 -4
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +103 -4
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +328 -67
- package/resources/themes/arya-green/theme.css +328 -67
- package/resources/themes/arya-orange/theme.css +328 -67
- package/resources/themes/arya-purple/theme.css +26 -6
- package/resources/themes/bootstrap4-dark-blue/theme.css +328 -67
- package/resources/themes/bootstrap4-dark-purple/theme.css +26 -6
- package/resources/themes/bootstrap4-light-blue/theme.css +328 -67
- package/resources/themes/bootstrap4-light-purple/theme.css +26 -6
- package/resources/themes/fluent-light/theme.css +327 -66
- package/resources/themes/lara-dark-amber/theme.css +328 -67
- package/resources/themes/lara-dark-blue/theme.css +328 -67
- package/resources/themes/lara-dark-cyan/theme.css +328 -67
- package/resources/themes/lara-dark-green/theme.css +328 -67
- package/resources/themes/lara-dark-indigo/theme.css +328 -67
- package/resources/themes/lara-dark-pink/theme.css +328 -67
- package/resources/themes/lara-dark-purple/theme.css +26 -6
- package/resources/themes/lara-dark-teal/theme.css +328 -67
- package/resources/themes/lara-light-amber/theme.css +328 -67
- package/resources/themes/lara-light-blue/theme.css +328 -67
- package/resources/themes/lara-light-cyan/theme.css +328 -67
- package/resources/themes/lara-light-green/theme.css +328 -67
- package/resources/themes/lara-light-indigo/theme.css +328 -67
- package/resources/themes/lara-light-pink/theme.css +328 -67
- package/resources/themes/lara-light-purple/theme.css +26 -6
- package/resources/themes/lara-light-teal/theme.css +328 -67
- package/resources/themes/luna-amber/theme.css +328 -67
- package/resources/themes/luna-blue/theme.css +328 -67
- package/resources/themes/luna-green/theme.css +328 -67
- package/resources/themes/luna-pink/theme.css +328 -67
- package/resources/themes/md-dark-deeppurple/theme.css +158 -138
- package/resources/themes/md-dark-indigo/theme.css +454 -193
- package/resources/themes/md-light-deeppurple/theme.css +26 -6
- package/resources/themes/md-light-indigo/theme.css +328 -67
- package/resources/themes/mdc-dark-deeppurple/theme.css +158 -138
- package/resources/themes/mdc-dark-indigo/theme.css +454 -193
- package/resources/themes/mdc-light-deeppurple/theme.css +26 -6
- package/resources/themes/mdc-light-indigo/theme.css +328 -67
- package/resources/themes/mira/theme.css +328 -67
- package/resources/themes/nano/theme.css +328 -67
- package/resources/themes/nova/theme.css +328 -67
- package/resources/themes/nova-accent/theme.css +328 -67
- package/resources/themes/nova-alt/theme.css +328 -67
- package/resources/themes/rhea/theme.css +328 -67
- package/resources/themes/saga-blue/theme.css +328 -67
- package/resources/themes/saga-green/theme.css +328 -67
- package/resources/themes/saga-orange/theme.css +328 -67
- package/resources/themes/saga-purple/theme.css +26 -6
- package/resources/themes/soho-dark/theme.css +353 -92
- package/resources/themes/soho-light/theme.css +328 -67
- package/resources/themes/tailwind-light/theme.css +329 -71
- package/resources/themes/vela-blue/theme.css +328 -67
- package/resources/themes/vela-green/theme.css +328 -67
- package/resources/themes/vela-orange/theme.css +328 -67
- package/resources/themes/vela-purple/theme.css +26 -6
- package/resources/themes/viva-dark/theme.css +328 -67
- package/resources/themes/viva-light/theme.css +328 -67
- package/selectbutton/selectbutton.cjs.js +96 -50
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +96 -50
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +96 -50
- package/selectbutton/selectbutton.min.js +1 -1
- package/slider/slider.cjs.js +25 -4
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +25 -4
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +25 -4
- package/slider/slider.min.js +1 -1
- package/splitter/splitter.cjs.js +16 -15
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +16 -15
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +16 -15
- package/splitter/splitter.min.js +1 -1
- package/tabview/tabview.cjs.js +6 -5
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +39 -34
- package/tabview/tabview.esm.js +6 -5
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +6 -5
- package/tabview/tabview.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +15 -14
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +14 -13
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +15 -14
- package/togglebutton/togglebutton.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +3 -2
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +3 -2
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +3 -2
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/web-types.json +1 -1
package/primereact.all.js
CHANGED
|
@@ -2937,7 +2937,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
2937
2937
|
* @param {any} options JSON options like { page: 2, user: "John", role: "Admin" }
|
|
2938
2938
|
* @returns the ARIA label with replaced values
|
|
2939
2939
|
*/
|
|
2940
|
-
function ariaLabel
|
|
2940
|
+
function ariaLabel(ariaKey, options) {
|
|
2941
2941
|
var _locale = PrimeReact$1.locale;
|
|
2942
2942
|
try {
|
|
2943
2943
|
var _ariaLabel = localeOptions(_locale)['aria'][ariaKey];
|
|
@@ -11836,11 +11836,14 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
11836
11836
|
}
|
|
11837
11837
|
if (props.view === 'date') {
|
|
11838
11838
|
overlayRef.current.style.width = DomHandler.getOuterWidth(overlayRef.current) + 'px';
|
|
11839
|
-
overlayRef.current.style.minWidth = inputWidth + 'px';
|
|
11840
11839
|
} else {
|
|
11841
|
-
overlayRef.current.style.minWidth = inputWidth + 'px';
|
|
11842
11840
|
overlayRef.current.style.width = inputWidth + 'px';
|
|
11843
11841
|
}
|
|
11842
|
+
|
|
11843
|
+
// #5830 Tailwind does not need a min width it breaks the styling
|
|
11844
|
+
if (!isUnstyled()) {
|
|
11845
|
+
overlayRef.current.style.minWidth = inputWidth + 'px';
|
|
11846
|
+
}
|
|
11844
11847
|
}
|
|
11845
11848
|
alignOverlay();
|
|
11846
11849
|
};
|
|
@@ -11891,7 +11894,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
11891
11894
|
if (isUnstyled) {
|
|
11892
11895
|
destroyMask();
|
|
11893
11896
|
} else {
|
|
11894
|
-
DomHandler.addClass(touchUIMask.current, 'p-component-overlay-leave');
|
|
11897
|
+
!isUnstyled() && DomHandler.addClass(touchUIMask.current, 'p-component-overlay-leave');
|
|
11895
11898
|
touchUIMask.current.addEventListener('animationend', function () {
|
|
11896
11899
|
destroyMask();
|
|
11897
11900
|
});
|
|
@@ -12271,7 +12274,12 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
12271
12274
|
var isEnabled = props.enabledDates.some(function (d) {
|
|
12272
12275
|
return d.getFullYear() === year && d.getMonth() === month && d.getDate() === day;
|
|
12273
12276
|
});
|
|
12274
|
-
|
|
12277
|
+
if (isEnabled) {
|
|
12278
|
+
isDisabled = false;
|
|
12279
|
+
} else if (!props.disabledDays && !props.disabledDates) {
|
|
12280
|
+
// disable other dates when only enabledDates are present
|
|
12281
|
+
isDisabled = true;
|
|
12282
|
+
}
|
|
12275
12283
|
}
|
|
12276
12284
|
return isDisabled;
|
|
12277
12285
|
};
|
|
@@ -15696,6 +15704,8 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
15696
15704
|
onClick: function onClick(e) {
|
|
15697
15705
|
return _onClick(e);
|
|
15698
15706
|
},
|
|
15707
|
+
'data-p-highlight': checked,
|
|
15708
|
+
'data-p-disabled': props.disabled,
|
|
15699
15709
|
onContextMenu: props.onContextMenu,
|
|
15700
15710
|
onMouseDown: props.onMouseDown
|
|
15701
15711
|
}, otherProps, ptm('root'));
|
|
@@ -15880,22 +15890,29 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
15880
15890
|
var classes$X = {
|
|
15881
15891
|
removeTokenIcon: 'p-chips-token-icon',
|
|
15882
15892
|
label: 'p-chips-token-label',
|
|
15883
|
-
token:
|
|
15893
|
+
token: function token(_ref) {
|
|
15894
|
+
var focusedIndex = _ref.focusedIndex,
|
|
15895
|
+
index = _ref.index;
|
|
15896
|
+
return classNames('p-chips-token', {
|
|
15897
|
+
'p-focus': focusedIndex === index
|
|
15898
|
+
});
|
|
15899
|
+
},
|
|
15884
15900
|
inputToken: 'p-chips-input-token',
|
|
15885
|
-
container: function container(
|
|
15886
|
-
var
|
|
15887
|
-
focusedState = _ref.focusedState;
|
|
15901
|
+
container: function container(_ref2) {
|
|
15902
|
+
var isFilled = _ref2.isFilled;
|
|
15888
15903
|
return classNames('p-inputtext p-chips-multiple-container', {
|
|
15889
|
-
'p-
|
|
15890
|
-
'p-focus': focusedState
|
|
15904
|
+
'p-variant-filled': isFilled
|
|
15891
15905
|
});
|
|
15892
15906
|
},
|
|
15893
|
-
root: function root(
|
|
15894
|
-
var isFilled =
|
|
15895
|
-
focusedState =
|
|
15907
|
+
root: function root(_ref3) {
|
|
15908
|
+
var isFilled = _ref3.isFilled,
|
|
15909
|
+
focusedState = _ref3.focusedState,
|
|
15910
|
+
disabled = _ref3.disabled;
|
|
15896
15911
|
return classNames('p-chips p-component p-inputwrapper', {
|
|
15897
15912
|
'p-inputwrapper-filled': isFilled,
|
|
15898
|
-
'p-inputwrapper-focus': focusedState
|
|
15913
|
+
'p-inputwrapper-focus': focusedState,
|
|
15914
|
+
'p-disabled': disabled,
|
|
15915
|
+
'p-focus': focusedState
|
|
15899
15916
|
});
|
|
15900
15917
|
}
|
|
15901
15918
|
};
|
|
@@ -15948,6 +15965,10 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
15948
15965
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
15949
15966
|
focusedState = _React$useState2[0],
|
|
15950
15967
|
setFocusedState = _React$useState2[1];
|
|
15968
|
+
var _React$useState3 = React__namespace.useState(null),
|
|
15969
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
15970
|
+
focusedIndex = _React$useState4[0],
|
|
15971
|
+
setFocusedIndex = _React$useState4[1];
|
|
15951
15972
|
var _ChipsBase$setMetaDat = ChipsBase.setMetaData({
|
|
15952
15973
|
props: props,
|
|
15953
15974
|
state: {
|
|
@@ -16017,26 +16038,71 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
16017
16038
|
var onWrapperClick = function onWrapperClick() {
|
|
16018
16039
|
DomHandler.focus(inputRef.current);
|
|
16019
16040
|
};
|
|
16041
|
+
var onContainerKeyDown = function onContainerKeyDown(event) {
|
|
16042
|
+
switch (event.code) {
|
|
16043
|
+
case 'ArrowLeft':
|
|
16044
|
+
onArrowLeftKeyOn();
|
|
16045
|
+
break;
|
|
16046
|
+
case 'ArrowRight':
|
|
16047
|
+
onArrowRightKeyOn();
|
|
16048
|
+
break;
|
|
16049
|
+
case 'Backspace':
|
|
16050
|
+
onBackspaceKeyOn(event);
|
|
16051
|
+
break;
|
|
16052
|
+
}
|
|
16053
|
+
};
|
|
16054
|
+
var onArrowLeftKeyOn = function onArrowLeftKeyOn() {
|
|
16055
|
+
var focusIndex = focusedIndex;
|
|
16056
|
+
if (inputRef.current.value.length === 0 && props.value && props.value.length > 0) {
|
|
16057
|
+
focusIndex = focusIndex === null ? props.value.length - 1 : focusIndex - 1;
|
|
16058
|
+
if (focusIndex < 0) focusIndex = 0;
|
|
16059
|
+
}
|
|
16060
|
+
setFocusedIndex(focusIndex);
|
|
16061
|
+
};
|
|
16062
|
+
var onArrowRightKeyOn = function onArrowRightKeyOn() {
|
|
16063
|
+
var focusIndex = focusedIndex;
|
|
16064
|
+
if (inputRef.current.value.length === 0 && props.value && props.value.length > 0) {
|
|
16065
|
+
if (focusIndex === props.value.length - 1) {
|
|
16066
|
+
focusIndex = null;
|
|
16067
|
+
inputRef.current.focus();
|
|
16068
|
+
} else {
|
|
16069
|
+
focusIndex++;
|
|
16070
|
+
}
|
|
16071
|
+
}
|
|
16072
|
+
setFocusedIndex(focusIndex);
|
|
16073
|
+
};
|
|
16074
|
+
var onBackspaceKeyOn = function onBackspaceKeyOn(event) {
|
|
16075
|
+
if (focusedIndex !== null) {
|
|
16076
|
+
removeItem(event, focusedIndex);
|
|
16077
|
+
}
|
|
16078
|
+
};
|
|
16020
16079
|
var _onKeyDown = function onKeyDown(event) {
|
|
16021
16080
|
var inputValue = event.target.value;
|
|
16022
16081
|
var values = props.value || [];
|
|
16023
16082
|
props.onKeyDown && props.onKeyDown(event);
|
|
16024
|
-
|
|
16025
|
-
// do not continue if the user defined keydown wants to prevent
|
|
16026
16083
|
if (event.defaultPrevented) {
|
|
16027
16084
|
return;
|
|
16028
16085
|
}
|
|
16029
|
-
switch (event.
|
|
16086
|
+
switch (event.code) {
|
|
16030
16087
|
case 'Backspace':
|
|
16031
|
-
if (
|
|
16088
|
+
if (inputValue.length === 0 && values.length > 0) {
|
|
16032
16089
|
removeItem(event, values.length - 1);
|
|
16033
16090
|
}
|
|
16034
16091
|
break;
|
|
16035
16092
|
case 'Enter':
|
|
16093
|
+
case 'NumpadEnter':
|
|
16036
16094
|
if (inputValue && inputValue.trim().length && (!props.max || props.max > values.length)) {
|
|
16037
16095
|
addItem(event, inputValue, true);
|
|
16038
16096
|
}
|
|
16039
16097
|
break;
|
|
16098
|
+
case 'ArrowLeft':
|
|
16099
|
+
if (inputValue.length === 0 && values && values.length > 0) {
|
|
16100
|
+
DomHandler.focus(listRef.current);
|
|
16101
|
+
}
|
|
16102
|
+
break;
|
|
16103
|
+
case 'ArrowRight':
|
|
16104
|
+
event.stopPropagation();
|
|
16105
|
+
break;
|
|
16040
16106
|
default:
|
|
16041
16107
|
if (props.keyfilter) {
|
|
16042
16108
|
KeyFilter.onKeyPress(event, props.keyfilter);
|
|
@@ -16091,8 +16157,16 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
16091
16157
|
}
|
|
16092
16158
|
}
|
|
16093
16159
|
};
|
|
16160
|
+
var onContainerFocus = function onContainerFocus(event) {
|
|
16161
|
+
setFocusedState(true);
|
|
16162
|
+
};
|
|
16163
|
+
var onContainerBlur = function onContainerBlur() {
|
|
16164
|
+
setFocusedIndex(-1);
|
|
16165
|
+
setFocusedState(false);
|
|
16166
|
+
};
|
|
16094
16167
|
var _onFocus = function onFocus(event) {
|
|
16095
16168
|
setFocusedState(true);
|
|
16169
|
+
setFocusedIndex(null);
|
|
16096
16170
|
props.onFocus && props.onFocus(event);
|
|
16097
16171
|
};
|
|
16098
16172
|
var _onBlur = function onBlur(event) {
|
|
@@ -16142,6 +16216,9 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
16142
16216
|
DomHandler.focus(inputRef.current, props.autoFocus);
|
|
16143
16217
|
}
|
|
16144
16218
|
});
|
|
16219
|
+
var focusedOptionId = function focusedOptionId() {
|
|
16220
|
+
return focusedIndex !== null ? "".concat(props.inputId, "_chips_item_").concat(focusedIndex) : null;
|
|
16221
|
+
};
|
|
16145
16222
|
var createRemoveIcon = function createRemoveIcon(value, index) {
|
|
16146
16223
|
var iconProps = mergeProps({
|
|
16147
16224
|
className: cx('removeTokenIcon'),
|
|
@@ -16167,9 +16244,19 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
16167
16244
|
var label = /*#__PURE__*/React__namespace.createElement("span", labelProps, content);
|
|
16168
16245
|
var icon = createRemoveIcon(value, index);
|
|
16169
16246
|
var tokenProps = mergeProps({
|
|
16170
|
-
key: index,
|
|
16171
|
-
|
|
16172
|
-
'
|
|
16247
|
+
key: "".concat(index, "_").concat(value),
|
|
16248
|
+
id: props.inputId + '_chips_item_' + index,
|
|
16249
|
+
role: 'option',
|
|
16250
|
+
'aria-label': value,
|
|
16251
|
+
className: cx('token', {
|
|
16252
|
+
focusedIndex: focusedIndex,
|
|
16253
|
+
index: index
|
|
16254
|
+
}),
|
|
16255
|
+
'aria-selected': true,
|
|
16256
|
+
'aria-setsize': props.value.length,
|
|
16257
|
+
'aria-posinset': index + 1,
|
|
16258
|
+
'data-p-highlight': true,
|
|
16259
|
+
'data-p-focused': focusedIndex === index
|
|
16173
16260
|
}, ptm('token'));
|
|
16174
16261
|
return /*#__PURE__*/React__namespace.createElement("li", tokenProps, label, icon);
|
|
16175
16262
|
};
|
|
@@ -16209,13 +16296,24 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
16209
16296
|
var containerProps = mergeProps({
|
|
16210
16297
|
ref: listRef,
|
|
16211
16298
|
className: cx('container', {
|
|
16212
|
-
|
|
16299
|
+
isFilled: isFilled
|
|
16213
16300
|
}),
|
|
16214
16301
|
onClick: function onClick(e) {
|
|
16215
16302
|
return onWrapperClick();
|
|
16216
16303
|
},
|
|
16304
|
+
onKeyDown: function onKeyDown(e) {
|
|
16305
|
+
return onContainerKeyDown(e);
|
|
16306
|
+
},
|
|
16307
|
+
tabIndex: -1,
|
|
16308
|
+
role: 'listbox',
|
|
16309
|
+
'aria-orientation': 'horizontal',
|
|
16310
|
+
'aria-labelledby': props.ariaLabelledby,
|
|
16311
|
+
'aria-label': props.ariaLabel,
|
|
16312
|
+
'aria-activedescendant': focusedState ? focusedOptionId() : undefined,
|
|
16217
16313
|
'data-p-disabled': props.disabled,
|
|
16218
|
-
'data-p-focus': focusedState
|
|
16314
|
+
'data-p-focus': focusedState,
|
|
16315
|
+
onFocus: onContainerFocus,
|
|
16316
|
+
onBlur: onContainerBlur
|
|
16219
16317
|
}, ptm('container'));
|
|
16220
16318
|
return /*#__PURE__*/React__namespace.createElement("ul", containerProps, items, input);
|
|
16221
16319
|
};
|
|
@@ -16228,7 +16326,8 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
16228
16326
|
ref: elementRef,
|
|
16229
16327
|
className: classNames(props.className, cx('root', {
|
|
16230
16328
|
isFilled: isFilled,
|
|
16231
|
-
focusedState: focusedState
|
|
16329
|
+
focusedState: focusedState,
|
|
16330
|
+
disabled: props.disabled
|
|
16232
16331
|
})),
|
|
16233
16332
|
style: props.style
|
|
16234
16333
|
}, ptm('root'));
|
|
@@ -20049,7 +20148,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
20049
20148
|
}),
|
|
20050
20149
|
onClick: props.onClick,
|
|
20051
20150
|
disabled: props.disabled,
|
|
20052
|
-
'aria-label': ariaLabel
|
|
20151
|
+
'aria-label': ariaLabel('firstPageLabel')
|
|
20053
20152
|
}, getPTOptions('firstPageButton'));
|
|
20054
20153
|
var element = /*#__PURE__*/React__namespace.createElement("button", firstPageButtonProps, firstPageLinkIcon, /*#__PURE__*/React__namespace.createElement(Ripple, null));
|
|
20055
20154
|
if (props.template) {
|
|
@@ -20459,36 +20558,36 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
20459
20558
|
if (event.altKey) {
|
|
20460
20559
|
event.preventDefault();
|
|
20461
20560
|
}
|
|
20462
|
-
switch (event.
|
|
20561
|
+
switch (event.code) {
|
|
20463
20562
|
//up
|
|
20464
|
-
case
|
|
20563
|
+
case 'ArrowUp':
|
|
20465
20564
|
spin(event, 1);
|
|
20466
20565
|
event.preventDefault();
|
|
20467
20566
|
break;
|
|
20468
20567
|
|
|
20469
20568
|
//down
|
|
20470
|
-
case
|
|
20569
|
+
case 'ArrowDown':
|
|
20471
20570
|
spin(event, -1);
|
|
20472
20571
|
event.preventDefault();
|
|
20473
20572
|
break;
|
|
20474
20573
|
|
|
20475
20574
|
//left
|
|
20476
|
-
case
|
|
20575
|
+
case 'ArrowLeft':
|
|
20477
20576
|
if (!isNumeralChar(inputValue.charAt(selectionStart - 1))) {
|
|
20478
20577
|
event.preventDefault();
|
|
20479
20578
|
}
|
|
20480
20579
|
break;
|
|
20481
20580
|
|
|
20482
20581
|
//right
|
|
20483
|
-
case
|
|
20582
|
+
case 'ArrowRight':
|
|
20484
20583
|
if (!isNumeralChar(inputValue.charAt(selectionStart))) {
|
|
20485
20584
|
event.preventDefault();
|
|
20486
20585
|
}
|
|
20487
20586
|
break;
|
|
20488
20587
|
|
|
20489
20588
|
//enter and tab
|
|
20490
|
-
case
|
|
20491
|
-
case
|
|
20589
|
+
case 'Tab':
|
|
20590
|
+
case 'Enter':
|
|
20492
20591
|
newValueStr = validateValue(parseValue(inputValue));
|
|
20493
20592
|
inputRef.current.value = formatValue(newValueStr);
|
|
20494
20593
|
inputRef.current.setAttribute('aria-valuenow', newValueStr);
|
|
@@ -20496,7 +20595,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
20496
20595
|
break;
|
|
20497
20596
|
|
|
20498
20597
|
//backspace
|
|
20499
|
-
case
|
|
20598
|
+
case 'Backspace':
|
|
20500
20599
|
event.preventDefault();
|
|
20501
20600
|
if (selectionStart === selectionEnd) {
|
|
20502
20601
|
var deleteChar = inputValue.charAt(selectionStart - 1);
|
|
@@ -20540,7 +20639,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
20540
20639
|
break;
|
|
20541
20640
|
|
|
20542
20641
|
// del
|
|
20543
|
-
case
|
|
20642
|
+
case 'Delete':
|
|
20544
20643
|
event.preventDefault();
|
|
20545
20644
|
if (selectionStart === selectionEnd) {
|
|
20546
20645
|
var _deleteChar = inputValue.charAt(selectionStart);
|
|
@@ -20575,14 +20674,18 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
20575
20674
|
updateValue(event, newValueStr, null, 'delete-range');
|
|
20576
20675
|
}
|
|
20577
20676
|
break;
|
|
20578
|
-
|
|
20579
|
-
|
|
20580
|
-
|
|
20581
|
-
|
|
20582
|
-
|
|
20583
|
-
|
|
20584
|
-
|
|
20585
|
-
|
|
20677
|
+
case 'End':
|
|
20678
|
+
event.preventDefault();
|
|
20679
|
+
if (!ObjectUtils.isEmpty(props.max)) {
|
|
20680
|
+
updateModel(event, props.max);
|
|
20681
|
+
}
|
|
20682
|
+
break;
|
|
20683
|
+
case 'Home':
|
|
20684
|
+
event.preventDefault();
|
|
20685
|
+
if (!ObjectUtils.isEmpty(props.min)) {
|
|
20686
|
+
updateModel(event, props.min);
|
|
20687
|
+
}
|
|
20688
|
+
break;
|
|
20586
20689
|
}
|
|
20587
20690
|
};
|
|
20588
20691
|
var onInputKeyUp = function onInputKeyUp(event) {
|
|
@@ -21243,7 +21346,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
21243
21346
|
onChange: onChange,
|
|
21244
21347
|
disabled: props.disabled,
|
|
21245
21348
|
className: 'p-paginator-page-input',
|
|
21246
|
-
|
|
21349
|
+
'aria-label': ariaLabelValue,
|
|
21247
21350
|
element: element,
|
|
21248
21351
|
props: props
|
|
21249
21352
|
};
|
|
@@ -21287,7 +21390,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
21287
21390
|
}),
|
|
21288
21391
|
onClick: props.onClick,
|
|
21289
21392
|
disabled: props.disabled,
|
|
21290
|
-
'aria-label': ariaLabel
|
|
21393
|
+
'aria-label': ariaLabel('lastPageLabel')
|
|
21291
21394
|
}, getPTOptions('lastPageButton'));
|
|
21292
21395
|
var element = /*#__PURE__*/React__namespace.createElement("button", lastPageButtonProps, lastPageLinkIcon, /*#__PURE__*/React__namespace.createElement(Ripple, null));
|
|
21293
21396
|
if (props.template) {
|
|
@@ -21339,7 +21442,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
21339
21442
|
}),
|
|
21340
21443
|
onClick: props.onClick,
|
|
21341
21444
|
disabled: props.disabled,
|
|
21342
|
-
'aria-label': ariaLabel
|
|
21445
|
+
'aria-label': ariaLabel('nextPageLabel')
|
|
21343
21446
|
}, getPTOptions('nextPageButton'));
|
|
21344
21447
|
var element = /*#__PURE__*/React__namespace.createElement("button", nextPageButtonProps, nextPageLinkIcon, /*#__PURE__*/React__namespace.createElement(Ripple, null));
|
|
21345
21448
|
if (props.template) {
|
|
@@ -21403,7 +21506,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
21403
21506
|
page: props.page
|
|
21404
21507
|
}),
|
|
21405
21508
|
disabled: props.disabled,
|
|
21406
|
-
'aria-label': ariaLabel
|
|
21509
|
+
'aria-label': ariaLabel('pageLabel', {
|
|
21407
21510
|
page: pageLink
|
|
21408
21511
|
}),
|
|
21409
21512
|
'aria-current': pageLink - 1 === props.page ? 'true' : undefined
|
|
@@ -21422,7 +21525,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
21422
21525
|
page: pageLink - 1,
|
|
21423
21526
|
currentPage: props.page,
|
|
21424
21527
|
totalPages: props.pageCount,
|
|
21425
|
-
ariaLabel: ariaLabel
|
|
21528
|
+
ariaLabel: ariaLabel('pageLabel', {
|
|
21426
21529
|
page: pageLink
|
|
21427
21530
|
}),
|
|
21428
21531
|
ariaCurrent: pageLink - 1 === props.page ? 'true' : undefined,
|
|
@@ -21479,7 +21582,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
21479
21582
|
}),
|
|
21480
21583
|
onClick: props.onClick,
|
|
21481
21584
|
disabled: props.disabled,
|
|
21482
|
-
'aria-label': ariaLabel
|
|
21585
|
+
'aria-label': ariaLabel('previousPageLabel')
|
|
21483
21586
|
}, getPTOptions('prevPageButton'));
|
|
21484
21587
|
var element = /*#__PURE__*/React__namespace.createElement("button", prevPageButtonProps, prevPageLinkIcon, /*#__PURE__*/React__namespace.createElement(Ripple, null));
|
|
21485
21588
|
if (props.template) {
|
|
@@ -21552,10 +21655,13 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
21552
21655
|
item: function item(_ref7) {
|
|
21553
21656
|
var selected = _ref7.selected,
|
|
21554
21657
|
disabled = _ref7.disabled,
|
|
21555
|
-
label = _ref7.label
|
|
21658
|
+
label = _ref7.label,
|
|
21659
|
+
index = _ref7.index,
|
|
21660
|
+
focusedOptionIndex = _ref7.focusedOptionIndex;
|
|
21556
21661
|
return classNames('p-dropdown-item', {
|
|
21557
21662
|
'p-highlight': selected,
|
|
21558
21663
|
'p-disabled': disabled,
|
|
21664
|
+
'p-focus': index === focusedOptionIndex,
|
|
21559
21665
|
'p-dropdown-item-empty': !label || label.length === 0
|
|
21560
21666
|
});
|
|
21561
21667
|
},
|
|
@@ -21622,6 +21728,8 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
21622
21728
|
onShow: null,
|
|
21623
21729
|
optionDisabled: null,
|
|
21624
21730
|
optionGroupChildren: 'items',
|
|
21731
|
+
selectOnFocus: false,
|
|
21732
|
+
autoOptionFocus: false,
|
|
21625
21733
|
optionGroupLabel: null,
|
|
21626
21734
|
optionGroupTemplate: null,
|
|
21627
21735
|
optionLabel: null,
|
|
@@ -21660,7 +21768,9 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
21660
21768
|
selected = props.selected,
|
|
21661
21769
|
disabled = props.disabled,
|
|
21662
21770
|
option = props.option,
|
|
21663
|
-
label = props.label
|
|
21771
|
+
label = props.label,
|
|
21772
|
+
index = props.index,
|
|
21773
|
+
focusedOptionIndex = props.focusedOptionIndex;
|
|
21664
21774
|
var getPTOptions = function getPTOptions(key) {
|
|
21665
21775
|
return ptm(key, {
|
|
21666
21776
|
context: {
|
|
@@ -21669,7 +21779,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
21669
21779
|
}
|
|
21670
21780
|
});
|
|
21671
21781
|
};
|
|
21672
|
-
var _onClick = function onClick(event) {
|
|
21782
|
+
var _onClick = function onClick(event, i) {
|
|
21673
21783
|
if (props.onClick) {
|
|
21674
21784
|
props.onClick({
|
|
21675
21785
|
originalEvent: event,
|
|
@@ -21684,7 +21794,9 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
21684
21794
|
className: classNames(option.className, cx('item', {
|
|
21685
21795
|
selected: selected,
|
|
21686
21796
|
disabled: disabled,
|
|
21687
|
-
label: label
|
|
21797
|
+
label: label,
|
|
21798
|
+
index: index,
|
|
21799
|
+
focusedOptionIndex: focusedOptionIndex
|
|
21688
21800
|
})),
|
|
21689
21801
|
style: props.style,
|
|
21690
21802
|
onClick: function onClick(e) {
|
|
@@ -21693,6 +21805,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
21693
21805
|
'aria-label': label,
|
|
21694
21806
|
'aria-selected': selected,
|
|
21695
21807
|
'data-p-highlight': selected,
|
|
21808
|
+
'data-p-focused': focusedOptionIndex === index,
|
|
21696
21809
|
'data-p-disabled': disabled
|
|
21697
21810
|
}, getPTOptions('item'));
|
|
21698
21811
|
return /*#__PURE__*/React__namespace.createElement("li", itemProps, content, /*#__PURE__*/React__namespace.createElement(Ripple, null));
|
|
@@ -21764,6 +21877,8 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
21764
21877
|
var disabled = props.isOptionDisabled(option);
|
|
21765
21878
|
return /*#__PURE__*/React__namespace.createElement(DropdownItem, {
|
|
21766
21879
|
key: optionKey,
|
|
21880
|
+
index: j,
|
|
21881
|
+
focusedOptionIndex: props.focusedOptionIndex,
|
|
21767
21882
|
label: optionLabel,
|
|
21768
21883
|
option: option,
|
|
21769
21884
|
style: style,
|
|
@@ -21811,6 +21926,8 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
21811
21926
|
return /*#__PURE__*/React__namespace.createElement(DropdownItem, {
|
|
21812
21927
|
key: optionKey,
|
|
21813
21928
|
label: optionLabel,
|
|
21929
|
+
index: index,
|
|
21930
|
+
focusedOptionIndex: props.focusedOptionIndex,
|
|
21814
21931
|
option: option,
|
|
21815
21932
|
style: style,
|
|
21816
21933
|
template: props.itemTemplate,
|
|
@@ -22003,20 +22120,30 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
22003
22120
|
setFilterState = _React$useState2[1];
|
|
22004
22121
|
var _React$useState3 = React__namespace.useState(false),
|
|
22005
22122
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
22006
|
-
|
|
22007
|
-
|
|
22123
|
+
clicked = _React$useState4[0],
|
|
22124
|
+
setClicked = _React$useState4[1];
|
|
22008
22125
|
var _React$useState5 = React__namespace.useState(false),
|
|
22009
22126
|
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
22010
|
-
|
|
22011
|
-
|
|
22127
|
+
focusedState = _React$useState6[0],
|
|
22128
|
+
setFocusedState = _React$useState6[1];
|
|
22129
|
+
var _React$useState7 = React__namespace.useState(null),
|
|
22130
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
22131
|
+
focusedOptionIndex = _React$useState8[0],
|
|
22132
|
+
setFocusedOptionIndex = _React$useState8[1];
|
|
22133
|
+
var _React$useState9 = React__namespace.useState(false),
|
|
22134
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
22135
|
+
overlayVisibleState = _React$useState10[0],
|
|
22136
|
+
setOverlayVisibleState = _React$useState10[1];
|
|
22012
22137
|
var elementRef = React__namespace.useRef(null);
|
|
22013
22138
|
var overlayRef = React__namespace.useRef(null);
|
|
22139
|
+
var firstHiddenFocusableElementOnOverlay = React__namespace.useRef(null);
|
|
22140
|
+
var lastHiddenFocusableElementOnOverlay = React__namespace.useRef(null);
|
|
22014
22141
|
var inputRef = React__namespace.useRef(props.inputRef);
|
|
22015
22142
|
var focusInputRef = React__namespace.useRef(props.focusInputRef);
|
|
22016
22143
|
var virtualScrollerRef = React__namespace.useRef(null);
|
|
22017
22144
|
var searchTimeout = React__namespace.useRef(null);
|
|
22018
22145
|
var searchValue = React__namespace.useRef(null);
|
|
22019
|
-
|
|
22146
|
+
React__namespace.useRef(null);
|
|
22020
22147
|
var isLazy = props.virtualScrollerOptions && props.virtualScrollerOptions.lazy;
|
|
22021
22148
|
var hasFilter = ObjectUtils.isNotEmpty(filterState);
|
|
22022
22149
|
var appendTo = props.appendTo || context && context.appendTo || PrimeReact.appendTo;
|
|
@@ -22080,6 +22207,14 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
22080
22207
|
return props.options;
|
|
22081
22208
|
}
|
|
22082
22209
|
};
|
|
22210
|
+
var onFirstHiddenFocus = function onFirstHiddenFocus(event) {
|
|
22211
|
+
var focusableEl = event.relatedTarget === focusInputRef.current ? DomHandler.getFirstFocusableElement(overlayRef.current, ':not([data-p-hidden-focusable="true"])') : focusInputRef.current;
|
|
22212
|
+
DomHandler.focus(focusableEl);
|
|
22213
|
+
};
|
|
22214
|
+
var onLastHiddenFocus = function onLastHiddenFocus(event) {
|
|
22215
|
+
var focusableEl = event.relatedTarget === focusInputRef.current ? DomHandler.getLastFocusableElement(overlayRef.current, ':not([data-p-hidden-focusable="true"])') : focusInputRef.current;
|
|
22216
|
+
DomHandler.focus(focusableEl);
|
|
22217
|
+
};
|
|
22083
22218
|
var isClearClicked = function isClearClicked(event) {
|
|
22084
22219
|
return DomHandler.isAttributeEquals(event.target, 'data-pc-section', 'clearicon') || DomHandler.isAttributeEquals(event.target.parentElement || event.target, 'data-pc-section', 'filterclearicon');
|
|
22085
22220
|
};
|
|
@@ -22099,6 +22234,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
22099
22234
|
DomHandler.focus(focusInputRef.current);
|
|
22100
22235
|
overlayVisibleState ? hide() : show();
|
|
22101
22236
|
}
|
|
22237
|
+
setClicked(true);
|
|
22102
22238
|
};
|
|
22103
22239
|
var onInputFocus = function onInputFocus(event) {
|
|
22104
22240
|
if (props.showOnFocus && !overlayVisibleState) {
|
|
@@ -22130,6 +22266,15 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
22130
22266
|
}, 200);
|
|
22131
22267
|
}
|
|
22132
22268
|
};
|
|
22269
|
+
var onOptionSelect = function onOptionSelect(event, option) {
|
|
22270
|
+
var isHide = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
22271
|
+
var value = getOptionValue(option);
|
|
22272
|
+
selectItem({
|
|
22273
|
+
originalEvent: event,
|
|
22274
|
+
option: value
|
|
22275
|
+
});
|
|
22276
|
+
isHide && hide();
|
|
22277
|
+
};
|
|
22133
22278
|
var onPanelClick = function onPanelClick(event) {
|
|
22134
22279
|
OverlayService.emit('overlay-click', {
|
|
22135
22280
|
originalEvent: event,
|
|
@@ -22137,189 +22282,285 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
22137
22282
|
});
|
|
22138
22283
|
};
|
|
22139
22284
|
var onInputKeyDown = function onInputKeyDown(event) {
|
|
22285
|
+
if (props.disabled || DomHandler.isAndroid()) {
|
|
22286
|
+
event.preventDefault();
|
|
22287
|
+
return;
|
|
22288
|
+
}
|
|
22289
|
+
var metaKey = event.metaKey || event.ctrlKey;
|
|
22140
22290
|
switch (event.code) {
|
|
22141
22291
|
case 'ArrowDown':
|
|
22142
|
-
|
|
22292
|
+
onArrowDownKey(event);
|
|
22143
22293
|
break;
|
|
22144
22294
|
case 'ArrowUp':
|
|
22145
|
-
|
|
22295
|
+
onArrowUpKey(event);
|
|
22296
|
+
break;
|
|
22297
|
+
case 'ArrowLeft':
|
|
22298
|
+
case 'ArrowRight':
|
|
22299
|
+
onArrowLeftKey(event, props.editable);
|
|
22300
|
+
break;
|
|
22301
|
+
case 'Home':
|
|
22302
|
+
onHomeKey(event);
|
|
22303
|
+
break;
|
|
22304
|
+
case 'End':
|
|
22305
|
+
onEndKey(event);
|
|
22306
|
+
break;
|
|
22307
|
+
case 'PageDown':
|
|
22308
|
+
onPageDownKey(event);
|
|
22309
|
+
break;
|
|
22310
|
+
case 'PageUp':
|
|
22311
|
+
onPageUpKey(event);
|
|
22146
22312
|
break;
|
|
22147
22313
|
case 'Space':
|
|
22314
|
+
onSpaceKey(event, props.editable);
|
|
22315
|
+
break;
|
|
22316
|
+
case 'NumpadEnter':
|
|
22148
22317
|
case 'Enter':
|
|
22149
|
-
|
|
22150
|
-
event.preventDefault();
|
|
22318
|
+
onEnterKey(event);
|
|
22151
22319
|
break;
|
|
22152
22320
|
case 'Escape':
|
|
22321
|
+
onEscapeKey(event);
|
|
22322
|
+
break;
|
|
22153
22323
|
case 'Tab':
|
|
22154
|
-
|
|
22324
|
+
onTabKey(event);
|
|
22325
|
+
break;
|
|
22326
|
+
case 'Backspace':
|
|
22327
|
+
onBackspaceKey(event, props.editable);
|
|
22328
|
+
break;
|
|
22329
|
+
case 'ShiftLeft':
|
|
22330
|
+
case 'ShiftRight':
|
|
22331
|
+
//NOOP
|
|
22155
22332
|
break;
|
|
22156
22333
|
default:
|
|
22157
|
-
|
|
22334
|
+
if (!metaKey && ObjectUtils.isPrintableCharacter(event.key)) {
|
|
22335
|
+
!overlayVisibleState && show();
|
|
22336
|
+
!props.editable && searchOptions(event, event.key);
|
|
22337
|
+
}
|
|
22158
22338
|
break;
|
|
22159
22339
|
}
|
|
22340
|
+
setClicked(false);
|
|
22160
22341
|
};
|
|
22161
22342
|
var onFilterInputKeyDown = function onFilterInputKeyDown(event) {
|
|
22162
22343
|
switch (event.code) {
|
|
22163
22344
|
case 'ArrowDown':
|
|
22164
|
-
|
|
22345
|
+
onArrowDownKey(event);
|
|
22165
22346
|
break;
|
|
22166
22347
|
case 'ArrowUp':
|
|
22167
|
-
|
|
22348
|
+
onArrowUpKey(event);
|
|
22349
|
+
break;
|
|
22350
|
+
case 'ArrowLeft':
|
|
22351
|
+
case 'ArrowRight':
|
|
22352
|
+
onArrowLeftKey(event, true);
|
|
22168
22353
|
break;
|
|
22169
22354
|
case 'Escape':
|
|
22170
22355
|
case 'Enter':
|
|
22171
|
-
|
|
22356
|
+
onEnterKey(event);
|
|
22172
22357
|
event.preventDefault();
|
|
22173
22358
|
break;
|
|
22174
22359
|
}
|
|
22175
22360
|
};
|
|
22176
|
-
var
|
|
22177
|
-
|
|
22178
|
-
var prevOption = findPrevOption(getSelectedOptionIndex());
|
|
22179
|
-
if (prevOption) {
|
|
22180
|
-
selectItem({
|
|
22181
|
-
originalEvent: event,
|
|
22182
|
-
option: prevOption
|
|
22183
|
-
});
|
|
22184
|
-
}
|
|
22185
|
-
}
|
|
22186
|
-
event.preventDefault();
|
|
22361
|
+
var hasFocusableElements = function hasFocusableElements() {
|
|
22362
|
+
return DomHandler.getFocusableElements(overlayRef.current, ':not([data-p-hidden-focusable="true"])').length > 0;
|
|
22187
22363
|
};
|
|
22188
|
-
var
|
|
22189
|
-
|
|
22190
|
-
|
|
22191
|
-
show();
|
|
22192
|
-
} else {
|
|
22193
|
-
var nextOption = findNextOption(getSelectedOptionIndex());
|
|
22194
|
-
if (nextOption) {
|
|
22195
|
-
selectItem({
|
|
22196
|
-
originalEvent: event,
|
|
22197
|
-
option: nextOption
|
|
22198
|
-
});
|
|
22199
|
-
}
|
|
22200
|
-
}
|
|
22201
|
-
}
|
|
22202
|
-
event.preventDefault();
|
|
22364
|
+
var isOptionMatched = function isOptionMatched(option) {
|
|
22365
|
+
var _getOptionLabel;
|
|
22366
|
+
return isValidOption(option) && ((_getOptionLabel = getOptionLabel(option)) === null || _getOptionLabel === void 0 ? void 0 : _getOptionLabel.toLocaleLowerCase(props.filterLocale).startsWith(searchValue.current.toLocaleLowerCase(props.filterLocale)));
|
|
22203
22367
|
};
|
|
22204
|
-
var
|
|
22205
|
-
|
|
22206
|
-
var groupIndex = index === -1 ? 0 : index.group;
|
|
22207
|
-
var optionIndex = index === -1 ? -1 : index.option;
|
|
22208
|
-
var option = findNextOptionInList(getOptionGroupChildren(visibleOptions[groupIndex]), optionIndex);
|
|
22209
|
-
if (option) return option;else if (groupIndex + 1 !== visibleOptions.length) return findNextOption({
|
|
22210
|
-
group: groupIndex + 1,
|
|
22211
|
-
option: -1
|
|
22212
|
-
});else return null;
|
|
22213
|
-
}
|
|
22214
|
-
return findNextOptionInList(visibleOptions, index);
|
|
22215
|
-
};
|
|
22216
|
-
var findNextOptionInList = function findNextOptionInList(list, index) {
|
|
22217
|
-
var i = index + 1;
|
|
22218
|
-
if (i === list.length) {
|
|
22219
|
-
return null;
|
|
22220
|
-
}
|
|
22221
|
-
var option = list[i];
|
|
22222
|
-
return isOptionDisabled(option) ? findNextOptionInList(i) : option;
|
|
22368
|
+
var isValidOption = function isValidOption(option) {
|
|
22369
|
+
return ObjectUtils.isNotEmpty(option) && !(isOptionDisabled(option) || isOptionGroup(option));
|
|
22223
22370
|
};
|
|
22224
|
-
var
|
|
22225
|
-
|
|
22226
|
-
|
|
22227
|
-
|
|
22228
|
-
|
|
22229
|
-
|
|
22230
|
-
|
|
22231
|
-
|
|
22232
|
-
|
|
22233
|
-
|
|
22234
|
-
|
|
22235
|
-
|
|
22236
|
-
|
|
22237
|
-
return
|
|
22238
|
-
};
|
|
22239
|
-
var findPrevOptionInList = function findPrevOptionInList(list, index) {
|
|
22240
|
-
var i = index - 1;
|
|
22241
|
-
if (i < 0) {
|
|
22242
|
-
return null;
|
|
22243
|
-
}
|
|
22244
|
-
var option = list[i];
|
|
22245
|
-
return isOptionDisabled(option) ? findPrevOption(i) : option;
|
|
22371
|
+
var hasSelectedOption = function hasSelectedOption() {
|
|
22372
|
+
return ObjectUtils.isNotEmpty(props.value);
|
|
22373
|
+
};
|
|
22374
|
+
var isValidSelectedOption = function isValidSelectedOption(option) {
|
|
22375
|
+
return isValidOption(option) && isSelected(option);
|
|
22376
|
+
};
|
|
22377
|
+
var findSelectedOptionIndex = function findSelectedOptionIndex() {
|
|
22378
|
+
return hasSelectedOption ? visibleOptions.findIndex(function (option) {
|
|
22379
|
+
return isValidSelectedOption(option);
|
|
22380
|
+
}) : -1;
|
|
22381
|
+
};
|
|
22382
|
+
var findFirstFocusedOptionIndex = function findFirstFocusedOptionIndex() {
|
|
22383
|
+
var selectedIndex = findSelectedOptionIndex();
|
|
22384
|
+
return selectedIndex < 0 ? findFirstOptionIndex() : selectedIndex;
|
|
22246
22385
|
};
|
|
22247
|
-
var
|
|
22386
|
+
var searchOptions = function searchOptions(event, _char) {
|
|
22387
|
+
searchValue.current = (searchValue.current || '') + _char;
|
|
22388
|
+
var optionIndex = -1;
|
|
22389
|
+
var matched = false;
|
|
22390
|
+
if (ObjectUtils.isNotEmpty(searchValue.current)) {
|
|
22391
|
+
if (focusedOptionIndex !== -1) {
|
|
22392
|
+
optionIndex = visibleOptions.slice(focusedOptionIndex).findIndex(function (option) {
|
|
22393
|
+
return isOptionMatched(option);
|
|
22394
|
+
});
|
|
22395
|
+
optionIndex = optionIndex === -1 ? visibleOptions.slice(0, focusedOptionIndex).findIndex(function (option) {
|
|
22396
|
+
return isOptionMatched(option);
|
|
22397
|
+
}) : optionIndex + focusedOptionIndex;
|
|
22398
|
+
} else {
|
|
22399
|
+
optionIndex = visibleOptions.findIndex(function (option) {
|
|
22400
|
+
return isOptionMatched(option);
|
|
22401
|
+
});
|
|
22402
|
+
}
|
|
22403
|
+
if (optionIndex !== -1) {
|
|
22404
|
+
matched = true;
|
|
22405
|
+
}
|
|
22406
|
+
if (optionIndex === -1 && focusedOptionIndex === -1) {
|
|
22407
|
+
optionIndex = findFirstFocusedOptionIndex();
|
|
22408
|
+
}
|
|
22409
|
+
if (optionIndex !== -1) {
|
|
22410
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
22411
|
+
}
|
|
22412
|
+
}
|
|
22248
22413
|
if (searchTimeout.current) {
|
|
22249
22414
|
clearTimeout(searchTimeout.current);
|
|
22250
22415
|
}
|
|
22251
|
-
|
|
22252
|
-
|
|
22253
|
-
|
|
22416
|
+
searchTimeout.current = setTimeout(function () {
|
|
22417
|
+
searchValue.current = '';
|
|
22418
|
+
searchTimeout.current = null;
|
|
22419
|
+
}, 500);
|
|
22420
|
+
return matched;
|
|
22421
|
+
};
|
|
22422
|
+
var findLastFocusedOptionIndex = function findLastFocusedOptionIndex() {
|
|
22423
|
+
var selectedIndex = findSelectedOptionIndex();
|
|
22424
|
+
return selectedIndex < 0 ? findLastOptionIndex() : selectedIndex;
|
|
22425
|
+
};
|
|
22426
|
+
var findFirstOptionIndex = function findFirstOptionIndex() {
|
|
22427
|
+
return visibleOptions.findIndex(function (option) {
|
|
22428
|
+
return isValidOption(option);
|
|
22429
|
+
});
|
|
22430
|
+
};
|
|
22431
|
+
var findLastOptionIndex = function findLastOptionIndex() {
|
|
22432
|
+
return ObjectUtils.findLastIndex(visibleOptions, function (option) {
|
|
22433
|
+
return isValidOption(option);
|
|
22434
|
+
});
|
|
22435
|
+
};
|
|
22436
|
+
var findNextOptionIndex = function findNextOptionIndex(index) {
|
|
22437
|
+
var matchedOptionIndex = index < visibleOptions.length - 1 ? visibleOptions.slice(index + 1).findIndex(function (option) {
|
|
22438
|
+
return isValidOption(option);
|
|
22439
|
+
}) : -1;
|
|
22440
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
|
|
22441
|
+
};
|
|
22442
|
+
var findPrevOptionIndex = function findPrevOptionIndex(index) {
|
|
22443
|
+
var matchedOptionIndex = index > 0 ? ObjectUtils.findLastIndex(visibleOptions.slice(0, index), function (option) {
|
|
22444
|
+
return isValidOption(option);
|
|
22445
|
+
}) : -1;
|
|
22446
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
22447
|
+
};
|
|
22448
|
+
var changeFocusedOptionIndex = function changeFocusedOptionIndex(event, index) {
|
|
22449
|
+
if (focusedOptionIndex !== index) {
|
|
22450
|
+
setFocusedOptionIndex(index);
|
|
22451
|
+
if (props.selectOnFocus) {
|
|
22452
|
+
onOptionSelect(event, visibleOptions[index], false);
|
|
22453
|
+
}
|
|
22254
22454
|
}
|
|
22255
|
-
|
|
22256
|
-
|
|
22257
|
-
|
|
22258
|
-
|
|
22455
|
+
};
|
|
22456
|
+
var onArrowDownKey = function onArrowDownKey(event) {
|
|
22457
|
+
if (!overlayVisibleState) {
|
|
22458
|
+
show();
|
|
22459
|
+
props.editable && changeFocusedOptionIndex(event, findSelectedOptionIndex());
|
|
22460
|
+
} else {
|
|
22461
|
+
var optionIndex = focusedOptionIndex !== -1 ? findNextOptionIndex(focusedOptionIndex) : clicked ? findFirstOptionIndex() : findFirstFocusedOptionIndex();
|
|
22462
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
22259
22463
|
}
|
|
22260
|
-
|
|
22261
|
-
|
|
22262
|
-
|
|
22263
|
-
|
|
22264
|
-
|
|
22265
|
-
if (
|
|
22266
|
-
|
|
22267
|
-
originalEvent: event,
|
|
22268
|
-
option: newOption
|
|
22269
|
-
});
|
|
22464
|
+
event.preventDefault();
|
|
22465
|
+
};
|
|
22466
|
+
var onArrowUpKey = function onArrowUpKey(event) {
|
|
22467
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
22468
|
+
if (event.altKey && !pressedInInputText) {
|
|
22469
|
+
if (focusedOptionIndex !== -1) {
|
|
22470
|
+
onOptionSelect(event, visibleOptions[focusedOptionIndex]);
|
|
22270
22471
|
}
|
|
22472
|
+
state.overlayVisible && hide();
|
|
22473
|
+
event.preventDefault();
|
|
22474
|
+
} else {
|
|
22475
|
+
var optionIndex = focusedOptionIndex !== -1 ? findPrevOptionIndex(focusedOptionIndex) : clicked ? findLastOptionIndex() : findLastFocusedOptionIndex();
|
|
22476
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
22477
|
+
!overlayVisibleState && show();
|
|
22478
|
+
event.preventDefault();
|
|
22271
22479
|
}
|
|
22272
|
-
searchTimeout.current = setTimeout(function () {
|
|
22273
|
-
searchValue.current = null;
|
|
22274
|
-
}, 250);
|
|
22275
22480
|
};
|
|
22276
|
-
var
|
|
22277
|
-
|
|
22278
|
-
|
|
22481
|
+
var onArrowLeftKey = function onArrowLeftKey(event) {
|
|
22482
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
22483
|
+
pressedInInputText && setFocusedOptionIndex(-1);
|
|
22484
|
+
};
|
|
22485
|
+
var onHomeKey = function onHomeKey(event) {
|
|
22486
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
22487
|
+
if (pressedInInputText) {
|
|
22488
|
+
event.currentTarget.setSelectionRange(0, 0);
|
|
22489
|
+
setFocusedOptionIndex(-1);
|
|
22490
|
+
} else {
|
|
22491
|
+
changeFocusedOptionIndex(event, findFirstOptionIndex());
|
|
22492
|
+
!overlayVisibleState && show();
|
|
22279
22493
|
}
|
|
22280
|
-
|
|
22494
|
+
event.preventDefault();
|
|
22281
22495
|
};
|
|
22282
|
-
var
|
|
22283
|
-
|
|
22284
|
-
|
|
22285
|
-
|
|
22286
|
-
|
|
22287
|
-
|
|
22496
|
+
var onEndKey = function onEndKey(event) {
|
|
22497
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
22498
|
+
if (pressedInInputText) {
|
|
22499
|
+
var target = event.currentTarget;
|
|
22500
|
+
var len = target.value.length;
|
|
22501
|
+
target.setSelectionRange(len, len);
|
|
22502
|
+
setFocusedOptionIndex(-1);
|
|
22503
|
+
} else {
|
|
22504
|
+
changeFocusedOptionIndex(event, findLastOptionIndex());
|
|
22505
|
+
!overlayVisibleState && show();
|
|
22288
22506
|
}
|
|
22289
|
-
|
|
22507
|
+
event.preventDefault();
|
|
22290
22508
|
};
|
|
22291
|
-
var
|
|
22292
|
-
|
|
22293
|
-
|
|
22294
|
-
|
|
22295
|
-
|
|
22296
|
-
|
|
22297
|
-
|
|
22298
|
-
|
|
22299
|
-
|
|
22300
|
-
|
|
22301
|
-
|
|
22509
|
+
var onPageUpKey = function onPageUpKey(event) {
|
|
22510
|
+
event.preventDefault();
|
|
22511
|
+
};
|
|
22512
|
+
var onPageDownKey = function onPageDownKey(event) {
|
|
22513
|
+
event.preventDefault();
|
|
22514
|
+
};
|
|
22515
|
+
var onSpaceKey = function onSpaceKey(event) {
|
|
22516
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
22517
|
+
!pressedInInputText && onEnterKey(event);
|
|
22518
|
+
};
|
|
22519
|
+
var onEnterKey = function onEnterKey(event) {
|
|
22520
|
+
if (!overlayVisibleState) {
|
|
22521
|
+
setFocusedOptionIndex(-1);
|
|
22522
|
+
onArrowDownKey(event);
|
|
22523
|
+
} else {
|
|
22524
|
+
if (focusedOptionIndex !== -1) {
|
|
22525
|
+
onOptionSelect(event, visibleOptions[focusedOptionIndex]);
|
|
22302
22526
|
}
|
|
22527
|
+
hide();
|
|
22303
22528
|
}
|
|
22304
|
-
|
|
22305
|
-
|
|
22306
|
-
|
|
22307
|
-
|
|
22308
|
-
|
|
22529
|
+
event.preventDefault();
|
|
22530
|
+
};
|
|
22531
|
+
var onEscapeKey = function onEscapeKey(event) {
|
|
22532
|
+
overlayVisibleState && hide();
|
|
22533
|
+
event.preventDefault();
|
|
22534
|
+
};
|
|
22535
|
+
var onTabKey = function onTabKey(event) {
|
|
22536
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
22537
|
+
if (!pressedInInputText) {
|
|
22538
|
+
if (overlayVisibleState && hasFocusableElements()) {
|
|
22539
|
+
DomHandler.focus($refs.firstHiddenFocusableElementOnOverlay);
|
|
22540
|
+
event.preventDefault();
|
|
22541
|
+
} else {
|
|
22542
|
+
if (focusedOptionIndex !== -1) {
|
|
22543
|
+
onOptionSelect(event, visibleOptions[focusedOptionIndex]);
|
|
22309
22544
|
}
|
|
22545
|
+
overlayVisibleState && hide();
|
|
22310
22546
|
}
|
|
22311
22547
|
}
|
|
22312
|
-
return null;
|
|
22313
22548
|
};
|
|
22314
|
-
var
|
|
22315
|
-
var
|
|
22316
|
-
if (
|
|
22317
|
-
|
|
22549
|
+
var onBackspaceKey = function onBackspaceKey(event) {
|
|
22550
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
22551
|
+
if (pressedInInputText) {
|
|
22552
|
+
!overlayVisibleState && show();
|
|
22318
22553
|
}
|
|
22319
|
-
label = label.toLocaleLowerCase(props.filterLocale);
|
|
22320
|
-
return label.startsWith(searchValue.current.toLocaleLowerCase(props.filterLocale));
|
|
22321
22554
|
};
|
|
22322
22555
|
var onEditableInputChange = function onEditableInputChange(event) {
|
|
22556
|
+
!overlayVisibleState && show();
|
|
22557
|
+
var searchIndex = null;
|
|
22558
|
+
if (event.target.value) {
|
|
22559
|
+
searchIndex = visibleOptions.findIndex(function (item) {
|
|
22560
|
+
return item.name.toLocaleLowerCase().startsWith(event.target.value.toLocaleLowerCase());
|
|
22561
|
+
});
|
|
22562
|
+
}
|
|
22563
|
+
setFocusedOptionIndex(searchIndex);
|
|
22323
22564
|
if (props.onChange) {
|
|
22324
22565
|
props.onChange({
|
|
22325
22566
|
originalEvent: event.originalEvent,
|
|
@@ -22449,10 +22690,17 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
22449
22690
|
return ObjectUtils.equals(props.value, getOptionValue(option), equalityKey());
|
|
22450
22691
|
};
|
|
22451
22692
|
var show = function show() {
|
|
22693
|
+
setFocusedOptionIndex(focusedOptionIndex !== -1 ? focusedOptionIndex : props.autoOptionFocus ? findFirstFocusedOptionIndex() : props.editable ? -1 : findSelectedOptionIndex());
|
|
22452
22694
|
setOverlayVisibleState(true);
|
|
22453
22695
|
};
|
|
22454
22696
|
var hide = function hide() {
|
|
22455
22697
|
setOverlayVisibleState(false);
|
|
22698
|
+
setClicked(false);
|
|
22699
|
+
};
|
|
22700
|
+
var onFocus = function onFocus() {
|
|
22701
|
+
if (props.editable) {
|
|
22702
|
+
DomHandler.focus(inputRef.current);
|
|
22703
|
+
}
|
|
22456
22704
|
};
|
|
22457
22705
|
var onOverlayEnter = function onOverlayEnter(callback) {
|
|
22458
22706
|
ZIndexUtils.set('overlay', overlayRef.current, context && context.autoZIndex || PrimeReact.autoZIndex, context && context.zIndex['overlay'] || PrimeReact.zIndex['overlay']);
|
|
@@ -22505,6 +22753,9 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
22505
22753
|
var getOptionRenderKey = function getOptionRenderKey(option) {
|
|
22506
22754
|
return props.dataKey ? ObjectUtils.resolveFieldData(option, props.dataKey) : getOptionLabel(option);
|
|
22507
22755
|
};
|
|
22756
|
+
var isOptionGroup = function isOptionGroup(option) {
|
|
22757
|
+
return props.optionGroupLabel && option.optionGroup && option.group;
|
|
22758
|
+
};
|
|
22508
22759
|
var isOptionDisabled = function isOptionDisabled(option) {
|
|
22509
22760
|
if (props.optionDisabled) {
|
|
22510
22761
|
return ObjectUtils.isFunction(props.optionDisabled) ? props.optionDisabled(option) : ObjectUtils.resolveFieldData(option, props.optionDisabled);
|
|
@@ -22653,8 +22904,9 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
22653
22904
|
maxLength: props.maxLength,
|
|
22654
22905
|
onInput: onEditableInputChange,
|
|
22655
22906
|
onFocus: onEditableInputFocus,
|
|
22907
|
+
onKeyDown: onInputKeyDown,
|
|
22656
22908
|
onBlur: onInputBlur,
|
|
22657
|
-
tabIndex: props.tabIndex
|
|
22909
|
+
tabIndex: !props.disabled ? props.tabIndex : -1,
|
|
22658
22910
|
'aria-haspopup': 'listbox'
|
|
22659
22911
|
}, ariaProps), ptm('input'));
|
|
22660
22912
|
return /*#__PURE__*/React__namespace.createElement("input", inputProps);
|
|
@@ -22746,10 +22998,31 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
22746
22998
|
},
|
|
22747
22999
|
onMouseDown: props.onMouseDown,
|
|
22748
23000
|
onContextMenu: props.onContextMenu,
|
|
23001
|
+
onFocus: onFocus,
|
|
22749
23002
|
'data-p-disabled': props.disabled,
|
|
22750
23003
|
'data-p-focus': focusedState
|
|
22751
23004
|
}, otherProps, ptm('root'));
|
|
22752
|
-
|
|
23005
|
+
var firstHiddenFocusableElementProps = mergeProps({
|
|
23006
|
+
ref: firstHiddenFocusableElementOnOverlay,
|
|
23007
|
+
role: 'presentation',
|
|
23008
|
+
'aria-hidden': 'true',
|
|
23009
|
+
className: 'p-hidden-accessible p-hidden-focusable',
|
|
23010
|
+
tabIndex: '0',
|
|
23011
|
+
onFocus: onFirstHiddenFocus,
|
|
23012
|
+
'data-p-hidden-accessible': true,
|
|
23013
|
+
'data-p-hidden-focusable': true
|
|
23014
|
+
}, ptm('hiddenFirstFocusableEl'));
|
|
23015
|
+
var lastHiddenFocusableElementProps = mergeProps({
|
|
23016
|
+
ref: lastHiddenFocusableElementOnOverlay,
|
|
23017
|
+
role: 'presentation',
|
|
23018
|
+
'aria-hidden': 'true',
|
|
23019
|
+
className: 'p-hidden-accessible p-hidden-focusable',
|
|
23020
|
+
tabIndex: '0',
|
|
23021
|
+
onFocus: onLastHiddenFocus,
|
|
23022
|
+
'data-p-hidden-accessible': true,
|
|
23023
|
+
'data-p-hidden-focusable': true
|
|
23024
|
+
}, ptm('hiddenLastFocusableEl'));
|
|
23025
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", rootProps, keyboardHelper, hiddenSelect, labelElement, clearIcon, dropdownIcon, /*#__PURE__*/React__namespace.createElement("span", firstHiddenFocusableElementProps), /*#__PURE__*/React__namespace.createElement(DropdownPanel, _extends({
|
|
22753
23026
|
hostName: "Dropdown",
|
|
22754
23027
|
ref: overlayRef,
|
|
22755
23028
|
visibleOptions: visibleOptions,
|
|
@@ -22758,6 +23031,8 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
22758
23031
|
appendTo: appendTo,
|
|
22759
23032
|
onClick: onPanelClick,
|
|
22760
23033
|
onOptionClick: onOptionClick,
|
|
23034
|
+
focusedOptionIndex: focusedOptionIndex,
|
|
23035
|
+
setFocusedOptionIndex: setFocusedOptionIndex,
|
|
22761
23036
|
filterValue: filterState,
|
|
22762
23037
|
hasFilter: hasFilter,
|
|
22763
23038
|
onFilterClearIconClick: onFilterClearIconClick,
|
|
@@ -22780,7 +23055,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
22780
23055
|
ptm: ptm,
|
|
22781
23056
|
cx: cx,
|
|
22782
23057
|
sx: sx
|
|
22783
|
-
}))), hasTooltip && /*#__PURE__*/React__namespace.createElement(Tooltip, _extends({
|
|
23058
|
+
})), /*#__PURE__*/React__namespace.createElement("span", lastHiddenFocusableElementProps)), hasTooltip && /*#__PURE__*/React__namespace.createElement(Tooltip, _extends({
|
|
22784
23059
|
target: elementRef,
|
|
22785
23060
|
content: props.tooltip
|
|
22786
23061
|
}, props.tooltipOptions, {
|
|
@@ -22801,7 +23076,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
22801
23076
|
};
|
|
22802
23077
|
}) : [];
|
|
22803
23078
|
var placeholderValue = localeOption('choose');
|
|
22804
|
-
var ariaLabelValue = ariaLabel
|
|
23079
|
+
var ariaLabelValue = ariaLabel('jumpToPageDropdownLabel');
|
|
22805
23080
|
var element = hasOptions ? /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Dropdown, {
|
|
22806
23081
|
value: props.value,
|
|
22807
23082
|
options: options,
|
|
@@ -24236,7 +24511,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
24236
24511
|
if (showSelection) {
|
|
24237
24512
|
var ariaLabelField = props.selectionAriaLabel || props.tableProps.dataKey;
|
|
24238
24513
|
var ariaLabelText = ObjectUtils.resolveFieldData(props.rowData, ariaLabelField);
|
|
24239
|
-
label = "".concat(props.selected ? ariaLabel
|
|
24514
|
+
label = "".concat(props.selected ? ariaLabel('unselectLabel') : ariaLabel('selectLabel'), " ").concat(ariaLabelText);
|
|
24240
24515
|
}
|
|
24241
24516
|
content = showSelection && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, selectionMode === 'single' && /*#__PURE__*/React__namespace.createElement(RowRadioButton, {
|
|
24242
24517
|
hostName: props.hostName,
|
|
@@ -24291,7 +24566,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
24291
24566
|
var ariaControls = "".concat(props.tableSelector, "_content_").concat(props.rowIndex, "_expanded");
|
|
24292
24567
|
var _ariaLabelField = props.selectionAriaLabel || props.tableProps.dataKey;
|
|
24293
24568
|
var _ariaLabelText = ObjectUtils.resolveFieldData(props.rowData, _ariaLabelField);
|
|
24294
|
-
var _label = "".concat(props.expanded ? ariaLabel
|
|
24569
|
+
var _label = "".concat(props.expanded ? ariaLabel('collapseLabel') : ariaLabel('expandLabel'), " ").concat(_ariaLabelText);
|
|
24295
24570
|
var expanderProps = {
|
|
24296
24571
|
onClick: onRowToggle,
|
|
24297
24572
|
className: cx('rowToggler')
|
|
@@ -24346,19 +24621,19 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
24346
24621
|
var rowEditorSaveButtonProps = mergeProps(_defineProperty(_defineProperty({
|
|
24347
24622
|
type: 'button',
|
|
24348
24623
|
name: 'row-save',
|
|
24349
|
-
'aria-label': ariaLabel
|
|
24624
|
+
'aria-label': ariaLabel('saveEdit'),
|
|
24350
24625
|
onClick: rowEditorProps.onSaveClick,
|
|
24351
24626
|
className: rowEditorProps.saveClassName,
|
|
24352
24627
|
tabIndex: props.tabIndex
|
|
24353
|
-
}, "aria-label", ariaLabel
|
|
24628
|
+
}, "aria-label", ariaLabel('saveEdit')), 'data-p-row-editor-save', true), getColumnPTOptions('rowEditorSaveButton'));
|
|
24354
24629
|
var rowEditorCancelButtonProps = mergeProps(_defineProperty({
|
|
24355
24630
|
type: 'button',
|
|
24356
24631
|
name: 'row-cancel',
|
|
24357
|
-
'aria-label': ariaLabel
|
|
24632
|
+
'aria-label': ariaLabel('cancelEdit'),
|
|
24358
24633
|
onClick: rowEditorProps.onCancelClick,
|
|
24359
24634
|
className: rowEditorProps.cancelClassName,
|
|
24360
24635
|
tabIndex: props.tabIndex
|
|
24361
|
-
}, "aria-label", ariaLabel
|
|
24636
|
+
}, "aria-label", ariaLabel('cancelEdit')), getColumnPTOptions('rowEditorCancelButton'));
|
|
24362
24637
|
content = /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("button", rowEditorSaveButtonProps, rowEditorSaveIcon, /*#__PURE__*/React__namespace.createElement(Ripple, null)), /*#__PURE__*/React__namespace.createElement("button", rowEditorCancelButtonProps, rowEditorCancelIcon, /*#__PURE__*/React__namespace.createElement(Ripple, null)));
|
|
24363
24638
|
} else {
|
|
24364
24639
|
rowEditorProps = {
|
|
@@ -24369,11 +24644,11 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
24369
24644
|
var rowEditorInitButtonProps = mergeProps(_defineProperty(_defineProperty({
|
|
24370
24645
|
type: 'button',
|
|
24371
24646
|
name: 'row-edit',
|
|
24372
|
-
'aria-label': ariaLabel
|
|
24647
|
+
'aria-label': ariaLabel('editRow'),
|
|
24373
24648
|
onClick: rowEditorProps.onInitClick,
|
|
24374
24649
|
className: rowEditorProps.initClassName,
|
|
24375
24650
|
tabIndex: props.tabIndex
|
|
24376
|
-
}, "aria-label", ariaLabel
|
|
24651
|
+
}, "aria-label", ariaLabel('editRow')), 'data-p-row-editor-init', true), getColumnPTOptions('rowEditorInitButton'));
|
|
24377
24652
|
content = /*#__PURE__*/React__namespace.createElement("button", rowEditorInitButtonProps, rowEditorInitIcon, /*#__PURE__*/React__namespace.createElement(Ripple, null));
|
|
24378
24653
|
}
|
|
24379
24654
|
if (body) {
|
|
@@ -25020,7 +25295,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
25020
25295
|
var togglerIcon = IconUtils.getJSXIcon(icon, _objectSpread$19({}, rowGroupTogglerIconProps), {
|
|
25021
25296
|
props: props
|
|
25022
25297
|
});
|
|
25023
|
-
var label = props.expanded ? ariaLabel
|
|
25298
|
+
var label = props.expanded ? ariaLabel('collapseLabel') : ariaLabel('expandLabel');
|
|
25024
25299
|
var rowGroupTogglerProps = mergeProps({
|
|
25025
25300
|
type: 'button',
|
|
25026
25301
|
onClick: function onClick(e) {
|
|
@@ -26866,7 +27141,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
26866
27141
|
var columnFilterIcon = IconUtils.getJSXIcon(icon, _objectSpread$15({}, filterIconProps), {
|
|
26867
27142
|
props: props
|
|
26868
27143
|
});
|
|
26869
|
-
var label = overlayVisibleState ? ariaLabel
|
|
27144
|
+
var label = overlayVisibleState ? ariaLabel('hideFilterMenu') : ariaLabel('showFilterMenu');
|
|
26870
27145
|
var filterMenuButtonProps = mergeProps({
|
|
26871
27146
|
type: 'button',
|
|
26872
27147
|
className: cx('filterMenuButton', {
|
|
@@ -26989,7 +27264,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
26989
27264
|
__parentMetadata: {
|
|
26990
27265
|
parent: props.metaData
|
|
26991
27266
|
},
|
|
26992
|
-
"aria-label": ariaLabel
|
|
27267
|
+
"aria-label": ariaLabel('filterOperator')
|
|
26993
27268
|
}));
|
|
26994
27269
|
}
|
|
26995
27270
|
return null;
|
|
@@ -27009,7 +27284,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
27009
27284
|
__parentMetadata: {
|
|
27010
27285
|
parent: props.metaData
|
|
27011
27286
|
},
|
|
27012
|
-
"aria-label": ariaLabel
|
|
27287
|
+
"aria-label": ariaLabel('filterConstraint')
|
|
27013
27288
|
});
|
|
27014
27289
|
}
|
|
27015
27290
|
return null;
|
|
@@ -27280,7 +27555,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
27280
27555
|
}),
|
|
27281
27556
|
role: 'checkbox',
|
|
27282
27557
|
'aria-checked': props.checked,
|
|
27283
|
-
'aria-label': props.checked ? ariaLabel
|
|
27558
|
+
'aria-label': props.checked ? ariaLabel('selectAll') : ariaLabel('unselectAll'),
|
|
27284
27559
|
tabIndex: tabIndex,
|
|
27285
27560
|
onFocus: function onFocus(e) {
|
|
27286
27561
|
return _onFocus();
|
|
@@ -34759,7 +35034,9 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
34759
35034
|
style: props.style,
|
|
34760
35035
|
onClick: onClick,
|
|
34761
35036
|
role: 'checkbox',
|
|
34762
|
-
'aria-checked': checked
|
|
35037
|
+
'aria-checked': checked,
|
|
35038
|
+
'data-p-highlight': checked,
|
|
35039
|
+
'data-p-disabled': props.disabled
|
|
34763
35040
|
}, otherProps, ptm('root'));
|
|
34764
35041
|
var hiddenInputWrapperProps = mergeProps({
|
|
34765
35042
|
className: 'p-hidden-accessible'
|
|
@@ -34960,6 +35237,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
34960
35237
|
disabled: false,
|
|
34961
35238
|
readOnly: false,
|
|
34962
35239
|
showValue: true,
|
|
35240
|
+
tabIndex: 0,
|
|
34963
35241
|
step: 1,
|
|
34964
35242
|
min: 0,
|
|
34965
35243
|
max: 100,
|
|
@@ -35123,6 +35401,15 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35123
35401
|
});
|
|
35124
35402
|
}
|
|
35125
35403
|
};
|
|
35404
|
+
var updateModelValue = function updateModelValue(newValue) {
|
|
35405
|
+
var currentValue;
|
|
35406
|
+
if (newValue > props.max) currentValue = props.max;else if (newValue < props.min) currentValue = props.min;else currentValue = newValue;
|
|
35407
|
+
if (props.onChange) {
|
|
35408
|
+
props.onChange({
|
|
35409
|
+
value: currentValue
|
|
35410
|
+
});
|
|
35411
|
+
}
|
|
35412
|
+
};
|
|
35126
35413
|
var _onClick = function onClick(event) {
|
|
35127
35414
|
if (!props.disabled && !props.readOnly) {
|
|
35128
35415
|
updateValue(event.nativeEvent.offsetX, event.nativeEvent.offsetY);
|
|
@@ -35145,6 +35432,48 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35145
35432
|
unbindWindowTouchMoveListener();
|
|
35146
35433
|
unbindWindowTouchEndListener();
|
|
35147
35434
|
};
|
|
35435
|
+
var _onKeyDown = function onKeyDown(event) {
|
|
35436
|
+
if (!props.disabled && !props.readonly) {
|
|
35437
|
+
switch (event.code) {
|
|
35438
|
+
case 'ArrowRight':
|
|
35439
|
+
case 'ArrowUp':
|
|
35440
|
+
event.preventDefault();
|
|
35441
|
+
updateModelValue(props.value + 1);
|
|
35442
|
+
break;
|
|
35443
|
+
case 'ArrowLeft':
|
|
35444
|
+
case 'ArrowDown':
|
|
35445
|
+
{
|
|
35446
|
+
event.preventDefault();
|
|
35447
|
+
updateModelValue(props.value - 1);
|
|
35448
|
+
break;
|
|
35449
|
+
}
|
|
35450
|
+
case 'Home':
|
|
35451
|
+
{
|
|
35452
|
+
event.preventDefault();
|
|
35453
|
+
updateModelValue(props.min);
|
|
35454
|
+
break;
|
|
35455
|
+
}
|
|
35456
|
+
case 'End':
|
|
35457
|
+
{
|
|
35458
|
+
event.preventDefault();
|
|
35459
|
+
updateModelValue(props.max);
|
|
35460
|
+
break;
|
|
35461
|
+
}
|
|
35462
|
+
case 'PageUp':
|
|
35463
|
+
{
|
|
35464
|
+
event.preventDefault();
|
|
35465
|
+
updateModelValue(props.value + 10);
|
|
35466
|
+
break;
|
|
35467
|
+
}
|
|
35468
|
+
case 'PageDown':
|
|
35469
|
+
{
|
|
35470
|
+
event.preventDefault();
|
|
35471
|
+
updateModelValue(props.value - 10);
|
|
35472
|
+
break;
|
|
35473
|
+
}
|
|
35474
|
+
}
|
|
35475
|
+
}
|
|
35476
|
+
};
|
|
35148
35477
|
React__namespace.useImperativeHandle(ref, function () {
|
|
35149
35478
|
return {
|
|
35150
35479
|
props: props,
|
|
@@ -35172,6 +35501,13 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35172
35501
|
viewBox: '0 0 100 100',
|
|
35173
35502
|
width: props.size,
|
|
35174
35503
|
height: props.size,
|
|
35504
|
+
'aria-valuemin': props.min,
|
|
35505
|
+
'aria-valuemax': props.max,
|
|
35506
|
+
'aria-valuenow': props.value,
|
|
35507
|
+
'aria-labelledby': props.ariaLabelledby,
|
|
35508
|
+
'aria-label': props.ariaLabel,
|
|
35509
|
+
role: 'slider',
|
|
35510
|
+
tabIndex: props.readonly || props.disabled ? -1 : props.tabIndex,
|
|
35175
35511
|
onClick: function onClick(e) {
|
|
35176
35512
|
return _onClick(e);
|
|
35177
35513
|
},
|
|
@@ -35186,6 +35522,9 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35186
35522
|
},
|
|
35187
35523
|
onTouchEnd: function onTouchEnd(e) {
|
|
35188
35524
|
return _onTouchEnd();
|
|
35525
|
+
},
|
|
35526
|
+
onKeyDown: function onKeyDown(e) {
|
|
35527
|
+
return _onKeyDown(e);
|
|
35189
35528
|
}
|
|
35190
35529
|
}, ptm('svg'));
|
|
35191
35530
|
var rangeProps = mergeProps({
|
|
@@ -35204,28 +35543,26 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35204
35543
|
}));
|
|
35205
35544
|
Knob.displayName = 'Knob';
|
|
35206
35545
|
|
|
35546
|
+
var _defaultProps;
|
|
35207
35547
|
var classes$A = {
|
|
35208
35548
|
itemGroup: 'p-listbox-item-group',
|
|
35209
35549
|
emptyMessage: 'p-listbox-empty-message',
|
|
35210
|
-
list:
|
|
35211
|
-
|
|
35212
|
-
|
|
35213
|
-
return props.virtualScrollerOptions ? classNames('p-listbox-list', options.className) : 'p-listbox-list';
|
|
35214
|
-
},
|
|
35215
|
-
wrapper: function wrapper(_ref2) {
|
|
35216
|
-
var props = _ref2.props;
|
|
35550
|
+
list: 'p-listbox-list',
|
|
35551
|
+
wrapper: function wrapper(_ref) {
|
|
35552
|
+
var props = _ref.props;
|
|
35217
35553
|
return classNames('p-listbox-list-wrapper', props.listClassName);
|
|
35218
35554
|
},
|
|
35219
|
-
root: function root(
|
|
35220
|
-
var props =
|
|
35555
|
+
root: function root(_ref2) {
|
|
35556
|
+
var props = _ref2.props;
|
|
35221
35557
|
return classNames('p-listbox p-component', {
|
|
35222
35558
|
'p-disabled': props.disabled
|
|
35223
35559
|
}, props.className);
|
|
35224
35560
|
},
|
|
35225
|
-
item: function item(
|
|
35226
|
-
var props =
|
|
35561
|
+
item: function item(_ref3) {
|
|
35562
|
+
var props = _ref3.props;
|
|
35227
35563
|
return classNames('p-listbox-item', {
|
|
35228
35564
|
'p-highlight': props.selected,
|
|
35565
|
+
'p-focus': props.focusedOptionIndex === props.index,
|
|
35229
35566
|
'p-disabled': props.disabled
|
|
35230
35567
|
}, props.option.className);
|
|
35231
35568
|
},
|
|
@@ -35234,22 +35571,22 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35234
35571
|
filterInput: 'p-listbox-filter',
|
|
35235
35572
|
header: 'p-listbox-header'
|
|
35236
35573
|
};
|
|
35237
|
-
var styles$w = "\n@layer primereact {\n .p-listbox-list-wrapper {\n overflow: auto;\n }\n \n .p-listbox-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n }\n \n .p-listbox-item {\n cursor: pointer;\n position: relative;\n overflow: hidden;\n }\n \n .p-listbox-filter-container {\n position: relative;\n }\n \n .p-listbox-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n \n .p-listbox-filter {\n width: 100%;\n }\n}\n";
|
|
35574
|
+
var styles$w = "\n@layer primereact {\n .p-listbox-list-wrapper {\n overflow: auto;\n }\n \n .p-listbox-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n }\n \n .p-listbox-item {\n cursor: pointer;\n position: relative;\n overflow: hidden;\n outline: none;\n }\n \n .p-listbox-filter-container {\n position: relative;\n }\n \n .p-listbox-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n \n .p-listbox-filter {\n width: 100%;\n }\n}\n";
|
|
35238
35575
|
var inlineStyles$c = {
|
|
35239
|
-
itemGroup: function itemGroup(
|
|
35240
|
-
var scrollerOptions =
|
|
35576
|
+
itemGroup: function itemGroup(_ref4) {
|
|
35577
|
+
var scrollerOptions = _ref4.scrollerOptions;
|
|
35241
35578
|
return {
|
|
35242
35579
|
height: scrollerOptions.props ? scrollerOptions.props.itemSize : undefined
|
|
35243
35580
|
};
|
|
35244
35581
|
},
|
|
35245
|
-
list: function list(
|
|
35246
|
-
var options =
|
|
35247
|
-
props =
|
|
35582
|
+
list: function list(_ref5) {
|
|
35583
|
+
var options = _ref5.options,
|
|
35584
|
+
props = _ref5.props;
|
|
35248
35585
|
return props.virtualScrollerOptions ? options.style : undefined;
|
|
35249
35586
|
}
|
|
35250
35587
|
};
|
|
35251
35588
|
var ListBoxBase = ComponentBase.extend({
|
|
35252
|
-
defaultProps: {
|
|
35589
|
+
defaultProps: (_defaultProps = {
|
|
35253
35590
|
__TYPE: 'ListBox',
|
|
35254
35591
|
className: null,
|
|
35255
35592
|
dataKey: null,
|
|
@@ -35265,29 +35602,13 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35265
35602
|
filterPlaceholder: null,
|
|
35266
35603
|
filterTemplate: null,
|
|
35267
35604
|
filterValue: null,
|
|
35605
|
+
selectOnFocus: false,
|
|
35268
35606
|
id: null,
|
|
35269
35607
|
itemTemplate: null,
|
|
35270
35608
|
listClassName: null,
|
|
35271
35609
|
listStyle: null,
|
|
35272
|
-
metaKeySelection: false
|
|
35273
|
-
|
|
35274
|
-
onChange: null,
|
|
35275
|
-
onFilterValueChange: null,
|
|
35276
|
-
optionDisabled: null,
|
|
35277
|
-
optionGroupChildren: null,
|
|
35278
|
-
optionGroupLabel: null,
|
|
35279
|
-
optionGroupTemplate: null,
|
|
35280
|
-
optionLabel: null,
|
|
35281
|
-
optionValue: null,
|
|
35282
|
-
options: null,
|
|
35283
|
-
style: null,
|
|
35284
|
-
tabIndex: 0,
|
|
35285
|
-
tooltip: null,
|
|
35286
|
-
tooltipOptions: null,
|
|
35287
|
-
value: null,
|
|
35288
|
-
virtualScrollerOptions: null,
|
|
35289
|
-
children: undefined
|
|
35290
|
-
},
|
|
35610
|
+
metaKeySelection: false
|
|
35611
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defaultProps, "selectOnFocus", false), "autoOptionFocus", true), "multiple", false), "onChange", null), "onFilterValueChange", null), "optionDisabled", null), "optionGroupChildren", null), "optionGroupLabel", null), "optionGroupTemplate", null), "optionLabel", null), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defaultProps, "optionValue", null), "options", null), "style", null), "tabIndex", 0), "tooltip", null), "tooltipOptions", null), "value", null), "virtualScrollerOptions", null), "children", undefined)),
|
|
35291
35612
|
css: {
|
|
35292
35613
|
classes: classes$A,
|
|
35293
35614
|
styles: styles$w,
|
|
@@ -35384,7 +35705,8 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35384
35705
|
context: {
|
|
35385
35706
|
selected: props.selected,
|
|
35386
35707
|
disabled: props.disabled,
|
|
35387
|
-
focused: focusedState
|
|
35708
|
+
focused: focusedState,
|
|
35709
|
+
focusedOptionIndex: props.focusedOptionIndex
|
|
35388
35710
|
}
|
|
35389
35711
|
});
|
|
35390
35712
|
};
|
|
@@ -35394,15 +35716,6 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35394
35716
|
var onBlur = function onBlur(event) {
|
|
35395
35717
|
setFocusedState(false);
|
|
35396
35718
|
};
|
|
35397
|
-
var onClick = function onClick(event) {
|
|
35398
|
-
if (props.onClick) {
|
|
35399
|
-
props.onClick({
|
|
35400
|
-
originalEvent: event,
|
|
35401
|
-
option: props.option
|
|
35402
|
-
});
|
|
35403
|
-
}
|
|
35404
|
-
event.preventDefault();
|
|
35405
|
-
};
|
|
35406
35719
|
var onTouchEnd = function onTouchEnd(event) {
|
|
35407
35720
|
if (props.onTouchEnd) {
|
|
35408
35721
|
props.onTouchEnd({
|
|
@@ -35411,47 +35724,17 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35411
35724
|
});
|
|
35412
35725
|
}
|
|
35413
35726
|
};
|
|
35414
|
-
var onKeyDown = function onKeyDown(event) {
|
|
35415
|
-
var item = event.currentTarget;
|
|
35416
|
-
switch (event.which) {
|
|
35417
|
-
//down
|
|
35418
|
-
case 40:
|
|
35419
|
-
var nextItem = findNextItem(item);
|
|
35420
|
-
nextItem && nextItem.focus();
|
|
35421
|
-
event.preventDefault();
|
|
35422
|
-
break;
|
|
35423
|
-
|
|
35424
|
-
//up
|
|
35425
|
-
case 38:
|
|
35426
|
-
var prevItem = findPrevItem(item);
|
|
35427
|
-
prevItem && prevItem.focus();
|
|
35428
|
-
event.preventDefault();
|
|
35429
|
-
break;
|
|
35430
|
-
|
|
35431
|
-
//enter
|
|
35432
|
-
case 13:
|
|
35433
|
-
onClick(event);
|
|
35434
|
-
event.preventDefault();
|
|
35435
|
-
break;
|
|
35436
|
-
}
|
|
35437
|
-
};
|
|
35438
|
-
var findNextItem = function findNextItem(item) {
|
|
35439
|
-
var nextItem = item.nextElementSibling;
|
|
35440
|
-
return nextItem ? DomHandler.isAttributeEquals(nextItem, 'data-p-disabled', true) || DomHandler.isAttributeEquals(nextItem, 'data-pc-section', 'itemgroup') ? findNextItem(nextItem) : nextItem : null;
|
|
35441
|
-
};
|
|
35442
|
-
var findPrevItem = function findPrevItem(item) {
|
|
35443
|
-
var prevItem = item.previousElementSibling;
|
|
35444
|
-
return prevItem ? DomHandler.isAttributeEquals(prevItem, 'data-p-disabled', true) || DomHandler.isAttributeEquals(prevItem, 'data-pc-section', 'itemgroup') ? findPrevItem(prevItem) : prevItem : null;
|
|
35445
|
-
};
|
|
35446
35727
|
var content = props.template ? ObjectUtils.getJSXElement(props.template, props.option) : props.label;
|
|
35447
35728
|
var itemProps = mergeProps({
|
|
35729
|
+
id: props.id,
|
|
35448
35730
|
className: cx('item', {
|
|
35449
35731
|
props: props
|
|
35450
35732
|
}),
|
|
35451
35733
|
style: props.style,
|
|
35452
|
-
onClick: onClick
|
|
35734
|
+
onClick: function onClick(event) {
|
|
35735
|
+
return props.onClick(event, props.option, props.index);
|
|
35736
|
+
},
|
|
35453
35737
|
onTouchEnd: onTouchEnd,
|
|
35454
|
-
onKeyDown: onKeyDown,
|
|
35455
35738
|
onFocus: onFocus,
|
|
35456
35739
|
onBlur: onBlur,
|
|
35457
35740
|
tabIndex: '-1',
|
|
@@ -35475,12 +35758,25 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35475
35758
|
var mergeProps = useMergeProps();
|
|
35476
35759
|
var context = React__namespace.useContext(PrimeReactContext);
|
|
35477
35760
|
var props = ListBoxBase.getProps(inProps, context);
|
|
35478
|
-
var _React$useState = React__namespace.useState(
|
|
35761
|
+
var _React$useState = React__namespace.useState(null),
|
|
35479
35762
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
35480
|
-
|
|
35481
|
-
|
|
35763
|
+
focusedOptionIndex = _React$useState2[0],
|
|
35764
|
+
setFocusedOptionIndex = _React$useState2[1];
|
|
35765
|
+
var searchTimeout = React__namespace.useRef(null);
|
|
35766
|
+
var firstHiddenFocusableElement = React__namespace.useRef(null);
|
|
35767
|
+
var lastHiddenFocusableElement = React__namespace.useRef(null);
|
|
35768
|
+
var _React$useState3 = React__namespace.useState(-1),
|
|
35769
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
35770
|
+
startRangeIndex = _React$useState4[0],
|
|
35771
|
+
setStartRangeIndex = _React$useState4[1];
|
|
35772
|
+
var _React$useState5 = React__namespace.useState(''),
|
|
35773
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
35774
|
+
filterValueState = _React$useState6[0],
|
|
35775
|
+
setFilterValueState = _React$useState6[1];
|
|
35482
35776
|
var elementRef = React__namespace.useRef(null);
|
|
35483
35777
|
var virtualScrollerRef = React__namespace.useRef(null);
|
|
35778
|
+
var id = React__namespace.useRef(UniqueComponentId());
|
|
35779
|
+
var listRef = React__namespace.useRef(null);
|
|
35484
35780
|
var optionTouched = React__namespace.useRef(false);
|
|
35485
35781
|
var filteredValue = (props.onFilterValueChange ? props.filterValue : filterValueState) || '';
|
|
35486
35782
|
var hasFilter = filteredValue && filteredValue.trim().length > 0;
|
|
@@ -35494,13 +35790,14 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35494
35790
|
useHandleStyle(ListBoxBase.css.styles, ptCallbacks.isUnstyled, {
|
|
35495
35791
|
name: 'listbox'
|
|
35496
35792
|
});
|
|
35497
|
-
var onOptionSelect = function onOptionSelect(event) {
|
|
35498
|
-
var
|
|
35793
|
+
var onOptionSelect = function onOptionSelect(event, option) {
|
|
35794
|
+
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
|
35499
35795
|
if (props.disabled || isOptionDisabled(option)) {
|
|
35500
35796
|
return;
|
|
35501
35797
|
}
|
|
35502
35798
|
props.multiple ? onOptionSelectMultiple(event.originalEvent, option) : onOptionSelectSingle(event.originalEvent, option);
|
|
35503
35799
|
optionTouched.current = false;
|
|
35800
|
+
index !== -1 && setFocusedOptionIndex(index);
|
|
35504
35801
|
};
|
|
35505
35802
|
var onOptionTouchEnd = function onOptionTouchEnd() {
|
|
35506
35803
|
if (props.disabled) {
|
|
@@ -35569,6 +35866,269 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35569
35866
|
});
|
|
35570
35867
|
}
|
|
35571
35868
|
};
|
|
35869
|
+
var hasSelectedOption = function hasSelectedOption() {
|
|
35870
|
+
return ObjectUtils.isNotEmpty(props.value);
|
|
35871
|
+
};
|
|
35872
|
+
var isOptionGroup = function isOptionGroup(option) {
|
|
35873
|
+
return props.optionGroupLabel && option.optionGroup && option.group;
|
|
35874
|
+
};
|
|
35875
|
+
var isValidOption = function isValidOption(option) {
|
|
35876
|
+
return ObjectUtils.isNotEmpty(option) && !(isOptionDisabled(option) || isOptionGroup(option));
|
|
35877
|
+
};
|
|
35878
|
+
var isValidSelectedOption = function isValidSelectedOption(option) {
|
|
35879
|
+
return isValidOption(option) && isSelected(option);
|
|
35880
|
+
};
|
|
35881
|
+
var findFirstOptionIndex = function findFirstOptionIndex() {
|
|
35882
|
+
return visibleOptions.findIndex(function (option) {
|
|
35883
|
+
return isValidOption(option);
|
|
35884
|
+
});
|
|
35885
|
+
};
|
|
35886
|
+
var findLastOptionIndex = function findLastOptionIndex() {
|
|
35887
|
+
return ObjectUtils.findLastIndex(visibleOptions, function (option) {
|
|
35888
|
+
return isValidOption(option);
|
|
35889
|
+
});
|
|
35890
|
+
};
|
|
35891
|
+
var findNextOptionIndex = function findNextOptionIndex(index) {
|
|
35892
|
+
var matchedOptionIndex = index < visibleOptions.length - 1 ? visibleOptions.slice(index + 1).findIndex(function (option) {
|
|
35893
|
+
return isValidOption(option);
|
|
35894
|
+
}) : -1;
|
|
35895
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
|
|
35896
|
+
};
|
|
35897
|
+
var findPrevOptionIndex = function findPrevOptionIndex(index) {
|
|
35898
|
+
var matchedOptionIndex = index > 0 ? ObjectUtils.findLastIndex(visibleOptions.slice(0, index), function (option) {
|
|
35899
|
+
return isValidOption(option);
|
|
35900
|
+
}) : -1;
|
|
35901
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
35902
|
+
};
|
|
35903
|
+
var focusedOptionId = function focusedOptionId() {
|
|
35904
|
+
return focusedOptionIndex !== -1 ? "".concat(id.current, "_").concat(focusedOptionIndex) : null;
|
|
35905
|
+
};
|
|
35906
|
+
var findNearestSelectedOptionIndex = function findNearestSelectedOptionIndex(index) {
|
|
35907
|
+
var firstCheckUp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
35908
|
+
var matchedOptionIndex = -1;
|
|
35909
|
+
if (hasSelectedOption) {
|
|
35910
|
+
if (firstCheckUp) {
|
|
35911
|
+
matchedOptionIndex = findPrevSelectedOptionIndex(index);
|
|
35912
|
+
matchedOptionIndex = matchedOptionIndex === -1 ? findNextSelectedOptionIndex(index) : matchedOptionIndex;
|
|
35913
|
+
} else {
|
|
35914
|
+
matchedOptionIndex = findNextSelectedOptionIndex(index);
|
|
35915
|
+
matchedOptionIndex = matchedOptionIndex === -1 ? findPrevSelectedOptionIndex(index) : matchedOptionIndex;
|
|
35916
|
+
}
|
|
35917
|
+
}
|
|
35918
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
35919
|
+
};
|
|
35920
|
+
var isOptionMatched = function isOptionMatched(option) {
|
|
35921
|
+
var _getOptionLabel;
|
|
35922
|
+
return isValidOption(option) && ((_getOptionLabel = getOptionLabel(option)) === null || _getOptionLabel === void 0 ? void 0 : _getOptionLabel.toLocaleLowerCase(props.filterLocale).startsWith(searchValue.toLocaleLowerCase(props.filterLocale)));
|
|
35923
|
+
};
|
|
35924
|
+
var searchOptions = function searchOptions(event, _char) {
|
|
35925
|
+
searchValue = (searchValue || '') + _char;
|
|
35926
|
+
var optionIndex = -1;
|
|
35927
|
+
if (ObjectUtils.isNotEmpty(searchValue)) {
|
|
35928
|
+
if (focusedOptionIndex !== -1) {
|
|
35929
|
+
optionIndex = visibleOptions.slice(focusedOptionIndex).findIndex(function (option) {
|
|
35930
|
+
return isOptionMatched(option);
|
|
35931
|
+
});
|
|
35932
|
+
optionIndex = optionIndex === -1 ? visibleOptions.slice(0, focusedOptionIndex).findIndex(function (option) {
|
|
35933
|
+
return isOptionMatched(option);
|
|
35934
|
+
}) : optionIndex + focusedOptionIndex;
|
|
35935
|
+
} else {
|
|
35936
|
+
optionIndex = visibleOptions.findIndex(function (option) {
|
|
35937
|
+
return isOptionMatched(option);
|
|
35938
|
+
});
|
|
35939
|
+
}
|
|
35940
|
+
if (optionIndex === -1 && focusedOptionIndex === -1) {
|
|
35941
|
+
optionIndex = findFirstFocusedOptionIndex();
|
|
35942
|
+
}
|
|
35943
|
+
if (optionIndex !== -1) {
|
|
35944
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
35945
|
+
}
|
|
35946
|
+
}
|
|
35947
|
+
if (searchTimeout.current) {
|
|
35948
|
+
clearTimeout(searchTimeout.current);
|
|
35949
|
+
}
|
|
35950
|
+
searchTimeout.current = setTimeout(function () {
|
|
35951
|
+
searchValue = '';
|
|
35952
|
+
searchTimeout.current = null;
|
|
35953
|
+
}, 500);
|
|
35954
|
+
};
|
|
35955
|
+
var findNextSelectedOptionIndex = function findNextSelectedOptionIndex(index) {
|
|
35956
|
+
var matchedOptionIndex = hasSelectedOption && index < visibleOptions.length - 1 ? visibleOptions.slice(index + 1).findIndex(function (option) {
|
|
35957
|
+
return isValidSelectedOption(option);
|
|
35958
|
+
}) : -1;
|
|
35959
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : -1;
|
|
35960
|
+
};
|
|
35961
|
+
var findPrevSelectedOptionIndex = function findPrevSelectedOptionIndex(index) {
|
|
35962
|
+
var matchedOptionIndex = hasSelectedOption && index > 0 ? ObjectUtils.findLastIndex(visibleOptions.slice(0, index), function (option) {
|
|
35963
|
+
return isValidSelectedOption(option);
|
|
35964
|
+
}) : -1;
|
|
35965
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex : -1;
|
|
35966
|
+
};
|
|
35967
|
+
var onOptionSelectRange = function onOptionSelectRange(event) {
|
|
35968
|
+
var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;
|
|
35969
|
+
var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
|
35970
|
+
start === -1 && (start = findNearestSelectedOptionIndex(end, true));
|
|
35971
|
+
end === -1 && (end = findNearestSelectedOptionIndex(start));
|
|
35972
|
+
if (start !== -1 && end !== -1) {
|
|
35973
|
+
var rangeStart = Math.min(start, end);
|
|
35974
|
+
var rangeEnd = Math.max(start, end);
|
|
35975
|
+
var value = visibleOptions.slice(rangeStart, rangeEnd + 1).filter(function (option) {
|
|
35976
|
+
return isValidOption(option);
|
|
35977
|
+
}).map(function (option) {
|
|
35978
|
+
return getOptionValue(option);
|
|
35979
|
+
});
|
|
35980
|
+
updateModel(event, value);
|
|
35981
|
+
}
|
|
35982
|
+
};
|
|
35983
|
+
var findFirstFocusedOptionIndex = function findFirstFocusedOptionIndex() {
|
|
35984
|
+
var selectedIndex = findFirstSelectedOptionIndex();
|
|
35985
|
+
return selectedIndex < 0 ? findFirstOptionIndex() : selectedIndex;
|
|
35986
|
+
};
|
|
35987
|
+
var changeFocusedOptionIndex = function changeFocusedOptionIndex(event, index) {
|
|
35988
|
+
if (focusedOptionIndex !== index) {
|
|
35989
|
+
setFocusedOptionIndex(index);
|
|
35990
|
+
scrollInView();
|
|
35991
|
+
if (props.selectOnFocus && !props.multiple) {
|
|
35992
|
+
onOptionSelect(event, visibleOptions[index]);
|
|
35993
|
+
}
|
|
35994
|
+
}
|
|
35995
|
+
};
|
|
35996
|
+
var onArrowDownKey = function onArrowDownKey(event) {
|
|
35997
|
+
var optionIndex = focusedOptionIndex !== -1 ? findNextOptionIndex(focusedOptionIndex) : findFirstFocusedOptionIndex();
|
|
35998
|
+
if (props.multiple && event.shiftKey) {
|
|
35999
|
+
onOptionSelectRange(event, startRangeIndex, optionIndex);
|
|
36000
|
+
}
|
|
36001
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
36002
|
+
event.preventDefault();
|
|
36003
|
+
};
|
|
36004
|
+
var onArrowUpKey = function onArrowUpKey(event) {
|
|
36005
|
+
var optionIndex = focusedOptionIndex !== -1 ? findPrevOptionIndex(focusedOptionIndex) : findLastFocusedOptionIndex();
|
|
36006
|
+
if (props.multiple && event.shiftKey) {
|
|
36007
|
+
onOptionSelectRange(event, optionIndex, startRangeIndex);
|
|
36008
|
+
}
|
|
36009
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
36010
|
+
event.preventDefault();
|
|
36011
|
+
};
|
|
36012
|
+
var onEnterKey = function onEnterKey(event) {
|
|
36013
|
+
if (focusedOptionIndex !== -1) {
|
|
36014
|
+
if (props.multiple && event.shiftKey) onOptionSelectRange(event, focusedOptionIndex);else onOptionSelect(event, visibleOptions[focusedOptionIndex]);
|
|
36015
|
+
}
|
|
36016
|
+
event.preventDefault();
|
|
36017
|
+
};
|
|
36018
|
+
var onSpaceKey = function onSpaceKey(event) {
|
|
36019
|
+
onEnterKey(event);
|
|
36020
|
+
};
|
|
36021
|
+
var onShiftKey = function onShiftKey() {
|
|
36022
|
+
setStartRangeIndex(focusedOptionIndex);
|
|
36023
|
+
};
|
|
36024
|
+
var onHomeKey = function onHomeKey(event) {
|
|
36025
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
36026
|
+
if (pressedInInputText) {
|
|
36027
|
+
event.currentTarget.setSelectionRange(0, 0);
|
|
36028
|
+
setFocusedOptionIndex(-1);
|
|
36029
|
+
} else {
|
|
36030
|
+
var metaKey = event.metaKey || event.ctrlKey;
|
|
36031
|
+
var optionIndex = findFirstOptionIndex();
|
|
36032
|
+
if (props.multiple && event.shiftKey && metaKey) {
|
|
36033
|
+
onOptionSelectRange(event, optionIndex, startRangeIndex);
|
|
36034
|
+
}
|
|
36035
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
36036
|
+
}
|
|
36037
|
+
event.preventDefault();
|
|
36038
|
+
};
|
|
36039
|
+
var onEndKey = function onEndKey(event) {
|
|
36040
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
36041
|
+
if (pressedInInputText) {
|
|
36042
|
+
var target = event.currentTarget;
|
|
36043
|
+
var len = target.value.length;
|
|
36044
|
+
target.setSelectionRange(len, len);
|
|
36045
|
+
_readOnlyError("focusedOptionIndex");
|
|
36046
|
+
} else {
|
|
36047
|
+
var metaKey = event.metaKey || event.ctrlKey;
|
|
36048
|
+
var optionIndex = findLastOptionIndex();
|
|
36049
|
+
if (props.multiple && event.shiftKey && metaKey) {
|
|
36050
|
+
onOptionSelectRange(event, startRangeIndex, optionIndex);
|
|
36051
|
+
}
|
|
36052
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
36053
|
+
}
|
|
36054
|
+
event.preventDefault();
|
|
36055
|
+
};
|
|
36056
|
+
var onPageUpKey = function onPageUpKey(event) {
|
|
36057
|
+
scrollInView(0);
|
|
36058
|
+
event.preventDefault();
|
|
36059
|
+
};
|
|
36060
|
+
var onPageDownKey = function onPageDownKey(event) {
|
|
36061
|
+
scrollInView(visibleOptions.length - 1);
|
|
36062
|
+
event.preventDefault();
|
|
36063
|
+
};
|
|
36064
|
+
var onKeyDown = function onKeyDown(event) {
|
|
36065
|
+
var metaKey = event.metaKey || event.ctrlKey;
|
|
36066
|
+
switch (event.code) {
|
|
36067
|
+
case 'ArrowDown':
|
|
36068
|
+
onArrowDownKey(event);
|
|
36069
|
+
break;
|
|
36070
|
+
case 'ArrowUp':
|
|
36071
|
+
onArrowUpKey(event);
|
|
36072
|
+
break;
|
|
36073
|
+
case 'Home':
|
|
36074
|
+
onHomeKey(event);
|
|
36075
|
+
break;
|
|
36076
|
+
case 'End':
|
|
36077
|
+
onEndKey(event);
|
|
36078
|
+
break;
|
|
36079
|
+
case 'PageDown':
|
|
36080
|
+
onPageDownKey(event);
|
|
36081
|
+
break;
|
|
36082
|
+
case 'PageUp':
|
|
36083
|
+
onPageUpKey(event);
|
|
36084
|
+
break;
|
|
36085
|
+
case 'Enter':
|
|
36086
|
+
case 'NumpadEnter':
|
|
36087
|
+
case 'Space':
|
|
36088
|
+
onSpaceKey(event);
|
|
36089
|
+
event.preventDefault();
|
|
36090
|
+
break;
|
|
36091
|
+
case 'Tab':
|
|
36092
|
+
//NOOP
|
|
36093
|
+
break;
|
|
36094
|
+
case 'ShiftLeft':
|
|
36095
|
+
case 'ShiftRight':
|
|
36096
|
+
onShiftKey();
|
|
36097
|
+
break;
|
|
36098
|
+
default:
|
|
36099
|
+
if (props.multiple && event.code === 'KeyA' && metaKey) {
|
|
36100
|
+
var value = visibleOptions.filter(function (option) {
|
|
36101
|
+
return isValidOption(option);
|
|
36102
|
+
}).map(function (option) {
|
|
36103
|
+
return getOptionValue(option);
|
|
36104
|
+
});
|
|
36105
|
+
updateModel(event, value);
|
|
36106
|
+
event.preventDefault();
|
|
36107
|
+
break;
|
|
36108
|
+
}
|
|
36109
|
+
if (!metaKey && ObjectUtils.isPrintableCharacter(event.key)) {
|
|
36110
|
+
searchOptions(event, event.key);
|
|
36111
|
+
event.preventDefault();
|
|
36112
|
+
}
|
|
36113
|
+
break;
|
|
36114
|
+
}
|
|
36115
|
+
};
|
|
36116
|
+
var scrollInView = function scrollInView() {
|
|
36117
|
+
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
|
|
36118
|
+
setTimeout(function () {
|
|
36119
|
+
var idx = index !== -1 ? "".concat(id.current, "_").concat(index) : focusedOptionId();
|
|
36120
|
+
var element = listRef.current.querySelector("li[id=\"".concat(idx, "\"]"));
|
|
36121
|
+
if (element) {
|
|
36122
|
+
element.scrollIntoView({
|
|
36123
|
+
block: 'nearest',
|
|
36124
|
+
inline: 'nearest',
|
|
36125
|
+
behavior: 'smooth'
|
|
36126
|
+
});
|
|
36127
|
+
} else if (props.virtualScrollerOptions) {
|
|
36128
|
+
virtualScrollerRef.current && virtualScrollerRef.current.scrollToIndex(index !== -1 ? index : props.focusedOptionIndex);
|
|
36129
|
+
}
|
|
36130
|
+
}, 0);
|
|
36131
|
+
};
|
|
35572
36132
|
var onFilter = function onFilter(event) {
|
|
35573
36133
|
virtualScrollerRef.current && virtualScrollerRef.current.scrollToIndex(0);
|
|
35574
36134
|
var originalEvent = event.originalEvent,
|
|
@@ -35661,6 +36221,23 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35661
36221
|
}
|
|
35662
36222
|
return option && option['disabled'] !== undefined ? option['disabled'] : false;
|
|
35663
36223
|
};
|
|
36224
|
+
var onFirstHiddenFocus = function onFirstHiddenFocus() {
|
|
36225
|
+
DomHandler.focus(listRef.current);
|
|
36226
|
+
var firstFocusableEl = DomHandler.getFirstFocusableElement(elementRef.current, ':not([data-p-hidden-focusable="true"])');
|
|
36227
|
+
lastHiddenFocusableElement.current.tabIndex = DomHandler.isElement(firstFocusableEl) ? undefined : -1;
|
|
36228
|
+
firstHiddenFocusableElement.current.tabIndex = -1;
|
|
36229
|
+
};
|
|
36230
|
+
var onLastHiddenFocus = function onLastHiddenFocus(event) {
|
|
36231
|
+
var relatedTarget = event.relatedTarget;
|
|
36232
|
+
if (relatedTarget === listRef.current) {
|
|
36233
|
+
var firstFocusableEl = DomHandler.getFirstFocusableElement(elementRef.current, ':not([data-p-hidden-focusable="true"])');
|
|
36234
|
+
DomHandler.focus(firstFocusableEl);
|
|
36235
|
+
firstHiddenFocusableElement.current.tabIndex = undefined;
|
|
36236
|
+
} else {
|
|
36237
|
+
DomHandler.focus(firstHiddenFocusableElement.current);
|
|
36238
|
+
}
|
|
36239
|
+
astHiddenFocusableElement.current.tabIndex = -1;
|
|
36240
|
+
};
|
|
35664
36241
|
var getOptionGroupRenderKey = function getOptionGroupRenderKey(optionGroup) {
|
|
35665
36242
|
return ObjectUtils.resolveFieldData(optionGroup, props.optionGroupLabel);
|
|
35666
36243
|
};
|
|
@@ -35749,8 +36326,9 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35749
36326
|
var optionLabel = getOptionLabel(option);
|
|
35750
36327
|
var optionKey = j + '_' + getOptionRenderKey(option);
|
|
35751
36328
|
var disabled = isOptionDisabled(option);
|
|
35752
|
-
|
|
36329
|
+
disabled ? null : props.tabIndex || 0;
|
|
35753
36330
|
return /*#__PURE__*/React__namespace.createElement(ListBoxItem, {
|
|
36331
|
+
id: id.current + '_' + j,
|
|
35754
36332
|
hostName: "ListBox",
|
|
35755
36333
|
key: optionKey,
|
|
35756
36334
|
label: optionLabel,
|
|
@@ -35759,8 +36337,9 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35759
36337
|
template: props.itemTemplate,
|
|
35760
36338
|
selected: isSelected(option),
|
|
35761
36339
|
onClick: onOptionSelect,
|
|
36340
|
+
index: j,
|
|
36341
|
+
focusedOptionIndex: focusedOptionIndex,
|
|
35762
36342
|
onTouchEnd: onOptionTouchEnd,
|
|
35763
|
-
tabIndex: tabIndex,
|
|
35764
36343
|
disabled: disabled,
|
|
35765
36344
|
ptCallbacks: ptCallbacks,
|
|
35766
36345
|
metaData: metaData
|
|
@@ -35790,18 +36369,20 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35790
36369
|
var optionLabel = getOptionLabel(option);
|
|
35791
36370
|
var optionKey = index + '_' + getOptionRenderKey(option);
|
|
35792
36371
|
var disabled = isOptionDisabled(option);
|
|
35793
|
-
|
|
36372
|
+
disabled ? null : props.tabIndex || 0;
|
|
35794
36373
|
return /*#__PURE__*/React__namespace.createElement(ListBoxItem, {
|
|
36374
|
+
id: id.current + '_' + index,
|
|
35795
36375
|
hostName: "ListBox",
|
|
35796
36376
|
key: optionKey,
|
|
35797
36377
|
label: optionLabel,
|
|
36378
|
+
index: index,
|
|
36379
|
+
focusedOptionIndex: focusedOptionIndex,
|
|
35798
36380
|
option: option,
|
|
35799
36381
|
style: style,
|
|
35800
36382
|
template: props.itemTemplate,
|
|
35801
36383
|
selected: isSelected(option),
|
|
35802
36384
|
onClick: onOptionSelect,
|
|
35803
36385
|
onTouchEnd: onOptionTouchEnd,
|
|
35804
|
-
tabIndex: tabIndex,
|
|
35805
36386
|
disabled: disabled,
|
|
35806
36387
|
ptCallbacks: ptCallbacks,
|
|
35807
36388
|
metaData: metaData
|
|
@@ -35845,6 +36426,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35845
36426
|
options: options
|
|
35846
36427
|
}),
|
|
35847
36428
|
role: 'listbox',
|
|
36429
|
+
tabIndex: '-1',
|
|
35848
36430
|
'aria-multiselectable': props.multiple
|
|
35849
36431
|
}, ariaProps), ptCallbacks.ptm('list'));
|
|
35850
36432
|
return /*#__PURE__*/React__namespace.createElement("ul", listProps, options.children);
|
|
@@ -35858,9 +36440,12 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35858
36440
|
} else {
|
|
35859
36441
|
var items = createItems();
|
|
35860
36442
|
var listProps = mergeProps(_objectSpread$O({
|
|
36443
|
+
ref: listRef,
|
|
35861
36444
|
className: ptCallbacks.cx('list'),
|
|
35862
36445
|
role: 'listbox',
|
|
35863
|
-
'aria-multiselectable': props.multiple
|
|
36446
|
+
'aria-multiselectable': props.multiple,
|
|
36447
|
+
tabIndex: '-1',
|
|
36448
|
+
onKeyDown: onKeyDown
|
|
35864
36449
|
}, ariaProps), ptCallbacks.ptm('list'));
|
|
35865
36450
|
return /*#__PURE__*/React__namespace.createElement("ul", listProps, items);
|
|
35866
36451
|
}
|
|
@@ -35881,7 +36466,27 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
35881
36466
|
className: ptCallbacks.cx('root'),
|
|
35882
36467
|
style: props.style
|
|
35883
36468
|
}, ListBoxBase.getOtherProps(props), ptCallbacks.ptm('root'));
|
|
35884
|
-
|
|
36469
|
+
var hiddenFirstElement = mergeProps({
|
|
36470
|
+
ref: firstHiddenFocusableElement,
|
|
36471
|
+
role: 'presentation',
|
|
36472
|
+
'aria-hidden': 'true',
|
|
36473
|
+
className: 'p-hidden-accessible p-hidden-focusable',
|
|
36474
|
+
tabIndex: !props.disabled ? props.tabIndex : -1,
|
|
36475
|
+
onFocus: onFirstHiddenFocus,
|
|
36476
|
+
'data-p-hidden-accessible': true,
|
|
36477
|
+
'data-p-hidden-focusable': true
|
|
36478
|
+
}, ptCallbacks.ptm('hiddenFirstFocusableEl'));
|
|
36479
|
+
var hiddenLastElement = mergeProps({
|
|
36480
|
+
ref: lastHiddenFocusableElement,
|
|
36481
|
+
role: 'presentation',
|
|
36482
|
+
'aria-hidden': 'true',
|
|
36483
|
+
className: 'p-hidden-accessible p-hidden-focusable',
|
|
36484
|
+
tabIndex: !props.disabled ? props.tabIndex : -1,
|
|
36485
|
+
onFocus: onLastHiddenFocus,
|
|
36486
|
+
'data-p-hidden-accessible': true,
|
|
36487
|
+
'data-p-hidden-focusable': true
|
|
36488
|
+
}, ptCallbacks.ptm('hiddenFirstFocusableEl'));
|
|
36489
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", rootProps, /*#__PURE__*/React__namespace.createElement("span", hiddenFirstElement), header, /*#__PURE__*/React__namespace.createElement("div", wrapperProps, list), /*#__PURE__*/React__namespace.createElement("span", hiddenLastElement)), hasTooltip && /*#__PURE__*/React__namespace.createElement(Tooltip, _extends({
|
|
35885
36490
|
target: elementRef,
|
|
35886
36491
|
content: props.tooltip
|
|
35887
36492
|
}, props.tooltipOptions, {
|
|
@@ -37062,7 +37667,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
37062
37667
|
'aria-haspopup': props.model && props.model.length > 0 ? true : false,
|
|
37063
37668
|
'aria-expanded': mobileActiveState,
|
|
37064
37669
|
'aria-controls': idState,
|
|
37065
|
-
'aria-label': ariaLabel
|
|
37670
|
+
'aria-label': ariaLabel('navigation'),
|
|
37066
37671
|
tabIndex: 0,
|
|
37067
37672
|
onClick: function onClick(e) {
|
|
37068
37673
|
return toggle(e);
|
|
@@ -37758,7 +38363,8 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
37758
38363
|
props: props,
|
|
37759
38364
|
state: {
|
|
37760
38365
|
id: idState,
|
|
37761
|
-
visible: visibleState
|
|
38366
|
+
visible: visibleState,
|
|
38367
|
+
focused: focused
|
|
37762
38368
|
}
|
|
37763
38369
|
}),
|
|
37764
38370
|
ptm = _MenuBase$setMetaData.ptm,
|
|
@@ -38057,7 +38663,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
38057
38663
|
'aria-disabled': item.disabled,
|
|
38058
38664
|
'data-p-disabled': item.disabled
|
|
38059
38665
|
}, ptm('action'));
|
|
38060
|
-
var content = /*#__PURE__*/React__namespace.createElement("div", contentProps, /*#__PURE__*/React__namespace.createElement("a", actionProps, icon, label));
|
|
38666
|
+
var content = /*#__PURE__*/React__namespace.createElement("div", contentProps, /*#__PURE__*/React__namespace.createElement("a", actionProps, icon, label, /*#__PURE__*/React__namespace.createElement(Ripple, null)));
|
|
38061
38667
|
if (item.template) {
|
|
38062
38668
|
var defaultContentOptions = {
|
|
38063
38669
|
onClick: function onClick(event) {
|
|
@@ -39111,7 +39717,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
39111
39717
|
tabIndex: '0',
|
|
39112
39718
|
'aria-haspopup': mobileActiveState && props.model && props.model.lentgh > 0 ? true : false,
|
|
39113
39719
|
'aria-expanded': mobileActiveState,
|
|
39114
|
-
'aria-label': ariaLabel
|
|
39720
|
+
'aria-label': ariaLabel('navigation'),
|
|
39115
39721
|
'aria-controls': idState,
|
|
39116
39722
|
role: 'button'
|
|
39117
39723
|
}, "tabIndex", 0), "className", cx('button')), "onKeyDown", function onKeyDown(e) {
|
|
@@ -39330,7 +39936,8 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
39330
39936
|
var props = _ref5.itemProps;
|
|
39331
39937
|
return classNames('p-multiselect-item', {
|
|
39332
39938
|
'p-highlight': props.selected,
|
|
39333
|
-
'p-disabled': props.disabled
|
|
39939
|
+
'p-disabled': props.disabled,
|
|
39940
|
+
'p-focus': props.focusedOptionIndex === props.index
|
|
39334
39941
|
});
|
|
39335
39942
|
},
|
|
39336
39943
|
checkboxContainer: 'p-checkbox p-component',
|
|
@@ -39343,7 +39950,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
39343
39950
|
},
|
|
39344
39951
|
transition: 'p-connected-overlay'
|
|
39345
39952
|
};
|
|
39346
|
-
var styles$r = "\n@layer primereact {\n .p-multiselect {\n display: inline-flex;\n user-select: none;\n cursor: pointer;\n }\n \n .p-multiselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n cursor: pointer;\n }\n \n .p-multiselect-label-container {\n overflow: hidden;\n flex: 1 1 auto;\n cursor: pointer;\n }\n \n .p-multiselect-label {\n display: block;\n white-space: nowrap;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n .p-multiselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n \n .p-multiselect-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-multiselect-token-icon {\n cursor: pointer;\n }\n \n .p-multiselect .p-multiselect-panel {\n min-width: 100%;\n }\n \n .p-multiselect-inline.p-multiselect-panel {\n border: none;\n position: initial;\n background: none;\n box-shadow: none;\n }\n \n .p-multiselect-inline.p-multiselect-panel .p-multiselect-items {\n padding: 0;\n }\n \n .p-multiselect-flex.p-multiselect-panel .p-multiselect-items {\n display: flex;\n flex-wrap: wrap;\n }\n \n .p-multiselect-items-wrapper {\n overflow: auto;\n }\n \n .p-multiselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n \n .p-multiselect-item {\n cursor: pointer;\n display: flex;\n align-items: center;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n }\n \n .p-multiselect-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n \n .p-multiselect-select-all-label {\n margin-left: 0.5rem;\n }\n \n .p-multiselect-filter-container {\n position: relative;\n flex: 1 1 auto;\n }\n \n .p-multiselect-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n \n .p-multiselect-filter-container .p-inputtext {\n width: 100%;\n }\n \n .p-multiselect-close {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n overflow: hidden;\n position: relative;\n margin-left: auto;\n }\n \n .p-multiselect-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n \n .p-fluid .p-multiselect {\n display: flex;\n }\n}\n";
|
|
39953
|
+
var styles$r = "\n@layer primereact {\n .p-multiselect {\n display: inline-flex;\n user-select: none;\n cursor: pointer;\n }\n \n .p-multiselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n cursor: pointer;\n }\n \n .p-multiselect-label-container {\n overflow: hidden;\n flex: 1 1 auto;\n cursor: pointer;\n }\n \n .p-multiselect-label {\n display: block;\n white-space: nowrap;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n .p-multiselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n \n .p-multiselect-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-multiselect-token-icon {\n cursor: pointer;\n }\n \n .p-multiselect .p-multiselect-panel {\n min-width: 100%;\n }\n \n .p-multiselect-inline.p-multiselect-panel {\n border: none;\n position: initial;\n background: none;\n box-shadow: none;\n }\n \n .p-multiselect-inline.p-multiselect-panel .p-multiselect-items {\n padding: 0;\n }\n \n .p-multiselect-flex.p-multiselect-panel .p-multiselect-items {\n display: flex;\n flex-wrap: wrap;\n }\n \n .p-multiselect-items-wrapper {\n overflow: auto;\n }\n \n .p-multiselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n \n .p-multiselect-item {\n cursor: pointer;\n display: flex;\n align-items: center;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n outline: none;\n }\n \n .p-multiselect-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n \n .p-multiselect-select-all-label {\n margin-left: 0.5rem;\n }\n \n .p-multiselect-filter-container {\n position: relative;\n flex: 1 1 auto;\n }\n \n .p-multiselect-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n \n .p-multiselect-filter-container .p-inputtext {\n width: 100%;\n }\n \n .p-multiselect-close {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n overflow: hidden;\n position: relative;\n margin-left: auto;\n }\n \n .p-multiselect-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n right: 3rem;\n }\n \n .p-fluid .p-multiselect {\n display: flex;\n }\n}\n";
|
|
39347
39954
|
var inlineStyles$a = {
|
|
39348
39955
|
root: function root(_ref7) {
|
|
39349
39956
|
var props = _ref7.props;
|
|
@@ -39377,6 +39984,8 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
39377
39984
|
filterBy: null,
|
|
39378
39985
|
filterInputAutoFocus: true,
|
|
39379
39986
|
filterLocale: undefined,
|
|
39987
|
+
selectOnFocus: false,
|
|
39988
|
+
autoOptionFocus: false,
|
|
39380
39989
|
filterMatchMode: 'contains',
|
|
39381
39990
|
filterPlaceholder: null,
|
|
39382
39991
|
filterTemplate: null,
|
|
@@ -39600,7 +40209,9 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
39600
40209
|
context: {
|
|
39601
40210
|
selected: props.selected,
|
|
39602
40211
|
disabled: props.disabled,
|
|
39603
|
-
focused: focusedState
|
|
40212
|
+
focused: focusedState,
|
|
40213
|
+
focusedIndex: props.focusedIndex,
|
|
40214
|
+
index: props.index
|
|
39604
40215
|
}
|
|
39605
40216
|
});
|
|
39606
40217
|
};
|
|
@@ -39612,22 +40223,11 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
39612
40223
|
};
|
|
39613
40224
|
var onClick = function onClick(event) {
|
|
39614
40225
|
if (props.onClick) {
|
|
39615
|
-
props.onClick(
|
|
39616
|
-
originalEvent: event,
|
|
39617
|
-
option: props.option
|
|
39618
|
-
});
|
|
40226
|
+
props.onClick(event, props.option);
|
|
39619
40227
|
}
|
|
39620
40228
|
event.preventDefault();
|
|
39621
40229
|
event.stopPropagation();
|
|
39622
40230
|
};
|
|
39623
|
-
var onKeyDown = function onKeyDown(event) {
|
|
39624
|
-
if (props.onKeyDown) {
|
|
39625
|
-
props.onKeyDown({
|
|
39626
|
-
originalEvent: event,
|
|
39627
|
-
option: props.option
|
|
39628
|
-
});
|
|
39629
|
-
}
|
|
39630
|
-
};
|
|
39631
40231
|
var checkboxIconProps = mergeProps({
|
|
39632
40232
|
className: cx('checkboxIcon')
|
|
39633
40233
|
}, getPTOptions('checkboxIcon'));
|
|
@@ -39636,7 +40236,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
39636
40236
|
selected: props.selected
|
|
39637
40237
|
}) : null;
|
|
39638
40238
|
var content = props.template ? ObjectUtils.getJSXElement(props.template, props.option) : props.label;
|
|
39639
|
-
var tabIndex = props.disabled ?
|
|
40239
|
+
var tabIndex = props.disabled ? -1 : props.tabIndex;
|
|
39640
40240
|
var checkboxContainerProps = mergeProps({
|
|
39641
40241
|
className: cx('checkboxContainer')
|
|
39642
40242
|
}, getPTOptions('checkboxContainer'));
|
|
@@ -39652,7 +40252,6 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
39652
40252
|
})),
|
|
39653
40253
|
style: props.style,
|
|
39654
40254
|
onClick: onClick,
|
|
39655
|
-
onKeyDown: onKeyDown,
|
|
39656
40255
|
onFocus: onFocus,
|
|
39657
40256
|
onBlur: onBlur,
|
|
39658
40257
|
tabIndex: tabIndex,
|
|
@@ -39754,14 +40353,15 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
39754
40353
|
var selected = props.isSelected(option);
|
|
39755
40354
|
return /*#__PURE__*/React__namespace.createElement(MultiSelectItem, {
|
|
39756
40355
|
hostName: props.hostName,
|
|
40356
|
+
index: j,
|
|
39757
40357
|
key: optionKey,
|
|
40358
|
+
focusedOptionIndex: props.focusedOptionIndex,
|
|
39758
40359
|
label: optionLabel,
|
|
39759
40360
|
option: option,
|
|
39760
40361
|
style: style,
|
|
39761
40362
|
template: props.itemTemplate,
|
|
39762
40363
|
selected: selected,
|
|
39763
40364
|
onClick: props.onOptionSelect,
|
|
39764
|
-
onKeyDown: props.onOptionKeyDown,
|
|
39765
40365
|
tabIndex: tabIndex,
|
|
39766
40366
|
disabled: disabled,
|
|
39767
40367
|
className: props.itemClassName,
|
|
@@ -39812,13 +40412,14 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
39812
40412
|
return /*#__PURE__*/React__namespace.createElement(MultiSelectItem, {
|
|
39813
40413
|
hostName: props.hostName,
|
|
39814
40414
|
key: optionKey,
|
|
40415
|
+
focusedOptionIndex: props.focusedOptionIndex,
|
|
39815
40416
|
label: optionLabel,
|
|
39816
40417
|
option: option,
|
|
39817
40418
|
style: style,
|
|
40419
|
+
index: index,
|
|
39818
40420
|
template: props.itemTemplate,
|
|
39819
40421
|
selected: selected,
|
|
39820
40422
|
onClick: props.onOptionSelect,
|
|
39821
|
-
onKeyDown: props.onOptionKeyDown,
|
|
39822
40423
|
tabIndex: tabIndex,
|
|
39823
40424
|
disabled: disabled,
|
|
39824
40425
|
className: props.itemClassName,
|
|
@@ -39947,19 +40548,35 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
39947
40548
|
var mergeProps = useMergeProps();
|
|
39948
40549
|
var context = React__namespace.useContext(PrimeReactContext);
|
|
39949
40550
|
var props = MultiSelectBase.getProps(inProps, context);
|
|
39950
|
-
var _React$useState = React__namespace.useState(
|
|
40551
|
+
var _React$useState = React__namespace.useState(null),
|
|
39951
40552
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
39952
|
-
|
|
39953
|
-
|
|
40553
|
+
focusedOptionIndex = _React$useState2[0],
|
|
40554
|
+
setFocusedOptionIndex = _React$useState2[1];
|
|
39954
40555
|
var _React$useState3 = React__namespace.useState(false),
|
|
39955
40556
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
39956
|
-
|
|
39957
|
-
|
|
39958
|
-
var _React$useState5 = React__namespace.useState(
|
|
40557
|
+
clicked = _React$useState4[0],
|
|
40558
|
+
setClicked = _React$useState4[1];
|
|
40559
|
+
var _React$useState5 = React__namespace.useState(''),
|
|
39959
40560
|
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
39960
|
-
|
|
39961
|
-
|
|
40561
|
+
filterState = _React$useState6[0],
|
|
40562
|
+
setFilterState = _React$useState6[1];
|
|
40563
|
+
var _React$useState7 = React__namespace.useState(-1),
|
|
40564
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
40565
|
+
startRangeIndex = _React$useState8[0],
|
|
40566
|
+
setStartRangeIndex = _React$useState8[1];
|
|
40567
|
+
var _React$useState9 = React__namespace.useState(false),
|
|
40568
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
40569
|
+
focusedState = _React$useState10[0],
|
|
40570
|
+
setFocusedState = _React$useState10[1];
|
|
40571
|
+
var _React$useState11 = React__namespace.useState(props.inline),
|
|
40572
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
40573
|
+
overlayVisibleState = _React$useState12[0],
|
|
40574
|
+
setOverlayVisibleState = _React$useState12[1];
|
|
39962
40575
|
var elementRef = React__namespace.useRef(null);
|
|
40576
|
+
var searchValue = React__namespace.useRef(null);
|
|
40577
|
+
var searchTimeout = React__namespace.useRef(null);
|
|
40578
|
+
var firstHiddenFocusableElementOnOverlay = React__namespace.useRef(null);
|
|
40579
|
+
var lastHiddenFocusableElementOnOverlay = React__namespace.useRef(null);
|
|
39963
40580
|
var inputRef = React__namespace.useRef(props.inputRef);
|
|
39964
40581
|
var labelRef = React__namespace.useRef(null);
|
|
39965
40582
|
var overlayRef = React__namespace.useRef(null);
|
|
@@ -40001,6 +40618,14 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
40001
40618
|
_useOverlayListener2 = _slicedToArray(_useOverlayListener, 2),
|
|
40002
40619
|
bindOverlayListener = _useOverlayListener2[0],
|
|
40003
40620
|
unbindOverlayListener = _useOverlayListener2[1];
|
|
40621
|
+
var onFirstHiddenFocus = function onFirstHiddenFocus(event) {
|
|
40622
|
+
var focusableEl = event.relatedTarget === inputRef.current ? DomHandler.getFirstFocusableElement(overlayRef.current, ':not([data-p-hidden-focusable="true"])') : inputRef.current;
|
|
40623
|
+
DomHandler.focus(focusableEl);
|
|
40624
|
+
};
|
|
40625
|
+
var onLastHiddenFocus = function onLastHiddenFocus(event) {
|
|
40626
|
+
var focusableEl = event.relatedTarget === inputRef.current ? DomHandler.getLastFocusableElement(overlayRef.current, ':not([data-p-hidden-focusable="true"])') : inputRef.current;
|
|
40627
|
+
DomHandler.focus(focusableEl);
|
|
40628
|
+
};
|
|
40004
40629
|
var onPanelClick = function onPanelClick(event) {
|
|
40005
40630
|
OverlayService.emit('overlay-click', {
|
|
40006
40631
|
originalEvent: event,
|
|
@@ -40010,63 +40635,60 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
40010
40635
|
var allowOptionSelect = function allowOptionSelect() {
|
|
40011
40636
|
return !props.selectionLimit || !props.value || props.value && props.value.length < props.selectionLimit;
|
|
40012
40637
|
};
|
|
40013
|
-
var
|
|
40014
|
-
var
|
|
40015
|
-
|
|
40016
|
-
|
|
40017
|
-
|
|
40018
|
-
}
|
|
40019
|
-
var optionValue = getOptionValue(option);
|
|
40020
|
-
var isUsed = isOptionValueUsed(option);
|
|
40021
|
-
var selected = isSelected(option);
|
|
40022
|
-
var allowSelect = allowOptionSelect();
|
|
40023
|
-
if (selected) {
|
|
40024
|
-
updateModel(originalEvent, props.value.filter(function (val) {
|
|
40025
|
-
return !ObjectUtils.equals(isUsed ? val : getOptionValue(val), optionValue, equalityKey);
|
|
40026
|
-
}), option);
|
|
40027
|
-
} else if (allowSelect) {
|
|
40028
|
-
updateModel(originalEvent, [].concat(_toConsumableArray(props.value || []), [optionValue]), option);
|
|
40029
|
-
}
|
|
40638
|
+
var findNextSelectedOptionIndex = function findNextSelectedOptionIndex(index) {
|
|
40639
|
+
var matchedOptionIndex = hasSelectedOption && index < visibleOptions.length - 1 ? visibleOptions.slice(index + 1).findIndex(function (option) {
|
|
40640
|
+
return isValidSelectedOption(option);
|
|
40641
|
+
}) : -1;
|
|
40642
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : -1;
|
|
40030
40643
|
};
|
|
40031
|
-
var
|
|
40032
|
-
var
|
|
40033
|
-
|
|
40034
|
-
|
|
40035
|
-
|
|
40036
|
-
|
|
40037
|
-
|
|
40038
|
-
|
|
40039
|
-
|
|
40040
|
-
|
|
40041
|
-
|
|
40042
|
-
|
|
40043
|
-
|
|
40044
|
-
|
|
40045
|
-
|
|
40046
|
-
|
|
40047
|
-
|
|
40048
|
-
|
|
40049
|
-
//enter and space
|
|
40050
|
-
case 13:
|
|
40051
|
-
case 32:
|
|
40052
|
-
onOptionSelect(event);
|
|
40053
|
-
originalEvent.preventDefault();
|
|
40054
|
-
break;
|
|
40055
|
-
|
|
40056
|
-
//escape
|
|
40057
|
-
case 27:
|
|
40058
|
-
hide();
|
|
40059
|
-
DomHandler.focus(inputRef.current);
|
|
40060
|
-
break;
|
|
40644
|
+
var findPrevSelectedOptionIndex = function findPrevSelectedOptionIndex(index) {
|
|
40645
|
+
var matchedOptionIndex = hasSelectedOption && index > 0 ? ObjectUtils.findLastIndex(visibleOptions.slice(0, index), function (option) {
|
|
40646
|
+
return isValidSelectedOption(option);
|
|
40647
|
+
}) : -1;
|
|
40648
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex : -1;
|
|
40649
|
+
};
|
|
40650
|
+
var findNearestSelectedOptionIndex = function findNearestSelectedOptionIndex(index) {
|
|
40651
|
+
var firstCheckUp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
40652
|
+
var matchedOptionIndex = -1;
|
|
40653
|
+
if (hasSelectedOption) {
|
|
40654
|
+
if (firstCheckUp) {
|
|
40655
|
+
matchedOptionIndex = findPrevSelectedOptionIndex(index);
|
|
40656
|
+
matchedOptionIndex = matchedOptionIndex === -1 ? findNextSelectedOptionIndex(index) : matchedOptionIndex;
|
|
40657
|
+
} else {
|
|
40658
|
+
matchedOptionIndex = findNextSelectedOptionIndex(index);
|
|
40659
|
+
matchedOptionIndex = matchedOptionIndex === -1 ? findPrevSelectedOptionIndex(index) : matchedOptionIndex;
|
|
40660
|
+
}
|
|
40061
40661
|
}
|
|
40662
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
40062
40663
|
};
|
|
40063
|
-
var
|
|
40064
|
-
var
|
|
40065
|
-
|
|
40664
|
+
var onOptionSelectRange = function onOptionSelectRange(event) {
|
|
40665
|
+
var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;
|
|
40666
|
+
var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
|
40667
|
+
start === -1 && (start = findNearestSelectedOptionIndex(end, true));
|
|
40668
|
+
end === -1 && (end = findNearestSelectedOptionIndex(start));
|
|
40669
|
+
if (start !== -1 && end !== -1) {
|
|
40670
|
+
var rangeStart = Math.min(start, end);
|
|
40671
|
+
var rangeEnd = Math.max(start, end);
|
|
40672
|
+
var value = visibleOptions.slice(rangeStart, rangeEnd + 1).filter(function (option) {
|
|
40673
|
+
return isValidOption(option);
|
|
40674
|
+
}).map(function (option) {
|
|
40675
|
+
return getOptionValue(option);
|
|
40676
|
+
});
|
|
40677
|
+
updateModel(event, value);
|
|
40678
|
+
}
|
|
40066
40679
|
};
|
|
40067
|
-
var
|
|
40068
|
-
var
|
|
40069
|
-
|
|
40680
|
+
var onOptionSelect = function onOptionSelect(event, option) {
|
|
40681
|
+
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
|
40682
|
+
if (props.disabled || isOptionDisabled(option)) {
|
|
40683
|
+
return;
|
|
40684
|
+
}
|
|
40685
|
+
var selected = isSelected(option);
|
|
40686
|
+
var value = null;
|
|
40687
|
+
if (selected) value = props.value.filter(function (val) {
|
|
40688
|
+
return !ObjectUtils.equals(val, getOptionValue(option), equalityKey);
|
|
40689
|
+
});else value = [].concat(_toConsumableArray(props.value || []), [getOptionValue(option)]);
|
|
40690
|
+
updateModel(event, value);
|
|
40691
|
+
index !== -1 && setFocusedOptionIndex(index);
|
|
40070
40692
|
};
|
|
40071
40693
|
var onClick = function onClick(event) {
|
|
40072
40694
|
if (!props.inline && !props.disabled && !props.loading && !isPanelClicked(event) && DomHandler.getAttribute(event.target, 'data-pc-section') !== 'removetokenicon' && !isClearClicked(event)) {
|
|
@@ -40074,42 +40696,170 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
40074
40696
|
DomHandler.focus(inputRef.current);
|
|
40075
40697
|
event.preventDefault();
|
|
40076
40698
|
}
|
|
40699
|
+
setClicked(true);
|
|
40700
|
+
};
|
|
40701
|
+
var onArrowDownKey = function onArrowDownKey(event) {
|
|
40702
|
+
if (!overlayVisibleState) {
|
|
40703
|
+
show();
|
|
40704
|
+
props.editable && changeFocusedOptionIndex(event, findSelectedOptionIndex());
|
|
40705
|
+
} else {
|
|
40706
|
+
var optionIndex = focusedOptionIndex !== -1 ? findNextOptionIndex(focusedOptionIndex) : clicked ? findFirstOptionIndex() : findFirstFocusedOptionIndex();
|
|
40707
|
+
if (event.shiftKey) {
|
|
40708
|
+
onOptionSelectRange(event, startRangeIndex, optionIndex);
|
|
40709
|
+
}
|
|
40710
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
40711
|
+
}
|
|
40712
|
+
event.preventDefault();
|
|
40713
|
+
};
|
|
40714
|
+
var onArrowUpKey = function onArrowUpKey(event) {
|
|
40715
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
40716
|
+
if (event.altKey && !pressedInInputText) {
|
|
40717
|
+
if (focusedOptionIndex !== -1) {
|
|
40718
|
+
onOptionSelect(event, visibleOptions[focusedOptionIndex]);
|
|
40719
|
+
}
|
|
40720
|
+
overlayVisibleState && hide();
|
|
40721
|
+
event.preventDefault();
|
|
40722
|
+
} else {
|
|
40723
|
+
var optionIndex = focusedOptionIndex !== -1 ? findPrevOptionIndex(focusedOptionIndex) : clicked ? findLastOptionIndex() : findLastFocusedOptionIndex();
|
|
40724
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
40725
|
+
!overlayVisibleState && show();
|
|
40726
|
+
event.preventDefault();
|
|
40727
|
+
}
|
|
40728
|
+
};
|
|
40729
|
+
var onEnterKey = function onEnterKey(event) {
|
|
40730
|
+
if (!overlayVisibleState) {
|
|
40731
|
+
setFocusedOptionIndex(-1);
|
|
40732
|
+
onArrowDownKey(event);
|
|
40733
|
+
} else {
|
|
40734
|
+
if (focusedOptionIndex !== -1) {
|
|
40735
|
+
if (event.shiftKey) onOptionSelectRange(event, focusedOptionIndex);else onOptionSelect(event, visibleOptions[focusedOptionIndex]);
|
|
40736
|
+
}
|
|
40737
|
+
hide();
|
|
40738
|
+
}
|
|
40739
|
+
event.preventDefault();
|
|
40740
|
+
};
|
|
40741
|
+
var onHomeKey = function onHomeKey(event) {
|
|
40742
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
40743
|
+
var currentTarget = event.currentTarget;
|
|
40744
|
+
if (pressedInInputText) {
|
|
40745
|
+
var len = currentTarget.value.length;
|
|
40746
|
+
currentTarget.setSelectionRange(0, event.shiftKey ? len : 0);
|
|
40747
|
+
setFocusedOptionIndex(-1);
|
|
40748
|
+
} else {
|
|
40749
|
+
var metaKey = event.metaKey || event.ctrlKey;
|
|
40750
|
+
var optionIndex = findFirstOptionIndex();
|
|
40751
|
+
if (event.shiftKey && metaKey) {
|
|
40752
|
+
onOptionSelectRange(event, optionIndex, startRangeIndex);
|
|
40753
|
+
}
|
|
40754
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
40755
|
+
!overlayVisibleState && show();
|
|
40756
|
+
}
|
|
40757
|
+
event.preventDefault();
|
|
40758
|
+
};
|
|
40759
|
+
var onEndKey = function onEndKey(event) {
|
|
40760
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
40761
|
+
var currentTarget = event.currentTarget;
|
|
40762
|
+
if (pressedInInputText) {
|
|
40763
|
+
var len = currentTarget.value.length;
|
|
40764
|
+
currentTarget.setSelectionRange(event.shiftKey ? 0 : len, len);
|
|
40765
|
+
_readOnlyError("focusedOptionIndex");
|
|
40766
|
+
} else {
|
|
40767
|
+
var metaKey = event.metaKey || event.ctrlKey;
|
|
40768
|
+
var optionIndex = findLastOptionIndex();
|
|
40769
|
+
if (event.shiftKey && metaKey) {
|
|
40770
|
+
onOptionSelectRange(event, startRangeIndex, optionIndex);
|
|
40771
|
+
}
|
|
40772
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
40773
|
+
!overlayVisibleState && show();
|
|
40774
|
+
}
|
|
40775
|
+
event.preventDefault();
|
|
40776
|
+
};
|
|
40777
|
+
var onPageUpKey = function onPageUpKey(event) {
|
|
40778
|
+
event.preventDefault();
|
|
40779
|
+
};
|
|
40780
|
+
var onPageDownKey = function onPageDownKey(event) {
|
|
40781
|
+
event.preventDefault();
|
|
40782
|
+
};
|
|
40783
|
+
var onTabKey = function onTabKey(event) {
|
|
40784
|
+
var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
40785
|
+
if (!pressedInInputText) {
|
|
40786
|
+
if (overlayVisibleState && hasFocusableElements()) {
|
|
40787
|
+
DomHandler.focus(event.shiftKey ? lastHiddenFocusableElementOnOverlay.current : firstHiddenFocusableElementOnOverlay.current);
|
|
40788
|
+
event.preventDefault();
|
|
40789
|
+
} else {
|
|
40790
|
+
if (focusedOptionIndex !== -1) {
|
|
40791
|
+
onOptionSelect(event, visibleOptions[focusedOptionIndex]);
|
|
40792
|
+
}
|
|
40793
|
+
overlayVisibleState && hide(filter);
|
|
40794
|
+
}
|
|
40795
|
+
}
|
|
40796
|
+
};
|
|
40797
|
+
var onShiftKey = function onShiftKey() {
|
|
40798
|
+
setStartRangeIndex(focusedOptionIndex);
|
|
40077
40799
|
};
|
|
40078
40800
|
var onKeyDown = function onKeyDown(event) {
|
|
40079
|
-
|
|
40080
|
-
|
|
40081
|
-
case
|
|
40801
|
+
var metaKey = event.metaKey || event.ctrlKey;
|
|
40802
|
+
switch (event.code) {
|
|
40803
|
+
case 'ArrowUp':
|
|
40082
40804
|
if (props.inline) break;
|
|
40083
|
-
|
|
40084
|
-
show();
|
|
40085
|
-
event.preventDefault();
|
|
40086
|
-
}
|
|
40805
|
+
onArrowUpKey(event);
|
|
40087
40806
|
break;
|
|
40088
|
-
|
|
40089
|
-
//space
|
|
40090
|
-
case 32:
|
|
40807
|
+
case 'ArrowDown':
|
|
40091
40808
|
if (props.inline) break;
|
|
40092
|
-
|
|
40809
|
+
onArrowDownKey(event);
|
|
40810
|
+
break;
|
|
40811
|
+
case 'Space':
|
|
40812
|
+
case 'NumpadEnter':
|
|
40813
|
+
case 'Enter':
|
|
40814
|
+
if (props.inline) break;
|
|
40815
|
+
onEnterKey(event);
|
|
40816
|
+
break;
|
|
40817
|
+
case 'Home':
|
|
40818
|
+
if (props.inline) break;
|
|
40819
|
+
onHomeKey(event);
|
|
40093
40820
|
event.preventDefault();
|
|
40094
40821
|
break;
|
|
40095
|
-
|
|
40096
|
-
|
|
40097
|
-
|
|
40822
|
+
case 'End':
|
|
40823
|
+
if (props.inline) break;
|
|
40824
|
+
onEndKey(event);
|
|
40825
|
+
event.preventDefault();
|
|
40826
|
+
break;
|
|
40827
|
+
case 'PageDown':
|
|
40828
|
+
onPageDownKey(event);
|
|
40829
|
+
break;
|
|
40830
|
+
case 'PageUp':
|
|
40831
|
+
onPageUpKey(event);
|
|
40832
|
+
break;
|
|
40833
|
+
case 'Escape':
|
|
40098
40834
|
if (props.inline) break;
|
|
40099
40835
|
hide();
|
|
40100
40836
|
break;
|
|
40101
|
-
|
|
40102
|
-
|
|
40103
|
-
|
|
40104
|
-
|
|
40105
|
-
|
|
40106
|
-
|
|
40107
|
-
|
|
40108
|
-
|
|
40109
|
-
|
|
40837
|
+
case 'Tab':
|
|
40838
|
+
onTabKey(event);
|
|
40839
|
+
break;
|
|
40840
|
+
case 'ShiftLeft':
|
|
40841
|
+
case 'ShiftRight':
|
|
40842
|
+
onShiftKey();
|
|
40843
|
+
break;
|
|
40844
|
+
default:
|
|
40845
|
+
if (event.code === 'KeyA' && metaKey) {
|
|
40846
|
+
var value = visibleOptions.filter(function (option) {
|
|
40847
|
+
return isValidOption(option);
|
|
40848
|
+
}).map(function (option) {
|
|
40849
|
+
return getOptionValue(option);
|
|
40850
|
+
});
|
|
40851
|
+
updateModel(event, value);
|
|
40852
|
+
event.preventDefault();
|
|
40853
|
+
break;
|
|
40854
|
+
}
|
|
40855
|
+
if (!metaKey && ObjectUtils.isPrintableCharacter(event.key)) {
|
|
40856
|
+
!overlayVisibleState && show();
|
|
40857
|
+
searchOptions(event);
|
|
40858
|
+
event.preventDefault();
|
|
40110
40859
|
}
|
|
40111
40860
|
break;
|
|
40112
40861
|
}
|
|
40862
|
+
setClicked(false);
|
|
40113
40863
|
};
|
|
40114
40864
|
var onSelectAll = function onSelectAll(event) {
|
|
40115
40865
|
if (props.onSelectAll) {
|
|
@@ -40195,9 +40945,13 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
40195
40945
|
};
|
|
40196
40946
|
var show = function show() {
|
|
40197
40947
|
setOverlayVisibleState(true);
|
|
40948
|
+
setFocusedOptionIndex(focusedOptionIndex !== -1 ? focusedOptionIndex : props.autoOptionFocus ? findFirstFocusedOptionIndex() : findSelectedOptionIndex());
|
|
40949
|
+
DomHandler.focus(inputRef.current);
|
|
40198
40950
|
};
|
|
40199
40951
|
var hide = function hide() {
|
|
40952
|
+
setFocusedOptionIndex(-1);
|
|
40200
40953
|
setOverlayVisibleState(false);
|
|
40954
|
+
setClicked(false);
|
|
40201
40955
|
};
|
|
40202
40956
|
var onOverlayEnter = function onOverlayEnter(callback) {
|
|
40203
40957
|
ZIndexUtils.set('overlay', overlayRef.current, context && context.autoZIndex || PrimeReact.autoZIndex, context && context.zIndex['overlay'] || PrimeReact.zIndex['overlay']);
|
|
@@ -40391,6 +41145,100 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
40391
41145
|
var isOptionValueUsed = function isOptionValueUsed(option) {
|
|
40392
41146
|
return !props.useOptionAsValue && props.optionValue || option && option['value'] !== undefined;
|
|
40393
41147
|
};
|
|
41148
|
+
var isOptionGroup = function isOptionGroup(option) {
|
|
41149
|
+
return props.optionGroupLabel && option.optionGroup && option.group;
|
|
41150
|
+
};
|
|
41151
|
+
var hasSelectedOption = function hasSelectedOption() {
|
|
41152
|
+
return ObjectUtils.isNotEmpty(props.value);
|
|
41153
|
+
};
|
|
41154
|
+
var hasFocusableElements = function hasFocusableElements() {
|
|
41155
|
+
return DomHandler.getFocusableElements(overlayRef.current, ':not([data-p-hidden-focusable="true"])').length > 0;
|
|
41156
|
+
};
|
|
41157
|
+
var isOptionMatched = function isOptionMatched(option) {
|
|
41158
|
+
var _getOptionLabel;
|
|
41159
|
+
return isValidOption(option) && ((_getOptionLabel = getOptionLabel(option)) === null || _getOptionLabel === void 0 ? void 0 : _getOptionLabel.toLocaleLowerCase(props.filterLocale).startsWith(searchValue.current.toLocaleLowerCase(props.filterLocale)));
|
|
41160
|
+
};
|
|
41161
|
+
var isValidOption = function isValidOption(option) {
|
|
41162
|
+
return ObjectUtils.isNotEmpty(option) && !(isOptionDisabled(option) || isOptionGroup(option));
|
|
41163
|
+
};
|
|
41164
|
+
var isValidSelectedOption = function isValidSelectedOption(option) {
|
|
41165
|
+
return isValidOption(option) && isSelected(option);
|
|
41166
|
+
};
|
|
41167
|
+
var findSelectedOptionIndex = function findSelectedOptionIndex() {
|
|
41168
|
+
return hasSelectedOption ? visibleOptions === null || visibleOptions === void 0 ? void 0 : visibleOptions.findIndex(function (option) {
|
|
41169
|
+
return isValidSelectedOption(option);
|
|
41170
|
+
}) : -1;
|
|
41171
|
+
};
|
|
41172
|
+
var findFirstFocusedOptionIndex = function findFirstFocusedOptionIndex() {
|
|
41173
|
+
var selectedIndex = findSelectedOptionIndex();
|
|
41174
|
+
return selectedIndex < 0 ? findFirstOptionIndex() : selectedIndex;
|
|
41175
|
+
};
|
|
41176
|
+
var findLastFocusedOptionIndex = function findLastFocusedOptionIndex() {
|
|
41177
|
+
var selectedIndex = findSelectedOptionIndex();
|
|
41178
|
+
return selectedIndex < 0 ? findLastOptionIndex() : selectedIndex;
|
|
41179
|
+
};
|
|
41180
|
+
var findFirstOptionIndex = function findFirstOptionIndex() {
|
|
41181
|
+
return visibleOptions.findIndex(function (option) {
|
|
41182
|
+
return isValidOption(option);
|
|
41183
|
+
});
|
|
41184
|
+
};
|
|
41185
|
+
var findLastOptionIndex = function findLastOptionIndex() {
|
|
41186
|
+
return ObjectUtils.findLastIndex(visibleOptions, function (option) {
|
|
41187
|
+
return isValidOption(option);
|
|
41188
|
+
});
|
|
41189
|
+
};
|
|
41190
|
+
var findNextOptionIndex = function findNextOptionIndex(index) {
|
|
41191
|
+
var matchedOptionIndex = index < visibleOptions.length - 1 ? visibleOptions.slice(index + 1).findIndex(function (option) {
|
|
41192
|
+
return isValidOption(option);
|
|
41193
|
+
}) : -1;
|
|
41194
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
|
|
41195
|
+
};
|
|
41196
|
+
var findPrevOptionIndex = function findPrevOptionIndex(index) {
|
|
41197
|
+
var matchedOptionIndex = index > 0 ? ObjectUtils.findLastIndex(visibleOptions.slice(0, index), function (option) {
|
|
41198
|
+
return isValidOption(option);
|
|
41199
|
+
}) : -1;
|
|
41200
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
41201
|
+
};
|
|
41202
|
+
var searchOptions = function searchOptions(event) {
|
|
41203
|
+
searchValue.current = (searchValue.current || '') + event.key;
|
|
41204
|
+
var optionIndex = -1;
|
|
41205
|
+
if (ObjectUtils.isNotEmpty(searchValue.current)) {
|
|
41206
|
+
if (focusedOptionIndex !== -1) {
|
|
41207
|
+
optionIndex = visibleOptions.slice(focusedOptionIndex).findIndex(function (option) {
|
|
41208
|
+
return isOptionMatched(option);
|
|
41209
|
+
});
|
|
41210
|
+
optionIndex = optionIndex === -1 ? visibleOptions.slice(0, focusedOptionIndex).findIndex(function (option) {
|
|
41211
|
+
return isOptionMatched(option);
|
|
41212
|
+
}) : optionIndex + focusedOptionIndex;
|
|
41213
|
+
} else {
|
|
41214
|
+
optionIndex = visibleOptions.findIndex(function (option) {
|
|
41215
|
+
return isOptionMatched(option);
|
|
41216
|
+
});
|
|
41217
|
+
}
|
|
41218
|
+
if (optionIndex === -1 && focusedOptionIndex === -1) {
|
|
41219
|
+
optionIndex = findFirstFocusedOptionIndex();
|
|
41220
|
+
}
|
|
41221
|
+
if (optionIndex !== -1) {
|
|
41222
|
+
changeFocusedOptionIndex(event, optionIndex);
|
|
41223
|
+
}
|
|
41224
|
+
}
|
|
41225
|
+
if (searchTimeout.current) {
|
|
41226
|
+
clearTimeout(searchTimeout.current);
|
|
41227
|
+
}
|
|
41228
|
+
searchTimeout.current = setTimeout(function () {
|
|
41229
|
+
searchValue.current = '';
|
|
41230
|
+
searchTimeout.current = null;
|
|
41231
|
+
}, 500);
|
|
41232
|
+
};
|
|
41233
|
+
var changeFocusedOptionIndex = function changeFocusedOptionIndex(event, index) {
|
|
41234
|
+
if (focusedOptionIndex !== index) {
|
|
41235
|
+
setFocusedOptionIndex(index);
|
|
41236
|
+
scrollInView();
|
|
41237
|
+
if (props.selectOnFocus) {
|
|
41238
|
+
onOptionSelect(event, visibleOptions[index], false);
|
|
41239
|
+
}
|
|
41240
|
+
}
|
|
41241
|
+
};
|
|
40394
41242
|
var removeChip = function removeChip(event, item) {
|
|
40395
41243
|
var value = props.value.filter(function (val) {
|
|
40396
41244
|
return !ObjectUtils.equals(val, item, equalityKey);
|
|
@@ -40531,6 +41379,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
40531
41379
|
setTimeout(function () {
|
|
40532
41380
|
props.overlayVisible ? show() : hide();
|
|
40533
41381
|
}, 100);
|
|
41382
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
40534
41383
|
}, [props.overlayVisible]);
|
|
40535
41384
|
useUpdateEffect(function () {
|
|
40536
41385
|
if (overlayVisibleState && filterState && hasFilter) {
|
|
@@ -40615,11 +41464,31 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
40615
41464
|
role: 'listbox',
|
|
40616
41465
|
'aria-expanded': overlayVisibleState,
|
|
40617
41466
|
disabled: props.disabled,
|
|
40618
|
-
tabIndex: props.tabIndex
|
|
41467
|
+
tabIndex: !props.disabled ? props.tabIndex : -1
|
|
40619
41468
|
}, ariaProps), ptm('input'));
|
|
41469
|
+
var firstHiddenElementProps = mergeProps({
|
|
41470
|
+
ref: firstHiddenFocusableElementOnOverlay,
|
|
41471
|
+
role: 'presentation',
|
|
41472
|
+
'aria-hidden': true,
|
|
41473
|
+
className: 'p-hidden-accessible p-hidden-focusable',
|
|
41474
|
+
tabIndex: '0',
|
|
41475
|
+
onFocus: onFirstHiddenFocus,
|
|
41476
|
+
'data-p-hidden-accessible': true,
|
|
41477
|
+
'data-p-hidden-focusable': true
|
|
41478
|
+
}, ptm('hiddenFirstFocusableEl'));
|
|
41479
|
+
var lastHiddenElementProps = mergeProps({
|
|
41480
|
+
ref: lastHiddenFocusableElementOnOverlay,
|
|
41481
|
+
role: 'presentation',
|
|
41482
|
+
'aria-hidden': true,
|
|
41483
|
+
className: 'p-hidden-accessible p-hidden-focusable',
|
|
41484
|
+
tabIndex: '0',
|
|
41485
|
+
onFocus: onLastHiddenFocus,
|
|
41486
|
+
'data-p-hidden-accessible': true,
|
|
41487
|
+
'data-p-hidden-focusable': true
|
|
41488
|
+
}, ptm('hiddenLastFocusableEl'));
|
|
40620
41489
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", rootProps, /*#__PURE__*/React__namespace.createElement("div", hiddenInputWrapperProps, /*#__PURE__*/React__namespace.createElement("input", _extends({}, inputProps, {
|
|
40621
41490
|
readOnly: true
|
|
40622
|
-
}))), !props.inline && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, label, clearIcon, triggerIcon), /*#__PURE__*/React__namespace.createElement(MultiSelectPanel, _extends({
|
|
41491
|
+
}))), !props.inline && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, label, clearIcon, triggerIcon), /*#__PURE__*/React__namespace.createElement("span", firstHiddenElementProps), /*#__PURE__*/React__namespace.createElement(MultiSelectPanel, _extends({
|
|
40623
41492
|
hostName: "MultiSelect",
|
|
40624
41493
|
ref: overlayRef,
|
|
40625
41494
|
visibleOptions: visibleOptions
|
|
@@ -40627,6 +41496,8 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
40627
41496
|
onClick: onPanelClick,
|
|
40628
41497
|
onOverlayHide: hide,
|
|
40629
41498
|
filterValue: filterState,
|
|
41499
|
+
focusedOptionIndex: focusedOptionIndex,
|
|
41500
|
+
setFocusedOptionIndex: setFocusedOptionIndex,
|
|
40630
41501
|
hasFilter: hasFilter,
|
|
40631
41502
|
onFilterInputChange: onFilterInputChange,
|
|
40632
41503
|
resetFilter: resetFilter,
|
|
@@ -40643,7 +41514,6 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
40643
41514
|
isAllSelected: isAllSelected,
|
|
40644
41515
|
onOptionSelect: onOptionSelect,
|
|
40645
41516
|
allowOptionSelect: allowOptionSelect,
|
|
40646
|
-
onOptionKeyDown: onOptionKeyDown,
|
|
40647
41517
|
"in": overlayVisibleState,
|
|
40648
41518
|
onEnter: onOverlayEnter,
|
|
40649
41519
|
onEntered: onOverlayEntered,
|
|
@@ -40654,7 +41524,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
40654
41524
|
sx: sx,
|
|
40655
41525
|
isUnstyled: isUnstyled,
|
|
40656
41526
|
metaData: metaData
|
|
40657
|
-
}))), hasTooltip && /*#__PURE__*/React__namespace.createElement(Tooltip, _extends({
|
|
41527
|
+
})), /*#__PURE__*/React__namespace.createElement("span", lastHiddenElementProps)), hasTooltip && /*#__PURE__*/React__namespace.createElement(Tooltip, _extends({
|
|
40658
41528
|
target: elementRef,
|
|
40659
41529
|
content: props.tooltip
|
|
40660
41530
|
}, props.tooltipOptions, {
|
|
@@ -40859,7 +41729,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
40859
41729
|
var otherProps = MultiStateCheckboxBase.getOtherProps(props);
|
|
40860
41730
|
var ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
|
|
40861
41731
|
var icon = createIcon();
|
|
40862
|
-
var ariaValueLabel = !!selectedOption ? getOptionAriaLabel(selectedOption) : ariaLabel
|
|
41732
|
+
var ariaValueLabel = !!selectedOption ? getOptionAriaLabel(selectedOption) : ariaLabel('nullLabel');
|
|
40863
41733
|
var ariaChecked = !!selectedOption ? 'true' : 'false';
|
|
40864
41734
|
var rootProps = mergeProps({
|
|
40865
41735
|
ref: elementRef,
|
|
@@ -41068,7 +41938,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
41068
41938
|
icon: moveUpIcon,
|
|
41069
41939
|
onClick: moveUp,
|
|
41070
41940
|
disabled: isMoveDisabled,
|
|
41071
|
-
'aria-label': ariaLabel
|
|
41941
|
+
'aria-label': ariaLabel('moveUp'),
|
|
41072
41942
|
__parentMetadata: {
|
|
41073
41943
|
parent: props.metaData
|
|
41074
41944
|
}
|
|
@@ -41079,7 +41949,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
41079
41949
|
icon: moveTopIcon,
|
|
41080
41950
|
onClick: moveTop,
|
|
41081
41951
|
disabled: isMoveDisabled,
|
|
41082
|
-
'aria-label': ariaLabel
|
|
41952
|
+
'aria-label': ariaLabel('moveTop'),
|
|
41083
41953
|
__parentMetadata: {
|
|
41084
41954
|
parent: props.metaData
|
|
41085
41955
|
}
|
|
@@ -41090,7 +41960,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
41090
41960
|
icon: moveDownIcon,
|
|
41091
41961
|
onClick: moveDown,
|
|
41092
41962
|
disabled: isMoveDisabled,
|
|
41093
|
-
'aria-label': ariaLabel
|
|
41963
|
+
'aria-label': ariaLabel('moveDown'),
|
|
41094
41964
|
__parentMetadata: {
|
|
41095
41965
|
parent: props.metaData
|
|
41096
41966
|
}
|
|
@@ -41101,7 +41971,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
41101
41971
|
icon: moveBottomIcon,
|
|
41102
41972
|
onClick: moveBottom,
|
|
41103
41973
|
disabled: isMoveDisabled,
|
|
41104
|
-
'aria-label': ariaLabel
|
|
41974
|
+
'aria-label': ariaLabel('moveBottom'),
|
|
41105
41975
|
__parentMetadata: {
|
|
41106
41976
|
parent: props.metaData
|
|
41107
41977
|
}
|
|
@@ -42879,7 +43749,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
42879
43749
|
tabIndex: '-1',
|
|
42880
43750
|
'aria-hidden': true
|
|
42881
43751
|
}, getPTOptions(processedItem, 'action', index));
|
|
42882
|
-
var content = /*#__PURE__*/React__namespace.createElement("a", actionProps, submenuIcon, icon, label);
|
|
43752
|
+
var content = /*#__PURE__*/React__namespace.createElement("a", actionProps, submenuIcon, icon, label, /*#__PURE__*/React__namespace.createElement(Ripple, null));
|
|
42883
43753
|
if (item.template) {
|
|
42884
43754
|
var defaultContentOptions = {
|
|
42885
43755
|
className: linkClassName,
|
|
@@ -44062,17 +44932,19 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
44062
44932
|
var hideIconProps = mergeProps(ptm('hideIcon'));
|
|
44063
44933
|
var showIconProps = mergeProps(ptm('showIcon'));
|
|
44064
44934
|
if (unmaskedState) {
|
|
44065
|
-
icon = props.hideIcon || /*#__PURE__*/React__namespace.createElement(EyeSlashIcon, hideIconProps
|
|
44935
|
+
icon = props.hideIcon || /*#__PURE__*/React__namespace.createElement(EyeSlashIcon, _extends({}, hideIconProps, {
|
|
44936
|
+
onClick: toggleMask
|
|
44937
|
+
}));
|
|
44066
44938
|
} else {
|
|
44067
|
-
icon = props.showIcon || /*#__PURE__*/React__namespace.createElement(EyeIcon, showIconProps
|
|
44939
|
+
icon = props.showIcon || /*#__PURE__*/React__namespace.createElement(EyeIcon, _extends({}, showIconProps, {
|
|
44940
|
+
onClick: toggleMask
|
|
44941
|
+
}));
|
|
44068
44942
|
}
|
|
44069
44943
|
var eyeIcon = IconUtils.getJSXIcon(icon, unmaskedState ? _objectSpread$x({}, hideIconProps) : _objectSpread$x({}, showIconProps), {
|
|
44070
44944
|
props: props
|
|
44071
44945
|
});
|
|
44072
44946
|
if (props.toggleMask) {
|
|
44073
|
-
var content =
|
|
44074
|
-
onClick: toggleMask
|
|
44075
|
-
}, " ", eyeIcon, " ");
|
|
44947
|
+
var content = eyeIcon;
|
|
44076
44948
|
if (props.icon) {
|
|
44077
44949
|
var defaultIconOptions = {
|
|
44078
44950
|
onClick: toggleMask,
|
|
@@ -44391,7 +45263,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
44391
45263
|
onClick: moveUp,
|
|
44392
45264
|
pt: ptm('moveUpButton'),
|
|
44393
45265
|
unstyled: unstyled,
|
|
44394
|
-
"aria-label": ariaLabel
|
|
45266
|
+
"aria-label": ariaLabel('moveUp'),
|
|
44395
45267
|
__parentMetadata: {
|
|
44396
45268
|
parent: props.metaData
|
|
44397
45269
|
}
|
|
@@ -44402,7 +45274,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
44402
45274
|
onClick: moveTop,
|
|
44403
45275
|
pt: ptm('moveTopButton'),
|
|
44404
45276
|
unstyled: unstyled,
|
|
44405
|
-
"aria-label": ariaLabel
|
|
45277
|
+
"aria-label": ariaLabel('moveTop'),
|
|
44406
45278
|
__parentMetadata: {
|
|
44407
45279
|
parent: props.metaData
|
|
44408
45280
|
}
|
|
@@ -44413,7 +45285,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
44413
45285
|
onClick: moveDown,
|
|
44414
45286
|
pt: ptm('moveDownButton'),
|
|
44415
45287
|
unstyled: unstyled,
|
|
44416
|
-
"aria-label": ariaLabel
|
|
45288
|
+
"aria-label": ariaLabel('moveDown'),
|
|
44417
45289
|
__parentMetadata: {
|
|
44418
45290
|
parent: props.metaData
|
|
44419
45291
|
}
|
|
@@ -44424,7 +45296,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
44424
45296
|
onClick: moveBottom,
|
|
44425
45297
|
pt: ptm('moveBottomButton'),
|
|
44426
45298
|
unstyled: unstyled,
|
|
44427
|
-
"aria-label": ariaLabel
|
|
45299
|
+
"aria-label": ariaLabel('moveBottom'),
|
|
44428
45300
|
__parentMetadata: {
|
|
44429
45301
|
parent: props.metaData
|
|
44430
45302
|
}
|
|
@@ -44768,7 +45640,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
44768
45640
|
onClick: moveRight,
|
|
44769
45641
|
pt: ptm('moveToTargetButton'),
|
|
44770
45642
|
unstyled: unstyled,
|
|
44771
|
-
"aria-label": ariaLabel
|
|
45643
|
+
"aria-label": ariaLabel('moveToTarget'),
|
|
44772
45644
|
__parentMetadata: {
|
|
44773
45645
|
parent: props.metaData
|
|
44774
45646
|
}
|
|
@@ -44779,7 +45651,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
44779
45651
|
onClick: moveAllRight,
|
|
44780
45652
|
pt: ptm('moveAllToTargetButton'),
|
|
44781
45653
|
unstyled: unstyled,
|
|
44782
|
-
"aria-label": ariaLabel
|
|
45654
|
+
"aria-label": ariaLabel('moveAllToTarget'),
|
|
44783
45655
|
__parentMetadata: {
|
|
44784
45656
|
parent: props.metaData
|
|
44785
45657
|
}
|
|
@@ -44790,7 +45662,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
44790
45662
|
onClick: moveLeft,
|
|
44791
45663
|
pt: ptm('moveToSourceButton'),
|
|
44792
45664
|
unstyled: unstyled,
|
|
44793
|
-
"aria-label": ariaLabel
|
|
45665
|
+
"aria-label": ariaLabel('moveToSource'),
|
|
44794
45666
|
__parentMetadata: {
|
|
44795
45667
|
parent: props.metaData
|
|
44796
45668
|
}
|
|
@@ -44801,7 +45673,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
44801
45673
|
onClick: moveAllLeft,
|
|
44802
45674
|
pt: ptm('moveAllToSourceButton'),
|
|
44803
45675
|
unstyled: unstyled,
|
|
44804
|
-
"aria-label": ariaLabel
|
|
45676
|
+
"aria-label": ariaLabel('moveAllToSource'),
|
|
44805
45677
|
__parentMetadata: {
|
|
44806
45678
|
parent: props.metaData
|
|
44807
45679
|
}
|
|
@@ -45739,6 +46611,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
45739
46611
|
onFocus: onFocus,
|
|
45740
46612
|
onBlur: onBlur,
|
|
45741
46613
|
onKeyDown: onKeyDown,
|
|
46614
|
+
checked: props.checked,
|
|
45742
46615
|
disabled: props.disabled,
|
|
45743
46616
|
required: props.required,
|
|
45744
46617
|
tabIndex: props.tabIndex
|
|
@@ -45769,9 +46642,14 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
45769
46642
|
var classes$l = {
|
|
45770
46643
|
onIcon: 'p-rating-icon',
|
|
45771
46644
|
item: function item(_ref) {
|
|
45772
|
-
var active = _ref.active
|
|
46645
|
+
var active = _ref.active,
|
|
46646
|
+
value = _ref.value,
|
|
46647
|
+
isFocusVisibleItem = _ref.isFocusVisibleItem,
|
|
46648
|
+
focusedOptionIndex = _ref.focusedOptionIndex;
|
|
45773
46649
|
return classNames('p-rating-item', {
|
|
45774
46650
|
'p-rating-item-active': active
|
|
46651
|
+
}, {
|
|
46652
|
+
'p-focus': value === focusedOptionIndex && isFocusVisibleItem
|
|
45775
46653
|
});
|
|
45776
46654
|
},
|
|
45777
46655
|
cancelIcon: 'p-rating-icon p-rating-cancel',
|
|
@@ -45819,6 +46697,14 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
45819
46697
|
var mergeProps = useMergeProps();
|
|
45820
46698
|
var context = React__namespace.useContext(PrimeReactContext);
|
|
45821
46699
|
var props = RatingBase.getProps(inProps, context);
|
|
46700
|
+
var _React$useState = React__namespace.useState(-1),
|
|
46701
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
46702
|
+
focusedOptionIndex = _React$useState2[0],
|
|
46703
|
+
setFocusedOptionIndex = _React$useState2[1];
|
|
46704
|
+
var _React$useState3 = React__namespace.useState(true),
|
|
46705
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
46706
|
+
isFocusVisibleItem = _React$useState4[0];
|
|
46707
|
+
_React$useState4[1];
|
|
45822
46708
|
var elementRef = React__namespace.useRef(null);
|
|
45823
46709
|
var _RatingBase$setMetaDa = RatingBase.setMetaData({
|
|
45824
46710
|
props: props
|
|
@@ -45856,6 +46742,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
45856
46742
|
}
|
|
45857
46743
|
});
|
|
45858
46744
|
}
|
|
46745
|
+
setFocusedOptionIndex(i);
|
|
45859
46746
|
event.preventDefault();
|
|
45860
46747
|
};
|
|
45861
46748
|
var clear = function clear(event) {
|
|
@@ -45879,10 +46766,30 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
45879
46766
|
event.preventDefault();
|
|
45880
46767
|
};
|
|
45881
46768
|
var onStarKeyDown = function onStarKeyDown(event, value) {
|
|
45882
|
-
|
|
45883
|
-
|
|
46769
|
+
switch (event.key) {
|
|
46770
|
+
case 'Enter':
|
|
46771
|
+
case 'Space':
|
|
46772
|
+
rate(event, value);
|
|
46773
|
+
event.preventDefault();
|
|
46774
|
+
break;
|
|
46775
|
+
case 'ArrowLeft':
|
|
46776
|
+
case 'ArrowUp':
|
|
46777
|
+
event.preventDefault();
|
|
46778
|
+
rate(event, props.value - 1 < 1 ? props.stars : props.value - 1);
|
|
46779
|
+
break;
|
|
46780
|
+
case 'ArrowRight':
|
|
46781
|
+
case 'ArrowDown':
|
|
46782
|
+
event.preventDefault();
|
|
46783
|
+
rate(event, props.value + 1 > props.stars ? 1 : props.value + 1);
|
|
46784
|
+
break;
|
|
45884
46785
|
}
|
|
45885
46786
|
};
|
|
46787
|
+
var _onFocus = function onFocus(event, value) {
|
|
46788
|
+
setFocusedOptionIndex(value);
|
|
46789
|
+
};
|
|
46790
|
+
var _onBlur = function onBlur(event) {
|
|
46791
|
+
setFocusedOptionIndex(-1);
|
|
46792
|
+
};
|
|
45886
46793
|
var onCancelKeyDown = function onCancelKeyDown(event) {
|
|
45887
46794
|
if (event.key === 'Enter') {
|
|
45888
46795
|
clear(event);
|
|
@@ -45912,14 +46819,24 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
45912
46819
|
var itemProps = mergeProps({
|
|
45913
46820
|
key: value,
|
|
45914
46821
|
className: cx('item', {
|
|
45915
|
-
active: active
|
|
46822
|
+
active: active,
|
|
46823
|
+
focusedOptionIndex: focusedOptionIndex,
|
|
46824
|
+
isFocusVisibleItem: isFocusVisibleItem,
|
|
46825
|
+
value: value
|
|
45916
46826
|
}),
|
|
46827
|
+
'data-p-focused': value === focusedOptionIndex,
|
|
45917
46828
|
tabIndex: tabIndex,
|
|
45918
46829
|
onClick: function onClick(e) {
|
|
45919
46830
|
return rate(e, value);
|
|
45920
46831
|
},
|
|
45921
46832
|
onKeyDown: function onKeyDown(e) {
|
|
45922
46833
|
return onStarKeyDown(e, value);
|
|
46834
|
+
},
|
|
46835
|
+
onFocus: function onFocus(e) {
|
|
46836
|
+
return _onFocus(e, value);
|
|
46837
|
+
},
|
|
46838
|
+
onBlur: function onBlur(e) {
|
|
46839
|
+
return _onBlur();
|
|
45923
46840
|
}
|
|
45924
46841
|
}, getPTOptions(props.value, 'item'));
|
|
45925
46842
|
return /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
@@ -46528,7 +47445,8 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
46528
47445
|
}
|
|
46529
47446
|
});
|
|
46530
47447
|
};
|
|
46531
|
-
var
|
|
47448
|
+
var _onClick = function onClick(event, index) {
|
|
47449
|
+
props.setFocusedIndex(index);
|
|
46532
47450
|
if (props.onClick) {
|
|
46533
47451
|
props.onClick({
|
|
46534
47452
|
originalEvent: event,
|
|
@@ -46542,13 +47460,46 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
46542
47460
|
var onBlur = function onBlur() {
|
|
46543
47461
|
setFocusedState(false);
|
|
46544
47462
|
};
|
|
46545
|
-
var
|
|
46546
|
-
|
|
46547
|
-
|
|
46548
|
-
|
|
46549
|
-
|
|
47463
|
+
var _onKeyDown = function onKeyDown(event, index) {
|
|
47464
|
+
switch (event.code) {
|
|
47465
|
+
case 'Space':
|
|
47466
|
+
{
|
|
47467
|
+
_onClick(event, index);
|
|
47468
|
+
event.preventDefault();
|
|
47469
|
+
break;
|
|
47470
|
+
}
|
|
47471
|
+
case 'ArrowDown':
|
|
47472
|
+
case 'ArrowRight':
|
|
47473
|
+
{
|
|
47474
|
+
changeTabIndexes(event, 'next');
|
|
47475
|
+
event.preventDefault();
|
|
47476
|
+
break;
|
|
47477
|
+
}
|
|
47478
|
+
case 'ArrowUp':
|
|
47479
|
+
case 'ArrowLeft':
|
|
47480
|
+
{
|
|
47481
|
+
changeTabIndexes(event, 'prev');
|
|
47482
|
+
event.preventDefault();
|
|
47483
|
+
break;
|
|
47484
|
+
}
|
|
46550
47485
|
}
|
|
46551
47486
|
};
|
|
47487
|
+
var changeTabIndexes = function changeTabIndexes(event, direction) {
|
|
47488
|
+
var firstTabableChild, index;
|
|
47489
|
+
for (var i = 0; i <= props.elementRef.current.children.length - 1; i++) {
|
|
47490
|
+
if (props.elementRef.current.children[i].getAttribute('tabindex') === '0') firstTabableChild = {
|
|
47491
|
+
elem: props.elementRef.current.children[i],
|
|
47492
|
+
index: i
|
|
47493
|
+
};
|
|
47494
|
+
}
|
|
47495
|
+
if (direction === 'prev') {
|
|
47496
|
+
if (firstTabableChild.index === 0) index = props.elementRef.current.children.length - 1;else index = firstTabableChild.index - 1;
|
|
47497
|
+
} else {
|
|
47498
|
+
if (firstTabableChild.index === props.elementRef.current.children.length - 1) index = 0;else index = firstTabableChild.index + 1;
|
|
47499
|
+
}
|
|
47500
|
+
props.setFocusedIndex(index);
|
|
47501
|
+
props.elementRef.current.children[index].focus();
|
|
47502
|
+
};
|
|
46552
47503
|
var createContent = function createContent() {
|
|
46553
47504
|
var labelProps = mergeProps({
|
|
46554
47505
|
className: cx('label')
|
|
@@ -46564,9 +47515,14 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
46564
47515
|
role: 'button',
|
|
46565
47516
|
'aria-label': props.label,
|
|
46566
47517
|
'aria-pressed': props.selected,
|
|
46567
|
-
onClick: onClick
|
|
46568
|
-
|
|
47518
|
+
onClick: function onClick(event) {
|
|
47519
|
+
return _onClick(event, props.index);
|
|
47520
|
+
},
|
|
47521
|
+
onKeyDown: function onKeyDown(event) {
|
|
47522
|
+
return _onKeyDown(event, props.index);
|
|
47523
|
+
},
|
|
46569
47524
|
tabIndex: props.tabIndex,
|
|
47525
|
+
'aria-disabled': props.disabled,
|
|
46570
47526
|
onFocus: onFocus,
|
|
46571
47527
|
onBlur: onBlur
|
|
46572
47528
|
}, getPTOptions('button'));
|
|
@@ -46578,6 +47534,10 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
46578
47534
|
var mergeProps = useMergeProps();
|
|
46579
47535
|
var context = React__namespace.useContext(PrimeReactContext);
|
|
46580
47536
|
var props = SelectButtonBase.getProps(inProps, context);
|
|
47537
|
+
var _React$useState = React__namespace.useState(0),
|
|
47538
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
47539
|
+
focusedIndex = _React$useState2[0],
|
|
47540
|
+
setFocusedIndex = _React$useState2[1];
|
|
46581
47541
|
var elementRef = React__namespace.useRef(null);
|
|
46582
47542
|
var _SelectButtonBase$set = SelectButtonBase.setMetaData({
|
|
46583
47543
|
props: props
|
|
@@ -46650,7 +47610,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
46650
47610
|
return props.options.map(function (option, index) {
|
|
46651
47611
|
var isDisabled = props.disabled || isOptionDisabled(option);
|
|
46652
47612
|
var optionLabel = getOptionLabel(option);
|
|
46653
|
-
var tabIndex =
|
|
47613
|
+
var tabIndex = index === focusedIndex ? '0' : '-1';
|
|
46654
47614
|
var selected = isSelected(option);
|
|
46655
47615
|
var key = optionLabel + '_' + index;
|
|
46656
47616
|
return /*#__PURE__*/React__namespace.createElement(SelectButtonItem, {
|
|
@@ -46659,13 +47619,16 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
46659
47619
|
label: optionLabel,
|
|
46660
47620
|
className: option.className,
|
|
46661
47621
|
option: option,
|
|
47622
|
+
setFocusedIndex: setFocusedIndex,
|
|
46662
47623
|
onClick: onOptionClick,
|
|
46663
47624
|
template: props.itemTemplate,
|
|
46664
47625
|
selected: selected,
|
|
46665
47626
|
tabIndex: tabIndex,
|
|
47627
|
+
index: index,
|
|
46666
47628
|
disabled: isDisabled,
|
|
46667
47629
|
ptm: ptm,
|
|
46668
|
-
cx: cx
|
|
47630
|
+
cx: cx,
|
|
47631
|
+
elementRef: elementRef
|
|
46669
47632
|
});
|
|
46670
47633
|
});
|
|
46671
47634
|
}
|
|
@@ -47757,10 +48720,31 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
47757
48720
|
}
|
|
47758
48721
|
handleIndex.current = index;
|
|
47759
48722
|
var key = event.key;
|
|
47760
|
-
|
|
47761
|
-
|
|
47762
|
-
|
|
47763
|
-
|
|
48723
|
+
switch (key) {
|
|
48724
|
+
case 'ArrowRight':
|
|
48725
|
+
case 'ArrowUp':
|
|
48726
|
+
spin(event, 1);
|
|
48727
|
+
break;
|
|
48728
|
+
case 'ArrowLeft':
|
|
48729
|
+
case 'ArrowDown':
|
|
48730
|
+
spin(event, -1);
|
|
48731
|
+
break;
|
|
48732
|
+
case 'PageUp':
|
|
48733
|
+
spin(event, 10);
|
|
48734
|
+
event.preventDefault();
|
|
48735
|
+
break;
|
|
48736
|
+
case 'PageDown':
|
|
48737
|
+
spin(event, -10);
|
|
48738
|
+
event.preventDefault();
|
|
48739
|
+
break;
|
|
48740
|
+
case 'Home':
|
|
48741
|
+
spin(event, -value);
|
|
48742
|
+
event.preventDefault();
|
|
48743
|
+
break;
|
|
48744
|
+
case 'End':
|
|
48745
|
+
spin(event, props.max);
|
|
48746
|
+
event.preventDefault();
|
|
48747
|
+
break;
|
|
47764
48748
|
}
|
|
47765
48749
|
};
|
|
47766
48750
|
var onBarClick = function onBarClick(event) {
|
|
@@ -49963,6 +50947,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
49963
50947
|
var panelSize = function panelSize(sizes, index) {
|
|
49964
50948
|
return index in sizes ? sizes[index] : props.children && [].concat(props.children)[index].props.size || 100 / childrenLength;
|
|
49965
50949
|
};
|
|
50950
|
+
var horizontal = props.layout === 'horizontal';
|
|
49966
50951
|
var metaData = {
|
|
49967
50952
|
props: props,
|
|
49968
50953
|
state: {
|
|
@@ -50057,10 +51042,9 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
50057
51042
|
if (stateString) setPanelSizes(JSON.parse(stateString));
|
|
50058
51043
|
}, [getStorage, props.stateKey]);
|
|
50059
51044
|
var onResizeStart = function onResizeStart(event, index, isKeyDown) {
|
|
50060
|
-
gutterRef.current = gutterRefs.current[index];
|
|
50061
51045
|
var pageX = event.type === 'touchstart' ? event.touches[0].pageX : event.pageX;
|
|
50062
51046
|
var pageY = event.type === 'touchstart' ? event.touches[0].pageY : event.pageY;
|
|
50063
|
-
|
|
51047
|
+
gutterRef.current = gutterRefs.current[index];
|
|
50064
51048
|
size.current = horizontal ? DomHandler.getWidth(elementRef.current) : DomHandler.getHeight(elementRef.current);
|
|
50065
51049
|
dragging.current = true;
|
|
50066
51050
|
startPos.current = horizontal ? pageX : pageY;
|
|
@@ -50085,7 +51069,6 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
50085
51069
|
var step = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
50086
51070
|
var isKeyDown = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
50087
51071
|
var newPos, newNextPanelSize, newPrevPanelSize;
|
|
50088
|
-
var horizontal = props.layout === 'horizontal';
|
|
50089
51072
|
var pageX = event.type === 'touchmove' ? event.touches[0].pageX : event.pageX;
|
|
50090
51073
|
var pageY = event.type === 'touchmove' ? event.touches[0].pageY : event.pageY;
|
|
50091
51074
|
if (isKeyDown) {
|
|
@@ -50135,7 +51118,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
50135
51118
|
switch (event.code) {
|
|
50136
51119
|
case 'ArrowLeft':
|
|
50137
51120
|
{
|
|
50138
|
-
if (
|
|
51121
|
+
if (horizontal) {
|
|
50139
51122
|
setTimer(event, index, props.step * -1);
|
|
50140
51123
|
}
|
|
50141
51124
|
event.preventDefault();
|
|
@@ -50143,7 +51126,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
50143
51126
|
}
|
|
50144
51127
|
case 'ArrowRight':
|
|
50145
51128
|
{
|
|
50146
|
-
if (
|
|
51129
|
+
if (horizontal) {
|
|
50147
51130
|
setTimer(event, index, props.step);
|
|
50148
51131
|
}
|
|
50149
51132
|
event.preventDefault();
|
|
@@ -50151,7 +51134,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
50151
51134
|
}
|
|
50152
51135
|
case 'ArrowDown':
|
|
50153
51136
|
{
|
|
50154
|
-
if (
|
|
51137
|
+
if (!horizontal) {
|
|
50155
51138
|
setTimer(event, index, props.step * -1);
|
|
50156
51139
|
}
|
|
50157
51140
|
event.preventDefault();
|
|
@@ -50159,7 +51142,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
50159
51142
|
}
|
|
50160
51143
|
case 'ArrowUp':
|
|
50161
51144
|
{
|
|
50162
|
-
if (
|
|
51145
|
+
if (!horizontal) {
|
|
50163
51146
|
setTimer(event, index, props.step);
|
|
50164
51147
|
}
|
|
50165
51148
|
event.preventDefault();
|
|
@@ -50179,7 +51162,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
50179
51162
|
}
|
|
50180
51163
|
case 'Enter':
|
|
50181
51164
|
{
|
|
50182
|
-
if (prevSize.current >
|
|
51165
|
+
if (prevSize.current > 100 - (minSize || 5)) {
|
|
50183
51166
|
resizePanel(index, minSize, 100);
|
|
50184
51167
|
} else {
|
|
50185
51168
|
resizePanel(index, 100, minSize);
|
|
@@ -50208,14 +51191,16 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
50208
51191
|
onResize(event, step, true);
|
|
50209
51192
|
};
|
|
50210
51193
|
var setTimer = function setTimer(event, index, step) {
|
|
50211
|
-
|
|
50212
|
-
|
|
50213
|
-
|
|
50214
|
-
|
|
51194
|
+
if (!timer.current) {
|
|
51195
|
+
timer.current = setInterval(function () {
|
|
51196
|
+
repeat(event, index, step);
|
|
51197
|
+
}, 40);
|
|
51198
|
+
}
|
|
50215
51199
|
};
|
|
50216
51200
|
var clearTimer = function clearTimer() {
|
|
50217
51201
|
if (timer.current) {
|
|
50218
|
-
|
|
51202
|
+
clearInterval(timer.current);
|
|
51203
|
+
timer.current = null;
|
|
50219
51204
|
}
|
|
50220
51205
|
};
|
|
50221
51206
|
var onGutterMouseDown = function onGutterMouseDown(event, index) {
|
|
@@ -50276,7 +51261,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
50276
51261
|
return gutterRefs.current[index] = el;
|
|
50277
51262
|
},
|
|
50278
51263
|
className: cx('gutter'),
|
|
50279
|
-
style:
|
|
51264
|
+
style: horizontal ? {
|
|
50280
51265
|
width: props.gutterSize + 'px'
|
|
50281
51266
|
} : {
|
|
50282
51267
|
height: props.gutterSize + 'px'
|
|
@@ -50303,7 +51288,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
50303
51288
|
var gutterHandlerProps = mergeProps({
|
|
50304
51289
|
tabIndex: getPanelProp(panel, 'tabIndex') || 0,
|
|
50305
51290
|
className: cx('gutterHandler'),
|
|
50306
|
-
'aria-orientation':
|
|
51291
|
+
'aria-orientation': horizontal ? 'vertical' : 'horizontal',
|
|
50307
51292
|
'aria-controls': panelId,
|
|
50308
51293
|
'aria-label': getPanelProp(panel, 'aria-label'),
|
|
50309
51294
|
'aria-labelledby': getPanelProp(panel, 'aria-labelledby'),
|
|
@@ -51239,8 +52224,10 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
51239
52224
|
var TabPanelBase = ComponentBase.extend({
|
|
51240
52225
|
defaultProps: {
|
|
51241
52226
|
__TYPE: 'TabPanel',
|
|
52227
|
+
children: undefined,
|
|
51242
52228
|
className: null,
|
|
51243
52229
|
closable: false,
|
|
52230
|
+
closeIcon: null,
|
|
51244
52231
|
contentClassName: null,
|
|
51245
52232
|
contentStyle: null,
|
|
51246
52233
|
disabled: false,
|
|
@@ -51249,12 +52236,11 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
51249
52236
|
headerStyle: null,
|
|
51250
52237
|
headerTemplate: null,
|
|
51251
52238
|
leftIcon: null,
|
|
51252
|
-
rightIcon: null,
|
|
51253
|
-
prevButton: null,
|
|
51254
52239
|
nextButton: null,
|
|
51255
|
-
|
|
52240
|
+
prevButton: null,
|
|
52241
|
+
rightIcon: null,
|
|
51256
52242
|
style: null,
|
|
51257
|
-
|
|
52243
|
+
visible: true
|
|
51258
52244
|
},
|
|
51259
52245
|
getCProp: function getCProp(tab, name) {
|
|
51260
52246
|
return ObjectUtils.getComponentProp(tab, name, TabPanelBase.defaultProps);
|
|
@@ -51348,7 +52334,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
51348
52334
|
return TabPanelBase.getCProp(tab, name);
|
|
51349
52335
|
};
|
|
51350
52336
|
var shouldUseTab = function shouldUseTab(tab) {
|
|
51351
|
-
return tab && ObjectUtils.isValidChild(tab, 'TabPanel') && hiddenTabsState.every(function (_i) {
|
|
52337
|
+
return tab && getTabProp(tab, 'visible') && ObjectUtils.isValidChild(tab, 'TabPanel') && hiddenTabsState.every(function (_i) {
|
|
51352
52338
|
return _i !== tab.key;
|
|
51353
52339
|
});
|
|
51354
52340
|
};
|
|
@@ -51766,7 +52752,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
51766
52752
|
ref: prevBtnRef,
|
|
51767
52753
|
type: 'button',
|
|
51768
52754
|
className: cx('prevbutton'),
|
|
51769
|
-
'aria-label': ariaLabel
|
|
52755
|
+
'aria-label': ariaLabel('previousPageLabel'),
|
|
51770
52756
|
onClick: function onClick(e) {
|
|
51771
52757
|
return navBackward();
|
|
51772
52758
|
}
|
|
@@ -51788,7 +52774,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
51788
52774
|
ref: nextBtnRef,
|
|
51789
52775
|
type: 'button',
|
|
51790
52776
|
className: cx('nextbutton'),
|
|
51791
|
-
'aria-label': ariaLabel
|
|
52777
|
+
'aria-label': ariaLabel('nextPageLabel'),
|
|
51792
52778
|
onClick: function onClick(e) {
|
|
51793
52779
|
return navForward();
|
|
51794
52780
|
}
|
|
@@ -52626,14 +53612,13 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
52626
53612
|
function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
52627
53613
|
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
52628
53614
|
var ToggleButton = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
53615
|
+
var context = React__namespace.useContext(PrimeReactContext);
|
|
53616
|
+
var props = ToggleButtonBase.getProps(inProps, context);
|
|
53617
|
+
var elementRef = React__namespace.useRef(null);
|
|
52629
53618
|
var _React$useState = React__namespace.useState(false),
|
|
52630
53619
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
52631
53620
|
focusedState = _React$useState2[0],
|
|
52632
53621
|
setFocusedState = _React$useState2[1];
|
|
52633
|
-
var mergeProps = useMergeProps();
|
|
52634
|
-
var context = React__namespace.useContext(PrimeReactContext);
|
|
52635
|
-
var props = ToggleButtonBase.getProps(inProps, context);
|
|
52636
|
-
var elementRef = React__namespace.useRef(null);
|
|
52637
53622
|
var _ToggleButtonBase$set = ToggleButtonBase.setMetaData({
|
|
52638
53623
|
props: props,
|
|
52639
53624
|
state: {
|
|
@@ -52669,6 +53654,12 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
52669
53654
|
});
|
|
52670
53655
|
}
|
|
52671
53656
|
};
|
|
53657
|
+
var onKeyDown = function onKeyDown(event) {
|
|
53658
|
+
if (event.keyCode === 32) {
|
|
53659
|
+
toggle(event);
|
|
53660
|
+
event.preventDefault();
|
|
53661
|
+
}
|
|
53662
|
+
};
|
|
52672
53663
|
var onFocus = function onFocus(event) {
|
|
52673
53664
|
setFocusedState(true);
|
|
52674
53665
|
props.onFocus && props.onFocus(event);
|
|
@@ -52677,12 +53668,6 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
52677
53668
|
setFocusedState(false);
|
|
52678
53669
|
props.onBlur && props.onBlur(event);
|
|
52679
53670
|
};
|
|
52680
|
-
var onKeyDown = function onKeyDown(event) {
|
|
52681
|
-
if (event.keyCode === 32) {
|
|
52682
|
-
toggle(event);
|
|
52683
|
-
event.preventDefault();
|
|
52684
|
-
}
|
|
52685
|
-
};
|
|
52686
53671
|
var createIcon = function createIcon() {
|
|
52687
53672
|
if (hasIcon) {
|
|
52688
53673
|
var iconProps = mergeProps({
|
|
@@ -52732,7 +53717,9 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
52732
53717
|
onKeyDown: onKeyDown,
|
|
52733
53718
|
tabIndex: tabIndex,
|
|
52734
53719
|
role: 'button',
|
|
52735
|
-
'aria-pressed': props.checked
|
|
53720
|
+
'aria-pressed': props.checked,
|
|
53721
|
+
'data-p-highlight': props.checked,
|
|
53722
|
+
'data-p-disabled': props.disabled
|
|
52736
53723
|
}, ToggleButtonBase.getOtherProps(props), ptm('root'));
|
|
52737
53724
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", rootProps, iconElement, /*#__PURE__*/React__namespace.createElement("span", labelProps, label), /*#__PURE__*/React__namespace.createElement(Ripple, null)), hasTooltip && /*#__PURE__*/React__namespace.createElement(Tooltip, _extends({
|
|
52738
53725
|
target: elementRef,
|
|
@@ -55998,7 +56985,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
55998
56985
|
return props.selectionKeys ? props.selectionKeys[props.node.key] && props.selectionKeys[props.node.key].partialChecked : false;
|
|
55999
56986
|
};
|
|
56000
56987
|
var createToggler = function createToggler(column) {
|
|
56001
|
-
var label = expanded ? ariaLabel
|
|
56988
|
+
var label = expanded ? ariaLabel('collapseLabel') : ariaLabel('expandLabel');
|
|
56002
56989
|
var rowTogglerIconProps = mergeProps({
|
|
56003
56990
|
className: cx('rowTogglerIcon'),
|
|
56004
56991
|
'aria-hidden': true
|
|
@@ -58239,7 +59226,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
58239
59226
|
setFocusedState(false);
|
|
58240
59227
|
};
|
|
58241
59228
|
var onKeyDown = function onKeyDown(e) {
|
|
58242
|
-
if (e.
|
|
59229
|
+
if (e.code === 'Enter' || e.code === 'Space') {
|
|
58243
59230
|
toggle(e);
|
|
58244
59231
|
e.preventDefault();
|
|
58245
59232
|
}
|
|
@@ -58278,7 +59265,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
58278
59265
|
var checkIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, checkIconProps), {
|
|
58279
59266
|
props: props
|
|
58280
59267
|
});
|
|
58281
|
-
var ariaValueLabel = props.value ? ariaLabel
|
|
59268
|
+
var ariaValueLabel = props.value ? ariaLabel('trueLabel') : props.value === false ? ariaLabel('falseLabel') : ariaLabel('nullLabel');
|
|
58282
59269
|
var ariaChecked = props.value ? 'true' : 'false';
|
|
58283
59270
|
var checkboxProps = mergeProps(_objectSpread({
|
|
58284
59271
|
className: cx('checkbox', {
|
|
@@ -58298,7 +59285,8 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
58298
59285
|
var rootProps = mergeProps({
|
|
58299
59286
|
className: classNames(props.className, cx('root')),
|
|
58300
59287
|
style: props.style,
|
|
58301
|
-
onClick: onClick
|
|
59288
|
+
onClick: onClick,
|
|
59289
|
+
'data-p-disabled': props.disabled
|
|
58302
59290
|
}, TriStateCheckboxBase.getOtherProps(props), ptm('root'));
|
|
58303
59291
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
58304
59292
|
id: props.id,
|
|
@@ -58479,7 +59467,7 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
|
|
|
58479
59467
|
exports.ZIndexUtils = ZIndexUtils;
|
|
58480
59468
|
exports._mergeProps = _mergeProps;
|
|
58481
59469
|
exports.addLocale = addLocale;
|
|
58482
|
-
exports.ariaLabel = ariaLabel
|
|
59470
|
+
exports.ariaLabel = ariaLabel;
|
|
58483
59471
|
exports.classNames = classNames;
|
|
58484
59472
|
exports.confirmDialog = confirmDialog;
|
|
58485
59473
|
exports.confirmPopup = confirmPopup;
|