inviton-powerduck 0.0.136 → 0.0.137

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,52 +9,55 @@ import CurrencyCodeTranslator from './../../common/enum-translation/currency-cod
9
9
  import { Currency } from './../../common/enums/currency';
10
10
 
11
11
  interface CurrencyCodePickerArgs {
12
- selected: Currency;
13
- mandatory?: boolean;
14
- label?: string;
15
- placeholder?: string;
16
- validationState?: ValidationState;
17
- wrap?: boolean;
18
- changed: (e: Currency) => void;
12
+ cssClass?: string
13
+ selected: Currency;
14
+ mandatory?: boolean;
15
+ label?: string;
16
+ placeholder?: string;
17
+ validationState?: ValidationState;
18
+ wrap?: boolean;
19
+ changed: (e: Currency) => void;
19
20
  }
20
21
 
21
22
  @Component
22
23
  class CurrencyCodePickerComponent extends TsxComponent<CurrencyCodePickerArgs> implements CurrencyCodePickerArgs {
23
- @Prop() selected: Currency;
24
- @Prop() mandatory!: boolean;
25
- @Prop() label!: string;
26
- @Prop() placeholder!: string;
27
- @Prop() wrap!: boolean;
28
- @Prop() changed: (e: Currency) => void;
24
+ @Prop() cssClass?: string
25
+ @Prop() selected: Currency;
26
+ @Prop() mandatory!: boolean;
27
+ @Prop() label!: string;
28
+ @Prop() placeholder!: string;
29
+ @Prop() wrap!: boolean;
30
+ @Prop() changed: (e: Currency) => void;
29
31
 
30
- getOptionList(): DropdownListOption[] {
31
- return [
32
- { id: Currency.EUR, text: CurrencyCodeTranslator.getString(Currency.EUR) },
33
- { id: Currency.CZK, text: CurrencyCodeTranslator.getString(Currency.CZK) },
34
- { id: Currency.GBP, text: CurrencyCodeTranslator.getString(Currency.GBP) },
35
- { id: Currency.PLN, text: CurrencyCodeTranslator.getString(Currency.PLN) },
36
- { id: Currency.USD, text: CurrencyCodeTranslator.getString(Currency.USD) },
37
- ];
38
- }
32
+ getOptionList(): DropdownListOption[] {
33
+ return [
34
+ { id: Currency.EUR, text: CurrencyCodeTranslator.getString(Currency.EUR) },
35
+ { id: Currency.CZK, text: CurrencyCodeTranslator.getString(Currency.CZK) },
36
+ { id: Currency.GBP, text: CurrencyCodeTranslator.getString(Currency.GBP) },
37
+ { id: Currency.PLN, text: CurrencyCodeTranslator.getString(Currency.PLN) },
38
+ { id: Currency.USD, text: CurrencyCodeTranslator.getString(Currency.USD) },
39
+ ];
40
+ }
39
41
 
40
- render(h) {
41
- const optArr = this.getOptionList();
42
+ render(h) {
43
+ const optArr = this.getOptionList();
42
44
 
43
- return (
44
- <DropdownList
45
- label={!isNullOrEmpty(this.label) ? this.label : PowerduckState.getResourceValue('currencyCode')}
46
- wrap={this.wrap}
47
- validationState={this.validationState}
48
- placeholder={this.placeholder}
49
- options={optArr}
50
- mandatory={this.mandatory}
51
- selected={this.selected == null ? null : optArr.find(p => p.id == this.selected)}
52
- changed={(e: DropdownListOption) => {
53
- this.changed(e?.id as Currency);
54
- }}
55
- />
56
- );
57
- }
45
+ return (
46
+ <DropdownList
47
+ cssClass={this.cssClass}
48
+ label={!isNullOrEmpty(this.label) ? this.label : PowerduckState.getResourceValue('currencyCode')}
49
+ wrap={this.wrap}
50
+ validationState={this.validationState}
51
+ placeholder={this.placeholder}
52
+ options={optArr}
53
+ mandatory={this.mandatory}
54
+ selected={this.selected == null ? null : optArr.find(p => p.id == this.selected)}
55
+ changed={(e: DropdownListOption) => {
56
+ this.changed(e?.id as Currency);
57
+ }}
58
+ />
59
+ );
60
+ }
58
61
  }
59
62
 
60
63
  const CurrencyCodePicker = toNative(CurrencyCodePickerComponent);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "inviton-powerduck",
3
3
  "type": "module",
4
- "version": "0.0.136",
4
+ "version": "0.0.137",
5
5
  "files": [
6
6
  "app/",
7
7
  "common/",