allowedCurrencies | public | CurrencyCode[] | [] | Regions that are allowed to be selected in the dropdown. | |
currency | public | string | undefined | undefined | | LionInputAmount |
currencyLabel | public | string | '' | | LionInputAmount |
defaultValidators | public | array | [new CurrencyAndAmount()] | | |
deserializer | public | | deserializer | | |
formatter | public | | formatAmount | | LionInputAmount |
locale | public | string | undefined | undefined | | LionInputAmount |
modelValue | public | object | | For a FormControl to function properly, its modelValue, serializedValue and viewValue/formattedValue
should always translate in two directions. This is expected by `_callParser` method. It guards for empty
viewValues. As the viewValue (`.value`) only concerns the amount part and not the currency part in
InputAmountDropdown, this contract is broken.
Below, we compensate for this. | LionInputAmount |
parser | public | | parseAmount | | LionInputAmount |
placeholder | public | string | '' | | LionInput |
preferredCurrencies | public | CurrencyCode[] | [] | Regions that will be shown on top of the dropdown | |
readOnly | public | boolean | false | A Boolean attribute which, if present, indicates that the user should not be able to edit
the value of the input. The difference between disabled and readonly is that read-only
controls can still function, whereas disabled controls generally do not function as
controls until they are enabled.
(From: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) | LionInput |
refs | public | object | { /** @type {DropdownRef} */ dropdown: /** @type {DropdownRef} */ (createRef()), } | | |
serializer | public | | serializer | | |
slots | public | | | | LionInput |
type | public | string | 'text' | | LionInput |
_allCurrenciesLabel | protected | string | '' | Group label for all countries, when preferredCountries are shown | |
_allowedOrAllCurrencies | protected | CurrencyCode[] | | Used for rendering the region/currency list | |
_currencyDisplayNodeSlot | protected | string | 'after' | The slot to put the currency display node in. Can be ‘prefix’, ‘suffix’, ‘before’ and ‘after’.
Default will be ‘after’. | LionInputAmount |
_currencyUtil | protected | | currencyUtil | | |
_dropdownSlot | protected | | | | |
_feedbackConditionMeta | protected | | | | LionField |
_focusableNode | protected | | | | LionField |
_inputNode | protected | HTMLInputElement | | | LionInput |
_langIso | protected | RegionCode | undefined | undefined | | |
_preferredCurrenciesLabel | protected | string | '' | Group label for preferred countries, when preferredCountries are shown | |
_templateDataDropdown | protected | TemplateDataForDropdownInputAmount | | This method provides a TemplateData object to be fed to pure template functions, a.k.a.
Pure Templates™. The goal is to totally decouple presentation from logic here, so that
Subclassers can override all content without having to loose private info contained
within the template function that was overridden.
Subclassers would need to make sure all the contents of the TemplateData object are implemented
by making sure they are coupled to the right ‘ref’ ([data-ref=dropdown] in this example),
with the help of lit’s spread operator directive.
To enhance this process, the TemplateData object is completely typed. Ideally, this would be
enhanced by providing linters that make sure all of their required members are implemented by
a Subclasser.
When a Subclasser wants to add more data, this can be done via: | |