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.esm.js
CHANGED
|
@@ -1007,7 +1007,12 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
1007
1007
|
}, {
|
|
1008
1008
|
key: "isExist",
|
|
1009
1009
|
value: function isExist(element) {
|
|
1010
|
-
return element !== null && typeof element !== 'undefined' && element.nodeName;
|
|
1010
|
+
return element !== null && typeof element !== 'undefined' && element.nodeName && element.parentNode;
|
|
1011
|
+
}
|
|
1012
|
+
}, {
|
|
1013
|
+
key: "hasDOM",
|
|
1014
|
+
value: function hasDOM() {
|
|
1015
|
+
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
1011
1016
|
}
|
|
1012
1017
|
}, {
|
|
1013
1018
|
key: "getFocusableElements",
|
|
@@ -1133,6 +1138,48 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
1133
1138
|
}
|
|
1134
1139
|
}
|
|
1135
1140
|
}
|
|
1141
|
+
/**
|
|
1142
|
+
* Anytime an inline style is created check environment variable 'process.env.REACT_APP_CSS_NONCE'
|
|
1143
|
+
* to set a CSP NONCE.
|
|
1144
|
+
*
|
|
1145
|
+
* @see https://github.com/primefaces/primereact/issues/2423
|
|
1146
|
+
* @return HtmlStyleElement
|
|
1147
|
+
*/
|
|
1148
|
+
|
|
1149
|
+
}, {
|
|
1150
|
+
key: "createInlineStyle",
|
|
1151
|
+
value: function createInlineStyle() {
|
|
1152
|
+
var styleElement = document.createElement('style');
|
|
1153
|
+
var nonce = process.env.REACT_APP_CSS_NONCE;
|
|
1154
|
+
|
|
1155
|
+
if (nonce) {
|
|
1156
|
+
styleElement.setAttribute('nonce', nonce);
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
document.head.appendChild(styleElement);
|
|
1160
|
+
return styleElement;
|
|
1161
|
+
}
|
|
1162
|
+
/**
|
|
1163
|
+
* Remove a style element from the head and attempt to prevent DOM Exception on fast refresh.
|
|
1164
|
+
*
|
|
1165
|
+
* @see https://github.com/primefaces/primereact/issues/2469
|
|
1166
|
+
* @param {HtmlStyleElement} styleElement the element to remove from head
|
|
1167
|
+
*/
|
|
1168
|
+
|
|
1169
|
+
}, {
|
|
1170
|
+
key: "removeInlineStyle",
|
|
1171
|
+
value: function removeInlineStyle(styleElement) {
|
|
1172
|
+
if (this.isExist(styleElement)) {
|
|
1173
|
+
try {
|
|
1174
|
+
document.head.removeChild(styleElement);
|
|
1175
|
+
} catch (error) {// style element may have already been removed in a fast refresh
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
styleElement = null;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
return styleElement;
|
|
1182
|
+
}
|
|
1136
1183
|
}]);
|
|
1137
1184
|
|
|
1138
1185
|
return DomHandler;
|
|
@@ -2024,343 +2071,6 @@ function handler() {
|
|
|
2024
2071
|
|
|
2025
2072
|
var ZIndexUtils = handler();
|
|
2026
2073
|
|
|
2027
|
-
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; }
|
|
2028
|
-
|
|
2029
|
-
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; }
|
|
2030
|
-
|
|
2031
|
-
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); }; }
|
|
2032
|
-
|
|
2033
|
-
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; } }
|
|
2034
|
-
var CSSTransition = /*#__PURE__*/function (_Component) {
|
|
2035
|
-
_inherits(CSSTransition, _Component);
|
|
2036
|
-
|
|
2037
|
-
var _super = _createSuper$2l(CSSTransition);
|
|
2038
|
-
|
|
2039
|
-
function CSSTransition(props) {
|
|
2040
|
-
var _this;
|
|
2041
|
-
|
|
2042
|
-
_classCallCheck(this, CSSTransition);
|
|
2043
|
-
|
|
2044
|
-
_this = _super.call(this, props);
|
|
2045
|
-
_this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));
|
|
2046
|
-
_this.onEntering = _this.onEntering.bind(_assertThisInitialized(_this));
|
|
2047
|
-
_this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this));
|
|
2048
|
-
_this.onExit = _this.onExit.bind(_assertThisInitialized(_this));
|
|
2049
|
-
_this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));
|
|
2050
|
-
_this.onExited = _this.onExited.bind(_assertThisInitialized(_this));
|
|
2051
|
-
return _this;
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
|
-
_createClass(CSSTransition, [{
|
|
2055
|
-
key: "onEnter",
|
|
2056
|
-
value: function onEnter(node, isAppearing) {
|
|
2057
|
-
this.props.onEnter && this.props.onEnter(node, isAppearing); // component
|
|
2058
|
-
|
|
2059
|
-
this.props.options && this.props.options.onEnter && this.props.options.onEnter(node, isAppearing); // user option
|
|
2060
|
-
}
|
|
2061
|
-
}, {
|
|
2062
|
-
key: "onEntering",
|
|
2063
|
-
value: function onEntering(node, isAppearing) {
|
|
2064
|
-
this.props.onEntering && this.props.onEntering(node, isAppearing); // component
|
|
2065
|
-
|
|
2066
|
-
this.props.options && this.props.options.onEntering && this.props.options.onEntering(node, isAppearing); // user option
|
|
2067
|
-
}
|
|
2068
|
-
}, {
|
|
2069
|
-
key: "onEntered",
|
|
2070
|
-
value: function onEntered(node, isAppearing) {
|
|
2071
|
-
this.props.onEntered && this.props.onEntered(node, isAppearing); // component
|
|
2072
|
-
|
|
2073
|
-
this.props.options && this.props.options.onEntered && this.props.options.onEntered(node, isAppearing); // user option
|
|
2074
|
-
}
|
|
2075
|
-
}, {
|
|
2076
|
-
key: "onExit",
|
|
2077
|
-
value: function onExit(node) {
|
|
2078
|
-
this.props.onExit && this.props.onExit(node); // component
|
|
2079
|
-
|
|
2080
|
-
this.props.options && this.props.options.onExit && this.props.options.onExit(node); // user option
|
|
2081
|
-
}
|
|
2082
|
-
}, {
|
|
2083
|
-
key: "onExiting",
|
|
2084
|
-
value: function onExiting(node) {
|
|
2085
|
-
this.props.onExiting && this.props.onExiting(node); // component
|
|
2086
|
-
|
|
2087
|
-
this.props.options && this.props.options.onExiting && this.props.options.onExiting(node); // user option
|
|
2088
|
-
}
|
|
2089
|
-
}, {
|
|
2090
|
-
key: "onExited",
|
|
2091
|
-
value: function onExited(node) {
|
|
2092
|
-
this.props.onExited && this.props.onExited(node); // component
|
|
2093
|
-
|
|
2094
|
-
this.props.options && this.props.options.onExited && this.props.options.onExited(node); // user option
|
|
2095
|
-
}
|
|
2096
|
-
}, {
|
|
2097
|
-
key: "render",
|
|
2098
|
-
value: function render() {
|
|
2099
|
-
var immutableProps = {
|
|
2100
|
-
nodeRef: this.props.nodeRef,
|
|
2101
|
-
in: this.props.in,
|
|
2102
|
-
onEnter: this.onEnter,
|
|
2103
|
-
onEntering: this.onEntering,
|
|
2104
|
-
onEntered: this.onEntered,
|
|
2105
|
-
onExit: this.onExit,
|
|
2106
|
-
onExiting: this.onExiting,
|
|
2107
|
-
onExited: this.onExited
|
|
2108
|
-
};
|
|
2109
|
-
var mutableProps = {
|
|
2110
|
-
classNames: this.props.classNames,
|
|
2111
|
-
timeout: this.props.timeout,
|
|
2112
|
-
unmountOnExit: this.props.unmountOnExit
|
|
2113
|
-
};
|
|
2114
|
-
|
|
2115
|
-
var props = _objectSpread$T(_objectSpread$T(_objectSpread$T({}, mutableProps), this.props.options || {}), immutableProps);
|
|
2116
|
-
|
|
2117
|
-
return /*#__PURE__*/React.createElement(CSSTransition$1, props, this.props.children);
|
|
2118
|
-
}
|
|
2119
|
-
}]);
|
|
2120
|
-
|
|
2121
|
-
return CSSTransition;
|
|
2122
|
-
}(Component);
|
|
2123
|
-
|
|
2124
|
-
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; }
|
|
2125
|
-
|
|
2126
|
-
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; }
|
|
2127
|
-
|
|
2128
|
-
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); }; }
|
|
2129
|
-
|
|
2130
|
-
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; } }
|
|
2131
|
-
var AccordionTab = /*#__PURE__*/function (_Component) {
|
|
2132
|
-
_inherits(AccordionTab, _Component);
|
|
2133
|
-
|
|
2134
|
-
var _super = _createSuper$2k(AccordionTab);
|
|
2135
|
-
|
|
2136
|
-
function AccordionTab() {
|
|
2137
|
-
_classCallCheck(this, AccordionTab);
|
|
2138
|
-
|
|
2139
|
-
return _super.apply(this, arguments);
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
|
-
return AccordionTab;
|
|
2143
|
-
}(Component);
|
|
2144
|
-
|
|
2145
|
-
_defineProperty(AccordionTab, "defaultProps", {
|
|
2146
|
-
header: null,
|
|
2147
|
-
disabled: false,
|
|
2148
|
-
headerStyle: null,
|
|
2149
|
-
headerClassName: null,
|
|
2150
|
-
headerTemplate: null,
|
|
2151
|
-
contentStyle: null,
|
|
2152
|
-
contentClassName: null
|
|
2153
|
-
});
|
|
2154
|
-
|
|
2155
|
-
var Accordion = /*#__PURE__*/function (_Component2) {
|
|
2156
|
-
_inherits(Accordion, _Component2);
|
|
2157
|
-
|
|
2158
|
-
var _super2 = _createSuper$2k(Accordion);
|
|
2159
|
-
|
|
2160
|
-
function Accordion(props) {
|
|
2161
|
-
var _this;
|
|
2162
|
-
|
|
2163
|
-
_classCallCheck(this, Accordion);
|
|
2164
|
-
|
|
2165
|
-
_this = _super2.call(this, props);
|
|
2166
|
-
var state = {
|
|
2167
|
-
id: _this.props.id
|
|
2168
|
-
};
|
|
2169
|
-
|
|
2170
|
-
if (!_this.props.onTabChange) {
|
|
2171
|
-
state = _objectSpread$S(_objectSpread$S({}, state), {}, {
|
|
2172
|
-
activeIndex: props.activeIndex
|
|
2173
|
-
});
|
|
2174
|
-
}
|
|
2175
|
-
|
|
2176
|
-
_this.state = state;
|
|
2177
|
-
return _this;
|
|
2178
|
-
}
|
|
2179
|
-
|
|
2180
|
-
_createClass(Accordion, [{
|
|
2181
|
-
key: "shouldTabRender",
|
|
2182
|
-
value: function shouldTabRender(tab) {
|
|
2183
|
-
return tab && tab.type === AccordionTab;
|
|
2184
|
-
}
|
|
2185
|
-
}, {
|
|
2186
|
-
key: "onTabHeaderClick",
|
|
2187
|
-
value: function onTabHeaderClick(event, tab, index) {
|
|
2188
|
-
if (!tab.props.disabled) {
|
|
2189
|
-
var selected = this.isSelected(index);
|
|
2190
|
-
var newActiveIndex = null;
|
|
2191
|
-
|
|
2192
|
-
if (this.props.multiple) {
|
|
2193
|
-
var indexes = (this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex) || [];
|
|
2194
|
-
if (selected) indexes = indexes.filter(function (i) {
|
|
2195
|
-
return i !== index;
|
|
2196
|
-
});else indexes = [].concat(_toConsumableArray(indexes), [index]);
|
|
2197
|
-
newActiveIndex = indexes;
|
|
2198
|
-
} else {
|
|
2199
|
-
newActiveIndex = selected ? null : index;
|
|
2200
|
-
}
|
|
2201
|
-
|
|
2202
|
-
var callback = selected ? this.props.onTabClose : this.props.onTabOpen;
|
|
2203
|
-
|
|
2204
|
-
if (callback) {
|
|
2205
|
-
callback({
|
|
2206
|
-
originalEvent: event,
|
|
2207
|
-
index: index
|
|
2208
|
-
});
|
|
2209
|
-
}
|
|
2210
|
-
|
|
2211
|
-
if (this.props.onTabChange) {
|
|
2212
|
-
this.props.onTabChange({
|
|
2213
|
-
originalEvent: event,
|
|
2214
|
-
index: newActiveIndex
|
|
2215
|
-
});
|
|
2216
|
-
} else {
|
|
2217
|
-
this.setState({
|
|
2218
|
-
activeIndex: newActiveIndex
|
|
2219
|
-
});
|
|
2220
|
-
}
|
|
2221
|
-
}
|
|
2222
|
-
|
|
2223
|
-
event.preventDefault();
|
|
2224
|
-
}
|
|
2225
|
-
}, {
|
|
2226
|
-
key: "isSelected",
|
|
2227
|
-
value: function isSelected(index) {
|
|
2228
|
-
var activeIndex = this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex;
|
|
2229
|
-
return this.props.multiple ? activeIndex && activeIndex.indexOf(index) >= 0 : activeIndex === index;
|
|
2230
|
-
}
|
|
2231
|
-
}, {
|
|
2232
|
-
key: "componentDidMount",
|
|
2233
|
-
value: function componentDidMount() {
|
|
2234
|
-
if (!this.state.id) {
|
|
2235
|
-
this.setState({
|
|
2236
|
-
id: UniqueComponentId()
|
|
2237
|
-
});
|
|
2238
|
-
}
|
|
2239
|
-
}
|
|
2240
|
-
}, {
|
|
2241
|
-
key: "renderTabHeader",
|
|
2242
|
-
value: function renderTabHeader(tab, selected, index) {
|
|
2243
|
-
var _this2 = this;
|
|
2244
|
-
|
|
2245
|
-
var tabHeaderClass = classNames('p-accordion-header', {
|
|
2246
|
-
'p-highlight': selected,
|
|
2247
|
-
'p-disabled': tab.props.disabled
|
|
2248
|
-
}, tab.props.headerClassName);
|
|
2249
|
-
var id = this.state.id + '_header_' + index;
|
|
2250
|
-
var ariaControls = this.state.id + '_content_' + index;
|
|
2251
|
-
var tabIndex = tab.props.disabled ? -1 : null;
|
|
2252
|
-
var header = tab.props.headerTemplate ? ObjectUtils.getJSXElement(tab.props.headerTemplate, tab.props) : /*#__PURE__*/React.createElement("span", {
|
|
2253
|
-
className: "p-accordion-header-text"
|
|
2254
|
-
}, tab.props.header);
|
|
2255
|
-
var icon = selected ? this.props.collapseIcon : this.props.expandIcon;
|
|
2256
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2257
|
-
className: tabHeaderClass,
|
|
2258
|
-
style: tab.props.headerStyle
|
|
2259
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
2260
|
-
href: '#' + ariaControls,
|
|
2261
|
-
id: id,
|
|
2262
|
-
className: "p-accordion-header-link",
|
|
2263
|
-
"aria-controls": ariaControls,
|
|
2264
|
-
role: "tab",
|
|
2265
|
-
"aria-expanded": selected,
|
|
2266
|
-
onClick: function onClick(event) {
|
|
2267
|
-
return _this2.onTabHeaderClick(event, tab, index);
|
|
2268
|
-
},
|
|
2269
|
-
tabIndex: tabIndex
|
|
2270
|
-
}, IconUtils.getJSXIcon(icon, {
|
|
2271
|
-
className: 'p-accordion-toggle-icon'
|
|
2272
|
-
}, {
|
|
2273
|
-
props: this.props,
|
|
2274
|
-
selected: selected
|
|
2275
|
-
}), header));
|
|
2276
|
-
}
|
|
2277
|
-
}, {
|
|
2278
|
-
key: "renderTabContent",
|
|
2279
|
-
value: function renderTabContent(tab, selected, index) {
|
|
2280
|
-
var className = classNames('p-toggleable-content', tab.props.contentClassName);
|
|
2281
|
-
var id = this.state.id + '_content_' + index;
|
|
2282
|
-
var toggleableContentRef = /*#__PURE__*/React.createRef();
|
|
2283
|
-
return /*#__PURE__*/React.createElement(CSSTransition, {
|
|
2284
|
-
nodeRef: toggleableContentRef,
|
|
2285
|
-
classNames: "p-toggleable-content",
|
|
2286
|
-
timeout: {
|
|
2287
|
-
enter: 1000,
|
|
2288
|
-
exit: 450
|
|
2289
|
-
},
|
|
2290
|
-
in: selected,
|
|
2291
|
-
unmountOnExit: true,
|
|
2292
|
-
options: this.props.transitionOptions
|
|
2293
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2294
|
-
ref: toggleableContentRef,
|
|
2295
|
-
id: id,
|
|
2296
|
-
className: className,
|
|
2297
|
-
style: tab.props.contentStyle,
|
|
2298
|
-
role: "region",
|
|
2299
|
-
"aria-labelledby": this.state.id + '_header_' + index
|
|
2300
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2301
|
-
className: "p-accordion-content"
|
|
2302
|
-
}, tab.props.children)));
|
|
2303
|
-
}
|
|
2304
|
-
}, {
|
|
2305
|
-
key: "renderTab",
|
|
2306
|
-
value: function renderTab(tab, index) {
|
|
2307
|
-
var selected = this.isSelected(index);
|
|
2308
|
-
var tabHeader = this.renderTabHeader(tab, selected, index);
|
|
2309
|
-
var tabContent = this.renderTabContent(tab, selected, index);
|
|
2310
|
-
var tabClassName = classNames('p-accordion-tab', {
|
|
2311
|
-
'p-accordion-tab-active': selected
|
|
2312
|
-
});
|
|
2313
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2314
|
-
key: tab.props.header,
|
|
2315
|
-
className: tabClassName
|
|
2316
|
-
}, tabHeader, tabContent);
|
|
2317
|
-
}
|
|
2318
|
-
}, {
|
|
2319
|
-
key: "renderTabs",
|
|
2320
|
-
value: function renderTabs() {
|
|
2321
|
-
var _this3 = this;
|
|
2322
|
-
|
|
2323
|
-
return React.Children.map(this.props.children, function (tab, index) {
|
|
2324
|
-
if (_this3.shouldTabRender(tab)) {
|
|
2325
|
-
return _this3.renderTab(tab, index);
|
|
2326
|
-
}
|
|
2327
|
-
});
|
|
2328
|
-
}
|
|
2329
|
-
}, {
|
|
2330
|
-
key: "render",
|
|
2331
|
-
value: function render() {
|
|
2332
|
-
var _this4 = this;
|
|
2333
|
-
|
|
2334
|
-
var className = classNames('p-accordion p-component', this.props.className);
|
|
2335
|
-
var tabs = this.renderTabs();
|
|
2336
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2337
|
-
ref: function ref(el) {
|
|
2338
|
-
return _this4.container = el;
|
|
2339
|
-
},
|
|
2340
|
-
id: this.state.id,
|
|
2341
|
-
className: className,
|
|
2342
|
-
style: this.props.style
|
|
2343
|
-
}, tabs);
|
|
2344
|
-
}
|
|
2345
|
-
}]);
|
|
2346
|
-
|
|
2347
|
-
return Accordion;
|
|
2348
|
-
}(Component);
|
|
2349
|
-
|
|
2350
|
-
_defineProperty(Accordion, "defaultProps", {
|
|
2351
|
-
id: null,
|
|
2352
|
-
activeIndex: null,
|
|
2353
|
-
className: null,
|
|
2354
|
-
style: null,
|
|
2355
|
-
multiple: false,
|
|
2356
|
-
expandIcon: 'pi pi-chevron-right',
|
|
2357
|
-
collapseIcon: 'pi pi-chevron-down',
|
|
2358
|
-
transitionOptions: null,
|
|
2359
|
-
onTabOpen: null,
|
|
2360
|
-
onTabClose: null,
|
|
2361
|
-
onTabChange: null
|
|
2362
|
-
});
|
|
2363
|
-
|
|
2364
2074
|
var FilterMatchMode = Object.freeze({
|
|
2365
2075
|
STARTS_WITH: 'startsWith',
|
|
2366
2076
|
CONTAINS: 'contains',
|
|
@@ -2393,6 +2103,8 @@ _defineProperty(PrimeReact, "locale", 'en');
|
|
|
2393
2103
|
|
|
2394
2104
|
_defineProperty(PrimeReact, "appendTo", null);
|
|
2395
2105
|
|
|
2106
|
+
_defineProperty(PrimeReact, "cssTransition", true);
|
|
2107
|
+
|
|
2396
2108
|
_defineProperty(PrimeReact, "autoZIndex", true);
|
|
2397
2109
|
|
|
2398
2110
|
_defineProperty(PrimeReact, "zIndex", {
|
|
@@ -2409,9 +2121,9 @@ _defineProperty(PrimeReact, "filterMatchModeOptions", {
|
|
|
2409
2121
|
date: [FilterMatchMode.DATE_IS, FilterMatchMode.DATE_IS_NOT, FilterMatchMode.DATE_BEFORE, FilterMatchMode.DATE_AFTER]
|
|
2410
2122
|
});
|
|
2411
2123
|
|
|
2412
|
-
function ownKeys$
|
|
2124
|
+
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; }
|
|
2413
2125
|
|
|
2414
|
-
function _objectSpread$
|
|
2126
|
+
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; }
|
|
2415
2127
|
var locales = {
|
|
2416
2128
|
'en': {
|
|
2417
2129
|
startsWith: 'Starts with',
|
|
@@ -2468,7 +2180,7 @@ function locale(locale) {
|
|
|
2468
2180
|
}
|
|
2469
2181
|
|
|
2470
2182
|
function addLocale(locale, options) {
|
|
2471
|
-
locales[locale] = _objectSpread$
|
|
2183
|
+
locales[locale] = _objectSpread$T(_objectSpread$T({}, locales['en']), options);
|
|
2472
2184
|
}
|
|
2473
2185
|
|
|
2474
2186
|
function updateLocaleOption(key, value, locale) {
|
|
@@ -2478,7 +2190,7 @@ function updateLocaleOption(key, value, locale) {
|
|
|
2478
2190
|
function updateLocaleOptions(options, locale) {
|
|
2479
2191
|
var _locale = locale || PrimeReact.locale;
|
|
2480
2192
|
|
|
2481
|
-
locales[_locale] = _objectSpread$
|
|
2193
|
+
locales[_locale] = _objectSpread$T(_objectSpread$T({}, locales[_locale]), options);
|
|
2482
2194
|
}
|
|
2483
2195
|
|
|
2484
2196
|
function localeOption(key, locale) {
|
|
@@ -2986,6 +2698,376 @@ var FilterService = {
|
|
|
2986
2698
|
}
|
|
2987
2699
|
};
|
|
2988
2700
|
|
|
2701
|
+
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; }
|
|
2702
|
+
|
|
2703
|
+
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; }
|
|
2704
|
+
|
|
2705
|
+
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); }; }
|
|
2706
|
+
|
|
2707
|
+
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; } }
|
|
2708
|
+
var CSSTransition = /*#__PURE__*/function (_Component) {
|
|
2709
|
+
_inherits(CSSTransition, _Component);
|
|
2710
|
+
|
|
2711
|
+
var _super = _createSuper$2l(CSSTransition);
|
|
2712
|
+
|
|
2713
|
+
function CSSTransition(props) {
|
|
2714
|
+
var _this;
|
|
2715
|
+
|
|
2716
|
+
_classCallCheck(this, CSSTransition);
|
|
2717
|
+
|
|
2718
|
+
_this = _super.call(this, props);
|
|
2719
|
+
_this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));
|
|
2720
|
+
_this.onEntering = _this.onEntering.bind(_assertThisInitialized(_this));
|
|
2721
|
+
_this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this));
|
|
2722
|
+
_this.onExit = _this.onExit.bind(_assertThisInitialized(_this));
|
|
2723
|
+
_this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));
|
|
2724
|
+
_this.onExited = _this.onExited.bind(_assertThisInitialized(_this));
|
|
2725
|
+
return _this;
|
|
2726
|
+
}
|
|
2727
|
+
|
|
2728
|
+
_createClass(CSSTransition, [{
|
|
2729
|
+
key: "disabled",
|
|
2730
|
+
get: function get() {
|
|
2731
|
+
return this.props.disabled || this.props.options && this.props.options.disabled || !PrimeReact.cssTransition;
|
|
2732
|
+
}
|
|
2733
|
+
}, {
|
|
2734
|
+
key: "onEnter",
|
|
2735
|
+
value: function onEnter(node, isAppearing) {
|
|
2736
|
+
this.props.onEnter && this.props.onEnter(node, isAppearing); // component
|
|
2737
|
+
|
|
2738
|
+
this.props.options && this.props.options.onEnter && this.props.options.onEnter(node, isAppearing); // user option
|
|
2739
|
+
}
|
|
2740
|
+
}, {
|
|
2741
|
+
key: "onEntering",
|
|
2742
|
+
value: function onEntering(node, isAppearing) {
|
|
2743
|
+
this.props.onEntering && this.props.onEntering(node, isAppearing); // component
|
|
2744
|
+
|
|
2745
|
+
this.props.options && this.props.options.onEntering && this.props.options.onEntering(node, isAppearing); // user option
|
|
2746
|
+
}
|
|
2747
|
+
}, {
|
|
2748
|
+
key: "onEntered",
|
|
2749
|
+
value: function onEntered(node, isAppearing) {
|
|
2750
|
+
this.props.onEntered && this.props.onEntered(node, isAppearing); // component
|
|
2751
|
+
|
|
2752
|
+
this.props.options && this.props.options.onEntered && this.props.options.onEntered(node, isAppearing); // user option
|
|
2753
|
+
}
|
|
2754
|
+
}, {
|
|
2755
|
+
key: "onExit",
|
|
2756
|
+
value: function onExit(node) {
|
|
2757
|
+
this.props.onExit && this.props.onExit(node); // component
|
|
2758
|
+
|
|
2759
|
+
this.props.options && this.props.options.onExit && this.props.options.onExit(node); // user option
|
|
2760
|
+
}
|
|
2761
|
+
}, {
|
|
2762
|
+
key: "onExiting",
|
|
2763
|
+
value: function onExiting(node) {
|
|
2764
|
+
this.props.onExiting && this.props.onExiting(node); // component
|
|
2765
|
+
|
|
2766
|
+
this.props.options && this.props.options.onExiting && this.props.options.onExiting(node); // user option
|
|
2767
|
+
}
|
|
2768
|
+
}, {
|
|
2769
|
+
key: "onExited",
|
|
2770
|
+
value: function onExited(node) {
|
|
2771
|
+
this.props.onExited && this.props.onExited(node); // component
|
|
2772
|
+
|
|
2773
|
+
this.props.options && this.props.options.onExited && this.props.options.onExited(node); // user option
|
|
2774
|
+
}
|
|
2775
|
+
}, {
|
|
2776
|
+
key: "componentDidUpdate",
|
|
2777
|
+
value: function componentDidUpdate(prevProps) {
|
|
2778
|
+
if (this.props.in !== prevProps.in && this.disabled) {
|
|
2779
|
+
// no animation
|
|
2780
|
+
var node = ObjectUtils.getRefElement(this.props.nodeRef);
|
|
2781
|
+
|
|
2782
|
+
if (this.props.in) {
|
|
2783
|
+
this.onEnter(node, true);
|
|
2784
|
+
this.onEntering(node, true);
|
|
2785
|
+
this.onEntered(node, true);
|
|
2786
|
+
} else {
|
|
2787
|
+
this.onExit(node);
|
|
2788
|
+
this.onExiting(node);
|
|
2789
|
+
this.onExited(node);
|
|
2790
|
+
}
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
}, {
|
|
2794
|
+
key: "render",
|
|
2795
|
+
value: function render() {
|
|
2796
|
+
if (this.disabled) {
|
|
2797
|
+
return this.props.in ? this.props.children : null;
|
|
2798
|
+
} else {
|
|
2799
|
+
var immutableProps = {
|
|
2800
|
+
nodeRef: this.props.nodeRef,
|
|
2801
|
+
in: this.props.in,
|
|
2802
|
+
onEnter: this.onEnter,
|
|
2803
|
+
onEntering: this.onEntering,
|
|
2804
|
+
onEntered: this.onEntered,
|
|
2805
|
+
onExit: this.onExit,
|
|
2806
|
+
onExiting: this.onExiting,
|
|
2807
|
+
onExited: this.onExited
|
|
2808
|
+
};
|
|
2809
|
+
var mutableProps = {
|
|
2810
|
+
classNames: this.props.classNames,
|
|
2811
|
+
timeout: this.props.timeout,
|
|
2812
|
+
unmountOnExit: this.props.unmountOnExit
|
|
2813
|
+
};
|
|
2814
|
+
|
|
2815
|
+
var props = _objectSpread$S(_objectSpread$S(_objectSpread$S({}, mutableProps), this.props.options || {}), immutableProps);
|
|
2816
|
+
|
|
2817
|
+
return /*#__PURE__*/React.createElement(CSSTransition$1, props, this.props.children);
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
}]);
|
|
2821
|
+
|
|
2822
|
+
return CSSTransition;
|
|
2823
|
+
}(Component);
|
|
2824
|
+
|
|
2825
|
+
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; }
|
|
2826
|
+
|
|
2827
|
+
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; }
|
|
2828
|
+
|
|
2829
|
+
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); }; }
|
|
2830
|
+
|
|
2831
|
+
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; } }
|
|
2832
|
+
var AccordionTab = /*#__PURE__*/function (_Component) {
|
|
2833
|
+
_inherits(AccordionTab, _Component);
|
|
2834
|
+
|
|
2835
|
+
var _super = _createSuper$2k(AccordionTab);
|
|
2836
|
+
|
|
2837
|
+
function AccordionTab() {
|
|
2838
|
+
_classCallCheck(this, AccordionTab);
|
|
2839
|
+
|
|
2840
|
+
return _super.apply(this, arguments);
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
return AccordionTab;
|
|
2844
|
+
}(Component);
|
|
2845
|
+
|
|
2846
|
+
_defineProperty(AccordionTab, "defaultProps", {
|
|
2847
|
+
header: null,
|
|
2848
|
+
disabled: false,
|
|
2849
|
+
style: null,
|
|
2850
|
+
className: null,
|
|
2851
|
+
headerStyle: null,
|
|
2852
|
+
headerClassName: null,
|
|
2853
|
+
headerTemplate: null,
|
|
2854
|
+
contentStyle: null,
|
|
2855
|
+
contentClassName: null
|
|
2856
|
+
});
|
|
2857
|
+
|
|
2858
|
+
var Accordion = /*#__PURE__*/function (_Component2) {
|
|
2859
|
+
_inherits(Accordion, _Component2);
|
|
2860
|
+
|
|
2861
|
+
var _super2 = _createSuper$2k(Accordion);
|
|
2862
|
+
|
|
2863
|
+
function Accordion(props) {
|
|
2864
|
+
var _this;
|
|
2865
|
+
|
|
2866
|
+
_classCallCheck(this, Accordion);
|
|
2867
|
+
|
|
2868
|
+
_this = _super2.call(this, props);
|
|
2869
|
+
var state = {
|
|
2870
|
+
id: _this.props.id
|
|
2871
|
+
};
|
|
2872
|
+
|
|
2873
|
+
if (!_this.props.onTabChange) {
|
|
2874
|
+
state = _objectSpread$R(_objectSpread$R({}, state), {}, {
|
|
2875
|
+
activeIndex: props.activeIndex
|
|
2876
|
+
});
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
_this.state = state;
|
|
2880
|
+
return _this;
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
_createClass(Accordion, [{
|
|
2884
|
+
key: "shouldTabRender",
|
|
2885
|
+
value: function shouldTabRender(tab) {
|
|
2886
|
+
return tab && tab.type === AccordionTab;
|
|
2887
|
+
}
|
|
2888
|
+
}, {
|
|
2889
|
+
key: "onTabHeaderClick",
|
|
2890
|
+
value: function onTabHeaderClick(event, tab, index) {
|
|
2891
|
+
if (!tab.props.disabled) {
|
|
2892
|
+
var selected = this.isSelected(index);
|
|
2893
|
+
var newActiveIndex = null;
|
|
2894
|
+
|
|
2895
|
+
if (this.props.multiple) {
|
|
2896
|
+
var indexes = (this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex) || [];
|
|
2897
|
+
if (selected) indexes = indexes.filter(function (i) {
|
|
2898
|
+
return i !== index;
|
|
2899
|
+
});else indexes = [].concat(_toConsumableArray(indexes), [index]);
|
|
2900
|
+
newActiveIndex = indexes;
|
|
2901
|
+
} else {
|
|
2902
|
+
newActiveIndex = selected ? null : index;
|
|
2903
|
+
}
|
|
2904
|
+
|
|
2905
|
+
var callback = selected ? this.props.onTabClose : this.props.onTabOpen;
|
|
2906
|
+
|
|
2907
|
+
if (callback) {
|
|
2908
|
+
callback({
|
|
2909
|
+
originalEvent: event,
|
|
2910
|
+
index: index
|
|
2911
|
+
});
|
|
2912
|
+
}
|
|
2913
|
+
|
|
2914
|
+
if (this.props.onTabChange) {
|
|
2915
|
+
this.props.onTabChange({
|
|
2916
|
+
originalEvent: event,
|
|
2917
|
+
index: newActiveIndex
|
|
2918
|
+
});
|
|
2919
|
+
} else {
|
|
2920
|
+
this.setState({
|
|
2921
|
+
activeIndex: newActiveIndex
|
|
2922
|
+
});
|
|
2923
|
+
}
|
|
2924
|
+
}
|
|
2925
|
+
|
|
2926
|
+
event.preventDefault();
|
|
2927
|
+
}
|
|
2928
|
+
}, {
|
|
2929
|
+
key: "isSelected",
|
|
2930
|
+
value: function isSelected(index) {
|
|
2931
|
+
var activeIndex = this.props.onTabChange ? this.props.activeIndex : this.state.activeIndex;
|
|
2932
|
+
return this.props.multiple ? activeIndex && activeIndex.indexOf(index) >= 0 : activeIndex === index;
|
|
2933
|
+
}
|
|
2934
|
+
}, {
|
|
2935
|
+
key: "componentDidMount",
|
|
2936
|
+
value: function componentDidMount() {
|
|
2937
|
+
if (!this.state.id) {
|
|
2938
|
+
this.setState({
|
|
2939
|
+
id: UniqueComponentId()
|
|
2940
|
+
});
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
}, {
|
|
2944
|
+
key: "renderTabHeader",
|
|
2945
|
+
value: function renderTabHeader(tab, selected, index) {
|
|
2946
|
+
var _this2 = this;
|
|
2947
|
+
|
|
2948
|
+
var style = _objectSpread$R(_objectSpread$R({}, tab.props.headerStyle || {}), tab.props.style || {});
|
|
2949
|
+
|
|
2950
|
+
var className = classNames('p-accordion-header', {
|
|
2951
|
+
'p-highlight': selected,
|
|
2952
|
+
'p-disabled': tab.props.disabled
|
|
2953
|
+
}, tab.props.headerClassName, tab.props.className);
|
|
2954
|
+
var id = this.state.id + '_header_' + index;
|
|
2955
|
+
var ariaControls = this.state.id + '_content_' + index;
|
|
2956
|
+
var tabIndex = tab.props.disabled ? -1 : null;
|
|
2957
|
+
var header = tab.props.headerTemplate ? ObjectUtils.getJSXElement(tab.props.headerTemplate, tab.props) : /*#__PURE__*/React.createElement("span", {
|
|
2958
|
+
className: "p-accordion-header-text"
|
|
2959
|
+
}, tab.props.header);
|
|
2960
|
+
var icon = selected ? this.props.collapseIcon : this.props.expandIcon;
|
|
2961
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2962
|
+
className: className,
|
|
2963
|
+
style: style
|
|
2964
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
2965
|
+
href: '#' + ariaControls,
|
|
2966
|
+
id: id,
|
|
2967
|
+
className: "p-accordion-header-link",
|
|
2968
|
+
"aria-controls": ariaControls,
|
|
2969
|
+
role: "tab",
|
|
2970
|
+
"aria-expanded": selected,
|
|
2971
|
+
onClick: function onClick(event) {
|
|
2972
|
+
return _this2.onTabHeaderClick(event, tab, index);
|
|
2973
|
+
},
|
|
2974
|
+
tabIndex: tabIndex
|
|
2975
|
+
}, IconUtils.getJSXIcon(icon, {
|
|
2976
|
+
className: 'p-accordion-toggle-icon'
|
|
2977
|
+
}, {
|
|
2978
|
+
props: this.props,
|
|
2979
|
+
selected: selected
|
|
2980
|
+
}), header));
|
|
2981
|
+
}
|
|
2982
|
+
}, {
|
|
2983
|
+
key: "renderTabContent",
|
|
2984
|
+
value: function renderTabContent(tab, selected, index) {
|
|
2985
|
+
var style = _objectSpread$R(_objectSpread$R({}, tab.props.contentStyle || {}), tab.props.style || {});
|
|
2986
|
+
|
|
2987
|
+
var className = classNames('p-toggleable-content', tab.props.contentClassName, tab.props.className);
|
|
2988
|
+
var id = this.state.id + '_content_' + index;
|
|
2989
|
+
var toggleableContentRef = /*#__PURE__*/React.createRef();
|
|
2990
|
+
return /*#__PURE__*/React.createElement(CSSTransition, {
|
|
2991
|
+
nodeRef: toggleableContentRef,
|
|
2992
|
+
classNames: "p-toggleable-content",
|
|
2993
|
+
timeout: {
|
|
2994
|
+
enter: 1000,
|
|
2995
|
+
exit: 450
|
|
2996
|
+
},
|
|
2997
|
+
in: selected,
|
|
2998
|
+
unmountOnExit: true,
|
|
2999
|
+
options: this.props.transitionOptions
|
|
3000
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3001
|
+
ref: toggleableContentRef,
|
|
3002
|
+
id: id,
|
|
3003
|
+
className: className,
|
|
3004
|
+
style: style,
|
|
3005
|
+
role: "region",
|
|
3006
|
+
"aria-labelledby": this.state.id + '_header_' + index
|
|
3007
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3008
|
+
className: "p-accordion-content"
|
|
3009
|
+
}, tab.props.children)));
|
|
3010
|
+
}
|
|
3011
|
+
}, {
|
|
3012
|
+
key: "renderTab",
|
|
3013
|
+
value: function renderTab(tab, index) {
|
|
3014
|
+
var selected = this.isSelected(index);
|
|
3015
|
+
var tabHeader = this.renderTabHeader(tab, selected, index);
|
|
3016
|
+
var tabContent = this.renderTabContent(tab, selected, index);
|
|
3017
|
+
var tabClassName = classNames('p-accordion-tab', {
|
|
3018
|
+
'p-accordion-tab-active': selected
|
|
3019
|
+
});
|
|
3020
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3021
|
+
key: tab.props.header,
|
|
3022
|
+
className: tabClassName
|
|
3023
|
+
}, tabHeader, tabContent);
|
|
3024
|
+
}
|
|
3025
|
+
}, {
|
|
3026
|
+
key: "renderTabs",
|
|
3027
|
+
value: function renderTabs() {
|
|
3028
|
+
var _this3 = this;
|
|
3029
|
+
|
|
3030
|
+
return React.Children.map(this.props.children, function (tab, index) {
|
|
3031
|
+
if (_this3.shouldTabRender(tab)) {
|
|
3032
|
+
return _this3.renderTab(tab, index);
|
|
3033
|
+
}
|
|
3034
|
+
});
|
|
3035
|
+
}
|
|
3036
|
+
}, {
|
|
3037
|
+
key: "render",
|
|
3038
|
+
value: function render() {
|
|
3039
|
+
var _this4 = this;
|
|
3040
|
+
|
|
3041
|
+
var className = classNames('p-accordion p-component', this.props.className);
|
|
3042
|
+
var tabs = this.renderTabs();
|
|
3043
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3044
|
+
ref: function ref(el) {
|
|
3045
|
+
return _this4.container = el;
|
|
3046
|
+
},
|
|
3047
|
+
id: this.state.id,
|
|
3048
|
+
className: className,
|
|
3049
|
+
style: this.props.style
|
|
3050
|
+
}, tabs);
|
|
3051
|
+
}
|
|
3052
|
+
}]);
|
|
3053
|
+
|
|
3054
|
+
return Accordion;
|
|
3055
|
+
}(Component);
|
|
3056
|
+
|
|
3057
|
+
_defineProperty(Accordion, "defaultProps", {
|
|
3058
|
+
id: null,
|
|
3059
|
+
activeIndex: null,
|
|
3060
|
+
className: null,
|
|
3061
|
+
style: null,
|
|
3062
|
+
multiple: false,
|
|
3063
|
+
expandIcon: 'pi pi-chevron-right',
|
|
3064
|
+
collapseIcon: 'pi pi-chevron-down',
|
|
3065
|
+
transitionOptions: null,
|
|
3066
|
+
onTabOpen: null,
|
|
3067
|
+
onTabClose: null,
|
|
3068
|
+
onTabChange: null
|
|
3069
|
+
});
|
|
3070
|
+
|
|
2989
3071
|
var KeyFilter = /*#__PURE__*/function () {
|
|
2990
3072
|
function KeyFilter() {
|
|
2991
3073
|
_classCallCheck(this, KeyFilter);
|
|
@@ -3129,14 +3211,9 @@ var Portal = /*#__PURE__*/function (_Component) {
|
|
|
3129
3211
|
}
|
|
3130
3212
|
|
|
3131
3213
|
_createClass(Portal, [{
|
|
3132
|
-
key: "hasDOM",
|
|
3133
|
-
value: function hasDOM() {
|
|
3134
|
-
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
3135
|
-
}
|
|
3136
|
-
}, {
|
|
3137
3214
|
key: "componentDidMount",
|
|
3138
3215
|
value: function componentDidMount() {
|
|
3139
|
-
if (
|
|
3216
|
+
if (DomHandler.hasDOM() && !this.state.mounted) {
|
|
3140
3217
|
this.setState({
|
|
3141
3218
|
mounted: true
|
|
3142
3219
|
}, this.props.onMounted);
|
|
@@ -3249,6 +3326,11 @@ var Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
3249
3326
|
value: function isDisabled(target) {
|
|
3250
3327
|
return this.getTargetOption(target, 'disabled') === 'true' || this.hasTargetOption(target, 'disabled') || this.props.disabled;
|
|
3251
3328
|
}
|
|
3329
|
+
}, {
|
|
3330
|
+
key: "isShowOnDisabled",
|
|
3331
|
+
value: function isShowOnDisabled(target) {
|
|
3332
|
+
return this.getTargetOption(target, 'showondisabled') || this.props.showOnDisabled;
|
|
3333
|
+
}
|
|
3252
3334
|
}, {
|
|
3253
3335
|
key: "isAutoHide",
|
|
3254
3336
|
value: function isAutoHide() {
|
|
@@ -3328,8 +3410,10 @@ var Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
3328
3410
|
var _this2 = this;
|
|
3329
3411
|
|
|
3330
3412
|
this.currentTarget = e.currentTarget;
|
|
3413
|
+
var disabled = this.isDisabled(this.currentTarget);
|
|
3414
|
+
var empty = this.isContentEmpty(this.isShowOnDisabled(this.currentTarget) && disabled ? this.currentTarget.firstChild : this.currentTarget);
|
|
3331
3415
|
|
|
3332
|
-
if (
|
|
3416
|
+
if (empty || disabled) {
|
|
3333
3417
|
return;
|
|
3334
3418
|
}
|
|
3335
3419
|
|
|
@@ -3534,7 +3618,7 @@ var Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
3534
3618
|
var _this5 = this;
|
|
3535
3619
|
|
|
3536
3620
|
this.documentResizeListener = function (e) {
|
|
3537
|
-
if (!DomHandler.
|
|
3621
|
+
if (!DomHandler.isTouchDevice()) {
|
|
3538
3622
|
_this5.hide(e);
|
|
3539
3623
|
}
|
|
3540
3624
|
};
|
|
@@ -3579,8 +3663,9 @@ var Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
3579
3663
|
showEvent = _this$getEvents.showEvent,
|
|
3580
3664
|
hideEvent = _this$getEvents.hideEvent;
|
|
3581
3665
|
|
|
3582
|
-
|
|
3583
|
-
|
|
3666
|
+
var currentTarget = this.getTarget(target);
|
|
3667
|
+
currentTarget.addEventListener(showEvent, this.show);
|
|
3668
|
+
currentTarget.addEventListener(hideEvent, this.hide);
|
|
3584
3669
|
}
|
|
3585
3670
|
}
|
|
3586
3671
|
}, {
|
|
@@ -3591,8 +3676,9 @@ var Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
3591
3676
|
showEvent = _this$getEvents2.showEvent,
|
|
3592
3677
|
hideEvent = _this$getEvents2.hideEvent;
|
|
3593
3678
|
|
|
3594
|
-
|
|
3595
|
-
|
|
3679
|
+
var currentTarget = this.getTarget(target);
|
|
3680
|
+
currentTarget.removeEventListener(showEvent, this.show);
|
|
3681
|
+
currentTarget.removeEventListener(hideEvent, this.hide);
|
|
3596
3682
|
}
|
|
3597
3683
|
}
|
|
3598
3684
|
}, {
|
|
@@ -3627,6 +3713,22 @@ var Tooltip = /*#__PURE__*/function (_Component) {
|
|
|
3627
3713
|
clearTimeout(this.updateDelayTimeout);
|
|
3628
3714
|
clearTimeout(this.hideDelayTimeout);
|
|
3629
3715
|
}
|
|
3716
|
+
}, {
|
|
3717
|
+
key: "getTarget",
|
|
3718
|
+
value: function getTarget(target) {
|
|
3719
|
+
if (target) {
|
|
3720
|
+
if (this.isShowOnDisabled(target)) {
|
|
3721
|
+
var wrapper = document.createElement('span');
|
|
3722
|
+
target.parentNode.insertBefore(wrapper, target);
|
|
3723
|
+
wrapper.appendChild(target);
|
|
3724
|
+
return wrapper;
|
|
3725
|
+
}
|
|
3726
|
+
|
|
3727
|
+
return target;
|
|
3728
|
+
}
|
|
3729
|
+
|
|
3730
|
+
return null;
|
|
3731
|
+
}
|
|
3630
3732
|
}, {
|
|
3631
3733
|
key: "updateTargetEvents",
|
|
3632
3734
|
value: function updateTargetEvents(target) {
|
|
@@ -3783,6 +3885,7 @@ _defineProperty(Tooltip, "defaultProps", {
|
|
|
3783
3885
|
updateDelay: 0,
|
|
3784
3886
|
hideDelay: 0,
|
|
3785
3887
|
autoHide: true,
|
|
3888
|
+
showOnDisabled: false,
|
|
3786
3889
|
onBeforeShow: null,
|
|
3787
3890
|
onBeforeHide: null,
|
|
3788
3891
|
onShow: null,
|
|
@@ -4671,7 +4774,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4671
4774
|
};
|
|
4672
4775
|
|
|
4673
4776
|
var calculateFirst = function calculateFirst(_currentIndex, _triggerIndex, _first, _last, _num, _numT, _isScrollDownOrRight) {
|
|
4674
|
-
if (_currentIndex <= _numT) return 0;else return _isScrollDownOrRight ? _currentIndex < _triggerIndex ? _first : _currentIndex - _numT : _currentIndex > _triggerIndex ? _first : _currentIndex - 2 * _numT;
|
|
4777
|
+
if (_currentIndex <= _numT) return 0;else return Math.max(0, _isScrollDownOrRight ? _currentIndex < _triggerIndex ? _first : _currentIndex - _numT : _currentIndex > _triggerIndex ? _first : _currentIndex - 2 * _numT);
|
|
4675
4778
|
};
|
|
4676
4779
|
|
|
4677
4780
|
var calculateLast = function calculateLast(_currentIndex, _first, _last, _num, _numT, _isCols) {
|
|
@@ -4843,6 +4946,16 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4843
4946
|
|
|
4844
4947
|
return [];
|
|
4845
4948
|
}
|
|
4949
|
+
}, {
|
|
4950
|
+
key: "isPropChanged",
|
|
4951
|
+
value: function isPropChanged(prevProps) {
|
|
4952
|
+
var _this12 = this;
|
|
4953
|
+
|
|
4954
|
+
var props = ['itemSize', 'scrollHeight'];
|
|
4955
|
+
return props.some(function (p) {
|
|
4956
|
+
return !ObjectUtils.equals(prevProps[p], _this12.props[p]);
|
|
4957
|
+
});
|
|
4958
|
+
}
|
|
4846
4959
|
}, {
|
|
4847
4960
|
key: "init",
|
|
4848
4961
|
value: function init() {
|
|
@@ -4858,7 +4971,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4858
4971
|
}, {
|
|
4859
4972
|
key: "componentDidUpdate",
|
|
4860
4973
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
4861
|
-
if (!
|
|
4974
|
+
if (!prevProps.items || prevProps.items.length !== (this.props.items || []).length || this.isPropChanged(prevProps)) {
|
|
4862
4975
|
this.init();
|
|
4863
4976
|
}
|
|
4864
4977
|
|
|
@@ -4888,7 +5001,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4888
5001
|
}, {
|
|
4889
5002
|
key: "renderLoader",
|
|
4890
5003
|
value: function renderLoader() {
|
|
4891
|
-
var
|
|
5004
|
+
var _this13 = this;
|
|
4892
5005
|
|
|
4893
5006
|
if (!this.props.loaderDisabled && this.props.showLoader && this.state.loading) {
|
|
4894
5007
|
var className = classNames('p-virtualscroller-loader', {
|
|
@@ -4902,7 +5015,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4902
5015
|
var isBoth = this.isBoth();
|
|
4903
5016
|
var numItemsInViewport = this.state.numItemsInViewport;
|
|
4904
5017
|
content = this.state.loaderArr.map(function (_, index) {
|
|
4905
|
-
return
|
|
5018
|
+
return _this13.renderLoaderItem(index, isBoth && {
|
|
4906
5019
|
numCols: numItemsInViewport.cols
|
|
4907
5020
|
});
|
|
4908
5021
|
});
|
|
@@ -4918,12 +5031,12 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4918
5031
|
}, {
|
|
4919
5032
|
key: "renderSpacer",
|
|
4920
5033
|
value: function renderSpacer() {
|
|
4921
|
-
var
|
|
5034
|
+
var _this14 = this;
|
|
4922
5035
|
|
|
4923
5036
|
if (this.props.showSpacer) {
|
|
4924
5037
|
return /*#__PURE__*/React.createElement("div", {
|
|
4925
5038
|
ref: function ref(el) {
|
|
4926
|
-
return
|
|
5039
|
+
return _this14.spacer = el;
|
|
4927
5040
|
},
|
|
4928
5041
|
className: "p-virtualscroller-spacer"
|
|
4929
5042
|
});
|
|
@@ -4943,16 +5056,16 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4943
5056
|
}, {
|
|
4944
5057
|
key: "renderItems",
|
|
4945
5058
|
value: function renderItems(loadedItems) {
|
|
4946
|
-
var
|
|
5059
|
+
var _this15 = this;
|
|
4947
5060
|
|
|
4948
5061
|
return loadedItems.map(function (item, index) {
|
|
4949
|
-
return
|
|
5062
|
+
return _this15.renderItem(item, index);
|
|
4950
5063
|
});
|
|
4951
5064
|
}
|
|
4952
5065
|
}, {
|
|
4953
5066
|
key: "renderContent",
|
|
4954
5067
|
value: function renderContent() {
|
|
4955
|
-
var
|
|
5068
|
+
var _this16 = this;
|
|
4956
5069
|
|
|
4957
5070
|
var loadedItems = this.loadedItems();
|
|
4958
5071
|
var items = this.renderItems(loadedItems);
|
|
@@ -4962,7 +5075,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4962
5075
|
var content = /*#__PURE__*/React.createElement("div", {
|
|
4963
5076
|
className: className,
|
|
4964
5077
|
ref: function ref(el) {
|
|
4965
|
-
return
|
|
5078
|
+
return _this16.content = el;
|
|
4966
5079
|
}
|
|
4967
5080
|
}, items);
|
|
4968
5081
|
|
|
@@ -4970,24 +5083,24 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
4970
5083
|
var defaultOptions = {
|
|
4971
5084
|
className: className,
|
|
4972
5085
|
contentRef: function contentRef(el) {
|
|
4973
|
-
return
|
|
5086
|
+
return _this16.content = el;
|
|
4974
5087
|
},
|
|
4975
5088
|
spacerRef: function spacerRef(el) {
|
|
4976
|
-
return
|
|
5089
|
+
return _this16.spacer = el;
|
|
4977
5090
|
},
|
|
4978
5091
|
stickyRef: function stickyRef(el) {
|
|
4979
|
-
return
|
|
5092
|
+
return _this16.sticky = el;
|
|
4980
5093
|
},
|
|
4981
5094
|
items: loadedItems,
|
|
4982
5095
|
getItemOptions: function getItemOptions(index) {
|
|
4983
|
-
return
|
|
5096
|
+
return _this16.getOptions(index);
|
|
4984
5097
|
},
|
|
4985
5098
|
children: items,
|
|
4986
5099
|
element: content,
|
|
4987
5100
|
props: this.props,
|
|
4988
5101
|
loading: this.state.loading,
|
|
4989
5102
|
getLoaderOptions: function getLoaderOptions(index, ext) {
|
|
4990
|
-
return
|
|
5103
|
+
return _this16.loaderOptions(index, ext);
|
|
4991
5104
|
},
|
|
4992
5105
|
loadingTemplate: this.props.loadingTemplate,
|
|
4993
5106
|
itemSize: this.props.itemSize,
|
|
@@ -5005,7 +5118,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
5005
5118
|
}, {
|
|
5006
5119
|
key: "render",
|
|
5007
5120
|
value: function render() {
|
|
5008
|
-
var
|
|
5121
|
+
var _this17 = this;
|
|
5009
5122
|
|
|
5010
5123
|
if (this.props.disabled) {
|
|
5011
5124
|
var content = ObjectUtils.getJSXElement(this.props.contentTemplate, {
|
|
@@ -5028,7 +5141,7 @@ var VirtualScroller = /*#__PURE__*/function (_Component) {
|
|
|
5028
5141
|
var spacer = this.renderSpacer();
|
|
5029
5142
|
return /*#__PURE__*/React.createElement("div", {
|
|
5030
5143
|
ref: function ref(el) {
|
|
5031
|
-
return
|
|
5144
|
+
return _this17.el = el;
|
|
5032
5145
|
},
|
|
5033
5146
|
className: className,
|
|
5034
5147
|
tabIndex: 0,
|
|
@@ -5816,7 +5929,7 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
5816
5929
|
|
|
5817
5930
|
if (!this.resizeListener) {
|
|
5818
5931
|
this.resizeListener = function () {
|
|
5819
|
-
if (_this7.state.overlayVisible && !DomHandler.
|
|
5932
|
+
if (_this7.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
5820
5933
|
_this7.hideOverlay();
|
|
5821
5934
|
}
|
|
5822
5935
|
};
|
|
@@ -5953,7 +6066,7 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
5953
6066
|
disabled: this.props.disabled,
|
|
5954
6067
|
placeholder: this.props.placeholder,
|
|
5955
6068
|
size: this.props.size,
|
|
5956
|
-
maxLength: this.props.
|
|
6069
|
+
maxLength: this.props.maxLength,
|
|
5957
6070
|
tabIndex: this.props.tabIndex,
|
|
5958
6071
|
onBlur: this.onInputBlur,
|
|
5959
6072
|
onFocus: this.onInputFocus,
|
|
@@ -6013,7 +6126,7 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
6013
6126
|
name: this.props.name,
|
|
6014
6127
|
style: this.props.inputStyle,
|
|
6015
6128
|
className: this.props.inputClassName,
|
|
6016
|
-
maxLength: this.props.
|
|
6129
|
+
maxLength: this.props.maxLength,
|
|
6017
6130
|
onKeyUp: this.props.onKeyUp,
|
|
6018
6131
|
onKeyDown: this.onInputKeyDown,
|
|
6019
6132
|
onKeyPress: this.props.onKeyPress,
|
|
@@ -6151,7 +6264,7 @@ _defineProperty(AutoComplete, "defaultProps", {
|
|
|
6151
6264
|
placeholder: null,
|
|
6152
6265
|
readOnly: false,
|
|
6153
6266
|
disabled: false,
|
|
6154
|
-
|
|
6267
|
+
maxLength: null,
|
|
6155
6268
|
size: null,
|
|
6156
6269
|
appendTo: null,
|
|
6157
6270
|
tabIndex: null,
|
|
@@ -7299,12 +7412,31 @@ var Calendar = /*#__PURE__*/function (_Component) {
|
|
|
7299
7412
|
|
|
7300
7413
|
event.preventDefault();
|
|
7301
7414
|
}
|
|
7415
|
+
}, {
|
|
7416
|
+
key: "doStepMinute",
|
|
7417
|
+
value: function doStepMinute(currentMinute, step) {
|
|
7418
|
+
if (this.props.stepMinute <= 1) {
|
|
7419
|
+
return currentMinute;
|
|
7420
|
+
}
|
|
7421
|
+
|
|
7422
|
+
if (!step) {
|
|
7423
|
+
step = this.props.stepMinute;
|
|
7424
|
+
|
|
7425
|
+
if (currentMinute % step === 0) {
|
|
7426
|
+
return currentMinute;
|
|
7427
|
+
}
|
|
7428
|
+
}
|
|
7429
|
+
|
|
7430
|
+
var newMinute = currentMinute + step;
|
|
7431
|
+
newMinute = Math.floor(newMinute / step) * step;
|
|
7432
|
+
return newMinute;
|
|
7433
|
+
}
|
|
7302
7434
|
}, {
|
|
7303
7435
|
key: "incrementMinute",
|
|
7304
7436
|
value: function incrementMinute(event) {
|
|
7305
7437
|
var currentTime = this.getCurrentDateTime();
|
|
7306
7438
|
var currentMinute = currentTime.getMinutes();
|
|
7307
|
-
var newMinute = currentMinute
|
|
7439
|
+
var newMinute = this.doStepMinute(currentMinute, this.props.stepMinute);
|
|
7308
7440
|
newMinute = newMinute > 59 ? newMinute - 60 : newMinute;
|
|
7309
7441
|
|
|
7310
7442
|
if (this.validateMinute(newMinute, currentTime)) {
|
|
@@ -7330,7 +7462,7 @@ var Calendar = /*#__PURE__*/function (_Component) {
|
|
|
7330
7462
|
value: function decrementMinute(event) {
|
|
7331
7463
|
var currentTime = this.getCurrentDateTime();
|
|
7332
7464
|
var currentMinute = currentTime.getMinutes();
|
|
7333
|
-
var newMinute = currentMinute -
|
|
7465
|
+
var newMinute = this.doStepMinute(currentMinute, -this.props.stepMinute);
|
|
7334
7466
|
newMinute = newMinute < 0 ? newMinute + 60 : newMinute;
|
|
7335
7467
|
|
|
7336
7468
|
if (this.validateMinute(newMinute, currentTime)) {
|
|
@@ -8206,7 +8338,7 @@ var Calendar = /*#__PURE__*/function (_Component) {
|
|
|
8206
8338
|
}, {
|
|
8207
8339
|
key: "onWindowResize",
|
|
8208
8340
|
value: function onWindowResize() {
|
|
8209
|
-
if (this.isVisible() && !DomHandler.
|
|
8341
|
+
if (this.isVisible() && !DomHandler.isTouchDevice()) {
|
|
8210
8342
|
this.hideOverlay();
|
|
8211
8343
|
}
|
|
8212
8344
|
}
|
|
@@ -10435,8 +10567,8 @@ var Carousel = /*#__PURE__*/function (_Component2) {
|
|
|
10435
10567
|
}
|
|
10436
10568
|
}, {
|
|
10437
10569
|
key: "onTransitionEnd",
|
|
10438
|
-
value: function onTransitionEnd() {
|
|
10439
|
-
if (this.itemsContainer) {
|
|
10570
|
+
value: function onTransitionEnd(e) {
|
|
10571
|
+
if (this.itemsContainer && e.propertyName === 'transform') {
|
|
10440
10572
|
DomHandler.addClass(this.itemsContainer, 'p-items-hidden');
|
|
10441
10573
|
this.itemsContainer.style.transition = '';
|
|
10442
10574
|
|
|
@@ -10555,8 +10687,7 @@ var Carousel = /*#__PURE__*/function (_Component2) {
|
|
|
10555
10687
|
key: "createStyle",
|
|
10556
10688
|
value: function createStyle() {
|
|
10557
10689
|
if (!this.carouselStyle) {
|
|
10558
|
-
this.carouselStyle =
|
|
10559
|
-
document.body.appendChild(this.carouselStyle);
|
|
10690
|
+
this.carouselStyle = DomHandler.createInlineStyle();
|
|
10560
10691
|
}
|
|
10561
10692
|
|
|
10562
10693
|
var innerHTML = "\n .p-carousel[".concat(this.attributeSelector, "] .p-carousel-item {\n flex: 1 0 ").concat(100 / this.state.numVisible, "%\n }\n ");
|
|
@@ -10799,16 +10930,16 @@ var Carousel = /*#__PURE__*/function (_Component2) {
|
|
|
10799
10930
|
className: "p-carousel-items-content",
|
|
10800
10931
|
style: {
|
|
10801
10932
|
'height': height
|
|
10802
|
-
}
|
|
10933
|
+
},
|
|
10934
|
+
onTouchStart: this.onTouchStart,
|
|
10935
|
+
onTouchMove: this.onTouchMove,
|
|
10936
|
+
onTouchEnd: this.onTouchEnd
|
|
10803
10937
|
}, /*#__PURE__*/React.createElement("div", {
|
|
10804
10938
|
ref: function ref(el) {
|
|
10805
10939
|
return _this5.itemsContainer = el;
|
|
10806
10940
|
},
|
|
10807
10941
|
className: "p-carousel-items-container",
|
|
10808
|
-
onTransitionEnd: this.onTransitionEnd
|
|
10809
|
-
onTouchStart: this.onTouchStart,
|
|
10810
|
-
onTouchMove: this.onTouchMove,
|
|
10811
|
-
onTouchEnd: this.onTouchEnd
|
|
10942
|
+
onTransitionEnd: this.onTransitionEnd
|
|
10812
10943
|
}, items)), forwardNavigator);
|
|
10813
10944
|
}
|
|
10814
10945
|
}, {
|
|
@@ -11594,7 +11725,7 @@ var CascadeSelect = /*#__PURE__*/function (_Component) {
|
|
|
11594
11725
|
|
|
11595
11726
|
if (!this.resizeListener) {
|
|
11596
11727
|
this.resizeListener = function () {
|
|
11597
|
-
if (_this5.state.overlayVisible && !DomHandler.
|
|
11728
|
+
if (_this5.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
11598
11729
|
_this5.hide();
|
|
11599
11730
|
}
|
|
11600
11731
|
};
|
|
@@ -13142,7 +13273,7 @@ var ColorPicker = /*#__PURE__*/function (_Component) {
|
|
|
13142
13273
|
|
|
13143
13274
|
if (!this.resizeListener) {
|
|
13144
13275
|
this.resizeListener = function () {
|
|
13145
|
-
if (_this4.state.overlayVisible && !DomHandler.
|
|
13276
|
+
if (_this4.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
13146
13277
|
_this4.hide();
|
|
13147
13278
|
}
|
|
13148
13279
|
};
|
|
@@ -14142,8 +14273,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
14142
14273
|
key: "createStyle",
|
|
14143
14274
|
value: function createStyle() {
|
|
14144
14275
|
if (!this.styleElement) {
|
|
14145
|
-
this.styleElement =
|
|
14146
|
-
document.head.appendChild(this.styleElement);
|
|
14276
|
+
this.styleElement = DomHandler.createInlineStyle();
|
|
14147
14277
|
var innerHTML = '';
|
|
14148
14278
|
|
|
14149
14279
|
for (var breakpoint in this.props.breakpoints) {
|
|
@@ -14211,12 +14341,7 @@ var Dialog = /*#__PURE__*/function (_Component) {
|
|
|
14211
14341
|
key: "componentWillUnmount",
|
|
14212
14342
|
value: function componentWillUnmount() {
|
|
14213
14343
|
this.disableDocumentSettings();
|
|
14214
|
-
|
|
14215
|
-
if (this.styleElement) {
|
|
14216
|
-
document.head.removeChild(this.styleElement);
|
|
14217
|
-
this.styleElement = null;
|
|
14218
|
-
}
|
|
14219
|
-
|
|
14344
|
+
this.styleElement = DomHandler.removeInlineStyle(this.styleElement);
|
|
14220
14345
|
ZIndexUtils.clear(this.mask);
|
|
14221
14346
|
}
|
|
14222
14347
|
}, {
|
|
@@ -14799,7 +14924,7 @@ var ConfirmPopup = /*#__PURE__*/function (_Component) {
|
|
|
14799
14924
|
|
|
14800
14925
|
if (!this.resizeListener) {
|
|
14801
14926
|
this.resizeListener = function () {
|
|
14802
|
-
if (_this4.state.visible && !DomHandler.
|
|
14927
|
+
if (_this4.state.visible && !DomHandler.isTouchDevice()) {
|
|
14803
14928
|
_this4.hide();
|
|
14804
14929
|
}
|
|
14805
14930
|
};
|
|
@@ -15061,7 +15186,7 @@ var ConfirmPopup = /*#__PURE__*/function (_Component) {
|
|
|
15061
15186
|
return /*#__PURE__*/React.createElement(Portal, {
|
|
15062
15187
|
element: element,
|
|
15063
15188
|
appendTo: this.props.appendTo,
|
|
15064
|
-
visible:
|
|
15189
|
+
visible: this.props.visible
|
|
15065
15190
|
});
|
|
15066
15191
|
}
|
|
15067
15192
|
}]);
|
|
@@ -15542,7 +15667,7 @@ var ContextMenu = /*#__PURE__*/function (_Component2) {
|
|
|
15542
15667
|
|
|
15543
15668
|
if (!this.documentResizeListener) {
|
|
15544
15669
|
this.documentResizeListener = function (event) {
|
|
15545
|
-
if (_this9.state.visible && !DomHandler.
|
|
15670
|
+
if (_this9.state.visible && !DomHandler.isTouchDevice()) {
|
|
15546
15671
|
_this9.hide(event);
|
|
15547
15672
|
}
|
|
15548
15673
|
};
|
|
@@ -17164,10 +17289,10 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
17164
17289
|
}, {
|
|
17165
17290
|
key: "onOverlayEntered",
|
|
17166
17291
|
value: function onOverlayEntered(callback) {
|
|
17292
|
+
callback && callback();
|
|
17167
17293
|
this.bindDocumentClickListener();
|
|
17168
17294
|
this.bindScrollListener();
|
|
17169
17295
|
this.bindResizeListener();
|
|
17170
|
-
callback && callback();
|
|
17171
17296
|
this.props.onShow && this.props.onShow();
|
|
17172
17297
|
}
|
|
17173
17298
|
}, {
|
|
@@ -17336,7 +17461,11 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
17336
17461
|
}, {
|
|
17337
17462
|
key: "checkValidity",
|
|
17338
17463
|
value: function checkValidity() {
|
|
17339
|
-
|
|
17464
|
+
if (this.inputRef.current) {
|
|
17465
|
+
return this.inputRef.current.checkValidity();
|
|
17466
|
+
}
|
|
17467
|
+
|
|
17468
|
+
return false;
|
|
17340
17469
|
}
|
|
17341
17470
|
}, {
|
|
17342
17471
|
key: "isLazy",
|
|
@@ -17418,7 +17547,10 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
17418
17547
|
}
|
|
17419
17548
|
|
|
17420
17549
|
this.updateInputField();
|
|
17421
|
-
|
|
17550
|
+
|
|
17551
|
+
if (this.inputRef.current) {
|
|
17552
|
+
this.inputRef.current.selectedIndex = 1;
|
|
17553
|
+
}
|
|
17422
17554
|
}
|
|
17423
17555
|
}, {
|
|
17424
17556
|
key: "componentWillUnmount",
|
|
@@ -17469,7 +17601,10 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
17469
17601
|
}
|
|
17470
17602
|
|
|
17471
17603
|
this.updateInputField();
|
|
17472
|
-
|
|
17604
|
+
|
|
17605
|
+
if (this.inputRef.current) {
|
|
17606
|
+
this.inputRef.current.selectedIndex = 1;
|
|
17607
|
+
}
|
|
17473
17608
|
}
|
|
17474
17609
|
}, {
|
|
17475
17610
|
key: "renderHiddenSelect",
|
|
@@ -18589,11 +18724,16 @@ var InputNumber = /*#__PURE__*/function (_Component) {
|
|
|
18589
18724
|
|
|
18590
18725
|
if (valueStr != null) {
|
|
18591
18726
|
newValue = this.parseValue(valueStr);
|
|
18592
|
-
newValue =
|
|
18727
|
+
newValue = this.evaluateEmpty(newValue);
|
|
18593
18728
|
this.updateInput(newValue, insertedValueStr, operation, valueStr);
|
|
18594
18729
|
this.handleOnChange(event, currentValue, newValue);
|
|
18595
18730
|
}
|
|
18596
18731
|
}
|
|
18732
|
+
}, {
|
|
18733
|
+
key: "evaluateEmpty",
|
|
18734
|
+
value: function evaluateEmpty(newValue) {
|
|
18735
|
+
return !newValue && !this.props.allowEmpty ? this.props.min || 0 : newValue;
|
|
18736
|
+
}
|
|
18597
18737
|
}, {
|
|
18598
18738
|
key: "handleOnChange",
|
|
18599
18739
|
value: function handleOnChange(event, currentValue, newValue) {
|
|
@@ -18707,7 +18847,7 @@ var InputNumber = /*#__PURE__*/function (_Component) {
|
|
|
18707
18847
|
}, {
|
|
18708
18848
|
key: "updateInputValue",
|
|
18709
18849
|
value: function updateInputValue(newValue) {
|
|
18710
|
-
newValue =
|
|
18850
|
+
newValue = this.evaluateEmpty(newValue);
|
|
18711
18851
|
var inputEl = this.inputRef.current;
|
|
18712
18852
|
var value = inputEl.value;
|
|
18713
18853
|
var formattedValue = this.formattedValue(newValue);
|
|
@@ -18720,8 +18860,8 @@ var InputNumber = /*#__PURE__*/function (_Component) {
|
|
|
18720
18860
|
}, {
|
|
18721
18861
|
key: "formattedValue",
|
|
18722
18862
|
value: function formattedValue(val) {
|
|
18723
|
-
var
|
|
18724
|
-
return this.formatValue(
|
|
18863
|
+
var newValue = this.evaluateEmpty(val);
|
|
18864
|
+
return this.formatValue(newValue);
|
|
18725
18865
|
}
|
|
18726
18866
|
}, {
|
|
18727
18867
|
key: "concatValues",
|
|
@@ -18929,7 +19069,7 @@ var InputNumber = /*#__PURE__*/function (_Component) {
|
|
|
18929
19069
|
size: this.props.size,
|
|
18930
19070
|
tabIndex: this.props.tabIndex,
|
|
18931
19071
|
inputMode: this.getInputMode(),
|
|
18932
|
-
maxLength: this.props.
|
|
19072
|
+
maxLength: this.props.maxLength,
|
|
18933
19073
|
disabled: this.props.disabled,
|
|
18934
19074
|
required: this.props.required,
|
|
18935
19075
|
pattern: this.props.pattern,
|
|
@@ -20309,26 +20449,7 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
20309
20449
|
props: this.props.tableProps
|
|
20310
20450
|
}));
|
|
20311
20451
|
|
|
20312
|
-
if (
|
|
20313
|
-
content = body ? ObjectUtils.getJSXElement(body, this.props.rowData, {
|
|
20314
|
-
column: this.props.column,
|
|
20315
|
-
field: this.field,
|
|
20316
|
-
rowIndex: this.props.rowIndex,
|
|
20317
|
-
frozenRow: this.props.frozenRow,
|
|
20318
|
-
props: this.props.tableProps
|
|
20319
|
-
}) : value;
|
|
20320
|
-
} else if (editor && this.state.editing) {
|
|
20321
|
-
content = ObjectUtils.getJSXElement(editor, {
|
|
20322
|
-
rowData: this.state.editingRowData,
|
|
20323
|
-
value: this.resolveFieldData(this.state.editingRowData),
|
|
20324
|
-
column: this.props.column,
|
|
20325
|
-
field: this.field,
|
|
20326
|
-
rowIndex: this.props.rowIndex,
|
|
20327
|
-
frozenRow: this.props.frozenRow,
|
|
20328
|
-
props: this.props.tableProps,
|
|
20329
|
-
editorCallback: this.editorCallback
|
|
20330
|
-
});
|
|
20331
|
-
} else if (selectionMode) {
|
|
20452
|
+
if (selectionMode) {
|
|
20332
20453
|
var showSelection = this.props.showSelectionElement ? this.props.showSelectionElement(this.props.rowData, {
|
|
20333
20454
|
rowIndex: this.props.rowIndex,
|
|
20334
20455
|
props: this.props.tableProps
|
|
@@ -20439,6 +20560,25 @@ var BodyCell = /*#__PURE__*/function (_Component) {
|
|
|
20439
20560
|
rowEditor: rowEditorProps
|
|
20440
20561
|
});
|
|
20441
20562
|
}
|
|
20563
|
+
} else if (body && !this.state.editing) {
|
|
20564
|
+
content = body ? ObjectUtils.getJSXElement(body, this.props.rowData, {
|
|
20565
|
+
column: this.props.column,
|
|
20566
|
+
field: this.field,
|
|
20567
|
+
rowIndex: this.props.rowIndex,
|
|
20568
|
+
frozenRow: this.props.frozenRow,
|
|
20569
|
+
props: this.props.tableProps
|
|
20570
|
+
}) : value;
|
|
20571
|
+
} else if (editor && this.state.editing) {
|
|
20572
|
+
content = ObjectUtils.getJSXElement(editor, {
|
|
20573
|
+
rowData: this.state.editingRowData,
|
|
20574
|
+
value: this.resolveFieldData(this.state.editingRowData),
|
|
20575
|
+
column: this.props.column,
|
|
20576
|
+
field: this.field,
|
|
20577
|
+
rowIndex: this.props.rowIndex,
|
|
20578
|
+
frozenRow: this.props.frozenRow,
|
|
20579
|
+
props: this.props.tableProps,
|
|
20580
|
+
editorCallback: this.editorCallback
|
|
20581
|
+
});
|
|
20442
20582
|
} else {
|
|
20443
20583
|
content = value;
|
|
20444
20584
|
}
|
|
@@ -21082,7 +21222,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21082
21222
|
}, {
|
|
21083
21223
|
key: "equals",
|
|
21084
21224
|
value: function equals(data1, data2) {
|
|
21085
|
-
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);
|
|
21225
|
+
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);
|
|
21086
21226
|
}
|
|
21087
21227
|
}, {
|
|
21088
21228
|
key: "isSubheaderGrouping",
|
|
@@ -21351,7 +21491,8 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21351
21491
|
if (this.props.onSelectionChange && selection !== this.props.selection) {
|
|
21352
21492
|
this.props.onSelectionChange({
|
|
21353
21493
|
originalEvent: originalEvent,
|
|
21354
|
-
value: selection
|
|
21494
|
+
value: selection,
|
|
21495
|
+
type: type
|
|
21355
21496
|
});
|
|
21356
21497
|
}
|
|
21357
21498
|
}
|
|
@@ -21407,13 +21548,14 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21407
21548
|
if (this.props.onSelectionChange && selection !== this.props.selection) {
|
|
21408
21549
|
this.props.onSelectionChange({
|
|
21409
21550
|
originalEvent: originalEvent,
|
|
21410
|
-
value: selection
|
|
21551
|
+
value: selection,
|
|
21552
|
+
type: type
|
|
21411
21553
|
});
|
|
21412
21554
|
}
|
|
21413
21555
|
}
|
|
21414
21556
|
}, {
|
|
21415
21557
|
key: "onRangeSelection",
|
|
21416
|
-
value: function onRangeSelection(event) {
|
|
21558
|
+
value: function onRangeSelection(event, type) {
|
|
21417
21559
|
DomHandler.clearSelection();
|
|
21418
21560
|
this.rangeRowIndex = this.allowCellSelection() ? event.rowIndex : event.index;
|
|
21419
21561
|
var selectionInRange = this.selectRange(event);
|
|
@@ -21422,7 +21564,8 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21422
21564
|
if (this.props.onSelectionChange && selection !== this.props.selection) {
|
|
21423
21565
|
this.props.onSelectionChange({
|
|
21424
21566
|
originalEvent: event.originalEvent,
|
|
21425
|
-
value: selection
|
|
21567
|
+
value: selection,
|
|
21568
|
+
type: type
|
|
21426
21569
|
});
|
|
21427
21570
|
}
|
|
21428
21571
|
|
|
@@ -21582,7 +21725,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21582
21725
|
|
|
21583
21726
|
if (this.allowRowSelection()) {
|
|
21584
21727
|
if (this.allowRangeSelection(event)) {
|
|
21585
|
-
this.onRangeSelection(event);
|
|
21728
|
+
this.onRangeSelection(event, 'row');
|
|
21586
21729
|
} else {
|
|
21587
21730
|
var toggleable = this.isRadioSelectionModeInColumn() || this.isCheckboxSelectionModeInColumn() || this.allowMetaKeySelection(event);
|
|
21588
21731
|
this.anchorRowIndex = event.index;
|
|
@@ -21668,7 +21811,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21668
21811
|
var isSameRow = event.index === this.anchorRowIndex;
|
|
21669
21812
|
|
|
21670
21813
|
if (this.allowRowDrag(event) && !isSameRow) {
|
|
21671
|
-
this.onRangeSelection(event);
|
|
21814
|
+
this.onRangeSelection(event, 'row');
|
|
21672
21815
|
}
|
|
21673
21816
|
}
|
|
21674
21817
|
}, {
|
|
@@ -21871,7 +22014,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21871
22014
|
|
|
21872
22015
|
if (this.allowCellSelection()) {
|
|
21873
22016
|
if (this.allowRangeSelection(event)) {
|
|
21874
|
-
this.onRangeSelection(event);
|
|
22017
|
+
this.onRangeSelection(event, 'cell');
|
|
21875
22018
|
} else {
|
|
21876
22019
|
var toggleable = this.allowMetaKeySelection(event);
|
|
21877
22020
|
|
|
@@ -21920,7 +22063,7 @@ var TableBody = /*#__PURE__*/function (_Component) {
|
|
|
21920
22063
|
var isSameCell = event.rowIndex === this.anchorRowIndex && event.cellIndex === this.anchorCellIndex;
|
|
21921
22064
|
|
|
21922
22065
|
if (this.allowCellDrag(event) && !isSameCell) {
|
|
21923
|
-
this.onRangeSelection(event);
|
|
22066
|
+
this.onRangeSelection(event, 'cell');
|
|
21924
22067
|
}
|
|
21925
22068
|
}
|
|
21926
22069
|
}, {
|
|
@@ -22410,7 +22553,7 @@ var HeaderCheckbox = /*#__PURE__*/function (_Component) {
|
|
|
22410
22553
|
});
|
|
22411
22554
|
this.props.onChange({
|
|
22412
22555
|
originalEvent: event,
|
|
22413
|
-
checked: this.props.checked
|
|
22556
|
+
checked: !this.props.checked
|
|
22414
22557
|
});
|
|
22415
22558
|
}
|
|
22416
22559
|
}
|
|
@@ -22536,7 +22679,7 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
22536
22679
|
}, {
|
|
22537
22680
|
key: "isRowMatchModeSelected",
|
|
22538
22681
|
value: function isRowMatchModeSelected(matchMode) {
|
|
22539
|
-
return this.filterModel.matchMode === matchMode;
|
|
22682
|
+
return this.filterModel && this.filterModel.matchMode === matchMode;
|
|
22540
22683
|
}
|
|
22541
22684
|
}, {
|
|
22542
22685
|
key: "showMenuButton",
|
|
@@ -22829,7 +22972,7 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
22829
22972
|
filters[this.field].constraints.push(newConstraint);
|
|
22830
22973
|
filterConstraintAddCallback && filterConstraintAddCallback({
|
|
22831
22974
|
field: this.field,
|
|
22832
|
-
|
|
22975
|
+
constraint: newConstraint
|
|
22833
22976
|
});
|
|
22834
22977
|
this.props.onFilterChange(filters);
|
|
22835
22978
|
|
|
@@ -22847,7 +22990,7 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
22847
22990
|
var removedConstraint = filters[this.field].constraints.splice(index, 1);
|
|
22848
22991
|
filterConstraintRemoveCallback && filterConstraintRemoveCallback({
|
|
22849
22992
|
field: this.field,
|
|
22850
|
-
|
|
22993
|
+
constraint: removedConstraint
|
|
22851
22994
|
});
|
|
22852
22995
|
this.props.onFilterChange(filters);
|
|
22853
22996
|
|
|
@@ -22981,7 +23124,7 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
22981
23124
|
|
|
22982
23125
|
if (!this.resizeListener) {
|
|
22983
23126
|
this.resizeListener = function () {
|
|
22984
|
-
if (_this5.state.overlayVisible) {
|
|
23127
|
+
if (_this5.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
22985
23128
|
_this5.hide();
|
|
22986
23129
|
}
|
|
22987
23130
|
};
|
|
@@ -23089,16 +23232,17 @@ var ColumnFilter = /*#__PURE__*/function (_Component) {
|
|
|
23089
23232
|
value: function renderFilterElement(model, index) {
|
|
23090
23233
|
var _this6 = this;
|
|
23091
23234
|
|
|
23235
|
+
var value = model ? model.value : null;
|
|
23092
23236
|
return this.getColumnProp('filterElement') ? ObjectUtils.getJSXElement(this.getColumnProp('filterElement'), {
|
|
23093
23237
|
field: this.field,
|
|
23094
23238
|
index: index,
|
|
23095
23239
|
filterModel: model,
|
|
23096
|
-
value:
|
|
23240
|
+
value: value,
|
|
23097
23241
|
filterApplyCallback: this.filterApplyCallback,
|
|
23098
23242
|
filterCallback: this.filterCallback
|
|
23099
23243
|
}) : /*#__PURE__*/React.createElement(InputText, {
|
|
23100
23244
|
type: this.getColumnProp('filterType'),
|
|
23101
|
-
value:
|
|
23245
|
+
value: value || '',
|
|
23102
23246
|
onChange: function onChange(e) {
|
|
23103
23247
|
return _this6.onInputChange(e, index);
|
|
23104
23248
|
},
|
|
@@ -23762,7 +23906,7 @@ var HeaderCell = /*#__PURE__*/function (_Component) {
|
|
|
23762
23906
|
}, {
|
|
23763
23907
|
key: "renderCheckbox",
|
|
23764
23908
|
value: function renderCheckbox() {
|
|
23765
|
-
if (this.getColumnProp('selectionMode') === 'multiple' && this.props.filterDisplay !== 'row') {
|
|
23909
|
+
if (this.props.showSelectAll && this.getColumnProp('selectionMode') === 'multiple' && this.props.filterDisplay !== 'row') {
|
|
23766
23910
|
var allRowsSelected = this.props.allRowsSelected(this.props.value);
|
|
23767
23911
|
return /*#__PURE__*/React.createElement(HeaderCheckbox, {
|
|
23768
23912
|
checked: allRowsSelected,
|
|
@@ -23984,6 +24128,7 @@ var TableHeader = /*#__PURE__*/function (_Component) {
|
|
|
23984
24128
|
onColumnResizeStart: _this3.props.onColumnResizeStart,
|
|
23985
24129
|
onColumnResizerClick: _this3.props.onColumnResizerClick,
|
|
23986
24130
|
onColumnResizerDoubleClick: _this3.props.onColumnResizerDoubleClick,
|
|
24131
|
+
showSelectAll: _this3.props.showSelectAll,
|
|
23987
24132
|
allRowsSelected: _this3.props.allRowsSelected,
|
|
23988
24133
|
onColumnCheckboxChange: _this3.onCheckboxChange,
|
|
23989
24134
|
reorderableColumns: _this3.props.reorderableColumns,
|
|
@@ -23991,6 +24136,36 @@ var TableHeader = /*#__PURE__*/function (_Component) {
|
|
|
23991
24136
|
});
|
|
23992
24137
|
});
|
|
23993
24138
|
}
|
|
24139
|
+
}, {
|
|
24140
|
+
key: "renderCheckbox",
|
|
24141
|
+
value: function renderCheckbox(selectionMode) {
|
|
24142
|
+
if (this.props.showSelectAll && selectionMode === 'multiple') {
|
|
24143
|
+
var allRowsSelected = this.props.allRowsSelected(this.props.value);
|
|
24144
|
+
return /*#__PURE__*/React.createElement(HeaderCheckbox, {
|
|
24145
|
+
checked: allRowsSelected,
|
|
24146
|
+
onChange: this.onCheckboxChange,
|
|
24147
|
+
disabled: this.props.empty
|
|
24148
|
+
});
|
|
24149
|
+
}
|
|
24150
|
+
|
|
24151
|
+
return null;
|
|
24152
|
+
}
|
|
24153
|
+
}, {
|
|
24154
|
+
key: "renderFilter",
|
|
24155
|
+
value: function renderFilter(column, filter) {
|
|
24156
|
+
if (filter) {
|
|
24157
|
+
return /*#__PURE__*/React.createElement(ColumnFilter, {
|
|
24158
|
+
display: "row",
|
|
24159
|
+
column: column,
|
|
24160
|
+
filters: this.props.filters,
|
|
24161
|
+
filtersStore: this.props.filtersStore,
|
|
24162
|
+
onFilterChange: this.props.onFilterChange,
|
|
24163
|
+
onFilterApply: this.props.onFilterApply
|
|
24164
|
+
});
|
|
24165
|
+
}
|
|
24166
|
+
|
|
24167
|
+
return null;
|
|
24168
|
+
}
|
|
23994
24169
|
}, {
|
|
23995
24170
|
key: "renderFilterCells",
|
|
23996
24171
|
value: function renderFilterCells() {
|
|
@@ -24018,24 +24193,15 @@ var TableHeader = /*#__PURE__*/function (_Component) {
|
|
|
24018
24193
|
});
|
|
24019
24194
|
var colKey = columnKey || field || i;
|
|
24020
24195
|
|
|
24021
|
-
var
|
|
24196
|
+
var checkbox = _this4.renderCheckbox(selectionMode);
|
|
24197
|
+
|
|
24198
|
+
var filterRow = _this4.renderFilter(col, filter);
|
|
24022
24199
|
|
|
24023
24200
|
return /*#__PURE__*/React.createElement("th", {
|
|
24024
24201
|
key: colKey,
|
|
24025
24202
|
style: colStyle,
|
|
24026
24203
|
className: colClassName
|
|
24027
|
-
},
|
|
24028
|
-
checked: allRowsSelected,
|
|
24029
|
-
onChange: _this4.onCheckboxChange,
|
|
24030
|
-
disabled: _this4.props.empty
|
|
24031
|
-
}), filter && /*#__PURE__*/React.createElement(ColumnFilter, {
|
|
24032
|
-
display: "row",
|
|
24033
|
-
column: col,
|
|
24034
|
-
filters: _this4.props.filters,
|
|
24035
|
-
filtersStore: _this4.props.filtersStore,
|
|
24036
|
-
onFilterChange: _this4.props.onFilterChange,
|
|
24037
|
-
onFilterApply: _this4.props.onFilterApply
|
|
24038
|
-
}));
|
|
24204
|
+
}, checkbox, filterRow);
|
|
24039
24205
|
}
|
|
24040
24206
|
|
|
24041
24207
|
return null;
|
|
@@ -24119,10 +24285,6 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24119
24285
|
_this.state.filters = props.filters;
|
|
24120
24286
|
}
|
|
24121
24287
|
|
|
24122
|
-
if (_this.isStateful()) {
|
|
24123
|
-
_this.restoreState(_this.state);
|
|
24124
|
-
}
|
|
24125
|
-
|
|
24126
24288
|
_this.attributeSelector = UniqueComponentId(); // header
|
|
24127
24289
|
|
|
24128
24290
|
_this.onSortChange = _this.onSortChange.bind(_assertThisInitialized(_this));
|
|
@@ -24158,6 +24320,11 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24158
24320
|
value: function isVirtualScrollerDisabled() {
|
|
24159
24321
|
return ObjectUtils.isEmpty(this.props.virtualScrollerOptions) || !this.props.scrollable;
|
|
24160
24322
|
}
|
|
24323
|
+
}, {
|
|
24324
|
+
key: "isEquals",
|
|
24325
|
+
value: function isEquals(data1, data2) {
|
|
24326
|
+
return this.props.compareSelectionBy === 'equals' ? data1 === data2 : ObjectUtils.equals(data1, data2, this.props.dataKey);
|
|
24327
|
+
}
|
|
24161
24328
|
}, {
|
|
24162
24329
|
key: "hasFilter",
|
|
24163
24330
|
value: function hasFilter() {
|
|
@@ -24365,7 +24532,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24365
24532
|
};
|
|
24366
24533
|
};
|
|
24367
24534
|
|
|
24368
|
-
this.props.onPage(getOnPageParams(restoredState.first, restoredState.rows));
|
|
24535
|
+
this.props.onPage(this.createEvent(getOnPageParams(restoredState.first, restoredState.rows)));
|
|
24369
24536
|
} else {
|
|
24370
24537
|
state.first = restoredState.first;
|
|
24371
24538
|
state.rows = restoredState.rows;
|
|
@@ -24374,10 +24541,10 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24374
24541
|
|
|
24375
24542
|
if (restoredState.sortField) {
|
|
24376
24543
|
if (this.props.onSort) {
|
|
24377
|
-
this.props.onSort({
|
|
24544
|
+
this.props.onSort(this.createEvent({
|
|
24378
24545
|
sortField: restoredState.sortField,
|
|
24379
24546
|
sortOrder: restoredState.sortOrder
|
|
24380
|
-
});
|
|
24547
|
+
}));
|
|
24381
24548
|
} else {
|
|
24382
24549
|
state.sortField = restoredState.sortField;
|
|
24383
24550
|
state.sortOrder = restoredState.sortOrder;
|
|
@@ -24386,9 +24553,9 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24386
24553
|
|
|
24387
24554
|
if (restoredState.multiSortMeta) {
|
|
24388
24555
|
if (this.props.onSort) {
|
|
24389
|
-
this.props.onSort({
|
|
24556
|
+
this.props.onSort(this.createEvent({
|
|
24390
24557
|
multiSortMeta: restoredState.multiSortMeta
|
|
24391
|
-
});
|
|
24558
|
+
}));
|
|
24392
24559
|
} else {
|
|
24393
24560
|
state.multiSortMeta = restoredState.multiSortMeta;
|
|
24394
24561
|
}
|
|
@@ -24398,9 +24565,9 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24398
24565
|
state.d_filters = this.cloneFilters(restoredState.filters);
|
|
24399
24566
|
|
|
24400
24567
|
if (this.props.onFilter) {
|
|
24401
|
-
this.props.onFilter({
|
|
24568
|
+
this.props.onFilter(this.createEvent({
|
|
24402
24569
|
filters: restoredState.filters
|
|
24403
|
-
});
|
|
24570
|
+
}));
|
|
24404
24571
|
} else {
|
|
24405
24572
|
state.filters = this.cloneFilters(restoredState.filters);
|
|
24406
24573
|
}
|
|
@@ -24503,15 +24670,23 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24503
24670
|
value: function allRowsSelected(processedData) {
|
|
24504
24671
|
var _this5 = this;
|
|
24505
24672
|
|
|
24506
|
-
|
|
24507
|
-
|
|
24508
|
-
|
|
24509
|
-
|
|
24510
|
-
|
|
24673
|
+
if (this.props.onSelectAllChange) {
|
|
24674
|
+
return this.props.selectAll;
|
|
24675
|
+
} else {
|
|
24676
|
+
var data = this.props.selectionPageOnly ? this.dataToRender(processedData) : processedData;
|
|
24677
|
+
var val = this.props.frozenValue ? [].concat(_toConsumableArray(this.props.frozenValue), _toConsumableArray(data)) : data;
|
|
24678
|
+
var selectableVal = this.props.showSelectionElement ? val.filter(function (data, index) {
|
|
24679
|
+
return _this5.props.showSelectionElement(data, {
|
|
24680
|
+
rowIndex: index,
|
|
24681
|
+
props: _this5.props
|
|
24682
|
+
});
|
|
24683
|
+
}) : val;
|
|
24684
|
+
return selectableVal && this.props.selection && selectableVal.every(function (sv) {
|
|
24685
|
+
return _this5.props.selection.some(function (s) {
|
|
24686
|
+
return _this5.isEquals(s, sv);
|
|
24687
|
+
});
|
|
24511
24688
|
});
|
|
24512
|
-
}
|
|
24513
|
-
var length = this.props.lazy ? this.props.totalRecords : selectableVal ? selectableVal.length : 0;
|
|
24514
|
-
return selectableVal && length > 0 && this.props.selection && this.props.selection.length > 0 && this.props.selection.length === length;
|
|
24689
|
+
}
|
|
24515
24690
|
}
|
|
24516
24691
|
}, {
|
|
24517
24692
|
key: "getSelectionModeInColumn",
|
|
@@ -24712,37 +24887,46 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24712
24887
|
value: function onColumnHeaderCheckboxChange(e, processedData) {
|
|
24713
24888
|
var _this8 = this;
|
|
24714
24889
|
|
|
24715
|
-
|
|
24716
|
-
|
|
24717
|
-
var selection;
|
|
24718
|
-
|
|
24719
|
-
if (!checked) {
|
|
24720
|
-
selection = this.props.frozenValue ? [].concat(_toConsumableArray(this.props.frozenValue), _toConsumableArray(processedData)) : processedData;
|
|
24721
|
-
selection = this.props.showSelectionElement ? selection.filter(function (data, index) {
|
|
24722
|
-
return _this8.props.showSelectionElement(data, {
|
|
24723
|
-
rowIndex: index,
|
|
24724
|
-
props: _this8.props
|
|
24725
|
-
});
|
|
24726
|
-
}) : selection;
|
|
24727
|
-
this.props.onAllRowsSelect && this.props.onAllRowsSelect({
|
|
24728
|
-
originalEvent: originalEvent,
|
|
24729
|
-
data: selection,
|
|
24730
|
-
type: 'all'
|
|
24731
|
-
});
|
|
24890
|
+
if (this.props.onSelectAllChange) {
|
|
24891
|
+
this.props.onSelectAllChange(e);
|
|
24732
24892
|
} else {
|
|
24733
|
-
|
|
24734
|
-
|
|
24735
|
-
|
|
24736
|
-
|
|
24737
|
-
|
|
24738
|
-
|
|
24739
|
-
|
|
24893
|
+
var originalEvent = e.originalEvent,
|
|
24894
|
+
checked = e.checked;
|
|
24895
|
+
var data = this.props.selectionPageOnly ? this.dataToRender(processedData) : processedData;
|
|
24896
|
+
var selection = this.props.selectionPageOnly && this.props.selection ? this.props.selection.filter(function (s) {
|
|
24897
|
+
return !data.some(function (d) {
|
|
24898
|
+
return _this8.isEquals(s, d);
|
|
24899
|
+
});
|
|
24900
|
+
}) : [];
|
|
24901
|
+
|
|
24902
|
+
if (checked) {
|
|
24903
|
+
selection = this.props.frozenValue ? [].concat(_toConsumableArray(selection), _toConsumableArray(this.props.frozenValue), _toConsumableArray(data)) : [].concat(_toConsumableArray(selection), _toConsumableArray(data));
|
|
24904
|
+
selection = this.props.showSelectionElement ? selection.filter(function (data, index) {
|
|
24905
|
+
return _this8.props.showSelectionElement(data, {
|
|
24906
|
+
rowIndex: index,
|
|
24907
|
+
props: _this8.props
|
|
24908
|
+
});
|
|
24909
|
+
}) : selection;
|
|
24910
|
+
this.props.onAllRowsSelect && this.props.onAllRowsSelect({
|
|
24911
|
+
originalEvent: originalEvent,
|
|
24912
|
+
data: selection,
|
|
24913
|
+
type: 'all'
|
|
24914
|
+
});
|
|
24915
|
+
} else {
|
|
24916
|
+
this.props.onAllRowsUnselect && this.props.onAllRowsUnselect({
|
|
24917
|
+
originalEvent: originalEvent,
|
|
24918
|
+
data: selection,
|
|
24919
|
+
type: 'all'
|
|
24920
|
+
});
|
|
24921
|
+
}
|
|
24740
24922
|
|
|
24741
|
-
|
|
24742
|
-
|
|
24743
|
-
|
|
24744
|
-
|
|
24745
|
-
|
|
24923
|
+
if (this.props.onSelectionChange) {
|
|
24924
|
+
this.props.onSelectionChange({
|
|
24925
|
+
originalEvent: originalEvent,
|
|
24926
|
+
value: selection,
|
|
24927
|
+
type: 'all'
|
|
24928
|
+
});
|
|
24929
|
+
}
|
|
24746
24930
|
}
|
|
24747
24931
|
}
|
|
24748
24932
|
}, {
|
|
@@ -24875,15 +25059,13 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24875
25059
|
}, {
|
|
24876
25060
|
key: "createStyleElement",
|
|
24877
25061
|
value: function createStyleElement() {
|
|
24878
|
-
this.styleElement =
|
|
24879
|
-
document.head.appendChild(this.styleElement);
|
|
25062
|
+
this.styleElement = DomHandler.createInlineStyle();
|
|
24880
25063
|
}
|
|
24881
25064
|
}, {
|
|
24882
25065
|
key: "createResponsiveStyle",
|
|
24883
25066
|
value: function createResponsiveStyle() {
|
|
24884
25067
|
if (!this.responsiveStyleElement) {
|
|
24885
|
-
this.responsiveStyleElement =
|
|
24886
|
-
document.head.appendChild(this.responsiveStyleElement);
|
|
25068
|
+
this.responsiveStyleElement = DomHandler.createInlineStyle();
|
|
24887
25069
|
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");
|
|
24888
25070
|
this.responsiveStyleElement.innerHTML = innerHTML;
|
|
24889
25071
|
}
|
|
@@ -24891,24 +25073,18 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24891
25073
|
}, {
|
|
24892
25074
|
key: "destroyResponsiveStyle",
|
|
24893
25075
|
value: function destroyResponsiveStyle() {
|
|
24894
|
-
|
|
24895
|
-
document.head.removeChild(this.responsiveStyleElement);
|
|
24896
|
-
this.responsiveStyleElement = null;
|
|
24897
|
-
}
|
|
25076
|
+
this.responsiveStyleElement = DomHandler.removeInlineStyle(this.responsiveStyleElement);
|
|
24898
25077
|
}
|
|
24899
25078
|
}, {
|
|
24900
25079
|
key: "destroyStyleElement",
|
|
24901
25080
|
value: function destroyStyleElement() {
|
|
24902
|
-
|
|
24903
|
-
document.head.removeChild(this.styleElement);
|
|
24904
|
-
this.styleElement = null;
|
|
24905
|
-
}
|
|
25081
|
+
this.styleElement = DomHandler.removeInlineStyle(this.styleElement);
|
|
24906
25082
|
}
|
|
24907
25083
|
}, {
|
|
24908
25084
|
key: "onPageChange",
|
|
24909
25085
|
value: function onPageChange(e) {
|
|
24910
25086
|
this.clearEditingMetaData();
|
|
24911
|
-
if (this.props.onPage) this.props.onPage(e);else this.setState({
|
|
25087
|
+
if (this.props.onPage) this.props.onPage(this.createEvent(e));else this.setState({
|
|
24912
25088
|
first: e.first,
|
|
24913
25089
|
rows: e.rows
|
|
24914
25090
|
});
|
|
@@ -24972,7 +25148,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24972
25148
|
}
|
|
24973
25149
|
|
|
24974
25150
|
if (this.props.onSort) {
|
|
24975
|
-
this.props.onSort(eventMeta);
|
|
25151
|
+
this.props.onSort(this.createEvent(eventMeta));
|
|
24976
25152
|
} else {
|
|
24977
25153
|
eventMeta.first = 0;
|
|
24978
25154
|
this.setState(eventMeta);
|
|
@@ -24991,6 +25167,15 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
24991
25167
|
value: function getCalculatedSortOrder(currentOrder) {
|
|
24992
25168
|
return this.props.removableSort ? this.props.defaultSortOrder === currentOrder ? currentOrder * -1 : 0 : currentOrder * -1;
|
|
24993
25169
|
}
|
|
25170
|
+
}, {
|
|
25171
|
+
key: "compareValuesOnSort",
|
|
25172
|
+
value: function compareValuesOnSort(value1, value2) {
|
|
25173
|
+
var result = null;
|
|
25174
|
+
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, {
|
|
25175
|
+
numeric: true
|
|
25176
|
+
});else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
25177
|
+
return result;
|
|
25178
|
+
}
|
|
24994
25179
|
}, {
|
|
24995
25180
|
key: "addSortMeta",
|
|
24996
25181
|
value: function addSortMeta(meta, multiSortMeta) {
|
|
@@ -25015,6 +25200,8 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25015
25200
|
}, {
|
|
25016
25201
|
key: "sortSingle",
|
|
25017
25202
|
value: function sortSingle(data, field, order) {
|
|
25203
|
+
var _this10 = this;
|
|
25204
|
+
|
|
25018
25205
|
if (this.props.groupRowsBy && this.props.groupRowsBy === this.props.sortField) {
|
|
25019
25206
|
var multiSortMeta = [{
|
|
25020
25207
|
field: this.props.sortField,
|
|
@@ -25038,10 +25225,9 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25038
25225
|
value.sort(function (data1, data2) {
|
|
25039
25226
|
var value1 = ObjectUtils.resolveFieldData(data1, field);
|
|
25040
25227
|
var value2 = ObjectUtils.resolveFieldData(data2, field);
|
|
25041
|
-
|
|
25042
|
-
|
|
25043
|
-
|
|
25044
|
-
});else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
25228
|
+
|
|
25229
|
+
var result = _this10.compareValuesOnSort(value1, value2);
|
|
25230
|
+
|
|
25045
25231
|
return order * result;
|
|
25046
25232
|
});
|
|
25047
25233
|
}
|
|
@@ -25051,7 +25237,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25051
25237
|
}, {
|
|
25052
25238
|
key: "sortMultiple",
|
|
25053
25239
|
value: function sortMultiple(data) {
|
|
25054
|
-
var
|
|
25240
|
+
var _this11 = this;
|
|
25055
25241
|
|
|
25056
25242
|
var multiSortMeta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
25057
25243
|
|
|
@@ -25068,7 +25254,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25068
25254
|
|
|
25069
25255
|
if (this.columnSortable && this.columnSortFunction) {
|
|
25070
25256
|
var meta = multiSortMeta.find(function (meta) {
|
|
25071
|
-
return meta.field ===
|
|
25257
|
+
return meta.field === _this11.columnField;
|
|
25072
25258
|
});
|
|
25073
25259
|
var field = this.columnField;
|
|
25074
25260
|
var order = meta ? meta.order : this.defaultSortOrder;
|
|
@@ -25078,7 +25264,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25078
25264
|
});
|
|
25079
25265
|
} else {
|
|
25080
25266
|
value.sort(function (data1, data2) {
|
|
25081
|
-
return
|
|
25267
|
+
return _this11.multisortField(data1, data2, multiSortMeta, 0);
|
|
25082
25268
|
});
|
|
25083
25269
|
}
|
|
25084
25270
|
|
|
@@ -25089,22 +25275,12 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25089
25275
|
value: function multisortField(data1, data2, multiSortMeta, index) {
|
|
25090
25276
|
var value1 = ObjectUtils.resolveFieldData(data1, multiSortMeta[index].field);
|
|
25091
25277
|
var value2 = ObjectUtils.resolveFieldData(data2, multiSortMeta[index].field);
|
|
25092
|
-
var result = null;
|
|
25093
|
-
|
|
25094
|
-
if (typeof value1 === 'string' || value1 instanceof String) {
|
|
25095
|
-
if (value1.localeCompare && value1 !== value2) {
|
|
25096
|
-
return multiSortMeta[index].order * value1.localeCompare(value2, undefined, {
|
|
25097
|
-
numeric: true
|
|
25098
|
-
});
|
|
25099
|
-
}
|
|
25100
|
-
} else {
|
|
25101
|
-
result = value1 < value2 ? -1 : 1;
|
|
25102
|
-
}
|
|
25103
25278
|
|
|
25104
25279
|
if (value1 === value2) {
|
|
25105
25280
|
return multiSortMeta.length - 1 > index ? this.multisortField(data1, data2, multiSortMeta, index + 1) : 0;
|
|
25106
25281
|
}
|
|
25107
25282
|
|
|
25283
|
+
var result = this.compareValuesOnSort(value1, value2);
|
|
25108
25284
|
return multiSortMeta[index].order * result;
|
|
25109
25285
|
}
|
|
25110
25286
|
}, {
|
|
@@ -25118,25 +25294,25 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25118
25294
|
}, {
|
|
25119
25295
|
key: "onFilterApply",
|
|
25120
25296
|
value: function onFilterApply() {
|
|
25121
|
-
var
|
|
25297
|
+
var _this12 = this;
|
|
25122
25298
|
|
|
25123
25299
|
clearTimeout(this.filterTimeout);
|
|
25124
25300
|
this.filterTimeout = setTimeout(function () {
|
|
25125
|
-
var filters =
|
|
25301
|
+
var filters = _this12.cloneFilters(_this12.state.d_filters);
|
|
25126
25302
|
|
|
25127
|
-
if (
|
|
25128
|
-
|
|
25303
|
+
if (_this12.props.onFilter) {
|
|
25304
|
+
_this12.props.onFilter(_this12.createEvent({
|
|
25129
25305
|
filters: filters
|
|
25130
|
-
});
|
|
25306
|
+
}));
|
|
25131
25307
|
} else {
|
|
25132
|
-
|
|
25308
|
+
_this12.setState({
|
|
25133
25309
|
first: 0,
|
|
25134
25310
|
filters: filters
|
|
25135
25311
|
});
|
|
25136
25312
|
}
|
|
25137
25313
|
|
|
25138
|
-
if (
|
|
25139
|
-
|
|
25314
|
+
if (_this12.props.onValueChange) {
|
|
25315
|
+
_this12.props.onValueChange(_this12.processedData({
|
|
25140
25316
|
filters: filters
|
|
25141
25317
|
}));
|
|
25142
25318
|
}
|
|
@@ -25234,7 +25410,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25234
25410
|
}, {
|
|
25235
25411
|
key: "cloneFilters",
|
|
25236
25412
|
value: function cloneFilters(filters) {
|
|
25237
|
-
var
|
|
25413
|
+
var _this13 = this;
|
|
25238
25414
|
|
|
25239
25415
|
filters = filters || this.props.filters;
|
|
25240
25416
|
var cloned = {};
|
|
@@ -25255,34 +25431,31 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25255
25431
|
} else {
|
|
25256
25432
|
var columns = this.getColumns();
|
|
25257
25433
|
cloned = columns.reduce(function (_filters, col) {
|
|
25258
|
-
|
|
25259
|
-
|
|
25260
|
-
|
|
25261
|
-
|
|
25262
|
-
|
|
25263
|
-
|
|
25264
|
-
|
|
25265
|
-
|
|
25266
|
-
};
|
|
25267
|
-
|
|
25268
|
-
if (filterFunction) {
|
|
25269
|
-
FilterService.register("custom_".concat(field), function () {
|
|
25270
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25271
|
-
args[_key] = arguments[_key];
|
|
25272
|
-
}
|
|
25434
|
+
var field = col.props.filterField || col.props.field;
|
|
25435
|
+
var filterFunction = col.props.filterFunction;
|
|
25436
|
+
var dataType = col.props.dataType;
|
|
25437
|
+
var matchMode = col.props.filterMatchMode || (PrimeReact.filterMatchModeOptions[dataType] ? PrimeReact.filterMatchModeOptions[dataType][0] : FilterMatchMode.STARTS_WITH);
|
|
25438
|
+
var constraint = {
|
|
25439
|
+
value: null,
|
|
25440
|
+
matchMode: matchMode
|
|
25441
|
+
};
|
|
25273
25442
|
|
|
25274
|
-
|
|
25275
|
-
|
|
25276
|
-
|
|
25277
|
-
|
|
25278
|
-
|
|
25443
|
+
if (filterFunction) {
|
|
25444
|
+
FilterService.register("custom_".concat(field), function () {
|
|
25445
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25446
|
+
args[_key] = arguments[_key];
|
|
25447
|
+
}
|
|
25279
25448
|
|
|
25280
|
-
|
|
25281
|
-
|
|
25282
|
-
|
|
25283
|
-
}
|
|
25449
|
+
return filterFunction.apply(void 0, args.concat([{
|
|
25450
|
+
column: col
|
|
25451
|
+
}]));
|
|
25452
|
+
});
|
|
25284
25453
|
}
|
|
25285
25454
|
|
|
25455
|
+
_filters[field] = _this13.props.filterDisplay === 'menu' ? {
|
|
25456
|
+
operator: FilterOperator.AND,
|
|
25457
|
+
constraints: [constraint]
|
|
25458
|
+
} : constraint;
|
|
25286
25459
|
return _filters;
|
|
25287
25460
|
}, {});
|
|
25288
25461
|
}
|
|
@@ -25358,7 +25531,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25358
25531
|
}, {
|
|
25359
25532
|
key: "exportCSV",
|
|
25360
25533
|
value: function exportCSV(options) {
|
|
25361
|
-
var
|
|
25534
|
+
var _this14 = this;
|
|
25362
25535
|
|
|
25363
25536
|
var data;
|
|
25364
25537
|
var csv = "\uFEFF";
|
|
@@ -25381,7 +25554,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25381
25554
|
csv += '"' + (header || field) + '"';
|
|
25382
25555
|
|
|
25383
25556
|
if (i < columns.length - 1) {
|
|
25384
|
-
csv +=
|
|
25557
|
+
csv += _this14.props.csvSeparator;
|
|
25385
25558
|
}
|
|
25386
25559
|
}
|
|
25387
25560
|
}); //body
|
|
@@ -25397,7 +25570,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25397
25570
|
var cellData = ObjectUtils.resolveFieldData(record, field);
|
|
25398
25571
|
|
|
25399
25572
|
if (cellData != null) {
|
|
25400
|
-
cellData =
|
|
25573
|
+
cellData = _this14.props.exportFunction ? _this14.props.exportFunction({
|
|
25401
25574
|
data: cellData,
|
|
25402
25575
|
field: field,
|
|
25403
25576
|
rowData: record,
|
|
@@ -25408,7 +25581,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25408
25581
|
csv += '"' + cellData + '"';
|
|
25409
25582
|
|
|
25410
25583
|
if (i < columns.length - 1) {
|
|
25411
|
-
csv +=
|
|
25584
|
+
csv += _this14.props.csvSeparator;
|
|
25412
25585
|
}
|
|
25413
25586
|
}
|
|
25414
25587
|
});
|
|
@@ -25422,6 +25595,18 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25422
25595
|
document.body.click();
|
|
25423
25596
|
}
|
|
25424
25597
|
}
|
|
25598
|
+
}, {
|
|
25599
|
+
key: "createEvent",
|
|
25600
|
+
value: function createEvent(event) {
|
|
25601
|
+
return _objectSpread$s({
|
|
25602
|
+
first: this.getFirst(),
|
|
25603
|
+
rows: this.getRows(),
|
|
25604
|
+
sortField: this.getSortField(),
|
|
25605
|
+
sortOrder: this.getSortOrder(),
|
|
25606
|
+
multiSortMeta: this.getMultiSortMeta(),
|
|
25607
|
+
filters: this.getFilters()
|
|
25608
|
+
}, event);
|
|
25609
|
+
}
|
|
25425
25610
|
}, {
|
|
25426
25611
|
key: "processedData",
|
|
25427
25612
|
value: function processedData(localState) {
|
|
@@ -25465,8 +25650,12 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25465
25650
|
this.createResponsiveStyle();
|
|
25466
25651
|
}
|
|
25467
25652
|
|
|
25468
|
-
if (this.isStateful()
|
|
25469
|
-
this.
|
|
25653
|
+
if (this.isStateful()) {
|
|
25654
|
+
this.setState(this.restoreState(this.state));
|
|
25655
|
+
|
|
25656
|
+
if (this.props.resizableColumns) {
|
|
25657
|
+
this.restoreColumnWidths();
|
|
25658
|
+
}
|
|
25470
25659
|
}
|
|
25471
25660
|
}
|
|
25472
25661
|
}, {
|
|
@@ -25566,6 +25755,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25566
25755
|
filtersStore: filtersStore,
|
|
25567
25756
|
onFilterChange: this.onFilterChange,
|
|
25568
25757
|
onFilterApply: this.onFilterApply,
|
|
25758
|
+
showSelectAll: this.props.showSelectAll,
|
|
25569
25759
|
allRowsSelected: this.allRowsSelected,
|
|
25570
25760
|
onColumnCheckboxChange: this.onColumnHeaderCheckboxChange,
|
|
25571
25761
|
onColumnMouseDown: this.onColumnHeaderMouseDown,
|
|
@@ -25733,7 +25923,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25733
25923
|
}, {
|
|
25734
25924
|
key: "renderContent",
|
|
25735
25925
|
value: function renderContent(processedData, columns, selectionModeInColumn, empty) {
|
|
25736
|
-
var
|
|
25926
|
+
var _this15 = this;
|
|
25737
25927
|
|
|
25738
25928
|
if (!columns) return;
|
|
25739
25929
|
var isVirtualScrollerDisabled = this.isVirtualScrollerDisabled();
|
|
@@ -25746,29 +25936,27 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25746
25936
|
}, /*#__PURE__*/React.createElement(VirtualScroller, _extends({}, virtualScrollerOptions, {
|
|
25747
25937
|
items: processedData,
|
|
25748
25938
|
columns: columns,
|
|
25749
|
-
|
|
25750
|
-
height: this.props.scrollHeight
|
|
25751
|
-
},
|
|
25939
|
+
scrollHeight: this.props.scrollHeight,
|
|
25752
25940
|
disabled: isVirtualScrollerDisabled,
|
|
25753
25941
|
loaderDisabled: true,
|
|
25754
25942
|
showSpacer: false,
|
|
25755
25943
|
contentTemplate: function contentTemplate(options) {
|
|
25756
25944
|
var ref = function ref(el) {
|
|
25757
|
-
|
|
25945
|
+
_this15.table = el;
|
|
25758
25946
|
options.spacerRef && options.spacerRef(el);
|
|
25759
25947
|
};
|
|
25760
25948
|
|
|
25761
|
-
var tableClassName = classNames('p-datatable-table',
|
|
25949
|
+
var tableClassName = classNames('p-datatable-table', _this15.props.tableClassName);
|
|
25762
25950
|
|
|
25763
|
-
var tableHeader =
|
|
25951
|
+
var tableHeader = _this15.renderTableHeader(options, empty);
|
|
25764
25952
|
|
|
25765
|
-
var tableBody =
|
|
25953
|
+
var tableBody = _this15.renderTableBody(options, selectionModeInColumn, empty, isVirtualScrollerDisabled);
|
|
25766
25954
|
|
|
25767
|
-
var tableFooter =
|
|
25955
|
+
var tableFooter = _this15.renderTableFooter(options);
|
|
25768
25956
|
|
|
25769
25957
|
return /*#__PURE__*/React.createElement("table", {
|
|
25770
25958
|
ref: ref,
|
|
25771
|
-
style:
|
|
25959
|
+
style: _this15.props.tableStyle,
|
|
25772
25960
|
className: tableClassName,
|
|
25773
25961
|
role: "table"
|
|
25774
25962
|
}, tableHeader, tableBody, tableFooter);
|
|
@@ -25830,12 +26018,12 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25830
26018
|
}, {
|
|
25831
26019
|
key: "renderResizeHelper",
|
|
25832
26020
|
value: function renderResizeHelper() {
|
|
25833
|
-
var
|
|
26021
|
+
var _this16 = this;
|
|
25834
26022
|
|
|
25835
26023
|
if (this.props.resizableColumns) {
|
|
25836
26024
|
return /*#__PURE__*/React.createElement("div", {
|
|
25837
26025
|
ref: function ref(el) {
|
|
25838
|
-
return
|
|
26026
|
+
return _this16.resizeHelper = el;
|
|
25839
26027
|
},
|
|
25840
26028
|
className: "p-column-resizer-helper",
|
|
25841
26029
|
style: {
|
|
@@ -25849,7 +26037,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25849
26037
|
}, {
|
|
25850
26038
|
key: "renderReorderIndicators",
|
|
25851
26039
|
value: function renderReorderIndicators() {
|
|
25852
|
-
var
|
|
26040
|
+
var _this17 = this;
|
|
25853
26041
|
|
|
25854
26042
|
if (this.props.reorderableColumns) {
|
|
25855
26043
|
var style = {
|
|
@@ -25858,13 +26046,13 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25858
26046
|
};
|
|
25859
26047
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
25860
26048
|
ref: function ref(el) {
|
|
25861
|
-
return
|
|
26049
|
+
return _this17.reorderIndicatorUp = el;
|
|
25862
26050
|
},
|
|
25863
26051
|
className: "pi pi-arrow-down p-datatable-reorder-indicator-up",
|
|
25864
26052
|
style: style
|
|
25865
26053
|
}), /*#__PURE__*/React.createElement("span", {
|
|
25866
26054
|
ref: function ref(el) {
|
|
25867
|
-
return
|
|
26055
|
+
return _this17.reorderIndicatorDown = el;
|
|
25868
26056
|
},
|
|
25869
26057
|
className: "pi pi-arrow-up p-datatable-reorder-indicator-down",
|
|
25870
26058
|
style: style
|
|
@@ -25876,7 +26064,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25876
26064
|
}, {
|
|
25877
26065
|
key: "render",
|
|
25878
26066
|
value: function render() {
|
|
25879
|
-
var
|
|
26067
|
+
var _this18 = this;
|
|
25880
26068
|
|
|
25881
26069
|
var processedData = this.processedData();
|
|
25882
26070
|
var columns = this.getColumns();
|
|
@@ -25912,7 +26100,7 @@ var DataTable = /*#__PURE__*/function (_Component) {
|
|
|
25912
26100
|
var reorderIndicators = this.renderReorderIndicators();
|
|
25913
26101
|
return /*#__PURE__*/React.createElement("div", {
|
|
25914
26102
|
ref: function ref(el) {
|
|
25915
|
-
return
|
|
26103
|
+
return _this18.el = el;
|
|
25916
26104
|
},
|
|
25917
26105
|
id: this.props.id,
|
|
25918
26106
|
className: className,
|
|
@@ -25979,6 +26167,10 @@ _defineProperty(DataTable, "defaultProps", {
|
|
|
25979
26167
|
dataKey: null,
|
|
25980
26168
|
metaKeySelection: true,
|
|
25981
26169
|
selectOnEdit: true,
|
|
26170
|
+
selectionPageOnly: false,
|
|
26171
|
+
showSelectAll: true,
|
|
26172
|
+
selectAll: false,
|
|
26173
|
+
onSelectAllChange: null,
|
|
25982
26174
|
headerColumnGroup: null,
|
|
25983
26175
|
footerColumnGroup: null,
|
|
25984
26176
|
rowExpansionTemplate: null,
|
|
@@ -26628,7 +26820,7 @@ var Editor = /*#__PURE__*/function (_Component) {
|
|
|
26628
26820
|
if (module && module.default && DomHandler.isExist(_this.editorElement)) {
|
|
26629
26821
|
_this.quill = new module.default(_this.editorElement, {
|
|
26630
26822
|
modules: _objectSpread$r({
|
|
26631
|
-
toolbar: _this.toolbarElement
|
|
26823
|
+
toolbar: _this.props.showHeader ? _this.toolbarElement : false
|
|
26632
26824
|
}, _this.props.modules),
|
|
26633
26825
|
placeholder: _this.props.placeholder,
|
|
26634
26826
|
readOnly: _this.props.readOnly,
|
|
@@ -26690,7 +26882,10 @@ var Editor = /*#__PURE__*/function (_Component) {
|
|
|
26690
26882
|
var containerClass = classNames('p-component p-editor-container', this.props.className);
|
|
26691
26883
|
var toolbarHeader = null;
|
|
26692
26884
|
|
|
26693
|
-
if (this.props.
|
|
26885
|
+
if (this.props.showHeader === false) {
|
|
26886
|
+
toolbarHeader = '';
|
|
26887
|
+
this.toolbarElement = undefined;
|
|
26888
|
+
} else if (this.props.headerTemplate) {
|
|
26694
26889
|
toolbarHeader = /*#__PURE__*/React.createElement("div", {
|
|
26695
26890
|
ref: function ref(el) {
|
|
26696
26891
|
return _this2.toolbarElement = el;
|
|
@@ -26812,6 +27007,7 @@ _defineProperty(Editor, "defaultProps", {
|
|
|
26812
27007
|
modules: null,
|
|
26813
27008
|
formats: null,
|
|
26814
27009
|
theme: 'snow',
|
|
27010
|
+
showHeader: true,
|
|
26815
27011
|
headerTemplate: null,
|
|
26816
27012
|
onTextChange: null,
|
|
26817
27013
|
onSelectionChange: null,
|
|
@@ -28733,8 +28929,7 @@ var GalleriaThumbnails = /*#__PURE__*/function (_Component2) {
|
|
|
28733
28929
|
key: "createStyle",
|
|
28734
28930
|
value: function createStyle() {
|
|
28735
28931
|
if (!this.thumbnailsStyle) {
|
|
28736
|
-
this.thumbnailsStyle =
|
|
28737
|
-
document.body.appendChild(this.thumbnailsStyle);
|
|
28932
|
+
this.thumbnailsStyle = DomHandler.createInlineStyle();
|
|
28738
28933
|
}
|
|
28739
28934
|
|
|
28740
28935
|
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 ");
|
|
@@ -30320,7 +30515,7 @@ var InputMask = /*#__PURE__*/function (_Component) {
|
|
|
30320
30515
|
className: inputMaskClassName,
|
|
30321
30516
|
placeholder: this.props.placeholder,
|
|
30322
30517
|
size: this.props.size,
|
|
30323
|
-
maxLength: this.props.
|
|
30518
|
+
maxLength: this.props.maxLength,
|
|
30324
30519
|
tabIndex: this.props.tabIndex,
|
|
30325
30520
|
disabled: this.props.disabled,
|
|
30326
30521
|
readOnly: this.props.readOnly,
|
|
@@ -30352,7 +30547,7 @@ _defineProperty(InputMask, "defaultProps", {
|
|
|
30352
30547
|
className: null,
|
|
30353
30548
|
placeholder: null,
|
|
30354
30549
|
size: null,
|
|
30355
|
-
|
|
30550
|
+
maxLength: null,
|
|
30356
30551
|
tabIndex: null,
|
|
30357
30552
|
disabled: false,
|
|
30358
30553
|
readOnly: false,
|
|
@@ -32407,7 +32602,7 @@ var Menu = /*#__PURE__*/function (_Component) {
|
|
|
32407
32602
|
|
|
32408
32603
|
if (!this.documentResizeListener) {
|
|
32409
32604
|
this.documentResizeListener = function (event) {
|
|
32410
|
-
if (_this4.state.visible && !DomHandler.
|
|
32605
|
+
if (_this4.state.visible && !DomHandler.isTouchDevice()) {
|
|
32411
32606
|
_this4.hide(event);
|
|
32412
32607
|
}
|
|
32413
32608
|
};
|
|
@@ -34297,7 +34492,7 @@ var MultiSelect = /*#__PURE__*/function (_Component) {
|
|
|
34297
34492
|
|
|
34298
34493
|
if (!this.resizeListener) {
|
|
34299
34494
|
this.resizeListener = function () {
|
|
34300
|
-
if (_this12.state.overlayVisible && !DomHandler.
|
|
34495
|
+
if (_this12.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
34301
34496
|
_this12.hide();
|
|
34302
34497
|
}
|
|
34303
34498
|
};
|
|
@@ -34404,7 +34599,7 @@ var MultiSelect = /*#__PURE__*/function (_Component) {
|
|
|
34404
34599
|
} else {
|
|
34405
34600
|
var visibleOptions = this.getVisibleOptions();
|
|
34406
34601
|
|
|
34407
|
-
if (visibleOptions
|
|
34602
|
+
if (ObjectUtils.isEmpty(visibleOptions)) {
|
|
34408
34603
|
return false;
|
|
34409
34604
|
}
|
|
34410
34605
|
|
|
@@ -36048,7 +36243,7 @@ var OverlayPanel = /*#__PURE__*/function (_Component) {
|
|
|
36048
36243
|
|
|
36049
36244
|
if (!this.resizeListener) {
|
|
36050
36245
|
this.resizeListener = function () {
|
|
36051
|
-
if (_this4.state.visible && !DomHandler.
|
|
36246
|
+
if (_this4.state.visible && !DomHandler.isTouchDevice()) {
|
|
36052
36247
|
_this4.hide();
|
|
36053
36248
|
}
|
|
36054
36249
|
};
|
|
@@ -36199,8 +36394,7 @@ var OverlayPanel = /*#__PURE__*/function (_Component) {
|
|
|
36199
36394
|
key: "createStyle",
|
|
36200
36395
|
value: function createStyle() {
|
|
36201
36396
|
if (!this.styleElement) {
|
|
36202
|
-
this.styleElement =
|
|
36203
|
-
document.head.appendChild(this.styleElement);
|
|
36397
|
+
this.styleElement = DomHandler.createInlineStyle();
|
|
36204
36398
|
var innerHTML = '';
|
|
36205
36399
|
|
|
36206
36400
|
for (var breakpoint in this.props.breakpoints) {
|
|
@@ -36228,10 +36422,7 @@ var OverlayPanel = /*#__PURE__*/function (_Component) {
|
|
|
36228
36422
|
this.scrollHandler = null;
|
|
36229
36423
|
}
|
|
36230
36424
|
|
|
36231
|
-
|
|
36232
|
-
document.head.removeChild(this.styleElement);
|
|
36233
|
-
this.styleElement = null;
|
|
36234
|
-
}
|
|
36425
|
+
this.styleElement = DomHandler.removeInlineStyle(this.styleElement);
|
|
36235
36426
|
|
|
36236
36427
|
if (this.overlayEventListener) {
|
|
36237
36428
|
OverlayService.off('overlay-click', this.overlayEventListener);
|
|
@@ -36420,8 +36611,9 @@ var Panel = /*#__PURE__*/function (_Component) {
|
|
|
36420
36611
|
"aria-controls": ariaControls,
|
|
36421
36612
|
"aria-expanded": !collapsed,
|
|
36422
36613
|
role: "tab"
|
|
36423
|
-
},
|
|
36424
|
-
|
|
36614
|
+
}, IconUtils.getJSXIcon(toggleIcon, {
|
|
36615
|
+
props: this.props,
|
|
36616
|
+
collapsed: collapsed
|
|
36425
36617
|
}), /*#__PURE__*/React.createElement(Ripple, null));
|
|
36426
36618
|
}
|
|
36427
36619
|
|
|
@@ -37283,7 +37475,7 @@ var Password = /*#__PURE__*/function (_Component) {
|
|
|
37283
37475
|
|
|
37284
37476
|
if (!this.resizeListener) {
|
|
37285
37477
|
this.resizeListener = function () {
|
|
37286
|
-
if (_this6.state.overlayVisible && !DomHandler.
|
|
37478
|
+
if (_this6.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
37287
37479
|
_this6.hideOverlay();
|
|
37288
37480
|
}
|
|
37289
37481
|
};
|
|
@@ -40235,7 +40427,7 @@ var SlideMenu = /*#__PURE__*/function (_Component2) {
|
|
|
40235
40427
|
|
|
40236
40428
|
if (!this.documentResizeListener) {
|
|
40237
40429
|
this.documentResizeListener = function (event) {
|
|
40238
|
-
if (_this9.state.visible && !DomHandler.
|
|
40430
|
+
if (_this9.state.visible && !DomHandler.isTouchDevice()) {
|
|
40239
40431
|
_this9.hide(event);
|
|
40240
40432
|
}
|
|
40241
40433
|
};
|
|
@@ -41071,7 +41263,7 @@ var SplitButton = /*#__PURE__*/function (_Component) {
|
|
|
41071
41263
|
|
|
41072
41264
|
if (!this.resizeListener) {
|
|
41073
41265
|
this.resizeListener = function () {
|
|
41074
|
-
if (_this4.state.overlayVisible && !DomHandler.
|
|
41266
|
+
if (_this4.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
41075
41267
|
_this4.hide();
|
|
41076
41268
|
}
|
|
41077
41269
|
};
|
|
@@ -41174,6 +41366,8 @@ var SplitButton = /*#__PURE__*/function (_Component) {
|
|
|
41174
41366
|
var className = classNames('p-splitbutton p-component', this.props.className, {
|
|
41175
41367
|
'p-disabled': this.props.disabled
|
|
41176
41368
|
});
|
|
41369
|
+
var buttonClassName = classNames('p-splitbutton-defaultbutton', this.props.buttonClassName);
|
|
41370
|
+
var menuButtonClassName = classNames('p-splitbutton-menubutton', this.props.menuButtonClassName);
|
|
41177
41371
|
var items = this.renderItems();
|
|
41178
41372
|
var buttonContent = this.props.buttonTemplate ? ObjectUtils.getJSXElement(this.props.buttonTemplate, this.props) : null;
|
|
41179
41373
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -41188,7 +41382,7 @@ var SplitButton = /*#__PURE__*/function (_Component) {
|
|
|
41188
41382
|
return _this6.defaultButton = el;
|
|
41189
41383
|
},
|
|
41190
41384
|
type: "button",
|
|
41191
|
-
className:
|
|
41385
|
+
className: buttonClassName,
|
|
41192
41386
|
icon: this.props.icon,
|
|
41193
41387
|
label: this.props.label,
|
|
41194
41388
|
onClick: this.props.onClick,
|
|
@@ -41196,7 +41390,7 @@ var SplitButton = /*#__PURE__*/function (_Component) {
|
|
|
41196
41390
|
tabIndex: this.props.tabIndex
|
|
41197
41391
|
}, buttonContent), /*#__PURE__*/React.createElement(Button, {
|
|
41198
41392
|
type: "button",
|
|
41199
|
-
className:
|
|
41393
|
+
className: menuButtonClassName,
|
|
41200
41394
|
icon: this.props.dropdownIcon,
|
|
41201
41395
|
onClick: this.onDropdownButtonClick,
|
|
41202
41396
|
disabled: this.props.disabled,
|
|
@@ -41231,8 +41425,10 @@ _defineProperty(SplitButton, "defaultProps", {
|
|
|
41231
41425
|
disabled: null,
|
|
41232
41426
|
style: null,
|
|
41233
41427
|
className: null,
|
|
41428
|
+
buttonClassName: null,
|
|
41234
41429
|
menuStyle: null,
|
|
41235
41430
|
menuClassName: null,
|
|
41431
|
+
menuButtonClassName: null,
|
|
41236
41432
|
tabIndex: null,
|
|
41237
41433
|
appendTo: null,
|
|
41238
41434
|
tooltip: null,
|
|
@@ -41949,6 +42145,8 @@ _defineProperty(TabPanel, "defaultProps", {
|
|
|
41949
42145
|
rightIcon: null,
|
|
41950
42146
|
closable: false,
|
|
41951
42147
|
disabled: false,
|
|
42148
|
+
style: null,
|
|
42149
|
+
className: null,
|
|
41952
42150
|
headerStyle: null,
|
|
41953
42151
|
headerClassName: null,
|
|
41954
42152
|
contentStyle: null,
|
|
@@ -42039,6 +42237,14 @@ var TabView = /*#__PURE__*/function (_Component2) {
|
|
|
42039
42237
|
|
|
42040
42238
|
tabInfo && _this3.onTabHeaderClick(event, tabInfo.tab, tabInfo.index);
|
|
42041
42239
|
});
|
|
42240
|
+
|
|
42241
|
+
if (this.props.onTabClose) {
|
|
42242
|
+
this.props.onTabClose({
|
|
42243
|
+
originalEvent: event,
|
|
42244
|
+
index: index
|
|
42245
|
+
});
|
|
42246
|
+
}
|
|
42247
|
+
|
|
42042
42248
|
event.preventDefault();
|
|
42043
42249
|
}
|
|
42044
42250
|
}, {
|
|
@@ -42178,10 +42384,13 @@ var TabView = /*#__PURE__*/function (_Component2) {
|
|
|
42178
42384
|
var _this4 = this;
|
|
42179
42385
|
|
|
42180
42386
|
var selected = this.isSelected(index);
|
|
42387
|
+
|
|
42388
|
+
var style = _objectSpread$b(_objectSpread$b({}, tab.props.headerStyle || {}), tab.props.style || {});
|
|
42389
|
+
|
|
42181
42390
|
var className = classNames('p-unselectable-text', {
|
|
42182
42391
|
'p-tabview-selected p-highlight': selected,
|
|
42183
42392
|
'p-disabled': tab.props.disabled
|
|
42184
|
-
}, tab.props.headerClassName);
|
|
42393
|
+
}, tab.props.headerClassName, tab.props.className);
|
|
42185
42394
|
var id = this.state.id + '_header_' + index;
|
|
42186
42395
|
var ariaControls = this.state.id + '_content_' + index;
|
|
42187
42396
|
var tabIndex = tab.props.disabled ? null : 0;
|
|
@@ -42242,7 +42451,7 @@ var TabView = /*#__PURE__*/function (_Component2) {
|
|
|
42242
42451
|
return _this4["tab_".concat(index)] = el;
|
|
42243
42452
|
},
|
|
42244
42453
|
className: className,
|
|
42245
|
-
style:
|
|
42454
|
+
style: style,
|
|
42246
42455
|
role: "presentation"
|
|
42247
42456
|
}, content);
|
|
42248
42457
|
}
|
|
@@ -42302,7 +42511,10 @@ var TabView = /*#__PURE__*/function (_Component2) {
|
|
|
42302
42511
|
key: "createContent",
|
|
42303
42512
|
value: function createContent(tab, index) {
|
|
42304
42513
|
var selected = this.isSelected(index);
|
|
42305
|
-
|
|
42514
|
+
|
|
42515
|
+
var style = _objectSpread$b(_objectSpread$b({}, tab.props.contentStyle || {}), tab.props.style || {});
|
|
42516
|
+
|
|
42517
|
+
var className = classNames(tab.props.contentClassName, tab.props.className, 'p-tabview-panel', {
|
|
42306
42518
|
'p-hidden': !selected
|
|
42307
42519
|
});
|
|
42308
42520
|
var id = this.state.id + '_content_' + index;
|
|
@@ -42312,7 +42524,7 @@ var TabView = /*#__PURE__*/function (_Component2) {
|
|
|
42312
42524
|
"aria-labelledby": ariaLabelledBy,
|
|
42313
42525
|
"aria-hidden": !selected,
|
|
42314
42526
|
className: className,
|
|
42315
|
-
style:
|
|
42527
|
+
style: style,
|
|
42316
42528
|
role: "tabpanel"
|
|
42317
42529
|
}, !this.props.renderActiveOnly ? tab.props.children : selected && tab.props.children);
|
|
42318
42530
|
}
|
|
@@ -42382,6 +42594,7 @@ _defineProperty(TabView, "defaultProps", {
|
|
|
42382
42594
|
className: null,
|
|
42383
42595
|
renderActiveOnly: true,
|
|
42384
42596
|
onTabChange: null,
|
|
42597
|
+
onTabClose: null,
|
|
42385
42598
|
scrollable: false
|
|
42386
42599
|
});
|
|
42387
42600
|
|
|
@@ -42931,7 +43144,7 @@ var TieredMenu = /*#__PURE__*/function (_Component) {
|
|
|
42931
43144
|
|
|
42932
43145
|
if (!this.documentResizeListener) {
|
|
42933
43146
|
this.documentResizeListener = function (event) {
|
|
42934
|
-
if (_this5.state.visible && !DomHandler.
|
|
43147
|
+
if (_this5.state.visible && !DomHandler.isTouchDevice()) {
|
|
42935
43148
|
_this5.hide(event);
|
|
42936
43149
|
}
|
|
42937
43150
|
};
|
|
@@ -45490,7 +45703,7 @@ var TreeSelect = /*#__PURE__*/function (_Component) {
|
|
|
45490
45703
|
|
|
45491
45704
|
if (!this.resizeListener) {
|
|
45492
45705
|
this.resizeListener = function () {
|
|
45493
|
-
if (_this4.state.overlayVisible && !DomHandler.
|
|
45706
|
+
if (_this4.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
45494
45707
|
_this4.hide();
|
|
45495
45708
|
}
|
|
45496
45709
|
};
|
|
@@ -49534,17 +49747,24 @@ var BlockUI = /*#__PURE__*/function (_Component) {
|
|
|
49534
49747
|
value: function unblock() {
|
|
49535
49748
|
var _this2 = this;
|
|
49536
49749
|
|
|
49537
|
-
|
|
49538
|
-
this.mask.addEventListener('animationend', function () {
|
|
49539
|
-
ZIndexUtils.clear(_this2.mask);
|
|
49540
|
-
|
|
49750
|
+
var callback = function callback() {
|
|
49541
49751
|
_this2.setState({
|
|
49542
49752
|
visible: false
|
|
49543
49753
|
}, function () {
|
|
49544
49754
|
_this2.props.fullScreen && DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
49545
49755
|
_this2.props.onUnblocked && _this2.props.onUnblocked();
|
|
49546
49756
|
});
|
|
49547
|
-
}
|
|
49757
|
+
};
|
|
49758
|
+
|
|
49759
|
+
if (this.mask) {
|
|
49760
|
+
DomHandler.addClass(this.mask, 'p-component-overlay-leave');
|
|
49761
|
+
this.mask.addEventListener('animationend', function () {
|
|
49762
|
+
ZIndexUtils.clear(_this2.mask);
|
|
49763
|
+
callback();
|
|
49764
|
+
});
|
|
49765
|
+
} else {
|
|
49766
|
+
callback();
|
|
49767
|
+
}
|
|
49548
49768
|
}
|
|
49549
49769
|
}, {
|
|
49550
49770
|
key: "onPortalMounted",
|
|
@@ -50476,7 +50696,7 @@ var Mention = /*#__PURE__*/function (_Component) {
|
|
|
50476
50696
|
|
|
50477
50697
|
if (!this.resizeListener) {
|
|
50478
50698
|
this.resizeListener = function () {
|
|
50479
|
-
if (_this8.state.overlayVisible && !DomHandler.
|
|
50699
|
+
if (_this8.state.overlayVisible && !DomHandler.isTouchDevice()) {
|
|
50480
50700
|
_this8.hideOverlay();
|
|
50481
50701
|
}
|
|
50482
50702
|
};
|