primereact 10.3.2 → 10.4.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/accordion/accordion.cjs.js +1 -1
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +1 -1
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +1 -1
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +20 -0
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +5 -1
- package/api/api.esm.js +20 -0
- package/api/api.esm.min.js +1 -1
- package/api/api.js +20 -0
- package/api/api.min.js +1 -1
- package/calendar/calendar.cjs.js +509 -150
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +4 -0
- package/calendar/calendar.esm.js +510 -151
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +509 -150
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +1 -0
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +1 -0
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +1 -0
- package/carousel/carousel.min.js +1 -1
- package/chips/chips.cjs.js +2 -1
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +2 -1
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +2 -1
- package/chips/chips.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +4 -4
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +4 -4
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +4 -4
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +93 -40
- package/core/core.min.js +4 -4
- package/datatable/datatable.cjs.js +577 -150
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +573 -146
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +577 -150
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +27 -25
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.d.ts +7 -1
- package/dataview/dataview.esm.js +27 -25
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +27 -25
- package/dataview/dataview.min.js +1 -1
- package/divider/divider.cjs.js +2 -2
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +2 -2
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +2 -2
- package/divider/divider.min.js +1 -1
- package/dropdown/dropdown.cjs.js +20 -25
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +9 -0
- package/dropdown/dropdown.esm.js +20 -25
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +20 -25
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +1 -1
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +1 -1
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +1 -1
- package/editor/editor.min.js +1 -1
- package/focustrap/focustrap.cjs.js +168 -0
- package/focustrap/focustrap.cjs.min.js +1 -0
- package/focustrap/focustrap.esm.js +159 -0
- package/focustrap/focustrap.esm.min.js +1 -0
- package/focustrap/focustrap.js +167 -0
- package/focustrap/focustrap.min.js +1 -0
- package/focustrap/package.json +7 -0
- package/galleria/galleria.cjs.js +26 -24
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +26 -24
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +26 -24
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.d.ts +1 -1
- package/menubar/menubar.cjs.js +7 -4
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +7 -4
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +7 -4
- package/menubar/menubar.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +20 -0
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +20 -0
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +20 -0
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +32 -21
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +32 -21
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +32 -21
- package/panelmenu/panelmenu.min.js +1 -1
- package/picklist/picklist.cjs.js +20 -0
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +20 -0
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +20 -0
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +1499 -725
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +1499 -725
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +1499 -725
- package/primereact.all.min.js +1 -1
- package/sidebar/sidebar.cjs.js +18 -16
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +18 -16
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +18 -16
- package/sidebar/sidebar.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +8 -7
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +8 -7
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +8 -7
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +57 -12
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +13 -1
- package/splitter/splitter.esm.js +59 -14
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +57 -12
- package/splitter/splitter.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +8 -7
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +8 -7
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +8 -7
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.cjs.js +20 -0
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +20 -0
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +20 -0
- package/toast/toast.min.js +1 -1
- package/tree/tree.cjs.js +33 -15
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +34 -16
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +33 -15
- package/tree/tree.min.js +1 -1
- package/treetable/treetable.cjs.js +205 -68
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +206 -69
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +205 -68
- package/treetable/treetable.min.js +1 -1
- package/web-types.json +34 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var PrimeReact = require('primereact/api');
|
|
7
|
+
var PrimeReact$1 = require('primereact/api');
|
|
8
8
|
var componentbase = require('primereact/componentbase');
|
|
9
9
|
var utils = require('primereact/utils');
|
|
10
10
|
var hooks = require('primereact/hooks');
|
|
@@ -56,7 +56,8 @@ function _interopNamespace(e) {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
59
|
-
var
|
|
59
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
60
|
+
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact$1);
|
|
60
61
|
|
|
61
62
|
function _extends() {
|
|
62
63
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -277,9 +278,9 @@ var ColumnBase = componentbase.ComponentBase.extend({
|
|
|
277
278
|
}
|
|
278
279
|
});
|
|
279
280
|
|
|
280
|
-
function ownKeys$
|
|
281
|
-
function _objectSpread$
|
|
282
|
-
var styles = "\n@layer primereact {\n .p-datatable {\n position: relative;\n }\n\n .p-datatable > .p-datatable-wrapper {\n overflow: auto;\n }\n\n .p-datatable-table {\n border-spacing: 0px;\n width: 100%;\n }\n\n .p-datatable .p-sortable-disabled {\n cursor: auto;\n }\n\n .p-datatable .p-sortable-column {\n cursor: pointer;\n user-select: none;\n }\n\n .p-datatable .p-sortable-column .p-column-title,\n .p-datatable .p-sortable-column .p-sortable-column-icon,\n .p-datatable .p-sortable-column .p-sortable-column-badge {\n vertical-align: middle;\n }\n\n .p-datatable .p-sortable-column .p-sortable-column-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n\n .p-datatable-selectable .p-selectable-row,\n .p-datatable-selectable-cell .p-selectable-cell {\n cursor: pointer;\n }\n\n .p-datatable-drag-selection-helper {\n position: absolute;\n z-index: 99999999;\n }\n\n /* Scrollable */\n .p-datatable-scrollable > .p-datatable-wrapper {\n position: relative;\n }\n\n .p-datatable-scrollable-table > .p-datatable-thead {\n position: sticky;\n top: 0;\n z-index: 1;\n }\n\n .p-datatable-scrollable-table > .p-datatable-frozen-tbody {\n position: sticky;\n z-index: 1;\n }\n\n .p-datatable-scrollable-table > .p-datatable-tfoot {\n position: sticky;\n bottom: 0;\n z-index: 1;\n }\n\n .p-datatable-scrollable .p-frozen-column {\n position: sticky;\n background: inherit;\n }\n\n .p-datatable-scrollable th.p-frozen-column {\n z-index: 1;\n }\n\n .p-datatable-flex-scrollable {\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n .p-datatable-flex-scrollable > .p-datatable-wrapper {\n display: flex;\n flex-direction: column;\n flex: 1;\n height: 100%;\n }\n\n .p-datatable-scrollable-table > .p-datatable-tbody > .p-rowgroup-header {\n position: sticky;\n z-index: 1;\n }\n\n /* Resizable */\n .p-datatable-resizable-table > .p-datatable-thead > tr > th,\n .p-datatable-resizable-table > .p-datatable-tfoot > tr > td,\n .p-datatable-resizable-table > .p-datatable-tbody > tr > td {\n overflow: hidden;\n white-space: nowrap;\n }\n\n .p-datatable-resizable-table > .p-datatable-thead > tr > th.p-resizable-column:not(.p-frozen-column) {\n background-clip: padding-box;\n position: relative;\n }\n\n .p-datatable-resizable-table-fit > .p-datatable-thead > tr > th.p-resizable-column:last-child .p-column-resizer {\n display: none;\n }\n\n .p-datatable .p-column-resizer {\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n margin: 0;\n width: 0.5rem;\n height: 100%;\n padding: 0px;\n cursor: col-resize;\n border: 1px solid transparent;\n }\n\n .p-datatable .p-column-header-content {\n display: flex;\n align-items: center;\n }\n\n .p-datatable .p-column-resizer-helper {\n width: 1px;\n position: absolute;\n z-index: 10;\n display: none;\n }\n\n .p-datatable .p-row-editor-init,\n .p-datatable .p-row-editor-save,\n .p-datatable .p-row-editor-cancel {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n\n /* Expand */\n .p-datatable .p-row-toggler {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n\n /* Reorder */\n .p-datatable-reorder-indicator-up,\n .p-datatable-reorder-indicator-down {\n position: absolute;\n display: none;\n }\n\n .p-reorderable-column,\n .p-datatable-reorderablerow-handle {\n cursor: move;\n }\n\n /* Loader */\n .p-datatable .p-datatable-loading-overlay {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2;\n }\n\n /* Filter */\n .p-column-filter-row {\n display: flex;\n align-items: center;\n width: 100%;\n }\n\n .p-column-filter-menu {\n display: inline-flex;\n margin-left: auto;\n }\n\n .p-column-filter-row .p-column-filter-element {\n flex: 1 1 auto;\n width: 1%;\n }\n\n .p-column-filter-menu-button,\n .p-column-filter-clear-button {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n\n .p-column-filter-overlay {\n position: absolute;\n top: 0;\n left: 0;\n }\n\n .p-column-filter-row-items {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .p-column-filter-row-item {\n cursor: pointer;\n }\n\n .p-column-filter-add-button,\n .p-column-filter-remove-button {\n justify-content: center;\n }\n\n .p-column-filter-add-button .p-button-label,\n .p-column-filter-remove-button .p-button-label {\n flex-grow: 0;\n }\n\n .p-column-filter-buttonbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .p-column-filter-buttonbar .p-button:not(.p-button-icon-only) {\n width: auto;\n }\n\n /* Responsive */\n .p-datatable .p-datatable-tbody > tr > td > .p-column-title {\n display: none;\n }\n\n /* VirtualScroller */\n .p-datatable-virtualscroller-spacer {\n display: flex;\n }\n\n .p-datatable .p-virtualscroller .p-virtualscroller-loading {\n transform: none;\n min-height: 0;\n position: sticky;\n top: 0;\n left: 0;\n }\n\n /* Alignment */\n .p-datatable .p-datatable-thead > tr > th.p-align-left > .p-column-header-content,\n .p-datatable .p-datatable-tbody > tr > td.p-align-left,\n .p-datatable .p-datatable-tfoot > tr > td.p-align-left {\n text-align: left;\n justify-content: flex-start;\n }\n\n .p-datatable .p-datatable-thead > tr > th.p-align-right > .p-column-header-content,\n .p-datatable .p-datatable-tbody > tr > td.p-align-right,\n .p-datatable .p-datatable-tfoot > tr > td.p-align-right {\n text-align: right;\n justify-content: flex-end;\n }\n\n .p-datatable .p-datatable-thead > tr > th.p-align-center > .p-column-header-content,\n .p-datatable .p-datatable-tbody > tr > td.p-align-center,\n .p-datatable .p-datatable-tfoot > tr > td.p-align-center {\n text-align: center;\n justify-content: center;\n }\n}\n";
|
|
281
|
+
function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
282
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
283
|
+
var styles$1 = "\n@layer primereact {\n .p-datatable {\n position: relative;\n }\n\n .p-datatable > .p-datatable-wrapper {\n overflow: auto;\n }\n\n .p-datatable-table {\n border-spacing: 0px;\n width: 100%;\n }\n\n .p-datatable .p-sortable-disabled {\n cursor: auto;\n }\n\n .p-datatable .p-sortable-column {\n cursor: pointer;\n user-select: none;\n }\n\n .p-datatable .p-sortable-column .p-column-title,\n .p-datatable .p-sortable-column .p-sortable-column-icon,\n .p-datatable .p-sortable-column .p-sortable-column-badge {\n vertical-align: middle;\n }\n\n .p-datatable .p-sortable-column .p-sortable-column-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n\n .p-datatable-selectable .p-selectable-row,\n .p-datatable-selectable-cell .p-selectable-cell {\n cursor: pointer;\n }\n\n .p-datatable-drag-selection-helper {\n position: absolute;\n z-index: 99999999;\n }\n\n /* Scrollable */\n .p-datatable-scrollable > .p-datatable-wrapper {\n position: relative;\n }\n\n .p-datatable-scrollable-table > .p-datatable-thead {\n position: sticky;\n top: 0;\n z-index: 1;\n }\n\n .p-datatable-scrollable-table > .p-datatable-frozen-tbody {\n position: sticky;\n z-index: 1;\n }\n\n .p-datatable-scrollable-table > .p-datatable-tfoot {\n position: sticky;\n bottom: 0;\n z-index: 1;\n }\n\n .p-datatable-scrollable .p-frozen-column {\n position: sticky;\n background: inherit;\n }\n\n .p-datatable-scrollable th.p-frozen-column {\n z-index: 1;\n }\n\n .p-datatable-flex-scrollable {\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n .p-datatable-flex-scrollable > .p-datatable-wrapper {\n display: flex;\n flex-direction: column;\n flex: 1;\n height: 100%;\n }\n\n .p-datatable-scrollable-table > .p-datatable-tbody > .p-rowgroup-header {\n position: sticky;\n z-index: 1;\n }\n\n /* Resizable */\n .p-datatable-resizable-table > .p-datatable-thead > tr > th,\n .p-datatable-resizable-table > .p-datatable-tfoot > tr > td,\n .p-datatable-resizable-table > .p-datatable-tbody > tr > td {\n overflow: hidden;\n white-space: nowrap;\n }\n\n .p-datatable-resizable-table > .p-datatable-thead > tr > th.p-resizable-column:not(.p-frozen-column) {\n background-clip: padding-box;\n position: relative;\n }\n\n .p-datatable-resizable-table-fit > .p-datatable-thead > tr > th.p-resizable-column:last-child .p-column-resizer {\n display: none;\n }\n\n .p-datatable .p-column-resizer {\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n margin: 0;\n width: 0.5rem;\n height: 100%;\n padding: 0px;\n cursor: col-resize;\n border: 1px solid transparent;\n }\n\n .p-datatable .p-column-header-content {\n display: flex;\n align-items: center;\n }\n\n .p-datatable .p-column-resizer-helper {\n width: 1px;\n position: absolute;\n z-index: 10;\n display: none;\n }\n\n .p-datatable .p-row-editor-init,\n .p-datatable .p-row-editor-save,\n .p-datatable .p-row-editor-cancel {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n\n /* Expand */\n .p-datatable .p-row-toggler {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n\n /* Reorder */\n .p-datatable-reorder-indicator-up,\n .p-datatable-reorder-indicator-down {\n position: absolute;\n display: none;\n }\n\n .p-reorderable-column,\n .p-datatable-reorderablerow-handle {\n cursor: move;\n }\n\n /* Loader */\n .p-datatable .p-datatable-loading-overlay {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2;\n }\n\n /* Filter */\n .p-column-filter-row {\n display: flex;\n align-items: center;\n width: 100%;\n }\n\n .p-column-filter-menu {\n display: inline-flex;\n margin-left: auto;\n }\n\n .p-column-filter-row .p-column-filter-element {\n flex: 1 1 auto;\n width: 1%;\n }\n\n .p-column-filter-menu-button,\n .p-column-filter-clear-button {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n\n .p-column-filter-overlay {\n position: absolute;\n top: 0;\n left: 0;\n }\n\n .p-column-filter-row-items {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .p-column-filter-row-item {\n cursor: pointer;\n }\n\n .p-column-filter-add-button,\n .p-column-filter-remove-button {\n justify-content: center;\n }\n\n .p-column-filter-add-button .p-button-label,\n .p-column-filter-remove-button .p-button-label {\n flex-grow: 0;\n }\n\n .p-column-filter-buttonbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .p-column-filter-buttonbar .p-button:not(.p-button-icon-only) {\n width: auto;\n }\n\n /* Responsive */\n .p-datatable .p-datatable-tbody > tr > td > .p-column-title {\n display: none;\n }\n\n /* VirtualScroller */\n .p-datatable-virtualscroller-spacer {\n display: flex;\n }\n\n .p-datatable .p-virtualscroller .p-virtualscroller-loading {\n transform: none;\n min-height: 0;\n position: sticky;\n top: 0;\n left: 0;\n }\n\n /* Alignment */\n .p-datatable .p-datatable-thead > tr > th.p-align-left > .p-column-header-content,\n .p-datatable .p-datatable-tbody > tr > td.p-align-left,\n .p-datatable .p-datatable-tfoot > tr > td.p-align-left {\n text-align: left;\n justify-content: flex-start;\n }\n\n .p-datatable .p-datatable-thead > tr > th.p-align-right > .p-column-header-content,\n .p-datatable .p-datatable-tbody > tr > td.p-align-right,\n .p-datatable .p-datatable-tfoot > tr > td.p-align-right {\n text-align: right;\n justify-content: flex-end;\n }\n\n .p-datatable .p-datatable-thead > tr > th.p-align-center > .p-column-header-content,\n .p-datatable .p-datatable-tbody > tr > td.p-align-center,\n .p-datatable .p-datatable-tfoot > tr > td.p-align-center {\n text-align: center;\n justify-content: center;\n }\n}\n";
|
|
283
284
|
var classes = {
|
|
284
285
|
root: function root(_ref) {
|
|
285
286
|
var props = _ref.props,
|
|
@@ -517,11 +518,11 @@ var inlineStyles = {
|
|
|
517
518
|
},
|
|
518
519
|
reorderIndicatorUp: function reorderIndicatorUp(_ref20) {
|
|
519
520
|
var style = _ref20.style;
|
|
520
|
-
return _objectSpread$
|
|
521
|
+
return _objectSpread$c({}, style);
|
|
521
522
|
},
|
|
522
523
|
reorderIndicatorDown: function reorderIndicatorDown(_ref21) {
|
|
523
524
|
var style = _ref21.style;
|
|
524
|
-
return _objectSpread$
|
|
525
|
+
return _objectSpread$c({}, style);
|
|
525
526
|
}
|
|
526
527
|
};
|
|
527
528
|
var DataTableBase = componentbase.ComponentBase.extend({
|
|
@@ -566,7 +567,7 @@ var DataTableBase = componentbase.ComponentBase.extend({
|
|
|
566
567
|
frozenWidth: null,
|
|
567
568
|
globalFilter: null,
|
|
568
569
|
globalFilterFields: null,
|
|
569
|
-
globalFilterMatchMode: PrimeReact.FilterMatchMode.CONTAINS,
|
|
570
|
+
globalFilterMatchMode: PrimeReact$1.FilterMatchMode.CONTAINS,
|
|
570
571
|
groupRowsBy: null,
|
|
571
572
|
header: null,
|
|
572
573
|
headerColumnGroup: null,
|
|
@@ -672,7 +673,7 @@ var DataTableBase = componentbase.ComponentBase.extend({
|
|
|
672
673
|
children: undefined
|
|
673
674
|
},
|
|
674
675
|
css: {
|
|
675
|
-
styles: styles,
|
|
676
|
+
styles: styles$1,
|
|
676
677
|
classes: classes,
|
|
677
678
|
inlineStyles: inlineStyles
|
|
678
679
|
}
|
|
@@ -707,8 +708,8 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
707
708
|
return target;
|
|
708
709
|
}
|
|
709
710
|
|
|
710
|
-
function ownKeys$
|
|
711
|
-
function _objectSpread$
|
|
711
|
+
function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
712
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
712
713
|
var RowCheckbox = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
713
714
|
var _React$useState = React__namespace.useState(false),
|
|
714
715
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -764,7 +765,7 @@ var RowCheckbox = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
764
765
|
className: cx('checkboxIcon')
|
|
765
766
|
}, getColumnPTOptions('checkboxIcon'));
|
|
766
767
|
var icon = props.checked ? props.checkIcon || /*#__PURE__*/React__namespace.createElement(check.CheckIcon, checkboxIconProps) : null;
|
|
767
|
-
var checkIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread$
|
|
768
|
+
var checkIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread$b({}, checkboxIconProps), {
|
|
768
769
|
props: props
|
|
769
770
|
});
|
|
770
771
|
var tabIndex = props.disabled ? null : '0';
|
|
@@ -902,8 +903,8 @@ var RowRadioButton = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
902
903
|
});
|
|
903
904
|
RowRadioButton.displayName = 'RowRadioButton';
|
|
904
905
|
|
|
905
|
-
function ownKeys$
|
|
906
|
-
function _objectSpread$
|
|
906
|
+
function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
907
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
907
908
|
var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
908
909
|
var mergeProps = hooks.useMergeProps();
|
|
909
910
|
var _React$useState = React__namespace.useState(props.editing),
|
|
@@ -1010,7 +1011,7 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1010
1011
|
};
|
|
1011
1012
|
var getCellCallbackParams = function getCellCallbackParams(event) {
|
|
1012
1013
|
var params = getCellParams();
|
|
1013
|
-
return _objectSpread$
|
|
1014
|
+
return _objectSpread$a({
|
|
1014
1015
|
originalEvent: event
|
|
1015
1016
|
}, params);
|
|
1016
1017
|
};
|
|
@@ -1049,7 +1050,7 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1049
1050
|
setEditingRowDataState(function (prev) {
|
|
1050
1051
|
var newRowData = prev;
|
|
1051
1052
|
var newValue = resolveFieldData(newRowData);
|
|
1052
|
-
var params = _objectSpread$
|
|
1053
|
+
var params = _objectSpread$a(_objectSpread$a({}, callbackParams), {}, {
|
|
1053
1054
|
newRowData: newRowData,
|
|
1054
1055
|
newValue: newValue
|
|
1055
1056
|
});
|
|
@@ -1119,7 +1120,7 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1119
1120
|
};
|
|
1120
1121
|
var updateStickyPosition = function updateStickyPosition() {
|
|
1121
1122
|
if (getColumnProp('frozen')) {
|
|
1122
|
-
var styleObject = _objectSpread$
|
|
1123
|
+
var styleObject = _objectSpread$a({}, styleObjectState);
|
|
1123
1124
|
var align = getColumnProp('alignFrozen');
|
|
1124
1125
|
if (align === 'right') {
|
|
1125
1126
|
var right = 0;
|
|
@@ -1141,7 +1142,7 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1141
1142
|
}
|
|
1142
1143
|
};
|
|
1143
1144
|
var editorCallback = function editorCallback(val) {
|
|
1144
|
-
var editingRowData = _objectSpread$
|
|
1145
|
+
var editingRowData = _objectSpread$a({}, editingRowDataState);
|
|
1145
1146
|
utils.ObjectUtils.mutateFieldData(editingRowData, field, val);
|
|
1146
1147
|
setEditingRowDataState(editingRowData);
|
|
1147
1148
|
|
|
@@ -1348,7 +1349,7 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1348
1349
|
React__namespace.useEffect(function () {
|
|
1349
1350
|
if (props.editMode === 'cell' || props.editMode === 'row') {
|
|
1350
1351
|
var callbackParams = getCellCallbackParams();
|
|
1351
|
-
var params = _objectSpread$
|
|
1352
|
+
var params = _objectSpread$a(_objectSpread$a({}, callbackParams), {}, {
|
|
1352
1353
|
editing: editingState,
|
|
1353
1354
|
editingKey: editingKey
|
|
1354
1355
|
});
|
|
@@ -1373,7 +1374,9 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1373
1374
|
field: field
|
|
1374
1375
|
});
|
|
1375
1376
|
var content = utils.ObjectUtils.getJSXElement(getVirtualScrollerOption('loadingTemplate'), options);
|
|
1376
|
-
var bodyCellProps = mergeProps(getColumnPTOptions('bodyCell')
|
|
1377
|
+
var bodyCellProps = mergeProps(getColumnPTOptions('bodyCell'), {
|
|
1378
|
+
role: 'cell'
|
|
1379
|
+
});
|
|
1377
1380
|
return /*#__PURE__*/React__namespace.createElement("td", bodyCellProps, content);
|
|
1378
1381
|
};
|
|
1379
1382
|
var createElement = function createElement() {
|
|
@@ -1416,7 +1419,7 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1416
1419
|
if (showSelection) {
|
|
1417
1420
|
var ariaLabelField = props.selectionAriaLabel || props.tableProps.dataKey;
|
|
1418
1421
|
var ariaLabelText = utils.ObjectUtils.resolveFieldData(props.rowData, ariaLabelField);
|
|
1419
|
-
label = "".concat(props.selected ? PrimeReact.ariaLabel('unselectLabel') : PrimeReact.ariaLabel('selectLabel'), " ").concat(ariaLabelText);
|
|
1422
|
+
label = "".concat(props.selected ? PrimeReact$1.ariaLabel('unselectLabel') : PrimeReact$1.ariaLabel('selectLabel'), " ").concat(ariaLabelText);
|
|
1420
1423
|
}
|
|
1421
1424
|
content = showSelection && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, selectionMode === 'single' && /*#__PURE__*/React__namespace.createElement(RowRadioButton, {
|
|
1422
1425
|
hostName: props.hostName,
|
|
@@ -1456,7 +1459,7 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1456
1459
|
className: cx('rowReorderIcon')
|
|
1457
1460
|
}, getColumnPTOptions('rowReorderIcon'));
|
|
1458
1461
|
var rowReorderIcon = getColumnProp('rowReorderIcon') || /*#__PURE__*/React__namespace.createElement(bars.BarsIcon, rowReorderIconProps);
|
|
1459
|
-
content = showReorder ? utils.IconUtils.getJSXIcon(rowReorderIcon, _objectSpread$
|
|
1462
|
+
content = showReorder ? utils.IconUtils.getJSXIcon(rowReorderIcon, _objectSpread$a({}, rowReorderIconProps), {
|
|
1460
1463
|
props: props
|
|
1461
1464
|
}) : null;
|
|
1462
1465
|
} else if (expander) {
|
|
@@ -1465,18 +1468,18 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1465
1468
|
'aria-hidden': true
|
|
1466
1469
|
}, getColumnPTOptions('rowTogglerIcon'));
|
|
1467
1470
|
var icon = props.expanded ? props.expandedRowIcon || /*#__PURE__*/React__namespace.createElement(chevrondown.ChevronDownIcon, rowTogglerIconProps) : props.collapsedRowIcon || /*#__PURE__*/React__namespace.createElement(chevronright.ChevronRightIcon, rowTogglerIconProps);
|
|
1468
|
-
var togglerIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread$
|
|
1471
|
+
var togglerIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread$a({}, rowTogglerIconProps), {
|
|
1469
1472
|
props: props
|
|
1470
1473
|
});
|
|
1471
1474
|
var ariaControls = "".concat(props.tableSelector, "_content_").concat(props.rowIndex, "_expanded");
|
|
1472
1475
|
var _ariaLabelField = props.selectionAriaLabel || props.tableProps.dataKey;
|
|
1473
1476
|
var _ariaLabelText = utils.ObjectUtils.resolveFieldData(props.rowData, _ariaLabelField);
|
|
1474
|
-
var _label = "".concat(props.expanded ? PrimeReact.ariaLabel('collapseLabel') : PrimeReact.ariaLabel('expandLabel'), " ").concat(_ariaLabelText);
|
|
1477
|
+
var _label = "".concat(props.expanded ? PrimeReact$1.ariaLabel('collapseLabel') : PrimeReact$1.ariaLabel('expandLabel'), " ").concat(_ariaLabelText);
|
|
1475
1478
|
var expanderProps = {
|
|
1476
1479
|
onClick: onRowToggle,
|
|
1477
1480
|
className: cx('rowToggler')
|
|
1478
1481
|
};
|
|
1479
|
-
var rowTogglerProps = mergeProps(_objectSpread$
|
|
1482
|
+
var rowTogglerProps = mergeProps(_objectSpread$a(_objectSpread$a({}, expanderProps), {}, {
|
|
1480
1483
|
type: 'button',
|
|
1481
1484
|
'aria-expanded': props.expanded,
|
|
1482
1485
|
'aria-controls': ariaControls,
|
|
@@ -1506,13 +1509,13 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1506
1509
|
var rowEditorInitIconProps = mergeProps({
|
|
1507
1510
|
className: cx('rowEditorInitIcon')
|
|
1508
1511
|
}, getColumnPTOptions('rowEditorInitIcon'));
|
|
1509
|
-
var rowEditorSaveIcon = utils.IconUtils.getJSXIcon(props.rowEditorSaveIcon || /*#__PURE__*/React__namespace.createElement(check.CheckIcon, rowEditorSaveIconProps), _objectSpread$
|
|
1512
|
+
var rowEditorSaveIcon = utils.IconUtils.getJSXIcon(props.rowEditorSaveIcon || /*#__PURE__*/React__namespace.createElement(check.CheckIcon, rowEditorSaveIconProps), _objectSpread$a({}, rowEditorSaveIconProps), {
|
|
1510
1513
|
props: props
|
|
1511
1514
|
});
|
|
1512
|
-
var rowEditorCancelIcon = utils.IconUtils.getJSXIcon(props.rowEditorCancelIcon || /*#__PURE__*/React__namespace.createElement(times.TimesIcon, rowEditorCancelIconProps), _objectSpread$
|
|
1515
|
+
var rowEditorCancelIcon = utils.IconUtils.getJSXIcon(props.rowEditorCancelIcon || /*#__PURE__*/React__namespace.createElement(times.TimesIcon, rowEditorCancelIconProps), _objectSpread$a({}, rowEditorCancelIconProps), {
|
|
1513
1516
|
props: props
|
|
1514
1517
|
});
|
|
1515
|
-
var rowEditorInitIcon = utils.IconUtils.getJSXIcon(props.rowEditorInitIcon || /*#__PURE__*/React__namespace.createElement(pencil.PencilIcon, rowEditorInitIconProps), _objectSpread$
|
|
1518
|
+
var rowEditorInitIcon = utils.IconUtils.getJSXIcon(props.rowEditorInitIcon || /*#__PURE__*/React__namespace.createElement(pencil.PencilIcon, rowEditorInitIconProps), _objectSpread$a({}, rowEditorInitIconProps), {
|
|
1516
1519
|
props: props
|
|
1517
1520
|
});
|
|
1518
1521
|
if (editingState) {
|
|
@@ -1523,21 +1526,22 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1523
1526
|
onCancelClick: onRowEditCancel,
|
|
1524
1527
|
cancelClassName: cx('rowEditorCancelButton')
|
|
1525
1528
|
};
|
|
1526
|
-
var rowEditorSaveButtonProps = mergeProps({
|
|
1529
|
+
var rowEditorSaveButtonProps = mergeProps(_defineProperty(_defineProperty({
|
|
1527
1530
|
type: 'button',
|
|
1528
1531
|
name: 'row-save',
|
|
1532
|
+
'aria-label': PrimeReact$1.ariaLabel('saveEdit'),
|
|
1529
1533
|
onClick: rowEditorProps.onSaveClick,
|
|
1530
1534
|
className: rowEditorProps.saveClassName,
|
|
1531
|
-
tabIndex: props.tabIndex
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
var rowEditorCancelButtonProps = mergeProps({
|
|
1535
|
+
tabIndex: props.tabIndex
|
|
1536
|
+
}, "aria-label", PrimeReact$1.ariaLabel('saveEdit')), 'data-p-row-editor-save', true), getColumnPTOptions('rowEditorSaveButton'));
|
|
1537
|
+
var rowEditorCancelButtonProps = mergeProps(_defineProperty({
|
|
1535
1538
|
type: 'button',
|
|
1536
1539
|
name: 'row-cancel',
|
|
1540
|
+
'aria-label': PrimeReact$1.ariaLabel('cancelEdit'),
|
|
1537
1541
|
onClick: rowEditorProps.onCancelClick,
|
|
1538
1542
|
className: rowEditorProps.cancelClassName,
|
|
1539
1543
|
tabIndex: props.tabIndex
|
|
1540
|
-
}, getColumnPTOptions('rowEditorCancelButton'));
|
|
1544
|
+
}, "aria-label", PrimeReact$1.ariaLabel('cancelEdit')), getColumnPTOptions('rowEditorCancelButton'));
|
|
1541
1545
|
content = /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("button", rowEditorSaveButtonProps, rowEditorSaveIcon, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null)), /*#__PURE__*/React__namespace.createElement("button", rowEditorCancelButtonProps, rowEditorCancelIcon, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null)));
|
|
1542
1546
|
} else {
|
|
1543
1547
|
rowEditorProps = {
|
|
@@ -1545,14 +1549,14 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1545
1549
|
onInitClick: onRowEditInit,
|
|
1546
1550
|
initClassName: cx('rowEditorInitButton')
|
|
1547
1551
|
};
|
|
1548
|
-
var rowEditorInitButtonProps = mergeProps({
|
|
1552
|
+
var rowEditorInitButtonProps = mergeProps(_defineProperty(_defineProperty({
|
|
1549
1553
|
type: 'button',
|
|
1550
1554
|
name: 'row-edit',
|
|
1555
|
+
'aria-label': PrimeReact$1.ariaLabel('editRow'),
|
|
1551
1556
|
onClick: rowEditorProps.onInitClick,
|
|
1552
1557
|
className: rowEditorProps.initClassName,
|
|
1553
|
-
tabIndex: props.tabIndex
|
|
1554
|
-
|
|
1555
|
-
}, getColumnPTOptions('rowEditorInitButton'));
|
|
1558
|
+
tabIndex: props.tabIndex
|
|
1559
|
+
}, "aria-label", PrimeReact$1.ariaLabel('editRow')), 'data-p-row-editor-init', true), getColumnPTOptions('rowEditorInitButton'));
|
|
1556
1560
|
content = /*#__PURE__*/React__namespace.createElement("button", rowEditorInitButtonProps, rowEditorInitIcon, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
1557
1561
|
}
|
|
1558
1562
|
if (body) {
|
|
@@ -1652,8 +1656,8 @@ var BodyCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1652
1656
|
});
|
|
1653
1657
|
BodyCell.displayName = 'BodyCell';
|
|
1654
1658
|
|
|
1655
|
-
function ownKeys$
|
|
1656
|
-
function _objectSpread$
|
|
1659
|
+
function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1660
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1657
1661
|
var BodyRow = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
1658
1662
|
var mergeProps = hooks.useMergeProps();
|
|
1659
1663
|
var _React$useState = React__namespace.useState(false),
|
|
@@ -1712,6 +1716,10 @@ var BodyRow = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1712
1716
|
nextRow.tabIndex = props.tabIndex;
|
|
1713
1717
|
}
|
|
1714
1718
|
};
|
|
1719
|
+
var findFirstSelectableRow = function findFirstSelectableRow(row) {
|
|
1720
|
+
var firstRow = utils.DomHandler.findSingle(row.parentNode, 'tr[data-p-selectable-row]');
|
|
1721
|
+
return firstRow ? firstRow : null;
|
|
1722
|
+
};
|
|
1715
1723
|
var findNextSelectableRow = function findNextSelectableRow(row) {
|
|
1716
1724
|
var nextRow = row.nextElementSibling;
|
|
1717
1725
|
return nextRow ? utils.DomHandler.getAttribute(nextRow, 'data-p-selectable-row') === true ? nextRow : findNextSelectableRow(nextRow) : null;
|
|
@@ -1720,6 +1728,10 @@ var BodyRow = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1720
1728
|
var prevRow = row.previousElementSibling;
|
|
1721
1729
|
return prevRow ? utils.DomHandler.getAttribute(prevRow, 'data-p-selectable-row') === true ? prevRow : findPrevSelectableRow(prevRow) : null;
|
|
1722
1730
|
};
|
|
1731
|
+
var findLastSelectableRow = function findLastSelectableRow(row) {
|
|
1732
|
+
var lastRow = utils.DomHandler.findSingle(row.parentNode, 'tr[data-p-selectable-row]:last-child');
|
|
1733
|
+
return lastRow ? lastRow : null;
|
|
1734
|
+
};
|
|
1723
1735
|
var shouldRenderBodyCell = function shouldRenderBodyCell(value, column, i) {
|
|
1724
1736
|
if (getColumnProp(column, 'hidden')) {
|
|
1725
1737
|
return false;
|
|
@@ -1808,46 +1820,90 @@ var BodyRow = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1808
1820
|
if (isFocusable() && !props.allowCellSelection) {
|
|
1809
1821
|
var target = event.target,
|
|
1810
1822
|
row = event.currentTarget;
|
|
1811
|
-
switch (event.
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
var nextRow = findNextSelectableRow(row);
|
|
1815
|
-
if (nextRow) {
|
|
1816
|
-
changeTabIndex(row, nextRow);
|
|
1817
|
-
nextRow.focus();
|
|
1818
|
-
}
|
|
1819
|
-
event.preventDefault();
|
|
1823
|
+
switch (event.code) {
|
|
1824
|
+
case 'ArrowDown':
|
|
1825
|
+
onArrowDownKey(row, event);
|
|
1820
1826
|
break;
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
case 38:
|
|
1824
|
-
var prevRow = findPrevSelectableRow(row);
|
|
1825
|
-
if (prevRow) {
|
|
1826
|
-
changeTabIndex(row, prevRow);
|
|
1827
|
-
prevRow.focus();
|
|
1828
|
-
}
|
|
1829
|
-
event.preventDefault();
|
|
1827
|
+
case 'ArrowUp':
|
|
1828
|
+
onArrowUpKey(row, event);
|
|
1830
1829
|
break;
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
case 13:
|
|
1834
|
-
// @deprecated
|
|
1835
|
-
if (!utils.DomHandler.isClickable(target)) {
|
|
1836
|
-
_onClick(event);
|
|
1837
|
-
event.preventDefault();
|
|
1838
|
-
}
|
|
1830
|
+
case 'Home':
|
|
1831
|
+
onHomeKey(row, event);
|
|
1839
1832
|
break;
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1833
|
+
case 'End':
|
|
1834
|
+
onEndKey(row, event);
|
|
1835
|
+
break;
|
|
1836
|
+
case 'Enter':
|
|
1837
|
+
onEnterKey(row, event, target);
|
|
1838
|
+
break;
|
|
1839
|
+
case 'Space':
|
|
1840
|
+
onSpaceKey(row, event, target);
|
|
1841
|
+
break;
|
|
1842
|
+
case 'Tab':
|
|
1843
|
+
onTabKey(row, event);
|
|
1847
1844
|
break;
|
|
1848
1845
|
}
|
|
1849
1846
|
}
|
|
1850
1847
|
};
|
|
1848
|
+
var onArrowDownKey = function onArrowDownKey(row, event) {
|
|
1849
|
+
var nextRow = findNextSelectableRow(row);
|
|
1850
|
+
if (nextRow) {
|
|
1851
|
+
changeTabIndex(row, nextRow);
|
|
1852
|
+
nextRow.focus();
|
|
1853
|
+
}
|
|
1854
|
+
event.preventDefault();
|
|
1855
|
+
};
|
|
1856
|
+
var onArrowUpKey = function onArrowUpKey(row, event) {
|
|
1857
|
+
var prevRow = findPrevSelectableRow(row);
|
|
1858
|
+
if (prevRow) {
|
|
1859
|
+
changeTabIndex(row, prevRow);
|
|
1860
|
+
prevRow.focus();
|
|
1861
|
+
}
|
|
1862
|
+
event.preventDefault();
|
|
1863
|
+
};
|
|
1864
|
+
var onHomeKey = function onHomeKey(row, event) {
|
|
1865
|
+
var firstRow = findFirstSelectableRow(row);
|
|
1866
|
+
if (firstRow) {
|
|
1867
|
+
changeTabIndex(row, firstRow);
|
|
1868
|
+
firstRow.focus();
|
|
1869
|
+
}
|
|
1870
|
+
event.preventDefault();
|
|
1871
|
+
};
|
|
1872
|
+
var onEndKey = function onEndKey(row, event) {
|
|
1873
|
+
var lastRow = findLastSelectableRow(row);
|
|
1874
|
+
if (lastRow) {
|
|
1875
|
+
changeTabIndex(row, lastRow);
|
|
1876
|
+
lastRow.focus();
|
|
1877
|
+
}
|
|
1878
|
+
event.preventDefault();
|
|
1879
|
+
};
|
|
1880
|
+
var onEnterKey = function onEnterKey(row, event, target) {
|
|
1881
|
+
if (!utils.DomHandler.isClickable(target)) {
|
|
1882
|
+
_onClick(event);
|
|
1883
|
+
event.preventDefault();
|
|
1884
|
+
}
|
|
1885
|
+
};
|
|
1886
|
+
var onSpaceKey = function onSpaceKey(row, event, target) {
|
|
1887
|
+
if (!utils.DomHandler.isClickable(target) && !target.readOnly) {
|
|
1888
|
+
_onClick(event);
|
|
1889
|
+
event.preventDefault();
|
|
1890
|
+
}
|
|
1891
|
+
};
|
|
1892
|
+
var onTabKey = function onTabKey(row, event) {
|
|
1893
|
+
var parent = row.parentNode;
|
|
1894
|
+
var rows = utils.DomHandler.find(parent, 'tr[data-p-selectable-row="true"]');
|
|
1895
|
+
if (event.code === 'Tab' && rows && rows.length > 0) {
|
|
1896
|
+
var firstSelectedRow = utils.DomHandler.findSingle(parent, 'tr[data-p-highlight="true"]');
|
|
1897
|
+
var focusedItem = utils.DomHandler.findSingle(parent, 'tr[data-p-selectable-row="true"][tabindex="0"]');
|
|
1898
|
+
if (firstSelectedRow) {
|
|
1899
|
+
firstSelectedRow.tabIndex = '0';
|
|
1900
|
+
focusedItem && focusedItem !== firstSelectedRow && (focusedItem.tabIndex = '-1');
|
|
1901
|
+
} else {
|
|
1902
|
+
rows[0].tabIndex = '0';
|
|
1903
|
+
focusedItem !== rows[0] && (rows[rowIndex].tabIndex = '-1');
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
};
|
|
1851
1907
|
var _onMouseDown = function onMouseDown(event) {
|
|
1852
1908
|
props.onRowMouseDown({
|
|
1853
1909
|
originalEvent: event,
|
|
@@ -1907,7 +1963,7 @@ var BodyRow = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
1907
1963
|
newData = e.newData;
|
|
1908
1964
|
if (dataKey) {
|
|
1909
1965
|
var dataKeyValue = String(utils.ObjectUtils.resolveFieldData(data, dataKey));
|
|
1910
|
-
editingRows = props.editingRows ? _objectSpread$
|
|
1966
|
+
editingRows = props.editingRows ? _objectSpread$9({}, props.editingRows) : {};
|
|
1911
1967
|
if (!isEditing) {
|
|
1912
1968
|
delete editingRows[dataKeyValue];
|
|
1913
1969
|
// if the key value was changed, stop editing for the new key value too
|
|
@@ -2099,6 +2155,7 @@ var BodyRow = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
2099
2155
|
onDrop: function onDrop(e) {
|
|
2100
2156
|
return _onDrop(e);
|
|
2101
2157
|
},
|
|
2158
|
+
'aria-selected': props !== null && props !== void 0 && props.selectionMode ? props.selected : null,
|
|
2102
2159
|
'data-p-selectable-row': props.allowRowSelection && props.isSelectable({
|
|
2103
2160
|
data: props.rowData,
|
|
2104
2161
|
index: props.rowIndex
|
|
@@ -2110,8 +2167,8 @@ var BodyRow = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
2110
2167
|
});
|
|
2111
2168
|
BodyRow.displayName = 'BodyRow';
|
|
2112
2169
|
|
|
2113
|
-
function ownKeys$
|
|
2114
|
-
function _objectSpread$
|
|
2170
|
+
function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2171
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2115
2172
|
var RowTogglerButton = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
2116
2173
|
var mergeProps = hooks.useMergeProps();
|
|
2117
2174
|
var _props$ptCallbacks = props.ptCallbacks,
|
|
@@ -2143,10 +2200,10 @@ var RowTogglerButton = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
2143
2200
|
'aria-hidden': true
|
|
2144
2201
|
}, getColumnPTOptions('rowGroupTogglerIcon'));
|
|
2145
2202
|
var icon = props.expanded ? props.expandedRowIcon || /*#__PURE__*/React__namespace.createElement(chevrondown.ChevronDownIcon, rowGroupTogglerIconProps) : props.collapsedRowIcon || /*#__PURE__*/React__namespace.createElement(chevronright.ChevronRightIcon, rowGroupTogglerIconProps);
|
|
2146
|
-
var togglerIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread$
|
|
2203
|
+
var togglerIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread$8({}, rowGroupTogglerIconProps), {
|
|
2147
2204
|
props: props
|
|
2148
2205
|
});
|
|
2149
|
-
var label = props.expanded ? PrimeReact.ariaLabel('collapseLabel') : PrimeReact.ariaLabel('expandLabel');
|
|
2206
|
+
var label = props.expanded ? PrimeReact$1.ariaLabel('collapseLabel') : PrimeReact$1.ariaLabel('expandLabel');
|
|
2150
2207
|
var rowGroupTogglerProps = mergeProps({
|
|
2151
2208
|
type: 'button',
|
|
2152
2209
|
onClick: function onClick(e) {
|
|
@@ -2161,8 +2218,8 @@ var RowTogglerButton = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
2161
2218
|
RowTogglerButton.displayName = 'RowTogglerButton';
|
|
2162
2219
|
|
|
2163
2220
|
var _excluded = ["originalEvent"];
|
|
2164
|
-
function ownKeys$
|
|
2165
|
-
function _objectSpread$
|
|
2221
|
+
function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2222
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2166
2223
|
var TableBody = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
2167
2224
|
var mergeProps = hooks.useMergeProps();
|
|
2168
2225
|
var _props$ptCallbacks = props.ptCallbacks,
|
|
@@ -2567,14 +2624,14 @@ var TableBody = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
|
|
|
2567
2624
|
return selection;
|
|
2568
2625
|
};
|
|
2569
2626
|
var onSelect = function onSelect(event) {
|
|
2570
|
-
if (allowCellSelection()) props.onCellSelect && props.onCellSelect(_objectSpread$
|
|
2627
|
+
if (allowCellSelection()) props.onCellSelect && props.onCellSelect(_objectSpread$7(_objectSpread$7({
|
|
2571
2628
|
originalEvent: event.originalEvent
|
|
2572
2629
|
}, event.data), {}, {
|
|
2573
2630
|
type: event.type
|
|
2574
2631
|
}));else props.onRowSelect && props.onRowSelect(event);
|
|
2575
2632
|
};
|
|
2576
2633
|
var onUnselect = function onUnselect(event) {
|
|
2577
|
-
if (allowCellSelection()) props.onCellUnselect && props.onCellUnselect(_objectSpread$
|
|
2634
|
+
if (allowCellSelection()) props.onCellUnselect && props.onCellUnselect(_objectSpread$7(_objectSpread$7({
|
|
2578
2635
|
originalEvent: event.originalEvent
|
|
2579
2636
|
}, event.data), {}, {
|
|
2580
2637
|
type: event.type
|
|
@@ -2633,12 +2690,12 @@ var TableBody = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
|
|
|
2633
2690
|
rangeRowIndex.current = event.index;
|
|
2634
2691
|
anchorRowFirst.current = props.first;
|
|
2635
2692
|
if (isSingleSelection()) {
|
|
2636
|
-
onSingleSelection(_objectSpread$
|
|
2693
|
+
onSingleSelection(_objectSpread$7(_objectSpread$7({}, event), {}, {
|
|
2637
2694
|
toggleable: toggleable,
|
|
2638
2695
|
type: 'row'
|
|
2639
2696
|
}));
|
|
2640
2697
|
} else {
|
|
2641
|
-
onMultipleSelection(_objectSpread$
|
|
2698
|
+
onMultipleSelection(_objectSpread$7(_objectSpread$7({}, event), {}, {
|
|
2642
2699
|
toggleable: toggleable,
|
|
2643
2700
|
type: 'row'
|
|
2644
2701
|
}));
|
|
@@ -2728,7 +2785,7 @@ var TableBody = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
|
|
|
2728
2785
|
var hasDataKey = props.groupRowsBy ? dataKey === props.groupRowsBy : !!dataKey;
|
|
2729
2786
|
if (hasDataKey) {
|
|
2730
2787
|
var dataKeyValue = String(utils.ObjectUtils.resolveFieldData(event.data, dataKey));
|
|
2731
|
-
expandedRows = props.expandedRows ? _objectSpread$
|
|
2788
|
+
expandedRows = props.expandedRows ? _objectSpread$7({}, props.expandedRows) : {};
|
|
2732
2789
|
if (expandedRows[dataKeyValue] != null) {
|
|
2733
2790
|
delete expandedRows[dataKeyValue];
|
|
2734
2791
|
if (props.onRowCollapse) {
|
|
@@ -2862,13 +2919,13 @@ var TableBody = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
|
|
|
2862
2919
|
event.preventDefault();
|
|
2863
2920
|
};
|
|
2864
2921
|
var onRadioChange = function onRadioChange(event) {
|
|
2865
|
-
onSingleSelection(_objectSpread$
|
|
2922
|
+
onSingleSelection(_objectSpread$7(_objectSpread$7({}, event), {}, {
|
|
2866
2923
|
toggleable: true,
|
|
2867
2924
|
type: 'radio'
|
|
2868
2925
|
}));
|
|
2869
2926
|
};
|
|
2870
2927
|
var onCheckboxChange = function onCheckboxChange(event) {
|
|
2871
|
-
onMultipleSelection(_objectSpread$
|
|
2928
|
+
onMultipleSelection(_objectSpread$7(_objectSpread$7({}, event), {}, {
|
|
2872
2929
|
toggleable: true,
|
|
2873
2930
|
type: 'checkbox'
|
|
2874
2931
|
}));
|
|
@@ -2978,7 +3035,7 @@ var TableBody = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
|
|
|
2978
3035
|
var _content = utils.ObjectUtils.getJSXElement(props.emptyMessage, {
|
|
2979
3036
|
props: props.tableProps,
|
|
2980
3037
|
frozen: props.frozenRow
|
|
2981
|
-
}) || PrimeReact.localeOption('emptyMessage');
|
|
3038
|
+
}) || PrimeReact$1.localeOption('emptyMessage');
|
|
2982
3039
|
var emptyMessageProps = mergeProps({
|
|
2983
3040
|
className: cx('emptyMessage'),
|
|
2984
3041
|
role: 'row'
|
|
@@ -3173,7 +3230,8 @@ var TableBody = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
|
|
|
3173
3230
|
style: props.style,
|
|
3174
3231
|
className: cx(ptKey, {
|
|
3175
3232
|
className: props.className
|
|
3176
|
-
})
|
|
3233
|
+
}),
|
|
3234
|
+
role: ' rowgroup'
|
|
3177
3235
|
}, ptm(ptKey, {
|
|
3178
3236
|
hostName: props.hostName
|
|
3179
3237
|
}));
|
|
@@ -3208,8 +3266,8 @@ var RowBase = componentbase.ComponentBase.extend({
|
|
|
3208
3266
|
}
|
|
3209
3267
|
});
|
|
3210
3268
|
|
|
3211
|
-
function ownKeys$
|
|
3212
|
-
function _objectSpread$
|
|
3269
|
+
function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3270
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3213
3271
|
var FooterCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
3214
3272
|
var _React$useState = React__namespace.useState({}),
|
|
3215
3273
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -3253,7 +3311,7 @@ var FooterCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
3253
3311
|
};
|
|
3254
3312
|
var updateStickyPosition = function updateStickyPosition() {
|
|
3255
3313
|
if (getColumnProp('frozen')) {
|
|
3256
|
-
var styleObject = _objectSpread$
|
|
3314
|
+
var styleObject = _objectSpread$6({}, styleObjectState);
|
|
3257
3315
|
var _align = getColumnProp('alignFrozen');
|
|
3258
3316
|
if (_align === 'right') {
|
|
3259
3317
|
var right = 0;
|
|
@@ -3384,7 +3442,8 @@ var TableFooter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
3384
3442
|
if (hasFooter()) {
|
|
3385
3443
|
var content = createContent();
|
|
3386
3444
|
var tfootProps = mergeProps({
|
|
3387
|
-
className: cx('tfoot')
|
|
3445
|
+
className: cx('tfoot'),
|
|
3446
|
+
role: 'rowgroup'
|
|
3388
3447
|
}, getColumnGroupPTOptions('root'), ptm('tfoot', {
|
|
3389
3448
|
hostName: props.hostName
|
|
3390
3449
|
}));
|
|
@@ -3394,6 +3453,366 @@ var TableFooter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
3394
3453
|
});
|
|
3395
3454
|
TableFooter.displayName = 'TableFooter';
|
|
3396
3455
|
|
|
3456
|
+
function _defineProperties(target, props) {
|
|
3457
|
+
for (var i = 0; i < props.length; i++) {
|
|
3458
|
+
var descriptor = props[i];
|
|
3459
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
3460
|
+
descriptor.configurable = true;
|
|
3461
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
3462
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
3463
|
+
}
|
|
3464
|
+
}
|
|
3465
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
3466
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
3467
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
3468
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
3469
|
+
writable: false
|
|
3470
|
+
});
|
|
3471
|
+
return Constructor;
|
|
3472
|
+
}
|
|
3473
|
+
|
|
3474
|
+
function _classCallCheck(instance, Constructor) {
|
|
3475
|
+
if (!(instance instanceof Constructor)) {
|
|
3476
|
+
throw new TypeError("Cannot call a class as a function");
|
|
3477
|
+
}
|
|
3478
|
+
}
|
|
3479
|
+
|
|
3480
|
+
var FilterMatchMode = Object.freeze({
|
|
3481
|
+
STARTS_WITH: 'startsWith',
|
|
3482
|
+
CONTAINS: 'contains',
|
|
3483
|
+
NOT_CONTAINS: 'notContains',
|
|
3484
|
+
ENDS_WITH: 'endsWith',
|
|
3485
|
+
EQUALS: 'equals',
|
|
3486
|
+
NOT_EQUALS: 'notEquals',
|
|
3487
|
+
IN: 'in',
|
|
3488
|
+
LESS_THAN: 'lt',
|
|
3489
|
+
LESS_THAN_OR_EQUAL_TO: 'lte',
|
|
3490
|
+
GREATER_THAN: 'gt',
|
|
3491
|
+
GREATER_THAN_OR_EQUAL_TO: 'gte',
|
|
3492
|
+
BETWEEN: 'between',
|
|
3493
|
+
DATE_IS: 'dateIs',
|
|
3494
|
+
DATE_IS_NOT: 'dateIsNot',
|
|
3495
|
+
DATE_BEFORE: 'dateBefore',
|
|
3496
|
+
DATE_AFTER: 'dateAfter',
|
|
3497
|
+
CUSTOM: 'custom'
|
|
3498
|
+
});
|
|
3499
|
+
|
|
3500
|
+
/**
|
|
3501
|
+
* @deprecated please use PrimeReactContext
|
|
3502
|
+
*/
|
|
3503
|
+
var PrimeReact = /*#__PURE__*/_createClass(function PrimeReact() {
|
|
3504
|
+
_classCallCheck(this, PrimeReact);
|
|
3505
|
+
});
|
|
3506
|
+
_defineProperty(PrimeReact, "ripple", false);
|
|
3507
|
+
_defineProperty(PrimeReact, "inputStyle", 'outlined');
|
|
3508
|
+
_defineProperty(PrimeReact, "locale", 'en');
|
|
3509
|
+
_defineProperty(PrimeReact, "appendTo", null);
|
|
3510
|
+
_defineProperty(PrimeReact, "cssTransition", true);
|
|
3511
|
+
_defineProperty(PrimeReact, "autoZIndex", true);
|
|
3512
|
+
_defineProperty(PrimeReact, "hideOverlaysOnDocumentScrolling", false);
|
|
3513
|
+
_defineProperty(PrimeReact, "nonce", null);
|
|
3514
|
+
_defineProperty(PrimeReact, "nullSortOrder", 1);
|
|
3515
|
+
_defineProperty(PrimeReact, "zIndex", {
|
|
3516
|
+
modal: 1100,
|
|
3517
|
+
overlay: 1000,
|
|
3518
|
+
menu: 1000,
|
|
3519
|
+
tooltip: 1100,
|
|
3520
|
+
toast: 1200
|
|
3521
|
+
});
|
|
3522
|
+
_defineProperty(PrimeReact, "pt", undefined);
|
|
3523
|
+
_defineProperty(PrimeReact, "filterMatchModeOptions", {
|
|
3524
|
+
text: [FilterMatchMode.STARTS_WITH, FilterMatchMode.CONTAINS, FilterMatchMode.NOT_CONTAINS, FilterMatchMode.ENDS_WITH, FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS],
|
|
3525
|
+
numeric: [FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS, FilterMatchMode.LESS_THAN, FilterMatchMode.LESS_THAN_OR_EQUAL_TO, FilterMatchMode.GREATER_THAN, FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],
|
|
3526
|
+
date: [FilterMatchMode.DATE_IS, FilterMatchMode.DATE_IS_NOT, FilterMatchMode.DATE_BEFORE, FilterMatchMode.DATE_AFTER]
|
|
3527
|
+
});
|
|
3528
|
+
_defineProperty(PrimeReact, "changeTheme", function (currentTheme, newTheme, linkElementId, callback) {
|
|
3529
|
+
var _linkElement$parentNo;
|
|
3530
|
+
var linkElement = document.getElementById(linkElementId);
|
|
3531
|
+
var cloneLinkElement = linkElement.cloneNode(true);
|
|
3532
|
+
var newThemeUrl = linkElement.getAttribute('href').replace(currentTheme, newTheme);
|
|
3533
|
+
cloneLinkElement.setAttribute('id', linkElementId + '-clone');
|
|
3534
|
+
cloneLinkElement.setAttribute('href', newThemeUrl);
|
|
3535
|
+
cloneLinkElement.addEventListener('load', function () {
|
|
3536
|
+
linkElement.remove();
|
|
3537
|
+
cloneLinkElement.setAttribute('id', linkElementId);
|
|
3538
|
+
if (callback) {
|
|
3539
|
+
callback();
|
|
3540
|
+
}
|
|
3541
|
+
});
|
|
3542
|
+
(_linkElement$parentNo = linkElement.parentNode) === null || _linkElement$parentNo === void 0 || _linkElement$parentNo.insertBefore(cloneLinkElement, linkElement.nextSibling);
|
|
3543
|
+
});
|
|
3544
|
+
|
|
3545
|
+
var locales = {
|
|
3546
|
+
en: {
|
|
3547
|
+
startsWith: 'Starts with',
|
|
3548
|
+
contains: 'Contains',
|
|
3549
|
+
notContains: 'Not contains',
|
|
3550
|
+
endsWith: 'Ends with',
|
|
3551
|
+
equals: 'Equals',
|
|
3552
|
+
notEquals: 'Not equals',
|
|
3553
|
+
noFilter: 'No Filter',
|
|
3554
|
+
filter: 'Filter',
|
|
3555
|
+
lt: 'Less than',
|
|
3556
|
+
lte: 'Less than or equal to',
|
|
3557
|
+
gt: 'Greater than',
|
|
3558
|
+
gte: 'Greater than or equal to',
|
|
3559
|
+
dateIs: 'Date is',
|
|
3560
|
+
dateIsNot: 'Date is not',
|
|
3561
|
+
dateBefore: 'Date is before',
|
|
3562
|
+
dateAfter: 'Date is after',
|
|
3563
|
+
custom: 'Custom',
|
|
3564
|
+
clear: 'Clear',
|
|
3565
|
+
close: 'Close',
|
|
3566
|
+
apply: 'Apply',
|
|
3567
|
+
matchAll: 'Match All',
|
|
3568
|
+
matchAny: 'Match Any',
|
|
3569
|
+
addRule: 'Add Rule',
|
|
3570
|
+
removeRule: 'Remove Rule',
|
|
3571
|
+
accept: 'Yes',
|
|
3572
|
+
reject: 'No',
|
|
3573
|
+
choose: 'Choose',
|
|
3574
|
+
upload: 'Upload',
|
|
3575
|
+
cancel: 'Cancel',
|
|
3576
|
+
completed: 'Completed',
|
|
3577
|
+
pending: 'Pending',
|
|
3578
|
+
fileSizeTypes: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
|
|
3579
|
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
3580
|
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
3581
|
+
dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
3582
|
+
monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
|
3583
|
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
3584
|
+
chooseYear: 'Choose Year',
|
|
3585
|
+
chooseMonth: 'Choose Month',
|
|
3586
|
+
chooseDate: 'Choose Date',
|
|
3587
|
+
prevDecade: 'Previous Decade',
|
|
3588
|
+
nextDecade: 'Next Decade',
|
|
3589
|
+
prevYear: 'Previous Year',
|
|
3590
|
+
nextYear: 'Next Year',
|
|
3591
|
+
prevMonth: 'Previous Month',
|
|
3592
|
+
nextMonth: 'Next Month',
|
|
3593
|
+
prevHour: 'Previous Hour',
|
|
3594
|
+
nextHour: 'Next Hour',
|
|
3595
|
+
prevMinute: 'Previous Minute',
|
|
3596
|
+
nextMinute: 'Next Minute',
|
|
3597
|
+
prevSecond: 'Previous Second',
|
|
3598
|
+
nextSecond: 'Next Second',
|
|
3599
|
+
prevMilliSecond: 'Previous Second',
|
|
3600
|
+
nextMilliSecond: 'Next Second',
|
|
3601
|
+
am: 'am',
|
|
3602
|
+
pm: 'pm',
|
|
3603
|
+
today: 'Today',
|
|
3604
|
+
now: 'Now',
|
|
3605
|
+
weekHeader: 'Wk',
|
|
3606
|
+
firstDayOfWeek: 0,
|
|
3607
|
+
showMonthAfterYear: false,
|
|
3608
|
+
dateFormat: 'mm/dd/yy',
|
|
3609
|
+
weak: 'Weak',
|
|
3610
|
+
medium: 'Medium',
|
|
3611
|
+
strong: 'Strong',
|
|
3612
|
+
passwordPrompt: 'Enter a password',
|
|
3613
|
+
emptyFilterMessage: 'No available options',
|
|
3614
|
+
emptyMessage: 'No results found',
|
|
3615
|
+
aria: {
|
|
3616
|
+
trueLabel: 'True',
|
|
3617
|
+
falseLabel: 'False',
|
|
3618
|
+
nullLabel: 'Not Selected',
|
|
3619
|
+
star: '1 star',
|
|
3620
|
+
stars: '{star} stars',
|
|
3621
|
+
selectAll: 'All items selected',
|
|
3622
|
+
unselectAll: 'All items unselected',
|
|
3623
|
+
close: 'Close',
|
|
3624
|
+
previous: 'Previous',
|
|
3625
|
+
next: 'Next',
|
|
3626
|
+
navigation: 'Navigation',
|
|
3627
|
+
scrollTop: 'Scroll Top',
|
|
3628
|
+
moveTop: 'Move Top',
|
|
3629
|
+
moveUp: 'Move Up',
|
|
3630
|
+
moveDown: 'Move Down',
|
|
3631
|
+
moveBottom: 'Move Bottom',
|
|
3632
|
+
moveToTarget: 'Move to Target',
|
|
3633
|
+
moveToSource: 'Move to Source',
|
|
3634
|
+
moveAllToTarget: 'Move All to Target',
|
|
3635
|
+
moveAllToSource: 'Move All to Source',
|
|
3636
|
+
pageLabel: 'Page {page}',
|
|
3637
|
+
firstPageLabel: 'First Page',
|
|
3638
|
+
lastPageLabel: 'Last Page',
|
|
3639
|
+
nextPageLabel: 'Next Page',
|
|
3640
|
+
previousPageLabel: 'Previous Page',
|
|
3641
|
+
rowsPerPageLabel: 'Rows per page',
|
|
3642
|
+
jumpToPageDropdownLabel: 'Jump to Page Dropdown',
|
|
3643
|
+
jumpToPageInputLabel: 'Jump to Page Input',
|
|
3644
|
+
selectRow: 'Row Selected',
|
|
3645
|
+
unselectRow: 'Row Unselected',
|
|
3646
|
+
expandRow: 'Row Expanded',
|
|
3647
|
+
collapseRow: 'Row Collapsed',
|
|
3648
|
+
showFilterMenu: 'Show Filter Menu',
|
|
3649
|
+
hideFilterMenu: 'Hide Filter Menu',
|
|
3650
|
+
filterOperator: 'Filter Operator',
|
|
3651
|
+
filterConstraint: 'Filter Constraint',
|
|
3652
|
+
editRow: 'Row Edit',
|
|
3653
|
+
saveEdit: 'Save Edit',
|
|
3654
|
+
cancelEdit: 'Cancel Edit',
|
|
3655
|
+
listView: 'List View',
|
|
3656
|
+
gridView: 'Grid View',
|
|
3657
|
+
slide: 'Slide',
|
|
3658
|
+
slideNumber: '{slideNumber}',
|
|
3659
|
+
zoomImage: 'Zoom Image',
|
|
3660
|
+
zoomIn: 'Zoom In',
|
|
3661
|
+
zoomOut: 'Zoom Out',
|
|
3662
|
+
rotateRight: 'Rotate Right',
|
|
3663
|
+
rotateLeft: 'Rotate Left',
|
|
3664
|
+
selectLabel: 'Select',
|
|
3665
|
+
unselectLabel: 'Unselect',
|
|
3666
|
+
expandLabel: 'Expand',
|
|
3667
|
+
collapseLabel: 'Collapse'
|
|
3668
|
+
}
|
|
3669
|
+
}
|
|
3670
|
+
};
|
|
3671
|
+
|
|
3672
|
+
/**
|
|
3673
|
+
* Find an ARIA label in the locale by key. If options are passed it will replace all options:
|
|
3674
|
+
* ```ts
|
|
3675
|
+
* const ariaValue = "Page {page}, User {user}, Role {role}";
|
|
3676
|
+
* const options = { page: 2, user: "John", role: "Admin" };
|
|
3677
|
+
* const result = ariaLabel('yourLabel', { page: 2, user: "John", role: "Admin" })
|
|
3678
|
+
* console.log(result); // Output: Page 2, User John, Role Admin
|
|
3679
|
+
* ```
|
|
3680
|
+
* @param {string} ariaKey key of the ARIA label to look up in locale.
|
|
3681
|
+
* @param {any} options JSON options like { page: 2, user: "John", role: "Admin" }
|
|
3682
|
+
* @returns the ARIA label with replaced values
|
|
3683
|
+
*/
|
|
3684
|
+
function ariaLabel(ariaKey, options) {
|
|
3685
|
+
var _locale = PrimeReact.locale;
|
|
3686
|
+
try {
|
|
3687
|
+
var _ariaLabel = localeOptions(_locale)['aria'][ariaKey];
|
|
3688
|
+
if (_ariaLabel) {
|
|
3689
|
+
for (var key in options) {
|
|
3690
|
+
if (options.hasOwnProperty(key)) {
|
|
3691
|
+
_ariaLabel = _ariaLabel.replace("{".concat(key, "}"), options[key]);
|
|
3692
|
+
}
|
|
3693
|
+
}
|
|
3694
|
+
}
|
|
3695
|
+
return _ariaLabel;
|
|
3696
|
+
} catch (error) {
|
|
3697
|
+
throw new Error("The ".concat(ariaKey, " option is not found in the current locale('").concat(_locale, "')."));
|
|
3698
|
+
}
|
|
3699
|
+
}
|
|
3700
|
+
function localeOptions(locale) {
|
|
3701
|
+
var _locale = locale || PrimeReact.locale;
|
|
3702
|
+
return locales[_locale];
|
|
3703
|
+
}
|
|
3704
|
+
|
|
3705
|
+
var styles = "";
|
|
3706
|
+
var FocusTrapBase = componentbase.ComponentBase.extend({
|
|
3707
|
+
defaultProps: {
|
|
3708
|
+
__TYPE: 'FocusTrap',
|
|
3709
|
+
children: undefined
|
|
3710
|
+
},
|
|
3711
|
+
css: {
|
|
3712
|
+
styles: styles
|
|
3713
|
+
},
|
|
3714
|
+
getProps: function getProps(props) {
|
|
3715
|
+
return utils.ObjectUtils.getMergedProps(props, FocusTrapBase.defaultProps);
|
|
3716
|
+
},
|
|
3717
|
+
getOtherProps: function getOtherProps(props) {
|
|
3718
|
+
return utils.ObjectUtils.getDiffProps(props, FocusTrapBase.defaultProps);
|
|
3719
|
+
}
|
|
3720
|
+
});
|
|
3721
|
+
|
|
3722
|
+
function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3723
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3724
|
+
var FocusTrap = /*#__PURE__*/React__default["default"].memo( /*#__PURE__*/React__default["default"].forwardRef(function (inProps, ref) {
|
|
3725
|
+
var targetRef = React__default["default"].useRef(null);
|
|
3726
|
+
var firstFocusableElementRef = React__default["default"].useRef(null);
|
|
3727
|
+
var lastFocusableElementRef = React__default["default"].useRef(null);
|
|
3728
|
+
var context = React__default["default"].useContext(PrimeReact$1.PrimeReactContext);
|
|
3729
|
+
var props = FocusTrapBase.getProps(inProps, context);
|
|
3730
|
+
var metaData = {
|
|
3731
|
+
props: props
|
|
3732
|
+
};
|
|
3733
|
+
hooks.useStyle(FocusTrapBase.css.styles, {
|
|
3734
|
+
name: 'focustrap'
|
|
3735
|
+
});
|
|
3736
|
+
var _FocusTrapBase$setMet = FocusTrapBase.setMetaData(_objectSpread$5({}, metaData));
|
|
3737
|
+
_FocusTrapBase$setMet.ptm;
|
|
3738
|
+
React__default["default"].useImperativeHandle(ref, function () {
|
|
3739
|
+
return {
|
|
3740
|
+
props: props,
|
|
3741
|
+
getInk: function getInk() {
|
|
3742
|
+
return firstFocusableElementRef.current;
|
|
3743
|
+
},
|
|
3744
|
+
getTarget: function getTarget() {
|
|
3745
|
+
return targetRef.current;
|
|
3746
|
+
}
|
|
3747
|
+
};
|
|
3748
|
+
});
|
|
3749
|
+
hooks.useMountEffect(function () {
|
|
3750
|
+
if (!props.disabled) {
|
|
3751
|
+
targetRef.current = getTarget();
|
|
3752
|
+
setAutoFocus(targetRef.current);
|
|
3753
|
+
}
|
|
3754
|
+
});
|
|
3755
|
+
var getTarget = function getTarget() {
|
|
3756
|
+
return firstFocusableElementRef.current && firstFocusableElementRef.current.parentElement;
|
|
3757
|
+
};
|
|
3758
|
+
var setAutoFocus = function setAutoFocus(target) {
|
|
3759
|
+
var _ref = props || {},
|
|
3760
|
+
_ref$autoFocusSelecto = _ref.autoFocusSelector,
|
|
3761
|
+
autoFocusSelector = _ref$autoFocusSelecto === void 0 ? '' : _ref$autoFocusSelecto,
|
|
3762
|
+
_ref$firstFocusableSe = _ref.firstFocusableSelector,
|
|
3763
|
+
firstFocusableSelector = _ref$firstFocusableSe === void 0 ? '' : _ref$firstFocusableSe,
|
|
3764
|
+
_ref$autoFocus = _ref.autoFocus,
|
|
3765
|
+
autoFocus = _ref$autoFocus === void 0 ? false : _ref$autoFocus;
|
|
3766
|
+
var focusableElement = utils.DomHandler.getFirstFocusableElement(target, "[autofocus]".concat(getComputedSelector(autoFocusSelector)));
|
|
3767
|
+
autoFocus && !focusableElement && (focusableElement = utils.DomHandler.getFirstFocusableElement(target, getComputedSelector(firstFocusableSelector)));
|
|
3768
|
+
utils.DomHandler.focus(focusableElement);
|
|
3769
|
+
};
|
|
3770
|
+
var getComputedSelector = function getComputedSelector(selector) {
|
|
3771
|
+
return ":not(.p-hidden-focusable):not([data-p-hidden-focusable=\"true\"])".concat(selector !== null && selector !== void 0 ? selector : '');
|
|
3772
|
+
};
|
|
3773
|
+
var onFirstHiddenElementFocus = function onFirstHiddenElementFocus(event) {
|
|
3774
|
+
var _targetRef$current;
|
|
3775
|
+
var currentTarget = event.currentTarget,
|
|
3776
|
+
relatedTarget = event.relatedTarget;
|
|
3777
|
+
var focusableElement = relatedTarget === currentTarget.$_pfocustrap_lasthiddenfocusableelement || !((_targetRef$current = targetRef.current) !== null && _targetRef$current !== void 0 && _targetRef$current.contains(relatedTarget)) ? utils.DomHandler.getFirstFocusableElement(currentTarget.parentElement, getComputedSelector(currentTarget.$_pfocustrap_focusableselector)) : currentTarget.$_pfocustrap_lasthiddenfocusableelement;
|
|
3778
|
+
utils.DomHandler.focus(focusableElement);
|
|
3779
|
+
};
|
|
3780
|
+
var onLastHiddenElementFocus = function onLastHiddenElementFocus(event) {
|
|
3781
|
+
var _targetRef$current2;
|
|
3782
|
+
var currentTarget = event.currentTarget,
|
|
3783
|
+
relatedTarget = event.relatedTarget;
|
|
3784
|
+
var focusableElement = relatedTarget === currentTarget.$_pfocustrap_firsthiddenfocusableelement || !((_targetRef$current2 = targetRef.current) !== null && _targetRef$current2 !== void 0 && _targetRef$current2.contains(relatedTarget)) ? utils.DomHandler.getLastFocusableElement(currentTarget.parentElement, getComputedSelector(currentTarget.$_pfocustrap_focusableselector)) : currentTarget.$_pfocustrap_firsthiddenfocusableelement;
|
|
3785
|
+
utils.DomHandler.focus(focusableElement);
|
|
3786
|
+
};
|
|
3787
|
+
var createHiddenFocusableElements = function createHiddenFocusableElements() {
|
|
3788
|
+
var _ref2 = props || {},
|
|
3789
|
+
_ref2$tabIndex = _ref2.tabIndex,
|
|
3790
|
+
tabIndex = _ref2$tabIndex === void 0 ? 0 : _ref2$tabIndex;
|
|
3791
|
+
var createFocusableElement = function createFocusableElement(onFocus, section) {
|
|
3792
|
+
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3793
|
+
ref: section === 'firstfocusableelement' ? firstFocusableElementRef : lastFocusableElementRef,
|
|
3794
|
+
className: 'p-hidden-accessible p-hidden-focusable',
|
|
3795
|
+
tabIndex: tabIndex,
|
|
3796
|
+
role: 'presentation',
|
|
3797
|
+
"aria-hidden": true,
|
|
3798
|
+
"data-p-hidden-accessible": true,
|
|
3799
|
+
"data-p-hidden-focusable": true,
|
|
3800
|
+
onFocus: onFocus,
|
|
3801
|
+
"data-pc-section": section
|
|
3802
|
+
});
|
|
3803
|
+
};
|
|
3804
|
+
var firstFocusableElement = createFocusableElement(onFirstHiddenElementFocus, 'firstfocusableelement');
|
|
3805
|
+
var lastFocusableElement = createFocusableElement(onLastHiddenElementFocus, 'lastfocusableelement');
|
|
3806
|
+
if (firstFocusableElement.ref.current && lastFocusableElement.ref.current) {
|
|
3807
|
+
firstFocusableElement.ref.current.$_pfocustrap_lasthiddenfocusableelement = lastFocusableElement.ref.current;
|
|
3808
|
+
lastFocusableElement.ref.current.$_pfocustrap_firsthiddenfocusableelement = firstFocusableElement.ref.current;
|
|
3809
|
+
}
|
|
3810
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, firstFocusableElement, props.children, lastFocusableElement);
|
|
3811
|
+
};
|
|
3812
|
+
return createHiddenFocusableElements();
|
|
3813
|
+
}));
|
|
3814
|
+
var FocusTrap$1 = FocusTrap;
|
|
3815
|
+
|
|
3397
3816
|
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3398
3817
|
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3399
3818
|
var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
@@ -3402,6 +3821,7 @@ var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
3402
3821
|
overlayVisibleState = _React$useState2[0],
|
|
3403
3822
|
setOverlayVisibleState = _React$useState2[1];
|
|
3404
3823
|
var overlayRef = React__namespace.useRef(null);
|
|
3824
|
+
var overlayId = React__namespace.useRef(utils.UniqueComponentId());
|
|
3405
3825
|
var iconRef = React__namespace.useRef(null);
|
|
3406
3826
|
var selfClick = React__namespace.useRef(false);
|
|
3407
3827
|
var overlayEventListener = React__namespace.useRef(null);
|
|
@@ -3412,7 +3832,7 @@ var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
3412
3832
|
var getColumnProps = function getColumnProps() {
|
|
3413
3833
|
return ColumnBase.getCProps(props.column);
|
|
3414
3834
|
};
|
|
3415
|
-
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
3835
|
+
var context = React__namespace.useContext(PrimeReact$1.PrimeReactContext);
|
|
3416
3836
|
var _props$ptCallbacks = props.ptCallbacks,
|
|
3417
3837
|
ptm = _props$ptCallbacks.ptm,
|
|
3418
3838
|
ptmo = _props$ptCallbacks.ptmo,
|
|
@@ -3463,22 +3883,25 @@ var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
3463
3883
|
var isRowMatchModeSelected = function isRowMatchModeSelected(matchMode) {
|
|
3464
3884
|
return filterModel && filterModel.matchMode === matchMode;
|
|
3465
3885
|
};
|
|
3466
|
-
var showMenuButton = function showMenuButton() {
|
|
3467
|
-
return getColumnProp('showFilterMenu') && (props.display === 'row' ? getColumnProp('dataType') !== 'boolean' : true);
|
|
3468
|
-
};
|
|
3469
3886
|
var matchModes = function matchModes() {
|
|
3470
3887
|
return getColumnProp('filterMatchModeOptions') || context && context.filterMatchModeOptions[findDataType()].map(function (key) {
|
|
3471
3888
|
return {
|
|
3472
|
-
label: PrimeReact.localeOption(key),
|
|
3889
|
+
label: PrimeReact$1.localeOption(key),
|
|
3473
3890
|
value: key
|
|
3474
3891
|
};
|
|
3475
3892
|
}) || PrimeReact__default["default"].filterMatchModeOptions[findDataType()].map(function (key) {
|
|
3476
3893
|
return {
|
|
3477
|
-
label: PrimeReact.localeOption(key),
|
|
3894
|
+
label: PrimeReact$1.localeOption(key),
|
|
3478
3895
|
value: key
|
|
3479
3896
|
};
|
|
3480
3897
|
});
|
|
3481
3898
|
};
|
|
3899
|
+
var isShowMenuButton = function isShowMenuButton() {
|
|
3900
|
+
return getColumnProp('showFilterMenu') && (props.display === 'row' ? getColumnProp('dataType') !== 'boolean' : true);
|
|
3901
|
+
};
|
|
3902
|
+
var isShowClearButton = function isShowClearButton() {
|
|
3903
|
+
return getColumnProp('showClearButton') && props.display === 'row';
|
|
3904
|
+
};
|
|
3482
3905
|
var isShowMatchModes = function isShowMatchModes() {
|
|
3483
3906
|
return getColumnProp('dataType') !== 'boolean' && getColumnProp('showFilterMatchModes') && matchModes() && getColumnProp('showFilterMenuOptions');
|
|
3484
3907
|
};
|
|
@@ -3522,7 +3945,7 @@ var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
3522
3945
|
});
|
|
3523
3946
|
};
|
|
3524
3947
|
if (matchMode === 'custom' && !hasMatchMode(dataType)) {
|
|
3525
|
-
context && context.filterMatchModeOptions[dataType].push(PrimeReact.FilterMatchMode.CUSTOM) || PrimeReact__default["default"].filterMatchModeOptions[dataType].push(PrimeReact.FilterMatchMode.CUSTOM);
|
|
3948
|
+
context && context.filterMatchModeOptions[dataType].push(PrimeReact$1.FilterMatchMode.CUSTOM) || PrimeReact__default["default"].filterMatchModeOptions[dataType].push(PrimeReact$1.FilterMatchMode.CUSTOM);
|
|
3526
3949
|
return dataType;
|
|
3527
3950
|
} else if (matchMode) {
|
|
3528
3951
|
return Object.keys(context && context.filterMatchModeOptions || PrimeReact__default["default"].filterMatchModeOptions).find(function (key) {
|
|
@@ -3772,30 +4195,27 @@ var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
3772
4195
|
};
|
|
3773
4196
|
var operatorOptions = function operatorOptions() {
|
|
3774
4197
|
return [{
|
|
3775
|
-
label: PrimeReact.localeOption('matchAll'),
|
|
3776
|
-
value: PrimeReact.FilterOperator.AND
|
|
4198
|
+
label: PrimeReact$1.localeOption('matchAll'),
|
|
4199
|
+
value: PrimeReact$1.FilterOperator.AND
|
|
3777
4200
|
}, {
|
|
3778
|
-
label: PrimeReact.localeOption('matchAny'),
|
|
3779
|
-
value: PrimeReact.FilterOperator.OR
|
|
4201
|
+
label: PrimeReact$1.localeOption('matchAny'),
|
|
4202
|
+
value: PrimeReact$1.FilterOperator.OR
|
|
3780
4203
|
}];
|
|
3781
4204
|
};
|
|
3782
|
-
var filterLabel = function filterLabel() {
|
|
3783
|
-
return PrimeReact.localeOption('filter');
|
|
3784
|
-
};
|
|
3785
4205
|
var noFilterLabel = function noFilterLabel() {
|
|
3786
|
-
return PrimeReact.localeOption('noFilter');
|
|
4206
|
+
return PrimeReact$1.localeOption('noFilter');
|
|
3787
4207
|
};
|
|
3788
4208
|
var removeRuleButtonLabel = function removeRuleButtonLabel() {
|
|
3789
|
-
return PrimeReact.localeOption('removeRule');
|
|
4209
|
+
return PrimeReact$1.localeOption('removeRule');
|
|
3790
4210
|
};
|
|
3791
4211
|
var addRuleButtonLabel = function addRuleButtonLabel() {
|
|
3792
|
-
return PrimeReact.localeOption('addRule');
|
|
4212
|
+
return PrimeReact$1.localeOption('addRule');
|
|
3793
4213
|
};
|
|
3794
4214
|
var clearButtonLabel = function clearButtonLabel() {
|
|
3795
|
-
return PrimeReact.localeOption('clear');
|
|
4215
|
+
return PrimeReact$1.localeOption('clear');
|
|
3796
4216
|
};
|
|
3797
4217
|
var applyButtonLabel = function applyButtonLabel() {
|
|
3798
|
-
return PrimeReact.localeOption('apply');
|
|
4218
|
+
return PrimeReact$1.localeOption('apply');
|
|
3799
4219
|
};
|
|
3800
4220
|
var filterCallback = function filterCallback(value) {
|
|
3801
4221
|
var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
@@ -3868,7 +4288,7 @@ var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
3868
4288
|
return props.display === 'menu' ? createFilterElement(fieldConstraint, index) : null;
|
|
3869
4289
|
};
|
|
3870
4290
|
var createMenuButton = function createMenuButton() {
|
|
3871
|
-
if (!
|
|
4291
|
+
if (!isShowMenuButton()) {
|
|
3872
4292
|
return null;
|
|
3873
4293
|
}
|
|
3874
4294
|
var filterIconProps = mergeProps({
|
|
@@ -3878,7 +4298,7 @@ var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
3878
4298
|
var columnFilterIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread$4({}, filterIconProps), {
|
|
3879
4299
|
props: props
|
|
3880
4300
|
});
|
|
3881
|
-
var label =
|
|
4301
|
+
var label = overlayVisibleState ? ariaLabel('hideFilterMenu') : ariaLabel('showFilterMenu');
|
|
3882
4302
|
var filterMenuButtonProps = mergeProps({
|
|
3883
4303
|
type: 'button',
|
|
3884
4304
|
className: cx('filterMenuButton', {
|
|
@@ -3887,13 +4307,14 @@ var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
3887
4307
|
}),
|
|
3888
4308
|
'aria-haspopup': true,
|
|
3889
4309
|
'aria-expanded': overlayVisibleState,
|
|
4310
|
+
'aria-label': label,
|
|
4311
|
+
'aria-controls': overlayId.current,
|
|
3890
4312
|
onClick: function onClick(e) {
|
|
3891
4313
|
return toggleMenu();
|
|
3892
4314
|
},
|
|
3893
4315
|
onKeyDown: function onKeyDown(e) {
|
|
3894
4316
|
return onToggleButtonKeyDown(e);
|
|
3895
|
-
}
|
|
3896
|
-
'aria-label': label
|
|
4317
|
+
}
|
|
3897
4318
|
}, getColumnPTOptions('filterMenuButton', {
|
|
3898
4319
|
context: {
|
|
3899
4320
|
active: hasFilter()
|
|
@@ -3904,7 +4325,7 @@ var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
3904
4325
|
}, filterMenuButtonProps), columnFilterIcon, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
3905
4326
|
};
|
|
3906
4327
|
var createClearButton = function createClearButton() {
|
|
3907
|
-
if (!
|
|
4328
|
+
if (!isShowClearButton()) {
|
|
3908
4329
|
return null;
|
|
3909
4330
|
}
|
|
3910
4331
|
var filterClearIconProps = mergeProps({
|
|
@@ -3914,25 +4335,22 @@ var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
3914
4335
|
var filterClearIcon = utils.IconUtils.getJSXIcon(icon, _objectSpread$4({}, filterClearIconProps), {
|
|
3915
4336
|
props: props
|
|
3916
4337
|
});
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
return /*#__PURE__*/React__namespace.createElement("button", headerFilterClearButtonProps, filterClearIcon, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
3934
|
-
}
|
|
3935
|
-
return null;
|
|
4338
|
+
var clearLabel = clearButtonLabel();
|
|
4339
|
+
var headerFilterClearButtonProps = mergeProps({
|
|
4340
|
+
className: cx('headerFilterClearButton', {
|
|
4341
|
+
hasRowFilter: hasRowFilter
|
|
4342
|
+
}),
|
|
4343
|
+
type: 'button',
|
|
4344
|
+
onClick: function onClick(e) {
|
|
4345
|
+
return clearFilter();
|
|
4346
|
+
},
|
|
4347
|
+
'aria-label': clearLabel
|
|
4348
|
+
}, getColumnPTOptions('headerFilterClearButton', {
|
|
4349
|
+
context: {
|
|
4350
|
+
hidden: hasRowFilter()
|
|
4351
|
+
}
|
|
4352
|
+
}));
|
|
4353
|
+
return /*#__PURE__*/React__namespace.createElement("button", headerFilterClearButtonProps, filterClearIcon, /*#__PURE__*/React__namespace.createElement(ripple.Ripple, null));
|
|
3936
4354
|
};
|
|
3937
4355
|
var createRowItems = function createRowItems() {
|
|
3938
4356
|
if (isShowMatchModes()) {
|
|
@@ -4002,7 +4420,8 @@ var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
4002
4420
|
unstyled: props.unstyled,
|
|
4003
4421
|
__parentMetadata: {
|
|
4004
4422
|
parent: props.metaData
|
|
4005
|
-
}
|
|
4423
|
+
},
|
|
4424
|
+
"aria-label": ariaLabel('filterOperator')
|
|
4006
4425
|
}));
|
|
4007
4426
|
}
|
|
4008
4427
|
return null;
|
|
@@ -4021,7 +4440,8 @@ var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
4021
4440
|
unstyled: props.unstyled,
|
|
4022
4441
|
__parentMetadata: {
|
|
4023
4442
|
parent: props.metaData
|
|
4024
|
-
}
|
|
4443
|
+
},
|
|
4444
|
+
"aria-label": ariaLabel('filterConstraint')
|
|
4025
4445
|
});
|
|
4026
4446
|
}
|
|
4027
4447
|
return null;
|
|
@@ -4177,7 +4597,10 @@ var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
4177
4597
|
},
|
|
4178
4598
|
onMouseDown: function onMouseDown(e) {
|
|
4179
4599
|
return onContentMouseDown();
|
|
4180
|
-
}
|
|
4600
|
+
},
|
|
4601
|
+
id: overlayId.current,
|
|
4602
|
+
'aria-modal': overlayVisibleState,
|
|
4603
|
+
role: 'dialog'
|
|
4181
4604
|
}, getColumnPTOptions('filterOverlay'));
|
|
4182
4605
|
var transitionProps = mergeProps({
|
|
4183
4606
|
classNames: cx('transition'),
|
|
@@ -4196,7 +4619,9 @@ var ColumnFilter = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
4196
4619
|
nodeRef: overlayRef
|
|
4197
4620
|
}, transitionProps), /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
4198
4621
|
ref: overlayRef
|
|
4199
|
-
}, filterOverlayProps),
|
|
4622
|
+
}, filterOverlayProps), /*#__PURE__*/React__namespace.createElement(FocusTrap$1, {
|
|
4623
|
+
autoFocus: true
|
|
4624
|
+
}, filterHeader, items, filterFooter))));
|
|
4200
4625
|
};
|
|
4201
4626
|
var rowFilterElement = createRowFilterElement();
|
|
4202
4627
|
var menuButton = createMenuButton();
|
|
@@ -4287,6 +4712,7 @@ var HeaderCheckbox = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
4287
4712
|
}),
|
|
4288
4713
|
role: 'checkbox',
|
|
4289
4714
|
'aria-checked': props.checked,
|
|
4715
|
+
'aria-label': props.checked ? ariaLabel('selectAll') : ariaLabel('unselectAll'),
|
|
4290
4716
|
tabIndex: tabIndex,
|
|
4291
4717
|
onFocus: function onFocus(e) {
|
|
4292
4718
|
return _onFocus();
|
|
@@ -4448,7 +4874,7 @@ var HeaderCell = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
4448
4874
|
});
|
|
4449
4875
|
};
|
|
4450
4876
|
var _onKeyDown = function onKeyDown(event) {
|
|
4451
|
-
if (event.
|
|
4877
|
+
if ((event.code == 'Enter' || event.code == 'Space') && event.currentTarget === elementRef.current && utils.DomHandler.getAttribute(event.currentTarget, 'data-p-sortable-column') === 'true') {
|
|
4452
4878
|
_onClick(event);
|
|
4453
4879
|
event.preventDefault();
|
|
4454
4880
|
}
|
|
@@ -4925,7 +5351,8 @@ var TableHeader = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
4925
5351
|
};
|
|
4926
5352
|
var content = createContent();
|
|
4927
5353
|
var theadProps = mergeProps({
|
|
4928
|
-
className: cx('thead')
|
|
5354
|
+
className: cx('thead'),
|
|
5355
|
+
role: 'rowgroup'
|
|
4929
5356
|
}, getColumnGroupPTOptions('root'), ptm('thead', {
|
|
4930
5357
|
hostName: props.hostName
|
|
4931
5358
|
}));
|
|
@@ -4939,7 +5366,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
4939
5366
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4940
5367
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4941
5368
|
var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
4942
|
-
var context = React__namespace.useContext(PrimeReact.PrimeReactContext);
|
|
5369
|
+
var context = React__namespace.useContext(PrimeReact$1.PrimeReactContext);
|
|
4943
5370
|
var mergeProps = hooks.useMergeProps();
|
|
4944
5371
|
var props = DataTableBase.getProps(inProps, context);
|
|
4945
5372
|
var _React$useState = React__namespace.useState(props.first),
|
|
@@ -5941,7 +6368,7 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref)
|
|
|
5941
6368
|
for (var j = 0; j < filterMeta.constraints.length; j++) {
|
|
5942
6369
|
var filterConstraint = filterMeta.constraints[j];
|
|
5943
6370
|
localMatch = executeLocalFilter(filterField, data[i], filterConstraint, j);
|
|
5944
|
-
if (filterMeta.operator === PrimeReact.FilterOperator.OR && localMatch || filterMeta.operator === PrimeReact.FilterOperator.AND && !localMatch) {
|
|
6371
|
+
if (filterMeta.operator === PrimeReact$1.FilterOperator.OR && localMatch || filterMeta.operator === PrimeReact$1.FilterOperator.AND && !localMatch) {
|
|
5945
6372
|
break;
|
|
5946
6373
|
}
|
|
5947
6374
|
}
|
|
@@ -5958,7 +6385,7 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref)
|
|
|
5958
6385
|
var globalFilterField = globalFilterFieldsArray[_j];
|
|
5959
6386
|
var matchMode = activeFilters['global'] ? activeFilters['global'].matchMode : props.globalFilterMatchMode;
|
|
5960
6387
|
var value = activeFilters['global'] ? activeFilters['global'].value : props.globalFilter;
|
|
5961
|
-
globalMatch = PrimeReact.FilterService.filters[matchMode](utils.ObjectUtils.resolveFieldData(data[i], globalFilterField), value, props.filterLocale);
|
|
6388
|
+
globalMatch = PrimeReact$1.FilterService.filters[matchMode](utils.ObjectUtils.resolveFieldData(data[i], globalFilterField), value, props.filterLocale);
|
|
5962
6389
|
if (globalMatch) {
|
|
5963
6390
|
break;
|
|
5964
6391
|
}
|
|
@@ -5981,9 +6408,9 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref)
|
|
|
5981
6408
|
};
|
|
5982
6409
|
var executeLocalFilter = function executeLocalFilter(field, rowData, filterMeta, index) {
|
|
5983
6410
|
var filterValue = filterMeta.value;
|
|
5984
|
-
var filterMatchMode = filterMeta.matchMode === 'custom' ? "custom_".concat(field) : filterMeta.matchMode || PrimeReact.FilterMatchMode.STARTS_WITH;
|
|
6411
|
+
var filterMatchMode = filterMeta.matchMode === 'custom' ? "custom_".concat(field) : filterMeta.matchMode || PrimeReact$1.FilterMatchMode.STARTS_WITH;
|
|
5985
6412
|
var dataFieldValue = utils.ObjectUtils.resolveFieldData(rowData, field);
|
|
5986
|
-
var filterConstraint = PrimeReact.FilterService.filters[filterMatchMode];
|
|
6413
|
+
var filterConstraint = PrimeReact$1.FilterService.filters[filterMatchMode];
|
|
5987
6414
|
return utils.ObjectUtils.isFunction(filterConstraint) && filterConstraint(dataFieldValue, filterValue, props.filterLocale, index);
|
|
5988
6415
|
};
|
|
5989
6416
|
var cloneFilters = function cloneFilters(filters) {
|
|
@@ -6007,13 +6434,13 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref)
|
|
|
6007
6434
|
var field = getColumnProp(col, 'filterField') || getColumnProp(col, 'field');
|
|
6008
6435
|
var filterFunction = getColumnProp(col, 'filterFunction');
|
|
6009
6436
|
var dataType = getColumnProp(col, 'dataType');
|
|
6010
|
-
var matchMode = getColumnProp(col, 'filterMatchMode') || (context && context.filterMatchModeOptions[dataType] || PrimeReact__default["default"].filterMatchModeOptions[dataType] ? context && context.filterMatchModeOptions[dataType][0] || PrimeReact__default["default"].filterMatchModeOptions[dataType][0] : PrimeReact.FilterMatchMode.STARTS_WITH);
|
|
6437
|
+
var matchMode = getColumnProp(col, 'filterMatchMode') || (context && context.filterMatchModeOptions[dataType] || PrimeReact__default["default"].filterMatchModeOptions[dataType] ? context && context.filterMatchModeOptions[dataType][0] || PrimeReact__default["default"].filterMatchModeOptions[dataType][0] : PrimeReact$1.FilterMatchMode.STARTS_WITH);
|
|
6011
6438
|
var constraint = {
|
|
6012
6439
|
value: null,
|
|
6013
6440
|
matchMode: matchMode
|
|
6014
6441
|
};
|
|
6015
6442
|
if (filterFunction) {
|
|
6016
|
-
PrimeReact.FilterService.register("custom_".concat(field), function () {
|
|
6443
|
+
PrimeReact$1.FilterService.register("custom_".concat(field), function () {
|
|
6017
6444
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
6018
6445
|
args[_key] = arguments[_key];
|
|
6019
6446
|
}
|
|
@@ -6023,7 +6450,7 @@ var DataTable = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref)
|
|
|
6023
6450
|
});
|
|
6024
6451
|
}
|
|
6025
6452
|
filters[field] = props.filterDisplay === 'menu' ? {
|
|
6026
|
-
operator: PrimeReact.FilterOperator.AND,
|
|
6453
|
+
operator: PrimeReact$1.FilterOperator.AND,
|
|
6027
6454
|
constraints: [constraint]
|
|
6028
6455
|
} : constraint;
|
|
6029
6456
|
return filters;
|