Files
klz-cables.com/.pnpm-store/v10/files/a6/38ab730aff92d505c4d2d084dc0902701fab14588e2574a024e60766647f69335e75c500cad28f549f7a2531341e1e07ce6b9ec1ff60067b22ab790a23e27e
Marc Mintel 5397309103
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
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

63 lines
1.8 KiB
Plaintext

import type { ClientField, Operator, ResolvedFilterOptions, SanitizedCollectionConfig, Where } from 'payload';
export type WhereBuilderProps = {
readonly collectionPluralLabel: SanitizedCollectionConfig['labels']['plural'];
readonly collectionSlug: SanitizedCollectionConfig['slug'];
readonly fields?: ClientField[];
readonly renderedFilters?: Map<string, React.ReactNode>;
readonly resolvedFilterOptions?: Map<string, ResolvedFilterOptions>;
};
export type Value = Date | number | number[] | string | string[];
export type ReducedField = {
field: ClientField;
label: React.ReactNode;
operators: {
label: string;
value: Operator;
}[];
plainTextLabel?: string;
value: Value;
};
export type Relation = 'and' | 'or';
export type ADD = {
andIndex?: number;
field: string;
orIndex?: number;
relation?: Relation;
type: 'add';
};
export type REMOVE = {
andIndex: number;
orIndex: number;
type: 'remove';
};
export type UPDATE = {
andIndex: number;
field?: string;
operator?: string;
orIndex: number;
type: 'update';
value?: unknown;
};
export type Action = ADD | REMOVE | UPDATE;
export type State = {
or: Where[];
};
export type AddCondition = ({ andIndex, field, orIndex, relation, }: {
andIndex: number;
field: ReducedField;
orIndex: number;
relation: 'and' | 'or';
}) => Promise<void> | void;
export type UpdateCondition = ({ type, andIndex, field, operator, orIndex, value, }: {
andIndex: number;
field: ReducedField;
operator: string;
orIndex: number;
type: 'field' | 'operator' | 'value';
value: Value;
}) => Promise<void> | void;
export type RemoveCondition = ({ andIndex, orIndex, }: {
andIndex: number;
orIndex: number;
}) => Promise<void> | void;
//# sourceMappingURL=types.d.ts.map