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
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import PrimeReact$1, { FilterMatchMode as FilterMatchMode$1, ariaLabel as ariaLabel$1, localeOption, PrimeReactContext, FilterOperator, FilterService } from 'primereact/api';
|
|
4
5
|
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
5
|
-
import { ObjectUtils, classNames, IconUtils, DomHandler,
|
|
6
|
-
import { useMergeProps, useEventListener, useUpdateEffect, useUnmountEffect, useOverlayListener, usePrevious
|
|
6
|
+
import { ObjectUtils, classNames, IconUtils, DomHandler, UniqueComponentId, ZIndexUtils } from 'primereact/utils';
|
|
7
|
+
import { useMergeProps, useEventListener, useUpdateEffect, useUnmountEffect, useStyle, useMountEffect, useOverlayListener, usePrevious } from 'primereact/hooks';
|
|
7
8
|
import { ArrowDownIcon } from 'primereact/icons/arrowdown';
|
|
8
9
|
import { ArrowUpIcon } from 'primereact/icons/arrowup';
|
|
9
10
|
import { SpinnerIcon } from 'primereact/icons/spinner';
|
|
@@ -250,9 +251,9 @@ var ColumnBase = ComponentBase.extend({
|
|
|
250
251
|
}
|
|
251
252
|
});
|
|
252
253
|
|
|
253
|
-
function ownKeys$
|
|
254
|
-
function _objectSpread$
|
|
255
|
-
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";
|
|
254
|
+
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; }
|
|
255
|
+
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; }
|
|
256
|
+
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";
|
|
256
257
|
var classes = {
|
|
257
258
|
root: function root(_ref) {
|
|
258
259
|
var props = _ref.props,
|
|
@@ -390,8 +391,8 @@ var classes = {
|
|
|
390
391
|
getColumnProp = _ref11.getColumnProp;
|
|
391
392
|
return classNames('p-column-filter-overlay p-component p-fluid', getColumnProp('filterMenuClassName'), {
|
|
392
393
|
'p-column-filter-overlay-menu': props.display === 'menu',
|
|
393
|
-
'p-input-filled': context && context.inputStyle === 'filled' || PrimeReact.inputStyle === 'filled',
|
|
394
|
-
'p-ripple-disabled': context && context.ripple === false || PrimeReact.ripple === false
|
|
394
|
+
'p-input-filled': context && context.inputStyle === 'filled' || PrimeReact$1.inputStyle === 'filled',
|
|
395
|
+
'p-ripple-disabled': context && context.ripple === false || PrimeReact$1.ripple === false
|
|
395
396
|
});
|
|
396
397
|
},
|
|
397
398
|
columnFilter: function columnFilter(_ref12) {
|
|
@@ -490,11 +491,11 @@ var inlineStyles = {
|
|
|
490
491
|
},
|
|
491
492
|
reorderIndicatorUp: function reorderIndicatorUp(_ref20) {
|
|
492
493
|
var style = _ref20.style;
|
|
493
|
-
return _objectSpread$
|
|
494
|
+
return _objectSpread$c({}, style);
|
|
494
495
|
},
|
|
495
496
|
reorderIndicatorDown: function reorderIndicatorDown(_ref21) {
|
|
496
497
|
var style = _ref21.style;
|
|
497
|
-
return _objectSpread$
|
|
498
|
+
return _objectSpread$c({}, style);
|
|
498
499
|
}
|
|
499
500
|
};
|
|
500
501
|
var DataTableBase = ComponentBase.extend({
|
|
@@ -539,7 +540,7 @@ var DataTableBase = ComponentBase.extend({
|
|
|
539
540
|
frozenWidth: null,
|
|
540
541
|
globalFilter: null,
|
|
541
542
|
globalFilterFields: null,
|
|
542
|
-
globalFilterMatchMode: FilterMatchMode.CONTAINS,
|
|
543
|
+
globalFilterMatchMode: FilterMatchMode$1.CONTAINS,
|
|
543
544
|
groupRowsBy: null,
|
|
544
545
|
header: null,
|
|
545
546
|
headerColumnGroup: null,
|
|
@@ -645,7 +646,7 @@ var DataTableBase = ComponentBase.extend({
|
|
|
645
646
|
children: undefined
|
|
646
647
|
},
|
|
647
648
|
css: {
|
|
648
|
-
styles: styles,
|
|
649
|
+
styles: styles$1,
|
|
649
650
|
classes: classes,
|
|
650
651
|
inlineStyles: inlineStyles
|
|
651
652
|
}
|
|
@@ -680,8 +681,8 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
680
681
|
return target;
|
|
681
682
|
}
|
|
682
683
|
|
|
683
|
-
function ownKeys$
|
|
684
|
-
function _objectSpread$
|
|
684
|
+
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; }
|
|
685
|
+
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; }
|
|
685
686
|
var RowCheckbox = /*#__PURE__*/React.memo(function (props) {
|
|
686
687
|
var _React$useState = React.useState(false),
|
|
687
688
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -737,7 +738,7 @@ var RowCheckbox = /*#__PURE__*/React.memo(function (props) {
|
|
|
737
738
|
className: cx('checkboxIcon')
|
|
738
739
|
}, getColumnPTOptions('checkboxIcon'));
|
|
739
740
|
var icon = props.checked ? props.checkIcon || /*#__PURE__*/React.createElement(CheckIcon, checkboxIconProps) : null;
|
|
740
|
-
var checkIcon = IconUtils.getJSXIcon(icon, _objectSpread$
|
|
741
|
+
var checkIcon = IconUtils.getJSXIcon(icon, _objectSpread$b({}, checkboxIconProps), {
|
|
741
742
|
props: props
|
|
742
743
|
});
|
|
743
744
|
var tabIndex = props.disabled ? null : '0';
|
|
@@ -875,8 +876,8 @@ var RowRadioButton = /*#__PURE__*/React.memo(function (props) {
|
|
|
875
876
|
});
|
|
876
877
|
RowRadioButton.displayName = 'RowRadioButton';
|
|
877
878
|
|
|
878
|
-
function ownKeys$
|
|
879
|
-
function _objectSpread$
|
|
879
|
+
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; }
|
|
880
|
+
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; }
|
|
880
881
|
var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
881
882
|
var mergeProps = useMergeProps();
|
|
882
883
|
var _React$useState = React.useState(props.editing),
|
|
@@ -983,7 +984,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
983
984
|
};
|
|
984
985
|
var getCellCallbackParams = function getCellCallbackParams(event) {
|
|
985
986
|
var params = getCellParams();
|
|
986
|
-
return _objectSpread$
|
|
987
|
+
return _objectSpread$a({
|
|
987
988
|
originalEvent: event
|
|
988
989
|
}, params);
|
|
989
990
|
};
|
|
@@ -1022,7 +1023,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
1022
1023
|
setEditingRowDataState(function (prev) {
|
|
1023
1024
|
var newRowData = prev;
|
|
1024
1025
|
var newValue = resolveFieldData(newRowData);
|
|
1025
|
-
var params = _objectSpread$
|
|
1026
|
+
var params = _objectSpread$a(_objectSpread$a({}, callbackParams), {}, {
|
|
1026
1027
|
newRowData: newRowData,
|
|
1027
1028
|
newValue: newValue
|
|
1028
1029
|
});
|
|
@@ -1092,7 +1093,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
1092
1093
|
};
|
|
1093
1094
|
var updateStickyPosition = function updateStickyPosition() {
|
|
1094
1095
|
if (getColumnProp('frozen')) {
|
|
1095
|
-
var styleObject = _objectSpread$
|
|
1096
|
+
var styleObject = _objectSpread$a({}, styleObjectState);
|
|
1096
1097
|
var align = getColumnProp('alignFrozen');
|
|
1097
1098
|
if (align === 'right') {
|
|
1098
1099
|
var right = 0;
|
|
@@ -1114,7 +1115,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
1114
1115
|
}
|
|
1115
1116
|
};
|
|
1116
1117
|
var editorCallback = function editorCallback(val) {
|
|
1117
|
-
var editingRowData = _objectSpread$
|
|
1118
|
+
var editingRowData = _objectSpread$a({}, editingRowDataState);
|
|
1118
1119
|
ObjectUtils.mutateFieldData(editingRowData, field, val);
|
|
1119
1120
|
setEditingRowDataState(editingRowData);
|
|
1120
1121
|
|
|
@@ -1321,7 +1322,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
1321
1322
|
React.useEffect(function () {
|
|
1322
1323
|
if (props.editMode === 'cell' || props.editMode === 'row') {
|
|
1323
1324
|
var callbackParams = getCellCallbackParams();
|
|
1324
|
-
var params = _objectSpread$
|
|
1325
|
+
var params = _objectSpread$a(_objectSpread$a({}, callbackParams), {}, {
|
|
1325
1326
|
editing: editingState,
|
|
1326
1327
|
editingKey: editingKey
|
|
1327
1328
|
});
|
|
@@ -1346,7 +1347,9 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
1346
1347
|
field: field
|
|
1347
1348
|
});
|
|
1348
1349
|
var content = ObjectUtils.getJSXElement(getVirtualScrollerOption('loadingTemplate'), options);
|
|
1349
|
-
var bodyCellProps = mergeProps(getColumnPTOptions('bodyCell')
|
|
1350
|
+
var bodyCellProps = mergeProps(getColumnPTOptions('bodyCell'), {
|
|
1351
|
+
role: 'cell'
|
|
1352
|
+
});
|
|
1350
1353
|
return /*#__PURE__*/React.createElement("td", bodyCellProps, content);
|
|
1351
1354
|
};
|
|
1352
1355
|
var createElement = function createElement() {
|
|
@@ -1389,7 +1392,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
1389
1392
|
if (showSelection) {
|
|
1390
1393
|
var ariaLabelField = props.selectionAriaLabel || props.tableProps.dataKey;
|
|
1391
1394
|
var ariaLabelText = ObjectUtils.resolveFieldData(props.rowData, ariaLabelField);
|
|
1392
|
-
label = "".concat(props.selected ? ariaLabel('unselectLabel') : ariaLabel('selectLabel'), " ").concat(ariaLabelText);
|
|
1395
|
+
label = "".concat(props.selected ? ariaLabel$1('unselectLabel') : ariaLabel$1('selectLabel'), " ").concat(ariaLabelText);
|
|
1393
1396
|
}
|
|
1394
1397
|
content = showSelection && /*#__PURE__*/React.createElement(React.Fragment, null, selectionMode === 'single' && /*#__PURE__*/React.createElement(RowRadioButton, {
|
|
1395
1398
|
hostName: props.hostName,
|
|
@@ -1429,7 +1432,7 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
1429
1432
|
className: cx('rowReorderIcon')
|
|
1430
1433
|
}, getColumnPTOptions('rowReorderIcon'));
|
|
1431
1434
|
var rowReorderIcon = getColumnProp('rowReorderIcon') || /*#__PURE__*/React.createElement(BarsIcon, rowReorderIconProps);
|
|
1432
|
-
content = showReorder ? IconUtils.getJSXIcon(rowReorderIcon, _objectSpread$
|
|
1435
|
+
content = showReorder ? IconUtils.getJSXIcon(rowReorderIcon, _objectSpread$a({}, rowReorderIconProps), {
|
|
1433
1436
|
props: props
|
|
1434
1437
|
}) : null;
|
|
1435
1438
|
} else if (expander) {
|
|
@@ -1438,18 +1441,18 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
1438
1441
|
'aria-hidden': true
|
|
1439
1442
|
}, getColumnPTOptions('rowTogglerIcon'));
|
|
1440
1443
|
var icon = props.expanded ? props.expandedRowIcon || /*#__PURE__*/React.createElement(ChevronDownIcon, rowTogglerIconProps) : props.collapsedRowIcon || /*#__PURE__*/React.createElement(ChevronRightIcon, rowTogglerIconProps);
|
|
1441
|
-
var togglerIcon = IconUtils.getJSXIcon(icon, _objectSpread$
|
|
1444
|
+
var togglerIcon = IconUtils.getJSXIcon(icon, _objectSpread$a({}, rowTogglerIconProps), {
|
|
1442
1445
|
props: props
|
|
1443
1446
|
});
|
|
1444
1447
|
var ariaControls = "".concat(props.tableSelector, "_content_").concat(props.rowIndex, "_expanded");
|
|
1445
1448
|
var _ariaLabelField = props.selectionAriaLabel || props.tableProps.dataKey;
|
|
1446
1449
|
var _ariaLabelText = ObjectUtils.resolveFieldData(props.rowData, _ariaLabelField);
|
|
1447
|
-
var _label = "".concat(props.expanded ? ariaLabel('collapseLabel') : ariaLabel('expandLabel'), " ").concat(_ariaLabelText);
|
|
1450
|
+
var _label = "".concat(props.expanded ? ariaLabel$1('collapseLabel') : ariaLabel$1('expandLabel'), " ").concat(_ariaLabelText);
|
|
1448
1451
|
var expanderProps = {
|
|
1449
1452
|
onClick: onRowToggle,
|
|
1450
1453
|
className: cx('rowToggler')
|
|
1451
1454
|
};
|
|
1452
|
-
var rowTogglerProps = mergeProps(_objectSpread$
|
|
1455
|
+
var rowTogglerProps = mergeProps(_objectSpread$a(_objectSpread$a({}, expanderProps), {}, {
|
|
1453
1456
|
type: 'button',
|
|
1454
1457
|
'aria-expanded': props.expanded,
|
|
1455
1458
|
'aria-controls': ariaControls,
|
|
@@ -1479,13 +1482,13 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
1479
1482
|
var rowEditorInitIconProps = mergeProps({
|
|
1480
1483
|
className: cx('rowEditorInitIcon')
|
|
1481
1484
|
}, getColumnPTOptions('rowEditorInitIcon'));
|
|
1482
|
-
var rowEditorSaveIcon = IconUtils.getJSXIcon(props.rowEditorSaveIcon || /*#__PURE__*/React.createElement(CheckIcon, rowEditorSaveIconProps), _objectSpread$
|
|
1485
|
+
var rowEditorSaveIcon = IconUtils.getJSXIcon(props.rowEditorSaveIcon || /*#__PURE__*/React.createElement(CheckIcon, rowEditorSaveIconProps), _objectSpread$a({}, rowEditorSaveIconProps), {
|
|
1483
1486
|
props: props
|
|
1484
1487
|
});
|
|
1485
|
-
var rowEditorCancelIcon = IconUtils.getJSXIcon(props.rowEditorCancelIcon || /*#__PURE__*/React.createElement(TimesIcon, rowEditorCancelIconProps), _objectSpread$
|
|
1488
|
+
var rowEditorCancelIcon = IconUtils.getJSXIcon(props.rowEditorCancelIcon || /*#__PURE__*/React.createElement(TimesIcon, rowEditorCancelIconProps), _objectSpread$a({}, rowEditorCancelIconProps), {
|
|
1486
1489
|
props: props
|
|
1487
1490
|
});
|
|
1488
|
-
var rowEditorInitIcon = IconUtils.getJSXIcon(props.rowEditorInitIcon || /*#__PURE__*/React.createElement(PencilIcon, rowEditorInitIconProps), _objectSpread$
|
|
1491
|
+
var rowEditorInitIcon = IconUtils.getJSXIcon(props.rowEditorInitIcon || /*#__PURE__*/React.createElement(PencilIcon, rowEditorInitIconProps), _objectSpread$a({}, rowEditorInitIconProps), {
|
|
1489
1492
|
props: props
|
|
1490
1493
|
});
|
|
1491
1494
|
if (editingState) {
|
|
@@ -1496,21 +1499,22 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
1496
1499
|
onCancelClick: onRowEditCancel,
|
|
1497
1500
|
cancelClassName: cx('rowEditorCancelButton')
|
|
1498
1501
|
};
|
|
1499
|
-
var rowEditorSaveButtonProps = mergeProps({
|
|
1502
|
+
var rowEditorSaveButtonProps = mergeProps(_defineProperty(_defineProperty({
|
|
1500
1503
|
type: 'button',
|
|
1501
1504
|
name: 'row-save',
|
|
1505
|
+
'aria-label': ariaLabel$1('saveEdit'),
|
|
1502
1506
|
onClick: rowEditorProps.onSaveClick,
|
|
1503
1507
|
className: rowEditorProps.saveClassName,
|
|
1504
|
-
tabIndex: props.tabIndex
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
var rowEditorCancelButtonProps = mergeProps({
|
|
1508
|
+
tabIndex: props.tabIndex
|
|
1509
|
+
}, "aria-label", ariaLabel$1('saveEdit')), 'data-p-row-editor-save', true), getColumnPTOptions('rowEditorSaveButton'));
|
|
1510
|
+
var rowEditorCancelButtonProps = mergeProps(_defineProperty({
|
|
1508
1511
|
type: 'button',
|
|
1509
1512
|
name: 'row-cancel',
|
|
1513
|
+
'aria-label': ariaLabel$1('cancelEdit'),
|
|
1510
1514
|
onClick: rowEditorProps.onCancelClick,
|
|
1511
1515
|
className: rowEditorProps.cancelClassName,
|
|
1512
1516
|
tabIndex: props.tabIndex
|
|
1513
|
-
}, getColumnPTOptions('rowEditorCancelButton'));
|
|
1517
|
+
}, "aria-label", ariaLabel$1('cancelEdit')), getColumnPTOptions('rowEditorCancelButton'));
|
|
1514
1518
|
content = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", rowEditorSaveButtonProps, rowEditorSaveIcon, /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement("button", rowEditorCancelButtonProps, rowEditorCancelIcon, /*#__PURE__*/React.createElement(Ripple, null)));
|
|
1515
1519
|
} else {
|
|
1516
1520
|
rowEditorProps = {
|
|
@@ -1518,14 +1522,14 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
1518
1522
|
onInitClick: onRowEditInit,
|
|
1519
1523
|
initClassName: cx('rowEditorInitButton')
|
|
1520
1524
|
};
|
|
1521
|
-
var rowEditorInitButtonProps = mergeProps({
|
|
1525
|
+
var rowEditorInitButtonProps = mergeProps(_defineProperty(_defineProperty({
|
|
1522
1526
|
type: 'button',
|
|
1523
1527
|
name: 'row-edit',
|
|
1528
|
+
'aria-label': ariaLabel$1('editRow'),
|
|
1524
1529
|
onClick: rowEditorProps.onInitClick,
|
|
1525
1530
|
className: rowEditorProps.initClassName,
|
|
1526
|
-
tabIndex: props.tabIndex
|
|
1527
|
-
|
|
1528
|
-
}, getColumnPTOptions('rowEditorInitButton'));
|
|
1531
|
+
tabIndex: props.tabIndex
|
|
1532
|
+
}, "aria-label", ariaLabel$1('editRow')), 'data-p-row-editor-init', true), getColumnPTOptions('rowEditorInitButton'));
|
|
1529
1533
|
content = /*#__PURE__*/React.createElement("button", rowEditorInitButtonProps, rowEditorInitIcon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
1530
1534
|
}
|
|
1531
1535
|
if (body) {
|
|
@@ -1625,8 +1629,8 @@ var BodyCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
1625
1629
|
});
|
|
1626
1630
|
BodyCell.displayName = 'BodyCell';
|
|
1627
1631
|
|
|
1628
|
-
function ownKeys$
|
|
1629
|
-
function _objectSpread$
|
|
1632
|
+
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; }
|
|
1633
|
+
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; }
|
|
1630
1634
|
var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
1631
1635
|
var mergeProps = useMergeProps();
|
|
1632
1636
|
var _React$useState = React.useState(false),
|
|
@@ -1685,6 +1689,10 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
|
1685
1689
|
nextRow.tabIndex = props.tabIndex;
|
|
1686
1690
|
}
|
|
1687
1691
|
};
|
|
1692
|
+
var findFirstSelectableRow = function findFirstSelectableRow(row) {
|
|
1693
|
+
var firstRow = DomHandler.findSingle(row.parentNode, 'tr[data-p-selectable-row]');
|
|
1694
|
+
return firstRow ? firstRow : null;
|
|
1695
|
+
};
|
|
1688
1696
|
var findNextSelectableRow = function findNextSelectableRow(row) {
|
|
1689
1697
|
var nextRow = row.nextElementSibling;
|
|
1690
1698
|
return nextRow ? DomHandler.getAttribute(nextRow, 'data-p-selectable-row') === true ? nextRow : findNextSelectableRow(nextRow) : null;
|
|
@@ -1693,6 +1701,10 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
|
1693
1701
|
var prevRow = row.previousElementSibling;
|
|
1694
1702
|
return prevRow ? DomHandler.getAttribute(prevRow, 'data-p-selectable-row') === true ? prevRow : findPrevSelectableRow(prevRow) : null;
|
|
1695
1703
|
};
|
|
1704
|
+
var findLastSelectableRow = function findLastSelectableRow(row) {
|
|
1705
|
+
var lastRow = DomHandler.findSingle(row.parentNode, 'tr[data-p-selectable-row]:last-child');
|
|
1706
|
+
return lastRow ? lastRow : null;
|
|
1707
|
+
};
|
|
1696
1708
|
var shouldRenderBodyCell = function shouldRenderBodyCell(value, column, i) {
|
|
1697
1709
|
if (getColumnProp(column, 'hidden')) {
|
|
1698
1710
|
return false;
|
|
@@ -1781,46 +1793,90 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
|
1781
1793
|
if (isFocusable() && !props.allowCellSelection) {
|
|
1782
1794
|
var target = event.target,
|
|
1783
1795
|
row = event.currentTarget;
|
|
1784
|
-
switch (event.
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
var nextRow = findNextSelectableRow(row);
|
|
1788
|
-
if (nextRow) {
|
|
1789
|
-
changeTabIndex(row, nextRow);
|
|
1790
|
-
nextRow.focus();
|
|
1791
|
-
}
|
|
1792
|
-
event.preventDefault();
|
|
1796
|
+
switch (event.code) {
|
|
1797
|
+
case 'ArrowDown':
|
|
1798
|
+
onArrowDownKey(row, event);
|
|
1793
1799
|
break;
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
case 38:
|
|
1797
|
-
var prevRow = findPrevSelectableRow(row);
|
|
1798
|
-
if (prevRow) {
|
|
1799
|
-
changeTabIndex(row, prevRow);
|
|
1800
|
-
prevRow.focus();
|
|
1801
|
-
}
|
|
1802
|
-
event.preventDefault();
|
|
1800
|
+
case 'ArrowUp':
|
|
1801
|
+
onArrowUpKey(row, event);
|
|
1803
1802
|
break;
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
case 13:
|
|
1807
|
-
// @deprecated
|
|
1808
|
-
if (!DomHandler.isClickable(target)) {
|
|
1809
|
-
_onClick(event);
|
|
1810
|
-
event.preventDefault();
|
|
1811
|
-
}
|
|
1803
|
+
case 'Home':
|
|
1804
|
+
onHomeKey(row, event);
|
|
1812
1805
|
break;
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1806
|
+
case 'End':
|
|
1807
|
+
onEndKey(row, event);
|
|
1808
|
+
break;
|
|
1809
|
+
case 'Enter':
|
|
1810
|
+
onEnterKey(row, event, target);
|
|
1811
|
+
break;
|
|
1812
|
+
case 'Space':
|
|
1813
|
+
onSpaceKey(row, event, target);
|
|
1814
|
+
break;
|
|
1815
|
+
case 'Tab':
|
|
1816
|
+
onTabKey(row, event);
|
|
1820
1817
|
break;
|
|
1821
1818
|
}
|
|
1822
1819
|
}
|
|
1823
1820
|
};
|
|
1821
|
+
var onArrowDownKey = function onArrowDownKey(row, event) {
|
|
1822
|
+
var nextRow = findNextSelectableRow(row);
|
|
1823
|
+
if (nextRow) {
|
|
1824
|
+
changeTabIndex(row, nextRow);
|
|
1825
|
+
nextRow.focus();
|
|
1826
|
+
}
|
|
1827
|
+
event.preventDefault();
|
|
1828
|
+
};
|
|
1829
|
+
var onArrowUpKey = function onArrowUpKey(row, event) {
|
|
1830
|
+
var prevRow = findPrevSelectableRow(row);
|
|
1831
|
+
if (prevRow) {
|
|
1832
|
+
changeTabIndex(row, prevRow);
|
|
1833
|
+
prevRow.focus();
|
|
1834
|
+
}
|
|
1835
|
+
event.preventDefault();
|
|
1836
|
+
};
|
|
1837
|
+
var onHomeKey = function onHomeKey(row, event) {
|
|
1838
|
+
var firstRow = findFirstSelectableRow(row);
|
|
1839
|
+
if (firstRow) {
|
|
1840
|
+
changeTabIndex(row, firstRow);
|
|
1841
|
+
firstRow.focus();
|
|
1842
|
+
}
|
|
1843
|
+
event.preventDefault();
|
|
1844
|
+
};
|
|
1845
|
+
var onEndKey = function onEndKey(row, event) {
|
|
1846
|
+
var lastRow = findLastSelectableRow(row);
|
|
1847
|
+
if (lastRow) {
|
|
1848
|
+
changeTabIndex(row, lastRow);
|
|
1849
|
+
lastRow.focus();
|
|
1850
|
+
}
|
|
1851
|
+
event.preventDefault();
|
|
1852
|
+
};
|
|
1853
|
+
var onEnterKey = function onEnterKey(row, event, target) {
|
|
1854
|
+
if (!DomHandler.isClickable(target)) {
|
|
1855
|
+
_onClick(event);
|
|
1856
|
+
event.preventDefault();
|
|
1857
|
+
}
|
|
1858
|
+
};
|
|
1859
|
+
var onSpaceKey = function onSpaceKey(row, event, target) {
|
|
1860
|
+
if (!DomHandler.isClickable(target) && !target.readOnly) {
|
|
1861
|
+
_onClick(event);
|
|
1862
|
+
event.preventDefault();
|
|
1863
|
+
}
|
|
1864
|
+
};
|
|
1865
|
+
var onTabKey = function onTabKey(row, event) {
|
|
1866
|
+
var parent = row.parentNode;
|
|
1867
|
+
var rows = DomHandler.find(parent, 'tr[data-p-selectable-row="true"]');
|
|
1868
|
+
if (event.code === 'Tab' && rows && rows.length > 0) {
|
|
1869
|
+
var firstSelectedRow = DomHandler.findSingle(parent, 'tr[data-p-highlight="true"]');
|
|
1870
|
+
var focusedItem = DomHandler.findSingle(parent, 'tr[data-p-selectable-row="true"][tabindex="0"]');
|
|
1871
|
+
if (firstSelectedRow) {
|
|
1872
|
+
firstSelectedRow.tabIndex = '0';
|
|
1873
|
+
focusedItem && focusedItem !== firstSelectedRow && (focusedItem.tabIndex = '-1');
|
|
1874
|
+
} else {
|
|
1875
|
+
rows[0].tabIndex = '0';
|
|
1876
|
+
focusedItem !== rows[0] && (rows[rowIndex].tabIndex = '-1');
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
};
|
|
1824
1880
|
var _onMouseDown = function onMouseDown(event) {
|
|
1825
1881
|
props.onRowMouseDown({
|
|
1826
1882
|
originalEvent: event,
|
|
@@ -1880,7 +1936,7 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
|
1880
1936
|
newData = e.newData;
|
|
1881
1937
|
if (dataKey) {
|
|
1882
1938
|
var dataKeyValue = String(ObjectUtils.resolveFieldData(data, dataKey));
|
|
1883
|
-
editingRows = props.editingRows ? _objectSpread$
|
|
1939
|
+
editingRows = props.editingRows ? _objectSpread$9({}, props.editingRows) : {};
|
|
1884
1940
|
if (!isEditing) {
|
|
1885
1941
|
delete editingRows[dataKeyValue];
|
|
1886
1942
|
// if the key value was changed, stop editing for the new key value too
|
|
@@ -2072,6 +2128,7 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
|
2072
2128
|
onDrop: function onDrop(e) {
|
|
2073
2129
|
return _onDrop(e);
|
|
2074
2130
|
},
|
|
2131
|
+
'aria-selected': props !== null && props !== void 0 && props.selectionMode ? props.selected : null,
|
|
2075
2132
|
'data-p-selectable-row': props.allowRowSelection && props.isSelectable({
|
|
2076
2133
|
data: props.rowData,
|
|
2077
2134
|
index: props.rowIndex
|
|
@@ -2083,8 +2140,8 @@ var BodyRow = /*#__PURE__*/React.memo(function (props) {
|
|
|
2083
2140
|
});
|
|
2084
2141
|
BodyRow.displayName = 'BodyRow';
|
|
2085
2142
|
|
|
2086
|
-
function ownKeys$
|
|
2087
|
-
function _objectSpread$
|
|
2143
|
+
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; }
|
|
2144
|
+
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; }
|
|
2088
2145
|
var RowTogglerButton = /*#__PURE__*/React.memo(function (props) {
|
|
2089
2146
|
var mergeProps = useMergeProps();
|
|
2090
2147
|
var _props$ptCallbacks = props.ptCallbacks,
|
|
@@ -2116,10 +2173,10 @@ var RowTogglerButton = /*#__PURE__*/React.memo(function (props) {
|
|
|
2116
2173
|
'aria-hidden': true
|
|
2117
2174
|
}, getColumnPTOptions('rowGroupTogglerIcon'));
|
|
2118
2175
|
var icon = props.expanded ? props.expandedRowIcon || /*#__PURE__*/React.createElement(ChevronDownIcon, rowGroupTogglerIconProps) : props.collapsedRowIcon || /*#__PURE__*/React.createElement(ChevronRightIcon, rowGroupTogglerIconProps);
|
|
2119
|
-
var togglerIcon = IconUtils.getJSXIcon(icon, _objectSpread$
|
|
2176
|
+
var togglerIcon = IconUtils.getJSXIcon(icon, _objectSpread$8({}, rowGroupTogglerIconProps), {
|
|
2120
2177
|
props: props
|
|
2121
2178
|
});
|
|
2122
|
-
var label = props.expanded ? ariaLabel('collapseLabel') : ariaLabel('expandLabel');
|
|
2179
|
+
var label = props.expanded ? ariaLabel$1('collapseLabel') : ariaLabel$1('expandLabel');
|
|
2123
2180
|
var rowGroupTogglerProps = mergeProps({
|
|
2124
2181
|
type: 'button',
|
|
2125
2182
|
onClick: function onClick(e) {
|
|
@@ -2134,8 +2191,8 @@ var RowTogglerButton = /*#__PURE__*/React.memo(function (props) {
|
|
|
2134
2191
|
RowTogglerButton.displayName = 'RowTogglerButton';
|
|
2135
2192
|
|
|
2136
2193
|
var _excluded = ["originalEvent"];
|
|
2137
|
-
function ownKeys$
|
|
2138
|
-
function _objectSpread$
|
|
2194
|
+
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; }
|
|
2195
|
+
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; }
|
|
2139
2196
|
var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
2140
2197
|
var mergeProps = useMergeProps();
|
|
2141
2198
|
var _props$ptCallbacks = props.ptCallbacks,
|
|
@@ -2540,14 +2597,14 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
2540
2597
|
return selection;
|
|
2541
2598
|
};
|
|
2542
2599
|
var onSelect = function onSelect(event) {
|
|
2543
|
-
if (allowCellSelection()) props.onCellSelect && props.onCellSelect(_objectSpread$
|
|
2600
|
+
if (allowCellSelection()) props.onCellSelect && props.onCellSelect(_objectSpread$7(_objectSpread$7({
|
|
2544
2601
|
originalEvent: event.originalEvent
|
|
2545
2602
|
}, event.data), {}, {
|
|
2546
2603
|
type: event.type
|
|
2547
2604
|
}));else props.onRowSelect && props.onRowSelect(event);
|
|
2548
2605
|
};
|
|
2549
2606
|
var onUnselect = function onUnselect(event) {
|
|
2550
|
-
if (allowCellSelection()) props.onCellUnselect && props.onCellUnselect(_objectSpread$
|
|
2607
|
+
if (allowCellSelection()) props.onCellUnselect && props.onCellUnselect(_objectSpread$7(_objectSpread$7({
|
|
2551
2608
|
originalEvent: event.originalEvent
|
|
2552
2609
|
}, event.data), {}, {
|
|
2553
2610
|
type: event.type
|
|
@@ -2606,12 +2663,12 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
2606
2663
|
rangeRowIndex.current = event.index;
|
|
2607
2664
|
anchorRowFirst.current = props.first;
|
|
2608
2665
|
if (isSingleSelection()) {
|
|
2609
|
-
onSingleSelection(_objectSpread$
|
|
2666
|
+
onSingleSelection(_objectSpread$7(_objectSpread$7({}, event), {}, {
|
|
2610
2667
|
toggleable: toggleable,
|
|
2611
2668
|
type: 'row'
|
|
2612
2669
|
}));
|
|
2613
2670
|
} else {
|
|
2614
|
-
onMultipleSelection(_objectSpread$
|
|
2671
|
+
onMultipleSelection(_objectSpread$7(_objectSpread$7({}, event), {}, {
|
|
2615
2672
|
toggleable: toggleable,
|
|
2616
2673
|
type: 'row'
|
|
2617
2674
|
}));
|
|
@@ -2701,7 +2758,7 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
2701
2758
|
var hasDataKey = props.groupRowsBy ? dataKey === props.groupRowsBy : !!dataKey;
|
|
2702
2759
|
if (hasDataKey) {
|
|
2703
2760
|
var dataKeyValue = String(ObjectUtils.resolveFieldData(event.data, dataKey));
|
|
2704
|
-
expandedRows = props.expandedRows ? _objectSpread$
|
|
2761
|
+
expandedRows = props.expandedRows ? _objectSpread$7({}, props.expandedRows) : {};
|
|
2705
2762
|
if (expandedRows[dataKeyValue] != null) {
|
|
2706
2763
|
delete expandedRows[dataKeyValue];
|
|
2707
2764
|
if (props.onRowCollapse) {
|
|
@@ -2835,13 +2892,13 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
2835
2892
|
event.preventDefault();
|
|
2836
2893
|
};
|
|
2837
2894
|
var onRadioChange = function onRadioChange(event) {
|
|
2838
|
-
onSingleSelection(_objectSpread$
|
|
2895
|
+
onSingleSelection(_objectSpread$7(_objectSpread$7({}, event), {}, {
|
|
2839
2896
|
toggleable: true,
|
|
2840
2897
|
type: 'radio'
|
|
2841
2898
|
}));
|
|
2842
2899
|
};
|
|
2843
2900
|
var onCheckboxChange = function onCheckboxChange(event) {
|
|
2844
|
-
onMultipleSelection(_objectSpread$
|
|
2901
|
+
onMultipleSelection(_objectSpread$7(_objectSpread$7({}, event), {}, {
|
|
2845
2902
|
toggleable: true,
|
|
2846
2903
|
type: 'checkbox'
|
|
2847
2904
|
}));
|
|
@@ -3146,7 +3203,8 @@ var TableBody = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
3146
3203
|
style: props.style,
|
|
3147
3204
|
className: cx(ptKey, {
|
|
3148
3205
|
className: props.className
|
|
3149
|
-
})
|
|
3206
|
+
}),
|
|
3207
|
+
role: ' rowgroup'
|
|
3150
3208
|
}, ptm(ptKey, {
|
|
3151
3209
|
hostName: props.hostName
|
|
3152
3210
|
}));
|
|
@@ -3181,8 +3239,8 @@ var RowBase = ComponentBase.extend({
|
|
|
3181
3239
|
}
|
|
3182
3240
|
});
|
|
3183
3241
|
|
|
3184
|
-
function ownKeys$
|
|
3185
|
-
function _objectSpread$
|
|
3242
|
+
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; }
|
|
3243
|
+
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; }
|
|
3186
3244
|
var FooterCell = /*#__PURE__*/React.memo(function (props) {
|
|
3187
3245
|
var _React$useState = React.useState({}),
|
|
3188
3246
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -3226,7 +3284,7 @@ var FooterCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
3226
3284
|
};
|
|
3227
3285
|
var updateStickyPosition = function updateStickyPosition() {
|
|
3228
3286
|
if (getColumnProp('frozen')) {
|
|
3229
|
-
var styleObject = _objectSpread$
|
|
3287
|
+
var styleObject = _objectSpread$6({}, styleObjectState);
|
|
3230
3288
|
var _align = getColumnProp('alignFrozen');
|
|
3231
3289
|
if (_align === 'right') {
|
|
3232
3290
|
var right = 0;
|
|
@@ -3357,7 +3415,8 @@ var TableFooter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3357
3415
|
if (hasFooter()) {
|
|
3358
3416
|
var content = createContent();
|
|
3359
3417
|
var tfootProps = mergeProps({
|
|
3360
|
-
className: cx('tfoot')
|
|
3418
|
+
className: cx('tfoot'),
|
|
3419
|
+
role: 'rowgroup'
|
|
3361
3420
|
}, getColumnGroupPTOptions('root'), ptm('tfoot', {
|
|
3362
3421
|
hostName: props.hostName
|
|
3363
3422
|
}));
|
|
@@ -3367,6 +3426,366 @@ var TableFooter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3367
3426
|
});
|
|
3368
3427
|
TableFooter.displayName = 'TableFooter';
|
|
3369
3428
|
|
|
3429
|
+
function _defineProperties(target, props) {
|
|
3430
|
+
for (var i = 0; i < props.length; i++) {
|
|
3431
|
+
var descriptor = props[i];
|
|
3432
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
3433
|
+
descriptor.configurable = true;
|
|
3434
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
3435
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
3436
|
+
}
|
|
3437
|
+
}
|
|
3438
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
3439
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
3440
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
3441
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
3442
|
+
writable: false
|
|
3443
|
+
});
|
|
3444
|
+
return Constructor;
|
|
3445
|
+
}
|
|
3446
|
+
|
|
3447
|
+
function _classCallCheck(instance, Constructor) {
|
|
3448
|
+
if (!(instance instanceof Constructor)) {
|
|
3449
|
+
throw new TypeError("Cannot call a class as a function");
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
|
|
3453
|
+
var FilterMatchMode = Object.freeze({
|
|
3454
|
+
STARTS_WITH: 'startsWith',
|
|
3455
|
+
CONTAINS: 'contains',
|
|
3456
|
+
NOT_CONTAINS: 'notContains',
|
|
3457
|
+
ENDS_WITH: 'endsWith',
|
|
3458
|
+
EQUALS: 'equals',
|
|
3459
|
+
NOT_EQUALS: 'notEquals',
|
|
3460
|
+
IN: 'in',
|
|
3461
|
+
LESS_THAN: 'lt',
|
|
3462
|
+
LESS_THAN_OR_EQUAL_TO: 'lte',
|
|
3463
|
+
GREATER_THAN: 'gt',
|
|
3464
|
+
GREATER_THAN_OR_EQUAL_TO: 'gte',
|
|
3465
|
+
BETWEEN: 'between',
|
|
3466
|
+
DATE_IS: 'dateIs',
|
|
3467
|
+
DATE_IS_NOT: 'dateIsNot',
|
|
3468
|
+
DATE_BEFORE: 'dateBefore',
|
|
3469
|
+
DATE_AFTER: 'dateAfter',
|
|
3470
|
+
CUSTOM: 'custom'
|
|
3471
|
+
});
|
|
3472
|
+
|
|
3473
|
+
/**
|
|
3474
|
+
* @deprecated please use PrimeReactContext
|
|
3475
|
+
*/
|
|
3476
|
+
var PrimeReact = /*#__PURE__*/_createClass(function PrimeReact() {
|
|
3477
|
+
_classCallCheck(this, PrimeReact);
|
|
3478
|
+
});
|
|
3479
|
+
_defineProperty(PrimeReact, "ripple", false);
|
|
3480
|
+
_defineProperty(PrimeReact, "inputStyle", 'outlined');
|
|
3481
|
+
_defineProperty(PrimeReact, "locale", 'en');
|
|
3482
|
+
_defineProperty(PrimeReact, "appendTo", null);
|
|
3483
|
+
_defineProperty(PrimeReact, "cssTransition", true);
|
|
3484
|
+
_defineProperty(PrimeReact, "autoZIndex", true);
|
|
3485
|
+
_defineProperty(PrimeReact, "hideOverlaysOnDocumentScrolling", false);
|
|
3486
|
+
_defineProperty(PrimeReact, "nonce", null);
|
|
3487
|
+
_defineProperty(PrimeReact, "nullSortOrder", 1);
|
|
3488
|
+
_defineProperty(PrimeReact, "zIndex", {
|
|
3489
|
+
modal: 1100,
|
|
3490
|
+
overlay: 1000,
|
|
3491
|
+
menu: 1000,
|
|
3492
|
+
tooltip: 1100,
|
|
3493
|
+
toast: 1200
|
|
3494
|
+
});
|
|
3495
|
+
_defineProperty(PrimeReact, "pt", undefined);
|
|
3496
|
+
_defineProperty(PrimeReact, "filterMatchModeOptions", {
|
|
3497
|
+
text: [FilterMatchMode.STARTS_WITH, FilterMatchMode.CONTAINS, FilterMatchMode.NOT_CONTAINS, FilterMatchMode.ENDS_WITH, FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS],
|
|
3498
|
+
numeric: [FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS, FilterMatchMode.LESS_THAN, FilterMatchMode.LESS_THAN_OR_EQUAL_TO, FilterMatchMode.GREATER_THAN, FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],
|
|
3499
|
+
date: [FilterMatchMode.DATE_IS, FilterMatchMode.DATE_IS_NOT, FilterMatchMode.DATE_BEFORE, FilterMatchMode.DATE_AFTER]
|
|
3500
|
+
});
|
|
3501
|
+
_defineProperty(PrimeReact, "changeTheme", function (currentTheme, newTheme, linkElementId, callback) {
|
|
3502
|
+
var _linkElement$parentNo;
|
|
3503
|
+
var linkElement = document.getElementById(linkElementId);
|
|
3504
|
+
var cloneLinkElement = linkElement.cloneNode(true);
|
|
3505
|
+
var newThemeUrl = linkElement.getAttribute('href').replace(currentTheme, newTheme);
|
|
3506
|
+
cloneLinkElement.setAttribute('id', linkElementId + '-clone');
|
|
3507
|
+
cloneLinkElement.setAttribute('href', newThemeUrl);
|
|
3508
|
+
cloneLinkElement.addEventListener('load', function () {
|
|
3509
|
+
linkElement.remove();
|
|
3510
|
+
cloneLinkElement.setAttribute('id', linkElementId);
|
|
3511
|
+
if (callback) {
|
|
3512
|
+
callback();
|
|
3513
|
+
}
|
|
3514
|
+
});
|
|
3515
|
+
(_linkElement$parentNo = linkElement.parentNode) === null || _linkElement$parentNo === void 0 || _linkElement$parentNo.insertBefore(cloneLinkElement, linkElement.nextSibling);
|
|
3516
|
+
});
|
|
3517
|
+
|
|
3518
|
+
var locales = {
|
|
3519
|
+
en: {
|
|
3520
|
+
startsWith: 'Starts with',
|
|
3521
|
+
contains: 'Contains',
|
|
3522
|
+
notContains: 'Not contains',
|
|
3523
|
+
endsWith: 'Ends with',
|
|
3524
|
+
equals: 'Equals',
|
|
3525
|
+
notEquals: 'Not equals',
|
|
3526
|
+
noFilter: 'No Filter',
|
|
3527
|
+
filter: 'Filter',
|
|
3528
|
+
lt: 'Less than',
|
|
3529
|
+
lte: 'Less than or equal to',
|
|
3530
|
+
gt: 'Greater than',
|
|
3531
|
+
gte: 'Greater than or equal to',
|
|
3532
|
+
dateIs: 'Date is',
|
|
3533
|
+
dateIsNot: 'Date is not',
|
|
3534
|
+
dateBefore: 'Date is before',
|
|
3535
|
+
dateAfter: 'Date is after',
|
|
3536
|
+
custom: 'Custom',
|
|
3537
|
+
clear: 'Clear',
|
|
3538
|
+
close: 'Close',
|
|
3539
|
+
apply: 'Apply',
|
|
3540
|
+
matchAll: 'Match All',
|
|
3541
|
+
matchAny: 'Match Any',
|
|
3542
|
+
addRule: 'Add Rule',
|
|
3543
|
+
removeRule: 'Remove Rule',
|
|
3544
|
+
accept: 'Yes',
|
|
3545
|
+
reject: 'No',
|
|
3546
|
+
choose: 'Choose',
|
|
3547
|
+
upload: 'Upload',
|
|
3548
|
+
cancel: 'Cancel',
|
|
3549
|
+
completed: 'Completed',
|
|
3550
|
+
pending: 'Pending',
|
|
3551
|
+
fileSizeTypes: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
|
|
3552
|
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
3553
|
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
3554
|
+
dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
3555
|
+
monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
|
3556
|
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
3557
|
+
chooseYear: 'Choose Year',
|
|
3558
|
+
chooseMonth: 'Choose Month',
|
|
3559
|
+
chooseDate: 'Choose Date',
|
|
3560
|
+
prevDecade: 'Previous Decade',
|
|
3561
|
+
nextDecade: 'Next Decade',
|
|
3562
|
+
prevYear: 'Previous Year',
|
|
3563
|
+
nextYear: 'Next Year',
|
|
3564
|
+
prevMonth: 'Previous Month',
|
|
3565
|
+
nextMonth: 'Next Month',
|
|
3566
|
+
prevHour: 'Previous Hour',
|
|
3567
|
+
nextHour: 'Next Hour',
|
|
3568
|
+
prevMinute: 'Previous Minute',
|
|
3569
|
+
nextMinute: 'Next Minute',
|
|
3570
|
+
prevSecond: 'Previous Second',
|
|
3571
|
+
nextSecond: 'Next Second',
|
|
3572
|
+
prevMilliSecond: 'Previous Second',
|
|
3573
|
+
nextMilliSecond: 'Next Second',
|
|
3574
|
+
am: 'am',
|
|
3575
|
+
pm: 'pm',
|
|
3576
|
+
today: 'Today',
|
|
3577
|
+
now: 'Now',
|
|
3578
|
+
weekHeader: 'Wk',
|
|
3579
|
+
firstDayOfWeek: 0,
|
|
3580
|
+
showMonthAfterYear: false,
|
|
3581
|
+
dateFormat: 'mm/dd/yy',
|
|
3582
|
+
weak: 'Weak',
|
|
3583
|
+
medium: 'Medium',
|
|
3584
|
+
strong: 'Strong',
|
|
3585
|
+
passwordPrompt: 'Enter a password',
|
|
3586
|
+
emptyFilterMessage: 'No available options',
|
|
3587
|
+
emptyMessage: 'No results found',
|
|
3588
|
+
aria: {
|
|
3589
|
+
trueLabel: 'True',
|
|
3590
|
+
falseLabel: 'False',
|
|
3591
|
+
nullLabel: 'Not Selected',
|
|
3592
|
+
star: '1 star',
|
|
3593
|
+
stars: '{star} stars',
|
|
3594
|
+
selectAll: 'All items selected',
|
|
3595
|
+
unselectAll: 'All items unselected',
|
|
3596
|
+
close: 'Close',
|
|
3597
|
+
previous: 'Previous',
|
|
3598
|
+
next: 'Next',
|
|
3599
|
+
navigation: 'Navigation',
|
|
3600
|
+
scrollTop: 'Scroll Top',
|
|
3601
|
+
moveTop: 'Move Top',
|
|
3602
|
+
moveUp: 'Move Up',
|
|
3603
|
+
moveDown: 'Move Down',
|
|
3604
|
+
moveBottom: 'Move Bottom',
|
|
3605
|
+
moveToTarget: 'Move to Target',
|
|
3606
|
+
moveToSource: 'Move to Source',
|
|
3607
|
+
moveAllToTarget: 'Move All to Target',
|
|
3608
|
+
moveAllToSource: 'Move All to Source',
|
|
3609
|
+
pageLabel: 'Page {page}',
|
|
3610
|
+
firstPageLabel: 'First Page',
|
|
3611
|
+
lastPageLabel: 'Last Page',
|
|
3612
|
+
nextPageLabel: 'Next Page',
|
|
3613
|
+
previousPageLabel: 'Previous Page',
|
|
3614
|
+
rowsPerPageLabel: 'Rows per page',
|
|
3615
|
+
jumpToPageDropdownLabel: 'Jump to Page Dropdown',
|
|
3616
|
+
jumpToPageInputLabel: 'Jump to Page Input',
|
|
3617
|
+
selectRow: 'Row Selected',
|
|
3618
|
+
unselectRow: 'Row Unselected',
|
|
3619
|
+
expandRow: 'Row Expanded',
|
|
3620
|
+
collapseRow: 'Row Collapsed',
|
|
3621
|
+
showFilterMenu: 'Show Filter Menu',
|
|
3622
|
+
hideFilterMenu: 'Hide Filter Menu',
|
|
3623
|
+
filterOperator: 'Filter Operator',
|
|
3624
|
+
filterConstraint: 'Filter Constraint',
|
|
3625
|
+
editRow: 'Row Edit',
|
|
3626
|
+
saveEdit: 'Save Edit',
|
|
3627
|
+
cancelEdit: 'Cancel Edit',
|
|
3628
|
+
listView: 'List View',
|
|
3629
|
+
gridView: 'Grid View',
|
|
3630
|
+
slide: 'Slide',
|
|
3631
|
+
slideNumber: '{slideNumber}',
|
|
3632
|
+
zoomImage: 'Zoom Image',
|
|
3633
|
+
zoomIn: 'Zoom In',
|
|
3634
|
+
zoomOut: 'Zoom Out',
|
|
3635
|
+
rotateRight: 'Rotate Right',
|
|
3636
|
+
rotateLeft: 'Rotate Left',
|
|
3637
|
+
selectLabel: 'Select',
|
|
3638
|
+
unselectLabel: 'Unselect',
|
|
3639
|
+
expandLabel: 'Expand',
|
|
3640
|
+
collapseLabel: 'Collapse'
|
|
3641
|
+
}
|
|
3642
|
+
}
|
|
3643
|
+
};
|
|
3644
|
+
|
|
3645
|
+
/**
|
|
3646
|
+
* Find an ARIA label in the locale by key. If options are passed it will replace all options:
|
|
3647
|
+
* ```ts
|
|
3648
|
+
* const ariaValue = "Page {page}, User {user}, Role {role}";
|
|
3649
|
+
* const options = { page: 2, user: "John", role: "Admin" };
|
|
3650
|
+
* const result = ariaLabel('yourLabel', { page: 2, user: "John", role: "Admin" })
|
|
3651
|
+
* console.log(result); // Output: Page 2, User John, Role Admin
|
|
3652
|
+
* ```
|
|
3653
|
+
* @param {string} ariaKey key of the ARIA label to look up in locale.
|
|
3654
|
+
* @param {any} options JSON options like { page: 2, user: "John", role: "Admin" }
|
|
3655
|
+
* @returns the ARIA label with replaced values
|
|
3656
|
+
*/
|
|
3657
|
+
function ariaLabel(ariaKey, options) {
|
|
3658
|
+
var _locale = PrimeReact.locale;
|
|
3659
|
+
try {
|
|
3660
|
+
var _ariaLabel = localeOptions(_locale)['aria'][ariaKey];
|
|
3661
|
+
if (_ariaLabel) {
|
|
3662
|
+
for (var key in options) {
|
|
3663
|
+
if (options.hasOwnProperty(key)) {
|
|
3664
|
+
_ariaLabel = _ariaLabel.replace("{".concat(key, "}"), options[key]);
|
|
3665
|
+
}
|
|
3666
|
+
}
|
|
3667
|
+
}
|
|
3668
|
+
return _ariaLabel;
|
|
3669
|
+
} catch (error) {
|
|
3670
|
+
throw new Error("The ".concat(ariaKey, " option is not found in the current locale('").concat(_locale, "')."));
|
|
3671
|
+
}
|
|
3672
|
+
}
|
|
3673
|
+
function localeOptions(locale) {
|
|
3674
|
+
var _locale = locale || PrimeReact.locale;
|
|
3675
|
+
return locales[_locale];
|
|
3676
|
+
}
|
|
3677
|
+
|
|
3678
|
+
var styles = "";
|
|
3679
|
+
var FocusTrapBase = ComponentBase.extend({
|
|
3680
|
+
defaultProps: {
|
|
3681
|
+
__TYPE: 'FocusTrap',
|
|
3682
|
+
children: undefined
|
|
3683
|
+
},
|
|
3684
|
+
css: {
|
|
3685
|
+
styles: styles
|
|
3686
|
+
},
|
|
3687
|
+
getProps: function getProps(props) {
|
|
3688
|
+
return ObjectUtils.getMergedProps(props, FocusTrapBase.defaultProps);
|
|
3689
|
+
},
|
|
3690
|
+
getOtherProps: function getOtherProps(props) {
|
|
3691
|
+
return ObjectUtils.getDiffProps(props, FocusTrapBase.defaultProps);
|
|
3692
|
+
}
|
|
3693
|
+
});
|
|
3694
|
+
|
|
3695
|
+
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; }
|
|
3696
|
+
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; }
|
|
3697
|
+
var FocusTrap = /*#__PURE__*/React__default.memo( /*#__PURE__*/React__default.forwardRef(function (inProps, ref) {
|
|
3698
|
+
var targetRef = React__default.useRef(null);
|
|
3699
|
+
var firstFocusableElementRef = React__default.useRef(null);
|
|
3700
|
+
var lastFocusableElementRef = React__default.useRef(null);
|
|
3701
|
+
var context = React__default.useContext(PrimeReactContext);
|
|
3702
|
+
var props = FocusTrapBase.getProps(inProps, context);
|
|
3703
|
+
var metaData = {
|
|
3704
|
+
props: props
|
|
3705
|
+
};
|
|
3706
|
+
useStyle(FocusTrapBase.css.styles, {
|
|
3707
|
+
name: 'focustrap'
|
|
3708
|
+
});
|
|
3709
|
+
var _FocusTrapBase$setMet = FocusTrapBase.setMetaData(_objectSpread$5({}, metaData));
|
|
3710
|
+
_FocusTrapBase$setMet.ptm;
|
|
3711
|
+
React__default.useImperativeHandle(ref, function () {
|
|
3712
|
+
return {
|
|
3713
|
+
props: props,
|
|
3714
|
+
getInk: function getInk() {
|
|
3715
|
+
return firstFocusableElementRef.current;
|
|
3716
|
+
},
|
|
3717
|
+
getTarget: function getTarget() {
|
|
3718
|
+
return targetRef.current;
|
|
3719
|
+
}
|
|
3720
|
+
};
|
|
3721
|
+
});
|
|
3722
|
+
useMountEffect(function () {
|
|
3723
|
+
if (!props.disabled) {
|
|
3724
|
+
targetRef.current = getTarget();
|
|
3725
|
+
setAutoFocus(targetRef.current);
|
|
3726
|
+
}
|
|
3727
|
+
});
|
|
3728
|
+
var getTarget = function getTarget() {
|
|
3729
|
+
return firstFocusableElementRef.current && firstFocusableElementRef.current.parentElement;
|
|
3730
|
+
};
|
|
3731
|
+
var setAutoFocus = function setAutoFocus(target) {
|
|
3732
|
+
var _ref = props || {},
|
|
3733
|
+
_ref$autoFocusSelecto = _ref.autoFocusSelector,
|
|
3734
|
+
autoFocusSelector = _ref$autoFocusSelecto === void 0 ? '' : _ref$autoFocusSelecto,
|
|
3735
|
+
_ref$firstFocusableSe = _ref.firstFocusableSelector,
|
|
3736
|
+
firstFocusableSelector = _ref$firstFocusableSe === void 0 ? '' : _ref$firstFocusableSe,
|
|
3737
|
+
_ref$autoFocus = _ref.autoFocus,
|
|
3738
|
+
autoFocus = _ref$autoFocus === void 0 ? false : _ref$autoFocus;
|
|
3739
|
+
var focusableElement = DomHandler.getFirstFocusableElement(target, "[autofocus]".concat(getComputedSelector(autoFocusSelector)));
|
|
3740
|
+
autoFocus && !focusableElement && (focusableElement = DomHandler.getFirstFocusableElement(target, getComputedSelector(firstFocusableSelector)));
|
|
3741
|
+
DomHandler.focus(focusableElement);
|
|
3742
|
+
};
|
|
3743
|
+
var getComputedSelector = function getComputedSelector(selector) {
|
|
3744
|
+
return ":not(.p-hidden-focusable):not([data-p-hidden-focusable=\"true\"])".concat(selector !== null && selector !== void 0 ? selector : '');
|
|
3745
|
+
};
|
|
3746
|
+
var onFirstHiddenElementFocus = function onFirstHiddenElementFocus(event) {
|
|
3747
|
+
var _targetRef$current;
|
|
3748
|
+
var currentTarget = event.currentTarget,
|
|
3749
|
+
relatedTarget = event.relatedTarget;
|
|
3750
|
+
var focusableElement = relatedTarget === currentTarget.$_pfocustrap_lasthiddenfocusableelement || !((_targetRef$current = targetRef.current) !== null && _targetRef$current !== void 0 && _targetRef$current.contains(relatedTarget)) ? DomHandler.getFirstFocusableElement(currentTarget.parentElement, getComputedSelector(currentTarget.$_pfocustrap_focusableselector)) : currentTarget.$_pfocustrap_lasthiddenfocusableelement;
|
|
3751
|
+
DomHandler.focus(focusableElement);
|
|
3752
|
+
};
|
|
3753
|
+
var onLastHiddenElementFocus = function onLastHiddenElementFocus(event) {
|
|
3754
|
+
var _targetRef$current2;
|
|
3755
|
+
var currentTarget = event.currentTarget,
|
|
3756
|
+
relatedTarget = event.relatedTarget;
|
|
3757
|
+
var focusableElement = relatedTarget === currentTarget.$_pfocustrap_firsthiddenfocusableelement || !((_targetRef$current2 = targetRef.current) !== null && _targetRef$current2 !== void 0 && _targetRef$current2.contains(relatedTarget)) ? DomHandler.getLastFocusableElement(currentTarget.parentElement, getComputedSelector(currentTarget.$_pfocustrap_focusableselector)) : currentTarget.$_pfocustrap_firsthiddenfocusableelement;
|
|
3758
|
+
DomHandler.focus(focusableElement);
|
|
3759
|
+
};
|
|
3760
|
+
var createHiddenFocusableElements = function createHiddenFocusableElements() {
|
|
3761
|
+
var _ref2 = props || {},
|
|
3762
|
+
_ref2$tabIndex = _ref2.tabIndex,
|
|
3763
|
+
tabIndex = _ref2$tabIndex === void 0 ? 0 : _ref2$tabIndex;
|
|
3764
|
+
var createFocusableElement = function createFocusableElement(onFocus, section) {
|
|
3765
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
3766
|
+
ref: section === 'firstfocusableelement' ? firstFocusableElementRef : lastFocusableElementRef,
|
|
3767
|
+
className: 'p-hidden-accessible p-hidden-focusable',
|
|
3768
|
+
tabIndex: tabIndex,
|
|
3769
|
+
role: 'presentation',
|
|
3770
|
+
"aria-hidden": true,
|
|
3771
|
+
"data-p-hidden-accessible": true,
|
|
3772
|
+
"data-p-hidden-focusable": true,
|
|
3773
|
+
onFocus: onFocus,
|
|
3774
|
+
"data-pc-section": section
|
|
3775
|
+
});
|
|
3776
|
+
};
|
|
3777
|
+
var firstFocusableElement = createFocusableElement(onFirstHiddenElementFocus, 'firstfocusableelement');
|
|
3778
|
+
var lastFocusableElement = createFocusableElement(onLastHiddenElementFocus, 'lastfocusableelement');
|
|
3779
|
+
if (firstFocusableElement.ref.current && lastFocusableElement.ref.current) {
|
|
3780
|
+
firstFocusableElement.ref.current.$_pfocustrap_lasthiddenfocusableelement = lastFocusableElement.ref.current;
|
|
3781
|
+
lastFocusableElement.ref.current.$_pfocustrap_firsthiddenfocusableelement = firstFocusableElement.ref.current;
|
|
3782
|
+
}
|
|
3783
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, firstFocusableElement, props.children, lastFocusableElement);
|
|
3784
|
+
};
|
|
3785
|
+
return createHiddenFocusableElements();
|
|
3786
|
+
}));
|
|
3787
|
+
var FocusTrap$1 = FocusTrap;
|
|
3788
|
+
|
|
3370
3789
|
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; }
|
|
3371
3790
|
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; }
|
|
3372
3791
|
var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
@@ -3375,6 +3794,7 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3375
3794
|
overlayVisibleState = _React$useState2[0],
|
|
3376
3795
|
setOverlayVisibleState = _React$useState2[1];
|
|
3377
3796
|
var overlayRef = React.useRef(null);
|
|
3797
|
+
var overlayId = React.useRef(UniqueComponentId());
|
|
3378
3798
|
var iconRef = React.useRef(null);
|
|
3379
3799
|
var selfClick = React.useRef(false);
|
|
3380
3800
|
var overlayEventListener = React.useRef(null);
|
|
@@ -3436,22 +3856,25 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3436
3856
|
var isRowMatchModeSelected = function isRowMatchModeSelected(matchMode) {
|
|
3437
3857
|
return filterModel && filterModel.matchMode === matchMode;
|
|
3438
3858
|
};
|
|
3439
|
-
var showMenuButton = function showMenuButton() {
|
|
3440
|
-
return getColumnProp('showFilterMenu') && (props.display === 'row' ? getColumnProp('dataType') !== 'boolean' : true);
|
|
3441
|
-
};
|
|
3442
3859
|
var matchModes = function matchModes() {
|
|
3443
3860
|
return getColumnProp('filterMatchModeOptions') || context && context.filterMatchModeOptions[findDataType()].map(function (key) {
|
|
3444
3861
|
return {
|
|
3445
3862
|
label: localeOption(key),
|
|
3446
3863
|
value: key
|
|
3447
3864
|
};
|
|
3448
|
-
}) || PrimeReact.filterMatchModeOptions[findDataType()].map(function (key) {
|
|
3865
|
+
}) || PrimeReact$1.filterMatchModeOptions[findDataType()].map(function (key) {
|
|
3449
3866
|
return {
|
|
3450
3867
|
label: localeOption(key),
|
|
3451
3868
|
value: key
|
|
3452
3869
|
};
|
|
3453
3870
|
});
|
|
3454
3871
|
};
|
|
3872
|
+
var isShowMenuButton = function isShowMenuButton() {
|
|
3873
|
+
return getColumnProp('showFilterMenu') && (props.display === 'row' ? getColumnProp('dataType') !== 'boolean' : true);
|
|
3874
|
+
};
|
|
3875
|
+
var isShowClearButton = function isShowClearButton() {
|
|
3876
|
+
return getColumnProp('showClearButton') && props.display === 'row';
|
|
3877
|
+
};
|
|
3455
3878
|
var isShowMatchModes = function isShowMatchModes() {
|
|
3456
3879
|
return getColumnProp('dataType') !== 'boolean' && getColumnProp('showFilterMatchModes') && matchModes() && getColumnProp('showFilterMenuOptions');
|
|
3457
3880
|
};
|
|
@@ -3490,15 +3913,15 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3490
3913
|
var hasMatchMode = function hasMatchMode(key) {
|
|
3491
3914
|
return context && context.filterMatchModeOptions[key].some(function (mode) {
|
|
3492
3915
|
return mode === matchMode;
|
|
3493
|
-
}) || PrimeReact.filterMatchModeOptions[key].some(function (mode) {
|
|
3916
|
+
}) || PrimeReact$1.filterMatchModeOptions[key].some(function (mode) {
|
|
3494
3917
|
return mode === matchMode;
|
|
3495
3918
|
});
|
|
3496
3919
|
};
|
|
3497
3920
|
if (matchMode === 'custom' && !hasMatchMode(dataType)) {
|
|
3498
|
-
context && context.filterMatchModeOptions[dataType].push(FilterMatchMode.CUSTOM) || PrimeReact.filterMatchModeOptions[dataType].push(FilterMatchMode.CUSTOM);
|
|
3921
|
+
context && context.filterMatchModeOptions[dataType].push(FilterMatchMode$1.CUSTOM) || PrimeReact$1.filterMatchModeOptions[dataType].push(FilterMatchMode$1.CUSTOM);
|
|
3499
3922
|
return dataType;
|
|
3500
3923
|
} else if (matchMode) {
|
|
3501
|
-
return Object.keys(context && context.filterMatchModeOptions || PrimeReact.filterMatchModeOptions).find(function (key) {
|
|
3924
|
+
return Object.keys(context && context.filterMatchModeOptions || PrimeReact$1.filterMatchModeOptions).find(function (key) {
|
|
3502
3925
|
return hasMatchMode(key);
|
|
3503
3926
|
}) || dataType;
|
|
3504
3927
|
}
|
|
@@ -3708,13 +4131,13 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3708
4131
|
selfClick.current = true;
|
|
3709
4132
|
};
|
|
3710
4133
|
var onOverlayEnter = function onOverlayEnter() {
|
|
3711
|
-
ZIndexUtils.set('overlay', overlayRef.current, context && context.autoZIndex || PrimeReact.autoZIndex, context && context.zIndex['overlay'] || PrimeReact.zIndex['overlay']);
|
|
4134
|
+
ZIndexUtils.set('overlay', overlayRef.current, context && context.autoZIndex || PrimeReact$1.autoZIndex, context && context.zIndex['overlay'] || PrimeReact$1.zIndex['overlay']);
|
|
3712
4135
|
DomHandler.addStyles(overlayRef.current, {
|
|
3713
4136
|
position: 'absolute',
|
|
3714
4137
|
top: '0',
|
|
3715
4138
|
left: '0'
|
|
3716
4139
|
});
|
|
3717
|
-
DomHandler.alignOverlay(overlayRef.current, iconRef.current, context && context.appendTo || PrimeReact.appendTo, false);
|
|
4140
|
+
DomHandler.alignOverlay(overlayRef.current, iconRef.current, context && context.appendTo || PrimeReact$1.appendTo, false);
|
|
3718
4141
|
overlayEventListener.current = function (e) {
|
|
3719
4142
|
if (!isOutsideClicked(e.target)) {
|
|
3720
4143
|
selfClick.current = true;
|
|
@@ -3752,9 +4175,6 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3752
4175
|
value: FilterOperator.OR
|
|
3753
4176
|
}];
|
|
3754
4177
|
};
|
|
3755
|
-
var filterLabel = function filterLabel() {
|
|
3756
|
-
return localeOption('filter');
|
|
3757
|
-
};
|
|
3758
4178
|
var noFilterLabel = function noFilterLabel() {
|
|
3759
4179
|
return localeOption('noFilter');
|
|
3760
4180
|
};
|
|
@@ -3786,7 +4206,7 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3786
4206
|
};
|
|
3787
4207
|
useUpdateEffect(function () {
|
|
3788
4208
|
if (props.display === 'menu' && overlayVisibleState) {
|
|
3789
|
-
DomHandler.alignOverlay(overlayRef.current, iconRef.current, context && context.appendTo || PrimeReact.appendTo, false);
|
|
4209
|
+
DomHandler.alignOverlay(overlayRef.current, iconRef.current, context && context.appendTo || PrimeReact$1.appendTo, false);
|
|
3790
4210
|
}
|
|
3791
4211
|
});
|
|
3792
4212
|
useUnmountEffect(function () {
|
|
@@ -3841,7 +4261,7 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3841
4261
|
return props.display === 'menu' ? createFilterElement(fieldConstraint, index) : null;
|
|
3842
4262
|
};
|
|
3843
4263
|
var createMenuButton = function createMenuButton() {
|
|
3844
|
-
if (!
|
|
4264
|
+
if (!isShowMenuButton()) {
|
|
3845
4265
|
return null;
|
|
3846
4266
|
}
|
|
3847
4267
|
var filterIconProps = mergeProps({
|
|
@@ -3851,7 +4271,7 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3851
4271
|
var columnFilterIcon = IconUtils.getJSXIcon(icon, _objectSpread$4({}, filterIconProps), {
|
|
3852
4272
|
props: props
|
|
3853
4273
|
});
|
|
3854
|
-
var label =
|
|
4274
|
+
var label = overlayVisibleState ? ariaLabel('hideFilterMenu') : ariaLabel('showFilterMenu');
|
|
3855
4275
|
var filterMenuButtonProps = mergeProps({
|
|
3856
4276
|
type: 'button',
|
|
3857
4277
|
className: cx('filterMenuButton', {
|
|
@@ -3860,13 +4280,14 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3860
4280
|
}),
|
|
3861
4281
|
'aria-haspopup': true,
|
|
3862
4282
|
'aria-expanded': overlayVisibleState,
|
|
4283
|
+
'aria-label': label,
|
|
4284
|
+
'aria-controls': overlayId.current,
|
|
3863
4285
|
onClick: function onClick(e) {
|
|
3864
4286
|
return toggleMenu();
|
|
3865
4287
|
},
|
|
3866
4288
|
onKeyDown: function onKeyDown(e) {
|
|
3867
4289
|
return onToggleButtonKeyDown(e);
|
|
3868
|
-
}
|
|
3869
|
-
'aria-label': label
|
|
4290
|
+
}
|
|
3870
4291
|
}, getColumnPTOptions('filterMenuButton', {
|
|
3871
4292
|
context: {
|
|
3872
4293
|
active: hasFilter()
|
|
@@ -3877,7 +4298,7 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3877
4298
|
}, filterMenuButtonProps), columnFilterIcon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
3878
4299
|
};
|
|
3879
4300
|
var createClearButton = function createClearButton() {
|
|
3880
|
-
if (!
|
|
4301
|
+
if (!isShowClearButton()) {
|
|
3881
4302
|
return null;
|
|
3882
4303
|
}
|
|
3883
4304
|
var filterClearIconProps = mergeProps({
|
|
@@ -3887,25 +4308,22 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3887
4308
|
var filterClearIcon = IconUtils.getJSXIcon(icon, _objectSpread$4({}, filterClearIconProps), {
|
|
3888
4309
|
props: props
|
|
3889
4310
|
});
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
return /*#__PURE__*/React.createElement("button", headerFilterClearButtonProps, filterClearIcon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
3907
|
-
}
|
|
3908
|
-
return null;
|
|
4311
|
+
var clearLabel = clearButtonLabel();
|
|
4312
|
+
var headerFilterClearButtonProps = mergeProps({
|
|
4313
|
+
className: cx('headerFilterClearButton', {
|
|
4314
|
+
hasRowFilter: hasRowFilter
|
|
4315
|
+
}),
|
|
4316
|
+
type: 'button',
|
|
4317
|
+
onClick: function onClick(e) {
|
|
4318
|
+
return clearFilter();
|
|
4319
|
+
},
|
|
4320
|
+
'aria-label': clearLabel
|
|
4321
|
+
}, getColumnPTOptions('headerFilterClearButton', {
|
|
4322
|
+
context: {
|
|
4323
|
+
hidden: hasRowFilter()
|
|
4324
|
+
}
|
|
4325
|
+
}));
|
|
4326
|
+
return /*#__PURE__*/React.createElement("button", headerFilterClearButtonProps, filterClearIcon, /*#__PURE__*/React.createElement(Ripple, null));
|
|
3909
4327
|
};
|
|
3910
4328
|
var createRowItems = function createRowItems() {
|
|
3911
4329
|
if (isShowMatchModes()) {
|
|
@@ -3975,7 +4393,8 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3975
4393
|
unstyled: props.unstyled,
|
|
3976
4394
|
__parentMetadata: {
|
|
3977
4395
|
parent: props.metaData
|
|
3978
|
-
}
|
|
4396
|
+
},
|
|
4397
|
+
"aria-label": ariaLabel('filterOperator')
|
|
3979
4398
|
}));
|
|
3980
4399
|
}
|
|
3981
4400
|
return null;
|
|
@@ -3994,7 +4413,8 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
3994
4413
|
unstyled: props.unstyled,
|
|
3995
4414
|
__parentMetadata: {
|
|
3996
4415
|
parent: props.metaData
|
|
3997
|
-
}
|
|
4416
|
+
},
|
|
4417
|
+
"aria-label": ariaLabel('filterConstraint')
|
|
3998
4418
|
});
|
|
3999
4419
|
}
|
|
4000
4420
|
return null;
|
|
@@ -4150,7 +4570,10 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
4150
4570
|
},
|
|
4151
4571
|
onMouseDown: function onMouseDown(e) {
|
|
4152
4572
|
return onContentMouseDown();
|
|
4153
|
-
}
|
|
4573
|
+
},
|
|
4574
|
+
id: overlayId.current,
|
|
4575
|
+
'aria-modal': overlayVisibleState,
|
|
4576
|
+
role: 'dialog'
|
|
4154
4577
|
}, getColumnPTOptions('filterOverlay'));
|
|
4155
4578
|
var transitionProps = mergeProps({
|
|
4156
4579
|
classNames: cx('transition'),
|
|
@@ -4169,7 +4592,9 @@ var ColumnFilter = /*#__PURE__*/React.memo(function (props) {
|
|
|
4169
4592
|
nodeRef: overlayRef
|
|
4170
4593
|
}, transitionProps), /*#__PURE__*/React.createElement("div", _extends({
|
|
4171
4594
|
ref: overlayRef
|
|
4172
|
-
}, filterOverlayProps),
|
|
4595
|
+
}, filterOverlayProps), /*#__PURE__*/React.createElement(FocusTrap$1, {
|
|
4596
|
+
autoFocus: true
|
|
4597
|
+
}, filterHeader, items, filterFooter))));
|
|
4173
4598
|
};
|
|
4174
4599
|
var rowFilterElement = createRowFilterElement();
|
|
4175
4600
|
var menuButton = createMenuButton();
|
|
@@ -4260,6 +4685,7 @@ var HeaderCheckbox = /*#__PURE__*/React.memo(function (props) {
|
|
|
4260
4685
|
}),
|
|
4261
4686
|
role: 'checkbox',
|
|
4262
4687
|
'aria-checked': props.checked,
|
|
4688
|
+
'aria-label': props.checked ? ariaLabel('selectAll') : ariaLabel('unselectAll'),
|
|
4263
4689
|
tabIndex: tabIndex,
|
|
4264
4690
|
onFocus: function onFocus(e) {
|
|
4265
4691
|
return _onFocus();
|
|
@@ -4421,7 +4847,7 @@ var HeaderCell = /*#__PURE__*/React.memo(function (props) {
|
|
|
4421
4847
|
});
|
|
4422
4848
|
};
|
|
4423
4849
|
var _onKeyDown = function onKeyDown(event) {
|
|
4424
|
-
if (event.
|
|
4850
|
+
if ((event.code == 'Enter' || event.code == 'Space') && event.currentTarget === elementRef.current && DomHandler.getAttribute(event.currentTarget, 'data-p-sortable-column') === 'true') {
|
|
4425
4851
|
_onClick(event);
|
|
4426
4852
|
event.preventDefault();
|
|
4427
4853
|
}
|
|
@@ -4898,7 +5324,8 @@ var TableHeader = /*#__PURE__*/React.memo(function (props) {
|
|
|
4898
5324
|
};
|
|
4899
5325
|
var content = createContent();
|
|
4900
5326
|
var theadProps = mergeProps({
|
|
4901
|
-
className: cx('thead')
|
|
5327
|
+
className: cx('thead'),
|
|
5328
|
+
role: 'rowgroup'
|
|
4902
5329
|
}, getColumnGroupPTOptions('root'), ptm('thead', {
|
|
4903
5330
|
hostName: props.hostName
|
|
4904
5331
|
}));
|
|
@@ -5625,16 +6052,16 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
5625
6052
|
}
|
|
5626
6053
|
};
|
|
5627
6054
|
var createBeforeResizeStyleElement = function createBeforeResizeStyleElement() {
|
|
5628
|
-
beforeResizeStyleElement.current = DomHandler.createInlineStyle(context && context.nonce || PrimeReact.nonce, context && context.styleContainer);
|
|
6055
|
+
beforeResizeStyleElement.current = DomHandler.createInlineStyle(context && context.nonce || PrimeReact$1.nonce, context && context.styleContainer);
|
|
5629
6056
|
var innerHTML = "\n[data-pc-name=\"datatable\"][".concat(attributeSelector.current, "] {\n user-select:none;\n}\n ");
|
|
5630
6057
|
beforeResizeStyleElement.current.innerHTML = innerHTML;
|
|
5631
6058
|
};
|
|
5632
6059
|
var createStyleElement = function createStyleElement() {
|
|
5633
|
-
styleElement.current = DomHandler.createInlineStyle(context && context.nonce || PrimeReact.nonce, context && context.styleContainer);
|
|
6060
|
+
styleElement.current = DomHandler.createInlineStyle(context && context.nonce || PrimeReact$1.nonce, context && context.styleContainer);
|
|
5634
6061
|
};
|
|
5635
6062
|
var createResponsiveStyle = function createResponsiveStyle() {
|
|
5636
6063
|
if (!responsiveStyleElement.current) {
|
|
5637
|
-
responsiveStyleElement.current = DomHandler.createInlineStyle(context && context.nonce || PrimeReact.nonce, context && context.styleContainer);
|
|
6064
|
+
responsiveStyleElement.current = DomHandler.createInlineStyle(context && context.nonce || PrimeReact$1.nonce, context && context.styleContainer);
|
|
5638
6065
|
var tableSelector = ".p-datatable-wrapper ".concat(isVirtualScrollerDisabled() ? '' : '> .p-virtualscroller', " > .p-datatable-table");
|
|
5639
6066
|
var selector = ".p-datatable[".concat(attributeSelector.current, "] > ").concat(tableSelector);
|
|
5640
6067
|
var gridLinesSelector = ".p-datatable[".concat(attributeSelector.current, "].p-datatable-gridlines > ").concat(tableSelector);
|
|
@@ -5729,7 +6156,7 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
5729
6156
|
return props.removableSort ? props.defaultSortOrder === currentOrder ? currentOrder * -1 : 0 : currentOrder * -1;
|
|
5730
6157
|
};
|
|
5731
6158
|
var compareValuesOnSort = function compareValuesOnSort(value1, value2, comparator, order) {
|
|
5732
|
-
return ObjectUtils.sort(value1, value2, order, comparator, context && context.nullSortOrder || PrimeReact.nullSortOrder);
|
|
6159
|
+
return ObjectUtils.sort(value1, value2, order, comparator, context && context.nullSortOrder || PrimeReact$1.nullSortOrder);
|
|
5733
6160
|
};
|
|
5734
6161
|
var addSortMeta = function addSortMeta(meta, multiSortMeta) {
|
|
5735
6162
|
var index = multiSortMeta.findIndex(function (sortMeta) {
|
|
@@ -5768,7 +6195,7 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
5768
6195
|
} else {
|
|
5769
6196
|
// performance optimization to prevent resolving field data in each loop
|
|
5770
6197
|
var lookupMap = new Map();
|
|
5771
|
-
var comparator = ObjectUtils.localeComparator(context && context.locale || PrimeReact.locale);
|
|
6198
|
+
var comparator = ObjectUtils.localeComparator(context && context.locale || PrimeReact$1.locale);
|
|
5772
6199
|
var _iterator = _createForOfIteratorHelper(data),
|
|
5773
6200
|
_step;
|
|
5774
6201
|
try {
|
|
@@ -5816,7 +6243,7 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
5816
6243
|
multiSortMeta: multiSortMeta
|
|
5817
6244
|
});
|
|
5818
6245
|
} else {
|
|
5819
|
-
var comparator = ObjectUtils.localeComparator(context && context.locale || PrimeReact.locale);
|
|
6246
|
+
var comparator = ObjectUtils.localeComparator(context && context.locale || PrimeReact$1.locale);
|
|
5820
6247
|
value.sort(function (data1, data2) {
|
|
5821
6248
|
return multisortField(data1, data2, multiSortMeta, 0, comparator);
|
|
5822
6249
|
});
|
|
@@ -5954,7 +6381,7 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
5954
6381
|
};
|
|
5955
6382
|
var executeLocalFilter = function executeLocalFilter(field, rowData, filterMeta, index) {
|
|
5956
6383
|
var filterValue = filterMeta.value;
|
|
5957
|
-
var filterMatchMode = filterMeta.matchMode === 'custom' ? "custom_".concat(field) : filterMeta.matchMode || FilterMatchMode.STARTS_WITH;
|
|
6384
|
+
var filterMatchMode = filterMeta.matchMode === 'custom' ? "custom_".concat(field) : filterMeta.matchMode || FilterMatchMode$1.STARTS_WITH;
|
|
5958
6385
|
var dataFieldValue = ObjectUtils.resolveFieldData(rowData, field);
|
|
5959
6386
|
var filterConstraint = FilterService.filters[filterMatchMode];
|
|
5960
6387
|
return ObjectUtils.isFunction(filterConstraint) && filterConstraint(dataFieldValue, filterValue, props.filterLocale, index);
|
|
@@ -5980,7 +6407,7 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
5980
6407
|
var field = getColumnProp(col, 'filterField') || getColumnProp(col, 'field');
|
|
5981
6408
|
var filterFunction = getColumnProp(col, 'filterFunction');
|
|
5982
6409
|
var dataType = getColumnProp(col, 'dataType');
|
|
5983
|
-
var matchMode = getColumnProp(col, 'filterMatchMode') || (context && context.filterMatchModeOptions[dataType] || PrimeReact.filterMatchModeOptions[dataType] ? context && context.filterMatchModeOptions[dataType][0] || PrimeReact.filterMatchModeOptions[dataType][0] : FilterMatchMode.STARTS_WITH);
|
|
6410
|
+
var matchMode = getColumnProp(col, 'filterMatchMode') || (context && context.filterMatchModeOptions[dataType] || PrimeReact$1.filterMatchModeOptions[dataType] ? context && context.filterMatchModeOptions[dataType][0] || PrimeReact$1.filterMatchModeOptions[dataType][0] : FilterMatchMode$1.STARTS_WITH);
|
|
5984
6411
|
var constraint = {
|
|
5985
6412
|
value: null,
|
|
5986
6413
|
matchMode: matchMode
|