primereact 10.9.4 → 10.9.6
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/api/api.cjs.js +9 -1
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +5 -3
- package/api/api.esm.js +9 -1
- package/api/api.esm.min.js +1 -1
- package/api/api.js +9 -1
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +13 -1
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +5 -5
- package/autocomplete/autocomplete.esm.js +14 -2
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +13 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +2 -1
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +2 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +2 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/calendar.cjs.js +37 -7
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +38 -8
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +37 -7
- package/calendar/calendar.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +62 -5
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +22 -0
- package/cascadeselect/cascadeselect.esm.js +63 -6
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +63 -7
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/checkbox.cjs.js +1 -1
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +1 -1
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +1 -1
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +15 -2
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +17 -4
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +15 -2
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +1 -1
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +1 -1
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -1
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +9 -2
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +9 -2
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +9 -2
- package/colorpicker/colorpicker.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +10 -2
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +10 -2
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +10 -2
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/core/core.js +214 -38
- package/core/core.min.js +9 -9
- package/datatable/datatable.cjs.js +359 -291
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +79 -3
- package/datatable/datatable.esm.js +360 -292
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +359 -291
- package/datatable/datatable.min.js +1 -1
- package/dialog/dialog.cjs.js +3 -2
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +6 -1
- package/dialog/dialog.esm.js +3 -2
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +3 -2
- package/dialog/dialog.min.js +1 -1
- package/dropdown/dropdown.cjs.js +26 -5
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +4 -0
- package/dropdown/dropdown.esm.js +26 -5
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +26 -5
- package/dropdown/dropdown.min.js +1 -1
- package/fileupload/fileupload.cjs.js +4 -2
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +4 -2
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +4 -2
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +1 -0
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +1 -0
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +1 -0
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +16 -6
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +16 -6
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +16 -6
- package/hooks/hooks.min.js +1 -1
- package/inputmask/inputmask.cjs.js +1 -1
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +1 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +1 -1
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +11 -3
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +11 -3
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +11 -3
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputotp/inputotp.cjs.js +1 -0
- package/inputotp/inputotp.cjs.min.js +1 -1
- package/inputotp/inputotp.esm.js +1 -0
- package/inputotp/inputotp.esm.min.js +1 -1
- package/inputotp/inputotp.js +1 -0
- package/inputotp/inputotp.min.js +1 -1
- package/listbox/listbox.d.ts +4 -4
- package/mention/mention.cjs.js +18 -9
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +5 -0
- package/mention/mention.esm.js +18 -9
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +18 -9
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +14 -3
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +15 -4
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +14 -3
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +6 -9
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +6 -9
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +6 -9
- package/menubar/menubar.min.js +1 -1
- package/multiselect/multiselect.cjs.js +68 -18
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +68 -18
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +68 -18
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +17 -9
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +17 -9
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +17 -9
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +34 -3
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +34 -3
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +34 -3
- package/orderlist/orderlist.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +9 -10
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +9 -10
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +9 -10
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +9 -1
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +9 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +9 -1
- package/paginator/paginator.min.js +1 -1
- package/password/password.cjs.js +9 -2
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +10 -3
- package/password/password.esm.min.js +1 -1
- package/password/password.js +9 -2
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +9 -1
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +9 -1
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +9 -1
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +931 -442
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +932 -443
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +931 -442
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +2 -2
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +1 -1
- package/radiobutton/radiobutton.esm.js +2 -2
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +2 -2
- package/radiobutton/radiobutton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +9 -2
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +10 -3
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +9 -2
- package/slidemenu/slidemenu.min.js +1 -1
- package/tree/tree.cjs.js +1 -1
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +1 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +1 -1
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +19 -8
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +33 -0
- package/treeselect/treeselect.esm.js +19 -8
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +19 -8
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +1 -1
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +1 -1
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +1 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +7 -6
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +7 -6
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +7 -6
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +138 -18
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +5 -1
- package/utils/utils.esm.js +138 -18
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +138 -18
- package/utils/utils.min.js +1 -1
- package/web-types.json +105 -11
package/primereact.all.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import React__default, { useState, useEffect, useContext, useRef, Children, cloneElement } from 'react';
|
|
3
|
+
import React__default, { useState, useEffect, useContext, useRef, Fragment, Children, cloneElement } from 'react';
|
|
4
4
|
import { CSSTransition as CSSTransition$1, TransitionGroup } from 'react-transition-group';
|
|
5
5
|
import ReactDOM from 'react-dom';
|
|
6
6
|
|
|
@@ -127,6 +127,7 @@ var FilterMatchMode = Object.freeze({
|
|
|
127
127
|
EQUALS: 'equals',
|
|
128
128
|
NOT_EQUALS: 'notEquals',
|
|
129
129
|
IN: 'in',
|
|
130
|
+
NOT_IN: 'notIn',
|
|
130
131
|
LESS_THAN: 'lt',
|
|
131
132
|
LESS_THAN_OR_EQUAL_TO: 'lte',
|
|
132
133
|
GREATER_THAN: 'gt',
|
|
@@ -566,11 +567,18 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
566
567
|
element.style.transformOrigin = 'top';
|
|
567
568
|
}
|
|
568
569
|
var targetOffsetPx = targetOffset.left;
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
570
|
+
if (align === 'left') {
|
|
571
|
+
if (targetOffsetPx + elementOuterWidth > viewport.width) {
|
|
572
|
+
left = Math.max(0, targetOffsetPx + windowScrollLeft + targetOuterWidth - elementOuterWidth);
|
|
573
|
+
} else {
|
|
574
|
+
left = targetOffsetPx + windowScrollLeft;
|
|
575
|
+
}
|
|
572
576
|
} else {
|
|
573
|
-
|
|
577
|
+
if (targetOffsetPx + targetOuterWidth - elementOuterWidth < 0) {
|
|
578
|
+
left = windowScrollLeft;
|
|
579
|
+
} else {
|
|
580
|
+
left = targetOffsetPx + targetOuterWidth - elementOuterWidth + windowScrollLeft;
|
|
581
|
+
}
|
|
574
582
|
}
|
|
575
583
|
element.style.top = top + 'px';
|
|
576
584
|
element.style.left = left + 'px';
|
|
@@ -779,13 +787,12 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
779
787
|
/**
|
|
780
788
|
* Gets all scrollable parent elements of a given element
|
|
781
789
|
* @param {HTMLElement} element - The element to find scrollable parents for
|
|
782
|
-
* @param {boolean} hideOverlaysOnDocumentScrolling - Whether to include window/document level scrolling
|
|
783
790
|
* @returns {Array} Array of scrollable parent elements
|
|
784
791
|
*/
|
|
785
792
|
}, {
|
|
786
793
|
key: "getScrollableParents",
|
|
787
794
|
value: function getScrollableParents(element) {
|
|
788
|
-
var
|
|
795
|
+
var _this3 = this;
|
|
789
796
|
var scrollableParents = [];
|
|
790
797
|
if (element) {
|
|
791
798
|
// Get all parent elements
|
|
@@ -808,10 +815,8 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
808
815
|
* @param {HTMLElement} node - Element to add
|
|
809
816
|
*/
|
|
810
817
|
var addScrollableParent = function addScrollableParent(node) {
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
scrollableParents.push(node.nodeName === 'BODY' || node.nodeName === 'HTML' || node.nodeType === 9 ? window : node);
|
|
814
|
-
}
|
|
818
|
+
// For document/body/html elements, add window instead
|
|
819
|
+
scrollableParents.push(node.nodeName === 'BODY' || node.nodeName === 'HTML' || _this3.isDocument(node) ? window : node);
|
|
815
820
|
};
|
|
816
821
|
|
|
817
822
|
// Iterate through all parent elements
|
|
@@ -855,13 +860,6 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
855
860
|
_iterator.f();
|
|
856
861
|
}
|
|
857
862
|
}
|
|
858
|
-
|
|
859
|
-
// Ensure window/body is always included as fallback
|
|
860
|
-
if (!scrollableParents.some(function (node) {
|
|
861
|
-
return node === document.body || node === window;
|
|
862
|
-
})) {
|
|
863
|
-
scrollableParents.push(hideOverlaysOnDocumentScrolling ? window : document.body);
|
|
864
|
-
}
|
|
865
863
|
return scrollableParents;
|
|
866
864
|
}
|
|
867
865
|
}, {
|
|
@@ -1001,6 +999,11 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
1001
999
|
value: function isElement(obj) {
|
|
1002
1000
|
return (typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement)) === 'object' ? obj instanceof HTMLElement : obj && _typeof(obj) === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string';
|
|
1003
1001
|
}
|
|
1002
|
+
}, {
|
|
1003
|
+
key: "isDocument",
|
|
1004
|
+
value: function isDocument(obj) {
|
|
1005
|
+
return (typeof Document === "undefined" ? "undefined" : _typeof(Document)) === 'object' ? obj instanceof Document : obj && _typeof(obj) === 'object' && obj !== null && obj.nodeType === 9;
|
|
1006
|
+
}
|
|
1004
1007
|
}, {
|
|
1005
1008
|
key: "scrollInView",
|
|
1006
1009
|
value: function scrollInView(container, item) {
|
|
@@ -1338,7 +1341,7 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
1338
1341
|
return !!(obj && obj.constructor && obj.call && obj.apply);
|
|
1339
1342
|
};
|
|
1340
1343
|
var element = isFunction(target) ? target() : target;
|
|
1341
|
-
return element
|
|
1344
|
+
return this.isDocument(element) || this.isExist(element) ? element : null;
|
|
1342
1345
|
}
|
|
1343
1346
|
|
|
1344
1347
|
/**
|
|
@@ -2041,6 +2044,124 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
2041
2044
|
obj = obj[fields[i]];
|
|
2042
2045
|
}
|
|
2043
2046
|
}
|
|
2047
|
+
|
|
2048
|
+
/**
|
|
2049
|
+
* This helper function takes an object and a dot-separated key path. It traverses the object based on the path,
|
|
2050
|
+
* returning the value at the specified depth. If any part of the path is missing or undefined, it returns undefined.
|
|
2051
|
+
*
|
|
2052
|
+
* Example:
|
|
2053
|
+
* const obj = { name: 'Alice', address: { city: 'Wonderland', zip: 12345 } };
|
|
2054
|
+
* const path = 'address.city';
|
|
2055
|
+
* const result = ObjectUtils.getNestedValue(obj, path);
|
|
2056
|
+
* console.log(result); // Output: "Wonderland"
|
|
2057
|
+
*
|
|
2058
|
+
* @param {object} obj - The object to traverse.
|
|
2059
|
+
* @param {string} path - The dot-separated key path.
|
|
2060
|
+
* @returns {*} The value at the specified depth, or undefined if any part of the path is missing or undefined.
|
|
2061
|
+
*/
|
|
2062
|
+
}, {
|
|
2063
|
+
key: "getNestedValue",
|
|
2064
|
+
value: function getNestedValue(obj, path) {
|
|
2065
|
+
return path.split('.').reduce(function (acc, part) {
|
|
2066
|
+
return acc && acc[part] !== undefined ? acc[part] : undefined;
|
|
2067
|
+
}, obj);
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
/**
|
|
2071
|
+
* This function takes an object and a dot-separated key path. It traverses the object based on the path,
|
|
2072
|
+
* returning the value at the specified depth. If any part of the path is missing or undefined, it returns undefined.
|
|
2073
|
+
*
|
|
2074
|
+
* Example:
|
|
2075
|
+
* const objA = { name: 'Alice', address: { city: 'Wonderland', zip: 12345 } };
|
|
2076
|
+
* const objB = { name: 'Alice', address: { city: 'Wonderland', zip: 12345 } };
|
|
2077
|
+
* const result = ObjectUtils.absoluteCompare(objA, objB);
|
|
2078
|
+
* console.log(result); // Output: true
|
|
2079
|
+
*
|
|
2080
|
+
* const objC = { name: 'Alice', address: { city: 'Wonderland', zip: 12346 } };
|
|
2081
|
+
* const result2 = ObjectUtils.absoluteCompare(objA, objC);
|
|
2082
|
+
* console.log(result2); // Output: false
|
|
2083
|
+
*
|
|
2084
|
+
* @param {object} objA - The first object to compare.
|
|
2085
|
+
* @param {object} objB - The second object to compare.
|
|
2086
|
+
* @param {number} [maxDepth=1] - The maximum depth to compare.
|
|
2087
|
+
* @param {number} [currentDepth=0] - The current depth (used internally for recursion).
|
|
2088
|
+
* @returns {boolean} True if the objects are equal within the specified depth, false otherwise.
|
|
2089
|
+
*
|
|
2090
|
+
*/
|
|
2091
|
+
}, {
|
|
2092
|
+
key: "absoluteCompare",
|
|
2093
|
+
value: function absoluteCompare(objA, objB) {
|
|
2094
|
+
var maxDepth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
2095
|
+
var currentDepth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
2096
|
+
if (!objA || !objB) return true;
|
|
2097
|
+
if (currentDepth > maxDepth) return true;
|
|
2098
|
+
if (_typeof(objA) !== _typeof(objB)) return false;
|
|
2099
|
+
var aKeys = Object.keys(objA);
|
|
2100
|
+
var bKeys = Object.keys(objB);
|
|
2101
|
+
if (aKeys.length !== bKeys.length) return false;
|
|
2102
|
+
for (var _i = 0, _aKeys = aKeys; _i < _aKeys.length; _i++) {
|
|
2103
|
+
var key = _aKeys[_i];
|
|
2104
|
+
var aValue = objA[key];
|
|
2105
|
+
var bValue = objB[key];
|
|
2106
|
+
|
|
2107
|
+
// Skip comparison if values are objects
|
|
2108
|
+
var isObject = ObjectUtils.isObject(aValue) && ObjectUtils.isObject(bValue);
|
|
2109
|
+
var isFunction = ObjectUtils.isFunction(aValue) && ObjectUtils.isFunction(bValue);
|
|
2110
|
+
if ((isObject || isFunction) && !this.absoluteCompare(aValue, bValue, maxDepth, currentDepth + 1)) return false;
|
|
2111
|
+
if (!isObject && aValue !== bValue) return false;
|
|
2112
|
+
}
|
|
2113
|
+
return true;
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
/**
|
|
2117
|
+
* This helper function takes two objects and a list of keys to compare. It compares the values of the specified keys
|
|
2118
|
+
* in both objects. If any comparison fails, it returns false. If all specified properties are equal, it returns true.
|
|
2119
|
+
* It performs a shallow comparison using absoluteCompare if no keys are provided.
|
|
2120
|
+
*
|
|
2121
|
+
* Example:
|
|
2122
|
+
* const objA = { name: 'Alice', address: { city: 'Wonderland', zip: 12345 } };
|
|
2123
|
+
* const objB = { name: 'Alice', address: { city: 'Wonderland', zip: 12345 } };
|
|
2124
|
+
* const keysToCompare = ['name', 'address.city', 'address.zip'];
|
|
2125
|
+
* const result = ObjectUtils.selectiveCompare(objA, objB, keysToCompare);
|
|
2126
|
+
* console.log(result); // Output: true
|
|
2127
|
+
*
|
|
2128
|
+
* const objC = { name: 'Alice', address: { city: 'Wonderland', zip: 12346 } };
|
|
2129
|
+
* const result2 = ObjectUtils.selectiveCompare(objA, objC, keysToCompare);
|
|
2130
|
+
* console.log(result2); // Output: false
|
|
2131
|
+
*
|
|
2132
|
+
* @param {object} a - The first object to compare.
|
|
2133
|
+
* @param {object} b - The second object to compare.
|
|
2134
|
+
* @param {string[]} [keysToCompare] - The keys to compare. If not provided, performs a shallow comparison using absoluteCompare.
|
|
2135
|
+
* @param {number} [maxDepth=1] - The maximum depth to compare if the variables are objects.
|
|
2136
|
+
* @returns {boolean} True if all specified properties are equal, false otherwise.
|
|
2137
|
+
*/
|
|
2138
|
+
}, {
|
|
2139
|
+
key: "selectiveCompare",
|
|
2140
|
+
value: function selectiveCompare(a, b, keysToCompare) {
|
|
2141
|
+
var maxDepth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
2142
|
+
if (a === b) return true;
|
|
2143
|
+
if (!a || !b || _typeof(a) !== 'object' || _typeof(b) !== 'object') return false;
|
|
2144
|
+
if (!keysToCompare) return this.absoluteCompare(a, b, 1); // If no keys are provided, the comparison is limited to one depth level.
|
|
2145
|
+
var _iterator2 = _createForOfIteratorHelper$g(keysToCompare),
|
|
2146
|
+
_step2;
|
|
2147
|
+
try {
|
|
2148
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
2149
|
+
var key = _step2.value;
|
|
2150
|
+
var aValue = this.getNestedValue(a, key);
|
|
2151
|
+
var bValue = this.getNestedValue(b, key);
|
|
2152
|
+
var isObject = _typeof(aValue) === 'object' && aValue !== null && _typeof(bValue) === 'object' && bValue !== null;
|
|
2153
|
+
|
|
2154
|
+
// If the current key is an object, they are compared in one further level only.
|
|
2155
|
+
if (isObject && !this.absoluteCompare(aValue, bValue, maxDepth)) return false;
|
|
2156
|
+
if (!isObject && aValue !== bValue) return false;
|
|
2157
|
+
}
|
|
2158
|
+
} catch (err) {
|
|
2159
|
+
_iterator2.e(err);
|
|
2160
|
+
} finally {
|
|
2161
|
+
_iterator2.f();
|
|
2162
|
+
}
|
|
2163
|
+
return true;
|
|
2164
|
+
}
|
|
2044
2165
|
}]);
|
|
2045
2166
|
}();
|
|
2046
2167
|
|
|
@@ -2959,6 +3080,7 @@ var locales = {
|
|
|
2959
3080
|
emptySelectionMessage: 'No selected item',
|
|
2960
3081
|
endsWith: 'Ends with',
|
|
2961
3082
|
equals: 'Equals',
|
|
3083
|
+
fileChosenMessage: '{0} files',
|
|
2962
3084
|
fileSizeTypes: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
|
|
2963
3085
|
filter: 'Filter',
|
|
2964
3086
|
firstDayOfWeek: 0,
|
|
@@ -2977,6 +3099,7 @@ var locales = {
|
|
|
2977
3099
|
nextMonth: 'Next Month',
|
|
2978
3100
|
nextSecond: 'Next Second',
|
|
2979
3101
|
nextYear: 'Next Year',
|
|
3102
|
+
noFileChosenMessage: 'No file chosen',
|
|
2980
3103
|
noFilter: 'No Filter',
|
|
2981
3104
|
notContains: 'Not contains',
|
|
2982
3105
|
notEquals: 'Not equals',
|
|
@@ -3004,8 +3127,10 @@ var locales = {
|
|
|
3004
3127
|
aria: {
|
|
3005
3128
|
cancelEdit: 'Cancel Edit',
|
|
3006
3129
|
close: 'Close',
|
|
3130
|
+
collapseLabel: 'Collapse',
|
|
3007
3131
|
collapseRow: 'Row Collapsed',
|
|
3008
3132
|
editRow: 'Edit Row',
|
|
3133
|
+
expandLabel: 'Expand',
|
|
3009
3134
|
expandRow: 'Row Expanded',
|
|
3010
3135
|
falseLabel: 'False',
|
|
3011
3136
|
filterConstraint: 'Filter Constraint',
|
|
@@ -3030,18 +3155,20 @@ var locales = {
|
|
|
3030
3155
|
next: 'Next',
|
|
3031
3156
|
nextPageLabel: 'Next Page',
|
|
3032
3157
|
nullLabel: 'Not Selected',
|
|
3033
|
-
pageLabel: 'Page {page}',
|
|
3034
3158
|
otpLabel: 'Please enter one time password character {0}',
|
|
3159
|
+
pageLabel: 'Page {page}',
|
|
3035
3160
|
passwordHide: 'Hide Password',
|
|
3036
3161
|
passwordShow: 'Show Password',
|
|
3037
3162
|
previous: 'Previous',
|
|
3038
3163
|
prevPageLabel: 'Previous Page',
|
|
3164
|
+
removeLabel: 'Remove',
|
|
3039
3165
|
rotateLeft: 'Rotate Left',
|
|
3040
3166
|
rotateRight: 'Rotate Right',
|
|
3041
3167
|
rowsPerPageLabel: 'Rows per page',
|
|
3042
3168
|
saveEdit: 'Save Edit',
|
|
3043
3169
|
scrollTop: 'Scroll Top',
|
|
3044
3170
|
selectAll: 'All items selected',
|
|
3171
|
+
selectLabel: 'Select',
|
|
3045
3172
|
selectRow: 'Row Selected',
|
|
3046
3173
|
showFilterMenu: 'Show Filter Menu',
|
|
3047
3174
|
slide: 'Slide',
|
|
@@ -3050,6 +3177,7 @@ var locales = {
|
|
|
3050
3177
|
stars: '{star} stars',
|
|
3051
3178
|
trueLabel: 'True',
|
|
3052
3179
|
unselectAll: 'All items unselected',
|
|
3180
|
+
unselectLabel: 'Unselect',
|
|
3053
3181
|
unselectRow: 'Row Unselected',
|
|
3054
3182
|
zoomImage: 'Zoom Image',
|
|
3055
3183
|
zoomIn: 'Zoom In',
|
|
@@ -4367,7 +4495,14 @@ var useOverlayScrollListener = function useOverlayScrollListener(_ref) {
|
|
|
4367
4495
|
}
|
|
4368
4496
|
if (!listenerRef.current && targetRef.current) {
|
|
4369
4497
|
var hideOnScroll = context ? context.hideOverlaysOnDocumentScrolling : PrimeReact.hideOverlaysOnDocumentScrolling;
|
|
4370
|
-
var nodes = scrollableParentsRef.current = DomHandler.getScrollableParents(targetRef.current
|
|
4498
|
+
var nodes = scrollableParentsRef.current = DomHandler.getScrollableParents(targetRef.current);
|
|
4499
|
+
|
|
4500
|
+
// Ensure window/body is always included as fallback
|
|
4501
|
+
if (!nodes.some(function (node) {
|
|
4502
|
+
return node === document.body || node === window;
|
|
4503
|
+
})) {
|
|
4504
|
+
nodes.push(hideOnScroll ? window : document.body);
|
|
4505
|
+
}
|
|
4371
4506
|
listenerRef.current = function (event) {
|
|
4372
4507
|
return listener && listener(event);
|
|
4373
4508
|
};
|
|
@@ -4459,19 +4594,20 @@ var useOverlayListener = function useOverlayListener(_ref) {
|
|
|
4459
4594
|
type: 'outside',
|
|
4460
4595
|
valid: event.which !== 3 && isOutsideClicked(event)
|
|
4461
4596
|
});
|
|
4462
|
-
}
|
|
4597
|
+
},
|
|
4598
|
+
when: when
|
|
4463
4599
|
}),
|
|
4464
4600
|
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
4465
4601
|
bindDocumentClickListener = _useEventListener2[0],
|
|
4466
4602
|
unbindDocumentClickListener = _useEventListener2[1];
|
|
4467
4603
|
var _useResizeListener = useResizeListener({
|
|
4468
|
-
target: 'window',
|
|
4469
4604
|
listener: function listener(event) {
|
|
4470
4605
|
_listener && _listener(event, {
|
|
4471
4606
|
type: 'resize',
|
|
4472
4607
|
valid: !DomHandler.isTouchDevice()
|
|
4473
4608
|
});
|
|
4474
|
-
}
|
|
4609
|
+
},
|
|
4610
|
+
when: when
|
|
4475
4611
|
}),
|
|
4476
4612
|
_useResizeListener2 = _slicedToArray(_useResizeListener, 2),
|
|
4477
4613
|
bindWindowResizeListener = _useResizeListener2[0],
|
|
@@ -4484,7 +4620,8 @@ var useOverlayListener = function useOverlayListener(_ref) {
|
|
|
4484
4620
|
type: 'orientationchange',
|
|
4485
4621
|
valid: true
|
|
4486
4622
|
});
|
|
4487
|
-
}
|
|
4623
|
+
},
|
|
4624
|
+
when: when
|
|
4488
4625
|
}),
|
|
4489
4626
|
_useEventListener4 = _slicedToArray(_useEventListener3, 2),
|
|
4490
4627
|
bindWindowOrientationChangeListener = _useEventListener4[0],
|
|
@@ -4496,7 +4633,8 @@ var useOverlayListener = function useOverlayListener(_ref) {
|
|
|
4496
4633
|
type: 'scroll',
|
|
4497
4634
|
valid: true
|
|
4498
4635
|
});
|
|
4499
|
-
}
|
|
4636
|
+
},
|
|
4637
|
+
when: when
|
|
4500
4638
|
}),
|
|
4501
4639
|
_useOverlayScrollList2 = _slicedToArray(_useOverlayScrollList, 2),
|
|
4502
4640
|
bindOverlayScrollListener = _useOverlayScrollList2[0],
|
|
@@ -8111,7 +8249,15 @@ var AutoComplete = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(functio
|
|
|
8111
8249
|
var type = _ref.type,
|
|
8112
8250
|
valid = _ref.valid;
|
|
8113
8251
|
if (valid) {
|
|
8114
|
-
type === 'outside'
|
|
8252
|
+
if (type === 'outside') {
|
|
8253
|
+
if (!isInputClicked(event)) {
|
|
8254
|
+
hide();
|
|
8255
|
+
}
|
|
8256
|
+
} else if (context.hideOverlaysOnDocumentScrolling) {
|
|
8257
|
+
hide();
|
|
8258
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
8259
|
+
alignOverlay();
|
|
8260
|
+
}
|
|
8115
8261
|
}
|
|
8116
8262
|
},
|
|
8117
8263
|
when: overlayVisibleState
|
|
@@ -8287,6 +8433,9 @@ var AutoComplete = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(functio
|
|
|
8287
8433
|
}
|
|
8288
8434
|
};
|
|
8289
8435
|
var removeItem = function removeItem(event, index) {
|
|
8436
|
+
if (props.disabled || props.readOnly) {
|
|
8437
|
+
return;
|
|
8438
|
+
}
|
|
8290
8439
|
var removedValue = props.value[index];
|
|
8291
8440
|
var newValue = props.value.filter(function (_, i) {
|
|
8292
8441
|
return index !== i;
|
|
@@ -8729,6 +8878,7 @@ var AutoComplete = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(functio
|
|
|
8729
8878
|
listId: listId,
|
|
8730
8879
|
onItemClick: selectItem,
|
|
8731
8880
|
selectedItem: selectedItem,
|
|
8881
|
+
onOverlayHide: hide,
|
|
8732
8882
|
onClick: onPanelClick,
|
|
8733
8883
|
getOptionGroupLabel: getOptionGroupLabel,
|
|
8734
8884
|
getOptionGroupChildren: getOptionGroupChildren,
|
|
@@ -9250,7 +9400,8 @@ var BreadCrumb = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
9250
9400
|
onClick: function onClick(event) {
|
|
9251
9401
|
return itemClick(event, item);
|
|
9252
9402
|
},
|
|
9253
|
-
'aria-disabled': item.disabled
|
|
9403
|
+
'aria-disabled': item.disabled,
|
|
9404
|
+
tabIndex: item.disabled ? -1 : undefined
|
|
9254
9405
|
}, ptm('action'));
|
|
9255
9406
|
var content = /*#__PURE__*/React.createElement("a", actionProps, label);
|
|
9256
9407
|
if (item.template) {
|
|
@@ -9655,7 +9806,7 @@ var Calendar = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
9655
9806
|
isUnstyled = _CalendarBase$setMeta.isUnstyled;
|
|
9656
9807
|
useGlobalOnEscapeKey({
|
|
9657
9808
|
callback: function callback() {
|
|
9658
|
-
hide();
|
|
9809
|
+
hide(null, reFocusInputField);
|
|
9659
9810
|
},
|
|
9660
9811
|
when: overlayVisibleState && overlayDisplayOrder,
|
|
9661
9812
|
priority: [ESC_KEY_HANDLING_PRIORITIES.OVERLAY_PANEL, overlayDisplayOrder]
|
|
@@ -9706,7 +9857,15 @@ var Calendar = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
9706
9857
|
var type = _ref.type,
|
|
9707
9858
|
valid = _ref.valid;
|
|
9708
9859
|
if (valid) {
|
|
9709
|
-
type === 'outside'
|
|
9860
|
+
if (type === 'outside') {
|
|
9861
|
+
if (!isOverlayClicked.current && !isNavIconClicked(event.target)) {
|
|
9862
|
+
hide('outside');
|
|
9863
|
+
}
|
|
9864
|
+
} else if (context.hideOverlaysOnDocumentScrolling) {
|
|
9865
|
+
hide();
|
|
9866
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
9867
|
+
alignOverlay();
|
|
9868
|
+
}
|
|
9710
9869
|
}
|
|
9711
9870
|
isOverlayClicked.current = false;
|
|
9712
9871
|
},
|
|
@@ -11998,13 +12157,32 @@ var Calendar = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
11998
12157
|
return props.parseDateTime(text);
|
|
11999
12158
|
}
|
|
12000
12159
|
var date;
|
|
12001
|
-
var parts = text.split(' ');
|
|
12002
12160
|
if (props.timeOnly) {
|
|
12003
12161
|
date = new Date();
|
|
12004
|
-
|
|
12162
|
+
var match = text.match(/(\d{1,2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?)\s?(AM|PM)?/i);
|
|
12163
|
+
if (match) {
|
|
12164
|
+
populateTime(date, match[1], match[2]);
|
|
12165
|
+
} else {
|
|
12166
|
+
return null;
|
|
12167
|
+
}
|
|
12005
12168
|
} else if (props.showTime) {
|
|
12006
|
-
|
|
12007
|
-
|
|
12169
|
+
var time12 = /(\d{1,2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?)\s?(AM|PM)/i;
|
|
12170
|
+
var time24 = /(\d{1,2}:\d{2}(?::\d{2})?(?:\.\d{1,3})?)$/;
|
|
12171
|
+
var _match, datePart, timePart, ampm;
|
|
12172
|
+
if (props.hourFormat === '12' && (_match = text.match(time12))) {
|
|
12173
|
+
timePart = _match[1];
|
|
12174
|
+
ampm = _match[2];
|
|
12175
|
+
datePart = text.replace(time12, '').trim();
|
|
12176
|
+
} else if (props.hourFormat === '24' && (_match = text.match(time24))) {
|
|
12177
|
+
timePart = _match[1];
|
|
12178
|
+
datePart = text.replace(time24, '').trim();
|
|
12179
|
+
}
|
|
12180
|
+
if (datePart && timePart) {
|
|
12181
|
+
date = parseDate(datePart, getDateFormat());
|
|
12182
|
+
populateTime(date, timePart, ampm);
|
|
12183
|
+
} else {
|
|
12184
|
+
date = parseDate(text, getDateFormat());
|
|
12185
|
+
}
|
|
12008
12186
|
} else {
|
|
12009
12187
|
date = parseDate(text, getDateFormat());
|
|
12010
12188
|
}
|
|
@@ -12393,7 +12571,7 @@ var Calendar = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
12393
12571
|
viewDate.setHours(0, 0, 0);
|
|
12394
12572
|
isClearClicked.current = false;
|
|
12395
12573
|
}
|
|
12396
|
-
if (!prevPropValue && propValue || propValue && propValue instanceof Date && propValue.getTime() !== prevPropValue.getTime()) {
|
|
12574
|
+
if (!prevPropValue && propValue || propValue && propValue instanceof Date && prevPropValue instanceof Date && propValue.getTime() !== prevPropValue.getTime()) {
|
|
12397
12575
|
validateDate(viewDate);
|
|
12398
12576
|
}
|
|
12399
12577
|
setViewDateState(viewDate);
|
|
@@ -12647,6 +12825,9 @@ var Calendar = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
12647
12825
|
}),
|
|
12648
12826
|
'aria-selected': selected,
|
|
12649
12827
|
'aria-disabled': !date.selectable,
|
|
12828
|
+
onMouseDown: function onMouseDown(e) {
|
|
12829
|
+
return e.preventDefault();
|
|
12830
|
+
},
|
|
12650
12831
|
onClick: function onClick(e) {
|
|
12651
12832
|
return onDateSelect(e, date);
|
|
12652
12833
|
},
|
|
@@ -14165,6 +14346,22 @@ var Carousel = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
14165
14346
|
CarouselItem.displayName = 'CarouselItem';
|
|
14166
14347
|
Carousel.displayName = 'Carousel';
|
|
14167
14348
|
|
|
14349
|
+
var TimesIcon = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
14350
|
+
var pti = IconBase.getPTI(inProps);
|
|
14351
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
14352
|
+
ref: ref,
|
|
14353
|
+
width: "14",
|
|
14354
|
+
height: "14",
|
|
14355
|
+
viewBox: "0 0 14 14",
|
|
14356
|
+
fill: "none",
|
|
14357
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
14358
|
+
}, pti), /*#__PURE__*/React.createElement("path", {
|
|
14359
|
+
d: "M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z",
|
|
14360
|
+
fill: "currentColor"
|
|
14361
|
+
}));
|
|
14362
|
+
}));
|
|
14363
|
+
TimesIcon.displayName = 'TimesIcon';
|
|
14364
|
+
|
|
14168
14365
|
var classes$14 = {
|
|
14169
14366
|
root: function root(_ref) {
|
|
14170
14367
|
var props = _ref.props,
|
|
@@ -14201,6 +14398,7 @@ var classes$14 = {
|
|
|
14201
14398
|
});
|
|
14202
14399
|
},
|
|
14203
14400
|
dropdownIcon: 'p-cascadeselect-trigger-icon',
|
|
14401
|
+
clearIcon: 'p-cascadeselect-clear-icon p-clickable',
|
|
14204
14402
|
loadingIcon: 'p-cascadeselect-trigger-icon',
|
|
14205
14403
|
dropdownButton: 'p-cascadeselect-trigger',
|
|
14206
14404
|
loadingButton: 'p-cascadeselect-trigger',
|
|
@@ -14211,7 +14409,7 @@ var classes$14 = {
|
|
|
14211
14409
|
text: 'p-cascadeselect-item-text',
|
|
14212
14410
|
transition: 'p-connected-overlay'
|
|
14213
14411
|
};
|
|
14214
|
-
var styles$U = "\n@layer primereact {\n .p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n }\n \n .p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n \n .p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n \n .p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n \n .p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n }\n \n .p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n }\n \n .p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-cascadeselect-group-icon {\n margin-left: auto;\n }\n \n .p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n }\n \n .p-fluid .p-cascadeselect {\n display: flex;\n }\n \n .p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n }\n \n .p-cascadeselect-sublist-wrapper {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n }\n \n .p-cascadeselect-item-active {\n overflow: visible;\n }\n \n .p-cascadeselect-item-active > .p-cascadeselect-sublist-wrapper {\n display: block;\n left: 100%;\n top: 0;\n }\n}\n";
|
|
14412
|
+
var styles$U = "\n@layer primereact {\n .p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n }\n \n .p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n \n .p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n \n .p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n \n .p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n }\n \n .p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n }\n \n .p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-cascadeselect-group-icon {\n margin-left: auto;\n }\n \n .p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n }\n \n .p-fluid .p-cascadeselect {\n display: flex;\n }\n \n .p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n }\n \n .p-cascadeselect-sublist-wrapper {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n }\n \n .p-cascadeselect-item-active {\n overflow: visible;\n }\n \n .p-cascadeselect-item-active > .p-cascadeselect-sublist-wrapper {\n display: block;\n left: 100%;\n top: 0;\n }\n .p-cascadeselect-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n right: 3rem;\n }\n}\n";
|
|
14215
14413
|
var CascadeSelectBase = ComponentBase.extend({
|
|
14216
14414
|
defaultProps: {
|
|
14217
14415
|
__TYPE: 'CascadeSelect',
|
|
@@ -14244,6 +14442,8 @@ var CascadeSelectBase = ComponentBase.extend({
|
|
|
14244
14442
|
optionLabel: null,
|
|
14245
14443
|
optionValue: null,
|
|
14246
14444
|
options: null,
|
|
14445
|
+
panelClassName: null,
|
|
14446
|
+
panelStyle: null,
|
|
14247
14447
|
placeholder: null,
|
|
14248
14448
|
scrollHeight: '400px',
|
|
14249
14449
|
style: null,
|
|
@@ -14556,12 +14756,20 @@ var CascadeSelect = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(functi
|
|
|
14556
14756
|
var styleElementRef = React.useRef(null);
|
|
14557
14757
|
var dirty = React.useRef(false);
|
|
14558
14758
|
var selectionPath = React.useRef(null);
|
|
14759
|
+
var selfChange = React.useRef(null);
|
|
14559
14760
|
var _useOverlayListener = useOverlayListener({
|
|
14560
14761
|
target: elementRef,
|
|
14561
14762
|
overlay: overlayRef,
|
|
14562
14763
|
listener: function listener(event, _ref) {
|
|
14563
|
-
var valid = _ref.valid
|
|
14564
|
-
|
|
14764
|
+
var valid = _ref.valid,
|
|
14765
|
+
type = _ref.type;
|
|
14766
|
+
if (valid) {
|
|
14767
|
+
if (context.hideOverlaysOnDocumentScrolling || type === 'outside') {
|
|
14768
|
+
hide();
|
|
14769
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
14770
|
+
alignOverlay();
|
|
14771
|
+
}
|
|
14772
|
+
}
|
|
14565
14773
|
},
|
|
14566
14774
|
when: overlayVisibleState
|
|
14567
14775
|
}),
|
|
@@ -14578,6 +14786,7 @@ var CascadeSelect = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(functi
|
|
|
14578
14786
|
});
|
|
14579
14787
|
var onOptionSelect = function onOptionSelect(event) {
|
|
14580
14788
|
if (props.onChange) {
|
|
14789
|
+
selfChange.current = true;
|
|
14581
14790
|
props.onChange({
|
|
14582
14791
|
originalEvent: event,
|
|
14583
14792
|
value: event.value
|
|
@@ -14804,6 +15013,48 @@ var CascadeSelect = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(functi
|
|
|
14804
15013
|
}, ariaProps), ptm('input'));
|
|
14805
15014
|
return /*#__PURE__*/React.createElement("div", hiddenSelectedMessageProps, /*#__PURE__*/React.createElement("input", inputProps));
|
|
14806
15015
|
};
|
|
15016
|
+
var clear = function clear(event) {
|
|
15017
|
+
if (props.onChange) {
|
|
15018
|
+
selfChange.current = true;
|
|
15019
|
+
props.onChange({
|
|
15020
|
+
originalEvent: event,
|
|
15021
|
+
value: undefined,
|
|
15022
|
+
stopPropagation: function stopPropagation() {
|
|
15023
|
+
event === null || event === void 0 || event.stopPropagation();
|
|
15024
|
+
},
|
|
15025
|
+
preventDefault: function preventDefault() {
|
|
15026
|
+
event === null || event === void 0 || event.preventDefault();
|
|
15027
|
+
},
|
|
15028
|
+
target: {
|
|
15029
|
+
name: props.name,
|
|
15030
|
+
id: props.id,
|
|
15031
|
+
value: undefined
|
|
15032
|
+
}
|
|
15033
|
+
});
|
|
15034
|
+
}
|
|
15035
|
+
};
|
|
15036
|
+
var onClearIconKeyDown = function onClearIconKeyDown(event) {
|
|
15037
|
+
if (event.key === 'Enter' || event.code === 'Space') {
|
|
15038
|
+
clear(event);
|
|
15039
|
+
event.preventDefault();
|
|
15040
|
+
}
|
|
15041
|
+
};
|
|
15042
|
+
var createClearIcon = function createClearIcon() {
|
|
15043
|
+
if (props.value != null && props.showClear && !props.disabled) {
|
|
15044
|
+
var clearIconProps = mergeProps({
|
|
15045
|
+
className: cx('clearIcon'),
|
|
15046
|
+
onPointerUp: clear,
|
|
15047
|
+
tabIndex: props.tabIndex || '0',
|
|
15048
|
+
onKeyDown: onClearIconKeyDown,
|
|
15049
|
+
'aria-label': localeOption('clear')
|
|
15050
|
+
}, ptm('clearIcon'));
|
|
15051
|
+
var icon = props.clearIcon || /*#__PURE__*/React.createElement(TimesIcon, clearIconProps);
|
|
15052
|
+
return IconUtils.getJSXIcon(icon, _objectSpread$1H({}, clearIconProps), {
|
|
15053
|
+
props: props
|
|
15054
|
+
});
|
|
15055
|
+
}
|
|
15056
|
+
return null;
|
|
15057
|
+
};
|
|
14807
15058
|
var createLabel = function createLabel() {
|
|
14808
15059
|
var label = props.value ? getOptionLabel(props.value) : props.placeholder || 'p-emptylabel';
|
|
14809
15060
|
var labelProps = mergeProps({
|
|
@@ -14857,7 +15108,8 @@ var CascadeSelect = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(functi
|
|
|
14857
15108
|
}, ptm('wrapper'));
|
|
14858
15109
|
var panelProps = mergeProps({
|
|
14859
15110
|
ref: overlayRef,
|
|
14860
|
-
className: cx('panel'),
|
|
15111
|
+
className: classNames(props.panelClassName, cx('panel')),
|
|
15112
|
+
style: props.panelStyle,
|
|
14861
15113
|
onClick: function onClick(e) {
|
|
14862
15114
|
return onPanelClick(e);
|
|
14863
15115
|
}
|
|
@@ -14906,6 +15158,7 @@ var CascadeSelect = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(functi
|
|
|
14906
15158
|
var createElement = function createElement() {
|
|
14907
15159
|
var keyboardHelper = createKeyboardHelper();
|
|
14908
15160
|
var labelElement = createLabel();
|
|
15161
|
+
var clearIcon = createClearIcon();
|
|
14909
15162
|
var dropdownIcon = props.loading ? createLoadingIcon() : createDropdownIcon();
|
|
14910
15163
|
var overlay = createOverlay();
|
|
14911
15164
|
var rootProps = mergeProps({
|
|
@@ -14921,7 +15174,7 @@ var CascadeSelect = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(functi
|
|
|
14921
15174
|
return _onClick(e);
|
|
14922
15175
|
}
|
|
14923
15176
|
}, otherProps, ptm('root'));
|
|
14924
|
-
return /*#__PURE__*/React.createElement("div", rootProps, keyboardHelper, labelElement, dropdownIcon, overlay);
|
|
15177
|
+
return /*#__PURE__*/React.createElement("div", rootProps, keyboardHelper, labelElement, clearIcon, dropdownIcon, overlay);
|
|
14925
15178
|
};
|
|
14926
15179
|
var otherProps = CascadeSelectBase.getOtherProps(props);
|
|
14927
15180
|
ObjectUtils.reduceKeys(otherProps, DomHandler.DATA_PROPS);
|
|
@@ -15172,7 +15425,7 @@ var Checkbox = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
15172
15425
|
return props.checked === props.trueValue;
|
|
15173
15426
|
};
|
|
15174
15427
|
var _onChange = function onChange(event) {
|
|
15175
|
-
if (props.disabled || props.
|
|
15428
|
+
if (props.disabled || props.readOnly) {
|
|
15176
15429
|
return;
|
|
15177
15430
|
}
|
|
15178
15431
|
if (props.onChange) {
|
|
@@ -15356,6 +15609,10 @@ var Chip = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inPro
|
|
|
15356
15609
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
15357
15610
|
visibleState = _React$useState2[0],
|
|
15358
15611
|
setVisibleState = _React$useState2[1];
|
|
15612
|
+
var _React$useState3 = React.useState(props.id),
|
|
15613
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
15614
|
+
idState = _React$useState4[0],
|
|
15615
|
+
setIdState = _React$useState4[1];
|
|
15359
15616
|
var _ChipBase$setMetaData = ChipBase.setMetaData({
|
|
15360
15617
|
props: props
|
|
15361
15618
|
}),
|
|
@@ -15373,6 +15630,7 @@ var Chip = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inPro
|
|
|
15373
15630
|
var close = function close(event) {
|
|
15374
15631
|
var result = true;
|
|
15375
15632
|
if (props.onRemove) {
|
|
15633
|
+
event.stopPropagation();
|
|
15376
15634
|
result = props.onRemove({
|
|
15377
15635
|
originalEvent: event,
|
|
15378
15636
|
value: props.label || props.image || props.icon
|
|
@@ -15392,7 +15650,7 @@ var Chip = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inPro
|
|
|
15392
15650
|
onKeyDown: onKeyDown
|
|
15393
15651
|
}, ptm('removeIcon'));
|
|
15394
15652
|
var icon = props.removeIcon || /*#__PURE__*/React.createElement(TimesCircleIcon, _extends({}, removeIconProps, {
|
|
15395
|
-
key:
|
|
15653
|
+
key: "".concat(idState, "-removeIcon")
|
|
15396
15654
|
}));
|
|
15397
15655
|
if (props.image) {
|
|
15398
15656
|
var imageProps = mergeProps({
|
|
@@ -15402,7 +15660,7 @@ var Chip = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inPro
|
|
|
15402
15660
|
content.push(/*#__PURE__*/React.createElement("img", _extends({
|
|
15403
15661
|
alt: props.imageAlt
|
|
15404
15662
|
}, imageProps, {
|
|
15405
|
-
key:
|
|
15663
|
+
key: "".concat(idState, "-image")
|
|
15406
15664
|
})));
|
|
15407
15665
|
} else if (props.icon) {
|
|
15408
15666
|
var chipIconProps = mergeProps({
|
|
@@ -15453,6 +15711,14 @@ var Chip = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inPro
|
|
|
15453
15711
|
}
|
|
15454
15712
|
};
|
|
15455
15713
|
});
|
|
15714
|
+
useMountEffect(function () {
|
|
15715
|
+
if (!idState) {
|
|
15716
|
+
setIdState(UniqueComponentId());
|
|
15717
|
+
}
|
|
15718
|
+
});
|
|
15719
|
+
if (!idState) {
|
|
15720
|
+
return null;
|
|
15721
|
+
}
|
|
15456
15722
|
return visibleState && createElement();
|
|
15457
15723
|
}));
|
|
15458
15724
|
Chip.displayName = 'Chip';
|
|
@@ -15561,7 +15827,7 @@ var Chips = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inPr
|
|
|
15561
15827
|
var listRef = React.useRef(null);
|
|
15562
15828
|
var inputRef = React.useRef(props.inputRef);
|
|
15563
15829
|
var removeItem = function removeItem(event, index) {
|
|
15564
|
-
if (props.disabled
|
|
15830
|
+
if (props.disabled || props.readOnly) {
|
|
15565
15831
|
return;
|
|
15566
15832
|
}
|
|
15567
15833
|
var values = _toConsumableArray(props.value);
|
|
@@ -16094,8 +16360,15 @@ var ColorPicker = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
16094
16360
|
target: elementRef,
|
|
16095
16361
|
overlay: overlayRef,
|
|
16096
16362
|
listener: function listener(event, _ref) {
|
|
16097
|
-
var valid = _ref.valid
|
|
16098
|
-
|
|
16363
|
+
var valid = _ref.valid,
|
|
16364
|
+
type = _ref.type;
|
|
16365
|
+
if (valid) {
|
|
16366
|
+
if (context.hideOverlaysOnDocumentScrolling || type === 'outside') {
|
|
16367
|
+
hide();
|
|
16368
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
16369
|
+
alignOverlay();
|
|
16370
|
+
}
|
|
16371
|
+
}
|
|
16099
16372
|
},
|
|
16100
16373
|
when: overlayVisibleState
|
|
16101
16374
|
}),
|
|
@@ -16750,22 +17023,6 @@ var FocusTrap = /*#__PURE__*/React__default.memo(/*#__PURE__*/React__default.for
|
|
|
16750
17023
|
}));
|
|
16751
17024
|
var FocusTrap$1 = FocusTrap;
|
|
16752
17025
|
|
|
16753
|
-
var TimesIcon = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
16754
|
-
var pti = IconBase.getPTI(inProps);
|
|
16755
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
16756
|
-
ref: ref,
|
|
16757
|
-
width: "14",
|
|
16758
|
-
height: "14",
|
|
16759
|
-
viewBox: "0 0 14 14",
|
|
16760
|
-
fill: "none",
|
|
16761
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
16762
|
-
}, pti), /*#__PURE__*/React.createElement("path", {
|
|
16763
|
-
d: "M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z",
|
|
16764
|
-
fill: "currentColor"
|
|
16765
|
-
}));
|
|
16766
|
-
}));
|
|
16767
|
-
TimesIcon.displayName = 'TimesIcon';
|
|
16768
|
-
|
|
16769
17026
|
var WindowMaximizeIcon = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
16770
17027
|
var pti = IconBase.getPTI(inProps);
|
|
16771
17028
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
@@ -16919,6 +17176,7 @@ var DialogBase = ComponentBase.extend({
|
|
|
16919
17176
|
resizable: true,
|
|
16920
17177
|
rtl: false,
|
|
16921
17178
|
showHeader: true,
|
|
17179
|
+
showCloseIcon: true,
|
|
16922
17180
|
style: null,
|
|
16923
17181
|
transitionOptions: null,
|
|
16924
17182
|
visible: false,
|
|
@@ -17050,7 +17308,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
17050
17308
|
var focus = function focus() {
|
|
17051
17309
|
var activeElement = document.activeElement;
|
|
17052
17310
|
var isActiveElementInDialog = activeElement && dialogRef.current && dialogRef.current.contains(activeElement);
|
|
17053
|
-
if (!isActiveElementInDialog && props.closable && props.showHeader && closeRef.current) {
|
|
17311
|
+
if (!isActiveElementInDialog && props.closable && props.showCloseIcon && props.showHeader && closeRef.current) {
|
|
17054
17312
|
closeRef.current.focus();
|
|
17055
17313
|
}
|
|
17056
17314
|
};
|
|
@@ -17356,7 +17614,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
17356
17614
|
};
|
|
17357
17615
|
});
|
|
17358
17616
|
var createCloseIcon = function createCloseIcon() {
|
|
17359
|
-
if (props.closable) {
|
|
17617
|
+
if (props.closable && props.showCloseIcon) {
|
|
17360
17618
|
var labelAria = props.ariaCloseIconLabel || ariaLabel('close');
|
|
17361
17619
|
var closeButtonIconProps = mergeProps({
|
|
17362
17620
|
className: cx('closeButtonIcon'),
|
|
@@ -17968,9 +18226,17 @@ var ConfirmPopup = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(functio
|
|
|
17968
18226
|
var type = _ref.type,
|
|
17969
18227
|
valid = _ref.valid;
|
|
17970
18228
|
if (valid) {
|
|
17971
|
-
type === 'outside'
|
|
18229
|
+
if (type === 'outside') {
|
|
18230
|
+
if (props.dismissable && !isPanelClicked.current) {
|
|
18231
|
+
hide('hide');
|
|
18232
|
+
}
|
|
18233
|
+
isPanelClicked.current = false;
|
|
18234
|
+
} else if (context.hideOverlaysOnDocumentScrolling) {
|
|
18235
|
+
hide('hide');
|
|
18236
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
18237
|
+
align();
|
|
18238
|
+
}
|
|
17972
18239
|
}
|
|
17973
|
-
isPanelClicked.current = false;
|
|
17974
18240
|
},
|
|
17975
18241
|
when: visibleState
|
|
17976
18242
|
}),
|
|
@@ -20166,7 +20432,7 @@ var InputNumber = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
20166
20432
|
var stacked = props.showButtons && props.buttonLayout === 'stacked';
|
|
20167
20433
|
var horizontal = props.showButtons && props.buttonLayout === 'horizontal';
|
|
20168
20434
|
var vertical = props.showButtons && props.buttonLayout === 'vertical';
|
|
20169
|
-
var inputMode = props.inputMode || (props.mode === 'decimal' && !props.minFractionDigits ? 'numeric' : 'decimal');
|
|
20435
|
+
var inputMode = props.inputMode || (props.mode === 'decimal' && !props.minFractionDigits && !props.maxFractionDigits ? 'numeric' : 'decimal');
|
|
20170
20436
|
var getOptions = function getOptions() {
|
|
20171
20437
|
var _props$minFractionDig, _props$maxFractionDig;
|
|
20172
20438
|
return {
|
|
@@ -20601,6 +20867,10 @@ var InputNumber = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
20601
20867
|
event.preventDefault();
|
|
20602
20868
|
var _char2 = event.key;
|
|
20603
20869
|
if (_char2) {
|
|
20870
|
+
// get decimal separator in current locale
|
|
20871
|
+
if (_char2 === '.') {
|
|
20872
|
+
_char2 = _decimalSeparator.current;
|
|
20873
|
+
}
|
|
20604
20874
|
var _isDecimalSign = isDecimalSign(_char2);
|
|
20605
20875
|
var _isMinusSign = isMinusSign(_char2);
|
|
20606
20876
|
if (Number(_char2) >= 0 && Number(_char2) <= 9 || _isMinusSign || _isDecimalSign) {
|
|
@@ -20715,6 +20985,7 @@ var InputNumber = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
20715
20985
|
suffixCharIndex = _getCharIndexes2.suffixCharIndex,
|
|
20716
20986
|
currencyCharIndex = _getCharIndexes2.currencyCharIndex;
|
|
20717
20987
|
var maxFractionDigits = numberFormat.current.resolvedOptions().maximumFractionDigits;
|
|
20988
|
+
var hasBoundOrAffix = props.min || props.max || props.suffix || props.prefix; //only exception
|
|
20718
20989
|
var newValueStr;
|
|
20719
20990
|
if (sign.isMinusSign) {
|
|
20720
20991
|
var isNewMinusSign = minusCharIndex === -1;
|
|
@@ -20734,8 +21005,11 @@ var InputNumber = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
20734
21005
|
newValueStr = insertText(inputValue, text, selectionStart, selectionEnd);
|
|
20735
21006
|
updateValue(event, newValueStr, text, 'insert');
|
|
20736
21007
|
} else if (decimalCharIndex === -1 && (maxFractionDigits || props.maxFractionDigits)) {
|
|
20737
|
-
|
|
20738
|
-
|
|
21008
|
+
var allowedDecimal = inputMode !== 'numeric' || inputMode === 'numeric' && hasBoundOrAffix;
|
|
21009
|
+
if (allowedDecimal) {
|
|
21010
|
+
newValueStr = insertText(inputValue, text, selectionStart, selectionEnd);
|
|
21011
|
+
updateValue(event, newValueStr, text, 'insert');
|
|
21012
|
+
}
|
|
20739
21013
|
}
|
|
20740
21014
|
} else {
|
|
20741
21015
|
var operation = selectionStart !== selectionEnd ? 'range-insert' : 'insert';
|
|
@@ -21698,6 +21972,7 @@ var DropdownBase = ComponentBase.extend({
|
|
|
21698
21972
|
name: null,
|
|
21699
21973
|
onBlur: null,
|
|
21700
21974
|
onChange: null,
|
|
21975
|
+
onClick: null,
|
|
21701
21976
|
onContextMenu: null,
|
|
21702
21977
|
onFilter: null,
|
|
21703
21978
|
onFocus: null,
|
|
@@ -22206,7 +22481,15 @@ var Dropdown = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
22206
22481
|
var type = _ref.type,
|
|
22207
22482
|
valid = _ref.valid;
|
|
22208
22483
|
if (valid) {
|
|
22209
|
-
type === 'outside'
|
|
22484
|
+
if (type === 'outside') {
|
|
22485
|
+
if (!isClearClicked(event)) {
|
|
22486
|
+
hide();
|
|
22487
|
+
}
|
|
22488
|
+
} else if (context.hideOverlaysOnDocumentScrolling) {
|
|
22489
|
+
hide();
|
|
22490
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
22491
|
+
alignOverlay();
|
|
22492
|
+
}
|
|
22210
22493
|
}
|
|
22211
22494
|
},
|
|
22212
22495
|
when: overlayVisibleState
|
|
@@ -22405,12 +22688,14 @@ var Dropdown = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
22405
22688
|
case 'ArrowRight':
|
|
22406
22689
|
onArrowLeftKey(event, true);
|
|
22407
22690
|
break;
|
|
22408
|
-
case 'Escape':
|
|
22409
22691
|
case 'Enter':
|
|
22410
22692
|
case 'NumpadEnter':
|
|
22411
22693
|
onEnterKey(event);
|
|
22412
22694
|
event.preventDefault();
|
|
22413
22695
|
break;
|
|
22696
|
+
case 'Escape':
|
|
22697
|
+
onEscapeKey(event);
|
|
22698
|
+
break;
|
|
22414
22699
|
}
|
|
22415
22700
|
};
|
|
22416
22701
|
var hasFocusableElements = function hasFocusableElements() {
|
|
@@ -22577,15 +22862,24 @@ var Dropdown = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
22577
22862
|
!pressedInInputText && onEnterKey(event);
|
|
22578
22863
|
};
|
|
22579
22864
|
var onEnterKey = function onEnterKey(event) {
|
|
22865
|
+
event.preventDefault();
|
|
22580
22866
|
if (!overlayVisibleState) {
|
|
22581
22867
|
setFocusedOptionIndex(-1);
|
|
22582
22868
|
onArrowDownKey(event);
|
|
22583
22869
|
} else {
|
|
22584
|
-
if (focusedOptionIndex
|
|
22585
|
-
|
|
22870
|
+
if (focusedOptionIndex === -1) {
|
|
22871
|
+
return;
|
|
22872
|
+
}
|
|
22873
|
+
var focusedOption = visibleOptions[focusedOptionIndex];
|
|
22874
|
+
var optionValue = getOptionValue(focusedOption);
|
|
22875
|
+
if (optionValue == null || optionValue == undefined) {
|
|
22876
|
+
hide();
|
|
22877
|
+
resetFilter();
|
|
22878
|
+
updateEditableLabel(selectedOption);
|
|
22879
|
+
return;
|
|
22586
22880
|
}
|
|
22881
|
+
onOptionSelect(event, focusedOption);
|
|
22587
22882
|
}
|
|
22588
|
-
event.preventDefault();
|
|
22589
22883
|
};
|
|
22590
22884
|
var onEscapeKey = function onEscapeKey(event) {
|
|
22591
22885
|
overlayVisibleState && hide();
|
|
@@ -23152,6 +23446,7 @@ var Dropdown = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
23152
23446
|
"in": overlayVisibleState,
|
|
23153
23447
|
isOptionDisabled: isOptionDisabled,
|
|
23154
23448
|
isSelected: isSelected,
|
|
23449
|
+
onOverlayHide: hide,
|
|
23155
23450
|
onClick: onPanelClick,
|
|
23156
23451
|
onEnter: onOverlayEnter,
|
|
23157
23452
|
onEntered: onOverlayEntered,
|
|
@@ -24031,7 +24326,7 @@ var RadioButton = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
24031
24326
|
onChange(event);
|
|
24032
24327
|
};
|
|
24033
24328
|
var onChange = function onChange(event) {
|
|
24034
|
-
if (props.disabled || props.
|
|
24329
|
+
if (props.disabled || props.readOnly) {
|
|
24035
24330
|
return;
|
|
24036
24331
|
}
|
|
24037
24332
|
if (props.onChange) {
|
|
@@ -24134,7 +24429,7 @@ var RadioButton = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
24134
24429
|
onBlur: onBlur,
|
|
24135
24430
|
onChange: onChange,
|
|
24136
24431
|
disabled: props.disabled,
|
|
24137
|
-
readOnly: props.
|
|
24432
|
+
readOnly: props.readOnly,
|
|
24138
24433
|
required: props.required,
|
|
24139
24434
|
tabIndex: props.tabIndex,
|
|
24140
24435
|
className: cx('input')
|
|
@@ -24207,7 +24502,7 @@ RowRadioButton.displayName = 'RowRadioButton';
|
|
|
24207
24502
|
|
|
24208
24503
|
function ownKeys$1i(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; }
|
|
24209
24504
|
function _objectSpread$1i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1i(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24210
|
-
var
|
|
24505
|
+
var Cell = function Cell(props) {
|
|
24211
24506
|
var mergeProps = useMergeProps();
|
|
24212
24507
|
var _React$useState = React.useState(props.editing),
|
|
24213
24508
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -24235,13 +24530,9 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24235
24530
|
var getColumnProp = function getColumnProp(name) {
|
|
24236
24531
|
return ColumnBase.getCProp(props.column, name);
|
|
24237
24532
|
};
|
|
24238
|
-
var getColumnProps = function getColumnProps() {
|
|
24239
|
-
return ColumnBase.getCProps(props.column);
|
|
24240
|
-
};
|
|
24241
24533
|
var getColumnPTOptions = function getColumnPTOptions(key) {
|
|
24242
|
-
var cProps = getColumnProps();
|
|
24243
24534
|
var columnMetaData = {
|
|
24244
|
-
props: cProps,
|
|
24535
|
+
props: props.cProps,
|
|
24245
24536
|
parent: props.metaData,
|
|
24246
24537
|
hostName: props.hostName,
|
|
24247
24538
|
state: {
|
|
@@ -24257,10 +24548,8 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24257
24548
|
};
|
|
24258
24549
|
return mergeProps(ptm("column.".concat(key), {
|
|
24259
24550
|
column: columnMetaData
|
|
24260
|
-
}), ptm("column.".concat(key), columnMetaData), ptmo(cProps, key, columnMetaData));
|
|
24551
|
+
}), ptm("column.".concat(key), columnMetaData), ptmo(props.cProps, key, columnMetaData));
|
|
24261
24552
|
};
|
|
24262
|
-
var field = getColumnProp('field') || "field_".concat(props.index);
|
|
24263
|
-
var editingKey = props.dataKey ? props.rowData && props.rowData[props.dataKey] || props.rowIndex : props.rowIndex;
|
|
24264
24553
|
var isEditable = function isEditable() {
|
|
24265
24554
|
return ObjectUtils.isNotEmpty(props.editMode) && getColumnProp('editor');
|
|
24266
24555
|
};
|
|
@@ -24285,34 +24574,22 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24285
24574
|
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
24286
24575
|
bindDocumentClickListener = _useEventListener2[0],
|
|
24287
24576
|
unbindDocumentClickListener = _useEventListener2[1];
|
|
24288
|
-
var isSelected = function isSelected() {
|
|
24289
|
-
return props.selection ? props.selection instanceof Array ? findIndex(props.selection) > -1 : equals(props.selection) : false;
|
|
24290
|
-
};
|
|
24291
|
-
var equalsData = function equalsData(data) {
|
|
24292
|
-
return props.compareSelectionBy === 'equals' ? data === props.rowData : ObjectUtils.equals(data, props.rowData, props.dataKey);
|
|
24293
|
-
};
|
|
24294
|
-
var equals = function equals(selectedCell) {
|
|
24295
|
-
return selectedCell && (selectedCell.rowIndex === props.rowIndex || equalsData(selectedCell.rowData)) && (selectedCell.field === field || selectedCell.cellIndex === props.index);
|
|
24296
|
-
};
|
|
24297
24577
|
var isOutsideClicked = function isOutsideClicked(target) {
|
|
24298
24578
|
return elementRef.current && !(elementRef.current.isSameNode(target) || elementRef.current.contains(target));
|
|
24299
24579
|
};
|
|
24300
|
-
var getVirtualScrollerOption = function getVirtualScrollerOption(option) {
|
|
24301
|
-
return props.virtualScrollerOptions ? props.virtualScrollerOptions[option] : null;
|
|
24302
|
-
};
|
|
24303
24580
|
var getStyle = function getStyle() {
|
|
24304
24581
|
var bodyStyle = getColumnProp('bodyStyle');
|
|
24305
24582
|
var columnStyle = getColumnProp('style');
|
|
24306
|
-
return
|
|
24583
|
+
return props.frozenCol ? Object.assign({}, columnStyle, bodyStyle, styleObjectState) : Object.assign({}, columnStyle, bodyStyle);
|
|
24307
24584
|
};
|
|
24308
24585
|
var getCellParams = function getCellParams() {
|
|
24309
24586
|
return {
|
|
24310
|
-
value: resolveFieldData(),
|
|
24311
|
-
field: field,
|
|
24587
|
+
value: props.resolveFieldData(),
|
|
24588
|
+
field: props.field,
|
|
24312
24589
|
rowData: props.rowData,
|
|
24313
24590
|
rowIndex: props.rowIndex,
|
|
24314
24591
|
cellIndex: props.index,
|
|
24315
|
-
selected:
|
|
24592
|
+
selected: props.isCellSelected,
|
|
24316
24593
|
column: props.column,
|
|
24317
24594
|
props: props
|
|
24318
24595
|
};
|
|
@@ -24323,20 +24600,6 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24323
24600
|
originalEvent: event
|
|
24324
24601
|
}, params);
|
|
24325
24602
|
};
|
|
24326
|
-
var resolveFieldData = function resolveFieldData(data) {
|
|
24327
|
-
return ObjectUtils.resolveFieldData(data || props.rowData, field);
|
|
24328
|
-
};
|
|
24329
|
-
var getEditingRowData = function getEditingRowData() {
|
|
24330
|
-
return props.editingMeta && props.editingMeta[editingKey] ? props.editingMeta[editingKey].data : props.rowData;
|
|
24331
|
-
};
|
|
24332
|
-
var getTabIndex = function getTabIndex(cellSelected) {
|
|
24333
|
-
return props.allowCellSelection ? cellSelected ? 0 : props.rowIndex === 0 && props.index === 0 ? props.tabIndex : -1 : null;
|
|
24334
|
-
};
|
|
24335
|
-
var findIndex = function findIndex(collection) {
|
|
24336
|
-
return (collection || []).findIndex(function (data) {
|
|
24337
|
-
return equals(data);
|
|
24338
|
-
});
|
|
24339
|
-
};
|
|
24340
24603
|
var closeCell = function closeCell(event) {
|
|
24341
24604
|
var params = getCellCallbackParams(event);
|
|
24342
24605
|
var onBeforeCellEditHide = getColumnProp('onBeforeCellEditHide');
|
|
@@ -24357,7 +24620,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24357
24620
|
var switchCellToViewMode = function switchCellToViewMode(event, submit) {
|
|
24358
24621
|
var callbackParams = getCellCallbackParams(event);
|
|
24359
24622
|
var newRowData = _objectSpread$1i({}, editingRowDataStateRef.current);
|
|
24360
|
-
var newValue = resolveFieldData(newRowData);
|
|
24623
|
+
var newValue = props.resolveFieldData(newRowData);
|
|
24361
24624
|
var params = _objectSpread$1i(_objectSpread$1i({}, callbackParams), {}, {
|
|
24362
24625
|
newRowData: newRowData,
|
|
24363
24626
|
newValue: newValue
|
|
@@ -24382,128 +24645,20 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24382
24645
|
}
|
|
24383
24646
|
setEditingRowDataState(newRowData);
|
|
24384
24647
|
};
|
|
24385
|
-
var _findNextSelectableCell = function findNextSelectableCell(cell) {
|
|
24386
|
-
var nextCell = cell.nextElementSibling;
|
|
24387
|
-
return nextCell ? DomHandler.getAttribute(nextCell, 'data-p-selectable-cell') ? nextCell : _findNextSelectableCell(nextCell) : null;
|
|
24388
|
-
};
|
|
24389
|
-
var _findPrevSelectableCell = function findPrevSelectableCell(cell) {
|
|
24390
|
-
var prevCell = cell.previousElementSibling;
|
|
24391
|
-
return prevCell ? DomHandler.getAttribute(prevCell, 'data-p-selectable-cell') ? prevCell : _findPrevSelectableCell(prevCell) : null;
|
|
24392
|
-
};
|
|
24393
|
-
var _findDownSelectableCell = function findDownSelectableCell(cell) {
|
|
24394
|
-
var downRow = cell.parentElement.nextElementSibling;
|
|
24395
|
-
var downCell = downRow ? downRow.children[props.index] : null;
|
|
24396
|
-
return downRow && downCell ? DomHandler.getAttribute(downRow, 'data-p-selectable-row') && DomHandler.getAttribute(downCell, 'data-p-selectable-cell') ? downCell : _findDownSelectableCell(downCell) : null;
|
|
24397
|
-
};
|
|
24398
|
-
var _findUpSelectableCell = function findUpSelectableCell(cell) {
|
|
24399
|
-
var upRow = cell.parentElement.previousElementSibling;
|
|
24400
|
-
var upCell = upRow ? upRow.children[props.index] : null;
|
|
24401
|
-
return upRow && upCell ? DomHandler.getAttribute(upRow, 'data-p-selectable-row') && DomHandler.getAttribute(upCell, 'data-p-selectable-cell') ? upCell : _findUpSelectableCell(upCell) : null;
|
|
24402
|
-
};
|
|
24403
|
-
var changeTabIndex = function changeTabIndex(currentCell, nextCell) {
|
|
24404
|
-
if (currentCell && nextCell) {
|
|
24405
|
-
currentCell.tabIndex = -1;
|
|
24406
|
-
nextCell.tabIndex = props.tabIndex;
|
|
24407
|
-
}
|
|
24408
|
-
};
|
|
24409
|
-
var focusOnElement = function focusOnElement() {
|
|
24410
|
-
clearTimeout(focusTimeout.current);
|
|
24411
|
-
focusTimeout.current = setTimeout(function () {
|
|
24412
|
-
if (editingState) {
|
|
24413
|
-
var focusableEl = props.editMode === 'cell' ? DomHandler.getFirstFocusableElement(elementRef.current, ':not([data-pc-section="editorkeyhelperlabel"])') : DomHandler.findSingle(elementRef.current, '[data-p-row-editor-save="true"]');
|
|
24414
|
-
focusableEl && focusableEl.focus();
|
|
24415
|
-
}
|
|
24416
|
-
keyHelperRef.current && (keyHelperRef.current.tabIndex = editingState ? -1 : 0);
|
|
24417
|
-
}, 1);
|
|
24418
|
-
};
|
|
24419
|
-
var focusOnInit = function focusOnInit() {
|
|
24420
|
-
clearTimeout(initFocusTimeout.current);
|
|
24421
|
-
initFocusTimeout.current = setTimeout(function () {
|
|
24422
|
-
var focusableEl = props.editMode === 'row' ? DomHandler.findSingle(elementRef.current, '[data-p-row-editor-init="true"]') : null;
|
|
24423
|
-
focusableEl && focusableEl.focus();
|
|
24424
|
-
}, 1);
|
|
24425
|
-
};
|
|
24426
|
-
var updateStickyPosition = function updateStickyPosition() {
|
|
24427
|
-
if (getColumnProp('frozen')) {
|
|
24428
|
-
var styleObject = _objectSpread$1i({}, styleObjectState);
|
|
24429
|
-
var align = getColumnProp('alignFrozen');
|
|
24430
|
-
if (align === 'right') {
|
|
24431
|
-
var right = 0;
|
|
24432
|
-
var next = elementRef.current && elementRef.current.nextElementSibling;
|
|
24433
|
-
if (next && next.classList.contains('p-frozen-column')) {
|
|
24434
|
-
right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0);
|
|
24435
|
-
}
|
|
24436
|
-
styleObject.right = right + 'px';
|
|
24437
|
-
} else {
|
|
24438
|
-
var left = 0;
|
|
24439
|
-
var prev = elementRef.current && elementRef.current.previousElementSibling;
|
|
24440
|
-
if (prev && prev.classList.contains('p-frozen-column')) {
|
|
24441
|
-
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
|
24442
|
-
}
|
|
24443
|
-
styleObject.left = left + 'px';
|
|
24444
|
-
}
|
|
24445
|
-
var isSameStyle = styleObjectState.left === styleObject.left && styleObjectState.right === styleObject.right;
|
|
24446
|
-
!isSameStyle && setStyleObjectState(styleObject);
|
|
24447
|
-
}
|
|
24448
|
-
};
|
|
24449
24648
|
var editorCallback = function editorCallback(val) {
|
|
24450
24649
|
var editingRowData = _objectSpread$1i({}, editingRowDataState);
|
|
24451
|
-
ObjectUtils.mutateFieldData(editingRowData, field, val);
|
|
24650
|
+
ObjectUtils.mutateFieldData(editingRowData, props.field, val);
|
|
24452
24651
|
setEditingRowDataState(editingRowData);
|
|
24453
24652
|
|
|
24454
24653
|
// update editing meta for complete methods on row mode
|
|
24455
|
-
var currentData = getEditingRowData();
|
|
24654
|
+
var currentData = props.getEditingRowData();
|
|
24456
24655
|
if (currentData) {
|
|
24457
|
-
ObjectUtils.mutateFieldData(currentData, field, val);
|
|
24656
|
+
ObjectUtils.mutateFieldData(currentData, props.field, val);
|
|
24458
24657
|
}
|
|
24459
24658
|
editingRowDataStateRef.current = editingRowData;
|
|
24460
24659
|
};
|
|
24461
24660
|
var _onClick = function onClick(event) {
|
|
24462
|
-
|
|
24463
|
-
if (props.editMode !== 'row' && isEditable() && !editingState && (props.selectOnEdit || !props.selectOnEdit && props.selected)) {
|
|
24464
|
-
selfClick.current = true;
|
|
24465
|
-
var onBeforeCellEditShow = getColumnProp('onBeforeCellEditShow');
|
|
24466
|
-
var onCellEditInit = getColumnProp('onCellEditInit');
|
|
24467
|
-
var cellEditValidatorEvent = getColumnProp('cellEditValidatorEvent');
|
|
24468
|
-
if (onBeforeCellEditShow) {
|
|
24469
|
-
// if user returns false do not show the editor
|
|
24470
|
-
if (onBeforeCellEditShow(params) === false) {
|
|
24471
|
-
return;
|
|
24472
|
-
}
|
|
24473
|
-
|
|
24474
|
-
// if user prevents default stop the editor
|
|
24475
|
-
if (event && event.defaultPrevented) {
|
|
24476
|
-
return;
|
|
24477
|
-
}
|
|
24478
|
-
}
|
|
24479
|
-
|
|
24480
|
-
// If the data is sorted using sort icon, it has been added to wait for the sort operation when any cell is wanted to be opened.
|
|
24481
|
-
setTimeout(function () {
|
|
24482
|
-
setEditingState(true);
|
|
24483
|
-
if (onCellEditInit) {
|
|
24484
|
-
if (onCellEditInit(params) === false) {
|
|
24485
|
-
return;
|
|
24486
|
-
}
|
|
24487
|
-
|
|
24488
|
-
// if user prevents default stop the editor
|
|
24489
|
-
if (event && event.defaultPrevented) {
|
|
24490
|
-
return;
|
|
24491
|
-
}
|
|
24492
|
-
}
|
|
24493
|
-
if (cellEditValidatorEvent === 'click') {
|
|
24494
|
-
bindDocumentClickListener();
|
|
24495
|
-
overlayEventListener.current = function (e) {
|
|
24496
|
-
if (!isOutsideClicked(e.target)) {
|
|
24497
|
-
selfClick.current = true;
|
|
24498
|
-
}
|
|
24499
|
-
};
|
|
24500
|
-
OverlayService.on('overlay-click', overlayEventListener.current);
|
|
24501
|
-
}
|
|
24502
|
-
}, 1);
|
|
24503
|
-
}
|
|
24504
|
-
if (props.allowCellSelection && props.onClick) {
|
|
24505
|
-
props.onClick(params);
|
|
24506
|
-
}
|
|
24661
|
+
props.onClick(event, getCellCallbackParams(event), isEditable(), editingState, setEditingState, selfClick, props.column, bindDocumentClickListener, overlayEventListener, isOutsideClicked);
|
|
24507
24662
|
};
|
|
24508
24663
|
var _onMouseDown = function onMouseDown(event) {
|
|
24509
24664
|
var params = getCellCallbackParams(event);
|
|
@@ -24527,7 +24682,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24527
24682
|
cell = event.currentTarget;
|
|
24528
24683
|
switch (event.code) {
|
|
24529
24684
|
case 'ArrowLeft':
|
|
24530
|
-
var prevCell =
|
|
24685
|
+
var prevCell = props.findPrevSelectableCell(cell);
|
|
24531
24686
|
if (prevCell) {
|
|
24532
24687
|
changeTabIndex(cell, prevCell);
|
|
24533
24688
|
prevCell.focus();
|
|
@@ -24535,7 +24690,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24535
24690
|
event.preventDefault();
|
|
24536
24691
|
break;
|
|
24537
24692
|
case 'ArrowRight':
|
|
24538
|
-
var nextCell =
|
|
24693
|
+
var nextCell = props.findNextSelectableCell(cell);
|
|
24539
24694
|
if (nextCell) {
|
|
24540
24695
|
changeTabIndex(cell, nextCell);
|
|
24541
24696
|
nextCell.focus();
|
|
@@ -24543,7 +24698,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24543
24698
|
event.preventDefault();
|
|
24544
24699
|
break;
|
|
24545
24700
|
case 'ArrowUp':
|
|
24546
|
-
var upCell =
|
|
24701
|
+
var upCell = props.findUpSelectableCell(cell, index);
|
|
24547
24702
|
if (upCell) {
|
|
24548
24703
|
changeTabIndex(cell, upCell);
|
|
24549
24704
|
upCell.focus();
|
|
@@ -24551,7 +24706,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24551
24706
|
event.preventDefault();
|
|
24552
24707
|
break;
|
|
24553
24708
|
case 'ArrowDown':
|
|
24554
|
-
var downCell =
|
|
24709
|
+
var downCell = props.findDownSelectableCell(cell, index);
|
|
24555
24710
|
if (downCell) {
|
|
24556
24711
|
changeTabIndex(cell, downCell);
|
|
24557
24712
|
downCell.focus();
|
|
@@ -24590,13 +24745,6 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24590
24745
|
index: props.rowIndex
|
|
24591
24746
|
});
|
|
24592
24747
|
};
|
|
24593
|
-
var onCheckboxChange = function onCheckboxChange(event) {
|
|
24594
|
-
props.onCheckboxChange({
|
|
24595
|
-
originalEvent: event,
|
|
24596
|
-
data: props.rowData,
|
|
24597
|
-
index: props.rowIndex
|
|
24598
|
-
});
|
|
24599
|
-
};
|
|
24600
24748
|
var onRowToggle = function onRowToggle(event) {
|
|
24601
24749
|
props.onRowToggle({
|
|
24602
24750
|
originalEvent: event,
|
|
@@ -24609,8 +24757,8 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24609
24757
|
props.onRowEditInit({
|
|
24610
24758
|
originalEvent: event,
|
|
24611
24759
|
data: props.rowData,
|
|
24612
|
-
newData: getEditingRowData(),
|
|
24613
|
-
field: field,
|
|
24760
|
+
newData: props.getEditingRowData(),
|
|
24761
|
+
field: props.field,
|
|
24614
24762
|
index: props.rowIndex
|
|
24615
24763
|
});
|
|
24616
24764
|
};
|
|
@@ -24618,32 +24766,26 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24618
24766
|
props.onRowEditSave({
|
|
24619
24767
|
originalEvent: event,
|
|
24620
24768
|
data: props.rowData,
|
|
24621
|
-
newData: getEditingRowData(),
|
|
24622
|
-
field: field,
|
|
24769
|
+
newData: props.getEditingRowData(),
|
|
24770
|
+
field: props.field,
|
|
24623
24771
|
index: props.rowIndex
|
|
24624
24772
|
});
|
|
24625
|
-
focusOnInit();
|
|
24773
|
+
props.focusOnInit(initFocusTimeout, elementRef);
|
|
24626
24774
|
};
|
|
24627
24775
|
var onRowEditCancel = function onRowEditCancel(event) {
|
|
24628
24776
|
props.onRowEditCancel({
|
|
24629
24777
|
originalEvent: event,
|
|
24630
24778
|
data: props.rowData,
|
|
24631
|
-
newData: getEditingRowData(),
|
|
24632
|
-
field: field,
|
|
24779
|
+
newData: props.getEditingRowData(),
|
|
24780
|
+
field: props.field,
|
|
24633
24781
|
index: props.rowIndex
|
|
24634
24782
|
});
|
|
24635
|
-
focusOnInit();
|
|
24783
|
+
props.focusOnInit(initFocusTimeout, elementRef);
|
|
24636
24784
|
};
|
|
24637
24785
|
React.useEffect(function () {
|
|
24638
|
-
if (
|
|
24639
|
-
|
|
24640
|
-
|
|
24641
|
-
});
|
|
24642
|
-
React.useEffect(function () {
|
|
24643
|
-
if (props.editMode === 'cell' || props.editMode === 'row') {
|
|
24644
|
-
focusOnElement();
|
|
24645
|
-
}
|
|
24646
|
-
}, [props.editMode, props.editing, editingState]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
24786
|
+
if (props.frozenCol) props.updateStickyPosition(elementRef, props.frozenCol, props.alignFrozenCol, styleObjectState, setStyleObjectState);
|
|
24787
|
+
if (props.editMode === 'cell' || props.editMode === 'row') props.focusOnElement(focusTimeout, editingState, elementRef, keyHelperRef);
|
|
24788
|
+
}, [props.editMode, props.editing, editingState, props.frozenCol, props.alignFrozenCol]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
24647
24789
|
|
|
24648
24790
|
React.useEffect(function () {
|
|
24649
24791
|
if (props.editMode === 'row' && props.editing !== editingState) {
|
|
@@ -24652,7 +24794,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24652
24794
|
}, [props.editMode, props.editing, editingState]);
|
|
24653
24795
|
useUpdateEffect(function () {
|
|
24654
24796
|
if (props.editMode === 'cell' || props.editMode === 'row') {
|
|
24655
|
-
var editingRowData = getEditingRowData();
|
|
24797
|
+
var editingRowData = props.getEditingRowData();
|
|
24656
24798
|
setEditingRowDataState(editingRowData);
|
|
24657
24799
|
editingRowDataStateRef.current = editingRowData;
|
|
24658
24800
|
}
|
|
@@ -24662,7 +24804,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24662
24804
|
var callbackParams = getCellCallbackParams();
|
|
24663
24805
|
var params = _objectSpread$1i(_objectSpread$1i({}, callbackParams), {}, {
|
|
24664
24806
|
editing: editingState,
|
|
24665
|
-
editingKey: editingKey
|
|
24807
|
+
editingKey: props.editingKey
|
|
24666
24808
|
});
|
|
24667
24809
|
props.onEditingMetaChange(params);
|
|
24668
24810
|
}
|
|
@@ -24675,16 +24817,16 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24675
24817
|
}
|
|
24676
24818
|
});
|
|
24677
24819
|
var createLoading = function createLoading() {
|
|
24678
|
-
var options = getVirtualScrollerOption('getLoaderOptions')(props.rowIndex, {
|
|
24820
|
+
var options = props.getVirtualScrollerOption('getLoaderOptions')(props.rowIndex, {
|
|
24679
24821
|
cellIndex: props.index,
|
|
24680
24822
|
cellFirst: props.index === 0,
|
|
24681
|
-
cellLast: props.index === getVirtualScrollerOption('columns').length - 1,
|
|
24823
|
+
cellLast: props.index === props.getVirtualScrollerOption('columns').length - 1,
|
|
24682
24824
|
cellEven: props.index % 2 === 0,
|
|
24683
24825
|
cellOdd: props.index % 2 !== 0,
|
|
24684
24826
|
column: props.column,
|
|
24685
|
-
field: field
|
|
24827
|
+
field: props.field
|
|
24686
24828
|
});
|
|
24687
|
-
var content = ObjectUtils.getJSXElement(getVirtualScrollerOption('loadingTemplate'), options);
|
|
24829
|
+
var content = ObjectUtils.getJSXElement(props.getVirtualScrollerOption('loadingTemplate'), options);
|
|
24688
24830
|
var bodyCellProps = mergeProps(getColumnPTOptions('bodyCell'), {
|
|
24689
24831
|
role: 'cell'
|
|
24690
24832
|
});
|
|
@@ -24693,20 +24835,20 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24693
24835
|
var createElement = function createElement() {
|
|
24694
24836
|
var content;
|
|
24695
24837
|
var editorKeyHelper;
|
|
24696
|
-
var cellSelected = props.allowCellSelection &&
|
|
24838
|
+
var cellSelected = props.allowCellSelection && props.isCellSelected;
|
|
24697
24839
|
var isRowEditor = props.editMode === 'row';
|
|
24698
|
-
var tabIndex = getTabIndex(cellSelected);
|
|
24840
|
+
var tabIndex = props.getTabIndex(cellSelected, props.index);
|
|
24699
24841
|
var selectionMode = getColumnProp('selectionMode');
|
|
24700
24842
|
var rowReorder = getColumnProp('rowReorder');
|
|
24701
24843
|
var header = getColumnProp('header');
|
|
24702
24844
|
var body = getColumnProp('body');
|
|
24703
24845
|
var editor = getColumnProp('editor');
|
|
24704
|
-
var frozen =
|
|
24846
|
+
var frozen = props.frozenCol;
|
|
24705
24847
|
var align = getColumnProp('align');
|
|
24706
|
-
var value = resolveFieldData();
|
|
24848
|
+
var value = props.resolveFieldData();
|
|
24707
24849
|
var columnBodyOptions = {
|
|
24708
24850
|
column: props.column,
|
|
24709
|
-
field: field,
|
|
24851
|
+
field: props.field,
|
|
24710
24852
|
rowIndex: props.rowIndex,
|
|
24711
24853
|
frozenRow: props.frozenRow,
|
|
24712
24854
|
props: props.tableProps
|
|
@@ -24731,12 +24873,12 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24731
24873
|
if (showSelection) {
|
|
24732
24874
|
var ariaLabelField = props.selectionAriaLabel || props.tableProps.dataKey;
|
|
24733
24875
|
var ariaLabelText = ObjectUtils.resolveFieldData(props.rowData, ariaLabelField);
|
|
24734
|
-
label = "".concat(props.
|
|
24876
|
+
label = "".concat(props.isRowSelected ? ariaLabel('unselectRow') : ariaLabel('selectRow'), " ").concat(ariaLabelText);
|
|
24735
24877
|
}
|
|
24736
24878
|
content = showSelection && /*#__PURE__*/React.createElement(React.Fragment, null, selectionMode === 'single' && /*#__PURE__*/React.createElement(RowRadioButton, {
|
|
24737
24879
|
hostName: props.hostName,
|
|
24738
24880
|
column: props.column,
|
|
24739
|
-
checked: props.
|
|
24881
|
+
checked: props.isRowSelected,
|
|
24740
24882
|
disabled: !props.isSelectable({
|
|
24741
24883
|
data: props.rowData,
|
|
24742
24884
|
index: props.rowIndex
|
|
@@ -24751,12 +24893,12 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24751
24893
|
}), selectionMode === 'multiple' && /*#__PURE__*/React.createElement(RowCheckbox, {
|
|
24752
24894
|
hostName: props.hostName,
|
|
24753
24895
|
column: props.column,
|
|
24754
|
-
checked: props.
|
|
24896
|
+
checked: props.isRowSelected,
|
|
24755
24897
|
disabled: !props.isSelectable({
|
|
24756
24898
|
data: props.rowData,
|
|
24757
24899
|
index: props.rowIndex
|
|
24758
24900
|
}),
|
|
24759
|
-
onChange: onCheckboxChange,
|
|
24901
|
+
onChange: props.onCheckboxChange,
|
|
24760
24902
|
tabIndex: props.tabIndex,
|
|
24761
24903
|
ariaLabel: label,
|
|
24762
24904
|
checkIcon: props.checkIcon,
|
|
@@ -24806,7 +24948,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24806
24948
|
expanderProps.element = content;
|
|
24807
24949
|
content = ObjectUtils.getJSXElement(body, props.rowData, {
|
|
24808
24950
|
column: props.column,
|
|
24809
|
-
field: field,
|
|
24951
|
+
field: props.field,
|
|
24810
24952
|
rowIndex: props.rowIndex,
|
|
24811
24953
|
frozenRow: props.frozenRow,
|
|
24812
24954
|
props: props.tableProps,
|
|
@@ -24880,7 +25022,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24880
25022
|
rowEditorProps.element = content;
|
|
24881
25023
|
content = ObjectUtils.getJSXElement(body, props.rowData, {
|
|
24882
25024
|
column: props.column,
|
|
24883
|
-
field: field,
|
|
25025
|
+
field: props.field,
|
|
24884
25026
|
rowIndex: props.rowIndex,
|
|
24885
25027
|
frozenRow: props.frozenRow,
|
|
24886
25028
|
props: props.tableProps,
|
|
@@ -24890,7 +25032,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24890
25032
|
} else if (body && (!editingState || !editor)) {
|
|
24891
25033
|
content = body ? ObjectUtils.getJSXElement(body, props.rowData, {
|
|
24892
25034
|
column: props.column,
|
|
24893
|
-
field: field,
|
|
25035
|
+
field: props.field,
|
|
24894
25036
|
rowIndex: props.rowIndex,
|
|
24895
25037
|
frozenRow: props.frozenRow,
|
|
24896
25038
|
props: props.tableProps
|
|
@@ -24898,9 +25040,9 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24898
25040
|
} else if (editor && editingState) {
|
|
24899
25041
|
content = ObjectUtils.getJSXElement(editor, {
|
|
24900
25042
|
rowData: editingRowDataState,
|
|
24901
|
-
value: resolveFieldData(editingRowDataState),
|
|
25043
|
+
value: props.resolveFieldData(editingRowDataState),
|
|
24902
25044
|
column: props.column,
|
|
24903
|
-
field: field,
|
|
25045
|
+
field: props.field,
|
|
24904
25046
|
rowIndex: props.rowIndex,
|
|
24905
25047
|
frozenRow: props.frozenRow,
|
|
24906
25048
|
props: props.tableProps,
|
|
@@ -24968,7 +25110,29 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
24968
25110
|
ref: elementRef
|
|
24969
25111
|
}, bodyCellProps), editorKeyHelper, title, content);
|
|
24970
25112
|
};
|
|
24971
|
-
return getVirtualScrollerOption('loading') ? createLoading() : createElement();
|
|
25113
|
+
return props.getVirtualScrollerOption('loading') ? createLoading() : createElement();
|
|
25114
|
+
};
|
|
25115
|
+
|
|
25116
|
+
// RadioCheckCell is used for the Radio and Checkbox selection and has the isRowSelected dependency
|
|
25117
|
+
var RadioCheckCell = /*#__PURE__*/React.memo(function (props) {
|
|
25118
|
+
return /*#__PURE__*/React.createElement(Cell, props);
|
|
25119
|
+
}, function (prevProps, nextProps) {
|
|
25120
|
+
var keysToCompare = ['isRowSelected', 'field', 'allowCellSelection', 'isCellSelected', 'editMode', 'index', 'tabIndex', 'editing', 'expanded', 'editingMeta', 'rowData'];
|
|
25121
|
+
return ObjectUtils.selectiveCompare(prevProps, nextProps, keysToCompare);
|
|
25122
|
+
});
|
|
25123
|
+
RadioCheckCell.displayName = 'RadioCheckCell';
|
|
25124
|
+
var defaultKeysToCompare = ['rowData', 'field', 'allowCellSelection', 'isCellSelected', 'editMode', 'index', 'tabIndex', 'editing', 'expanded', 'editingMeta', 'frozenCol', 'alignFrozenCol'];
|
|
25125
|
+
var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
25126
|
+
return /*#__PURE__*/React.createElement(Cell, props);
|
|
25127
|
+
}, function (prevProps, nextProps) {
|
|
25128
|
+
if (nextProps.cellMemo === false) return false;
|
|
25129
|
+
var memoProps = nextProps.cellMemoProps;
|
|
25130
|
+
var keysToCompare = Array.isArray(memoProps) && memoProps.every(function (prop) {
|
|
25131
|
+
return typeof prop === 'string';
|
|
25132
|
+
}) ? memoProps : defaultKeysToCompare;
|
|
25133
|
+
var memoPropsDepth = nextProps.cellMemoPropsDepth;
|
|
25134
|
+
var depth = typeof memoPropsDepth === 'number' && memoPropsDepth > 0 ? memoPropsDepth : 1;
|
|
25135
|
+
return ObjectUtils.selectiveCompare(prevProps, nextProps, keysToCompare, depth);
|
|
24972
25136
|
});
|
|
24973
25137
|
BodyCell.displayName = 'BodyCell';
|
|
24974
25138
|
|
|
@@ -24984,6 +25148,7 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
|
24984
25148
|
var _props$ptCallbacks = props.ptCallbacks,
|
|
24985
25149
|
ptm = _props$ptCallbacks.ptm,
|
|
24986
25150
|
cx = _props$ptCallbacks.cx;
|
|
25151
|
+
var isRowSelected = !props.allowCellSelection && props.selected || props.contextMenuSelected;
|
|
24987
25152
|
var getBodyRowPTOptions = function getBodyRowPTOptions(key) {
|
|
24988
25153
|
return ptm(key, {
|
|
24989
25154
|
parent: props.metaData,
|
|
@@ -24997,7 +25162,7 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
|
24997
25162
|
data: props.rowData,
|
|
24998
25163
|
index: props.rowIndex
|
|
24999
25164
|
}),
|
|
25000
|
-
selected:
|
|
25165
|
+
selected: isRowSelected,
|
|
25001
25166
|
stripedRows: props.metaData.props.stripedRows
|
|
25002
25167
|
}
|
|
25003
25168
|
});
|
|
@@ -25026,10 +25191,10 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
|
25026
25191
|
return equals(rowData, data);
|
|
25027
25192
|
});
|
|
25028
25193
|
};
|
|
25029
|
-
var changeTabIndex = function changeTabIndex(
|
|
25030
|
-
if (
|
|
25031
|
-
|
|
25032
|
-
|
|
25194
|
+
var changeTabIndex = function changeTabIndex(currentElement, nextElement) {
|
|
25195
|
+
if (currentElement && nextElement) {
|
|
25196
|
+
currentElement.tabIndex = -1;
|
|
25197
|
+
nextElement.tabIndex = props.tabIndex;
|
|
25033
25198
|
}
|
|
25034
25199
|
};
|
|
25035
25200
|
var findFirstSelectableRow = function findFirstSelectableRow(row) {
|
|
@@ -25356,32 +25521,179 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
|
25356
25521
|
onEditChange(e, false);
|
|
25357
25522
|
event.preventDefault();
|
|
25358
25523
|
};
|
|
25524
|
+
var equalsDataCell = function equalsDataCell(data) {
|
|
25525
|
+
return props.compareSelectionBy === 'equals' ? data === props.rowData : ObjectUtils.equals(data, props.rowData, props.dataKey);
|
|
25526
|
+
};
|
|
25527
|
+
var equalsCell = function equalsCell(selectedCell, field, colIndex) {
|
|
25528
|
+
return selectedCell && (selectedCell.rowIndex === props.rowIndex || equalsDataCell(selectedCell.rowData)) && (selectedCell.field === field || selectedCell.cellIndex === colIndex);
|
|
25529
|
+
};
|
|
25530
|
+
var findIndexCell = function findIndexCell(collection, field, colIndex) {
|
|
25531
|
+
return (collection || []).findIndex(function (data) {
|
|
25532
|
+
return equalsCell(data, field, colIndex);
|
|
25533
|
+
});
|
|
25534
|
+
};
|
|
25535
|
+
var isCellSelected = function isCellSelected(selection, field, colIndex) {
|
|
25536
|
+
return selection ? selection instanceof Array ? findIndexCell(selection, field, colIndex) > -1 : equalsCell(selection, field, colIndex) : false;
|
|
25537
|
+
};
|
|
25538
|
+
var onCheckboxChange = function onCheckboxChange(event) {
|
|
25539
|
+
props.onCheckboxChange({
|
|
25540
|
+
originalEvent: event,
|
|
25541
|
+
data: props.rowData,
|
|
25542
|
+
index: props.rowIndex
|
|
25543
|
+
});
|
|
25544
|
+
};
|
|
25545
|
+
var editingKey = props.dataKey ? props.rowData && props.rowData[props.dataKey] || props.rowIndex : props.rowIndex;
|
|
25546
|
+
var getVirtualScrollerOption = React.useCallback(function (option) {
|
|
25547
|
+
return props.virtualScrollerOptions ? props.virtualScrollerOptions[option] : null;
|
|
25548
|
+
}, [props.virtualScrollerOptions]);
|
|
25549
|
+
var getEditingRowData = function getEditingRowData() {
|
|
25550
|
+
return props.editingMeta && props.editingMeta[editingKey] ? props.editingMeta[editingKey].data : props.rowData;
|
|
25551
|
+
};
|
|
25552
|
+
var getTabIndexCell = React.useCallback(function (cellSelected, cellIndex) {
|
|
25553
|
+
return props.allowCellSelection ? cellSelected ? 0 : props.rowIndex === 0 && cellIndex === 0 ? props.tabIndex : -1 : null;
|
|
25554
|
+
}, [props.allowCellSelection, props.rowIndex, props.tabIndex]);
|
|
25555
|
+
var findNextSelectableCell = React.useCallback(function (cell) {
|
|
25556
|
+
var nextCell = cell.nextElementSibling;
|
|
25557
|
+
return nextCell ? DomHandler.getAttribute(nextCell, 'data-p-selectable-cell') ? nextCell : findNextSelectableCell(nextCell) : null;
|
|
25558
|
+
}, []);
|
|
25559
|
+
var findPrevSelectableCell = React.useCallback(function (cell) {
|
|
25560
|
+
var prevCell = cell.previousElementSibling;
|
|
25561
|
+
return prevCell ? DomHandler.getAttribute(prevCell, 'data-p-selectable-cell') ? prevCell : findPrevSelectableCell(prevCell) : null;
|
|
25562
|
+
}, []);
|
|
25563
|
+
var findDownSelectableCell = React.useCallback(function (cell, cellIndex) {
|
|
25564
|
+
var downRow = cell.parentElement.nextElementSibling;
|
|
25565
|
+
var downCell = downRow ? downRow.children[cellIndex] : null;
|
|
25566
|
+
return downRow && downCell ? DomHandler.getAttribute(downRow, 'data-p-selectable-row') && DomHandler.getAttribute(downCell, 'data-p-selectable-cell') ? downCell : findDownSelectableCell(downCell) : null;
|
|
25567
|
+
}, []);
|
|
25568
|
+
var findUpSelectableCell = React.useCallback(function (cell, cellIndex) {
|
|
25569
|
+
var upRow = cell.parentElement.previousElementSibling;
|
|
25570
|
+
var upCell = upRow ? upRow.children[cellIndex] : null;
|
|
25571
|
+
return upRow && upCell ? DomHandler.getAttribute(upRow, 'data-p-selectable-row') && DomHandler.getAttribute(upCell, 'data-p-selectable-cell') ? upCell : findUpSelectableCell(upCell) : null;
|
|
25572
|
+
}, []);
|
|
25573
|
+
var focusOnElement = React.useCallback(function (focusTimeoutRef, editingState, elementRef, keyHelperRef) {
|
|
25574
|
+
clearTimeout(focusTimeoutRef.current);
|
|
25575
|
+
focusTimeoutRef.current = setTimeout(function () {
|
|
25576
|
+
if (editingState) {
|
|
25577
|
+
var focusableEl = props.editMode === 'cell' ? DomHandler.getFirstFocusableElement(elementRef.current, ':not([data-pc-section="editorkeyhelperlabel"])') : DomHandler.findSingle(elementRef.current, '[data-p-row-editor-save="true"]');
|
|
25578
|
+
focusableEl && focusableEl.focus();
|
|
25579
|
+
}
|
|
25580
|
+
keyHelperRef.current && (keyHelperRef.current.tabIndex = editingState ? -1 : 0);
|
|
25581
|
+
}, 1);
|
|
25582
|
+
}, [props.editMode]);
|
|
25583
|
+
var focusOnInit = React.useCallback(function (initFocusTimeoutRef, elementRef) {
|
|
25584
|
+
clearTimeout(initFocusTimeoutRef.current);
|
|
25585
|
+
initFocusTimeoutRef.current = setTimeout(function () {
|
|
25586
|
+
var focusableEl = props.editMode === 'row' ? DomHandler.findSingle(elementRef.current, '[data-p-row-editor-init="true"]') : null;
|
|
25587
|
+
focusableEl && focusableEl.focus();
|
|
25588
|
+
}, 1);
|
|
25589
|
+
}, [props.editMode]);
|
|
25590
|
+
var updateStickyPosition = React.useCallback(function (elementRef, frozen, alignFrozen, styleObjectState, setStyleObjectState) {
|
|
25591
|
+
if (frozen) {
|
|
25592
|
+
var styleObject = _objectSpread$1h({}, styleObjectState);
|
|
25593
|
+
if (alignFrozen === 'right') {
|
|
25594
|
+
var right = 0;
|
|
25595
|
+
var next = elementRef.current && elementRef.current.nextElementSibling;
|
|
25596
|
+
if (next && next.classList.contains('p-frozen-column')) {
|
|
25597
|
+
right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0);
|
|
25598
|
+
}
|
|
25599
|
+
styleObject.right = right + 'px';
|
|
25600
|
+
} else {
|
|
25601
|
+
var left = 0;
|
|
25602
|
+
var prev = elementRef.current && elementRef.current.previousElementSibling;
|
|
25603
|
+
if (prev && prev.classList.contains('p-frozen-column')) {
|
|
25604
|
+
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
|
25605
|
+
}
|
|
25606
|
+
styleObject.left = left + 'px';
|
|
25607
|
+
}
|
|
25608
|
+
var isSameStyle = styleObjectState.left === styleObject.left && styleObjectState.right === styleObject.right;
|
|
25609
|
+
!isSameStyle && setStyleObjectState(styleObject);
|
|
25610
|
+
}
|
|
25611
|
+
}, []);
|
|
25612
|
+
var onCellClick = function onCellClick(event, params, isEditable, editingState, setEditingState, selfClick, column, bindDocumentClickListener, overlayEventListener, isOutsideClicked) {
|
|
25613
|
+
if (props.editMode !== 'row' && isEditable && !editingState && (props.selectOnEdit || !props.selectOnEdit && props.isRowSelected)) {
|
|
25614
|
+
selfClick.current = true;
|
|
25615
|
+
var onBeforeCellEditShow = getColumnProp(column, 'onBeforeCellEditShow');
|
|
25616
|
+
var onCellEditInit = getColumnProp(column, 'onCellEditInit');
|
|
25617
|
+
var cellEditValidatorEvent = getColumnProp(column, 'cellEditValidatorEvent');
|
|
25618
|
+
if (onBeforeCellEditShow) {
|
|
25619
|
+
// if user returns false do not show the editor
|
|
25620
|
+
if (onBeforeCellEditShow(params) === false) {
|
|
25621
|
+
return;
|
|
25622
|
+
}
|
|
25623
|
+
|
|
25624
|
+
// if user prevents default stop the editor
|
|
25625
|
+
if (event && event.defaultPrevented) {
|
|
25626
|
+
return;
|
|
25627
|
+
}
|
|
25628
|
+
}
|
|
25629
|
+
|
|
25630
|
+
// If the data is sorted using sort icon, it has been added to wait for the sort operation when any cell is wanted to be opened.
|
|
25631
|
+
setTimeout(function () {
|
|
25632
|
+
setEditingState(true);
|
|
25633
|
+
if (onCellEditInit) {
|
|
25634
|
+
if (onCellEditInit(params) === false) {
|
|
25635
|
+
return;
|
|
25636
|
+
}
|
|
25637
|
+
|
|
25638
|
+
// if user prevents default stop the editor
|
|
25639
|
+
if (event && event.defaultPrevented) {
|
|
25640
|
+
return;
|
|
25641
|
+
}
|
|
25642
|
+
}
|
|
25643
|
+
if (cellEditValidatorEvent === 'click') {
|
|
25644
|
+
bindDocumentClickListener();
|
|
25645
|
+
overlayEventListener.current = function (e) {
|
|
25646
|
+
if (!isOutsideClicked(e.target)) {
|
|
25647
|
+
selfClick.current = true;
|
|
25648
|
+
}
|
|
25649
|
+
};
|
|
25650
|
+
OverlayService.on('overlay-click', overlayEventListener.current);
|
|
25651
|
+
}
|
|
25652
|
+
}, 1);
|
|
25653
|
+
}
|
|
25654
|
+
if (props.allowCellSelection && props.onCellClick) {
|
|
25655
|
+
props.onCellClick(params);
|
|
25656
|
+
}
|
|
25657
|
+
};
|
|
25359
25658
|
var createContent = function createContent() {
|
|
25360
25659
|
return props.columns.map(function (col, i) {
|
|
25361
25660
|
if (shouldRenderBodyCell(props.value, col, props.index)) {
|
|
25362
25661
|
var key = "".concat(props.rowIndex, "_").concat(getColumnProp(col, 'columnKey') || getColumnProp(col, 'field'), "_").concat(i);
|
|
25363
25662
|
var rowSpan = props.rowGroupMode === 'rowspan' ? calculateRowGroupSize(props.value, col, props.index) : null;
|
|
25364
|
-
|
|
25663
|
+
var field = getColumnProp(col, 'field') || "field_".concat(i);
|
|
25664
|
+
var resolveFieldData = function resolveFieldData(data) {
|
|
25665
|
+
return ObjectUtils.resolveFieldData(data || props.rowData, field);
|
|
25666
|
+
};
|
|
25667
|
+
var selectionMode = getColumnProp(col, 'selectionMode');
|
|
25668
|
+
var cellProps = mergeProps({
|
|
25365
25669
|
hostName: props.hostName,
|
|
25366
|
-
key: key,
|
|
25367
25670
|
allowCellSelection: props.allowCellSelection,
|
|
25671
|
+
cellMemo: props.cellMemo,
|
|
25672
|
+
cellMemoProps: props.cellMemoProps,
|
|
25673
|
+
cellMemoPropsDepth: props.cellMemoPropsDepth,
|
|
25368
25674
|
cellClassName: props.cellClassName,
|
|
25369
25675
|
checkIcon: props.checkIcon,
|
|
25370
25676
|
collapsedRowIcon: props.collapsedRowIcon,
|
|
25677
|
+
field: field,
|
|
25678
|
+
resolveFieldData: resolveFieldData,
|
|
25371
25679
|
column: col,
|
|
25372
|
-
|
|
25680
|
+
cProps: props.colsProps[i],
|
|
25373
25681
|
dataKey: props.dataKey,
|
|
25374
25682
|
editMode: props.editMode,
|
|
25375
25683
|
editing: editing,
|
|
25376
25684
|
editingMeta: props.editingMeta,
|
|
25685
|
+
onEditingMetaChange: props.onEditingMetaChange,
|
|
25686
|
+
editingKey: editingKey,
|
|
25687
|
+
getEditingRowData: getEditingRowData,
|
|
25377
25688
|
expanded: props.expanded,
|
|
25378
25689
|
expandedRowIcon: props.expandedRowIcon,
|
|
25379
25690
|
frozenRow: props.frozenRow,
|
|
25691
|
+
frozenCol: getColumnProp(col, 'frozen'),
|
|
25692
|
+
alignFrozenCol: getColumnProp(col, 'alignFrozen'),
|
|
25380
25693
|
index: i,
|
|
25381
25694
|
isSelectable: props.isSelectable,
|
|
25382
|
-
onCheckboxChange:
|
|
25383
|
-
onClick:
|
|
25384
|
-
onEditingMetaChange: props.onEditingMetaChange,
|
|
25695
|
+
onCheckboxChange: onCheckboxChange,
|
|
25696
|
+
onClick: onCellClick,
|
|
25385
25697
|
onMouseDown: props.onCellMouseDown,
|
|
25386
25698
|
onMouseUp: props.onCellMouseUp,
|
|
25387
25699
|
onRadioChange: props.onRadioChange,
|
|
@@ -25397,20 +25709,31 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
|
25397
25709
|
rowIndex: props.rowIndex,
|
|
25398
25710
|
rowSpan: rowSpan,
|
|
25399
25711
|
selectOnEdit: props.selectOnEdit,
|
|
25400
|
-
|
|
25401
|
-
|
|
25712
|
+
isRowSelected: isRowSelected,
|
|
25713
|
+
isCellSelected: isCellSelected(props.selection, field, i),
|
|
25402
25714
|
selectionAriaLabel: props.tableProps.selectionAriaLabel,
|
|
25403
25715
|
showRowReorderElement: props.showRowReorderElement,
|
|
25404
25716
|
showSelectionElement: props.showSelectionElement,
|
|
25405
25717
|
tabIndex: props.tabIndex,
|
|
25718
|
+
getTabIndex: getTabIndexCell,
|
|
25406
25719
|
tableProps: props.tableProps,
|
|
25407
25720
|
tableSelector: props.tableSelector,
|
|
25408
25721
|
value: props.value,
|
|
25409
|
-
|
|
25722
|
+
getVirtualScrollerOption: getVirtualScrollerOption,
|
|
25410
25723
|
ptCallbacks: props.ptCallbacks,
|
|
25411
25724
|
metaData: props.metaData,
|
|
25412
|
-
unstyled: props.unstyled
|
|
25725
|
+
unstyled: props.unstyled,
|
|
25726
|
+
findNextSelectableCell: findNextSelectableCell,
|
|
25727
|
+
findPrevSelectableCell: findPrevSelectableCell,
|
|
25728
|
+
findDownSelectableCell: findDownSelectableCell,
|
|
25729
|
+
findUpSelectableCell: findUpSelectableCell,
|
|
25730
|
+
focusOnElement: focusOnElement,
|
|
25731
|
+
focusOnInit: focusOnInit,
|
|
25732
|
+
updateStickyPosition: updateStickyPosition
|
|
25413
25733
|
});
|
|
25734
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
|
25735
|
+
key: key
|
|
25736
|
+
}, selectionMode ? /*#__PURE__*/React.createElement(RadioCheckCell, cellProps) : /*#__PURE__*/React.createElement(BodyCell, cellProps));
|
|
25414
25737
|
}
|
|
25415
25738
|
return null;
|
|
25416
25739
|
});
|
|
@@ -25560,8 +25883,11 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
25560
25883
|
var getColumnProps = function getColumnProps(column) {
|
|
25561
25884
|
return ColumnBase.getCProps(column);
|
|
25562
25885
|
};
|
|
25886
|
+
var cProps = getColumnProps(props.column);
|
|
25887
|
+
var colsProps = props.columns ? props.columns.map(function (col) {
|
|
25888
|
+
return getColumnProps(col);
|
|
25889
|
+
}) : [];
|
|
25563
25890
|
var getColumnPTOptions = function getColumnPTOptions(key) {
|
|
25564
|
-
var cProps = getColumnProps(props.column);
|
|
25565
25891
|
var columnMetaData = {
|
|
25566
25892
|
props: cProps,
|
|
25567
25893
|
parent: props.metaData,
|
|
@@ -25686,8 +26012,12 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
25686
26012
|
var allowSelection = function allowSelection(event) {
|
|
25687
26013
|
return !DomHandler.isClickable(event.originalEvent.target);
|
|
25688
26014
|
};
|
|
26015
|
+
var metaKeySelectionRef = React.useRef(props.metaKeySelection);
|
|
26016
|
+
React.useEffect(function () {
|
|
26017
|
+
metaKeySelectionRef.current = props.metaKeySelection;
|
|
26018
|
+
}, [props.metaKeySelection]);
|
|
25689
26019
|
var allowMetaKeySelection = function allowMetaKeySelection(event) {
|
|
25690
|
-
return !rowTouched.current && (!
|
|
26020
|
+
return !rowTouched.current && (!metaKeySelectionRef.current || metaKeySelectionRef.current && (event.originalEvent.metaKey || event.originalEvent.ctrlKey));
|
|
25691
26021
|
};
|
|
25692
26022
|
var allowRangeSelection = function allowRangeSelection(event) {
|
|
25693
26023
|
return isMultipleSelection() && event.originalEvent.shiftKey && anchorRowIndex.current !== null;
|
|
@@ -25708,9 +26038,6 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
25708
26038
|
options = options || props.virtualScrollerOptions;
|
|
25709
26039
|
return options ? options[option] : null;
|
|
25710
26040
|
};
|
|
25711
|
-
var getProcessedDataIndex = function getProcessedDataIndex(rowIndex) {
|
|
25712
|
-
return props.lazy ? rowIndex - props.first : rowIndex;
|
|
25713
|
-
};
|
|
25714
26041
|
var findIndex = function findIndex(collection, rowData) {
|
|
25715
26042
|
return (collection || []).findIndex(function (data) {
|
|
25716
26043
|
return equals(rowData, data);
|
|
@@ -25760,6 +26087,10 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
25760
26087
|
});
|
|
25761
26088
|
}
|
|
25762
26089
|
};
|
|
26090
|
+
var selectionRef = React.useRef(props.selection);
|
|
26091
|
+
React.useEffect(function () {
|
|
26092
|
+
selectionRef.current = props.selection;
|
|
26093
|
+
}, [props.selection]);
|
|
25763
26094
|
var onSingleSelection = function onSingleSelection(_ref) {
|
|
25764
26095
|
var originalEvent = _ref.originalEvent,
|
|
25765
26096
|
data = _ref.data,
|
|
@@ -25773,10 +26104,11 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
25773
26104
|
return;
|
|
25774
26105
|
}
|
|
25775
26106
|
var selected = isSelected(data);
|
|
25776
|
-
var
|
|
26107
|
+
var currentSelection = selectionRef.current || [];
|
|
26108
|
+
var newSelection = currentSelection;
|
|
25777
26109
|
if (selected) {
|
|
25778
26110
|
if (toggleable) {
|
|
25779
|
-
|
|
26111
|
+
newSelection = null;
|
|
25780
26112
|
onUnselect({
|
|
25781
26113
|
originalEvent: originalEvent,
|
|
25782
26114
|
data: data,
|
|
@@ -25784,7 +26116,7 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
25784
26116
|
});
|
|
25785
26117
|
}
|
|
25786
26118
|
} else {
|
|
25787
|
-
|
|
26119
|
+
newSelection = data;
|
|
25788
26120
|
onSelect({
|
|
25789
26121
|
originalEvent: originalEvent,
|
|
25790
26122
|
data: data,
|
|
@@ -25792,10 +26124,10 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
25792
26124
|
});
|
|
25793
26125
|
}
|
|
25794
26126
|
focusOnElement(originalEvent, true);
|
|
25795
|
-
if (props.onSelectionChange &&
|
|
26127
|
+
if (props.onSelectionChange && newSelection !== currentSelection) {
|
|
25796
26128
|
props.onSelectionChange({
|
|
25797
26129
|
originalEvent: originalEvent,
|
|
25798
|
-
value:
|
|
26130
|
+
value: newSelection,
|
|
25799
26131
|
type: type
|
|
25800
26132
|
});
|
|
25801
26133
|
}
|
|
@@ -25813,11 +26145,12 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
25813
26145
|
return;
|
|
25814
26146
|
}
|
|
25815
26147
|
var selected = isSelected(data);
|
|
25816
|
-
var
|
|
26148
|
+
var currentSelection = selectionRef.current || [];
|
|
26149
|
+
var newSelection = currentSelection;
|
|
25817
26150
|
if (selected) {
|
|
25818
26151
|
if (toggleable) {
|
|
25819
|
-
var selectionIndex = findIndex(
|
|
25820
|
-
|
|
26152
|
+
var selectionIndex = findIndex(currentSelection, data);
|
|
26153
|
+
newSelection = currentSelection.filter(function (val, i) {
|
|
25821
26154
|
return i !== selectionIndex;
|
|
25822
26155
|
});
|
|
25823
26156
|
onUnselect({
|
|
@@ -25825,15 +26158,15 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
25825
26158
|
data: data,
|
|
25826
26159
|
type: type
|
|
25827
26160
|
});
|
|
25828
|
-
} else if (
|
|
25829
|
-
|
|
26161
|
+
} else if (currentSelection.length) {
|
|
26162
|
+
currentSelection.forEach(function (d) {
|
|
25830
26163
|
return onUnselect({
|
|
25831
26164
|
originalEvent: originalEvent,
|
|
25832
26165
|
data: d,
|
|
25833
26166
|
type: type
|
|
25834
26167
|
});
|
|
25835
26168
|
});
|
|
25836
|
-
|
|
26169
|
+
newSelection = [data];
|
|
25837
26170
|
onSelect({
|
|
25838
26171
|
originalEvent: originalEvent,
|
|
25839
26172
|
data: data,
|
|
@@ -25841,18 +26174,18 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
25841
26174
|
});
|
|
25842
26175
|
}
|
|
25843
26176
|
} else {
|
|
25844
|
-
|
|
25845
|
-
|
|
26177
|
+
newSelection = ObjectUtils.isObject(currentSelection) ? [currentSelection] : currentSelection;
|
|
26178
|
+
newSelection = toggleable && isMultipleSelection() ? [].concat(_toConsumableArray(newSelection), [data]) : [data];
|
|
25846
26179
|
onSelect({
|
|
25847
26180
|
originalEvent: originalEvent,
|
|
25848
26181
|
data: data,
|
|
25849
26182
|
type: type
|
|
25850
26183
|
});
|
|
25851
26184
|
}
|
|
25852
|
-
if (props.onSelectionChange &&
|
|
26185
|
+
if (props.onSelectionChange && newSelection !== currentSelection) {
|
|
25853
26186
|
props.onSelectionChange({
|
|
25854
26187
|
originalEvent: originalEvent,
|
|
25855
|
-
value:
|
|
26188
|
+
value: newSelection,
|
|
25856
26189
|
type: type
|
|
25857
26190
|
});
|
|
25858
26191
|
}
|
|
@@ -25875,16 +26208,14 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
25875
26208
|
var rangeStart;
|
|
25876
26209
|
var rangeEnd;
|
|
25877
26210
|
var isAllowCellSelection = allowCellSelection();
|
|
25878
|
-
|
|
25879
|
-
|
|
25880
|
-
|
|
25881
|
-
|
|
25882
|
-
|
|
25883
|
-
|
|
25884
|
-
rangeStart = rangeRowIndexInProcessedData;
|
|
25885
|
-
rangeEnd = anchorRowIndexInProcessedData;
|
|
26211
|
+
if (rangeRowIndex.current > anchorRowIndex.current) {
|
|
26212
|
+
rangeStart = anchorRowIndex.current;
|
|
26213
|
+
rangeEnd = rangeRowIndex.current;
|
|
26214
|
+
} else if (rangeRowIndex.current < anchorRowIndex.current) {
|
|
26215
|
+
rangeStart = rangeRowIndex.current;
|
|
26216
|
+
rangeEnd = anchorRowIndex.current;
|
|
25886
26217
|
} else {
|
|
25887
|
-
rangeStart = rangeEnd =
|
|
26218
|
+
rangeStart = rangeEnd = rangeRowIndex.current;
|
|
25888
26219
|
}
|
|
25889
26220
|
return isAllowCellSelection ? selectRangeOnCell(event, rangeStart, rangeEnd) : selectRangeOnRow(event, rangeStart, rangeEnd);
|
|
25890
26221
|
};
|
|
@@ -25925,7 +26256,7 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
25925
26256
|
for (var i = rowRangeStart; i <= rowRangeEnd; i++) {
|
|
25926
26257
|
var rowData = value[i];
|
|
25927
26258
|
var columns = props.columns;
|
|
25928
|
-
var rowIndex = props.
|
|
26259
|
+
var rowIndex = props.paginator ? i + props.first : i;
|
|
25929
26260
|
for (var j = cellRangeStart; j <= cellRangeEnd; j++) {
|
|
25930
26261
|
var field = getColumnProp(columns[j], 'field');
|
|
25931
26262
|
var _value = ObjectUtils.resolveFieldData(rowData, field);
|
|
@@ -26124,13 +26455,17 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
26124
26455
|
onRangeSelection(event, 'row');
|
|
26125
26456
|
}
|
|
26126
26457
|
};
|
|
26458
|
+
var expandedRowsRef = React.useRef(props.expandedRows);
|
|
26459
|
+
React.useEffect(function () {
|
|
26460
|
+
expandedRowsRef.current = props.expandedRows;
|
|
26461
|
+
}, [props.expandedRows]);
|
|
26127
26462
|
var onRowToggle = function onRowToggle(event) {
|
|
26128
26463
|
var expandedRows;
|
|
26129
26464
|
var dataKey = props.dataKey;
|
|
26130
26465
|
var hasDataKey = props.groupRowsBy ? dataKey === props.groupRowsBy : !!dataKey;
|
|
26131
26466
|
if (hasDataKey) {
|
|
26132
26467
|
var dataKeyValue = String(ObjectUtils.resolveFieldData(event.data, dataKey));
|
|
26133
|
-
expandedRows =
|
|
26468
|
+
expandedRows = expandedRowsRef.current ? _objectSpread$1f({}, expandedRowsRef.current) : {};
|
|
26134
26469
|
if (expandedRows[dataKeyValue] != null) {
|
|
26135
26470
|
delete expandedRows[dataKeyValue];
|
|
26136
26471
|
if (props.onRowCollapse) {
|
|
@@ -26149,8 +26484,8 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
26149
26484
|
}
|
|
26150
26485
|
}
|
|
26151
26486
|
} else {
|
|
26152
|
-
var expandedRowIndex = findIndex(
|
|
26153
|
-
expandedRows =
|
|
26487
|
+
var expandedRowIndex = findIndex(expandedRowsRef.current, event.data);
|
|
26488
|
+
expandedRows = expandedRowsRef.current ? _toConsumableArray(expandedRowsRef.current) : [];
|
|
26154
26489
|
if (expandedRowIndex !== -1) {
|
|
26155
26490
|
expandedRows = expandedRows.filter(function (_, i) {
|
|
26156
26491
|
return i !== expandedRowIndex;
|
|
@@ -26400,7 +26735,7 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
26400
26735
|
return null;
|
|
26401
26736
|
};
|
|
26402
26737
|
var createGroupHeader = function createGroupHeader(rowData, rowIndex, expanded, colSpan) {
|
|
26403
|
-
if (isSubheaderGrouping && shouldRenderRowGroupHeader(props.value, rowData,
|
|
26738
|
+
if (isSubheaderGrouping && shouldRenderRowGroupHeader(props.value, rowData, rowIndex - props.first)) {
|
|
26404
26739
|
var style = rowGroupHeaderStyle();
|
|
26405
26740
|
var toggler = props.expandableRowGroups && /*#__PURE__*/React.createElement(RowTogglerButton, {
|
|
26406
26741
|
hostName: props.hostName,
|
|
@@ -26450,10 +26785,14 @@ var TableBody = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
26450
26785
|
hostName: props.hostName,
|
|
26451
26786
|
allowCellSelection: _allowCellSelection,
|
|
26452
26787
|
allowRowSelection: _allowRowSelection,
|
|
26788
|
+
cellMemo: props.cellMemo,
|
|
26789
|
+
cellMemoProps: props.cellMemoProps,
|
|
26790
|
+
cellMemoPropsDepth: props.cellMemoPropsDepth,
|
|
26453
26791
|
cellClassName: props.cellClassName,
|
|
26454
26792
|
checkIcon: props.checkIcon,
|
|
26455
26793
|
collapsedRowIcon: props.collapsedRowIcon,
|
|
26456
26794
|
columns: props.columns,
|
|
26795
|
+
colsProps: colsProps,
|
|
26457
26796
|
compareSelectionBy: props.compareSelectionBy,
|
|
26458
26797
|
contextMenuSelected: contextMenuSelected,
|
|
26459
26798
|
dataKey: props.dataKey,
|
|
@@ -26933,9 +27272,17 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
26933
27272
|
var type = _ref.type,
|
|
26934
27273
|
valid = _ref.valid;
|
|
26935
27274
|
if (valid) {
|
|
26936
|
-
type === 'outside'
|
|
27275
|
+
if (type === 'outside') {
|
|
27276
|
+
if (!selfClick.current && !isTargetClicked(event.target)) {
|
|
27277
|
+
hide();
|
|
27278
|
+
}
|
|
27279
|
+
selfClick.current = false;
|
|
27280
|
+
} else if (context.hideOverlaysOnDocumentScrolling) {
|
|
27281
|
+
hide();
|
|
27282
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
27283
|
+
DomHandler.alignOverlay(overlayRef.current, iconRef.current, context && context.appendTo || PrimeReact.appendTo, false);
|
|
27284
|
+
}
|
|
26937
27285
|
}
|
|
26938
|
-
selfClick.current = false;
|
|
26939
27286
|
},
|
|
26940
27287
|
when: overlayVisibleState
|
|
26941
27288
|
}),
|
|
@@ -29691,58 +30038,60 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
29691
30038
|
var exportCSV = function exportCSV(options) {
|
|
29692
30039
|
var data;
|
|
29693
30040
|
var csv = "\uFEFF";
|
|
29694
|
-
var columns = getColumns();
|
|
29695
30041
|
if (options && options.selectionOnly) {
|
|
29696
30042
|
data = props.selection || [];
|
|
29697
30043
|
} else {
|
|
29698
30044
|
data = [].concat(_toConsumableArray(props.frozenValue || []), _toConsumableArray(processedData() || []));
|
|
29699
30045
|
}
|
|
29700
30046
|
|
|
29701
|
-
//
|
|
29702
|
-
|
|
29703
|
-
var
|
|
30047
|
+
// First build collection of exportable columns
|
|
30048
|
+
var exportableColumns = getColumns().filter(function (column) {
|
|
30049
|
+
var exportable = getColumnProp(column, 'exportable');
|
|
30050
|
+
var field = getColumnProp(column, 'field');
|
|
30051
|
+
|
|
30052
|
+
// Column must be exportable (or undefined/not set) and have a field defined
|
|
30053
|
+
return exportable !== false && field;
|
|
30054
|
+
});
|
|
30055
|
+
|
|
30056
|
+
// headers
|
|
30057
|
+
exportableColumns.forEach(function (column, i) {
|
|
30058
|
+
var _ref5 = [getColumnProp(column, 'field'), getColumnProp(column, 'header'), getColumnProp(column, 'exportHeader')],
|
|
29704
30059
|
field = _ref5[0],
|
|
29705
30060
|
header = _ref5[1],
|
|
29706
|
-
exportHeader = _ref5[2]
|
|
29707
|
-
|
|
29708
|
-
|
|
29709
|
-
|
|
29710
|
-
csv = csv +
|
|
29711
|
-
if (i < columns.length - 1) {
|
|
29712
|
-
csv = csv + props.csvSeparator;
|
|
29713
|
-
}
|
|
30061
|
+
exportHeader = _ref5[2];
|
|
30062
|
+
var columnHeader = String(exportHeader || header || field).replace(/"/g, '""').replace(/\n/g, "\u2028");
|
|
30063
|
+
csv = csv + ('"' + columnHeader + '"');
|
|
30064
|
+
if (i < exportableColumns.length - 1) {
|
|
30065
|
+
csv = csv + props.csvSeparator;
|
|
29714
30066
|
}
|
|
29715
30067
|
});
|
|
29716
30068
|
|
|
29717
|
-
//body
|
|
30069
|
+
// body
|
|
29718
30070
|
data.forEach(function (record) {
|
|
29719
30071
|
csv = csv + '\n';
|
|
29720
|
-
|
|
29721
|
-
var _ref6 = [getColumnProp(column, 'field'), getColumnProp(column, 'exportField')
|
|
30072
|
+
exportableColumns.forEach(function (column, i) {
|
|
30073
|
+
var _ref6 = [getColumnProp(column, 'field'), getColumnProp(column, 'exportField')],
|
|
29722
30074
|
colField = _ref6[0],
|
|
29723
|
-
exportField = _ref6[1]
|
|
29724
|
-
exportable = _ref6[2];
|
|
30075
|
+
exportField = _ref6[1];
|
|
29725
30076
|
var field = exportField || colField;
|
|
29726
|
-
|
|
29727
|
-
|
|
29728
|
-
if (
|
|
29729
|
-
|
|
29730
|
-
cellData
|
|
29731
|
-
|
|
29732
|
-
|
|
29733
|
-
|
|
29734
|
-
|
|
29735
|
-
});
|
|
29736
|
-
} else {
|
|
29737
|
-
cellData = String(cellData).replace(/"/g, '""').replace(/\n/g, "\u2028");
|
|
29738
|
-
}
|
|
30077
|
+
var cellData = ObjectUtils.resolveFieldData(record, field);
|
|
30078
|
+
if (cellData != null) {
|
|
30079
|
+
if (props.exportFunction) {
|
|
30080
|
+
cellData = props.exportFunction({
|
|
30081
|
+
data: cellData,
|
|
30082
|
+
field: field,
|
|
30083
|
+
rowData: record,
|
|
30084
|
+
column: column
|
|
30085
|
+
});
|
|
29739
30086
|
} else {
|
|
29740
|
-
cellData = '';
|
|
29741
|
-
}
|
|
29742
|
-
csv = csv + ('"' + cellData + '"');
|
|
29743
|
-
if (i < columns.length - 1) {
|
|
29744
|
-
csv = csv + props.csvSeparator;
|
|
30087
|
+
cellData = String(cellData).replace(/"/g, '""').replace(/\n/g, "\u2028");
|
|
29745
30088
|
}
|
|
30089
|
+
} else {
|
|
30090
|
+
cellData = '';
|
|
30091
|
+
}
|
|
30092
|
+
csv = csv + ('"' + cellData + '"');
|
|
30093
|
+
if (i < exportableColumns.length - 1) {
|
|
30094
|
+
csv = csv + props.csvSeparator;
|
|
29746
30095
|
}
|
|
29747
30096
|
});
|
|
29748
30097
|
});
|
|
@@ -30007,6 +30356,9 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
30007
30356
|
var frozenBody = ObjectUtils.isNotEmpty(props.frozenValue) && /*#__PURE__*/React.createElement(TableBody, {
|
|
30008
30357
|
hostName: "DataTable",
|
|
30009
30358
|
ref: frozenBodyRef,
|
|
30359
|
+
cellMemo: props.cellMemo,
|
|
30360
|
+
cellMemoProps: props.cellMemoProps,
|
|
30361
|
+
cellMemoPropsDepth: props.cellMemoPropsDepth,
|
|
30010
30362
|
cellClassName: props.cellClassName,
|
|
30011
30363
|
cellSelection: props.cellSelection,
|
|
30012
30364
|
checkIcon: props.checkIcon,
|
|
@@ -30091,6 +30443,9 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
30091
30443
|
var body = /*#__PURE__*/React.createElement(TableBody, {
|
|
30092
30444
|
hostName: "DataTable",
|
|
30093
30445
|
ref: bodyRef,
|
|
30446
|
+
cellMemo: props.cellMemo,
|
|
30447
|
+
cellMemoProps: props.cellMemoProps,
|
|
30448
|
+
cellMemoPropsDepth: props.cellMemoPropsDepth,
|
|
30094
30449
|
cellClassName: props.cellClassName,
|
|
30095
30450
|
cellSelection: props.cellSelection,
|
|
30096
30451
|
checkIcon: props.checkIcon,
|
|
@@ -32511,7 +32866,7 @@ var FileUpload = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
32511
32866
|
var k = 1024;
|
|
32512
32867
|
var dm = 3;
|
|
32513
32868
|
var sizes = localeOption('fileSizeTypes');
|
|
32514
|
-
if (bytes
|
|
32869
|
+
if (bytes <= 0) {
|
|
32515
32870
|
return "0 ".concat(sizes[0]);
|
|
32516
32871
|
}
|
|
32517
32872
|
var i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
@@ -32533,7 +32888,8 @@ var FileUpload = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
32533
32888
|
var selectedFiles = event.dataTransfer ? event.dataTransfer.files : event.target.files;
|
|
32534
32889
|
for (var i = 0; i < selectedFiles.length; i++) {
|
|
32535
32890
|
var file = selectedFiles[i];
|
|
32536
|
-
|
|
32891
|
+
var shouldAddFile = props.multiple ? !isFileSelected(file) && validate(file) : validate(file);
|
|
32892
|
+
if (shouldAddFile) {
|
|
32537
32893
|
file.objectURL = window.URL.createObjectURL(file);
|
|
32538
32894
|
currentFiles.push(file);
|
|
32539
32895
|
}
|
|
@@ -32549,6 +32905,7 @@ var FileUpload = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
32549
32905
|
});
|
|
32550
32906
|
}
|
|
32551
32907
|
clearInput();
|
|
32908
|
+
setFocusedState(false);
|
|
32552
32909
|
if (props.mode === 'basic' && currentFiles.length > 0) {
|
|
32553
32910
|
fileInputRef.current.style.display = 'none';
|
|
32554
32911
|
}
|
|
@@ -34275,6 +34632,7 @@ var Galleria = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
34275
34632
|
},
|
|
34276
34633
|
options: props.transitionOptions,
|
|
34277
34634
|
unmountOnExit: true,
|
|
34635
|
+
appear: true,
|
|
34278
34636
|
onEnter: onEnter,
|
|
34279
34637
|
onEntering: onEntering,
|
|
34280
34638
|
onEntered: onEntered,
|
|
@@ -35618,7 +35976,7 @@ var InputMask = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
35618
35976
|
var updateValue = function updateValue(allow) {
|
|
35619
35977
|
var pos;
|
|
35620
35978
|
if (elementRef.current) {
|
|
35621
|
-
if (props.value
|
|
35979
|
+
if (ObjectUtils.isEmpty(props.value)) {
|
|
35622
35980
|
elementRef.current.value = '';
|
|
35623
35981
|
} else {
|
|
35624
35982
|
elementRef.current.value = props.value;
|
|
@@ -38729,13 +39087,6 @@ var MentionBase = ComponentBase.extend({
|
|
|
38729
39087
|
inputRef: null,
|
|
38730
39088
|
inputStyle: null,
|
|
38731
39089
|
itemTemplate: null,
|
|
38732
|
-
panelClassName: null,
|
|
38733
|
-
panelStyle: null,
|
|
38734
|
-
scrollHeight: '200px',
|
|
38735
|
-
style: null,
|
|
38736
|
-
suggestions: null,
|
|
38737
|
-
transitionOptions: null,
|
|
38738
|
-
trigger: '@',
|
|
38739
39090
|
onBlur: null,
|
|
38740
39091
|
onChange: null,
|
|
38741
39092
|
onFocus: null,
|
|
@@ -38744,6 +39095,14 @@ var MentionBase = ComponentBase.extend({
|
|
|
38744
39095
|
onSearch: null,
|
|
38745
39096
|
onSelect: null,
|
|
38746
39097
|
onShow: null,
|
|
39098
|
+
panelClassName: null,
|
|
39099
|
+
panelStyle: null,
|
|
39100
|
+
scrollHeight: '200px',
|
|
39101
|
+
style: null,
|
|
39102
|
+
suggestions: null,
|
|
39103
|
+
transitionOptions: null,
|
|
39104
|
+
trigger: '@',
|
|
39105
|
+
variant: null,
|
|
38747
39106
|
children: undefined
|
|
38748
39107
|
},
|
|
38749
39108
|
css: {
|
|
@@ -38812,8 +39171,15 @@ var Mention = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (in
|
|
|
38812
39171
|
target: elementRef,
|
|
38813
39172
|
overlay: overlayRef,
|
|
38814
39173
|
listener: function listener(event, _ref) {
|
|
38815
|
-
var valid = _ref.valid
|
|
38816
|
-
|
|
39174
|
+
var valid = _ref.valid,
|
|
39175
|
+
type = _ref.type;
|
|
39176
|
+
if (valid) {
|
|
39177
|
+
if (context.hideOverlaysOnDocumentScrolling || type === 'outside') {
|
|
39178
|
+
hide();
|
|
39179
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
39180
|
+
alignOverlay();
|
|
39181
|
+
}
|
|
39182
|
+
}
|
|
38817
39183
|
},
|
|
38818
39184
|
when: overlayVisibleState
|
|
38819
39185
|
}),
|
|
@@ -39216,6 +39582,7 @@ var Mention = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (in
|
|
|
39216
39582
|
style: props.inputStyle
|
|
39217
39583
|
}, inputProps), {}, {
|
|
39218
39584
|
unstyled: props.unstyled,
|
|
39585
|
+
variant: props.variant,
|
|
39219
39586
|
autoResize: props.autoResize,
|
|
39220
39587
|
onFocus: onFocus,
|
|
39221
39588
|
onBlur: onBlur,
|
|
@@ -39383,10 +39750,15 @@ var Menu = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inPro
|
|
|
39383
39750
|
target: targetRef,
|
|
39384
39751
|
overlay: menuRef,
|
|
39385
39752
|
listener: function listener(event, _ref) {
|
|
39386
|
-
var valid = _ref.valid
|
|
39753
|
+
var valid = _ref.valid,
|
|
39754
|
+
type = _ref.type;
|
|
39387
39755
|
if (valid) {
|
|
39388
|
-
|
|
39389
|
-
|
|
39756
|
+
if (context.hideOverlaysOnDocumentScrolling || type === 'outside') {
|
|
39757
|
+
hide(event);
|
|
39758
|
+
setFocusedOptionIndex(-1);
|
|
39759
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
39760
|
+
DomHandler.absolutePosition(menuRef.current, targetRef.current, props.popupAlignment);
|
|
39761
|
+
}
|
|
39390
39762
|
}
|
|
39391
39763
|
},
|
|
39392
39764
|
when: visibleState
|
|
@@ -39442,6 +39814,9 @@ var Menu = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inPro
|
|
|
39442
39814
|
props.onFocus && props.onFocus(event);
|
|
39443
39815
|
};
|
|
39444
39816
|
var onListBlur = function onListBlur(event) {
|
|
39817
|
+
var currentTarget = event.currentTarget,
|
|
39818
|
+
relatedTarget = event.relatedTarget;
|
|
39819
|
+
if (relatedTarget && currentTarget.contains(relatedTarget)) return;
|
|
39445
39820
|
setFocused(false);
|
|
39446
39821
|
setFocusedOptionIndex(-1);
|
|
39447
39822
|
props.onBlur && props.onBlur(event);
|
|
@@ -39702,6 +40077,9 @@ var Menu = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inPro
|
|
|
39702
40077
|
className: classNames(item.className, cx('menuitem', {
|
|
39703
40078
|
focused: focusedOptionIndex === key
|
|
39704
40079
|
})),
|
|
40080
|
+
onClick: function onClick(event) {
|
|
40081
|
+
return onItemClick(event, item, key);
|
|
40082
|
+
},
|
|
39705
40083
|
style: sx('menuitem', {
|
|
39706
40084
|
item: item
|
|
39707
40085
|
}),
|
|
@@ -40044,7 +40422,6 @@ var MenubarSub = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
40044
40422
|
'aria-disabled': disabled,
|
|
40045
40423
|
'aria-expanded': group ? active : undefined,
|
|
40046
40424
|
'aria-haspopup': group && !item.url ? 'menu' : undefined,
|
|
40047
|
-
'aria-level': props.level + 1,
|
|
40048
40425
|
'aria-setsize': getAriaSetSize(),
|
|
40049
40426
|
'aria-posinset': getAriaPosInset(index),
|
|
40050
40427
|
'data-p-highlight': active,
|
|
@@ -40162,12 +40539,13 @@ var Menubar = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (in
|
|
|
40162
40539
|
var _useEventListener = useEventListener({
|
|
40163
40540
|
type: 'click',
|
|
40164
40541
|
listener: function listener(event) {
|
|
40165
|
-
|
|
40166
|
-
|
|
40167
|
-
|
|
40168
|
-
hide();
|
|
40169
|
-
}
|
|
40542
|
+
var isOutsideButton = menuButtonRef.current && !menuButtonRef.current.contains(event.target);
|
|
40543
|
+
if (isOutsideButton) {
|
|
40544
|
+
hide();
|
|
40170
40545
|
}
|
|
40546
|
+
},
|
|
40547
|
+
options: {
|
|
40548
|
+
capture: true
|
|
40171
40549
|
}
|
|
40172
40550
|
}),
|
|
40173
40551
|
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
@@ -40222,9 +40600,6 @@ var Menubar = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (in
|
|
|
40222
40600
|
var menuButtonKeydown = function menuButtonKeydown(event) {
|
|
40223
40601
|
(event.code === 'Enter' || event.code === 'NumpadEnter' || event.code === 'Space') && toggle(event);
|
|
40224
40602
|
};
|
|
40225
|
-
var isOutsideClicked = function isOutsideClicked(event) {
|
|
40226
|
-
return rootMenuRef.current !== event.target && !rootMenuRef.current.contains(event.target) && menuButtonRef.current !== event.target && !menuButtonRef.current.contains(event.target);
|
|
40227
|
-
};
|
|
40228
40603
|
var getItemProp = function getItemProp(item, name) {
|
|
40229
40604
|
return item ? ObjectUtils.getItemValue(item[name]) : undefined;
|
|
40230
40605
|
};
|
|
@@ -41312,6 +41687,7 @@ var MultiSelectHeader = /*#__PURE__*/React.memo(function (props) {
|
|
|
41312
41687
|
role: "searchbox",
|
|
41313
41688
|
value: props.filterValue,
|
|
41314
41689
|
onChange: onFilter,
|
|
41690
|
+
onKeyDown: props.onFilterKeyDown,
|
|
41315
41691
|
className: "p-multiselect-filter",
|
|
41316
41692
|
placeholder: props.filterPlaceholder,
|
|
41317
41693
|
pt: ptm('filterInput'),
|
|
@@ -41467,9 +41843,7 @@ var MultiSelectItem = /*#__PURE__*/React.memo(function (props) {
|
|
|
41467
41843
|
'data-p-highlight': props.selected,
|
|
41468
41844
|
'data-p-disabled': props.disabled
|
|
41469
41845
|
}, getPTOptions('item'));
|
|
41470
|
-
return /*#__PURE__*/React.createElement("li",
|
|
41471
|
-
key: props.index + '_multiselectitem'
|
|
41472
|
-
}), /*#__PURE__*/React.createElement("div", checkboxContainerProps, /*#__PURE__*/React.createElement(Checkbox, {
|
|
41846
|
+
return /*#__PURE__*/React.createElement("li", itemProps, /*#__PURE__*/React.createElement("div", checkboxContainerProps, /*#__PURE__*/React.createElement(Checkbox, {
|
|
41473
41847
|
ref: checkboxRef,
|
|
41474
41848
|
checked: props.selected,
|
|
41475
41849
|
icon: checkboxIcon,
|
|
@@ -41537,6 +41911,7 @@ var MultiSelectPanel = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(fun
|
|
|
41537
41911
|
getOptionValue: props.getOptionValue,
|
|
41538
41912
|
updateModel: props.updateModel,
|
|
41539
41913
|
onFilter: onFilterInputChange,
|
|
41914
|
+
onFilterKeyDown: props.onFilterKeyDown,
|
|
41540
41915
|
filterPlaceholder: props.filterPlaceholder,
|
|
41541
41916
|
onClose: props.onCloseClick,
|
|
41542
41917
|
showSelectAll: props.showSelectAll,
|
|
@@ -41829,9 +42204,13 @@ var MultiSelect = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
41829
42204
|
valid = _ref.valid;
|
|
41830
42205
|
if (valid) {
|
|
41831
42206
|
if (type === 'outside') {
|
|
41832
|
-
!isClearClicked(event) && !isSelectAllClicked(event)
|
|
41833
|
-
|
|
42207
|
+
if (!isClearClicked(event) && !isSelectAllClicked(event)) {
|
|
42208
|
+
hide();
|
|
42209
|
+
}
|
|
42210
|
+
} else if (context.hideOverlaysOnDocumentScrolling) {
|
|
41834
42211
|
hide();
|
|
42212
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
42213
|
+
alignOverlay();
|
|
41835
42214
|
}
|
|
41836
42215
|
}
|
|
41837
42216
|
},
|
|
@@ -42100,6 +42479,52 @@ var MultiSelect = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
42100
42479
|
}
|
|
42101
42480
|
setClicked(false);
|
|
42102
42481
|
};
|
|
42482
|
+
var onFilterKeyDown = function onFilterKeyDown(event) {
|
|
42483
|
+
switch (event.code) {
|
|
42484
|
+
case 'ArrowUp':
|
|
42485
|
+
if (props.inline) {
|
|
42486
|
+
break;
|
|
42487
|
+
}
|
|
42488
|
+
onArrowUpKey(event);
|
|
42489
|
+
break;
|
|
42490
|
+
case 'ArrowDown':
|
|
42491
|
+
if (props.inline) {
|
|
42492
|
+
break;
|
|
42493
|
+
}
|
|
42494
|
+
onArrowDownKey(event);
|
|
42495
|
+
break;
|
|
42496
|
+
case 'NumpadEnter':
|
|
42497
|
+
case 'Enter':
|
|
42498
|
+
if (props.inline) {
|
|
42499
|
+
break;
|
|
42500
|
+
}
|
|
42501
|
+
onEnterKey(event);
|
|
42502
|
+
break;
|
|
42503
|
+
case 'Home':
|
|
42504
|
+
if (props.inline) {
|
|
42505
|
+
break;
|
|
42506
|
+
}
|
|
42507
|
+
onHomeKey(event);
|
|
42508
|
+
event.preventDefault();
|
|
42509
|
+
break;
|
|
42510
|
+
case 'End':
|
|
42511
|
+
if (props.inline) {
|
|
42512
|
+
break;
|
|
42513
|
+
}
|
|
42514
|
+
onEndKey(event);
|
|
42515
|
+
event.preventDefault();
|
|
42516
|
+
break;
|
|
42517
|
+
case 'Escape':
|
|
42518
|
+
if (props.inline) {
|
|
42519
|
+
break;
|
|
42520
|
+
}
|
|
42521
|
+
hide();
|
|
42522
|
+
break;
|
|
42523
|
+
case 'Tab':
|
|
42524
|
+
onTabKey(event);
|
|
42525
|
+
break;
|
|
42526
|
+
}
|
|
42527
|
+
};
|
|
42103
42528
|
var onSelectAll = function onSelectAll(event) {
|
|
42104
42529
|
if (props.onSelectAll) {
|
|
42105
42530
|
props.onSelectAll(event);
|
|
@@ -42512,20 +42937,19 @@ var MultiSelect = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
42512
42937
|
return selectedItemsLabel;
|
|
42513
42938
|
};
|
|
42514
42939
|
var getLabel = function getLabel() {
|
|
42515
|
-
var
|
|
42516
|
-
if (
|
|
42517
|
-
var _props$value;
|
|
42518
|
-
if (ObjectUtils.isNotEmpty(props.maxSelectedLabels) && ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.length) > props.maxSelectedLabels) {
|
|
42519
|
-
return getSelectedItemsLabel();
|
|
42520
|
-
}
|
|
42521
|
-
if (ObjectUtils.isArray(props.value)) {
|
|
42522
|
-
return props.value.reduce(function (acc, value, index) {
|
|
42523
|
-
return acc + (index !== 0 ? ', ' : '') + getLabelByValue(value);
|
|
42524
|
-
}, '');
|
|
42525
|
-
}
|
|
42940
|
+
var _props$value;
|
|
42941
|
+
if (empty || props.fixedPlaceholder) {
|
|
42526
42942
|
return '';
|
|
42527
42943
|
}
|
|
42528
|
-
|
|
42944
|
+
if (ObjectUtils.isNotEmpty(props.maxSelectedLabels) && ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.length) > props.maxSelectedLabels) {
|
|
42945
|
+
return getSelectedItemsLabel();
|
|
42946
|
+
}
|
|
42947
|
+
if (ObjectUtils.isArray(props.value)) {
|
|
42948
|
+
return props.value.reduce(function (acc, value, index) {
|
|
42949
|
+
return acc + (index !== 0 ? ', ' : '') + getLabelByValue(value);
|
|
42950
|
+
}, '');
|
|
42951
|
+
}
|
|
42952
|
+
return '';
|
|
42529
42953
|
};
|
|
42530
42954
|
var getLabelContent = function getLabelContent() {
|
|
42531
42955
|
var valueLength = props.value ? props.value.length : 0;
|
|
@@ -42798,6 +43222,7 @@ var MultiSelect = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
42798
43222
|
getOptionValue: getOptionValue,
|
|
42799
43223
|
updateModel: updateModel,
|
|
42800
43224
|
onFilterInputChange: onFilterInputChange,
|
|
43225
|
+
onFilterKeyDown: onFilterKeyDown,
|
|
42801
43226
|
resetFilter: resetFilter,
|
|
42802
43227
|
onCloseClick: onCloseClick,
|
|
42803
43228
|
onSelectAll: onSelectAll,
|
|
@@ -42838,12 +43263,20 @@ var classes$v = {
|
|
|
42838
43263
|
},
|
|
42839
43264
|
root: function root(_ref2) {
|
|
42840
43265
|
var props = _ref2.props;
|
|
42841
|
-
return classNames('p-multistatecheckbox p-checkbox p-component', props.classNames
|
|
43266
|
+
return classNames('p-multistatecheckbox p-checkbox p-component', props.classNames, {
|
|
43267
|
+
'p-variant-filled': props.variant === 'filled'
|
|
43268
|
+
});
|
|
43269
|
+
},
|
|
43270
|
+
checkbox: function checkbox(_ref3) {
|
|
43271
|
+
var props = _ref3.props;
|
|
43272
|
+
return classNames(props.className, {
|
|
43273
|
+
'p-invalid': props.invalid
|
|
43274
|
+
});
|
|
42842
43275
|
}
|
|
42843
43276
|
};
|
|
42844
43277
|
var inlineStyles$9 = {
|
|
42845
|
-
checkbox: function checkbox(
|
|
42846
|
-
var selectedOption =
|
|
43278
|
+
checkbox: function checkbox(_ref4) {
|
|
43279
|
+
var selectedOption = _ref4.selectedOption;
|
|
42847
43280
|
return selectedOption && selectedOption.style;
|
|
42848
43281
|
}
|
|
42849
43282
|
};
|
|
@@ -42868,7 +43301,9 @@ var MultiStateCheckboxBase = ComponentBase.extend({
|
|
|
42868
43301
|
tooltip: null,
|
|
42869
43302
|
tooltipOptions: null,
|
|
42870
43303
|
value: null,
|
|
42871
|
-
children: undefined
|
|
43304
|
+
children: undefined,
|
|
43305
|
+
invalid: false,
|
|
43306
|
+
variant: null
|
|
42872
43307
|
},
|
|
42873
43308
|
css: {
|
|
42874
43309
|
classes: classes$v,
|
|
@@ -43017,7 +43452,6 @@ var MultiStateCheckbox = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(f
|
|
|
43017
43452
|
var ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
|
|
43018
43453
|
var icon = createIcon();
|
|
43019
43454
|
var ariaValueLabel = selectedOption ? getOptionAriaLabel(selectedOption) : ariaLabel('nullLabel');
|
|
43020
|
-
var ariaChecked = selectedOption ? 'true' : 'false';
|
|
43021
43455
|
var rootProps = mergeProps({
|
|
43022
43456
|
ref: elementRef,
|
|
43023
43457
|
id: props.id,
|
|
@@ -43026,7 +43460,8 @@ var MultiStateCheckbox = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(f
|
|
|
43026
43460
|
onClick: onClick
|
|
43027
43461
|
}, MultiStateCheckboxBase.getOtherProps(props), ptm('root'));
|
|
43028
43462
|
var checkboxProps = mergeProps(_objectSpread$I({
|
|
43029
|
-
|
|
43463
|
+
id: props.id + '_checkbox',
|
|
43464
|
+
className: cx('checkbox'),
|
|
43030
43465
|
style: sx('checkbox', {
|
|
43031
43466
|
selectedOption: selectedOption
|
|
43032
43467
|
}),
|
|
@@ -43034,8 +43469,6 @@ var MultiStateCheckbox = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(f
|
|
|
43034
43469
|
onFocus: onFocus,
|
|
43035
43470
|
onBlur: onBlur,
|
|
43036
43471
|
onKeyDown: onKeyDown,
|
|
43037
|
-
role: 'checkbox',
|
|
43038
|
-
'aria-checked': ariaChecked,
|
|
43039
43472
|
onChange: onClick,
|
|
43040
43473
|
checked: !!selectedOption,
|
|
43041
43474
|
disabled: props === null || props === void 0 ? void 0 : props.disabled,
|
|
@@ -43577,6 +44010,7 @@ var OrderList = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
43577
44010
|
var styleElementRef = React.useRef(null);
|
|
43578
44011
|
var reorderDirection = React.useRef(null);
|
|
43579
44012
|
var listElementRef = React.useRef(null);
|
|
44013
|
+
var reorderedListElementRef = React.useRef(null);
|
|
43580
44014
|
var metaData = {
|
|
43581
44015
|
props: props,
|
|
43582
44016
|
state: {
|
|
@@ -43802,9 +44236,9 @@ var OrderList = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
43802
44236
|
}
|
|
43803
44237
|
var _focusedOptionIndex = items[order] ? items[order].getAttribute('id') : -1;
|
|
43804
44238
|
setFocusedOptionIndex(_focusedOptionIndex);
|
|
43805
|
-
|
|
44239
|
+
scrollInViewWithFocus(_focusedOptionIndex);
|
|
43806
44240
|
};
|
|
43807
|
-
var
|
|
44241
|
+
var scrollInViewWithFocus = function scrollInViewWithFocus(id) {
|
|
43808
44242
|
var listElement = getListElement();
|
|
43809
44243
|
var element = DomHandler.findSingle(listElement, "[data-pc-section=\"item\"][id=\"".concat(id, "\"]"));
|
|
43810
44244
|
if (element) {
|
|
@@ -43814,6 +44248,33 @@ var OrderList = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
43814
44248
|
});
|
|
43815
44249
|
}
|
|
43816
44250
|
};
|
|
44251
|
+
var scrollInView = function scrollInView(listContainer) {
|
|
44252
|
+
var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
44253
|
+
var selectedItems = listContainer.getElementsByClassName('p-highlight');
|
|
44254
|
+
if (ObjectUtils.isNotEmpty(selectedItems)) {
|
|
44255
|
+
DomHandler.scrollInView(listContainer, direction === -1 ? selectedItems[0] : selectedItems[selectedItems.length - 1]);
|
|
44256
|
+
}
|
|
44257
|
+
};
|
|
44258
|
+
var handleScrollPosition = function handleScrollPosition(listElement, direction) {
|
|
44259
|
+
if (listElement) {
|
|
44260
|
+
switch (direction) {
|
|
44261
|
+
case 'up':
|
|
44262
|
+
scrollInView(listElement, -1);
|
|
44263
|
+
break;
|
|
44264
|
+
case 'top':
|
|
44265
|
+
listElement.scrollTop = 0;
|
|
44266
|
+
break;
|
|
44267
|
+
case 'down':
|
|
44268
|
+
scrollInView(listElement, 1);
|
|
44269
|
+
break;
|
|
44270
|
+
case 'bottom':
|
|
44271
|
+
setTimeout(function () {
|
|
44272
|
+
return listElement.scrollTop = listElement.scrollHeight;
|
|
44273
|
+
}, 100);
|
|
44274
|
+
break;
|
|
44275
|
+
}
|
|
44276
|
+
}
|
|
44277
|
+
};
|
|
43817
44278
|
var onFilter = function onFilter(event) {
|
|
43818
44279
|
var _filterValue = event.target.value;
|
|
43819
44280
|
setFilterValueState(_filterValue);
|
|
@@ -43848,6 +44309,7 @@ var OrderList = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
43848
44309
|
});
|
|
43849
44310
|
}
|
|
43850
44311
|
reorderDirection.current = event.direction;
|
|
44312
|
+
reorderedListElementRef.current = getListElement();
|
|
43851
44313
|
};
|
|
43852
44314
|
var createStyle = function createStyle() {
|
|
43853
44315
|
if (!styleElementRef.current) {
|
|
@@ -43884,7 +44346,9 @@ var OrderList = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
43884
44346
|
setFocusedOptionId(_focusedOptionId);
|
|
43885
44347
|
}, [focusedOptionIndex]);
|
|
43886
44348
|
useUpdateEffect(function () {
|
|
43887
|
-
if (
|
|
44349
|
+
if (reorderedListElementRef.current) {
|
|
44350
|
+
handleScrollPosition(reorderedListElementRef.current, reorderDirection.current);
|
|
44351
|
+
reorderedListElementRef.current = null;
|
|
43888
44352
|
reorderDirection.current = null;
|
|
43889
44353
|
}
|
|
43890
44354
|
});
|
|
@@ -44375,18 +44839,17 @@ var OverlayPanel = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
44375
44839
|
var type = _ref.type,
|
|
44376
44840
|
valid = _ref.valid;
|
|
44377
44841
|
if (valid) {
|
|
44378
|
-
|
|
44379
|
-
|
|
44380
|
-
|
|
44381
|
-
|
|
44382
|
-
|
|
44383
|
-
|
|
44384
|
-
|
|
44385
|
-
|
|
44386
|
-
|
|
44842
|
+
if (type === 'outside') {
|
|
44843
|
+
if (props.dismissable && !isPanelClicked.current) {
|
|
44844
|
+
hide();
|
|
44845
|
+
}
|
|
44846
|
+
isPanelClicked.current = false;
|
|
44847
|
+
} else if (context.hideOverlaysOnDocumentScrolling) {
|
|
44848
|
+
hide();
|
|
44849
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
44850
|
+
align();
|
|
44387
44851
|
}
|
|
44388
44852
|
}
|
|
44389
|
-
isPanelClicked.current = false;
|
|
44390
44853
|
},
|
|
44391
44854
|
when: visibleState
|
|
44392
44855
|
}),
|
|
@@ -46143,8 +46606,15 @@ var Password = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (i
|
|
|
46143
46606
|
target: elementRef,
|
|
46144
46607
|
overlay: overlayRef,
|
|
46145
46608
|
listener: function listener(event, _ref) {
|
|
46146
|
-
var valid = _ref.valid
|
|
46147
|
-
|
|
46609
|
+
var valid = _ref.valid,
|
|
46610
|
+
type = _ref.type;
|
|
46611
|
+
if (valid) {
|
|
46612
|
+
if (type === 'outside' || context.hideOverlaysOnDocumentScrolling) {
|
|
46613
|
+
hide();
|
|
46614
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
46615
|
+
alignOverlay();
|
|
46616
|
+
}
|
|
46617
|
+
}
|
|
46148
46618
|
},
|
|
46149
46619
|
when: overlayVisibleState
|
|
46150
46620
|
}),
|
|
@@ -49709,8 +50179,15 @@ var SlideMenu = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (
|
|
|
49709
50179
|
target: targetRef,
|
|
49710
50180
|
overlay: menuRef,
|
|
49711
50181
|
listener: function listener(event, _ref) {
|
|
49712
|
-
var valid = _ref.valid
|
|
49713
|
-
|
|
50182
|
+
var valid = _ref.valid,
|
|
50183
|
+
type = _ref.type;
|
|
50184
|
+
if (valid) {
|
|
50185
|
+
if (type === 'outside' || context.hideOverlaysOnDocumentScrolling) {
|
|
50186
|
+
hide(event);
|
|
50187
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
50188
|
+
DomHandler.absolutePosition(menuRef.current, targetRef.current);
|
|
50189
|
+
}
|
|
50190
|
+
}
|
|
49714
50191
|
},
|
|
49715
50192
|
when: visibleState
|
|
49716
50193
|
}),
|
|
@@ -57344,7 +57821,9 @@ var TreeSelectBase = ComponentBase.extend({
|
|
|
57344
57821
|
onBlur: null,
|
|
57345
57822
|
onFilterValueChange: null,
|
|
57346
57823
|
onHide: null,
|
|
57824
|
+
onNodeClick: null,
|
|
57347
57825
|
onNodeCollapse: null,
|
|
57826
|
+
onNodeDoubleClick: null,
|
|
57348
57827
|
onNodeExpand: null,
|
|
57349
57828
|
onNodeSelect: null,
|
|
57350
57829
|
onNodeUnselect: null,
|
|
@@ -57458,9 +57937,9 @@ var TreeSelect = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
57458
57937
|
expandedKeysState = _React$useState6[0],
|
|
57459
57938
|
setExpandedKeysState = _React$useState6[1];
|
|
57460
57939
|
var _useDebounce = useDebounce('', props.filterDelay || 0),
|
|
57461
|
-
_useDebounce2 = _slicedToArray(_useDebounce, 3)
|
|
57462
|
-
_useDebounce2[0]
|
|
57463
|
-
|
|
57940
|
+
_useDebounce2 = _slicedToArray(_useDebounce, 3),
|
|
57941
|
+
filterValue = _useDebounce2[0],
|
|
57942
|
+
filterValueState = _useDebounce2[1],
|
|
57464
57943
|
setFilterValueState = _useDebounce2[2];
|
|
57465
57944
|
var elementRef = React.useRef(null);
|
|
57466
57945
|
var overlayRef = React.useRef(null);
|
|
@@ -57507,8 +57986,15 @@ var TreeSelect = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
57507
57986
|
target: elementRef,
|
|
57508
57987
|
overlay: overlayRef,
|
|
57509
57988
|
listener: function listener(event, _ref) {
|
|
57510
|
-
var valid = _ref.valid
|
|
57511
|
-
|
|
57989
|
+
var valid = _ref.valid,
|
|
57990
|
+
type = _ref.type;
|
|
57991
|
+
if (valid) {
|
|
57992
|
+
if (type === 'outside' || context.hideOverlaysOnDocumentScrolling) {
|
|
57993
|
+
hide();
|
|
57994
|
+
} else if (!DomHandler.isDocument(event.target)) {
|
|
57995
|
+
alignOverlay();
|
|
57996
|
+
}
|
|
57997
|
+
}
|
|
57512
57998
|
},
|
|
57513
57999
|
when: overlayVisibleState
|
|
57514
58000
|
}),
|
|
@@ -58029,6 +58515,8 @@ var TreeSelect = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
58029
58515
|
onCollapse: props.onNodeCollapse,
|
|
58030
58516
|
onExpand: props.onNodeExpand,
|
|
58031
58517
|
onFilterValueChange: onFilterValueChange,
|
|
58518
|
+
onNodeClick: props.onNodeClick,
|
|
58519
|
+
onNodeDoubleClick: props.onNodeDoubleClick,
|
|
58032
58520
|
onSelect: onNodeSelect,
|
|
58033
58521
|
onSelectionChange: onSelectionChange,
|
|
58034
58522
|
onToggle: onNodeToggle,
|
|
@@ -58046,15 +58534,15 @@ var TreeSelect = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function
|
|
|
58046
58534
|
};
|
|
58047
58535
|
var createFilterElement = function createFilterElement() {
|
|
58048
58536
|
if (props.filter) {
|
|
58049
|
-
var
|
|
58050
|
-
|
|
58537
|
+
var newValue = props.onFilterValueChange ? props.filterValue : filterValue;
|
|
58538
|
+
newValue = ObjectUtils.isNotEmpty(newValue) ? newValue : '';
|
|
58051
58539
|
var filterContainerProps = mergeProps({
|
|
58052
58540
|
className: cx('filterContainer')
|
|
58053
58541
|
}, ptm('filterContainer'));
|
|
58054
58542
|
var filterProps = mergeProps({
|
|
58055
58543
|
ref: filterInputRef,
|
|
58056
58544
|
type: 'text',
|
|
58057
|
-
value:
|
|
58545
|
+
value: newValue,
|
|
58058
58546
|
autoComplete: 'off',
|
|
58059
58547
|
className: cx('filter'),
|
|
58060
58548
|
placeholder: props.filterPlaceholder,
|
|
@@ -61472,7 +61960,7 @@ var TriStateCheckboxBase = ComponentBase.extend({
|
|
|
61472
61960
|
tooltip: null,
|
|
61473
61961
|
tooltipOptions: null,
|
|
61474
61962
|
uncheckIcon: null,
|
|
61475
|
-
value:
|
|
61963
|
+
value: null,
|
|
61476
61964
|
children: undefined
|
|
61477
61965
|
},
|
|
61478
61966
|
css: {
|
|
@@ -61486,7 +61974,7 @@ var TriStateCheckbox = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(fun
|
|
|
61486
61974
|
var mergeProps = useMergeProps();
|
|
61487
61975
|
var context = React.useContext(PrimeReactContext);
|
|
61488
61976
|
var props = TriStateCheckboxBase.getProps(inProps, context);
|
|
61489
|
-
var _useState = useState(
|
|
61977
|
+
var _useState = useState(null),
|
|
61490
61978
|
_useState2 = _slicedToArray(_useState, 2),
|
|
61491
61979
|
checkBoxValue = _useState2[0],
|
|
61492
61980
|
setCheckBoxValue = _useState2[1];
|
|
@@ -61501,10 +61989,10 @@ var TriStateCheckbox = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(fun
|
|
|
61501
61989
|
name: 'tristatecheckbox'
|
|
61502
61990
|
});
|
|
61503
61991
|
useEffect(function () {
|
|
61504
|
-
if ([true, false,
|
|
61992
|
+
if ([true, false, null].includes(props.value)) {
|
|
61505
61993
|
setCheckBoxValue(props.value);
|
|
61506
61994
|
} else {
|
|
61507
|
-
setCheckBoxValue(
|
|
61995
|
+
setCheckBoxValue(null);
|
|
61508
61996
|
}
|
|
61509
61997
|
}, [props.value]);
|
|
61510
61998
|
var onChange = function onChange(event) {
|
|
@@ -61512,12 +62000,12 @@ var TriStateCheckbox = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(fun
|
|
|
61512
62000
|
return;
|
|
61513
62001
|
}
|
|
61514
62002
|
var newValue;
|
|
61515
|
-
if (checkBoxValue ===
|
|
62003
|
+
if (checkBoxValue === null) {
|
|
61516
62004
|
newValue = true;
|
|
61517
62005
|
} else if (checkBoxValue === true) {
|
|
61518
62006
|
newValue = false;
|
|
61519
62007
|
} else if (checkBoxValue === false) {
|
|
61520
|
-
newValue =
|
|
62008
|
+
newValue = null;
|
|
61521
62009
|
}
|
|
61522
62010
|
if (props.onChange) {
|
|
61523
62011
|
props.onChange({
|
|
@@ -61588,6 +62076,7 @@ var TriStateCheckbox = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(fun
|
|
|
61588
62076
|
var ariaValueLabel = checkBoxValue ? ariaLabel('trueLabel') : checkBoxValue === false ? ariaLabel('falseLabel') : ariaLabel('nullLabel');
|
|
61589
62077
|
var ariaChecked = checkBoxValue ? 'true' : 'false';
|
|
61590
62078
|
var boxProps = mergeProps(_objectSpread({
|
|
62079
|
+
id: props.id + '_box',
|
|
61591
62080
|
className: cx('box'),
|
|
61592
62081
|
tabIndex: props.disabled ? '-1' : props.tabIndex,
|
|
61593
62082
|
onFocus: onFocus,
|