primereact 7.0.1 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/accordion/accordion.cjs.js +12 -6
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +5 -2
- package/accordion/accordion.esm.js +12 -6
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +12 -6
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +2 -0
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +30 -30
- package/api/api.esm.js +2 -0
- package/api/api.esm.min.js +1 -1
- package/api/api.js +2 -0
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +4 -4
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +9 -4
- package/autocomplete/autocomplete.esm.js +4 -4
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +4 -4
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.d.ts +1 -1
- package/blockui/blockui.cjs.js +12 -5
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +12 -5
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +12 -5
- package/blockui/blockui.min.js +1 -1
- package/button/button.d.ts +1 -1
- package/calendar/calendar.cjs.js +22 -3
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +3 -2
- package/calendar/calendar.esm.js +22 -3
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +22 -3
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +8 -9
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +8 -9
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +8 -9
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +1 -1
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +2 -1
- package/cascadeselect/cascadeselect.esm.js +1 -1
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +1 -1
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/checkbox.d.ts +1 -1
- package/chip/chip.d.ts +1 -1
- package/colorpicker/colorpicker.cjs.js +1 -1
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +19 -5
- package/colorpicker/colorpicker.esm.js +1 -1
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +1 -1
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +1 -1
- package/confirmdialog/confirmdialog.d.ts +1 -1
- package/confirmpopup/confirmpopup.cjs.js +2 -2
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +3 -2
- package/confirmpopup/confirmpopup.esm.js +2 -2
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +2 -2
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +1 -1
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +2 -1
- package/contextmenu/contextmenu.esm.js +1 -1
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +1 -1
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +185 -68
- package/core/core.min.js +9 -9
- package/csstransition/csstransition.cjs.js +49 -19
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.d.ts +8 -0
- package/csstransition/csstransition.esm.js +48 -19
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +49 -21
- package/csstransition/csstransition.min.js +1 -1
- package/csstransition/package.json +2 -1
- package/datatable/datatable.cjs.js +238 -186
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +25 -11
- package/datatable/datatable.esm.js +238 -186
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +238 -186
- package/datatable/datatable.min.js +1 -1
- package/dialog/dialog.cjs.js +2 -8
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +2 -1
- package/dialog/dialog.esm.js +2 -8
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +2 -8
- package/dialog/dialog.min.js +1 -1
- package/dropdown/dropdown.cjs.js +14 -4
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +2 -1
- package/dropdown/dropdown.esm.js +14 -4
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +14 -4
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +6 -2
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +1 -0
- package/editor/editor.esm.js +6 -2
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +6 -2
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.d.ts +2 -1
- package/fileupload/fileupload.d.ts +1 -1
- package/galleria/galleria.cjs.js +1 -2
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +2 -1
- package/galleria/galleria.esm.js +1 -2
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +1 -2
- package/galleria/galleria.min.js +1 -1
- package/inputmask/inputmask.cjs.js +2 -2
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +1 -1
- package/inputmask/inputmask.esm.js +2 -2
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +2 -2
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +10 -5
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +4 -4
- package/inputnumber/inputnumber.esm.js +10 -5
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +10 -5
- package/inputnumber/inputnumber.min.js +1 -1
- package/mention/mention.cjs.js +1 -1
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +2 -1
- package/mention/mention.esm.js +1 -1
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +1 -1
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +1 -1
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +2 -1
- package/menu/menu.esm.js +1 -1
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +1 -1
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.min.css +1 -1
- package/messages/messages.d.ts +2 -1
- package/multiselect/multiselect.cjs.js +2 -2
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +3 -2
- package/multiselect/multiselect.esm.js +2 -2
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +2 -2
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +1 -1
- package/organizationchart/organizationchart.min.css +1 -1
- package/overlaypanel/overlaypanel.cjs.js +3 -7
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +2 -1
- package/overlaypanel/overlaypanel.esm.js +3 -7
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +3 -7
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +3 -2
- package/panel/panel.cjs.js +3 -2
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +5 -3
- package/panel/panel.esm.js +4 -3
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +3 -2
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +2 -1
- package/password/password.cjs.js +1 -1
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +2 -1
- package/password/password.esm.js +1 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +1 -1
- package/password/password.min.js +1 -1
- package/portal/portal.cjs.js +2 -6
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +2 -6
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +3 -8
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +850 -630
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +850 -630
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +850 -630
- package/primereact.all.min.js +1 -1
- package/resources/primereact.css +356 -354
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +4 -0
- package/resources/themes/arya-green/theme.css +4 -0
- package/resources/themes/arya-orange/theme.css +4 -0
- package/resources/themes/arya-purple/theme.css +4 -0
- package/resources/themes/bootstrap4-dark-blue/theme.css +4 -0
- package/resources/themes/bootstrap4-dark-purple/theme.css +4 -0
- package/resources/themes/bootstrap4-light-blue/theme.css +4 -0
- package/resources/themes/bootstrap4-light-purple/theme.css +4 -0
- package/resources/themes/fluent-light/theme.css +4 -0
- package/resources/themes/lara-dark-blue/theme.css +26 -22
- package/resources/themes/lara-dark-indigo/theme.css +26 -22
- package/resources/themes/lara-dark-purple/theme.css +26 -22
- package/resources/themes/lara-dark-teal/theme.css +26 -22
- package/resources/themes/lara-light-blue/theme.css +4 -0
- package/resources/themes/lara-light-indigo/theme.css +4 -0
- package/resources/themes/lara-light-purple/theme.css +4 -0
- package/resources/themes/lara-light-teal/theme.css +4 -0
- package/resources/themes/luna-amber/theme.css +4 -0
- package/resources/themes/luna-blue/theme.css +4 -0
- package/resources/themes/luna-green/theme.css +4 -0
- package/resources/themes/luna-pink/theme.css +4 -0
- package/resources/themes/md-dark-deeppurple/theme.css +4 -0
- package/resources/themes/md-dark-indigo/theme.css +4 -0
- package/resources/themes/md-light-deeppurple/theme.css +4 -0
- package/resources/themes/md-light-indigo/theme.css +4 -0
- package/resources/themes/mdc-dark-deeppurple/theme.css +4 -0
- package/resources/themes/mdc-dark-indigo/theme.css +4 -0
- package/resources/themes/mdc-light-deeppurple/theme.css +4 -0
- package/resources/themes/mdc-light-indigo/theme.css +4 -0
- package/resources/themes/nova/theme.css +4 -0
- package/resources/themes/nova-accent/theme.css +4 -0
- package/resources/themes/nova-alt/theme.css +4 -0
- package/resources/themes/rhea/theme.css +4 -0
- package/resources/themes/saga-blue/theme.css +4 -0
- package/resources/themes/saga-green/theme.css +4 -0
- package/resources/themes/saga-orange/theme.css +4 -0
- package/resources/themes/saga-purple/theme.css +4 -0
- package/resources/themes/tailwind-light/theme.css +4 -0
- package/resources/themes/vela-blue/theme.css +4 -0
- package/resources/themes/vela-green/theme.css +4 -0
- package/resources/themes/vela-orange/theme.css +4 -0
- package/resources/themes/vela-purple/theme.css +4 -0
- package/scrolltop/scrolltop.d.ts +3 -2
- package/selectitem/selectitem.d.ts +1 -1
- package/sidebar/sidebar.d.ts +2 -1
- package/slidemenu/slidemenu.cjs.js +1 -1
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +2 -1
- package/slidemenu/slidemenu.esm.js +1 -1
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +1 -1
- package/slidemenu/slidemenu.min.js +1 -1
- package/speeddial/speeddial.d.ts +1 -1
- package/splitbutton/splitbutton.cjs.js +7 -3
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +5 -2
- package/splitbutton/splitbutton.esm.js +7 -3
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +7 -3
- package/splitbutton/splitbutton.min.js +1 -1
- package/tabview/tabview.cjs.js +21 -4
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +8 -0
- package/tabview/tabview.esm.js +21 -4
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +21 -4
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.d.ts +1 -1
- package/tieredmenu/tieredmenu.cjs.js +1 -1
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +2 -1
- package/tieredmenu/tieredmenu.esm.js +1 -1
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +1 -1
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.d.ts +2 -1
- package/togglebutton/togglebutton.d.ts +1 -1
- package/tooltip/tooltip.cjs.js +32 -6
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +0 -1
- package/tooltip/tooltip.esm.js +32 -6
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +32 -6
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +2 -0
- package/tree/tree.d.ts +8 -4
- package/treenode/treenode.d.ts +1 -1
- package/treeselect/treeselect.cjs.js +1 -1
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +2 -1
- package/treeselect/treeselect.esm.js +1 -1
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +1 -1
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +48 -1
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +1 -1
- package/treetable/treetable.esm.js +48 -1
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +48 -1
- package/treetable/treetable.min.js +1 -1
- package/utils/utils.cjs.js +48 -1
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +1 -0
- package/utils/utils.esm.js +48 -1
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +48 -1
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +27 -17
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +27 -17
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +27 -17
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +2 -2
- package/util.d.ts +0 -1
package/primereact.all.cjs.js
CHANGED
|
@@ -1034,7 +1034,12 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
1034
1034
|
}, {
|
|
1035
1035
|
key: "isExist",
|
|
1036
1036
|
value: function isExist(element) {
|
|
1037
|
-
return element !== null && typeof element !== 'undefined' && element.nodeName;
|
|
1037
|
+
return element !== null && typeof element !== 'undefined' && element.nodeName && element.parentNode;
|
|
1038
|
+
}
|
|
1039
|
+
}, {
|
|
1040
|
+
key: "hasDOM",
|
|
1041
|
+
value: function hasDOM() {
|
|
1042
|
+
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
1038
1043
|
}
|
|
1039
1044
|
}, {
|
|
1040
1045
|
key: "getFocusableElements",
|
|
@@ -1160,6 +1165,48 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
1160
1165
|
}
|
|
1161
1166
|
}
|
|
1162
1167
|
}
|
|
1168
|
+
/**
|
|
1169
|
+
* Anytime an inline style is created check environment variable 'process.env.REACT_APP_CSS_NONCE'
|
|
1170
|
+
* to set a CSP NONCE.
|
|
1171
|
+
*
|
|
1172
|
+
* @see https://github.com/primefaces/primereact/issues/2423
|
|
1173
|
+
* @return HtmlStyleElement
|
|
1174
|
+
*/
|
|
1175
|
+
|
|
1176
|
+
}, {
|
|
1177
|
+
key: "createInlineStyle",
|
|
1178
|
+
value: function createInlineStyle() {
|
|
1179
|
+
var styleElement = document.createElement('style');
|
|
1180
|
+
var nonce = process.env.REACT_APP_CSS_NONCE;
|
|
1181
|
+
|
|
1182
|
+
if (nonce) {
|
|
1183
|
+
styleElement.setAttribute('nonce', nonce);
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
document.head.appendChild(styleElement);
|
|
1187
|
+
return styleElement;
|
|
1188
|
+
}
|
|
1189
|
+
/**
|
|
1190
|
+
* Remove a style element from the head and attempt to prevent DOM Exception on fast refresh.
|
|
1191
|
+
*
|
|
1192
|
+
* @see https://github.com/primefaces/primereact/issues/2469
|
|
1193
|
+
* @param {HtmlStyleElement} styleElement the element to remove from head
|
|
1194
|
+
*/
|
|
1195
|
+
|
|
1196
|
+
}, {
|
|
1197
|
+
key: "removeInlineStyle",
|
|
1198
|
+
value: function removeInlineStyle(styleElement) {
|
|
1199
|
+
if (this.isExist(styleElement)) {
|
|
1200
|
+
try {
|
|
1201
|
+
document.head.removeChild(styleElement);
|
|
1202
|
+
} catch (error) {// style element may have already been removed in a fast refresh
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
styleElement = null;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
return styleElement;
|
|
1209
|
+
}
|
|
1163
1210
|
}]);
|
|
1164
1211
|
|
|
1165
1212
|
return DomHandler;
|
|
@@ -2051,343 +2098,6 @@ function handler() {
|
|
|
2051
2098
|
|
|
2052
2099
|
var ZIndexUtils = handler();
|
|
2053
2100
|
|
|
2054
|
-
function ownKeys$T(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
2055
|
-
|
|
2056
|
-
function _objectSpread$T(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$T(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$T(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
2057
|
-
|
|
2058
|
-
function _createSuper$2l(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2l(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
2059
|
-
|
|
2060
|
-
function _isNativeReflectConstruct$2l() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
2061
|
-
var CSSTransition = /*#__PURE__*/function (_Component) {
|
|
2062
|
-
_inherits(CSSTransition, _Component);
|
|
2063
|
-
|
|
2064
|
-
var _super = _createSuper$2l(CSSTransition);
|
|
2065
|
-
|
|
2066
|
-
function CSSTransition(props) {
|
|
2067
|
-
var _this;
|
|
2068
|
-
|
|
2069
|
-
_classCallCheck(this, CSSTransition);
|
|
2070
|
-
|
|
2071
|
-
_this = _super.call(this, props);
|
|
2072
|
-
_this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));
|
|
2073
|
-
_this.onEntering = _this.onEntering.bind(_assertThisInitialized(_this));
|
|
2074
|
-
_this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this));
|
|
2075
|
-
_this.onExit = _this.onExit.bind(_assertThisInitialized(_this));
|
|
2076
|
-
_this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));
|
|
2077
|
-
_this.onExited = _this.onExited.bind(_assertThisInitialized(_this));
|
|
2078
|
-
return _this;
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
|
-
_createClass(CSSTransition, [{
|
|
2082
|
-
key: "onEnter",
|
|
2083
|
-
value: function onEnter(node, isAppearing) {
|
|
2084
|
-
this.props.onEnter && this.props.onEnter(node, isAppearing); // component
|
|
2085
|
-
|
|
2086
|
-
this.props.options && this.props.options.onEnter && this.props.options.onEnter(node, isAppearing); // user option
|
|
2087
|
-
}
|
|
2088
|
-
}, {
|
|
2089
|
-
key: "onEntering",
|
|
2090
|
-
value: function onEntering(node, isAppearing) {
|
|
2091
|
-
this.props.onEntering && this.props.onEntering(node, isAppearing); // component
|
|
2092
|
-
|
|
2093
|
-
this.props.options && this.props.options.onEntering && this.props.options.onEntering(node, isAppearing); // user option
|
|
2094
|
-
}
|
|
2095
|
-
}, {
|
|
2096
|
-
key: "onEntered",
|
|
2097
|
-
value: function onEntered(node, isAppearing) {
|
|
2098
|
-
this.props.onEntered && this.props.onEntered(node, isAppearing); // component
|
|
2099
|
-
|
|
2100
|
-
this.props.options && this.props.options.onEntered && this.props.options.onEntered(node, isAppearing); // user option
|
|
2101
|
-
}
|
|
2102
|
-
}, {
|
|
2103
|
-
key: "onExit",
|
|
2104
|
-
value: function onExit(node) {
|
|
2105
|
-
this.props.onExit && this.props.onExit(node); // component
|
|
2106
|
-
|
|
2107
|
-
this.props.options && this.props.options.onExit && this.props.options.onExit(node); // user option
|
|
2108
|
-
}
|
|
2109
|
-
}, {
|
|
2110
|
-
key: "onExiting",
|
|
2111
|
-
value: function onExiting(node) {
|
|
2112
|
-
this.props.onExiting && this.props.onExiting(node); // component
|
|
2113
|
-
|
|
2114
|
-
this.props.options && this.props.options.onExiting && this.props.options.onExiting(node); // user option
|
|
2115
|
-
}
|
|
2116
|
-
}, {
|
|
2117
|
-
key: "onExited",
|
|
2118
|
-
value: function onExited(node) {
|
|
2119
|
-
this.props.onExited && this.props.onExited(node); // component
|
|
2120
|
-
|
|
2121
|
-
this.props.options && this.props.options.onExited && this.props.options.onExited(node); // user option
|
|
2122
|
-
}
|
|
2123
|
-
}, {
|
|
2124
|
-
key: "render",
|
|
2125
|
-
value: function render() {
|
|
2126
|
-
var immutableProps = {
|
|
2127
|
-
nodeRef: this.props.nodeRef,
|
|
2128
|
-
in: this.props.in,
|
|
2129
|
-
onEnter: this.onEnter,
|
|
2130
|
-
onEntering: this.onEntering,
|
|
2131
|
-
onEntered: this.onEntered,
|
|
2132
|
-
onExit: this.onExit,
|
|
2133
|
-
onExiting: this.onExiting,
|
|
2134
|
-
onExited: this.onExited
|
|
2135
|
-
};
|
|
2136
|
-
var mutableProps = {
|
|
2137
|
-
classNames: this.props.classNames,
|
|
2138
|
-
timeout: this.props.timeout,
|
|
2139
|
-
unmountOnExit: this.props.unmountOnExit
|
|
2140
|
-
};
|
|
2141
|
-
|
|
2142
|
-
var props = _objectSpread$T(_objectSpread$T(_objectSpread$T({}, mutableProps), this.props.options || {}), immutableProps);
|
|
2143
|
-
|
|
2144
|
-
return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.CSSTransition, props, this.props.children);
|
|
2145
|
-
}
|
|
2146
|
-
}]);
|
|
2147
|
-
|
|
2148
|
-
return CSSTransition;
|
|
2149
|
-
}(React.Component);
|
|
2150
|
-
|
|
2151
|
-
function ownKeys$S(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
2152
|
-
|
|
2153
|
-
function _objectSpread$S(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$S(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$S(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
2154
|
-
|
|
2155
|
-
function _createSuper$2k(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2k(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
2156
|
-
|
|
2157
|
-
function _isNativeReflectConstruct$2k() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
2158
|
-
var AccordionTab = /*#__PURE__*/function (_Component) {
|
|
2159
|
-
_inherits(AccordionTab, _Component);
|
|
2160
|
-
|
|
2161
|
-
var _super = _createSuper$2k(AccordionTab);
|
|
2162
|
-
|
|
2163
|
-
function AccordionTab() {
|
|
2164
|
-
_classCallCheck(this, AccordionTab);
|
|
2165
|
-
|
|
2166
|
-
return _super.apply(this, arguments);
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
|
-
return AccordionTab;
|
|
2170
|
-
}(React.Component);
|
|
2171
|
-
|
|
2172
|
-
_defineProperty(AccordionTab, "defaultProps", {
|
|
2173
|
-
header: null,
|
|
2174
|
-
disabled: false,
|
|
2175
|
-
headerStyle: null,
|
|
2176
|
-
headerClassName: null,
|
|
2177
|
-
headerTemplate: null,
|
|
2178
|
-
contentStyle: null,
|
|
2179
|
-
contentClassName: null
|
|
2180
|
-
});
|
|
2181
|
-
|
|
2182
|
-
var Accordion = /*#__PURE__*/function (_Component2) {
|
|
2183
|
-
_inherits(Accordion, _Component2);
|
|
2184
|
-
|
|
2185
|
-
var _super2 = _createSuper$2k(Accordion);
|
|
2186
|
-
|
|
2187
|
-
function Accordion(props) {
|
|
2188
|
-
var _this;
|
|
2189
|
-
|
|
2190
|
-
_classCallCheck(this, Accordion);
|
|
2191
|
-
|
|
2192
|
-
_this = _super2.call(this, props);
|
|
2193
|
-
var state = {
|
|
2194
|
-
id: _this.props.id
|
|
2195
|
-
};
|
|
2196
|
-
|
|
2197
|
-
if (!_this.props.onTabChange) {
|
|
2198
|
-
state = _objectSpread$S(_objectSpread$S({}, state), {}, {
|
|
2199
|
-
activeIndex: props.activeIndex
|
|
2200
|
-
});
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
|
-
_this.state = state;
|
|
2204
|
-
return _this;
|
|
2205
|
-
}
|
|
2206
|
-
|
|
2207
|
-
_createClass(Accordion, [{
|
|
2208
|
-
key: "shouldTabRender",
|
|
2209
|
-
value: function shouldTabRender(tab) {
|
|
2210
|
-
return tab && tab.type === AccordionTab;
|
|
2211
|
-
}
|
|
2212
|
-
}, {
|
|
2213
|
-
key: "onTabHeaderClick",
|
|
2214
|
-
value: function onTabHeaderClick(event, tab, index) {
|
|
2215
|
-
if (!tab.props.disabled) {
|
|
2216
|
-
var selected = this.isSelected(index);
|
|
2217
|
-
var newActiveIndex = null;
|
|
2218
|
-
|
|
2219
|
-
if (this.props.multiple) {
|
|
2220
|
-
var indexes = (this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex) || [];
|
|
2221
|
-
if (selected) indexes = indexes.filter(function (i) {
|
|
2222
|
-
return i !== index;
|
|
2223
|
-
});else indexes = [].concat(_toConsumableArray(indexes), [index]);
|
|
2224
|
-
newActiveIndex = indexes;
|
|
2225
|
-
} else {
|
|
2226
|
-
newActiveIndex = selected ? null : index;
|
|
2227
|
-
}
|
|
2228
|
-
|
|
2229
|
-
var callback = selected ? this.props.onTabClose : this.props.onTabOpen;
|
|
2230
|
-
|
|
2231
|
-
if (callback) {
|
|
2232
|
-
callback({
|
|
2233
|
-
originalEvent: event,
|
|
2234
|
-
index: index
|
|
2235
|
-
});
|
|
2236
|
-
}
|
|
2237
|
-
|
|
2238
|
-
if (this.props.onTabChange) {
|
|
2239
|
-
this.props.onTabChange({
|
|
2240
|
-
originalEvent: event,
|
|
2241
|
-
index: newActiveIndex
|
|
2242
|
-
});
|
|
2243
|
-
} else {
|
|
2244
|
-
this.setState({
|
|
2245
|
-
activeIndex: newActiveIndex
|
|
2246
|
-
});
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
|
-
event.preventDefault();
|
|
2251
|
-
}
|
|
2252
|
-
}, {
|
|
2253
|
-
key: "isSelected",
|
|
2254
|
-
value: function isSelected(index) {
|
|
2255
|
-
var activeIndex = this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex;
|
|
2256
|
-
return this.props.multiple ? activeIndex && activeIndex.indexOf(index) >= 0 : activeIndex === index;
|
|
2257
|
-
}
|
|
2258
|
-
}, {
|
|
2259
|
-
key: "componentDidMount",
|
|
2260
|
-
value: function componentDidMount() {
|
|
2261
|
-
if (!this.state.id) {
|
|
2262
|
-
this.setState({
|
|
2263
|
-
id: UniqueComponentId()
|
|
2264
|
-
});
|
|
2265
|
-
}
|
|
2266
|
-
}
|
|
2267
|
-
}, {
|
|
2268
|
-
key: "renderTabHeader",
|
|
2269
|
-
value: function renderTabHeader(tab, selected, index) {
|
|
2270
|
-
var _this2 = this;
|
|
2271
|
-
|
|
2272
|
-
var tabHeaderClass = classNames('p-accordion-header', {
|
|
2273
|
-
'p-highlight': selected,
|
|
2274
|
-
'p-disabled': tab.props.disabled
|
|
2275
|
-
}, tab.props.headerClassName);
|
|
2276
|
-
var id = this.state.id + '_header_' + index;
|
|
2277
|
-
var ariaControls = this.state.id + '_content_' + index;
|
|
2278
|
-
var tabIndex = tab.props.disabled ? -1 : null;
|
|
2279
|
-
var header = tab.props.headerTemplate ? ObjectUtils.getJSXElement(tab.props.headerTemplate, tab.props) : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2280
|
-
className: "p-accordion-header-text"
|
|
2281
|
-
}, tab.props.header);
|
|
2282
|
-
var icon = selected ? this.props.collapseIcon : this.props.expandIcon;
|
|
2283
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2284
|
-
className: tabHeaderClass,
|
|
2285
|
-
style: tab.props.headerStyle
|
|
2286
|
-
}, /*#__PURE__*/React__default["default"].createElement("a", {
|
|
2287
|
-
href: '#' + ariaControls,
|
|
2288
|
-
id: id,
|
|
2289
|
-
className: "p-accordion-header-link",
|
|
2290
|
-
"aria-controls": ariaControls,
|
|
2291
|
-
role: "tab",
|
|
2292
|
-
"aria-expanded": selected,
|
|
2293
|
-
onClick: function onClick(event) {
|
|
2294
|
-
return _this2.onTabHeaderClick(event, tab, index);
|
|
2295
|
-
},
|
|
2296
|
-
tabIndex: tabIndex
|
|
2297
|
-
}, IconUtils.getJSXIcon(icon, {
|
|
2298
|
-
className: 'p-accordion-toggle-icon'
|
|
2299
|
-
}, {
|
|
2300
|
-
props: this.props,
|
|
2301
|
-
selected: selected
|
|
2302
|
-
}), header));
|
|
2303
|
-
}
|
|
2304
|
-
}, {
|
|
2305
|
-
key: "renderTabContent",
|
|
2306
|
-
value: function renderTabContent(tab, selected, index) {
|
|
2307
|
-
var className = classNames('p-toggleable-content', tab.props.contentClassName);
|
|
2308
|
-
var id = this.state.id + '_content_' + index;
|
|
2309
|
-
var toggleableContentRef = /*#__PURE__*/React__default["default"].createRef();
|
|
2310
|
-
return /*#__PURE__*/React__default["default"].createElement(CSSTransition, {
|
|
2311
|
-
nodeRef: toggleableContentRef,
|
|
2312
|
-
classNames: "p-toggleable-content",
|
|
2313
|
-
timeout: {
|
|
2314
|
-
enter: 1000,
|
|
2315
|
-
exit: 450
|
|
2316
|
-
},
|
|
2317
|
-
in: selected,
|
|
2318
|
-
unmountOnExit: true,
|
|
2319
|
-
options: this.props.transitionOptions
|
|
2320
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2321
|
-
ref: toggleableContentRef,
|
|
2322
|
-
id: id,
|
|
2323
|
-
className: className,
|
|
2324
|
-
style: tab.props.contentStyle,
|
|
2325
|
-
role: "region",
|
|
2326
|
-
"aria-labelledby": this.state.id + '_header_' + index
|
|
2327
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2328
|
-
className: "p-accordion-content"
|
|
2329
|
-
}, tab.props.children)));
|
|
2330
|
-
}
|
|
2331
|
-
}, {
|
|
2332
|
-
key: "renderTab",
|
|
2333
|
-
value: function renderTab(tab, index) {
|
|
2334
|
-
var selected = this.isSelected(index);
|
|
2335
|
-
var tabHeader = this.renderTabHeader(tab, selected, index);
|
|
2336
|
-
var tabContent = this.renderTabContent(tab, selected, index);
|
|
2337
|
-
var tabClassName = classNames('p-accordion-tab', {
|
|
2338
|
-
'p-accordion-tab-active': selected
|
|
2339
|
-
});
|
|
2340
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2341
|
-
key: tab.props.header,
|
|
2342
|
-
className: tabClassName
|
|
2343
|
-
}, tabHeader, tabContent);
|
|
2344
|
-
}
|
|
2345
|
-
}, {
|
|
2346
|
-
key: "renderTabs",
|
|
2347
|
-
value: function renderTabs() {
|
|
2348
|
-
var _this3 = this;
|
|
2349
|
-
|
|
2350
|
-
return React__default["default"].Children.map(this.props.children, function (tab, index) {
|
|
2351
|
-
if (_this3.shouldTabRender(tab)) {
|
|
2352
|
-
return _this3.renderTab(tab, index);
|
|
2353
|
-
}
|
|
2354
|
-
});
|
|
2355
|
-
}
|
|
2356
|
-
}, {
|
|
2357
|
-
key: "render",
|
|
2358
|
-
value: function render() {
|
|
2359
|
-
var _this4 = this;
|
|
2360
|
-
|
|
2361
|
-
var className = classNames('p-accordion p-component', this.props.className);
|
|
2362
|
-
var tabs = this.renderTabs();
|
|
2363
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2364
|
-
ref: function ref(el) {
|
|
2365
|
-
return _this4.container = el;
|
|
2366
|
-
},
|
|
2367
|
-
id: this.state.id,
|
|
2368
|
-
className: className,
|
|
2369
|
-
style: this.props.style
|
|
2370
|
-
}, tabs);
|
|
2371
|
-
}
|
|
2372
|
-
}]);
|
|
2373
|
-
|
|
2374
|
-
return Accordion;
|
|
2375
|
-
}(React.Component);
|
|
2376
|
-
|
|
2377
|
-
_defineProperty(Accordion, "defaultProps", {
|
|
2378
|
-
id: null,
|
|
2379
|
-
activeIndex: null,
|
|
2380
|
-
className: null,
|
|
2381
|
-
style: null,
|
|
2382
|
-
multiple: false,
|
|
2383
|
-
expandIcon: 'pi pi-chevron-right',
|
|
2384
|
-
collapseIcon: 'pi pi-chevron-down',
|
|
2385
|
-
transitionOptions: null,
|
|
2386
|
-
onTabOpen: null,
|
|
2387
|
-
onTabClose: null,
|
|
2388
|
-
onTabChange: null
|
|
2389
|
-
});
|
|
2390
|
-
|
|
2391
2101
|
var FilterMatchMode = Object.freeze({
|
|
2392
2102
|
STARTS_WITH: 'startsWith',
|
|
2393
2103
|
CONTAINS: 'contains',
|
|
@@ -2420,6 +2130,8 @@ _defineProperty(PrimeReact, "locale", 'en');
|
|
|
2420
2130
|
|
|
2421
2131
|
_defineProperty(PrimeReact, "appendTo", null);
|
|
2422
2132
|
|
|
2133
|
+
_defineProperty(PrimeReact, "cssTransition", true);
|
|
2134
|
+
|
|
2423
2135
|
_defineProperty(PrimeReact, "autoZIndex", true);
|
|
2424
2136
|
|
|
2425
2137
|
_defineProperty(PrimeReact, "zIndex", {
|
|
@@ -2436,9 +2148,9 @@ _defineProperty(PrimeReact, "filterMatchModeOptions", {
|
|
|
2436
2148
|
date: [FilterMatchMode.DATE_IS, FilterMatchMode.DATE_IS_NOT, FilterMatchMode.DATE_BEFORE, FilterMatchMode.DATE_AFTER]
|
|
2437
2149
|
});
|
|
2438
2150
|
|
|
2439
|
-
function ownKeys$
|
|
2151
|
+
function ownKeys$T(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
2440
2152
|
|
|
2441
|
-
function _objectSpread$
|
|
2153
|
+
function _objectSpread$T(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$T(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$T(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
2442
2154
|
var locales = {
|
|
2443
2155
|
'en': {
|
|
2444
2156
|
startsWith: 'Starts with',
|
|
@@ -2495,7 +2207,7 @@ function locale(locale) {
|
|
|
2495
2207
|
}
|
|
2496
2208
|
|
|
2497
2209
|
function addLocale(locale, options) {
|
|
2498
|
-
locales[locale] = _objectSpread$
|
|
2210
|
+
locales[locale] = _objectSpread$T(_objectSpread$T({}, locales['en']), options);
|
|
2499
2211
|
}
|
|
2500
2212
|
|
|
2501
2213
|
function updateLocaleOption(key, value, locale) {
|
|
@@ -2505,7 +2217,7 @@ function updateLocaleOption(key, value, locale) {
|
|
|
2505
2217
|
function updateLocaleOptions(options, locale) {
|
|
2506
2218
|
var _locale = locale || PrimeReact.locale;
|
|
2507
2219
|
|
|
2508
|
-
locales[_locale] = _objectSpread$
|
|
2220
|
+
locales[_locale] = _objectSpread$T(_objectSpread$T({}, locales[_locale]), options);
|
|
2509
2221
|
}
|
|
2510
2222
|
|
|
2511
2223
|
function localeOption(key, locale) {
|
|
@@ -3013,6 +2725,376 @@ var FilterService = {
|
|
|
3013
2725
|
}
|
|
3014
2726
|
};
|
|
3015
2727
|
|
|
2728
|
+
function ownKeys$S(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
2729
|
+
|
|
2730
|
+
function _objectSpread$S(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$S(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$S(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
2731
|
+
|
|
2732
|
+
function _createSuper$2l(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2l(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
2733
|
+
|
|
2734
|
+
function _isNativeReflectConstruct$2l() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
2735
|
+
var CSSTransition = /*#__PURE__*/function (_Component) {
|
|
2736
|
+
_inherits(CSSTransition, _Component);
|
|
2737
|
+
|
|
2738
|
+
var _super = _createSuper$2l(CSSTransition);
|
|
2739
|
+
|
|
2740
|
+
function CSSTransition(props) {
|
|
2741
|
+
var _this;
|
|
2742
|
+
|
|
2743
|
+
_classCallCheck(this, CSSTransition);
|
|
2744
|
+
|
|
2745
|
+
_this = _super.call(this, props);
|
|
2746
|
+
_this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));
|
|
2747
|
+
_this.onEntering = _this.onEntering.bind(_assertThisInitialized(_this));
|
|
2748
|
+
_this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this));
|
|
2749
|
+
_this.onExit = _this.onExit.bind(_assertThisInitialized(_this));
|
|
2750
|
+
_this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));
|
|
2751
|
+
_this.onExited = _this.onExited.bind(_assertThisInitialized(_this));
|
|
2752
|
+
return _this;
|
|
2753
|
+
}
|
|
2754
|
+
|
|
2755
|
+
_createClass(CSSTransition, [{
|
|
2756
|
+
key: "disabled",
|
|
2757
|
+
get: function get() {
|
|
2758
|
+
return this.props.disabled || this.props.options && this.props.options.disabled || !PrimeReact.cssTransition;
|
|
2759
|
+
}
|
|
2760
|
+
}, {
|
|
2761
|
+
key: "onEnter",
|
|
2762
|
+
value: function onEnter(node, isAppearing) {
|
|
2763
|
+
this.props.onEnter && this.props.onEnter(node, isAppearing); // component
|
|
2764
|
+
|
|
2765
|
+
this.props.options && this.props.options.onEnter && this.props.options.onEnter(node, isAppearing); // user option
|
|
2766
|
+
}
|
|
2767
|
+
}, {
|
|
2768
|
+
key: "onEntering",
|
|
2769
|
+
value: function onEntering(node, isAppearing) {
|
|
2770
|
+
this.props.onEntering && this.props.onEntering(node, isAppearing); // component
|
|
2771
|
+
|
|
2772
|
+
this.props.options && this.props.options.onEntering && this.props.options.onEntering(node, isAppearing); // user option
|
|
2773
|
+
}
|
|
2774
|
+
}, {
|
|
2775
|
+
key: "onEntered",
|
|
2776
|
+
value: function onEntered(node, isAppearing) {
|
|
2777
|
+
this.props.onEntered && this.props.onEntered(node, isAppearing); // component
|
|
2778
|
+
|
|
2779
|
+
this.props.options && this.props.options.onEntered && this.props.options.onEntered(node, isAppearing); // user option
|
|
2780
|
+
}
|
|
2781
|
+
}, {
|
|
2782
|
+
key: "onExit",
|
|
2783
|
+
value: function onExit(node) {
|
|
2784
|
+
this.props.onExit && this.props.onExit(node); // component
|
|
2785
|
+
|
|
2786
|
+
this.props.options && this.props.options.onExit && this.props.options.onExit(node); // user option
|
|
2787
|
+
}
|
|
2788
|
+
}, {
|
|
2789
|
+
key: "onExiting",
|
|
2790
|
+
value: function onExiting(node) {
|
|
2791
|
+
this.props.onExiting && this.props.onExiting(node); // component
|
|
2792
|
+
|
|
2793
|
+
this.props.options && this.props.options.onExiting && this.props.options.onExiting(node); // user option
|
|
2794
|
+
}
|
|
2795
|
+
}, {
|
|
2796
|
+
key: "onExited",
|
|
2797
|
+
value: function onExited(node) {
|
|
2798
|
+
this.props.onExited && this.props.onExited(node); // component
|
|
2799
|
+
|
|
2800
|
+
this.props.options && this.props.options.onExited && this.props.options.onExited(node); // user option
|
|
2801
|
+
}
|
|
2802
|
+
}, {
|
|
2803
|
+
key: "componentDidUpdate",
|
|
2804
|
+
value: function componentDidUpdate(prevProps) {
|
|
2805
|
+
if (this.props.in !== prevProps.in && this.disabled) {
|
|
2806
|
+
// no animation
|
|
2807
|
+
var node = ObjectUtils.getRefElement(this.props.nodeRef);
|
|
2808
|
+
|
|
2809
|
+
if (this.props.in) {
|
|
2810
|
+
this.onEnter(node, true);
|
|
2811
|
+
this.onEntering(node, true);
|
|
2812
|
+
this.onEntered(node, true);
|
|
2813
|
+
} else {
|
|
2814
|
+
this.onExit(node);
|
|
2815
|
+
this.onExiting(node);
|
|
2816
|
+
this.onExited(node);
|
|
2817
|
+
}
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
}, {
|
|
2821
|
+
key: "render",
|
|
2822
|
+
value: function render() {
|
|
2823
|
+
if (this.disabled) {
|
|
2824
|
+
return this.props.in ? this.props.children : null;
|
|
2825
|
+
} else {
|
|
2826
|
+
var immutableProps = {
|
|
2827
|
+
nodeRef: this.props.nodeRef,
|
|
2828
|
+
in: this.props.in,
|
|
2829
|
+
onEnter: this.onEnter,
|
|
2830
|
+
onEntering: this.onEntering,
|
|
2831
|
+
onEntered: this.onEntered,
|
|
2832
|
+
onExit: this.onExit,
|
|
2833
|
+
onExiting: this.onExiting,
|
|
2834
|
+
onExited: this.onExited
|
|
2835
|
+
};
|
|
2836
|
+
var mutableProps = {
|
|
2837
|
+
classNames: this.props.classNames,
|
|
2838
|
+
timeout: this.props.timeout,
|
|
2839
|
+
unmountOnExit: this.props.unmountOnExit
|
|
2840
|
+
};
|
|
2841
|
+
|
|
2842
|
+
var props = _objectSpread$S(_objectSpread$S(_objectSpread$S({}, mutableProps), this.props.options || {}), immutableProps);
|
|
2843
|
+
|
|
2844
|
+
return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.CSSTransition, props, this.props.children);
|
|
2845
|
+
}
|
|
2846
|
+
}
|
|
2847
|
+
}]);
|
|
2848
|
+
|
|
2849
|
+
return CSSTransition;
|
|
2850
|
+
}(React.Component);
|
|
2851
|
+
|
|
2852
|
+
function ownKeys$R(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
2853
|
+
|
|
2854
|
+
function _objectSpread$R(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$R(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$R(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
2855
|
+
|
|
2856
|
+
function _createSuper$2k(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2k(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
2857
|
+
|
|
2858
|
+
function _isNativeReflectConstruct$2k() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
2859
|
+
var AccordionTab = /*#__PURE__*/function (_Component) {
|
|
2860
|
+
_inherits(AccordionTab, _Component);
|
|
2861
|
+
|
|
2862
|
+
var _super = _createSuper$2k(AccordionTab);
|
|
2863
|
+
|
|
2864
|
+
function AccordionTab() {
|
|
2865
|
+
_classCallCheck(this, AccordionTab);
|
|
2866
|
+
|
|
2867
|
+
return _super.apply(this, arguments);
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2870
|
+
return AccordionTab;
|
|
2871
|
+
}(React.Component);
|
|
2872
|
+
|
|
2873
|
+
_defineProperty(AccordionTab, "defaultProps", {
|
|
2874
|
+
header: null,
|
|
2875
|
+
disabled: false,
|
|
2876
|
+
style: null,
|
|
2877
|
+
className: null,
|
|
2878
|
+
headerStyle: null,
|
|
2879
|
+
headerClassName: null,
|
|
2880
|
+
headerTemplate: null,
|
|
2881
|
+
contentStyle: null,
|
|
2882
|
+
contentClassName: null
|
|
2883
|
+
});
|
|
2884
|
+
|
|
2885
|
+
var Accordion = /*#__PURE__*/function (_Component2) {
|
|
2886
|
+
_inherits(Accordion, _Component2);
|
|
2887
|
+
|
|
2888
|
+
var _super2 = _createSuper$2k(Accordion);
|
|
2889
|
+
|
|
2890
|
+
function Accordion(props) {
|
|
2891
|
+
var _this;
|
|
2892
|
+
|
|
2893
|
+
_classCallCheck(this, Accordion);
|
|
2894
|
+
|
|
2895
|
+
_this = _super2.call(this, props);
|
|
2896
|
+
var state = {
|
|
2897
|
+
id: _this.props.id
|
|
2898
|
+
};
|
|
2899
|
+
|
|
2900
|
+
if (!_this.props.onTabChange) {
|
|
2901
|
+
state = _objectSpread$R(_objectSpread$R({}, state), {}, {
|
|
2902
|
+
activeIndex: props.activeIndex
|
|
2903
|
+
});
|
|
2904
|
+
}
|
|
2905
|
+
|
|
2906
|
+
_this.state = state;
|
|
2907
|
+
return _this;
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2910
|
+
_createClass(Accordion, [{
|
|
2911
|
+
key: "shouldTabRender",
|
|
2912
|
+
value: function shouldTabRender(tab) {
|
|
2913
|
+
return tab && tab.type === AccordionTab;
|
|
2914
|
+
}
|
|
2915
|
+
}, {
|
|
2916
|
+
key: "onTabHeaderClick",
|
|
2917
|
+
value: function onTabHeaderClick(event, tab, index) {
|
|
2918
|
+
if (!tab.props.disabled) {
|
|
2919
|
+
var selected = this.isSelected(index);
|
|
2920
|
+
var newActiveIndex = null;
|
|
2921
|
+
|
|
2922
|
+
if (this.props.multiple) {
|
|
2923
|
+
var indexes = (this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex) || [];
|
|
2924
|
+
if (selected) indexes = indexes.filter(function (i) {
|
|
2925
|
+
return i !== index;
|
|
2926
|
+
});else indexes = [].concat(_toConsumableArray(indexes), [index]);
|
|
2927
|
+
newActiveIndex = indexes;
|
|
2928
|
+
} else {
|
|
2929
|
+
newActiveIndex = selected ? null : index;
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2932
|
+
var callback = selected ? this.props.onTabClose : this.props.onTabOpen;
|
|
2933
|
+
|
|
2934
|
+
if (callback) {
|
|
2935
|
+
callback({
|
|
2936
|
+
originalEvent: event,
|
|
2937
|
+
index: index
|
|
2938
|
+
});
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2941
|
+
if (this.props.onTabChange) {
|
|
2942
|
+
this.props.onTabChange({
|
|
2943
|
+
originalEvent: event,
|
|
2944
|
+
index: newActiveIndex
|
|
2945
|
+
});
|
|
2946
|
+
} else {
|
|
2947
|
+
this.setState({
|
|
2948
|
+
activeIndex: newActiveIndex
|
|
2949
|
+
});
|
|
2950
|
+
}
|
|
2951
|
+
}
|
|
2952
|
+
|
|
2953
|
+
event.preventDefault();
|
|
2954
|
+
}
|
|
2955
|
+
}, {
|
|
2956
|
+
key: "isSelected",
|
|
2957
|
+
value: function isSelected(index) {
|
|
2958
|
+
var activeIndex = this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex;
|
|
2959
|
+
return this.props.multiple ? activeIndex && activeIndex.indexOf(index) >= 0 : activeIndex === index;
|
|
2960
|
+
}
|
|
2961
|
+
}, {
|
|
2962
|
+
key: "componentDidMount",
|
|
2963
|
+
value: function componentDidMount() {
|
|
2964
|
+
if (!this.state.id) {
|
|
2965
|
+
this.setState({
|
|
2966
|
+
id: UniqueComponentId()
|
|
2967
|
+
});
|
|
2968
|
+
}
|
|
2969
|
+
}
|
|
2970
|
+
}, {
|
|
2971
|
+
key: "renderTabHeader",
|
|
2972
|
+
value: function renderTabHeader(tab, selected, index) {
|
|
2973
|
+
var _this2 = this;
|
|
2974
|
+
|
|
2975
|
+
var style = _objectSpread$R(_objectSpread$R({}, tab.props.headerStyle || {}), tab.props.style || {});
|
|
2976
|
+
|
|
2977
|
+
var className = classNames('p-accordion-header', {
|
|
2978
|
+
'p-highlight': selected,
|
|
2979
|
+
'p-disabled': tab.props.disabled
|
|
2980
|
+
}, tab.props.headerClassName, tab.props.className);
|
|
2981
|
+
var id = this.state.id + '_header_' + index;
|
|
2982
|
+
var ariaControls = this.state.id + '_content_' + index;
|
|
2983
|
+
var tabIndex = tab.props.disabled ? -1 : null;
|
|
2984
|
+
var header = tab.props.headerTemplate ? ObjectUtils.getJSXElement(tab.props.headerTemplate, tab.props) : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2985
|
+
className: "p-accordion-header-text"
|
|
2986
|
+
}, tab.props.header);
|
|
2987
|
+
var icon = selected ? this.props.collapseIcon : this.props.expandIcon;
|
|
2988
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2989
|
+
className: className,
|
|
2990
|
+
style: style
|
|
2991
|
+
}, /*#__PURE__*/React__default["default"].createElement("a", {
|
|
2992
|
+
href: '#' + ariaControls,
|
|
2993
|
+
id: id,
|
|
2994
|
+
className: "p-accordion-header-link",
|
|
2995
|
+
"aria-controls": ariaControls,
|
|
2996
|
+
role: "tab",
|
|
2997
|
+
"aria-expanded": selected,
|
|
2998
|
+
onClick: function onClick(event) {
|
|
2999
|
+
return _this2.onTabHeaderClick(event, tab, index);
|
|
3000
|
+
},
|
|
3001
|
+
tabIndex: tabIndex
|
|
3002
|
+
}, IconUtils.getJSXIcon(icon, {
|
|
3003
|
+
className: 'p-accordion-toggle-icon'
|
|
3004
|
+
}, {
|
|
3005
|
+
props: this.props,
|
|
3006
|
+
selected: selected
|
|
3007
|
+
}), header));
|
|
3008
|
+
}
|
|
3009
|
+
}, {
|
|
3010
|
+
key: "renderTabContent",
|
|
3011
|
+
value: function renderTabContent(tab, selected, index) {
|
|
3012
|
+
var style = _objectSpread$R(_objectSpread$R({}, tab.props.contentStyle || {}), tab.props.style || {});
|
|
3013
|
+
|
|
3014
|
+
var className = classNames('p-toggleable-content', tab.props.contentClassName, tab.props.className);
|
|
3015
|
+
var id = this.state.id + '_content_' + index;
|
|
3016
|
+
var toggleableContentRef = /*#__PURE__*/React__default["default"].createRef();
|
|
3017
|
+
return /*#__PURE__*/React__default["default"].createElement(CSSTransition, {
|
|
3018
|
+
nodeRef: toggleableContentRef,
|
|
3019
|
+
classNames: "p-toggleable-content",
|
|
3020
|
+
timeout: {
|
|
3021
|
+
enter: 1000,
|
|
3022
|
+
exit: 450
|
|
3023
|
+
},
|
|
3024
|
+
in: selected,
|
|
3025
|
+
unmountOnExit: true,
|
|
3026
|
+
options: this.props.transitionOptions
|
|
3027
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3028
|
+
ref: toggleableContentRef,
|
|
3029
|
+
id: id,
|
|
3030
|
+
className: className,
|
|
3031
|
+
style: style,
|
|
3032
|
+
role: "region",
|
|
3033
|
+
"aria-labelledby": this.state.id + '_header_' + index
|
|
3034
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3035
|
+
className: "p-accordion-content"
|
|
3036
|
+
}, tab.props.children)));
|
|
3037
|
+
}
|
|
3038
|
+
}, {
|
|
3039
|
+
key: "renderTab",
|
|
3040
|
+
value: function renderTab(tab, index) {
|
|
3041
|
+
var selected = this.isSelected(index);
|
|
3042
|
+
var tabHeader = this.renderTabHeader(tab, selected, index);
|
|
3043
|
+
var tabContent = this.renderTabContent(tab, selected, index);
|
|
3044
|
+
var tabClassName = classNames('p-accordion-tab', {
|
|
3045
|
+
'p-accordion-tab-active': selected
|
|
3046
|
+
});
|
|
3047
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3048
|
+
key: tab.props.header,
|
|
3049
|
+
className: tabClassName
|
|
3050
|
+
}, tabHeader, tabContent);
|
|
3051
|
+
}
|
|
3052
|
+
}, {
|
|
3053
|
+
key: "renderTabs",
|
|
3054
|
+
value: function renderTabs() {
|
|
3055
|
+
var _this3 = this;
|
|
3056
|
+
|
|
3057
|
+
return React__default["default"].Children.map(this.props.children, function (tab, index) {
|
|
3058
|
+
if (_this3.shouldTabRender(tab)) {
|
|
3059
|
+
return _this3.renderTab(tab, index);
|
|
3060
|
+
}
|
|
3061
|
+
});
|
|
3062
|
+
}
|
|
3063
|
+
}, {
|
|
3064
|
+
key: "render",
|
|
3065
|
+
value: function render() {
|
|
3066
|
+
var _this4 = this;
|
|
3067
|
+
|
|
3068
|
+
var className = classNames('p-accordion p-component', this.props.className);
|
|
3069
|
+
var tabs = this.renderTabs();
|
|
3070
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3071
|
+
ref: function ref(el) {
|
|
3072
|
+
return _this4.container = el;
|
|
3073
|
+
},
|
|
3074
|
+
id: this.state.id,
|
|
3075
|
+
className: className,
|
|
3076
|
+
style: this.props.style
|
|
3077
|
+
}, tabs);
|
|
3078
|
+
}
|
|
3079
|
+
}]);
|
|
3080
|
+
|
|
3081
|
+
return Accordion;
|
|
3082
|
+
}(React.Component);
|
|
3083
|
+
|
|
3084
|
+
_defineProperty(Accordion, "defaultProps", {
|
|
3085
|
+
id: null,
|
|
3086
|
+
activeIndex: null,
|
|
3087
|
+
className: null,
|
|
3088
|
+
style: null,
|
|
3089
|
+
multiple: false,
|
|
3090
|
+
expandIcon: 'pi pi-chevron-right',
|
|
3091
|
+
collapseIcon: 'pi pi-chevron-down',
|
|
3092
|
+
transitionOptions: null,
|
|
3093
|
+
onTabOpen: null,
|
|
3094
|
+
onTabClose: null,
|
|
3095
|
+
onTabChange: null
|
|
3096
|
+
});
|
|
3097
|
+
|
|
3016
3098
|
var KeyFilter = /*#__PURE__*/function () {
|
|
3017
3099
|
function KeyFilter() {
|
|
3018
3100
|
_classCallCheck(this, KeyFilter);
|
|
@@ -3156,14 +3238,9 @@ var Portal = /*#__PURE__*/function (_Component) {
|
|
|
3156
3238
|
}
|
|
3157
3239
|
|
|
3158
3240
|
_createClass(Portal, [{
|
|
3159
|
-
key: "hasDOM",
|
|
3160
|
-
value: function hasDOM() {
|
|
3161
|
-
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
3162
|
-
}
|
|
3163
|
-
}, {
|
|
3164
3241
|
key: "componentDidMount",
|
|
3165
3242
|
value: function componentDidMount() {
|
|
3166
|
-
if (
|
|
3243
|
+
if (DomHandler.hasDOM() && !this.state.mounted) {
|
|
3167
3244
|
this.setState({
|
|
3168
3245
|
mounted: true
|
|
3169
3246
|
}, this.props.onMounted);
|
|
@@ -3276,6 +3353,11 @@ var Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
3276
3353
|
value: function isDisabled(target) {
|
|
3277
3354
|
return this.getTargetOption(target, 'disabled') === 'true' || this.hasTargetOption(target, 'disabled') || this.props.disabled;
|
|
3278
3355
|
}
|
|
3356
|
+
}, {
|
|
3357
|
+
key: "isShowOnDisabled",
|
|
3358
|
+
value: function isShowOnDisabled(target) {
|
|
3359
|
+
return this.getTargetOption(target, 'showondisabled') || this.props.showOnDisabled;
|
|
3360
|
+
}
|
|
3279
3361
|
}, {
|
|
3280
3362
|
key: "isAutoHide",
|
|
3281
3363
|
value: function isAutoHide() {
|
|
@@ -3355,8 +3437,10 @@ var Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
3355
3437
|
var _this2 = this;
|
|
3356
3438
|
|
|
3357
3439
|
this.currentTarget = e.currentTarget;
|
|
3440
|
+
var disabled = this.isDisabled(this.currentTarget);
|
|
3441
|
+
var empty = this.isContentEmpty(this.isShowOnDisabled(this.currentTarget) && disabled ? this.currentTarget.firstChild : this.currentTarget);
|
|
3358
3442
|
|
|
3359
|
-
if (
|
|
3443
|
+
if (empty || disabled) {
|
|
3360
3444
|
return;
|
|
3361
3445
|
}
|
|
3362
3446
|
|
|
@@ -3561,7 +3645,7 @@ var Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
3561
3645
|
var _this5 = this;
|
|
3562
3646
|
|
|
3563
3647
|
this.documentResizeListener = function (e) {
|
|
3564
|
-
if (!DomHandler.
|
|
3648
|
+
if (!DomHandler.isTouchDevice()) {
|
|
3565
3649
|
_this5.hide(e);
|
|
3566
3650
|
}
|
|
3567
3651
|
};
|
|
@@ -3606,8 +3690,9 @@ var Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
3606
3690
|
showEvent = _this$getEvents.showEvent,
|
|
3607
3691
|
hideEvent = _this$getEvents.hideEvent;
|
|
3608
3692
|
|
|
3609
|
-
|
|
3610
|
-
|
|
3693
|
+
var currentTarget = this.getTarget(target);
|
|
3694
|
+
currentTarget.addEventListener(showEvent, this.show);
|
|
3695
|
+
currentTarget.addEventListener(hideEvent, this.hide);
|
|
3611
3696
|
}
|
|
3612
3697
|
}
|
|
3613
3698
|
}, {
|
|
@@ -3618,8 +3703,9 @@ var Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
3618
3703
|
showEvent = _this$getEvents2.showEvent,
|
|
3619
3704
|
hideEvent = _this$getEvents2.hideEvent;
|
|
3620
3705
|
|
|
3621
|
-
|
|
3622
|
-
|
|
3706
|
+
var currentTarget = this.getTarget(target);
|
|
3707
|
+
currentTarget.removeEventListener(showEvent, this.show);
|
|
3708
|
+
currentTarget.removeEventListener(hideEvent, this.hide);
|
|
3623
3709
|
}
|
|
3624
3710
|
}
|
|
3625
3711
|
}, {
|
|
@@ -3654,6 +3740,22 @@ var Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
3654
3740
|
clearTimeout(this.updateDelayTimeout);
|
|
3655
3741
|
clearTimeout(this.hideDelayTimeout);
|
|
3656
3742
|
}
|
|
3743
|
+
}, {
|
|
3744
|
+
key: "getTarget",
|
|
3745
|
+
value: function getTarget(target) {
|
|
3746
|
+
if (target) {
|
|
3747
|
+
if (this.isShowOnDisabled(target)) {
|
|
3748
|
+
var wrapper = document.createElement('span');
|
|
3749
|
+
target.parentNode.insertBefore(wrapper, target);
|
|
3750
|
+
wrapper.appendChild(target);
|
|
3751
|
+
return wrapper;
|
|
3752
|
+
}
|
|
3753
|
+
|
|
3754
|
+
return target;
|
|
3755
|
+
}
|
|
3756
|
+
|
|
3757
|
+
return null;
|
|
3758
|
+
}
|
|
3657
3759
|
}, {
|
|
3658
3760
|
key: "updateTargetEvents",
|
|
3659
3761
|
value: function updateTargetEvents(target) {
|
|
@@ -3810,6 +3912,7 @@ _defineProperty(Tooltip, "defaultProps", {
|
|
|
3810
3912
|
updateDelay: 0,
|
|
3811
3913
|
hideDelay: 0,
|
|
3812
3914
|
autoHide: true,
|
|
3915
|
+
showOnDisabled: false,
|
|
3813
3916
|
onBeforeShow: null,
|
|
3814
3917
|
onBeforeHide: null,
|
|
3815
3918
|
onShow: null,
|
|
@@ -4698,7 +4801,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4698
4801
|
};
|
|
4699
4802
|
|
|
4700
4803
|
var calculateFirst = function calculateFirst(_currentIndex, _triggerIndex, _first, _last, _num, _numT, _isScrollDownOrRight) {
|
|
4701
|
-
if (_currentIndex <= _numT) return 0;else return _isScrollDownOrRight ? _currentIndex < _triggerIndex ? _first : _currentIndex - _numT : _currentIndex > _triggerIndex ? _first : _currentIndex - 2 * _numT;
|
|
4804
|
+
if (_currentIndex <= _numT) return 0;else return Math.max(0, _isScrollDownOrRight ? _currentIndex < _triggerIndex ? _first : _currentIndex - _numT : _currentIndex > _triggerIndex ? _first : _currentIndex - 2 * _numT);
|
|
4702
4805
|
};
|
|
4703
4806
|
|
|
4704
4807
|
var calculateLast = function calculateLast(_currentIndex, _first, _last, _num, _numT, _isCols) {
|
|
@@ -4870,6 +4973,16 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4870
4973
|
|
|
4871
4974
|
return [];
|
|
4872
4975
|
}
|
|
4976
|
+
}, {
|
|
4977
|
+
key: "isPropChanged",
|
|
4978
|
+
value: function isPropChanged(prevProps) {
|
|
4979
|
+
var _this12 = this;
|
|
4980
|
+
|
|
4981
|
+
var props = ['itemSize', 'scrollHeight'];
|
|
4982
|
+
return props.some(function (p) {
|
|
4983
|
+
return !ObjectUtils.equals(prevProps[p], _this12.props[p]);
|
|
4984
|
+
});
|
|
4985
|
+
}
|
|
4873
4986
|
}, {
|
|
4874
4987
|
key: "init",
|
|
4875
4988
|
value: function init() {
|
|
@@ -4885,7 +4998,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4885
4998
|
}, {
|
|
4886
4999
|
key: "componentDidUpdate",
|
|
4887
5000
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
4888
|
-
if (!
|
|
5001
|
+
if (!prevProps.items || prevProps.items.length !== (this.props.items || []).length || this.isPropChanged(prevProps)) {
|
|
4889
5002
|
this.init();
|
|
4890
5003
|
}
|
|
4891
5004
|
|
|
@@ -4915,7 +5028,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4915
5028
|
}, {
|
|
4916
5029
|
key: "renderLoader",
|
|
4917
5030
|
value: function renderLoader() {
|
|
4918
|
-
var
|
|
5031
|
+
var _this13 = this;
|
|
4919
5032
|
|
|
4920
5033
|
if (!this.props.loaderDisabled && this.props.showLoader && this.state.loading) {
|
|
4921
5034
|
var className = classNames('p-virtualscroller-loader', {
|
|
@@ -4929,7 +5042,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4929
5042
|
var isBoth = this.isBoth();
|
|
4930
5043
|
var numItemsInViewport = this.state.numItemsInViewport;
|
|
4931
5044
|
content = this.state.loaderArr.map(function (_, index) {
|
|
4932
|
-
return
|
|
5045
|
+
return _this13.renderLoaderItem(index, isBoth && {
|
|
4933
5046
|
numCols: numItemsInViewport.cols
|
|
4934
5047
|
});
|
|
4935
5048
|
});
|
|
@@ -4945,12 +5058,12 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4945
5058
|
}, {
|
|
4946
5059
|
key: "renderSpacer",
|
|
4947
5060
|
value: function renderSpacer() {
|
|
4948
|
-
var
|
|
5061
|
+
var _this14 = this;
|
|
4949
5062
|
|
|
4950
5063
|
if (this.props.showSpacer) {
|
|
4951
5064
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4952
5065
|
ref: function ref(el) {
|
|
4953
|
-
return
|
|
5066
|
+
return _this14.spacer = el;
|
|
4954
5067
|
},
|
|
4955
5068
|
className: "p-virtualscroller-spacer"
|
|
4956
5069
|
});
|
|
@@ -4970,16 +5083,16 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4970
5083
|
}, {
|
|
4971
5084
|
key: "renderItems",
|
|
4972
5085
|
value: function renderItems(loadedItems) {
|
|
4973
|
-
var
|
|
5086
|
+
var _this15 = this;
|
|
4974
5087
|
|
|
4975
5088
|
return loadedItems.map(function (item, index) {
|
|
4976
|
-
return
|
|
5089
|
+
return _this15.renderItem(item, index);
|
|
4977
5090
|
});
|
|
4978
5091
|
}
|
|
4979
5092
|
}, {
|
|
4980
5093
|
key: "renderContent",
|
|
4981
5094
|
value: function renderContent() {
|
|
4982
|
-
var
|
|
5095
|
+
var _this16 = this;
|
|
4983
5096
|
|
|
4984
5097
|
var loadedItems = this.loadedItems();
|
|
4985
5098
|
var items = this.renderItems(loadedItems);
|
|
@@ -4989,7 +5102,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4989
5102
|
var content = /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4990
5103
|
className: className,
|
|
4991
5104
|
ref: function ref(el) {
|
|
4992
|
-
return
|
|
5105
|
+
return _this16.content = el;
|
|
4993
5106
|
}
|
|
4994
5107
|
}, items);
|
|
4995
5108
|
|
|
@@ -4997,24 +5110,24 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4997
5110
|
var defaultOptions = {
|
|
4998
5111
|
className: className,
|
|
4999
5112
|
contentRef: function contentRef(el) {
|
|
5000
|
-
return
|
|
5113
|
+
return _this16.content = el;
|
|
5001
5114
|
},
|
|
5002
5115
|
spacerRef: function spacerRef(el) {
|
|
5003
|
-
return
|
|
5116
|
+
return _this16.spacer = el;
|
|
5004
5117
|
},
|
|
5005
5118
|
stickyRef: function stickyRef(el) {
|
|
5006
|
-
return
|
|
5119
|
+
return _this16.sticky = el;
|
|
5007
5120
|
},
|
|
5008
5121
|
items: loadedItems,
|
|
5009
5122
|
getItemOptions: function getItemOptions(index) {
|
|
5010
|
-
return
|
|
5123
|
+
return _this16.getOptions(index);
|
|
5011
5124
|
},
|
|
5012
5125
|
children: items,
|
|
5013
5126
|
element: content,
|
|
5014
5127
|
props: this.props,
|
|
5015
5128
|
loading: this.state.loading,
|
|
5016
5129
|
getLoaderOptions: function getLoaderOptions(index, ext) {
|
|
5017
|
-
return
|
|
5130
|
+
return _this16.loaderOptions(index, ext);
|
|
5018
5131
|
},
|
|
5019
5132
|
loadingTemplate: this.props.loadingTemplate,
|
|
5020
5133
|
itemSize: this.props.itemSize,
|
|
@@ -5032,7 +5145,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
5032
5145
|
}, {
|
|
5033
5146
|
key: "render",
|
|
5034
5147
|
value: function render() {
|
|
5035
|
-
var
|
|
5148
|
+
var _this17 = this;
|
|
5036
5149
|
|
|
5037
5150
|
if (this.props.disabled) {
|
|
5038
5151
|
var content = ObjectUtils.getJSXElement(this.props.contentTemplate, {
|
|
@@ -5055,7 +5168,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
5055
5168
|
var spacer = this.renderSpacer();
|
|
5056
5169
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5057
5170
|
ref: function ref(el) {
|
|
5058
|
-
return
|
|
5171
|
+
return _this17.el = el;
|
|
5059
5172
|
},
|
|
5060
5173
|
className: className,
|
|
5061
5174
|
tabIndex: 0,
|
|
@@ -5843,7 +5956,7 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
5843
5956
|
|
|
5844
5957
|
if (!this.resizeListener) {
|
|
5845
5958
|
this.resizeListener = function () {
|
|
5846
|
-
if (_this7.state.overlayVisible && !DomHandler.
|
|
5959
|
+
if (_this7.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
5847
5960
|
_this7.hideOverlay();
|
|
5848
5961
|
}
|
|
5849
5962
|
};
|
|
@@ -5980,7 +6093,7 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
5980
6093
|
disabled: this.props.disabled,
|
|
5981
6094
|
placeholder: this.props.placeholder,
|
|
5982
6095
|
size: this.props.size,
|
|
5983
|
-
maxLength: this.props.
|
|
6096
|
+
maxLength: this.props.maxLength,
|
|
5984
6097
|
tabIndex: this.props.tabIndex,
|
|
5985
6098
|
onBlur: this.onInputBlur,
|
|
5986
6099
|
onFocus: this.onInputFocus,
|
|
@@ -6040,7 +6153,7 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
6040
6153
|
name: this.props.name,
|
|
6041
6154
|
style: this.props.inputStyle,
|
|
6042
6155
|
className: this.props.inputClassName,
|
|
6043
|
-
maxLength: this.props.
|
|
6156
|
+
maxLength: this.props.maxLength,
|
|
6044
6157
|
onKeyUp: this.props.onKeyUp,
|
|
6045
6158
|
onKeyDown: this.onInputKeyDown,
|
|
6046
6159
|
onKeyPress: this.props.onKeyPress,
|
|
@@ -6178,7 +6291,7 @@ _defineProperty(AutoComplete, "defaultProps", {
|
|
|
6178
6291
|
placeholder: null,
|
|
6179
6292
|
readOnly: false,
|
|
6180
6293
|
disabled: false,
|
|
6181
|
-
|
|
6294
|
+
maxLength: null,
|
|
6182
6295
|
size: null,
|
|
6183
6296
|
appendTo: null,
|
|
6184
6297
|
tabIndex: null,
|
|
@@ -7326,12 +7439,31 @@ var Calendar = /*#__PURE__*/function (_Component) {
|
|
|
7326
7439
|
|
|
7327
7440
|
event.preventDefault();
|
|
7328
7441
|
}
|
|
7442
|
+
}, {
|
|
7443
|
+
key: "doStepMinute",
|
|
7444
|
+
value: function doStepMinute(currentMinute, step) {
|
|
7445
|
+
if (this.props.stepMinute <= 1) {
|
|
7446
|
+
return currentMinute;
|
|
7447
|
+
}
|
|
7448
|
+
|
|
7449
|
+
if (!step) {
|
|
7450
|
+
step = this.props.stepMinute;
|
|
7451
|
+
|
|
7452
|
+
if (currentMinute % step === 0) {
|
|
7453
|
+
return currentMinute;
|
|
7454
|
+
}
|
|
7455
|
+
}
|
|
7456
|
+
|
|
7457
|
+
var newMinute = currentMinute + step;
|
|
7458
|
+
newMinute = Math.floor(newMinute / step) * step;
|
|
7459
|
+
return newMinute;
|
|
7460
|
+
}
|
|
7329
7461
|
}, {
|
|
7330
7462
|
key: "incrementMinute",
|
|
7331
7463
|
value: function incrementMinute(event) {
|
|
7332
7464
|
var currentTime = this.getCurrentDateTime();
|
|
7333
7465
|
var currentMinute = currentTime.getMinutes();
|
|
7334
|
-
var newMinute = currentMinute
|
|
7466
|
+
var newMinute = this.doStepMinute(currentMinute, this.props.stepMinute);
|
|
7335
7467
|
newMinute = newMinute > 59 ? newMinute - 60 : newMinute;
|
|
7336
7468
|
|
|
7337
7469
|
if (this.validateMinute(newMinute, currentTime)) {
|
|
@@ -7357,7 +7489,7 @@ var Calendar = /*#__PURE__*/function (_Component) {
|
|
|
7357
7489
|
value: function decrementMinute(event) {
|
|
7358
7490
|
var currentTime = this.getCurrentDateTime();
|
|
7359
7491
|
var currentMinute = currentTime.getMinutes();
|
|
7360
|
-
var newMinute = currentMinute -
|
|
7492
|
+
var newMinute = this.doStepMinute(currentMinute, -this.props.stepMinute);
|
|
7361
7493
|
newMinute = newMinute < 0 ? newMinute + 60 : newMinute;
|
|
7362
7494
|
|
|
7363
7495
|
if (this.validateMinute(newMinute, currentTime)) {
|
|
@@ -8233,7 +8365,7 @@ var Calendar = /*#__PURE__*/function (_Component) {
|
|
|
8233
8365
|
}, {
|
|
8234
8366
|
key: "onWindowResize",
|
|
8235
8367
|
value: function onWindowResize() {
|
|
8236
|
-
if (this.isVisible() && !DomHandler.
|
|
8368
|
+
if (this.isVisible() && !DomHandler.isTouchDevice()) {
|
|
8237
8369
|
this.hideOverlay();
|
|
8238
8370
|
}
|
|
8239
8371
|
}
|
|
@@ -10462,8 +10594,8 @@ var Carousel = /*#__PURE__*/function (_Component2) {
|
|
|
10462
10594
|
}
|
|
10463
10595
|
}, {
|
|
10464
10596
|
key: "onTransitionEnd",
|
|
10465
|
-
value: function onTransitionEnd() {
|
|
10466
|
-
if (this.itemsContainer) {
|
|
10597
|
+
value: function onTransitionEnd(e) {
|
|
10598
|
+
if (this.itemsContainer && e.propertyName === 'transform') {
|
|
10467
10599
|
DomHandler.addClass(this.itemsContainer, 'p-items-hidden');
|
|
10468
10600
|
this.itemsContainer.style.transition = '';
|
|
10469
10601
|
|
|
@@ -10582,8 +10714,7 @@ var Carousel = /*#__PURE__*/function (_Component2) {
|
|
|
10582
10714
|
key: "createStyle",
|
|
10583
10715
|
value: function createStyle() {
|
|
10584
10716
|
if (!this.carouselStyle) {
|
|
10585
|
-
this.carouselStyle =
|
|
10586
|
-
document.body.appendChild(this.carouselStyle);
|
|
10717
|
+
this.carouselStyle = DomHandler.createInlineStyle();
|
|
10587
10718
|
}
|
|
10588
10719
|
|
|
10589
10720
|
var innerHTML = "\n .p-carousel[".concat(this.attributeSelector, "] .p-carousel-item {\n flex: 1 0 ").concat(100 / this.state.numVisible, "%\n }\n ");
|
|
@@ -10826,16 +10957,16 @@ var Carousel = /*#__PURE__*/function (_Component2) {
|
|
|
10826
10957
|
className: "p-carousel-items-content",
|
|
10827
10958
|
style: {
|
|
10828
10959
|
'height': height
|
|
10829
|
-
}
|
|
10960
|
+
},
|
|
10961
|
+
onTouchStart: this.onTouchStart,
|
|
10962
|
+
onTouchMove: this.onTouchMove,
|
|
10963
|
+
onTouchEnd: this.onTouchEnd
|
|
10830
10964
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10831
10965
|
ref: function ref(el) {
|
|
10832
10966
|
return _this5.itemsContainer = el;
|
|
10833
10967
|
},
|
|
10834
10968
|
className: "p-carousel-items-container",
|
|
10835
|
-
onTransitionEnd: this.onTransitionEnd
|
|
10836
|
-
onTouchStart: this.onTouchStart,
|
|
10837
|
-
onTouchMove: this.onTouchMove,
|
|
10838
|
-
onTouchEnd: this.onTouchEnd
|
|
10969
|
+
onTransitionEnd: this.onTransitionEnd
|
|
10839
10970
|
}, items)), forwardNavigator);
|
|
10840
10971
|
}
|
|
10841
10972
|
}, {
|
|
@@ -11621,7 +11752,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
11621
11752
|
|
|
11622
11753
|
if (!this.resizeListener) {
|
|
11623
11754
|
this.resizeListener = function () {
|
|
11624
|
-
if (_this5.state.overlayVisible && !DomHandler.
|
|
11755
|
+
if (_this5.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
11625
11756
|
_this5.hide();
|
|
11626
11757
|
}
|
|
11627
11758
|
};
|
|
@@ -13169,7 +13300,7 @@ var ColorPicker = /*#__PURE__*/function (_Component) {
|
|
|
13169
13300
|
|
|
13170
13301
|
if (!this.resizeListener) {
|
|
13171
13302
|
this.resizeListener = function () {
|
|
13172
|
-
if (_this4.state.overlayVisible && !DomHandler.
|
|
13303
|
+
if (_this4.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
13173
13304
|
_this4.hide();
|
|
13174
13305
|
}
|
|
13175
13306
|
};
|
|
@@ -14169,8 +14300,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
14169
14300
|
key: "createStyle",
|
|
14170
14301
|
value: function createStyle() {
|
|
14171
14302
|
if (!this.styleElement) {
|
|
14172
|
-
this.styleElement =
|
|
14173
|
-
document.head.appendChild(this.styleElement);
|
|
14303
|
+
this.styleElement = DomHandler.createInlineStyle();
|
|
14174
14304
|
var innerHTML = '';
|
|
14175
14305
|
|
|
14176
14306
|
for (var breakpoint in this.props.breakpoints) {
|
|
@@ -14238,12 +14368,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
14238
14368
|
key: "componentWillUnmount",
|
|
14239
14369
|
value: function componentWillUnmount() {
|
|
14240
14370
|
this.disableDocumentSettings();
|
|
14241
|
-
|
|
14242
|
-
if (this.styleElement) {
|
|
14243
|
-
document.head.removeChild(this.styleElement);
|
|
14244
|
-
this.styleElement = null;
|
|
14245
|
-
}
|
|
14246
|
-
|
|
14371
|
+
this.styleElement = DomHandler.removeInlineStyle(this.styleElement);
|
|
14247
14372
|
ZIndexUtils.clear(this.mask);
|
|
14248
14373
|
}
|
|
14249
14374
|
}, {
|
|
@@ -14826,7 +14951,7 @@ var ConfirmPopup = /*#__PURE__*/function (_Component) {
|
|
|
14826
14951
|
|
|
14827
14952
|
if (!this.resizeListener) {
|
|
14828
14953
|
this.resizeListener = function () {
|
|
14829
|
-
if (_this4.state.visible && !DomHandler.
|
|
14954
|
+
if (_this4.state.visible && !DomHandler.isTouchDevice()) {
|
|
14830
14955
|
_this4.hide();
|
|
14831
14956
|
}
|
|
14832
14957
|
};
|
|
@@ -15088,7 +15213,7 @@ var ConfirmPopup = /*#__PURE__*/function (_Component) {
|
|
|
15088
15213
|
return /*#__PURE__*/React__default["default"].createElement(Portal, {
|
|
15089
15214
|
element: element,
|
|
15090
15215
|
appendTo: this.props.appendTo,
|
|
15091
|
-
visible:
|
|
15216
|
+
visible: this.props.visible
|
|
15092
15217
|
});
|
|
15093
15218
|
}
|
|
15094
15219
|
}]);
|
|
@@ -15569,7 +15694,7 @@ var ContextMenu = /*#__PURE__*/function (_Component2) {
|
|
|
15569
15694
|
|
|
15570
15695
|
if (!this.documentResizeListener) {
|
|
15571
15696
|
this.documentResizeListener = function (event) {
|
|
15572
|
-
if (_this9.state.visible && !DomHandler.
|
|
15697
|
+
if (_this9.state.visible && !DomHandler.isTouchDevice()) {
|
|
15573
15698
|
_this9.hide(event);
|
|
15574
15699
|
}
|
|
15575
15700
|
};
|
|
@@ -17191,10 +17316,10 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
17191
17316
|
}, {
|
|
17192
17317
|
key: "onOverlayEntered",
|
|
17193
17318
|
value: function onOverlayEntered(callback) {
|
|
17319
|
+
callback && callback();
|
|
17194
17320
|
this.bindDocumentClickListener();
|
|
17195
17321
|
this.bindScrollListener();
|
|
17196
17322
|
this.bindResizeListener();
|
|
17197
|
-
callback && callback();
|
|
17198
17323
|
this.props.onShow && this.props.onShow();
|
|
17199
17324
|
}
|
|
17200
17325
|
}, {
|
|
@@ -17363,7 +17488,11 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
17363
17488
|
}, {
|
|
17364
17489
|
key: "checkValidity",
|
|
17365
17490
|
value: function checkValidity() {
|
|
17366
|
-
|
|
17491
|
+
if (this.inputRef.current) {
|
|
17492
|
+
return this.inputRef.current.checkValidity();
|
|
17493
|
+
}
|
|
17494
|
+
|
|
17495
|
+
return false;
|
|
17367
17496
|
}
|
|
17368
17497
|
}, {
|
|
17369
17498
|
key: "isLazy",
|
|
@@ -17445,7 +17574,10 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
17445
17574
|
}
|
|
17446
17575
|
|
|
17447
17576
|
this.updateInputField();
|
|
17448
|
-
|
|
17577
|
+
|
|
17578
|
+
if (this.inputRef.current) {
|
|
17579
|
+
this.inputRef.current.selectedIndex = 1;
|
|
17580
|
+
}
|
|
17449
17581
|
}
|
|
17450
17582
|
}, {
|
|
17451
17583
|
key: "componentWillUnmount",
|
|
@@ -17496,7 +17628,10 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
17496
17628
|
}
|
|
17497
17629
|
|
|
17498
17630
|
this.updateInputField();
|
|
17499
|
-
|
|
17631
|
+
|
|
17632
|
+
if (this.inputRef.current) {
|
|
17633
|
+
this.inputRef.current.selectedIndex = 1;
|
|
17634
|
+
}
|
|
17500
17635
|
}
|
|
17501
17636
|
}, {
|
|
17502
17637
|
key: "renderHiddenSelect",
|
|
@@ -18616,11 +18751,16 @@ var InputNumber = /*#__PURE__*/function (_Component) {
|
|
|
18616
18751
|
|
|
18617
18752
|
if (valueStr != null) {
|
|
18618
18753
|
newValue = this.parseValue(valueStr);
|
|
18619
|
-
newValue =
|
|
18754
|
+
newValue = this.evaluateEmpty(newValue);
|
|
18620
18755
|
this.updateInput(newValue, insertedValueStr, operation, valueStr);
|
|
18621
18756
|
this.handleOnChange(event, currentValue, newValue);
|
|
18622
18757
|
}
|
|
18623
18758
|
}
|
|
18759
|
+
}, {
|
|
18760
|
+
key: "evaluateEmpty",
|
|
18761
|
+
value: function evaluateEmpty(newValue) {
|
|
18762
|
+
return !newValue && !this.props.allowEmpty ? this.props.min || 0 : newValue;
|
|
18763
|
+
}
|
|
18624
18764
|
}, {
|
|
18625
18765
|
key: "handleOnChange",
|
|
18626
18766
|
value: function handleOnChange(event, currentValue, newValue) {
|
|
@@ -18734,7 +18874,7 @@ var InputNumber = /*#__PURE__*/function (_Component) {
|
|
|
18734
18874
|
}, {
|
|
18735
18875
|
key: "updateInputValue",
|
|
18736
18876
|
value: function updateInputValue(newValue) {
|
|
18737
|
-
newValue =
|
|
18877
|
+
newValue = this.evaluateEmpty(newValue);
|
|
18738
18878
|
var inputEl = this.inputRef.current;
|
|
18739
18879
|
var value = inputEl.value;
|
|
18740
18880
|
var formattedValue = this.formattedValue(newValue);
|
|
@@ -18747,8 +18887,8 @@ var InputNumber = /*#__PURE__*/function (_Component) {
|
|
|
18747
18887
|
}, {
|
|
18748
18888
|
key: "formattedValue",
|
|
18749
18889
|
value: function formattedValue(val) {
|
|
18750
|
-
var
|
|
18751
|
-
return this.formatValue(
|
|
18890
|
+
var newValue = this.evaluateEmpty(val);
|
|
18891
|
+
return this.formatValue(newValue);
|
|
18752
18892
|
}
|
|
18753
18893
|
}, {
|
|
18754
18894
|
key: "concatValues",
|
|
@@ -18956,7 +19096,7 @@ var InputNumber = /*#__PURE__*/function (_Component) {
|
|
|
18956
19096
|
size: this.props.size,
|
|
18957
19097
|
tabIndex: this.props.tabIndex,
|
|
18958
19098
|
inputMode: this.getInputMode(),
|
|
18959
|
-
maxLength: this.props.
|
|
19099
|
+
maxLength: this.props.maxLength,
|
|
18960
19100
|
disabled: this.props.disabled,
|
|
18961
19101
|
required: this.props.required,
|
|
18962
19102
|
pattern: this.props.pattern,
|
|
@@ -20336,26 +20476,7 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
20336
20476
|
props: this.props.tableProps
|
|
20337
20477
|
}));
|
|
20338
20478
|
|
|
20339
|
-
if (
|
|
20340
|
-
content = body ? ObjectUtils.getJSXElement(body, this.props.rowData, {
|
|
20341
|
-
column: this.props.column,
|
|
20342
|
-
field: this.field,
|
|
20343
|
-
rowIndex: this.props.rowIndex,
|
|
20344
|
-
frozenRow: this.props.frozenRow,
|
|
20345
|
-
props: this.props.tableProps
|
|
20346
|
-
}) : value;
|
|
20347
|
-
} else if (editor && this.state.editing) {
|
|
20348
|
-
content = ObjectUtils.getJSXElement(editor, {
|
|
20349
|
-
rowData: this.state.editingRowData,
|
|
20350
|
-
value: this.resolveFieldData(this.state.editingRowData),
|
|
20351
|
-
column: this.props.column,
|
|
20352
|
-
field: this.field,
|
|
20353
|
-
rowIndex: this.props.rowIndex,
|
|
20354
|
-
frozenRow: this.props.frozenRow,
|
|
20355
|
-
props: this.props.tableProps,
|
|
20356
|
-
editorCallback: this.editorCallback
|
|
20357
|
-
});
|
|
20358
|
-
} else if (selectionMode) {
|
|
20479
|
+
if (selectionMode) {
|
|
20359
20480
|
var showSelection = this.props.showSelectionElement ? this.props.showSelectionElement(this.props.rowData, {
|
|
20360
20481
|
rowIndex: this.props.rowIndex,
|
|
20361
20482
|
props: this.props.tableProps
|
|
@@ -20466,6 +20587,25 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
20466
20587
|
rowEditor: rowEditorProps
|
|
20467
20588
|
});
|
|
20468
20589
|
}
|
|
20590
|
+
} else if (body && !this.state.editing) {
|
|
20591
|
+
content = body ? ObjectUtils.getJSXElement(body, this.props.rowData, {
|
|
20592
|
+
column: this.props.column,
|
|
20593
|
+
field: this.field,
|
|
20594
|
+
rowIndex: this.props.rowIndex,
|
|
20595
|
+
frozenRow: this.props.frozenRow,
|
|
20596
|
+
props: this.props.tableProps
|
|
20597
|
+
}) : value;
|
|
20598
|
+
} else if (editor && this.state.editing) {
|
|
20599
|
+
content = ObjectUtils.getJSXElement(editor, {
|
|
20600
|
+
rowData: this.state.editingRowData,
|
|
20601
|
+
value: this.resolveFieldData(this.state.editingRowData),
|
|
20602
|
+
column: this.props.column,
|
|
20603
|
+
field: this.field,
|
|
20604
|
+
rowIndex: this.props.rowIndex,
|
|
20605
|
+
frozenRow: this.props.frozenRow,
|
|
20606
|
+
props: this.props.tableProps,
|
|
20607
|
+
editorCallback: this.editorCallback
|
|
20608
|
+
});
|
|
20469
20609
|
} else {
|
|
20470
20610
|
content = value;
|
|
20471
20611
|
}
|
|
@@ -21109,7 +21249,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21109
21249
|
}, {
|
|
21110
21250
|
key: "equals",
|
|
21111
21251
|
value: function equals(data1, data2) {
|
|
21112
|
-
if (this.allowCellSelection()) return (data1.rowIndex === data2.rowIndex || data1.rowData === data2.rowData) && (data1.field === data2.field || data1.cellIndex === data2.cellIndex);else return this.compareSelectionBy === 'equals' ? data1 === data2 : ObjectUtils.equals(data1, data2, this.props.dataKey);
|
|
21252
|
+
if (this.allowCellSelection()) return (data1.rowIndex === data2.rowIndex || data1.rowData === data2.rowData) && (data1.field === data2.field || data1.cellIndex === data2.cellIndex);else return this.props.compareSelectionBy === 'equals' ? data1 === data2 : ObjectUtils.equals(data1, data2, this.props.dataKey);
|
|
21113
21253
|
}
|
|
21114
21254
|
}, {
|
|
21115
21255
|
key: "isSubheaderGrouping",
|
|
@@ -21378,7 +21518,8 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21378
21518
|
if (this.props.onSelectionChange && selection !== this.props.selection) {
|
|
21379
21519
|
this.props.onSelectionChange({
|
|
21380
21520
|
originalEvent: originalEvent,
|
|
21381
|
-
value: selection
|
|
21521
|
+
value: selection,
|
|
21522
|
+
type: type
|
|
21382
21523
|
});
|
|
21383
21524
|
}
|
|
21384
21525
|
}
|
|
@@ -21434,13 +21575,14 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21434
21575
|
if (this.props.onSelectionChange && selection !== this.props.selection) {
|
|
21435
21576
|
this.props.onSelectionChange({
|
|
21436
21577
|
originalEvent: originalEvent,
|
|
21437
|
-
value: selection
|
|
21578
|
+
value: selection,
|
|
21579
|
+
type: type
|
|
21438
21580
|
});
|
|
21439
21581
|
}
|
|
21440
21582
|
}
|
|
21441
21583
|
}, {
|
|
21442
21584
|
key: "onRangeSelection",
|
|
21443
|
-
value: function onRangeSelection(event) {
|
|
21585
|
+
value: function onRangeSelection(event, type) {
|
|
21444
21586
|
DomHandler.clearSelection();
|
|
21445
21587
|
this.rangeRowIndex = this.allowCellSelection() ? event.rowIndex : event.index;
|
|
21446
21588
|
var selectionInRange = this.selectRange(event);
|
|
@@ -21449,7 +21591,8 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21449
21591
|
if (this.props.onSelectionChange && selection !== this.props.selection) {
|
|
21450
21592
|
this.props.onSelectionChange({
|
|
21451
21593
|
originalEvent: event.originalEvent,
|
|
21452
|
-
value: selection
|
|
21594
|
+
value: selection,
|
|
21595
|
+
type: type
|
|
21453
21596
|
});
|
|
21454
21597
|
}
|
|
21455
21598
|
|
|
@@ -21609,7 +21752,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21609
21752
|
|
|
21610
21753
|
if (this.allowRowSelection()) {
|
|
21611
21754
|
if (this.allowRangeSelection(event)) {
|
|
21612
|
-
this.onRangeSelection(event);
|
|
21755
|
+
this.onRangeSelection(event, 'row');
|
|
21613
21756
|
} else {
|
|
21614
21757
|
var toggleable = this.isRadioSelectionModeInColumn() || this.isCheckboxSelectionModeInColumn() || this.allowMetaKeySelection(event);
|
|
21615
21758
|
this.anchorRowIndex = event.index;
|
|
@@ -21695,7 +21838,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21695
21838
|
var isSameRow = event.index === this.anchorRowIndex;
|
|
21696
21839
|
|
|
21697
21840
|
if (this.allowRowDrag(event) && !isSameRow) {
|
|
21698
|
-
this.onRangeSelection(event);
|
|
21841
|
+
this.onRangeSelection(event, 'row');
|
|
21699
21842
|
}
|
|
21700
21843
|
}
|
|
21701
21844
|
}, {
|
|
@@ -21898,7 +22041,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21898
22041
|
|
|
21899
22042
|
if (this.allowCellSelection()) {
|
|
21900
22043
|
if (this.allowRangeSelection(event)) {
|
|
21901
|
-
this.onRangeSelection(event);
|
|
22044
|
+
this.onRangeSelection(event, 'cell');
|
|
21902
22045
|
} else {
|
|
21903
22046
|
var toggleable = this.allowMetaKeySelection(event);
|
|
21904
22047
|
|
|
@@ -21947,7 +22090,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21947
22090
|
var isSameCell = event.rowIndex === this.anchorRowIndex && event.cellIndex === this.anchorCellIndex;
|
|
21948
22091
|
|
|
21949
22092
|
if (this.allowCellDrag(event) && !isSameCell) {
|
|
21950
|
-
this.onRangeSelection(event);
|
|
22093
|
+
this.onRangeSelection(event, 'cell');
|
|
21951
22094
|
}
|
|
21952
22095
|
}
|
|
21953
22096
|
}, {
|
|
@@ -22437,7 +22580,7 @@ var HeaderCheckbox = /*#__PURE__*/function (_Component) {
|
|
|
22437
22580
|
});
|
|
22438
22581
|
this.props.onChange({
|
|
22439
22582
|
originalEvent: event,
|
|
22440
|
-
checked: this.props.checked
|
|
22583
|
+
checked: !this.props.checked
|
|
22441
22584
|
});
|
|
22442
22585
|
}
|
|
22443
22586
|
}
|
|
@@ -22563,7 +22706,7 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
22563
22706
|
}, {
|
|
22564
22707
|
key: "isRowMatchModeSelected",
|
|
22565
22708
|
value: function isRowMatchModeSelected(matchMode) {
|
|
22566
|
-
return this.filterModel.matchMode === matchMode;
|
|
22709
|
+
return this.filterModel && this.filterModel.matchMode === matchMode;
|
|
22567
22710
|
}
|
|
22568
22711
|
}, {
|
|
22569
22712
|
key: "showMenuButton",
|
|
@@ -22856,7 +22999,7 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
22856
22999
|
filters[this.field].constraints.push(newConstraint);
|
|
22857
23000
|
filterConstraintAddCallback && filterConstraintAddCallback({
|
|
22858
23001
|
field: this.field,
|
|
22859
|
-
|
|
23002
|
+
constraint: newConstraint
|
|
22860
23003
|
});
|
|
22861
23004
|
this.props.onFilterChange(filters);
|
|
22862
23005
|
|
|
@@ -22874,7 +23017,7 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
22874
23017
|
var removedConstraint = filters[this.field].constraints.splice(index, 1);
|
|
22875
23018
|
filterConstraintRemoveCallback && filterConstraintRemoveCallback({
|
|
22876
23019
|
field: this.field,
|
|
22877
|
-
|
|
23020
|
+
constraint: removedConstraint
|
|
22878
23021
|
});
|
|
22879
23022
|
this.props.onFilterChange(filters);
|
|
22880
23023
|
|
|
@@ -23008,7 +23151,7 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
23008
23151
|
|
|
23009
23152
|
if (!this.resizeListener) {
|
|
23010
23153
|
this.resizeListener = function () {
|
|
23011
|
-
if (_this5.state.overlayVisible) {
|
|
23154
|
+
if (_this5.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
23012
23155
|
_this5.hide();
|
|
23013
23156
|
}
|
|
23014
23157
|
};
|
|
@@ -23116,16 +23259,17 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
23116
23259
|
value: function renderFilterElement(model, index) {
|
|
23117
23260
|
var _this6 = this;
|
|
23118
23261
|
|
|
23262
|
+
var value = model ? model.value : null;
|
|
23119
23263
|
return this.getColumnProp('filterElement') ? ObjectUtils.getJSXElement(this.getColumnProp('filterElement'), {
|
|
23120
23264
|
field: this.field,
|
|
23121
23265
|
index: index,
|
|
23122
23266
|
filterModel: model,
|
|
23123
|
-
value:
|
|
23267
|
+
value: value,
|
|
23124
23268
|
filterApplyCallback: this.filterApplyCallback,
|
|
23125
23269
|
filterCallback: this.filterCallback
|
|
23126
23270
|
}) : /*#__PURE__*/React__default["default"].createElement(InputText, {
|
|
23127
23271
|
type: this.getColumnProp('filterType'),
|
|
23128
|
-
value:
|
|
23272
|
+
value: value || '',
|
|
23129
23273
|
onChange: function onChange(e) {
|
|
23130
23274
|
return _this6.onInputChange(e, index);
|
|
23131
23275
|
},
|
|
@@ -23789,7 +23933,7 @@ var HeaderCell = /*#__PURE__*/function (_Component) {
|
|
|
23789
23933
|
}, {
|
|
23790
23934
|
key: "renderCheckbox",
|
|
23791
23935
|
value: function renderCheckbox() {
|
|
23792
|
-
if (this.getColumnProp('selectionMode') === 'multiple' && this.props.filterDisplay !== 'row') {
|
|
23936
|
+
if (this.props.showSelectAll && this.getColumnProp('selectionMode') === 'multiple' && this.props.filterDisplay !== 'row') {
|
|
23793
23937
|
var allRowsSelected = this.props.allRowsSelected(this.props.value);
|
|
23794
23938
|
return /*#__PURE__*/React__default["default"].createElement(HeaderCheckbox, {
|
|
23795
23939
|
checked: allRowsSelected,
|
|
@@ -24011,6 +24155,7 @@ var TableHeader = /*#__PURE__*/function (_Component) {
|
|
|
24011
24155
|
onColumnResizeStart: _this3.props.onColumnResizeStart,
|
|
24012
24156
|
onColumnResizerClick: _this3.props.onColumnResizerClick,
|
|
24013
24157
|
onColumnResizerDoubleClick: _this3.props.onColumnResizerDoubleClick,
|
|
24158
|
+
showSelectAll: _this3.props.showSelectAll,
|
|
24014
24159
|
allRowsSelected: _this3.props.allRowsSelected,
|
|
24015
24160
|
onColumnCheckboxChange: _this3.onCheckboxChange,
|
|
24016
24161
|
reorderableColumns: _this3.props.reorderableColumns,
|
|
@@ -24018,6 +24163,36 @@ var TableHeader = /*#__PURE__*/function (_Component) {
|
|
|
24018
24163
|
});
|
|
24019
24164
|
});
|
|
24020
24165
|
}
|
|
24166
|
+
}, {
|
|
24167
|
+
key: "renderCheckbox",
|
|
24168
|
+
value: function renderCheckbox(selectionMode) {
|
|
24169
|
+
if (this.props.showSelectAll && selectionMode === 'multiple') {
|
|
24170
|
+
var allRowsSelected = this.props.allRowsSelected(this.props.value);
|
|
24171
|
+
return /*#__PURE__*/React__default["default"].createElement(HeaderCheckbox, {
|
|
24172
|
+
checked: allRowsSelected,
|
|
24173
|
+
onChange: this.onCheckboxChange,
|
|
24174
|
+
disabled: this.props.empty
|
|
24175
|
+
});
|
|
24176
|
+
}
|
|
24177
|
+
|
|
24178
|
+
return null;
|
|
24179
|
+
}
|
|
24180
|
+
}, {
|
|
24181
|
+
key: "renderFilter",
|
|
24182
|
+
value: function renderFilter(column, filter) {
|
|
24183
|
+
if (filter) {
|
|
24184
|
+
return /*#__PURE__*/React__default["default"].createElement(ColumnFilter, {
|
|
24185
|
+
display: "row",
|
|
24186
|
+
column: column,
|
|
24187
|
+
filters: this.props.filters,
|
|
24188
|
+
filtersStore: this.props.filtersStore,
|
|
24189
|
+
onFilterChange: this.props.onFilterChange,
|
|
24190
|
+
onFilterApply: this.props.onFilterApply
|
|
24191
|
+
});
|
|
24192
|
+
}
|
|
24193
|
+
|
|
24194
|
+
return null;
|
|
24195
|
+
}
|
|
24021
24196
|
}, {
|
|
24022
24197
|
key: "renderFilterCells",
|
|
24023
24198
|
value: function renderFilterCells() {
|
|
@@ -24045,24 +24220,15 @@ var TableHeader = /*#__PURE__*/function (_Component) {
|
|
|
24045
24220
|
});
|
|
24046
24221
|
var colKey = columnKey || field || i;
|
|
24047
24222
|
|
|
24048
|
-
var
|
|
24223
|
+
var checkbox = _this4.renderCheckbox(selectionMode);
|
|
24224
|
+
|
|
24225
|
+
var filterRow = _this4.renderFilter(col, filter);
|
|
24049
24226
|
|
|
24050
24227
|
return /*#__PURE__*/React__default["default"].createElement("th", {
|
|
24051
24228
|
key: colKey,
|
|
24052
24229
|
style: colStyle,
|
|
24053
24230
|
className: colClassName
|
|
24054
|
-
},
|
|
24055
|
-
checked: allRowsSelected,
|
|
24056
|
-
onChange: _this4.onCheckboxChange,
|
|
24057
|
-
disabled: _this4.props.empty
|
|
24058
|
-
}), filter && /*#__PURE__*/React__default["default"].createElement(ColumnFilter, {
|
|
24059
|
-
display: "row",
|
|
24060
|
-
column: col,
|
|
24061
|
-
filters: _this4.props.filters,
|
|
24062
|
-
filtersStore: _this4.props.filtersStore,
|
|
24063
|
-
onFilterChange: _this4.props.onFilterChange,
|
|
24064
|
-
onFilterApply: _this4.props.onFilterApply
|
|
24065
|
-
}));
|
|
24231
|
+
}, checkbox, filterRow);
|
|
24066
24232
|
}
|
|
24067
24233
|
|
|
24068
24234
|
return null;
|
|
@@ -24146,10 +24312,6 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24146
24312
|
_this.state.filters = props.filters;
|
|
24147
24313
|
}
|
|
24148
24314
|
|
|
24149
|
-
if (_this.isStateful()) {
|
|
24150
|
-
_this.restoreState(_this.state);
|
|
24151
|
-
}
|
|
24152
|
-
|
|
24153
24315
|
_this.attributeSelector = UniqueComponentId(); // header
|
|
24154
24316
|
|
|
24155
24317
|
_this.onSortChange = _this.onSortChange.bind(_assertThisInitialized(_this));
|
|
@@ -24185,6 +24347,11 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24185
24347
|
value: function isVirtualScrollerDisabled() {
|
|
24186
24348
|
return ObjectUtils.isEmpty(this.props.virtualScrollerOptions) || !this.props.scrollable;
|
|
24187
24349
|
}
|
|
24350
|
+
}, {
|
|
24351
|
+
key: "isEquals",
|
|
24352
|
+
value: function isEquals(data1, data2) {
|
|
24353
|
+
return this.props.compareSelectionBy === 'equals' ? data1 === data2 : ObjectUtils.equals(data1, data2, this.props.dataKey);
|
|
24354
|
+
}
|
|
24188
24355
|
}, {
|
|
24189
24356
|
key: "hasFilter",
|
|
24190
24357
|
value: function hasFilter() {
|
|
@@ -24392,7 +24559,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24392
24559
|
};
|
|
24393
24560
|
};
|
|
24394
24561
|
|
|
24395
|
-
this.props.onPage(getOnPageParams(restoredState.first, restoredState.rows));
|
|
24562
|
+
this.props.onPage(this.createEvent(getOnPageParams(restoredState.first, restoredState.rows)));
|
|
24396
24563
|
} else {
|
|
24397
24564
|
state.first = restoredState.first;
|
|
24398
24565
|
state.rows = restoredState.rows;
|
|
@@ -24401,10 +24568,10 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24401
24568
|
|
|
24402
24569
|
if (restoredState.sortField) {
|
|
24403
24570
|
if (this.props.onSort) {
|
|
24404
|
-
this.props.onSort({
|
|
24571
|
+
this.props.onSort(this.createEvent({
|
|
24405
24572
|
sortField: restoredState.sortField,
|
|
24406
24573
|
sortOrder: restoredState.sortOrder
|
|
24407
|
-
});
|
|
24574
|
+
}));
|
|
24408
24575
|
} else {
|
|
24409
24576
|
state.sortField = restoredState.sortField;
|
|
24410
24577
|
state.sortOrder = restoredState.sortOrder;
|
|
@@ -24413,9 +24580,9 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24413
24580
|
|
|
24414
24581
|
if (restoredState.multiSortMeta) {
|
|
24415
24582
|
if (this.props.onSort) {
|
|
24416
|
-
this.props.onSort({
|
|
24583
|
+
this.props.onSort(this.createEvent({
|
|
24417
24584
|
multiSortMeta: restoredState.multiSortMeta
|
|
24418
|
-
});
|
|
24585
|
+
}));
|
|
24419
24586
|
} else {
|
|
24420
24587
|
state.multiSortMeta = restoredState.multiSortMeta;
|
|
24421
24588
|
}
|
|
@@ -24425,9 +24592,9 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24425
24592
|
state.d_filters = this.cloneFilters(restoredState.filters);
|
|
24426
24593
|
|
|
24427
24594
|
if (this.props.onFilter) {
|
|
24428
|
-
this.props.onFilter({
|
|
24595
|
+
this.props.onFilter(this.createEvent({
|
|
24429
24596
|
filters: restoredState.filters
|
|
24430
|
-
});
|
|
24597
|
+
}));
|
|
24431
24598
|
} else {
|
|
24432
24599
|
state.filters = this.cloneFilters(restoredState.filters);
|
|
24433
24600
|
}
|
|
@@ -24530,15 +24697,23 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24530
24697
|
value: function allRowsSelected(processedData) {
|
|
24531
24698
|
var _this5 = this;
|
|
24532
24699
|
|
|
24533
|
-
|
|
24534
|
-
|
|
24535
|
-
|
|
24536
|
-
|
|
24537
|
-
|
|
24700
|
+
if (this.props.onSelectAllChange) {
|
|
24701
|
+
return this.props.selectAll;
|
|
24702
|
+
} else {
|
|
24703
|
+
var data = this.props.selectionPageOnly ? this.dataToRender(processedData) : processedData;
|
|
24704
|
+
var val = this.props.frozenValue ? [].concat(_toConsumableArray(this.props.frozenValue), _toConsumableArray(data)) : data;
|
|
24705
|
+
var selectableVal = this.props.showSelectionElement ? val.filter(function (data, index) {
|
|
24706
|
+
return _this5.props.showSelectionElement(data, {
|
|
24707
|
+
rowIndex: index,
|
|
24708
|
+
props: _this5.props
|
|
24709
|
+
});
|
|
24710
|
+
}) : val;
|
|
24711
|
+
return selectableVal && this.props.selection && selectableVal.every(function (sv) {
|
|
24712
|
+
return _this5.props.selection.some(function (s) {
|
|
24713
|
+
return _this5.isEquals(s, sv);
|
|
24714
|
+
});
|
|
24538
24715
|
});
|
|
24539
|
-
}
|
|
24540
|
-
var length = this.props.lazy ? this.props.totalRecords : selectableVal ? selectableVal.length : 0;
|
|
24541
|
-
return selectableVal && length > 0 && this.props.selection && this.props.selection.length > 0 && this.props.selection.length === length;
|
|
24716
|
+
}
|
|
24542
24717
|
}
|
|
24543
24718
|
}, {
|
|
24544
24719
|
key: "getSelectionModeInColumn",
|
|
@@ -24739,37 +24914,46 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24739
24914
|
value: function onColumnHeaderCheckboxChange(e, processedData) {
|
|
24740
24915
|
var _this8 = this;
|
|
24741
24916
|
|
|
24742
|
-
|
|
24743
|
-
|
|
24744
|
-
var selection;
|
|
24745
|
-
|
|
24746
|
-
if (!checked) {
|
|
24747
|
-
selection = this.props.frozenValue ? [].concat(_toConsumableArray(this.props.frozenValue), _toConsumableArray(processedData)) : processedData;
|
|
24748
|
-
selection = this.props.showSelectionElement ? selection.filter(function (data, index) {
|
|
24749
|
-
return _this8.props.showSelectionElement(data, {
|
|
24750
|
-
rowIndex: index,
|
|
24751
|
-
props: _this8.props
|
|
24752
|
-
});
|
|
24753
|
-
}) : selection;
|
|
24754
|
-
this.props.onAllRowsSelect && this.props.onAllRowsSelect({
|
|
24755
|
-
originalEvent: originalEvent,
|
|
24756
|
-
data: selection,
|
|
24757
|
-
type: 'all'
|
|
24758
|
-
});
|
|
24917
|
+
if (this.props.onSelectAllChange) {
|
|
24918
|
+
this.props.onSelectAllChange(e);
|
|
24759
24919
|
} else {
|
|
24760
|
-
|
|
24761
|
-
|
|
24762
|
-
|
|
24763
|
-
|
|
24764
|
-
|
|
24765
|
-
|
|
24766
|
-
|
|
24920
|
+
var originalEvent = e.originalEvent,
|
|
24921
|
+
checked = e.checked;
|
|
24922
|
+
var data = this.props.selectionPageOnly ? this.dataToRender(processedData) : processedData;
|
|
24923
|
+
var selection = this.props.selectionPageOnly && this.props.selection ? this.props.selection.filter(function (s) {
|
|
24924
|
+
return !data.some(function (d) {
|
|
24925
|
+
return _this8.isEquals(s, d);
|
|
24926
|
+
});
|
|
24927
|
+
}) : [];
|
|
24928
|
+
|
|
24929
|
+
if (checked) {
|
|
24930
|
+
selection = this.props.frozenValue ? [].concat(_toConsumableArray(selection), _toConsumableArray(this.props.frozenValue), _toConsumableArray(data)) : [].concat(_toConsumableArray(selection), _toConsumableArray(data));
|
|
24931
|
+
selection = this.props.showSelectionElement ? selection.filter(function (data, index) {
|
|
24932
|
+
return _this8.props.showSelectionElement(data, {
|
|
24933
|
+
rowIndex: index,
|
|
24934
|
+
props: _this8.props
|
|
24935
|
+
});
|
|
24936
|
+
}) : selection;
|
|
24937
|
+
this.props.onAllRowsSelect && this.props.onAllRowsSelect({
|
|
24938
|
+
originalEvent: originalEvent,
|
|
24939
|
+
data: selection,
|
|
24940
|
+
type: 'all'
|
|
24941
|
+
});
|
|
24942
|
+
} else {
|
|
24943
|
+
this.props.onAllRowsUnselect && this.props.onAllRowsUnselect({
|
|
24944
|
+
originalEvent: originalEvent,
|
|
24945
|
+
data: selection,
|
|
24946
|
+
type: 'all'
|
|
24947
|
+
});
|
|
24948
|
+
}
|
|
24767
24949
|
|
|
24768
|
-
|
|
24769
|
-
|
|
24770
|
-
|
|
24771
|
-
|
|
24772
|
-
|
|
24950
|
+
if (this.props.onSelectionChange) {
|
|
24951
|
+
this.props.onSelectionChange({
|
|
24952
|
+
originalEvent: originalEvent,
|
|
24953
|
+
value: selection,
|
|
24954
|
+
type: 'all'
|
|
24955
|
+
});
|
|
24956
|
+
}
|
|
24773
24957
|
}
|
|
24774
24958
|
}
|
|
24775
24959
|
}, {
|
|
@@ -24902,15 +25086,13 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24902
25086
|
}, {
|
|
24903
25087
|
key: "createStyleElement",
|
|
24904
25088
|
value: function createStyleElement() {
|
|
24905
|
-
this.styleElement =
|
|
24906
|
-
document.head.appendChild(this.styleElement);
|
|
25089
|
+
this.styleElement = DomHandler.createInlineStyle();
|
|
24907
25090
|
}
|
|
24908
25091
|
}, {
|
|
24909
25092
|
key: "createResponsiveStyle",
|
|
24910
25093
|
value: function createResponsiveStyle() {
|
|
24911
25094
|
if (!this.responsiveStyleElement) {
|
|
24912
|
-
this.responsiveStyleElement =
|
|
24913
|
-
document.head.appendChild(this.responsiveStyleElement);
|
|
25095
|
+
this.responsiveStyleElement = DomHandler.createInlineStyle();
|
|
24914
25096
|
var innerHTML = "\n@media screen and (max-width: ".concat(this.props.breakpoint, ") {\n .p-datatable[").concat(this.attributeSelector, "] .p-datatable-thead > tr > th,\n .p-datatable[").concat(this.attributeSelector, "] .p-datatable-tfoot > tr > td {\n display: none !important;\n }\n\n .p-datatable[").concat(this.attributeSelector, "] .p-datatable-tbody > tr > td {\n display: flex;\n width: 100% !important;\n align-items: center;\n justify-content: space-between;\n }\n\n .p-datatable[").concat(this.attributeSelector, "] .p-datatable-tbody > tr > td:not(:last-child) {\n border: 0 none;\n }\n\n .p-datatable[").concat(this.attributeSelector, "].p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {\n border-top: 0;\n border-right: 0;\n border-left: 0;\n }\n\n .p-datatable[").concat(this.attributeSelector, "] .p-datatable-tbody > tr > td > .p-column-title {\n display: block;\n }\n}\n");
|
|
24915
25097
|
this.responsiveStyleElement.innerHTML = innerHTML;
|
|
24916
25098
|
}
|
|
@@ -24918,24 +25100,18 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24918
25100
|
}, {
|
|
24919
25101
|
key: "destroyResponsiveStyle",
|
|
24920
25102
|
value: function destroyResponsiveStyle() {
|
|
24921
|
-
|
|
24922
|
-
document.head.removeChild(this.responsiveStyleElement);
|
|
24923
|
-
this.responsiveStyleElement = null;
|
|
24924
|
-
}
|
|
25103
|
+
this.responsiveStyleElement = DomHandler.removeInlineStyle(this.responsiveStyleElement);
|
|
24925
25104
|
}
|
|
24926
25105
|
}, {
|
|
24927
25106
|
key: "destroyStyleElement",
|
|
24928
25107
|
value: function destroyStyleElement() {
|
|
24929
|
-
|
|
24930
|
-
document.head.removeChild(this.styleElement);
|
|
24931
|
-
this.styleElement = null;
|
|
24932
|
-
}
|
|
25108
|
+
this.styleElement = DomHandler.removeInlineStyle(this.styleElement);
|
|
24933
25109
|
}
|
|
24934
25110
|
}, {
|
|
24935
25111
|
key: "onPageChange",
|
|
24936
25112
|
value: function onPageChange(e) {
|
|
24937
25113
|
this.clearEditingMetaData();
|
|
24938
|
-
if (this.props.onPage) this.props.onPage(e);else this.setState({
|
|
25114
|
+
if (this.props.onPage) this.props.onPage(this.createEvent(e));else this.setState({
|
|
24939
25115
|
first: e.first,
|
|
24940
25116
|
rows: e.rows
|
|
24941
25117
|
});
|
|
@@ -24999,7 +25175,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24999
25175
|
}
|
|
25000
25176
|
|
|
25001
25177
|
if (this.props.onSort) {
|
|
25002
|
-
this.props.onSort(eventMeta);
|
|
25178
|
+
this.props.onSort(this.createEvent(eventMeta));
|
|
25003
25179
|
} else {
|
|
25004
25180
|
eventMeta.first = 0;
|
|
25005
25181
|
this.setState(eventMeta);
|
|
@@ -25018,6 +25194,15 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25018
25194
|
value: function getCalculatedSortOrder(currentOrder) {
|
|
25019
25195
|
return this.props.removableSort ? this.props.defaultSortOrder === currentOrder ? currentOrder * -1 : 0 : currentOrder * -1;
|
|
25020
25196
|
}
|
|
25197
|
+
}, {
|
|
25198
|
+
key: "compareValuesOnSort",
|
|
25199
|
+
value: function compareValuesOnSort(value1, value2) {
|
|
25200
|
+
var result = null;
|
|
25201
|
+
if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, undefined, {
|
|
25202
|
+
numeric: true
|
|
25203
|
+
});else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
25204
|
+
return result;
|
|
25205
|
+
}
|
|
25021
25206
|
}, {
|
|
25022
25207
|
key: "addSortMeta",
|
|
25023
25208
|
value: function addSortMeta(meta, multiSortMeta) {
|
|
@@ -25042,6 +25227,8 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25042
25227
|
}, {
|
|
25043
25228
|
key: "sortSingle",
|
|
25044
25229
|
value: function sortSingle(data, field, order) {
|
|
25230
|
+
var _this10 = this;
|
|
25231
|
+
|
|
25045
25232
|
if (this.props.groupRowsBy && this.props.groupRowsBy === this.props.sortField) {
|
|
25046
25233
|
var multiSortMeta = [{
|
|
25047
25234
|
field: this.props.sortField,
|
|
@@ -25065,10 +25252,9 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25065
25252
|
value.sort(function (data1, data2) {
|
|
25066
25253
|
var value1 = ObjectUtils.resolveFieldData(data1, field);
|
|
25067
25254
|
var value2 = ObjectUtils.resolveFieldData(data2, field);
|
|
25068
|
-
|
|
25069
|
-
|
|
25070
|
-
|
|
25071
|
-
});else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
25255
|
+
|
|
25256
|
+
var result = _this10.compareValuesOnSort(value1, value2);
|
|
25257
|
+
|
|
25072
25258
|
return order * result;
|
|
25073
25259
|
});
|
|
25074
25260
|
}
|
|
@@ -25078,7 +25264,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25078
25264
|
}, {
|
|
25079
25265
|
key: "sortMultiple",
|
|
25080
25266
|
value: function sortMultiple(data) {
|
|
25081
|
-
var
|
|
25267
|
+
var _this11 = this;
|
|
25082
25268
|
|
|
25083
25269
|
var multiSortMeta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
25084
25270
|
|
|
@@ -25095,7 +25281,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25095
25281
|
|
|
25096
25282
|
if (this.columnSortable && this.columnSortFunction) {
|
|
25097
25283
|
var meta = multiSortMeta.find(function (meta) {
|
|
25098
|
-
return meta.field ===
|
|
25284
|
+
return meta.field === _this11.columnField;
|
|
25099
25285
|
});
|
|
25100
25286
|
var field = this.columnField;
|
|
25101
25287
|
var order = meta ? meta.order : this.defaultSortOrder;
|
|
@@ -25105,7 +25291,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25105
25291
|
});
|
|
25106
25292
|
} else {
|
|
25107
25293
|
value.sort(function (data1, data2) {
|
|
25108
|
-
return
|
|
25294
|
+
return _this11.multisortField(data1, data2, multiSortMeta, 0);
|
|
25109
25295
|
});
|
|
25110
25296
|
}
|
|
25111
25297
|
|
|
@@ -25116,22 +25302,12 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25116
25302
|
value: function multisortField(data1, data2, multiSortMeta, index) {
|
|
25117
25303
|
var value1 = ObjectUtils.resolveFieldData(data1, multiSortMeta[index].field);
|
|
25118
25304
|
var value2 = ObjectUtils.resolveFieldData(data2, multiSortMeta[index].field);
|
|
25119
|
-
var result = null;
|
|
25120
|
-
|
|
25121
|
-
if (typeof value1 === 'string' || value1 instanceof String) {
|
|
25122
|
-
if (value1.localeCompare && value1 !== value2) {
|
|
25123
|
-
return multiSortMeta[index].order * value1.localeCompare(value2, undefined, {
|
|
25124
|
-
numeric: true
|
|
25125
|
-
});
|
|
25126
|
-
}
|
|
25127
|
-
} else {
|
|
25128
|
-
result = value1 < value2 ? -1 : 1;
|
|
25129
|
-
}
|
|
25130
25305
|
|
|
25131
25306
|
if (value1 === value2) {
|
|
25132
25307
|
return multiSortMeta.length - 1 > index ? this.multisortField(data1, data2, multiSortMeta, index + 1) : 0;
|
|
25133
25308
|
}
|
|
25134
25309
|
|
|
25310
|
+
var result = this.compareValuesOnSort(value1, value2);
|
|
25135
25311
|
return multiSortMeta[index].order * result;
|
|
25136
25312
|
}
|
|
25137
25313
|
}, {
|
|
@@ -25145,25 +25321,25 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25145
25321
|
}, {
|
|
25146
25322
|
key: "onFilterApply",
|
|
25147
25323
|
value: function onFilterApply() {
|
|
25148
|
-
var
|
|
25324
|
+
var _this12 = this;
|
|
25149
25325
|
|
|
25150
25326
|
clearTimeout(this.filterTimeout);
|
|
25151
25327
|
this.filterTimeout = setTimeout(function () {
|
|
25152
|
-
var filters =
|
|
25328
|
+
var filters = _this12.cloneFilters(_this12.state.d_filters);
|
|
25153
25329
|
|
|
25154
|
-
if (
|
|
25155
|
-
|
|
25330
|
+
if (_this12.props.onFilter) {
|
|
25331
|
+
_this12.props.onFilter(_this12.createEvent({
|
|
25156
25332
|
filters: filters
|
|
25157
|
-
});
|
|
25333
|
+
}));
|
|
25158
25334
|
} else {
|
|
25159
|
-
|
|
25335
|
+
_this12.setState({
|
|
25160
25336
|
first: 0,
|
|
25161
25337
|
filters: filters
|
|
25162
25338
|
});
|
|
25163
25339
|
}
|
|
25164
25340
|
|
|
25165
|
-
if (
|
|
25166
|
-
|
|
25341
|
+
if (_this12.props.onValueChange) {
|
|
25342
|
+
_this12.props.onValueChange(_this12.processedData({
|
|
25167
25343
|
filters: filters
|
|
25168
25344
|
}));
|
|
25169
25345
|
}
|
|
@@ -25261,7 +25437,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25261
25437
|
}, {
|
|
25262
25438
|
key: "cloneFilters",
|
|
25263
25439
|
value: function cloneFilters(filters) {
|
|
25264
|
-
var
|
|
25440
|
+
var _this13 = this;
|
|
25265
25441
|
|
|
25266
25442
|
filters = filters || this.props.filters;
|
|
25267
25443
|
var cloned = {};
|
|
@@ -25282,34 +25458,31 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25282
25458
|
} else {
|
|
25283
25459
|
var columns = this.getColumns();
|
|
25284
25460
|
cloned = columns.reduce(function (_filters, col) {
|
|
25285
|
-
|
|
25286
|
-
|
|
25287
|
-
|
|
25288
|
-
|
|
25289
|
-
|
|
25290
|
-
|
|
25291
|
-
|
|
25292
|
-
|
|
25293
|
-
};
|
|
25294
|
-
|
|
25295
|
-
if (filterFunction) {
|
|
25296
|
-
FilterService.register("custom_".concat(field), function () {
|
|
25297
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25298
|
-
args[_key] = arguments[_key];
|
|
25299
|
-
}
|
|
25461
|
+
var field = col.props.filterField || col.props.field;
|
|
25462
|
+
var filterFunction = col.props.filterFunction;
|
|
25463
|
+
var dataType = col.props.dataType;
|
|
25464
|
+
var matchMode = col.props.filterMatchMode || (PrimeReact.filterMatchModeOptions[dataType] ? PrimeReact.filterMatchModeOptions[dataType][0] : FilterMatchMode.STARTS_WITH);
|
|
25465
|
+
var constraint = {
|
|
25466
|
+
value: null,
|
|
25467
|
+
matchMode: matchMode
|
|
25468
|
+
};
|
|
25300
25469
|
|
|
25301
|
-
|
|
25302
|
-
|
|
25303
|
-
|
|
25304
|
-
|
|
25305
|
-
|
|
25470
|
+
if (filterFunction) {
|
|
25471
|
+
FilterService.register("custom_".concat(field), function () {
|
|
25472
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25473
|
+
args[_key] = arguments[_key];
|
|
25474
|
+
}
|
|
25306
25475
|
|
|
25307
|
-
|
|
25308
|
-
|
|
25309
|
-
|
|
25310
|
-
}
|
|
25476
|
+
return filterFunction.apply(void 0, args.concat([{
|
|
25477
|
+
column: col
|
|
25478
|
+
}]));
|
|
25479
|
+
});
|
|
25311
25480
|
}
|
|
25312
25481
|
|
|
25482
|
+
_filters[field] = _this13.props.filterDisplay === 'menu' ? {
|
|
25483
|
+
operator: FilterOperator.AND,
|
|
25484
|
+
constraints: [constraint]
|
|
25485
|
+
} : constraint;
|
|
25313
25486
|
return _filters;
|
|
25314
25487
|
}, {});
|
|
25315
25488
|
}
|
|
@@ -25385,7 +25558,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25385
25558
|
}, {
|
|
25386
25559
|
key: "exportCSV",
|
|
25387
25560
|
value: function exportCSV(options) {
|
|
25388
|
-
var
|
|
25561
|
+
var _this14 = this;
|
|
25389
25562
|
|
|
25390
25563
|
var data;
|
|
25391
25564
|
var csv = "\uFEFF";
|
|
@@ -25408,7 +25581,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25408
25581
|
csv += '"' + (header || field) + '"';
|
|
25409
25582
|
|
|
25410
25583
|
if (i < columns.length - 1) {
|
|
25411
|
-
csv +=
|
|
25584
|
+
csv += _this14.props.csvSeparator;
|
|
25412
25585
|
}
|
|
25413
25586
|
}
|
|
25414
25587
|
}); //body
|
|
@@ -25424,7 +25597,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25424
25597
|
var cellData = ObjectUtils.resolveFieldData(record, field);
|
|
25425
25598
|
|
|
25426
25599
|
if (cellData != null) {
|
|
25427
|
-
cellData =
|
|
25600
|
+
cellData = _this14.props.exportFunction ? _this14.props.exportFunction({
|
|
25428
25601
|
data: cellData,
|
|
25429
25602
|
field: field,
|
|
25430
25603
|
rowData: record,
|
|
@@ -25435,7 +25608,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25435
25608
|
csv += '"' + cellData + '"';
|
|
25436
25609
|
|
|
25437
25610
|
if (i < columns.length - 1) {
|
|
25438
|
-
csv +=
|
|
25611
|
+
csv += _this14.props.csvSeparator;
|
|
25439
25612
|
}
|
|
25440
25613
|
}
|
|
25441
25614
|
});
|
|
@@ -25449,6 +25622,18 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25449
25622
|
document.body.click();
|
|
25450
25623
|
}
|
|
25451
25624
|
}
|
|
25625
|
+
}, {
|
|
25626
|
+
key: "createEvent",
|
|
25627
|
+
value: function createEvent(event) {
|
|
25628
|
+
return _objectSpread$s({
|
|
25629
|
+
first: this.getFirst(),
|
|
25630
|
+
rows: this.getRows(),
|
|
25631
|
+
sortField: this.getSortField(),
|
|
25632
|
+
sortOrder: this.getSortOrder(),
|
|
25633
|
+
multiSortMeta: this.getMultiSortMeta(),
|
|
25634
|
+
filters: this.getFilters()
|
|
25635
|
+
}, event);
|
|
25636
|
+
}
|
|
25452
25637
|
}, {
|
|
25453
25638
|
key: "processedData",
|
|
25454
25639
|
value: function processedData(localState) {
|
|
@@ -25492,8 +25677,12 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25492
25677
|
this.createResponsiveStyle();
|
|
25493
25678
|
}
|
|
25494
25679
|
|
|
25495
|
-
if (this.isStateful()
|
|
25496
|
-
this.
|
|
25680
|
+
if (this.isStateful()) {
|
|
25681
|
+
this.setState(this.restoreState(this.state));
|
|
25682
|
+
|
|
25683
|
+
if (this.props.resizableColumns) {
|
|
25684
|
+
this.restoreColumnWidths();
|
|
25685
|
+
}
|
|
25497
25686
|
}
|
|
25498
25687
|
}
|
|
25499
25688
|
}, {
|
|
@@ -25593,6 +25782,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25593
25782
|
filtersStore: filtersStore,
|
|
25594
25783
|
onFilterChange: this.onFilterChange,
|
|
25595
25784
|
onFilterApply: this.onFilterApply,
|
|
25785
|
+
showSelectAll: this.props.showSelectAll,
|
|
25596
25786
|
allRowsSelected: this.allRowsSelected,
|
|
25597
25787
|
onColumnCheckboxChange: this.onColumnHeaderCheckboxChange,
|
|
25598
25788
|
onColumnMouseDown: this.onColumnHeaderMouseDown,
|
|
@@ -25760,7 +25950,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25760
25950
|
}, {
|
|
25761
25951
|
key: "renderContent",
|
|
25762
25952
|
value: function renderContent(processedData, columns, selectionModeInColumn, empty) {
|
|
25763
|
-
var
|
|
25953
|
+
var _this15 = this;
|
|
25764
25954
|
|
|
25765
25955
|
if (!columns) return;
|
|
25766
25956
|
var isVirtualScrollerDisabled = this.isVirtualScrollerDisabled();
|
|
@@ -25773,29 +25963,27 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25773
25963
|
}, /*#__PURE__*/React__default["default"].createElement(VirtualScroller, _extends({}, virtualScrollerOptions, {
|
|
25774
25964
|
items: processedData,
|
|
25775
25965
|
columns: columns,
|
|
25776
|
-
|
|
25777
|
-
height: this.props.scrollHeight
|
|
25778
|
-
},
|
|
25966
|
+
scrollHeight: this.props.scrollHeight,
|
|
25779
25967
|
disabled: isVirtualScrollerDisabled,
|
|
25780
25968
|
loaderDisabled: true,
|
|
25781
25969
|
showSpacer: false,
|
|
25782
25970
|
contentTemplate: function contentTemplate(options) {
|
|
25783
25971
|
var ref = function ref(el) {
|
|
25784
|
-
|
|
25972
|
+
_this15.table = el;
|
|
25785
25973
|
options.spacerRef && options.spacerRef(el);
|
|
25786
25974
|
};
|
|
25787
25975
|
|
|
25788
|
-
var tableClassName = classNames('p-datatable-table',
|
|
25976
|
+
var tableClassName = classNames('p-datatable-table', _this15.props.tableClassName);
|
|
25789
25977
|
|
|
25790
|
-
var tableHeader =
|
|
25978
|
+
var tableHeader = _this15.renderTableHeader(options, empty);
|
|
25791
25979
|
|
|
25792
|
-
var tableBody =
|
|
25980
|
+
var tableBody = _this15.renderTableBody(options, selectionModeInColumn, empty, isVirtualScrollerDisabled);
|
|
25793
25981
|
|
|
25794
|
-
var tableFooter =
|
|
25982
|
+
var tableFooter = _this15.renderTableFooter(options);
|
|
25795
25983
|
|
|
25796
25984
|
return /*#__PURE__*/React__default["default"].createElement("table", {
|
|
25797
25985
|
ref: ref,
|
|
25798
|
-
style:
|
|
25986
|
+
style: _this15.props.tableStyle,
|
|
25799
25987
|
className: tableClassName,
|
|
25800
25988
|
role: "table"
|
|
25801
25989
|
}, tableHeader, tableBody, tableFooter);
|
|
@@ -25857,12 +26045,12 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25857
26045
|
}, {
|
|
25858
26046
|
key: "renderResizeHelper",
|
|
25859
26047
|
value: function renderResizeHelper() {
|
|
25860
|
-
var
|
|
26048
|
+
var _this16 = this;
|
|
25861
26049
|
|
|
25862
26050
|
if (this.props.resizableColumns) {
|
|
25863
26051
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
25864
26052
|
ref: function ref(el) {
|
|
25865
|
-
return
|
|
26053
|
+
return _this16.resizeHelper = el;
|
|
25866
26054
|
},
|
|
25867
26055
|
className: "p-column-resizer-helper",
|
|
25868
26056
|
style: {
|
|
@@ -25876,7 +26064,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25876
26064
|
}, {
|
|
25877
26065
|
key: "renderReorderIndicators",
|
|
25878
26066
|
value: function renderReorderIndicators() {
|
|
25879
|
-
var
|
|
26067
|
+
var _this17 = this;
|
|
25880
26068
|
|
|
25881
26069
|
if (this.props.reorderableColumns) {
|
|
25882
26070
|
var style = {
|
|
@@ -25885,13 +26073,13 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25885
26073
|
};
|
|
25886
26074
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
25887
26075
|
ref: function ref(el) {
|
|
25888
|
-
return
|
|
26076
|
+
return _this17.reorderIndicatorUp = el;
|
|
25889
26077
|
},
|
|
25890
26078
|
className: "pi pi-arrow-down p-datatable-reorder-indicator-up",
|
|
25891
26079
|
style: style
|
|
25892
26080
|
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
25893
26081
|
ref: function ref(el) {
|
|
25894
|
-
return
|
|
26082
|
+
return _this17.reorderIndicatorDown = el;
|
|
25895
26083
|
},
|
|
25896
26084
|
className: "pi pi-arrow-up p-datatable-reorder-indicator-down",
|
|
25897
26085
|
style: style
|
|
@@ -25903,7 +26091,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25903
26091
|
}, {
|
|
25904
26092
|
key: "render",
|
|
25905
26093
|
value: function render() {
|
|
25906
|
-
var
|
|
26094
|
+
var _this18 = this;
|
|
25907
26095
|
|
|
25908
26096
|
var processedData = this.processedData();
|
|
25909
26097
|
var columns = this.getColumns();
|
|
@@ -25939,7 +26127,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25939
26127
|
var reorderIndicators = this.renderReorderIndicators();
|
|
25940
26128
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
25941
26129
|
ref: function ref(el) {
|
|
25942
|
-
return
|
|
26130
|
+
return _this18.el = el;
|
|
25943
26131
|
},
|
|
25944
26132
|
id: this.props.id,
|
|
25945
26133
|
className: className,
|
|
@@ -26006,6 +26194,10 @@ _defineProperty(DataTable, "defaultProps", {
|
|
|
26006
26194
|
dataKey: null,
|
|
26007
26195
|
metaKeySelection: true,
|
|
26008
26196
|
selectOnEdit: true,
|
|
26197
|
+
selectionPageOnly: false,
|
|
26198
|
+
showSelectAll: true,
|
|
26199
|
+
selectAll: false,
|
|
26200
|
+
onSelectAllChange: null,
|
|
26009
26201
|
headerColumnGroup: null,
|
|
26010
26202
|
footerColumnGroup: null,
|
|
26011
26203
|
rowExpansionTemplate: null,
|
|
@@ -26655,7 +26847,7 @@ var Editor = /*#__PURE__*/function (_Component) {
|
|
|
26655
26847
|
if (module && module.default && DomHandler.isExist(_this.editorElement)) {
|
|
26656
26848
|
_this.quill = new module.default(_this.editorElement, {
|
|
26657
26849
|
modules: _objectSpread$r({
|
|
26658
|
-
toolbar: _this.toolbarElement
|
|
26850
|
+
toolbar: _this.props.showHeader ? _this.toolbarElement : false
|
|
26659
26851
|
}, _this.props.modules),
|
|
26660
26852
|
placeholder: _this.props.placeholder,
|
|
26661
26853
|
readOnly: _this.props.readOnly,
|
|
@@ -26717,7 +26909,10 @@ var Editor = /*#__PURE__*/function (_Component) {
|
|
|
26717
26909
|
var containerClass = classNames('p-component p-editor-container', this.props.className);
|
|
26718
26910
|
var toolbarHeader = null;
|
|
26719
26911
|
|
|
26720
|
-
if (this.props.
|
|
26912
|
+
if (this.props.showHeader === false) {
|
|
26913
|
+
toolbarHeader = '';
|
|
26914
|
+
this.toolbarElement = undefined;
|
|
26915
|
+
} else if (this.props.headerTemplate) {
|
|
26721
26916
|
toolbarHeader = /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26722
26917
|
ref: function ref(el) {
|
|
26723
26918
|
return _this2.toolbarElement = el;
|
|
@@ -26839,6 +27034,7 @@ _defineProperty(Editor, "defaultProps", {
|
|
|
26839
27034
|
modules: null,
|
|
26840
27035
|
formats: null,
|
|
26841
27036
|
theme: 'snow',
|
|
27037
|
+
showHeader: true,
|
|
26842
27038
|
headerTemplate: null,
|
|
26843
27039
|
onTextChange: null,
|
|
26844
27040
|
onSelectionChange: null,
|
|
@@ -28760,8 +28956,7 @@ var GalleriaThumbnails = /*#__PURE__*/function (_Component2) {
|
|
|
28760
28956
|
key: "createStyle",
|
|
28761
28957
|
value: function createStyle() {
|
|
28762
28958
|
if (!this.thumbnailsStyle) {
|
|
28763
|
-
this.thumbnailsStyle =
|
|
28764
|
-
document.body.appendChild(this.thumbnailsStyle);
|
|
28959
|
+
this.thumbnailsStyle = DomHandler.createInlineStyle();
|
|
28765
28960
|
}
|
|
28766
28961
|
|
|
28767
28962
|
var innerHTML = "\n .p-galleria-thumbnail-items[".concat(this.attributeSelector, "] .p-galleria-thumbnail-item {\n flex: 1 0 ").concat(100 / this.state.numVisible, "%\n }\n ");
|
|
@@ -30347,7 +30542,7 @@ var InputMask = /*#__PURE__*/function (_Component) {
|
|
|
30347
30542
|
className: inputMaskClassName,
|
|
30348
30543
|
placeholder: this.props.placeholder,
|
|
30349
30544
|
size: this.props.size,
|
|
30350
|
-
maxLength: this.props.
|
|
30545
|
+
maxLength: this.props.maxLength,
|
|
30351
30546
|
tabIndex: this.props.tabIndex,
|
|
30352
30547
|
disabled: this.props.disabled,
|
|
30353
30548
|
readOnly: this.props.readOnly,
|
|
@@ -30379,7 +30574,7 @@ _defineProperty(InputMask, "defaultProps", {
|
|
|
30379
30574
|
className: null,
|
|
30380
30575
|
placeholder: null,
|
|
30381
30576
|
size: null,
|
|
30382
|
-
|
|
30577
|
+
maxLength: null,
|
|
30383
30578
|
tabIndex: null,
|
|
30384
30579
|
disabled: false,
|
|
30385
30580
|
readOnly: false,
|
|
@@ -32434,7 +32629,7 @@ var Menu = /*#__PURE__*/function (_Component) {
|
|
|
32434
32629
|
|
|
32435
32630
|
if (!this.documentResizeListener) {
|
|
32436
32631
|
this.documentResizeListener = function (event) {
|
|
32437
|
-
if (_this4.state.visible && !DomHandler.
|
|
32632
|
+
if (_this4.state.visible && !DomHandler.isTouchDevice()) {
|
|
32438
32633
|
_this4.hide(event);
|
|
32439
32634
|
}
|
|
32440
32635
|
};
|
|
@@ -34324,7 +34519,7 @@ var MultiSelect = /*#__PURE__*/function (_Component) {
|
|
|
34324
34519
|
|
|
34325
34520
|
if (!this.resizeListener) {
|
|
34326
34521
|
this.resizeListener = function () {
|
|
34327
|
-
if (_this12.state.overlayVisible && !DomHandler.
|
|
34522
|
+
if (_this12.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
34328
34523
|
_this12.hide();
|
|
34329
34524
|
}
|
|
34330
34525
|
};
|
|
@@ -34431,7 +34626,7 @@ var MultiSelect = /*#__PURE__*/function (_Component) {
|
|
|
34431
34626
|
} else {
|
|
34432
34627
|
var visibleOptions = this.getVisibleOptions();
|
|
34433
34628
|
|
|
34434
|
-
if (visibleOptions
|
|
34629
|
+
if (ObjectUtils.isEmpty(visibleOptions)) {
|
|
34435
34630
|
return false;
|
|
34436
34631
|
}
|
|
34437
34632
|
|
|
@@ -36075,7 +36270,7 @@ var OverlayPanel = /*#__PURE__*/function (_Component) {
|
|
|
36075
36270
|
|
|
36076
36271
|
if (!this.resizeListener) {
|
|
36077
36272
|
this.resizeListener = function () {
|
|
36078
|
-
if (_this4.state.visible && !DomHandler.
|
|
36273
|
+
if (_this4.state.visible && !DomHandler.isTouchDevice()) {
|
|
36079
36274
|
_this4.hide();
|
|
36080
36275
|
}
|
|
36081
36276
|
};
|
|
@@ -36226,8 +36421,7 @@ var OverlayPanel = /*#__PURE__*/function (_Component) {
|
|
|
36226
36421
|
key: "createStyle",
|
|
36227
36422
|
value: function createStyle() {
|
|
36228
36423
|
if (!this.styleElement) {
|
|
36229
|
-
this.styleElement =
|
|
36230
|
-
document.head.appendChild(this.styleElement);
|
|
36424
|
+
this.styleElement = DomHandler.createInlineStyle();
|
|
36231
36425
|
var innerHTML = '';
|
|
36232
36426
|
|
|
36233
36427
|
for (var breakpoint in this.props.breakpoints) {
|
|
@@ -36255,10 +36449,7 @@ var OverlayPanel = /*#__PURE__*/function (_Component) {
|
|
|
36255
36449
|
this.scrollHandler = null;
|
|
36256
36450
|
}
|
|
36257
36451
|
|
|
36258
|
-
|
|
36259
|
-
document.head.removeChild(this.styleElement);
|
|
36260
|
-
this.styleElement = null;
|
|
36261
|
-
}
|
|
36452
|
+
this.styleElement = DomHandler.removeInlineStyle(this.styleElement);
|
|
36262
36453
|
|
|
36263
36454
|
if (this.overlayEventListener) {
|
|
36264
36455
|
OverlayService.off('overlay-click', this.overlayEventListener);
|
|
@@ -36447,8 +36638,9 @@ var Panel = /*#__PURE__*/function (_Component) {
|
|
|
36447
36638
|
"aria-controls": ariaControls,
|
|
36448
36639
|
"aria-expanded": !collapsed,
|
|
36449
36640
|
role: "tab"
|
|
36450
|
-
},
|
|
36451
|
-
|
|
36641
|
+
}, IconUtils.getJSXIcon(toggleIcon, {
|
|
36642
|
+
props: this.props,
|
|
36643
|
+
collapsed: collapsed
|
|
36452
36644
|
}), /*#__PURE__*/React__default["default"].createElement(Ripple, null));
|
|
36453
36645
|
}
|
|
36454
36646
|
|
|
@@ -37310,7 +37502,7 @@ var Password = /*#__PURE__*/function (_Component) {
|
|
|
37310
37502
|
|
|
37311
37503
|
if (!this.resizeListener) {
|
|
37312
37504
|
this.resizeListener = function () {
|
|
37313
|
-
if (_this6.state.overlayVisible && !DomHandler.
|
|
37505
|
+
if (_this6.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
37314
37506
|
_this6.hideOverlay();
|
|
37315
37507
|
}
|
|
37316
37508
|
};
|
|
@@ -40262,7 +40454,7 @@ var SlideMenu = /*#__PURE__*/function (_Component2) {
|
|
|
40262
40454
|
|
|
40263
40455
|
if (!this.documentResizeListener) {
|
|
40264
40456
|
this.documentResizeListener = function (event) {
|
|
40265
|
-
if (_this9.state.visible && !DomHandler.
|
|
40457
|
+
if (_this9.state.visible && !DomHandler.isTouchDevice()) {
|
|
40266
40458
|
_this9.hide(event);
|
|
40267
40459
|
}
|
|
40268
40460
|
};
|
|
@@ -41098,7 +41290,7 @@ var SplitButton = /*#__PURE__*/function (_Component) {
|
|
|
41098
41290
|
|
|
41099
41291
|
if (!this.resizeListener) {
|
|
41100
41292
|
this.resizeListener = function () {
|
|
41101
|
-
if (_this4.state.overlayVisible && !DomHandler.
|
|
41293
|
+
if (_this4.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
41102
41294
|
_this4.hide();
|
|
41103
41295
|
}
|
|
41104
41296
|
};
|
|
@@ -41201,6 +41393,8 @@ var SplitButton = /*#__PURE__*/function (_Component) {
|
|
|
41201
41393
|
var className = classNames('p-splitbutton p-component', this.props.className, {
|
|
41202
41394
|
'p-disabled': this.props.disabled
|
|
41203
41395
|
});
|
|
41396
|
+
var buttonClassName = classNames('p-splitbutton-defaultbutton', this.props.buttonClassName);
|
|
41397
|
+
var menuButtonClassName = classNames('p-splitbutton-menubutton', this.props.menuButtonClassName);
|
|
41204
41398
|
var items = this.renderItems();
|
|
41205
41399
|
var buttonContent = this.props.buttonTemplate ? ObjectUtils.getJSXElement(this.props.buttonTemplate, this.props) : null;
|
|
41206
41400
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -41215,7 +41409,7 @@ var SplitButton = /*#__PURE__*/function (_Component) {
|
|
|
41215
41409
|
return _this6.defaultButton = el;
|
|
41216
41410
|
},
|
|
41217
41411
|
type: "button",
|
|
41218
|
-
className:
|
|
41412
|
+
className: buttonClassName,
|
|
41219
41413
|
icon: this.props.icon,
|
|
41220
41414
|
label: this.props.label,
|
|
41221
41415
|
onClick: this.props.onClick,
|
|
@@ -41223,7 +41417,7 @@ var SplitButton = /*#__PURE__*/function (_Component) {
|
|
|
41223
41417
|
tabIndex: this.props.tabIndex
|
|
41224
41418
|
}, buttonContent), /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
41225
41419
|
type: "button",
|
|
41226
|
-
className:
|
|
41420
|
+
className: menuButtonClassName,
|
|
41227
41421
|
icon: this.props.dropdownIcon,
|
|
41228
41422
|
onClick: this.onDropdownButtonClick,
|
|
41229
41423
|
disabled: this.props.disabled,
|
|
@@ -41258,8 +41452,10 @@ _defineProperty(SplitButton, "defaultProps", {
|
|
|
41258
41452
|
disabled: null,
|
|
41259
41453
|
style: null,
|
|
41260
41454
|
className: null,
|
|
41455
|
+
buttonClassName: null,
|
|
41261
41456
|
menuStyle: null,
|
|
41262
41457
|
menuClassName: null,
|
|
41458
|
+
menuButtonClassName: null,
|
|
41263
41459
|
tabIndex: null,
|
|
41264
41460
|
appendTo: null,
|
|
41265
41461
|
tooltip: null,
|
|
@@ -41976,6 +42172,8 @@ _defineProperty(TabPanel, "defaultProps", {
|
|
|
41976
42172
|
rightIcon: null,
|
|
41977
42173
|
closable: false,
|
|
41978
42174
|
disabled: false,
|
|
42175
|
+
style: null,
|
|
42176
|
+
className: null,
|
|
41979
42177
|
headerStyle: null,
|
|
41980
42178
|
headerClassName: null,
|
|
41981
42179
|
contentStyle: null,
|
|
@@ -42066,6 +42264,14 @@ var TabView = /*#__PURE__*/function (_Component2) {
|
|
|
42066
42264
|
|
|
42067
42265
|
tabInfo && _this3.onTabHeaderClick(event, tabInfo.tab, tabInfo.index);
|
|
42068
42266
|
});
|
|
42267
|
+
|
|
42268
|
+
if (this.props.onTabClose) {
|
|
42269
|
+
this.props.onTabClose({
|
|
42270
|
+
originalEvent: event,
|
|
42271
|
+
index: index
|
|
42272
|
+
});
|
|
42273
|
+
}
|
|
42274
|
+
|
|
42069
42275
|
event.preventDefault();
|
|
42070
42276
|
}
|
|
42071
42277
|
}, {
|
|
@@ -42205,10 +42411,13 @@ var TabView = /*#__PURE__*/function (_Component2) {
|
|
|
42205
42411
|
var _this4 = this;
|
|
42206
42412
|
|
|
42207
42413
|
var selected = this.isSelected(index);
|
|
42414
|
+
|
|
42415
|
+
var style = _objectSpread$b(_objectSpread$b({}, tab.props.headerStyle || {}), tab.props.style || {});
|
|
42416
|
+
|
|
42208
42417
|
var className = classNames('p-unselectable-text', {
|
|
42209
42418
|
'p-tabview-selected p-highlight': selected,
|
|
42210
42419
|
'p-disabled': tab.props.disabled
|
|
42211
|
-
}, tab.props.headerClassName);
|
|
42420
|
+
}, tab.props.headerClassName, tab.props.className);
|
|
42212
42421
|
var id = this.state.id + '_header_' + index;
|
|
42213
42422
|
var ariaControls = this.state.id + '_content_' + index;
|
|
42214
42423
|
var tabIndex = tab.props.disabled ? null : 0;
|
|
@@ -42269,7 +42478,7 @@ var TabView = /*#__PURE__*/function (_Component2) {
|
|
|
42269
42478
|
return _this4["tab_".concat(index)] = el;
|
|
42270
42479
|
},
|
|
42271
42480
|
className: className,
|
|
42272
|
-
style:
|
|
42481
|
+
style: style,
|
|
42273
42482
|
role: "presentation"
|
|
42274
42483
|
}, content);
|
|
42275
42484
|
}
|
|
@@ -42329,7 +42538,10 @@ var TabView = /*#__PURE__*/function (_Component2) {
|
|
|
42329
42538
|
key: "createContent",
|
|
42330
42539
|
value: function createContent(tab, index) {
|
|
42331
42540
|
var selected = this.isSelected(index);
|
|
42332
|
-
|
|
42541
|
+
|
|
42542
|
+
var style = _objectSpread$b(_objectSpread$b({}, tab.props.contentStyle || {}), tab.props.style || {});
|
|
42543
|
+
|
|
42544
|
+
var className = classNames(tab.props.contentClassName, tab.props.className, 'p-tabview-panel', {
|
|
42333
42545
|
'p-hidden': !selected
|
|
42334
42546
|
});
|
|
42335
42547
|
var id = this.state.id + '_content_' + index;
|
|
@@ -42339,7 +42551,7 @@ var TabView = /*#__PURE__*/function (_Component2) {
|
|
|
42339
42551
|
"aria-labelledby": ariaLabelledBy,
|
|
42340
42552
|
"aria-hidden": !selected,
|
|
42341
42553
|
className: className,
|
|
42342
|
-
style:
|
|
42554
|
+
style: style,
|
|
42343
42555
|
role: "tabpanel"
|
|
42344
42556
|
}, !this.props.renderActiveOnly ? tab.props.children : selected && tab.props.children);
|
|
42345
42557
|
}
|
|
@@ -42409,6 +42621,7 @@ _defineProperty(TabView, "defaultProps", {
|
|
|
42409
42621
|
className: null,
|
|
42410
42622
|
renderActiveOnly: true,
|
|
42411
42623
|
onTabChange: null,
|
|
42624
|
+
onTabClose: null,
|
|
42412
42625
|
scrollable: false
|
|
42413
42626
|
});
|
|
42414
42627
|
|
|
@@ -42958,7 +43171,7 @@ var TieredMenu = /*#__PURE__*/function (_Component) {
|
|
|
42958
43171
|
|
|
42959
43172
|
if (!this.documentResizeListener) {
|
|
42960
43173
|
this.documentResizeListener = function (event) {
|
|
42961
|
-
if (_this5.state.visible && !DomHandler.
|
|
43174
|
+
if (_this5.state.visible && !DomHandler.isTouchDevice()) {
|
|
42962
43175
|
_this5.hide(event);
|
|
42963
43176
|
}
|
|
42964
43177
|
};
|
|
@@ -45517,7 +45730,7 @@ var TreeSelect = /*#__PURE__*/function (_Component) {
|
|
|
45517
45730
|
|
|
45518
45731
|
if (!this.resizeListener) {
|
|
45519
45732
|
this.resizeListener = function () {
|
|
45520
|
-
if (_this4.state.overlayVisible && !DomHandler.
|
|
45733
|
+
if (_this4.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
45521
45734
|
_this4.hide();
|
|
45522
45735
|
}
|
|
45523
45736
|
};
|
|
@@ -49561,17 +49774,24 @@ var BlockUI = /*#__PURE__*/function (_Component) {
|
|
|
49561
49774
|
value: function unblock() {
|
|
49562
49775
|
var _this2 = this;
|
|
49563
49776
|
|
|
49564
|
-
|
|
49565
|
-
this.mask.addEventListener('animationend', function () {
|
|
49566
|
-
ZIndexUtils.clear(_this2.mask);
|
|
49567
|
-
|
|
49777
|
+
var callback = function callback() {
|
|
49568
49778
|
_this2.setState({
|
|
49569
49779
|
visible: false
|
|
49570
49780
|
}, function () {
|
|
49571
49781
|
_this2.props.fullScreen && DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
49572
49782
|
_this2.props.onUnblocked && _this2.props.onUnblocked();
|
|
49573
49783
|
});
|
|
49574
|
-
}
|
|
49784
|
+
};
|
|
49785
|
+
|
|
49786
|
+
if (this.mask) {
|
|
49787
|
+
DomHandler.addClass(this.mask, 'p-component-overlay-leave');
|
|
49788
|
+
this.mask.addEventListener('animationend', function () {
|
|
49789
|
+
ZIndexUtils.clear(_this2.mask);
|
|
49790
|
+
callback();
|
|
49791
|
+
});
|
|
49792
|
+
} else {
|
|
49793
|
+
callback();
|
|
49794
|
+
}
|
|
49575
49795
|
}
|
|
49576
49796
|
}, {
|
|
49577
49797
|
key: "onPortalMounted",
|
|
@@ -50503,7 +50723,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
50503
50723
|
|
|
50504
50724
|
if (!this.resizeListener) {
|
|
50505
50725
|
this.resizeListener = function () {
|
|
50506
|
-
if (_this8.state.overlayVisible && !DomHandler.
|
|
50726
|
+
if (_this8.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
50507
50727
|
_this8.hideOverlay();
|
|
50508
50728
|
}
|
|
50509
50729
|
};
|