2022-01-18 07:52:24 +00:00
|
|
|
import Widget from "./widget";
|
|
|
|
|
import IconSVG from "./icon.svg";
|
|
|
|
|
import { CONFIG as BaseConfig } from "widgets/BaseInputWidget";
|
|
|
|
|
import { getDefaultCurrency } from "./component/CurrencyCodeDropdown";
|
2022-10-27 10:02:12 +00:00
|
|
|
import { LabelPosition } from "components/constants";
|
2022-01-18 07:52:24 +00:00
|
|
|
|
|
|
|
|
export const CONFIG = {
|
2022-11-23 09:48:23 +00:00
|
|
|
features: {
|
|
|
|
|
dynamicHeight: true,
|
|
|
|
|
},
|
2022-01-18 07:52:24 +00:00
|
|
|
type: Widget.getWidgetType(),
|
|
|
|
|
name: "Currency Input",
|
|
|
|
|
iconSVG: IconSVG,
|
|
|
|
|
needsMeta: true,
|
2022-06-17 03:12:47 +00:00
|
|
|
searchTags: ["amount", "total"],
|
2022-01-18 07:52:24 +00:00
|
|
|
defaults: {
|
|
|
|
|
...BaseConfig.defaults,
|
|
|
|
|
widgetName: "CurrencyInput",
|
|
|
|
|
version: 1,
|
2022-10-27 10:02:12 +00:00
|
|
|
rows: 7,
|
|
|
|
|
labelPosition: LabelPosition.Top,
|
2022-01-18 07:52:24 +00:00
|
|
|
allowCurrencyChange: false,
|
2022-04-08 17:39:05 +00:00
|
|
|
defaultCurrencyCode: getDefaultCurrency().currency,
|
2022-01-18 07:52:24 +00:00
|
|
|
decimals: 0,
|
|
|
|
|
},
|
|
|
|
|
properties: {
|
|
|
|
|
derived: Widget.getDerivedPropertiesMap(),
|
|
|
|
|
default: Widget.getDefaultPropertiesMap(),
|
|
|
|
|
meta: Widget.getMetaPropertiesMap(),
|
|
|
|
|
config: Widget.getPropertyPaneConfig(),
|
2022-08-11 11:20:09 +00:00
|
|
|
contentConfig: Widget.getPropertyPaneContentConfig(),
|
|
|
|
|
styleConfig: Widget.getPropertyPaneStyleConfig(),
|
2022-01-18 07:52:24 +00:00
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default Widget;
|