primevue
Version:
PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBloc
1 lines • 13.7 kB
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../../src/datatable/style/DataTableStyle.js"],"sourcesContent":["import { style } from '@primeuix/styles/datatable';\nimport BaseStyle from '@primevue/core/base/style';\n\nconst classes = {\n root: ({ props }) => [\n 'p-datatable p-component',\n {\n 'p-datatable-hoverable': props.rowHover || props.selectionMode,\n 'p-datatable-resizable': props.resizableColumns,\n 'p-datatable-resizable-fit': props.resizableColumns && props.columnResizeMode === 'fit',\n 'p-datatable-scrollable': props.scrollable,\n 'p-datatable-flex-scrollable': props.scrollable && props.scrollHeight === 'flex',\n 'p-datatable-striped': props.stripedRows,\n 'p-datatable-gridlines': props.showGridlines,\n 'p-datatable-sm': props.size === 'small',\n 'p-datatable-lg': props.size === 'large'\n }\n ],\n mask: 'p-datatable-mask p-overlay-mask',\n loadingIcon: 'p-datatable-loading-icon',\n header: 'p-datatable-header',\n pcPaginator: ({ position }) => 'p-datatable-paginator-' + position,\n tableContainer: 'p-datatable-table-container',\n table: ({ props }) => [\n 'p-datatable-table',\n {\n 'p-datatable-scrollable-table': props.scrollable,\n 'p-datatable-resizable-table': props.resizableColumns,\n 'p-datatable-resizable-table-fit': props.resizableColumns && props.columnResizeMode === 'fit'\n }\n ],\n thead: 'p-datatable-thead',\n headerCell: ({ instance, props, column }) =>\n column && !instance.columnProp('hidden') && (props.rowGroupMode !== 'subheader' || props.groupRowsBy !== instance.columnProp(column, 'field'))\n ? [\n 'p-datatable-header-cell',\n {\n 'p-datatable-frozen-column': instance.columnProp('frozen')\n }\n ]\n : [\n 'p-datatable-header-cell',\n {\n 'p-datatable-sortable-column': instance.columnProp('sortable'),\n 'p-datatable-resizable-column': instance.resizableColumns,\n 'p-datatable-column-sorted': instance.isColumnSorted(),\n 'p-datatable-frozen-column': instance.columnProp('frozen'),\n 'p-datatable-reorderable-column': props.reorderableColumns\n }\n ],\n columnResizer: 'p-datatable-column-resizer',\n columnHeaderContent: 'p-datatable-column-header-content',\n columnTitle: 'p-datatable-column-title',\n columnFooter: 'p-datatable-column-footer',\n sortIcon: 'p-datatable-sort-icon',\n pcSortBadge: 'p-datatable-sort-badge',\n filter: ({ props }) => [\n 'p-datatable-filter',\n {\n 'p-datatable-inline-filter': props.display === 'row',\n 'p-datatable-popover-filter': props.display === 'menu'\n }\n ],\n filterElementContainer: 'p-datatable-filter-element-container',\n pcColumnFilterButton: 'p-datatable-column-filter-button',\n pcColumnFilterClearButton: 'p-datatable-column-filter-clear-button',\n filterOverlay: ({ props }) => [\n 'p-datatable-filter-overlay p-component',\n {\n 'p-datatable-filter-overlay-popover': props.display === 'menu'\n }\n ],\n filterConstraintList: 'p-datatable-filter-constraint-list',\n filterConstraint: ({ instance, matchMode }) => [\n 'p-datatable-filter-constraint',\n {\n 'p-datatable-filter-constraint-selected': matchMode && instance.isRowMatchModeSelected(matchMode.value)\n }\n ],\n filterConstraintSeparator: 'p-datatable-filter-constraint-separator',\n filterOperator: 'p-datatable-filter-operator',\n pcFilterOperatorDropdown: 'p-datatable-filter-operator-dropdown',\n filterRuleList: 'p-datatable-filter-rule-list',\n filterRule: 'p-datatable-filter-rule',\n pcFilterConstraintDropdown: 'p-datatable-filter-constraint-dropdown',\n pcFilterRemoveRuleButton: 'p-datatable-filter-remove-rule-button',\n pcFilterAddRuleButton: 'p-datatable-filter-add-rule-button',\n filterButtonbar: 'p-datatable-filter-buttonbar',\n pcFilterClearButton: 'p-datatable-filter-clear-button',\n pcFilterApplyButton: 'p-datatable-filter-apply-button',\n tbody: ({ props }) => (props.frozenRow ? 'p-datatable-tbody p-datatable-frozen-tbody' : 'p-datatable-tbody'),\n rowGroupHeader: 'p-datatable-row-group-header',\n rowToggleButton: 'p-datatable-row-toggle-button',\n rowToggleIcon: 'p-datatable-row-toggle-icon',\n row: ({ instance, props, index, columnSelectionMode }) => {\n let rowStyleClass = [];\n\n if (props.selectionMode) {\n rowStyleClass.push('p-datatable-selectable-row');\n }\n\n if (props.selection) {\n rowStyleClass.push({\n 'p-datatable-row-selected': columnSelectionMode ? instance.isSelected && instance.$parentInstance.$parentInstance.highlightOnSelect : instance.isSelected\n });\n }\n\n if (props.contextMenuSelection) {\n rowStyleClass.push({\n 'p-datatable-contextmenu-row-selected': instance.isSelectedWithContextMenu\n });\n }\n\n rowStyleClass.push(index % 2 === 0 ? 'p-row-even' : 'p-row-odd');\n\n return rowStyleClass;\n },\n rowExpansion: 'p-datatable-row-expansion',\n rowGroupFooter: 'p-datatable-row-group-footer',\n emptyMessage: 'p-datatable-empty-message',\n bodyCell: ({ instance }) => [\n {\n 'p-datatable-frozen-column': instance.columnProp('frozen')\n }\n ],\n reorderableRowHandle: 'p-datatable-reorderable-row-handle',\n pcRowEditorInit: 'p-datatable-row-editor-init',\n pcRowEditorSave: 'p-datatable-row-editor-save',\n pcRowEditorCancel: 'p-datatable-row-editor-cancel',\n tfoot: 'p-datatable-tfoot',\n footerCell: ({ instance }) => [\n {\n 'p-datatable-frozen-column': instance.columnProp('frozen')\n }\n ],\n virtualScrollerSpacer: 'p-datatable-virtualscroller-spacer',\n footer: 'p-datatable-footer',\n columnResizeIndicator: 'p-datatable-column-resize-indicator',\n rowReorderIndicatorUp: 'p-datatable-row-reorder-indicator-up',\n rowReorderIndicatorDown: 'p-datatable-row-reorder-indicator-down'\n};\n\nconst inlineStyles = {\n tableContainer: { overflow: 'auto' },\n thead: { position: 'sticky' },\n tfoot: { position: 'sticky' }\n};\n\nexport default BaseStyle.extend({\n name: 'datatable',\n style,\n classes,\n inlineStyles\n});\n"],"names":["classes","root","_ref","props","rowHover","selectionMode","resizableColumns","columnResizeMode","scrollable","scrollHeight","stripedRows","showGridlines","size","mask","loadingIcon","header","pcPaginator","_ref2","position","tableContainer","table","_ref3","thead","headerCell","_ref4","instance","column","columnProp","rowGroupMode","groupRowsBy","isColumnSorted","reorderableColumns","columnResizer","columnHeaderContent","columnTitle","columnFooter","sortIcon","pcSortBadge","filter","_ref5","display","filterElementContainer","pcColumnFilterButton","pcColumnFilterClearButton","filterOverlay","_ref6","filterConstraintList","filterConstraint","_ref7","matchMode","isRowMatchModeSelected","value","filterConstraintSeparator","filterOperator","pcFilterOperatorDropdown","filterRuleList","filterRule","pcFilterConstraintDropdown","pcFilterRemoveRuleButton","pcFilterAddRuleButton","filterButtonbar","pcFilterClearButton","pcFilterApplyButton","tbody","_ref8","frozenRow","rowGroupHeader","rowToggleButton","rowToggleIcon","row","_ref9","index","columnSelectionMode","rowStyleClass","push","selection","isSelected","$parentInstance","highlightOnSelect","contextMenuSelection","isSelectedWithContextMenu","rowExpansion","rowGroupFooter","emptyMessage","bodyCell","_ref10","reorderableRowHandle","pcRowEditorInit","pcRowEditorSave","pcRowEditorCancel","tfoot","footerCell","_ref11","virtualScrollerSpacer","footer","columnResizeIndicator","rowReorderIndicatorUp","rowReorderIndicatorDown","inlineStyles","overflow","BaseStyle","extend","name","style"],"mappings":";;;AAGA,IAAMA,OAAO,GAAG;AACZC,EAAAA,IAAI,EAAE,SAANA,IAAIA,CAAAC,IAAA,EAAA;AAAA,IAAA,IAAKC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAA,OAAO,CACjB,yBAAyB,EACzB;AACI,MAAA,uBAAuB,EAAEA,KAAK,CAACC,QAAQ,IAAID,KAAK,CAACE,aAAa;MAC9D,uBAAuB,EAAEF,KAAK,CAACG,gBAAgB;MAC/C,2BAA2B,EAAEH,KAAK,CAACG,gBAAgB,IAAIH,KAAK,CAACI,gBAAgB,KAAK,KAAK;MACvF,wBAAwB,EAAEJ,KAAK,CAACK,UAAU;MAC1C,6BAA6B,EAAEL,KAAK,CAACK,UAAU,IAAIL,KAAK,CAACM,YAAY,KAAK,MAAM;MAChF,qBAAqB,EAAEN,KAAK,CAACO,WAAW;MACxC,uBAAuB,EAAEP,KAAK,CAACQ,aAAa;AAC5C,MA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