Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
26 lines
902 B
Plaintext
26 lines
902 B
Plaintext
import { jsx as _jsx } from "react/jsx-runtime";
|
|
import { toWords, transformColumnsToSearchParams } from 'payload/shared';
|
|
import React from 'react';
|
|
import { Pill } from '../../../Pill/index.js';
|
|
import './index.scss';
|
|
const baseClass = 'query-preset-columns-cell';
|
|
export const QueryPresetsColumnsCell = ({
|
|
cellData
|
|
}) => {
|
|
return /*#__PURE__*/_jsx("div", {
|
|
className: baseClass,
|
|
children: cellData ? transformColumnsToSearchParams(cellData).map((column, i) => {
|
|
const isColumnActive = !column.startsWith('-');
|
|
// to void very lengthy cells, only display the active columns
|
|
if (!isColumnActive) {
|
|
return null;
|
|
}
|
|
return /*#__PURE__*/_jsx(Pill, {
|
|
pillStyle: isColumnActive ? 'always-white' : 'light',
|
|
size: "small",
|
|
children: toWords(column)
|
|
}, i);
|
|
}) : 'No columns selected'
|
|
});
|
|
};
|
|
//# sourceMappingURL=index.js.map |