* 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
43 lines
1.2 KiB
TypeScript
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;
|