PromucFlow_constructor/app/client/src/widgets/PhoneInputWidget/index.ts
Pawan Kumar 1821e31943
fix: Theme Stylesheet refactor (#18258)
* fix

* move stylesheet to widget level

* fix types

* fix types

* fix types

* fix types ( thanks to ashit )

* fix type issue

* add config for list widget

* fix jest tests
2022-11-28 10:14:31 +05:30

43 lines
1.2 KiB
TypeScript

import Widget from "./widget";
import IconSVG from "./icon.svg";
import { CONFIG as BaseConfig } from "widgets/BaseInputWidget";
import { getDefaultISDCode } from "./component/ISDCodeDropdown";
import { LabelPosition } from "components/constants";
import { DynamicHeight } from "utils/WidgetFeatures";
export const CONFIG = {
features: {
dynamicHeight: {
sectionIndex: 3,
defaultValue: DynamicHeight.FIXED,
active: true,
},
},
type: Widget.getWidgetType(),
name: "Phone Input",
iconSVG: IconSVG,
needsMeta: true,
searchTags: ["call"],
defaults: {
...BaseConfig.defaults,
widgetName: "PhoneInput",
version: 1,
rows: 7,
labelPosition: LabelPosition.Top,
defaultDialCode: getDefaultISDCode().dial_code,
allowDialCodeChange: false,
allowFormatting: true,
},
properties: {
derived: Widget.getDerivedPropertiesMap(),
default: Widget.getDefaultPropertiesMap(),
meta: Widget.getMetaPropertiesMap(),
config: Widget.getPropertyPaneConfig(),
contentConfig: Widget.getPropertyPaneContentConfig(),
styleConfig: Widget.getPropertyPaneStyleConfig(),
stylesheetConfig: Widget.getStylesheetConfig(),
},
};
export default Widget;