@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
79 lines (78 loc) • 5.9 kB
TypeScript
import { CSSProperties } from 'react';
import { EditableConfigEntityState } from './Components/SharedProps/EditableConfigEntityState';
import { StatusColour } from '../AdaptableState/Common/Enums';
import { AdaptableStyle } from '../AdaptableState/Common/AdaptableStyle';
import { Schedule, Weekday } from '../AdaptableState/Common/Schedule';
import { AdaptableColumnDataType, AdaptableSystemIconName, AdaptableOptions } from '../types';
import { AdaptableAlert } from '../AdaptableState/Common/AdaptableAlert';
import { AdaptableMessageType } from '../AdaptableState/Common/AdaptableMessageType';
import type { ContainerContext } from '../AdaptableOptions/ContainerOptions';
/** Generic swatch entries for the Colour Picker (resolved at runtime per active theme). */
export declare function getSwatchColorVar(index: number): string;
/** Default mid-gray from the theme swatch palette (`--ab-color-swatch-4`). */
export declare function getGraySwatchColor(): string;
export declare function getSwatchColorPaletteEntries(): string[];
/** Theme semantic colours for the Colour Picker (resolved at runtime per active theme). */
export declare function getThemeSemanticColorPaletteEntries(): string[];
/** Swatch and theme semantic entries (default Colour Picker set). */
export declare function getDefaultColorPalette(): string[];
export declare function getEmptyConfigState(): EditableConfigEntityState;
export declare function getDescriptionForDataType(dataType: AdaptableColumnDataType): "number" | "date" | "text";
export declare function getPlaceholderForDataType(dataType: AdaptableColumnDataType): "Enter Value" | "Enter Number" | "Enter Date";
export declare function getModalContainer(adaptableOptions: AdaptableOptions, document: Document, context?: ContainerContext): HTMLElement;
export declare function IsEmptyStyle(style: AdaptableStyle): boolean;
export declare function IsNotEmptyStyle(style: AdaptableStyle): boolean;
export declare function getMessageTypeByStatusColour(statusColour: StatusColour): AdaptableMessageType;
export declare function getButtonToneByMessageType(messageType: AdaptableMessageType): 'success' | 'error' | 'neutral' | 'none' | 'warning' | 'info' | 'accent';
export declare function getGlyphByMessageType(messageType: AdaptableMessageType): AdaptableSystemIconName;
export declare function getColorByMessageType(messageType: AdaptableMessageType): string;
export declare function getStyleForStatusColour(statusColour: StatusColour): CSSProperties;
export declare function getStyleForMessageType(messageType: AdaptableMessageType): CSSProperties;
export declare function getGlyphForStatusColour(statusColour: StatusColour): string;
export declare function getGlyphForMessageType(messageType: AdaptableMessageType): string;
export declare function getButtonToneForMessageType(messageType: AdaptableMessageType): 'info' | 'warning' | 'error' | 'success';
export declare function getScheduleDescription(schedule: Schedule): string;
export declare function getWeekDayByIndex(dayOfWeek: number): Weekday;
export declare function getMessageTypeFromAdaptableAlerts(adaptableAlerts: AdaptableAlert[]): AdaptableMessageType;
export declare function getButtonColourForAdaptableAlerts(adaptableAlerts: AdaptableAlert[], messageTypeColor: string): string;
export declare function getButtonTextColourForArrayandMessageType(adaptableAlerts: AdaptableAlert[], messageType: AdaptableMessageType): string;
export declare function getButtonTextColourForMessageType(messageType: AdaptableMessageType): string;
export declare function getAdaptableToolPanelWidth(): number;
export declare function getSimpleButtonPaddingWidth(): number;
export declare function getCSSVariableValue(cssVariable: string): string | undefined;
export declare function setCSSVariableValue(cssVariable: string, value: string): void;
export declare function isBrowserDocumentAvailable(): boolean;
export declare const UIHelper: {
getSwatchColorVar: typeof getSwatchColorVar;
getGraySwatchColor: typeof getGraySwatchColor;
getSwatchColorPaletteEntries: typeof getSwatchColorPaletteEntries;
getThemeSemanticColorPaletteEntries: typeof getThemeSemanticColorPaletteEntries;
getDefaultColorPalette: typeof getDefaultColorPalette;
getEmptyConfigState: typeof getEmptyConfigState;
getDescriptionForDataType: typeof getDescriptionForDataType;
getPlaceholderForDataType: typeof getPlaceholderForDataType;
getModalContainer: typeof getModalContainer;
IsEmptyStyle: typeof IsEmptyStyle;
IsNotEmptyStyle: typeof IsNotEmptyStyle;
getMessageTypeByStatusColour: typeof getMessageTypeByStatusColour;
getGlyphByMessageType: typeof getGlyphByMessageType;
getButtonToneByMessageType: typeof getButtonToneByMessageType;
getStyleForStatusColour: typeof getStyleForStatusColour;
getGlyphForStatusColour: typeof getGlyphForStatusColour;
getButtonToneForMessageType: typeof getButtonToneForMessageType;
getScheduleDescription: typeof getScheduleDescription;
getWeekDayByIndex: typeof getWeekDayByIndex;
getColorByMessageType: typeof getColorByMessageType;
getGlyphForMessageType: typeof getGlyphForMessageType;
getStyleForMessageType: typeof getStyleForMessageType;
getMessageTypeFromAdaptableAlerts: typeof getMessageTypeFromAdaptableAlerts;
getButtonColourForAdaptableAlerts: typeof getButtonColourForAdaptableAlerts;
getButtonTextColourForArrayandMessageType: typeof getButtonTextColourForArrayandMessageType;
getButtonTextColourForMessageType: typeof getButtonTextColourForMessageType;
getCSSVariableValue: typeof getCSSVariableValue;
setCSSVariableValue: typeof setCSSVariableValue;
getAdaptableToolPanelWidth: typeof getAdaptableToolPanelWidth;
isBrowserDocumentAvailable: typeof isBrowserDocumentAvailable;
getSimpleButtonPaddingWidth: typeof getSimpleButtonPaddingWidth;
};
export default UIHelper;