@aurigma/design-atoms
Version:
Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.
44 lines (43 loc) • 1.4 kB
TypeScript
import { Item } from "@aurigma/design-atoms-model/Product/Items";
export declare abstract class Violation {
prepareItem: (item: Item) => void;
isAvailableFor(item: Item): boolean;
getViolationInfo(item: Item, oldViolationInfo: ITotalViolationInfo): IViolationInfo;
getStatePropertyName(): string;
getDataPropertyName(): string;
private static _computeTotalViolationState;
static computeTotalViolationInfo: (violations: Violation[], item: Item, oldViolationInfo: ITotalViolationInfo) => ITotalViolationInfo;
}
export interface ITotalViolationInfo {
state: ViolationState;
data?: {
[key: string]: IViolationData;
};
messages?: string[];
}
export interface IViolationInfo {
state: ViolationState;
message?: string;
data?: IViolationData;
}
export declare class ViolationInfoResult {
static get none(): {
state: ViolationState;
};
static get good(): {
state: ViolationState;
};
}
export interface IViolationData {
}
/** Results of preflight check. */
export declare enum ViolationState {
/** The preflight check was not performed, `0`. */
None = 0,
/** The preflight check is successful, `1`. */
Good = 1,
/** The preflight check results in a warning, `2`. */
Warning = 2,
/** The preflight check results in an error, `3`. */
Bad = 3
}