primereact 9.6.0 → 9.6.2
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 +7 -5
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +7 -5
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +7 -5
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +8 -8
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +9 -9
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +8 -8
- package/carousel/carousel.min.js +1 -1
- package/core/core.js +9 -11
- package/core/core.min.js +2 -2
- package/datatable/datatable.cjs.js +37 -24
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +119 -27
- package/datatable/datatable.esm.js +37 -24
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +37 -24
- package/datatable/datatable.min.js +1 -1
- package/dropdown/dropdown.cjs.js +1 -0
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +1 -0
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +1 -0
- package/dropdown/dropdown.min.js +1 -1
- package/fileupload/fileupload.cjs.js +2 -5
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +2 -5
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +2 -5
- package/fileupload/fileupload.min.js +1 -1
- package/package.json +1 -1
- package/primereact.all.cjs.js +65 -54
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +65 -54
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +65 -54
- package/primereact.all.min.js +1 -1
- package/resources/primereact.css +612 -612
- package/resources/primereact.min.css +1 -1
- package/slider/slider.cjs.js +2 -1
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +2 -1
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +2 -1
- package/slider/slider.min.js +1 -1
- package/tooltip/tooltip.cjs.js +1 -1
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +1 -1
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/utils/utils.cjs.js +7 -10
- package/utils/utils.esm.js +7 -10
- package/utils/utils.js +7 -10
- package/web-types.json +1 -1
package/primereact.all.esm.js
CHANGED
|
@@ -202,16 +202,7 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
202
202
|
}
|
|
203
203
|
_createClass(DomHandler, null, [{
|
|
204
204
|
key: "innerWidth",
|
|
205
|
-
value:
|
|
206
|
-
/**
|
|
207
|
-
* All data- properties like data-test-id
|
|
208
|
-
*/
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* All ARIA properties like aria-label and focus-target for https://www.npmjs.com/package/@q42/floating-focus-a11y
|
|
212
|
-
*/
|
|
213
|
-
|
|
214
|
-
function innerWidth(el) {
|
|
205
|
+
value: function innerWidth(el) {
|
|
215
206
|
if (el) {
|
|
216
207
|
var width = el.offsetWidth;
|
|
217
208
|
var style = getComputedStyle(el);
|
|
@@ -1257,7 +1248,13 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
1257
1248
|
}]);
|
|
1258
1249
|
return DomHandler;
|
|
1259
1250
|
}();
|
|
1251
|
+
/**
|
|
1252
|
+
* All data- properties like data-test-id
|
|
1253
|
+
*/
|
|
1260
1254
|
_defineProperty(DomHandler, "DATA_PROPS", ['data-']);
|
|
1255
|
+
/**
|
|
1256
|
+
* All ARIA properties like aria-label and focus-target for https://www.npmjs.com/package/@q42/floating-focus-a11y
|
|
1257
|
+
*/
|
|
1261
1258
|
_defineProperty(DomHandler, "ARIA_PROPS", ['aria', 'focus-target']);
|
|
1262
1259
|
|
|
1263
1260
|
var ConnectedOverlayScrollHandler = /*#__PURE__*/function () {
|
|
@@ -6059,7 +6056,7 @@ var Tooltip = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (i
|
|
|
6059
6056
|
return _onMouseEnter();
|
|
6060
6057
|
},
|
|
6061
6058
|
onMouseLeave: function onMouseLeave(e) {
|
|
6062
|
-
return _onMouseLeave;
|
|
6059
|
+
return _onMouseLeave(e);
|
|
6063
6060
|
}
|
|
6064
6061
|
}, TooltipBase.getOtherProps(props), ptm('root'));
|
|
6065
6062
|
var arrowProps = mergeProps({
|
|
@@ -8787,7 +8784,6 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
8787
8784
|
}
|
|
8788
8785
|
};
|
|
8789
8786
|
var onInputBlur = function onInputBlur(event) {
|
|
8790
|
-
setFocusedState(false);
|
|
8791
8787
|
!props.keepInvalid && updateInputfield(props.value);
|
|
8792
8788
|
props.onBlur && props.onBlur(event);
|
|
8793
8789
|
};
|
|
@@ -9878,6 +9874,7 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
9878
9874
|
}
|
|
9879
9875
|
};
|
|
9880
9876
|
var show = function show(type) {
|
|
9877
|
+
setFocusedState(false);
|
|
9881
9878
|
if (props.onVisibleChange) {
|
|
9882
9879
|
props.onVisibleChange({
|
|
9883
9880
|
visible: true,
|
|
@@ -10770,7 +10767,7 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
10770
10767
|
}, 200);
|
|
10771
10768
|
}
|
|
10772
10769
|
});
|
|
10773
|
-
|
|
10770
|
+
React.useEffect(function () {
|
|
10774
10771
|
var unbindMaskEvents = null;
|
|
10775
10772
|
if (props.mask) {
|
|
10776
10773
|
unbindMaskEvents = mask(inputRef.current, {
|
|
@@ -10788,7 +10785,8 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
10788
10785
|
return function () {
|
|
10789
10786
|
props.mask && unbindMaskEvents && unbindMaskEvents();
|
|
10790
10787
|
};
|
|
10791
|
-
|
|
10788
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
10789
|
+
}, [props.disabled, props.mask, props.readOnlyInput]);
|
|
10792
10790
|
useUpdateEffect(function () {
|
|
10793
10791
|
setCurrentView(props.view);
|
|
10794
10792
|
}, [props.view]);
|
|
@@ -11584,12 +11582,13 @@ var Calendar = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
11584
11582
|
var monthPicker = createMonthPicker();
|
|
11585
11583
|
var yearPicker = createYearPicker();
|
|
11586
11584
|
var rootProps = mergeProps({
|
|
11587
|
-
ref: elementRef,
|
|
11588
11585
|
id: props.id,
|
|
11589
11586
|
className: className,
|
|
11590
11587
|
style: props.style
|
|
11591
11588
|
}, CalendarBase.getOtherProps(props), ptm('root'));
|
|
11592
|
-
return /*#__PURE__*/React.createElement("span",
|
|
11589
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
|
11590
|
+
ref: elementRef
|
|
11591
|
+
}, rootProps), content, /*#__PURE__*/React.createElement(CalendarPanel, {
|
|
11593
11592
|
ref: overlayRef,
|
|
11594
11593
|
className: panelClassName,
|
|
11595
11594
|
style: props.panelStyle,
|
|
@@ -11898,7 +11897,7 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
11898
11897
|
}
|
|
11899
11898
|
};
|
|
11900
11899
|
var changePageOnTouch = function changePageOnTouch(e, diff) {
|
|
11901
|
-
if (Math.abs(diff) > swipeThreshold) {
|
|
11900
|
+
if (Math.abs(diff) > swipeThreshold.current) {
|
|
11902
11901
|
if (diff < 0) {
|
|
11903
11902
|
// left
|
|
11904
11903
|
navForward(e);
|
|
@@ -11972,7 +11971,6 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
11972
11971
|
attributeSelector.current = UniqueComponentId();
|
|
11973
11972
|
elementRef.current.setAttribute(attributeSelector.current, '');
|
|
11974
11973
|
}
|
|
11975
|
-
createStyle();
|
|
11976
11974
|
calculatePosition();
|
|
11977
11975
|
changePosition(totalShiftedItemsState);
|
|
11978
11976
|
bindWindowResizeListener();
|
|
@@ -11980,6 +11978,7 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
11980
11978
|
useUpdateEffect(function () {
|
|
11981
11979
|
var stateChanged = false;
|
|
11982
11980
|
var totalShiftedItems = totalShiftedItemsState;
|
|
11981
|
+
createStyle();
|
|
11983
11982
|
if (props.autoplayInterval) {
|
|
11984
11983
|
stopAutoplay();
|
|
11985
11984
|
}
|
|
@@ -12031,12 +12030,12 @@ var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (
|
|
|
12031
12030
|
if (!stateChanged && isAutoplay) {
|
|
12032
12031
|
startAutoplay();
|
|
12033
12032
|
}
|
|
12034
|
-
|
|
12035
|
-
|
|
12036
|
-
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12033
|
+
return function () {
|
|
12034
|
+
if (props.autoplayInterval) {
|
|
12035
|
+
stopAutoplay();
|
|
12036
|
+
}
|
|
12037
|
+
destroyStyle();
|
|
12038
|
+
};
|
|
12040
12039
|
});
|
|
12041
12040
|
var createItems = function createItems() {
|
|
12042
12041
|
if (props.value && props.value.length) {
|
|
@@ -17833,6 +17832,7 @@ var DropdownPanel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(funct
|
|
|
17833
17832
|
var style = {
|
|
17834
17833
|
height: scrollerOptions.props ? scrollerOptions.props.itemSize : undefined
|
|
17835
17834
|
};
|
|
17835
|
+
style = _objectSpread$13(_objectSpread$13({}, style), option.style);
|
|
17836
17836
|
if (props.optionGroupLabel) {
|
|
17837
17837
|
var groupContent = props.optionGroupTemplate ? ObjectUtils.getJSXElement(props.optionGroupTemplate, option, index) : props.getOptionGroupLabel(option);
|
|
17838
17838
|
var groupChildrenContent = createGroupChildren(option, style);
|
|
@@ -19389,7 +19389,6 @@ var RowRadioButton = /*#__PURE__*/React.memo(function (props) {
|
|
|
19389
19389
|
}, getColumnPTOptions('hiddenInputWrapper'));
|
|
19390
19390
|
var hiddenInputProps = mergeProps({
|
|
19391
19391
|
name: name,
|
|
19392
|
-
ref: inputRef,
|
|
19393
19392
|
type: 'radio',
|
|
19394
19393
|
checked: props.checked,
|
|
19395
19394
|
onFocus: function onFocus(e) {
|
|
@@ -19417,7 +19416,9 @@ var RowRadioButton = /*#__PURE__*/React.memo(function (props) {
|
|
|
19417
19416
|
var radiobuttonIconProps = mergeProps({
|
|
19418
19417
|
className: 'p-radiobutton-icon'
|
|
19419
19418
|
}, getColumnPTOptions('radiobuttonIcon'));
|
|
19420
|
-
return /*#__PURE__*/React.createElement("div", radiobuttonWrapperProps, /*#__PURE__*/React.createElement("div", hiddenInputWrapperProps, /*#__PURE__*/React.createElement("input",
|
|
19419
|
+
return /*#__PURE__*/React.createElement("div", radiobuttonWrapperProps, /*#__PURE__*/React.createElement("div", hiddenInputWrapperProps, /*#__PURE__*/React.createElement("input", _extends({
|
|
19420
|
+
ref: inputRef
|
|
19421
|
+
}, hiddenInputProps))), /*#__PURE__*/React.createElement("div", radiobuttonProps, /*#__PURE__*/React.createElement("div", radiobuttonIconProps)));
|
|
19421
19422
|
});
|
|
19422
19423
|
RowRadioButton.displayName = 'RowRadioButton';
|
|
19423
19424
|
|
|
@@ -20110,7 +20111,6 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
20110
20111
|
if (!isRowEditor && editor) {
|
|
20111
20112
|
var editorKeyHelperProps = mergeProps({
|
|
20112
20113
|
tabIndex: '0',
|
|
20113
|
-
ref: keyHelperRef,
|
|
20114
20114
|
className: 'p-cell-editor-key-helper p-hidden-accessible',
|
|
20115
20115
|
onFocus: function onFocus(e) {
|
|
20116
20116
|
return onEditorFocus(e);
|
|
@@ -20118,12 +20118,13 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
20118
20118
|
}, getColumnPTOptions('editorKeyHelperLabel'));
|
|
20119
20119
|
var editorKeyHelperLabelProps = mergeProps(getColumnPTOptions('editorKeyHelper'));
|
|
20120
20120
|
/* eslint-disable */
|
|
20121
|
-
editorKeyHelper = /*#__PURE__*/React.createElement("a",
|
|
20121
|
+
editorKeyHelper = /*#__PURE__*/React.createElement("a", _extends({
|
|
20122
|
+
ref: keyHelperRef
|
|
20123
|
+
}, editorKeyHelperProps), /*#__PURE__*/React.createElement("span", editorKeyHelperLabelProps));
|
|
20122
20124
|
/* eslint-enable */
|
|
20123
20125
|
}
|
|
20124
20126
|
|
|
20125
20127
|
var bodyCellProps = mergeProps({
|
|
20126
|
-
ref: elementRef,
|
|
20127
20128
|
style: style,
|
|
20128
20129
|
className: className,
|
|
20129
20130
|
rowSpan: props.rowSpan,
|
|
@@ -20145,7 +20146,9 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
20145
20146
|
return _onMouseUp(e);
|
|
20146
20147
|
}
|
|
20147
20148
|
}, getColumnPTOptions('bodyCell'), getColumnPTOptions('root'));
|
|
20148
|
-
return /*#__PURE__*/React.createElement("td",
|
|
20149
|
+
return /*#__PURE__*/React.createElement("td", _extends({
|
|
20150
|
+
ref: elementRef
|
|
20151
|
+
}, bodyCellProps), editorKeyHelper, title, content);
|
|
20149
20152
|
};
|
|
20150
20153
|
return getVirtualScrollerOption('loading') ? createLoading() : createElement();
|
|
20151
20154
|
});
|
|
@@ -21577,11 +21580,12 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
21577
21580
|
var content = props.empty ? createEmptyContent() : createContent();
|
|
21578
21581
|
var ptKey = props.className === 'p-datatable-virtualscroller-spacer' ? 'virtualScrollerSpacer' : 'tbody';
|
|
21579
21582
|
var tbodyProps = mergeProps({
|
|
21580
|
-
ref: refCallback,
|
|
21581
21583
|
style: props.style,
|
|
21582
21584
|
className: props.className
|
|
21583
21585
|
}, getColumnPTOptions(ptKey));
|
|
21584
|
-
return /*#__PURE__*/React.createElement("tbody",
|
|
21586
|
+
return /*#__PURE__*/React.createElement("tbody", _extends({
|
|
21587
|
+
ref: refCallback
|
|
21588
|
+
}, tbodyProps), content);
|
|
21585
21589
|
}));
|
|
21586
21590
|
TableBody.displayName = 'TableBody';
|
|
21587
21591
|
|
|
@@ -21677,14 +21681,15 @@ var FooterCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
21677
21681
|
props: props.tableProps
|
|
21678
21682
|
});
|
|
21679
21683
|
var footerCellProps = mergeProps({
|
|
21680
|
-
ref: elementRef,
|
|
21681
21684
|
style: style,
|
|
21682
21685
|
className: className,
|
|
21683
21686
|
role: 'cell',
|
|
21684
21687
|
colSpan: colSpan,
|
|
21685
21688
|
rowSpan: rowSpan
|
|
21686
21689
|
}, getColumnPTOptions('footerCell'), getColumnPTOptions('root'));
|
|
21687
|
-
return /*#__PURE__*/React.createElement("td",
|
|
21690
|
+
return /*#__PURE__*/React.createElement("td", _extends({
|
|
21691
|
+
ref: elementRef
|
|
21692
|
+
}, footerCellProps), content);
|
|
21688
21693
|
});
|
|
21689
21694
|
FooterCell.displayName = 'FooterCell';
|
|
21690
21695
|
|
|
@@ -22223,7 +22228,6 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
22223
22228
|
});
|
|
22224
22229
|
var label = filterLabel();
|
|
22225
22230
|
var filterMenuButtonProps = mergeProps({
|
|
22226
|
-
ref: iconRef,
|
|
22227
22231
|
type: 'button',
|
|
22228
22232
|
className: _className,
|
|
22229
22233
|
'aria-haspopup': true,
|
|
@@ -22236,7 +22240,9 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
22236
22240
|
},
|
|
22237
22241
|
'aria-label': label
|
|
22238
22242
|
}, getColumnPTOptions('filterMenuButton'));
|
|
22239
|
-
return /*#__PURE__*/React.createElement("button",
|
|
22243
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
22244
|
+
ref: iconRef
|
|
22245
|
+
}, filterMenuButtonProps), columnFilterIcon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
22240
22246
|
}
|
|
22241
22247
|
return null;
|
|
22242
22248
|
};
|
|
@@ -22465,7 +22471,6 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
22465
22471
|
});
|
|
22466
22472
|
var items = props.display === 'row' ? createRowItems() : createItems();
|
|
22467
22473
|
var filterOverlayProps = mergeProps({
|
|
22468
|
-
ref: overlayRef,
|
|
22469
22474
|
style: style,
|
|
22470
22475
|
className: className,
|
|
22471
22476
|
onKeyDown: function onKeyDown(e) {
|
|
@@ -22491,7 +22496,9 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
22491
22496
|
onEntered: onOverlayEntered,
|
|
22492
22497
|
onExit: onOverlayExit,
|
|
22493
22498
|
onExited: onOverlayExited
|
|
22494
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
22499
|
+
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
22500
|
+
ref: overlayRef
|
|
22501
|
+
}, filterOverlayProps), filterHeader, items, filterFooter)));
|
|
22495
22502
|
};
|
|
22496
22503
|
var className = classNames('p-column-filter p-fluid', {
|
|
22497
22504
|
'p-column-filter-row': props.display === 'row',
|
|
@@ -22905,7 +22912,6 @@ var HeaderCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
22905
22912
|
var resizer = createResizer();
|
|
22906
22913
|
var header = createHeader(sortMeta);
|
|
22907
22914
|
var headerCellProps = mergeProps({
|
|
22908
|
-
ref: elementRef,
|
|
22909
22915
|
className: className,
|
|
22910
22916
|
style: style,
|
|
22911
22917
|
role: 'columnheader',
|
|
@@ -22935,7 +22941,9 @@ var HeaderCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
22935
22941
|
rowSpan: rowSpan,
|
|
22936
22942
|
'aria-sort': ariaSort
|
|
22937
22943
|
}, getColumnPTOptions('headerCell'), getColumnPTOptions('root'));
|
|
22938
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("th",
|
|
22944
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("th", _extends({
|
|
22945
|
+
ref: elementRef
|
|
22946
|
+
}, headerCellProps), resizer, header), hasTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
22939
22947
|
target: elementRef,
|
|
22940
22948
|
content: headerTooltip
|
|
22941
22949
|
}, headerTooltipOptions, {
|
|
@@ -24346,7 +24354,10 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
24346
24354
|
return data;
|
|
24347
24355
|
};
|
|
24348
24356
|
useMountEffect(function () {
|
|
24349
|
-
|
|
24357
|
+
if (elementRef.current) {
|
|
24358
|
+
attributeSelector.current = UniqueComponentId();
|
|
24359
|
+
elementRef.current.setAttribute(attributeSelector.current, '');
|
|
24360
|
+
}
|
|
24350
24361
|
|
|
24351
24362
|
//setFiltersState(cloneFilters(props.filters)); // Github #4248
|
|
24352
24363
|
setD_filtersState(cloneFilters(props.filters));
|
|
@@ -24358,7 +24369,6 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
24358
24369
|
}
|
|
24359
24370
|
});
|
|
24360
24371
|
useUpdateEffect(function () {
|
|
24361
|
-
elementRef.current.setAttribute(attributeSelector.current, '');
|
|
24362
24372
|
if (props.responsiveLayout === 'stack' && !props.scrollable) {
|
|
24363
24373
|
createResponsiveStyle();
|
|
24364
24374
|
}
|
|
@@ -24698,13 +24708,14 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
24698
24708
|
var _isVirtualScrollerDisabled = isVirtualScrollerDisabled();
|
|
24699
24709
|
var virtualScrollerOptions = props.virtualScrollerOptions || {};
|
|
24700
24710
|
var wrapperProps = mergeProps({
|
|
24701
|
-
ref: wrapperRef,
|
|
24702
24711
|
className: 'p-datatable-wrapper',
|
|
24703
24712
|
style: {
|
|
24704
24713
|
maxHeight: _isVirtualScrollerDisabled ? props.scrollHeight : null
|
|
24705
24714
|
}
|
|
24706
24715
|
}, ptCallbacks.ptm('wrapper'));
|
|
24707
|
-
return /*#__PURE__*/React.createElement("div",
|
|
24716
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
24717
|
+
ref: wrapperRef
|
|
24718
|
+
}, wrapperProps), /*#__PURE__*/React.createElement(VirtualScroller, _extends({
|
|
24708
24719
|
ref: virtualScrollerRef
|
|
24709
24720
|
}, virtualScrollerOptions, {
|
|
24710
24721
|
items: processedData,
|
|
@@ -24788,13 +24799,14 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
24788
24799
|
var createResizeHelper = function createResizeHelper() {
|
|
24789
24800
|
if (props.resizableColumns) {
|
|
24790
24801
|
var resizeHelperProps = mergeProps({
|
|
24791
|
-
ref: resizeHelperRef,
|
|
24792
24802
|
className: 'p-column-resizer-helper',
|
|
24793
24803
|
style: {
|
|
24794
24804
|
display: 'none'
|
|
24795
24805
|
}
|
|
24796
24806
|
}, ptCallbacks.ptm('resizeHelper'));
|
|
24797
|
-
return /*#__PURE__*/React.createElement("div",
|
|
24807
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
24808
|
+
ref: resizeHelperRef
|
|
24809
|
+
}, resizeHelperProps));
|
|
24798
24810
|
}
|
|
24799
24811
|
return null;
|
|
24800
24812
|
};
|
|
@@ -24860,13 +24872,14 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
24860
24872
|
var resizeHelper = createResizeHelper();
|
|
24861
24873
|
var reorderIndicators = createReorderIndicators();
|
|
24862
24874
|
var rootProps = mergeProps({
|
|
24863
|
-
ref: elementRef,
|
|
24864
24875
|
id: props.id,
|
|
24865
24876
|
className: className,
|
|
24866
24877
|
style: props.style,
|
|
24867
24878
|
'data-scrollselectors': '.p-datatable-wrapper'
|
|
24868
24879
|
}, DataTableBase.getOtherProps(props), ptCallbacks.ptm('root'));
|
|
24869
|
-
return /*#__PURE__*/React.createElement("div",
|
|
24880
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
24881
|
+
ref: elementRef
|
|
24882
|
+
}, rootProps), loader, header, paginatorTop, content, paginatorBottom, footer, resizeHelper, reorderIndicators);
|
|
24870
24883
|
});
|
|
24871
24884
|
DataTable.displayName = 'DataTable';
|
|
24872
24885
|
|
|
@@ -26414,14 +26427,11 @@ var FileUpload = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
26414
26427
|
duplicateIEEvent.current = false;
|
|
26415
26428
|
return;
|
|
26416
26429
|
}
|
|
26417
|
-
var currentFiles = [];
|
|
26418
|
-
if (props.multiple) {
|
|
26419
|
-
currentFiles = filesState ? _toConsumableArray(filesState) : [];
|
|
26420
|
-
}
|
|
26430
|
+
var currentFiles = filesState && props.multiple ? _toConsumableArray(filesState) : [];
|
|
26421
26431
|
var selectedFiles = event.dataTransfer ? event.dataTransfer.files : event.target.files;
|
|
26422
26432
|
for (var i = 0; i < selectedFiles.length; i++) {
|
|
26423
26433
|
var file = selectedFiles[i];
|
|
26424
|
-
if (!isFileSelected(file) && validate(file)) {
|
|
26434
|
+
if ((!props.multiple || !isFileSelected(file)) && validate(file)) {
|
|
26425
26435
|
if (isImage(file)) {
|
|
26426
26436
|
file.objectURL = window.URL.createObjectURL(file);
|
|
26427
26437
|
}
|
|
@@ -37828,9 +37838,10 @@ var Slider = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (in
|
|
|
37828
37838
|
var onDragEnd = function onDragEnd(event) {
|
|
37829
37839
|
if (dragging.current) {
|
|
37830
37840
|
dragging.current = false;
|
|
37841
|
+
var newValue = setValue(event);
|
|
37831
37842
|
props.onSlideEnd && props.onSlideEnd({
|
|
37832
37843
|
originalEvent: event,
|
|
37833
|
-
value:
|
|
37844
|
+
value: newValue
|
|
37834
37845
|
});
|
|
37835
37846
|
unbindDocumentMouseMoveListener();
|
|
37836
37847
|
unbindDocumentMouseUpListener();
|