Refactored DataTable
parent
7c8b97c627
commit
4fcfa54e1a
|
@ -21,7 +21,7 @@
|
|||
:template="paginatorTemplate"
|
||||
:rowsPerPageOptions="rowsPerPageOptions"
|
||||
:currentPageReportTemplate="currentPageReportTemplate"
|
||||
:class="cx('paginator')"
|
||||
:class="cx('paginator', { position: 'top' })"
|
||||
@page="onPage($event)"
|
||||
:alwaysShow="alwaysShowPaginator"
|
||||
:unstyled="unstyled"
|
||||
|
@ -238,7 +238,7 @@
|
|||
:template="paginatorTemplate"
|
||||
:rowsPerPageOptions="rowsPerPageOptions"
|
||||
:currentPageReportTemplate="currentPageReportTemplate"
|
||||
:class="cx('paginator')"
|
||||
:class="cx('paginator', { position: 'bottom' })"
|
||||
@page="onPage($event)"
|
||||
:alwaysShow="alwaysShowPaginator"
|
||||
:unstyled="unstyled"
|
||||
|
|
|
@ -1,29 +1,25 @@
|
|||
import BaseStyle from 'primevue/base/style';
|
||||
|
||||
const classes = {
|
||||
root: ({ instance, props }) => [
|
||||
root: ({ props }) => [
|
||||
'p-datatable p-component',
|
||||
{
|
||||
'p-datatable-hoverable-rows': props.rowHover || props.selectionMode,
|
||||
'p-datatable-hoverable': props.rowHover || props.selectionMode,
|
||||
'p-datatable-resizable': props.resizableColumns,
|
||||
'p-datatable-resizable-fit': props.resizableColumns && props.columnResizeMode === 'fit',
|
||||
'p-datatable-scrollable': props.scrollable,
|
||||
'p-datatable-flex-scrollable': props.scrollable && props.scrollHeight === 'flex',
|
||||
'p-datatable-responsive-stack': props.responsiveLayout === 'stack',
|
||||
'p-datatable-responsive-scroll': props.responsiveLayout === 'scroll',
|
||||
'p-datatable-striped': props.stripedRows,
|
||||
'p-datatable-gridlines': props.showGridlines,
|
||||
'p-datatable-grouped-header': instance.headerColumnGroup != null,
|
||||
'p-datatable-grouped-footer': instance.footerColumnGroup != null,
|
||||
'p-datatable-sm': props.size === 'small',
|
||||
'p-datatable-lg': props.size === 'large'
|
||||
}
|
||||
],
|
||||
loadingOverlay: 'p-datatable-loading-overlay p-component-overlay',
|
||||
loadingOverlay: 'p-datatable-mask p-component-overlay',
|
||||
loadingIcon: 'p-datatable-loading-icon',
|
||||
header: 'p-datatable-header',
|
||||
paginator: ({ instance }) => (instance.paginatorTop ? 'p-paginator-top' : instance.paginatorBottom ? 'p-paginator-bottom' : ''),
|
||||
wrapper: 'p-datatable-wrapper',
|
||||
paginator: ({ position }) => 'p-datatable-paginator-' + position,
|
||||
wrapper: 'p-datatable-table-container',
|
||||
table: ({ props }) => [
|
||||
'p-datatable-table',
|
||||
{
|
||||
|
@ -32,101 +28,84 @@ const classes = {
|
|||
'p-datatable-resizable-table-fit': props.resizableColumns && props.columnResizeMode === 'fit'
|
||||
}
|
||||
],
|
||||
//tablehead
|
||||
thead: 'p-datatable-thead',
|
||||
// headercell
|
||||
headerCell: ({ instance, props, column }) =>
|
||||
column && !instance.columnProp(column, 'hidden') && (props.rowGroupMode !== 'subheader' || props.groupRowsBy !== instance.columnProp(column, 'field'))
|
||||
? [
|
||||
'p-filter-column',
|
||||
{
|
||||
'p-frozen-column': instance.columnProp(column, 'frozen')
|
||||
'p-datatable-frozen-column': instance.columnProp(column, 'frozen')
|
||||
}
|
||||
]
|
||||
: [
|
||||
{
|
||||
'p-sortable-column': instance.columnProp('sortable'),
|
||||
'p-resizable-column': instance.resizableColumns,
|
||||
'p-highlight': instance.isColumnSorted(),
|
||||
'p-filter-column': props.filterColumn,
|
||||
'p-frozen-column': instance.columnProp('frozen'),
|
||||
'p-reorderable-column': props.reorderableColumns
|
||||
'p-datatable-sortable-column': instance.columnProp('sortable'),
|
||||
'p-datatable-resizable-column': instance.resizableColumns,
|
||||
'p-datatable-column-sorted': instance.isColumnSorted(),
|
||||
'p-datatable-frozen-column': instance.columnProp('frozen'),
|
||||
'p-datatable-reorderable-column': props.reorderableColumns
|
||||
}
|
||||
],
|
||||
columnResizer: 'p-column-resizer',
|
||||
headerContent: 'p-column-header-content',
|
||||
headerTitle: 'p-column-title',
|
||||
sortIcon: 'p-sortable-column-icon',
|
||||
sortBadge: 'p-sortable-column-badge',
|
||||
// columnfilter
|
||||
columnResizer: 'p-datatable-column-resizer',
|
||||
headerContent: 'p-datatable-column-header-content',
|
||||
headerTitle: 'p-datatable-column-title',
|
||||
sortIcon: 'p-datatable-sortable-column-icon',
|
||||
sortBadge: 'p-datatable-sortable-column-badge',
|
||||
columnFilter: ({ props }) => [
|
||||
'p-column-filter p-fluid',
|
||||
'p-datatable-filter',
|
||||
{
|
||||
'p-column-filter-row': props.display === 'row',
|
||||
'p-column-filter-menu': props.display === 'menu'
|
||||
}
|
||||
],
|
||||
filterInput: 'p-fluid p-column-filter-element',
|
||||
filterMenuButton: ({ instance }) => [
|
||||
'p-column-filter-menu-button p-link',
|
||||
{
|
||||
'p-column-filter-menu-button-open': instance.overlayVisible,
|
||||
'p-column-filter-menu-button-active': instance.hasFilter()
|
||||
}
|
||||
],
|
||||
headerFilterClearButton: ({ instance }) => [
|
||||
'p-column-filter-clear-button p-link',
|
||||
{
|
||||
'p-hidden-space': !instance.hasRowFilter()
|
||||
'p-datatable-inline-filter': props.display === 'row',
|
||||
'p-datatable-popover-filter': props.display === 'menu'
|
||||
}
|
||||
],
|
||||
filterInput: 'p-datatable-filter-element-container',
|
||||
filterMenuButton: 'p-datatable-column-filter-dropdown',
|
||||
headerFilterClearButton: 'p-datatable-column-filter-clear-button',
|
||||
filterOverlay: ({ instance, props }) => [
|
||||
'p-datatable-filter-overlay p-component',
|
||||
{
|
||||
'p-column-filter-overlay p-component p-fluid': true,
|
||||
'p-column-filter-overlay-menu': props.display === 'menu',
|
||||
'p-datatable-filter-overlay-popover': props.display === 'menu',
|
||||
'p-ripple-disabled': instance.$primevue.config.ripple === false
|
||||
}
|
||||
],
|
||||
filterRowItems: 'p-column-filter-row-items',
|
||||
filterRowItems: 'p-datatable-filter-constraint-list',
|
||||
filterRowItem: ({ instance, matchMode }) => [
|
||||
'p-column-filter-row-item',
|
||||
'p-datatable-filter-constraint',
|
||||
{
|
||||
'p-highlight': matchMode && instance.isRowMatchModeSelected(matchMode.value)
|
||||
'p-datatable-filter-constraint-selected': matchMode && instance.isRowMatchModeSelected(matchMode.value)
|
||||
}
|
||||
],
|
||||
filterSeparator: 'p-column-filter-separator',
|
||||
filterOperator: 'p-column-filter-operator',
|
||||
filterOperatorDropdown: 'p-column-filter-operator-dropdown',
|
||||
filterConstraints: 'p-column-filter-constraints',
|
||||
filterConstraint: 'p-column-filter-constraint',
|
||||
filterMatchModeDropdown: 'p-column-filter-matchmode-dropdown',
|
||||
filterRemoveButton: 'p-column-filter-remove-button',
|
||||
filterAddRule: 'p-column-filter-add-rule',
|
||||
filterSeparator: 'p-datatable-filter-constraint-separator',
|
||||
filterOperator: 'p-datatable-filter-operator',
|
||||
filterOperatorDropdown: 'p-datatable-filter-operator-dropdown',
|
||||
filterConstraints: 'p-datatable-filter-rule-list',
|
||||
filterConstraint: 'p-datatable-filter-rule',
|
||||
filterMatchModeDropdown: 'p-datatable-filter-constraint-dropdown',
|
||||
filterRemoveButton: 'p-datatable-filter-remove-rule-button',
|
||||
filterAddRule: 'p-datatable-filter-add-rule-button', //TODO: Remove
|
||||
filterAddRuleButton: 'p-column-filter-add-button',
|
||||
filterButtonbar: 'p-column-filter-buttonbar',
|
||||
filterClearButton: 'p-column-filter-clear-button',
|
||||
filterApplyButton: 'p-column-filter-apply-button',
|
||||
//tablebody
|
||||
filterButtonbar: 'p-datatable-filter-buttonbar',
|
||||
filterClearButton: 'p-datatable-filter-clear-button',
|
||||
filterApplyButton: 'p-datatable-filter-apply-button',
|
||||
tbody: ({ props }) => (props.frozenRow ? 'p-datatable-tbody p-datatable-frozen-tbody' : 'p-datatable-tbody'),
|
||||
rowgroupHeader: 'p-rowgroup-header',
|
||||
rowGroupToggler: 'p-row-toggler p-link',
|
||||
rowGroupTogglerIcon: 'p-row-toggler-icon',
|
||||
rowgroupHeader: 'p-datatable-row-group-header',
|
||||
rowGroupToggler: 'p-datatable-row-group-toggle',
|
||||
rowGroupTogglerIcon: 'p-row-toggler-icon', //TODO: Remove
|
||||
row: ({ instance, props, index, columnSelectionMode }) => {
|
||||
let rowStyleClass = [];
|
||||
|
||||
if (props.selectionMode) {
|
||||
rowStyleClass.push('p-selectable-row');
|
||||
rowStyleClass.push('p-datatable-selectable-row');
|
||||
}
|
||||
|
||||
if (props.selection) {
|
||||
rowStyleClass.push({
|
||||
'p-highlight': columnSelectionMode ? instance.isSelected && instance.$parentInstance.$parentInstance.highlightOnSelect : instance.isSelected
|
||||
'p-datatable-row-selected': columnSelectionMode ? instance.isSelected && instance.$parentInstance.$parentInstance.highlightOnSelect : instance.isSelected
|
||||
});
|
||||
}
|
||||
|
||||
if (props.contextMenuSelection) {
|
||||
rowStyleClass.push({
|
||||
'p-highlight-contextmenu': instance.isSelectedWithContextMenu
|
||||
'p-datatable-contextmenu-row-selected': instance.isSelectedWithContextMenu
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -135,41 +114,34 @@ const classes = {
|
|||
return rowStyleClass;
|
||||
},
|
||||
rowExpansion: 'p-datatable-row-expansion',
|
||||
rowgroupFooter: 'p-rowgroup-footer',
|
||||
rowgroupFooter: 'p-datatable-row-group-footer',
|
||||
emptyMessage: 'p-datatable-emptymessage',
|
||||
//bodycell
|
||||
bodyCell: ({ instance }) => [
|
||||
{
|
||||
'p-selection-column': instance.columnProp('selectionMode') != null,
|
||||
'p-editable-column': instance.isEditable(),
|
||||
'p-cell-editing': instance.d_editing,
|
||||
'p-frozen-column': instance.columnProp('frozen')
|
||||
'p-datatable-frozen-column': instance.columnProp('frozen')
|
||||
}
|
||||
],
|
||||
columnTitle: 'p-column-title',
|
||||
rowReorderIcon: 'p-datatable-reorderablerow-handle',
|
||||
rowToggler: 'p-row-toggler p-link',
|
||||
rowTogglerIcon: 'p-row-toggler-icon',
|
||||
rowEditorInitButton: 'p-row-editor-init p-link',
|
||||
rowEditorInitIcon: 'p-row-editor-init-icon',
|
||||
rowEditorSaveButton: 'p-row-editor-save p-link',
|
||||
rowEditorSaveIcon: 'p-row-editor-save-icon',
|
||||
rowEditorCancelButton: 'p-row-editor-cancel p-link',
|
||||
rowEditorCancelIcon: 'p-row-editor-cancel-icon',
|
||||
//tablefooter
|
||||
columnTitle: 'p-column-title', //TODO: Remove due to stacked mode
|
||||
rowReorderIcon: 'p-datatable-reorderable-row-handle',
|
||||
rowToggler: 'p-datatable-row-toggle',
|
||||
rowTogglerIcon: 'p-row-toggler-icon', //TODO: Remove
|
||||
rowEditorInitButton: 'p-datatable-row-editor-init',
|
||||
rowEditorInitIcon: 'p-row-editor-init-icon', //TODO: Remove
|
||||
rowEditorSaveButton: 'p-datatable-row-editor-save',
|
||||
rowEditorSaveIcon: 'p-row-editor-save-icon', //TODO: Remove
|
||||
rowEditorCancelButton: 'p-datatable-row-editor-cancel',
|
||||
rowEditorCancelIcon: 'p-row-editor-cancel-icon', //TODO: Remove
|
||||
tfoot: 'p-datatable-tfoot',
|
||||
//footercell
|
||||
footerCell: ({ instance }) => [
|
||||
{
|
||||
'p-frozen-column': instance.columnProp('frozen')
|
||||
'p-datatable-frozen-column': instance.columnProp('frozen')
|
||||
}
|
||||
],
|
||||
//datatable
|
||||
virtualScrollerSpacer: 'p-datatable-virtualscroller-spacer',
|
||||
footer: 'p-datatable-footer',
|
||||
resizeHelper: 'p-column-resizer-helper',
|
||||
reorderIndicatorUp: 'p-datatable-reorder-indicator-up',
|
||||
reorderIndicatorDown: 'p-datatable-reorder-indicator-down'
|
||||
resizeHelper: 'p-datatable-column-resize-indicator',
|
||||
reorderIndicatorUp: 'p-datatable-row-reorder-indicator-up',
|
||||
reorderIndicatorDown: 'p-datatable-row-reorder-indicator-down'
|
||||
};
|
||||
|
||||
const inlineStyles = {
|
||||
|
|
|
@ -9,25 +9,25 @@ export default {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.p-datatable .p-sortable-column {
|
||||
.p-datatable-sortable-column {
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
outline-color: transparent;
|
||||
}
|
||||
|
||||
.p-datatable .p-sortable-column .p-column-title,
|
||||
.p-datatable .p-sortable-column .p-sortable-column-icon,
|
||||
.p-datatable .p-sortable-column .p-sortable-column-badge {
|
||||
.p-datatable-column-title,
|
||||
.p-datatable-sortable-column-icon,
|
||||
.p-datatable-sortable-column-badge {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.p-datatable .p-sortable-column .p-sortable-column-icon {
|
||||
.p-datatable-sortable-column-icon {
|
||||
color: ${dt('datatable.sort.icon.color')};
|
||||
margin-left: 0.5rem;
|
||||
transition: color ${dt('transition.duration')};
|
||||
}
|
||||
|
||||
.p-datatable .p-sortable-column .p-sortable-column-badge {
|
||||
.p-datatable-sortable-column-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
@ -38,34 +38,34 @@ export default {
|
|||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
.p-datatable .p-sortable-column:not(.p-highlight):hover {
|
||||
.p-datatable-sortable-column:not(.p-datatable-column-sorted):hover {
|
||||
background: ${dt('datatable.header.cell.hover.background')};
|
||||
color: ${dt('datatable.header.cell.hover.color')};
|
||||
}
|
||||
|
||||
.p-datatable .p-sortable-column:not(.p-highlight):hover .p-sortable-column-icon {
|
||||
.p-datatable-sortable-column:not(.p-datatable-column-sorted):hover .p-datatable-sortable-column-icon {
|
||||
color: ${dt('datatable.sort.icon.hover.color')};
|
||||
}
|
||||
|
||||
.p-datatable .p-sortable-column.p-highlight {
|
||||
.p-datatable-column-sorted {
|
||||
background: ${dt('highlight.background')};
|
||||
color: ${dt('highlight.color')};
|
||||
}
|
||||
|
||||
.p-datatable .p-sortable-column:focus-visible {
|
||||
.p-datatable-sortable-column:focus-visible {
|
||||
outline: ${dt('focus.ring.width')} ${dt('focus.ring.style')} ${dt('focus.ring.color')};
|
||||
outline-offset: -1px;
|
||||
}
|
||||
|
||||
.p-datatable .p-sortable-column.p-highlight .p-sortable-column-icon {
|
||||
.p-datatable-column-sorted .p-datatable-sortable-column-icon {
|
||||
color: ${dt('highlight.color')};
|
||||
}
|
||||
|
||||
.p-datatable-hoverable-rows .p-selectable-row {
|
||||
.p-datatable-hoverable .p-datatable-selectable-row {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.p-datatable-scrollable > .p-datatable-wrapper {
|
||||
.p-datatable-scrollable > .p-datatable-table-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
@ -84,22 +84,22 @@ export default {
|
|||
z-index: 1;
|
||||
}
|
||||
|
||||
.p-datatable-scrollable .p-frozen-column {
|
||||
.p-datatable-scrollable .p-datatable-frozen-column {
|
||||
position: sticky;
|
||||
background: inherit;
|
||||
}
|
||||
|
||||
.p-datatable-scrollable th.p-frozen-column {
|
||||
.p-datatable-scrollable th.p-datatable-frozen-column {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
|
||||
.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead {
|
||||
.p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-thead,
|
||||
.p-datatable-scrollable > .p-datatable-table-container > .p-virtualscroller > .p-datatable-table > .p-datatable-thead {
|
||||
background: ${dt('datatable.header.cell.background')};
|
||||
}
|
||||
|
||||
.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot,
|
||||
.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
|
||||
.p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-tfoot,
|
||||
.p-datatable-scrollable > .p-datatable-table-container > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
|
||||
background: ${dt('datatable.footer.cell.background')};
|
||||
}
|
||||
|
||||
|
@ -109,14 +109,14 @@ export default {
|
|||
height: 100%;
|
||||
}
|
||||
|
||||
.p-datatable-flex-scrollable>.p-datatable-wrapper {
|
||||
.p-datatable-flex-scrollable>.p-datatable-table-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.p-datatable-scrollable-table>.p-datatable-tbody>.p-rowgroup-header {
|
||||
.p-datatable-scrollable-table > .p-datatable-tbody > .p-datatable-row-group-header {
|
||||
position: sticky;
|
||||
z-index: 1;
|
||||
}
|
||||
|
@ -129,16 +129,16 @@ export default {
|
|||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.p-datatable-resizable-table>.p-datatable-thead > tr > th.p-resizable-column:not(.p-frozen-column) {
|
||||
.p-datatable-resizable-table > .p-datatable-thead > tr > th.p-datatable-resizable-column:not(.p-datatable-frozen-column) {
|
||||
background-clip: padding-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p-datatable-resizable-table-fit > .p-datatable-thead > tr > th.p-resizable-column:last-child .p-column-resizer {
|
||||
.p-datatable-resizable-table-fit > .p-datatable-thead > tr > th.p-datatable-resizable-column:last-child .p-datatable-column-resizer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.p-datatable .p-column-resizer {
|
||||
.p-datatable-column-resizer {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@ -151,12 +151,12 @@ export default {
|
|||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.p-datatable .p-column-header-content {
|
||||
.p-datatable-column-header-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.p-datatable .p-column-resizer-helper {
|
||||
.p-datatable-column-resize-indicator {
|
||||
width: 1px;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
|
@ -164,64 +164,18 @@ export default {
|
|||
background: ${dt('datatable.resizer.color')};
|
||||
}
|
||||
|
||||
.p-datatable .p-row-toggler,
|
||||
.p-datatable .p-row-editor-init,
|
||||
.p-datatable .p-row-editor-save,
|
||||
.p-datatable .p-row-editor-cancel {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: 1.75rem;
|
||||
height: 1.75rem;
|
||||
color: ${dt('datatable.row.action.color')};
|
||||
border: 0 none;
|
||||
border-radius: 50%;
|
||||
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
||||
outline-color: transparent;
|
||||
}
|
||||
|
||||
.p-datatable .p-row-toggler:enabled:hover,
|
||||
.p-datatable .p-row-editor-init:enabled:hover,
|
||||
.p-datatable .p-row-editor-save:enabled:hover,
|
||||
.p-datatable .p-row-editor-cancel:enabled:hover {
|
||||
color: ${dt('datatable.row.action.hover.color')};
|
||||
background: ${dt('datatable.row.action.hover.background')};
|
||||
}
|
||||
|
||||
.p-datatable .p-row-toggler:focus-visible,
|
||||
.p-datatable .p-row-editor-init:focus-visible,
|
||||
.p-datatable .p-row-editor-save:focus-visible,
|
||||
.p-datatable .p-row-editor-cancel:focus-visible {
|
||||
outline: 1px solid ${dt('focus.ring.color')};
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.p-datatable .p-row-editor-save {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.p-datatable-tbody > tr.p-highlight .p-row-toggler:hover,
|
||||
.p-datatable-tbody > tr.p-highlight .p-row-editor-init:hover,
|
||||
.p-datatable-tbody > tr.p-highlight .p-row-editor-save:hover,
|
||||
.p-datatable-tbody > tr.p-highlight .p-row-editor-cancel:hover {
|
||||
background: ${dt('datatable.row.action.highlight.hover.background')};
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.p-datatable-reorder-indicator-up,
|
||||
.p-datatable-reorder-indicator-down {
|
||||
.p-datatable-row-reorder-indicator-up,
|
||||
.p-datatable-row-reorder-indicator-down {
|
||||
position: absolute;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.p-reorderable-column,
|
||||
.p-datatable-reorderablerow-handle {
|
||||
.p-datatable-reorderable-column,
|
||||
.p-datatable-reorderable-row-handle {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.p-datatable .p-datatable-loading-overlay {
|
||||
.p-datatable-mask {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -229,87 +183,19 @@ export default {
|
|||
z-index: 2;
|
||||
}
|
||||
|
||||
.p-column-filter-row {
|
||||
.p-datatable-inline-filter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.p-column-filter-row .p-column-filter-element {
|
||||
.p-datatable-inline-filter .p-datatable-filter-element-container {
|
||||
flex: 1 1 auto;
|
||||
width: 1%;
|
||||
}
|
||||
|
||||
.p-column-filter-menu-button {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: 1.75rem;
|
||||
height: 1.75rem;
|
||||
color: ${dt('datatable.filter.menu.button.color')};
|
||||
border: 0 none;
|
||||
background: transparent;
|
||||
border-radius: 50%;
|
||||
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
||||
outline-color: transparent;
|
||||
}
|
||||
|
||||
.p-column-filter-menu-button:hover {
|
||||
background: ${dt('datatable.filter.menu.button.hover.background')};
|
||||
color: ${dt('datatable.filter.menu.button.hover.color')};
|
||||
}
|
||||
|
||||
.p-column-filter-menu-button.p-column-filter-menu-button-open,
|
||||
.p-column-filter-menu-button.p-column-filter-menu-button-open:hover {
|
||||
background: ${dt('datatable.filter.menu.button.open.background')};
|
||||
color: ${dt('datatable.filter.menu.button.open.color')};
|
||||
}
|
||||
|
||||
.p-column-filter-menu-button.p-column-filter-menu-button-active,
|
||||
.p-column-filter-menu-button.p-column-filter-menu-button-active:hover {
|
||||
background: ${dt('datatable.filter.menu.button.active.background')};
|
||||
color: ${dt('datatable.filter.menu.button.active.color')};
|
||||
}
|
||||
|
||||
.p-column-filter-menu-button:focus-visible {
|
||||
outline: ${dt('focus.ring.width')} ${dt('focus.ring.style')} ${dt('focus.ring.color')};
|
||||
outline-offset: ${dt('focus.ring.offset')};
|
||||
}
|
||||
|
||||
.p-column-filter-clear-button {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: 1.75rem;
|
||||
height: 1.75rem;
|
||||
color: ${dt('datatable.filter.clear.button.color')};
|
||||
border: 0 none;
|
||||
background: transparent;
|
||||
border-radius: 50%;
|
||||
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
||||
outline-color: transparent;
|
||||
}
|
||||
|
||||
.p-column-filter-clear-button:hover {
|
||||
background: ${dt('datatable.filter.clear.button.hover.background')};
|
||||
color: ${dt('datatable.filter.clear.button.hover.color')};
|
||||
}
|
||||
|
||||
.p-column-filter-clear-button:focus-visible {
|
||||
outline: ${dt('focus.ring.width')} ${dt('focus.ring.style')} ${dt('focus.ring.color')};
|
||||
outline-offset: ${dt('focus.ring.offset')};
|
||||
}
|
||||
|
||||
.p-column-filter-overlay {
|
||||
.p-datatable-filter-overlay {
|
||||
background: ${dt('datatable.filter.overlay.background')};
|
||||
color: ${dt('datatable.filter.overlay.color')};
|
||||
border: 1px solid ${dt('datatable.filter.overlay.border.color')};
|
||||
|
@ -318,13 +204,13 @@ export default {
|
|||
min-width: 12.5rem;
|
||||
}
|
||||
|
||||
.p-column-filter-row-items {
|
||||
.p-datatable-filter-constraint-list {
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
padding: 0.25rem 0.25rem;
|
||||
}
|
||||
|
||||
.p-column-filter-row-item {
|
||||
.p-datatable-filter-constraint {
|
||||
margin: 2px 0;
|
||||
padding: 0.5rem 0.75rem;
|
||||
border: 0 none;
|
||||
|
@ -335,72 +221,72 @@ export default {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.p-column-filter-row-item:first-child {
|
||||
.p-datatable-filter-constraint:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.p-column-filter-row-item:last-child {
|
||||
.p-datatable-filter-constraint:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.p-column-filter-overlay .p-column-filter-row-items .p-column-filter-row-item.p-highlight {
|
||||
.p-datatable-filter-constraint-selected {
|
||||
background: ${dt('datatable.filter.matchmode.item.selected.background')};
|
||||
color: ${dt('datatable.filter.matchmode.item.selected.color')};
|
||||
}
|
||||
|
||||
.p-column-filter-overlay .p-column-filter-row-items .p-column-filter-row-item:not(.p-highlight):not(.p-disabled):hover {
|
||||
.p-datatable-filter-constraint:not(.p-datatable-filter-constraint-selected):not(.p-disabled):hover {
|
||||
background: ${dt('datatable.filter.matchmode.item.focus.background')};
|
||||
color: ${dt('datatable.filter.matchmode.item.focus.color')};
|
||||
}
|
||||
|
||||
.p-column-filter-overlay .p-column-filter-row-items .p-column-filter-row-item:focus-visible {
|
||||
.p-datatable-filter-constraint:focus-visible {
|
||||
outline: 1px solid ${dt('focus.ring.color')};
|
||||
outline-offset: 2px;
|
||||
box-shadow: 0 none;
|
||||
}
|
||||
|
||||
.p-column-filter-overlay .p-column-filter-row-items .p-column-filter-separator {
|
||||
.p-datatable-filter-constraint-separator {
|
||||
border-top: 1px solid ${dt('datatable.filter.matchmode.item.separator.border.color')};
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
.p-column-filter-menu {
|
||||
.p-datatable-popover-filter {
|
||||
display: inline-flex;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.p-column-filter-operator {
|
||||
.p-datatable-filter-operator {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.p-column-filter-constraints {
|
||||
.p-datatable-filter-rule-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.p-column-filter-constraint {
|
||||
.p-datatable-filter-rule {
|
||||
padding: 0;
|
||||
border-bottom: 1px solid ${dt('datatable.filter.constraint.border.color')};
|
||||
}
|
||||
|
||||
.p-column-filter-constraint:last-child {
|
||||
.p-datatable-filter-rule:last-child {
|
||||
border-bottom: 0 none;
|
||||
}
|
||||
|
||||
.p-column-filter-matchmode-dropdown {
|
||||
.p-datatable-filter-constraint-dropdown {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.p-column-filter-remove-button {
|
||||
.p-datatable-filter-remove-rule-button {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.p-column-filter-constraint:last-child .p-column-filter-remove-button {
|
||||
.p-datatable-filter-constraint:last-child .p-datatable-filter-remove-button {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.p-column-filter-overlay-menu {
|
||||
.p-datatable-filter-overlay-popover {
|
||||
background: ${dt('datatable.filter.overlay.background')};
|
||||
color: ${dt('datatable.filter.overlay.color')};
|
||||
border: 1px solid ${dt('datatable.filter.overlay.border.color')};
|
||||
|
@ -413,34 +299,17 @@ export default {
|
|||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.p-column-filter-add-rule {
|
||||
.p-datatable-filter-add-rule-button {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.p-column-filter-buttonbar {
|
||||
.p-datatable-filter-buttonbar {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.p-column-filter-add-button,
|
||||
.p-column-filter-remove-button {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.p-column-filter-add-button .p-button-label,
|
||||
.p-column-filter-remove-button .p-button-label {
|
||||
flex-grow: 0;
|
||||
}
|
||||
|
||||
.p-column-filter-buttonbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.p-column-filter-buttonbar .p-button:not(.p-button-icon-only) {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.p-datatable-virtualscroller-spacer {
|
||||
display: flex;
|
||||
}
|
||||
|
@ -453,14 +322,9 @@ export default {
|
|||
left: 0;
|
||||
}
|
||||
|
||||
.p-datatable .p-paginator-top {
|
||||
.p-datatable-paginator-top {
|
||||
border: solid ${dt('datatable.header.border.color')};
|
||||
border-width: 0 0 1px 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.p-datatable .p-paginator-bottom {
|
||||
border-width: 0 0 1px 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.p-datatable-header {
|
||||
|
@ -506,21 +370,21 @@ export default {
|
|||
padding: 0.75rem 1rem;
|
||||
}
|
||||
|
||||
.p-datatable-hoverable-rows .p-datatable-tbody > tr:not(.p-highlight):hover {
|
||||
.p-datatable-hoverable .p-datatable-tbody > tr:not(.p-datatable-row-selected):hover {
|
||||
background: ${dt('datatable.row.hover.background')};
|
||||
color: ${dt('datatable.row.hover.color')};
|
||||
}
|
||||
|
||||
.p-datatable-tbody > tr.p-highlight {
|
||||
.p-datatable-tbody > tr.p-datatable-row-selected {
|
||||
background: ${dt('highlight.background')};
|
||||
color: ${dt('highlight.color')};
|
||||
}
|
||||
|
||||
.p-datatable-tbody > tr:has(+ .p-highlight) > td {
|
||||
.p-datatable-tbody > tr:has(+ .p-datatable-row-selected) > td {
|
||||
border-bottom-color: ${dt('datatable.body.cell.selected.border.color')};
|
||||
}
|
||||
|
||||
.p-datatable-tbody > tr.p-highlight > td {
|
||||
.p-datatable-tbody > tr.p-datatable-row-selectedt > td {
|
||||
border-bottom-color: ${dt('datatable.body.cell.selected.border.color')};
|
||||
}
|
||||
|
||||
|
@ -529,7 +393,7 @@ export default {
|
|||
outline-offset: -1px;
|
||||
}
|
||||
|
||||
.p-datatable-tbody > tr.p-highlight-contextmenu {
|
||||
.p-datatable-tbody > tr.p-datatable-contextmenu-row-selected {
|
||||
outline: 1px solid ${dt('focus.ring.color')};
|
||||
outline-offset: -1px;
|
||||
}
|
||||
|
@ -558,59 +422,61 @@ export default {
|
|||
height: 2rem;
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines .p-datatable-header {
|
||||
border-width: 1px 1px 0 1px;
|
||||
.p-datatable-gridlines .p-datatable-header {
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines .p-datatable-footer {
|
||||
.p-datatable-gridlines .p-datatable-footer {
|
||||
border-width: 0 1px 1px 1px;
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines .p-paginator-top {
|
||||
.p-datatable-gridlines .p-datatable-paginator-top {
|
||||
border-width: 0 1px 0 1px;
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines .p-paginator-bottom {
|
||||
.p-datatable-gridlines .p-datatable-paginator-bottom {
|
||||
border-width: 0 1px 1px 1px;
|
||||
border-style: solid;
|
||||
border-color: ${dt('datatable.footer.border.color')};
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines .p-datatable-thead>tr>th {
|
||||
.p-datatable-gridlines .p-datatable-thead > tr > th {
|
||||
border-width: 1px 0 1px 1px;
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines .p-datatable-thead>tr>th:last-child {
|
||||
.p-datatable-gridlines .p-datatable-thead > tr > th:last-child {
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines .p-datatable-tbody>tr>td {
|
||||
.p-datatable-gridlines .p-datatable-tbody > tr > td {
|
||||
border-width: 1px 0 0 1px;
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines .p-datatable-tbody>tr>td:last-child {
|
||||
.p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {
|
||||
border-width: 1px 1px 0 1px;
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines .p-datatable-tbody>tr:last-child>td {
|
||||
p-datatable-gridlines .p-datatable-tbody > tr:last-child>td {
|
||||
border-width: 1px 0 1px 1px;
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines .p-datatable-tbody>tr:last-child>td:last-child {
|
||||
.p-datatable-gridlines .p-datatable-tbody > tr:last-child > td:last-child {
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines .p-datatable-tfoot>tr>td {
|
||||
.p-datatable-gridlines .p-datatable-tfoot>tr>td {
|
||||
border-width: 1px 0 1px 1px;
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines .p-datatable-tfoot>tr>td:last-child {
|
||||
.p-datatable-gridlines .p-datatable-tfoot > tr > td:last-child {
|
||||
border-width: 1px 1px 1px 1px;
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines .p-datatable-thead+.p-datatable-tfoot > tr > td {
|
||||
.p-datatable.p-datatable-gridlines .p-datatable-thead +.p-datatable-tfoot > tr > td {
|
||||
border-width: 0 0 1px 1px;
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines .p-datatable-thead+.p-datatable-tfoot > tr > td:last-child {
|
||||
.p-datatable.p-datatable-gridlines .p-datatable-thead + .p-datatable-tfoot > tr > td:last-child {
|
||||
border-width: 0 1px 1px 1px;
|
||||
}
|
||||
|
||||
|
@ -626,7 +492,7 @@ export default {
|
|||
border-width: 0 0 0 1px;
|
||||
}
|
||||
|
||||
.p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody >tr:last-child >td:last-child {
|
||||
.p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td:last-child {
|
||||
border-width: 0 1px 0 1px;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue