PromucFlow_constructor/app/client/src/constants/PropertyControlConstants.tsx
Piyush Mishra a4fe0a461e
Table Widget New Features (#2816)
- Each column has more options and can be configured in the property pane instead of the table
- Table level styles can now be set in the property pane
- Property sections are collapsible

Co-authored-by: vicky-primathon.in <vicky.bansal@primathon.in>
Co-authored-by: nandan.anantharamu <nandan.anantharamu@thoughtspot.com>
Co-authored-by: Abhinav Jha <abhinav@appsmith.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
2021-02-16 15:59:08 +05:30

50 lines
1.4 KiB
TypeScript

import { getPropertyControlTypes } from "components/propertyControls";
const ControlTypes = getPropertyControlTypes();
export type ControlType = typeof ControlTypes[keyof typeof ControlTypes];
export type PropertyPaneSectionConfig = {
sectionName: string;
id?: string;
children: PropertyPaneConfig[];
hidden?: (props: any, propertyPath: string) => boolean;
propertySectionPath?: string;
};
export type PanelConfig = {
editableTitle: boolean;
titlePropertyName: string;
panelIdPropertyName: string;
children: PropertyPaneConfig[];
updateHook: (
props: any,
propertyPath: string,
propertyValue: any,
) => Array<{ propertyPath: string; propertyValue: any }> | undefined;
};
export type PropertyPaneControlConfig = {
id?: string;
label: string;
propertyName: string;
helpText?: string;
isJSConvertible?: boolean;
customJSControl?: string;
controlType: ControlType;
validationMessage?: string;
dataTreePath?: string;
children?: PropertyPaneConfig[];
panelConfig?: PanelConfig;
updateHook?: (
props: any,
propertyName: string,
propertyValue: any,
) => Array<{ propertyPath: string; propertyValue: any }> | undefined;
hidden?: (props: any, propertyPath: string) => boolean;
isBindProperty: boolean;
isTriggerProperty: boolean;
};
export type PropertyPaneConfig =
| PropertyPaneSectionConfig
| PropertyPaneControlConfig;