## Description Property pane navigation on click of a widget error or log from the debugger. Navigation to a field works if the log has the required meta data here it would be the property path. With the help of the property pane config and the widget's properties we generate the payload to set the required panel, tab, section states. Factory class to clearly separate out the logic for the different entities. #### PR fixes following issue(s) Related to https://github.com/appsmithorg/appsmith/issues/16408 Fixes https://github.com/appsmithorg/appsmith/issues/25465 Fixes https://github.com/appsmithorg/appsmith/issues/25462
70 lines
2.2 KiB
TypeScript
70 lines
2.2 KiB
TypeScript
export const WIDGET = {
|
|
INPUT_V2: "inputwidgetv2",
|
|
TEXT: "textwidget",
|
|
TEXTNAME: (index: string) => `Text${index}`,
|
|
PHONE_INPUT: "phoneinputwidget",
|
|
CURRENCY_INPUT: "currencyinputwidget",
|
|
BUTTON: "buttonwidget",
|
|
BUTTONNAME: (index: string) => `Button${index}`,
|
|
CONTAINER: "containerwidget",
|
|
MULTISELECT: "multiselectwidgetv2",
|
|
BUTTON_GROUP: "buttongroupwidget",
|
|
TREESELECT: "singleselecttreewidget",
|
|
TAB: "tabswidget",
|
|
TABLE_V1: "tablewidget",
|
|
TABLE: "tablewidgetv2",
|
|
SWITCHGROUP: "switchgroupwidget",
|
|
SWITCH: "switchwidget",
|
|
SELECT: "selectwidget",
|
|
MULTITREESELECT: "multiselecttreewidget",
|
|
RADIO_GROUP: "radiogroupwidget",
|
|
LIST: "listwidget",
|
|
LIST_V2: "listwidgetv2",
|
|
RATING: "ratewidget",
|
|
CHECKBOXGROUP: "checkboxgroupwidget",
|
|
CHECKBOX: "checkboxwidget",
|
|
CHART: "chartwidget",
|
|
AUDIO: "audiowidget",
|
|
AUDIORECORDER: "audiorecorderwidget",
|
|
PHONEINPUT: "phoneinputwidget",
|
|
CAMERA: "camerawidget",
|
|
FILEPICKER: "filepickerwidgetv2",
|
|
DOCUMENT_VIEWER: "documentviewerwidget",
|
|
VIDEO: "videowidget",
|
|
CATEGORY_SLIDER: "categorysliderwidget",
|
|
NUMBER_SLIDER: "numbersliderwidget",
|
|
RANGE_SLIDER: "rangesliderwidget",
|
|
IFRAME: "iframewidget",
|
|
DIVIDER: "dividerwidget",
|
|
PROGRESS: "progresswidget",
|
|
MODAL: "modalwidget",
|
|
FORM: "formwidget",
|
|
ICONBUTTON: "iconbuttonwidget",
|
|
IMAGE: "imagewidget",
|
|
STATBOX: "statboxwidget",
|
|
JSONFORM: "jsonformwidget",
|
|
MENUBUTTON: "menubuttonwidget"
|
|
} as const;
|
|
|
|
// property pane element selector are maintained here
|
|
export const PROPERTY_SELECTOR = {
|
|
// input
|
|
onClick: ".t--property-control-onclick",
|
|
onSubmit: ".t--property-control-onsubmit",
|
|
text: ".t--property-control-text",
|
|
defaultValue: ".t--property-control-defaultselectedvalues",
|
|
propertyName: ".t--property-control-propertyname",
|
|
onClickFieldName: "onClick",
|
|
TextFieldName: "Text",
|
|
tableData: ".t--property-control-tabledata",
|
|
tableColumnNames: '[data-rbd-draggable-id] input[type="text"]',
|
|
};
|
|
type ValueOf<T> = T[keyof T];
|
|
|
|
export const getWidgetSelector = (widget: ValueOf<typeof WIDGET>) =>
|
|
`.t--widget-${widget}`;
|
|
export const getWidgetInputSelector = (widget: ValueOf<typeof WIDGET>) =>
|
|
`.t--widget-${widget} input`;
|
|
|
|
export const modalWidgetSelector = ".t--modal-widget";
|