inviton-powerduck 0.0.85 → 0.0.87

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.
Files changed (77) hide show
  1. package/common/localized-text.ts +11 -1
  2. package/common/localized-value-helper.ts +9 -7
  3. package/common/validation.ts +2 -2
  4. package/components/app/dynamic-component-container.tsx +1 -1
  5. package/components/app/root-dynamic-component-container.tsx +1 -1
  6. package/components/button/button.tsx +1 -1
  7. package/components/button/excel-upload-button.tsx +1 -1
  8. package/components/button/ladda-button.tsx +1 -1
  9. package/components/button/text-button.tsx +1 -1
  10. package/components/button/upload-button.tsx +1 -1
  11. package/components/card/card-body.tsx +1 -1
  12. package/components/card/card-header-with-options.tsx +1 -1
  13. package/components/card/card-header.tsx +1 -1
  14. package/components/card/card.tsx +1 -1
  15. package/components/collapse/index.tsx +1 -1
  16. package/components/contenteditable/index.tsx +1 -1
  17. package/components/context-menu/context-menu.tsx +1 -1
  18. package/components/counter/fetchdata.tsx +1 -1
  19. package/components/counter/index.tsx +1 -1
  20. package/components/datatable/col-vis-modal.tsx +1 -1
  21. package/components/datatable/filter-modal.tsx +1 -1
  22. package/components/dropdown/image-dropdown.tsx +1 -1
  23. package/components/dropdown/timezone-picker.tsx +1 -1
  24. package/components/dropdown-button/dropdown-button-element.tsx +1 -1
  25. package/components/dropdown-button/dropdown-button-heading.tsx +1 -1
  26. package/components/dropdown-button/dropdown-button-item.tsx +1 -1
  27. package/components/dropdown-button/dropdown-button-separator.tsx +1 -1
  28. package/components/dropdown-button/language-dropdown-button.tsx +1 -1
  29. package/components/file-downloader/index.tsx +1 -1
  30. package/components/form/footer-buttons.tsx +1 -1
  31. package/components/form/form.tsx +1 -1
  32. package/components/form/separator.tsx +1 -1
  33. package/components/form/validation-result-displayer.tsx +1 -1
  34. package/components/fullcalendar/fullcalendar-draggable-event.tsx +1 -1
  35. package/components/fullcalendar/timegrid-calendar.tsx +1 -1
  36. package/components/google/maps.tsx +1 -1
  37. package/components/highlight-js/index.tsx +1 -1
  38. package/components/home/index.tsx +1 -1
  39. package/components/html-literal/html-literal.tsx +1 -1
  40. package/components/image-crop/image-cropping-modal.tsx +1 -1
  41. package/components/image-crop/upload-and-crop.tsx +1 -1
  42. package/components/input/checkbox-without-label.tsx +1 -1
  43. package/components/input/geo-json.tsx +1 -1
  44. package/components/input/localized-info-input.tsx +8 -8
  45. package/components/input/localized-string-input.tsx +15 -15
  46. package/components/input/localized-string-textarea.tsx +9 -9
  47. package/components/input/localized-string-wysiwyg.tsx +9 -9
  48. package/components/input/localized-url-input.tsx +15 -15
  49. package/components/loading-indicator/index.tsx +1 -1
  50. package/components/modal/animation-error.tsx +1 -1
  51. package/components/modal/animation-success.tsx +1 -1
  52. package/components/modal/icon-question.tsx +1 -1
  53. package/components/modal/icon-warning.tsx +1 -1
  54. package/components/modal/modal-body.tsx +1 -1
  55. package/components/modal/modal-footer.tsx +1 -1
  56. package/components/modal-wrap/modal-section-wrapper.tsx +1 -1
  57. package/components/modal-wrap/modal-subtitle.tsx +1 -1
  58. package/components/progress-bar/index.tsx +1 -1
  59. package/components/rating/rating-displayer.tsx +1 -1
  60. package/components/rating/rating-picker.tsx +1 -1
  61. package/components/share/share-modal.tsx +1 -1
  62. package/components/share/share.tsx +1 -1
  63. package/components/sortable/sortable-container.tsx +1 -1
  64. package/components/sortable/sortable-item.tsx +1 -1
  65. package/components/spreadsheet/spreadsheet.tsx +1 -1
  66. package/components/summary-stats/summary-stats.tsx +1 -1
  67. package/components/swiper/swiper-gallery.tsx +1 -1
  68. package/components/swiper/swiper-slide.tsx +1 -1
  69. package/components/swiper/swiper.tsx +1 -1
  70. package/components/table-wrapper/table-wrapper.tsx +1 -1
  71. package/components/tilebox/tilebox.tsx +1 -1
  72. package/components/tooltip/index.tsx +1 -1
  73. package/components/transition/index.tsx +1 -1
  74. package/components/wizard/wizard-subtitle.tsx +1 -1
  75. package/package.json +1 -1
  76. package/common/utils/localized-string.ts +0 -83
  77. package/common/utils/localized-text-util.ts +0 -36
@@ -1,4 +1,14 @@
1
- export default class LocalizedText {
1
+ export interface ILocalizedText {
2
+ sk?: string
3
+ cs?: string
4
+ pl?: string
5
+ en?: string
6
+ de?: string
7
+ it?: string
8
+ hu?: string
9
+ }
10
+
11
+ export default class LocalizedText implements ILocalizedText {
2
12
  sk: string = null as any;
3
13
  cs: string = null as any;
4
14
  pl: string = null as any;
@@ -1,17 +1,19 @@
1
1
  import PowerduckState from '../app/powerduck-state';
2
2
  import { Language } from './enums/language';
3
- import LocalizedText from './localized-text';
3
+ import { ILocalizedText } from './localized-text';
4
4
  import { isNullOrEmpty } from './utils/is-null-or-empty';
5
5
 
6
- export default class LocalizedValueHelper {
7
- static getLocalizedValue(value: LocalizedText): string {
6
+ export default class LocalizedValueHelper {
7
+ static getValue(value: ILocalizedText, lang?: Language | string): string {
8
8
  if (value == null) {
9
9
  return null as any;
10
10
  }
11
11
 
12
- const lang = PowerduckState.getCurrentLanguage();
13
- const inLang = value[lang];
12
+ if (lang == null) {
13
+ lang = PowerduckState.getCurrentLanguage()
14
+ }
14
15
 
16
+ const inLang = value[lang];
15
17
  if (inLang != null) {
16
18
  return inLang;
17
19
  }
@@ -42,8 +44,8 @@ export default class LocalizedValueHelper {
42
44
  return null as any;
43
45
  }
44
46
 
45
- static validateLocalizedValue(locValArr: LocalizedText): boolean {
46
- if (isNullOrEmpty(LocalizedValueHelper.getLocalizedValue(locValArr))) {
47
+ static validateLocalizedValue(locValArr: ILocalizedText): boolean {
48
+ if (isNullOrEmpty(LocalizedValueHelper.getValue(locValArr))) {
47
49
  return false;
48
50
  }
49
51
 
@@ -21,11 +21,11 @@
21
21
  } from "@vuelidate/validators";
22
22
  import { PowerduckViewModelBase } from "./base-component";
23
23
  import { Validation } from "@vuelidate/core";
24
- import LocalizedStringHelper from "./utils/localized-string";
25
24
  import { isNullOrEmpty } from "./utils/is-null-or-empty";
26
25
  import { capitalize } from "./utils/capitalize-string";
27
26
  import PowerduckState from "../app/powerduck-state";
28
27
  import { IValidationSet, ValidationRuleset, ValidationState } from "./static-wrappers/interfaces/validation-interface";
28
+ import LocalizedValueHelper from "./localized-value-helper";
29
29
 
30
30
  function getFirstUnsattisfiedValidatorName(valProp: Validation): string {
31
31
  const errors = valProp?.$errors || [];
@@ -158,7 +158,7 @@ export class ValidationBuilder {
158
158
 
159
159
  requiredLocalizedString(): ValidationBuilder {
160
160
  this._validationArgs.requiredLocalizedString = (value) => {
161
- if (value == null || isNullOrEmpty(LocalizedStringHelper.getValue(value, 'sk'))) {
161
+ if (value == null || isNullOrEmpty(LocalizedValueHelper.getValue(value, 'sk'))) {
162
162
  return false;
163
163
  }
164
164
 
@@ -85,5 +85,5 @@ class DynamicComponentContainerComponent extends Vue implements IDynamicComponen
85
85
  }
86
86
  }
87
87
 
88
- const DynamicComponentContainer = toNative(DynamicComponentContainerComponent)
88
+ const DynamicComponentContainer = toNative(DynamicComponentContainerComponent)
89
89
  export default DynamicComponentContainer
@@ -30,5 +30,5 @@ class RootDynamicComponentContainerComponent extends Vue implements IDynamicComp
30
30
  }
31
31
  }
32
32
 
33
- const RootDynamicComponentContainer = toNative(RootDynamicComponentContainerComponent)
33
+ const RootDynamicComponentContainer = toNative(RootDynamicComponentContainerComponent)
34
34
  export default RootDynamicComponentContainer
@@ -122,5 +122,5 @@ class ButtonComponent extends TsxComponent<ButtonArgs> implements ButtonArgs {
122
122
  }
123
123
  }
124
124
 
125
- const Button = toNative(ButtonComponent)
125
+ const Button = toNative(ButtonComponent)
126
126
  export default Button
@@ -55,5 +55,5 @@ class ExcelUploadButtonComponent extends TsxComponent<ExcelUploadButtonArgs> imp
55
55
  }
56
56
  }
57
57
 
58
- const ExcelUploadButton = toNative(ExcelUploadButtonComponent)
58
+ const ExcelUploadButton = toNative(ExcelUploadButtonComponent)
59
59
  export default ExcelUploadButton
@@ -61,5 +61,5 @@ class LaddaButtonComponent extends TsxComponent<LaddaButtonArgs> implements Ladd
61
61
  }
62
62
  }
63
63
 
64
- const LaddaButton = toNative(LaddaButtonComponent)
64
+ const LaddaButton = toNative(LaddaButtonComponent)
65
65
  export default LaddaButton
@@ -62,5 +62,5 @@ class TextButtonComponent extends TsxComponent<TextButtonArgs> implements TextBu
62
62
  }
63
63
  }
64
64
 
65
- const TextButton = toNative(TextButtonComponent)
65
+ const TextButton = toNative(TextButtonComponent)
66
66
  export default TextButton
@@ -176,5 +176,5 @@ class UploadButtonComponent extends TsxComponent<UploadButtonArgs> implements Up
176
176
  }
177
177
  }
178
178
 
179
- const UploadButton = toNative(UploadButtonComponent)
179
+ const UploadButton = toNative(UploadButtonComponent)
180
180
  export default UploadButton
@@ -9,5 +9,5 @@ class CardBodyComponent extends TsxComponent<CardBodyArgs> implements CardBodyAr
9
9
  }
10
10
  }
11
11
 
12
- const CardBody = toNative(CardBodyComponent)
12
+ const CardBody = toNative(CardBodyComponent)
13
13
  export default CardBody
@@ -54,5 +54,5 @@ class CardHeaderWithOptionsComponent extends TsxComponent<CardHeaderWithOptionsA
54
54
  }
55
55
  }
56
56
 
57
- const CardHeaderWithOptions = toNative(CardHeaderWithOptionsComponent)
57
+ const CardHeaderWithOptions = toNative(CardHeaderWithOptionsComponent)
58
58
  export default CardHeaderWithOptions
@@ -30,5 +30,5 @@ class CardHeaderComponent extends TsxComponent<CardHeaderArgs> implements CardHe
30
30
  }
31
31
  }
32
32
 
33
- const CardHeader = toNative(CardHeaderComponent)
33
+ const CardHeader = toNative(CardHeaderComponent)
34
34
  export default CardHeader
@@ -72,5 +72,5 @@ class CardComponent extends TsxComponent<CardArgs> implements CardArgs {
72
72
  }
73
73
  }
74
74
 
75
- const Card = toNative(CardComponent)
75
+ const Card = toNative(CardComponent)
76
76
  export default Card
@@ -39,5 +39,5 @@ class CollapseComponent extends TsxComponent<CollapseArgs> implements CollapseAr
39
39
  }
40
40
  }
41
41
 
42
- const Collapse = toNative(CollapseComponent)
42
+ const Collapse = toNative(CollapseComponent)
43
43
  export default Collapse
@@ -50,5 +50,5 @@ class ContentEditableComponent extends TsxComponent<ContentEditableArgs> impleme
50
50
  }
51
51
  }
52
52
 
53
- const ContentEditable = toNative(ContentEditableComponent)
53
+ const ContentEditable = toNative(ContentEditableComponent)
54
54
  export default ContentEditable
@@ -19,5 +19,5 @@ class ContextMenuComponent extends TsxComponent<ContextMenuArgs> implements Cont
19
19
  }
20
20
  }
21
21
 
22
- const ContextMenu = toNative(ContextMenuComponent)
22
+ const ContextMenu = toNative(ContextMenuComponent)
23
23
  export default ContextMenu
@@ -91,5 +91,5 @@ class FetchDataComponentComponent extends PowerduckViewModelBase {
91
91
  }
92
92
  }
93
93
 
94
- const FetchDataComponent = toNative(FetchDataComponentComponent)
94
+ const FetchDataComponent = toNative(FetchDataComponentComponent)
95
95
  export default FetchDataComponent
@@ -97,5 +97,5 @@ class CounterComponentComponent extends Vue {
97
97
  }
98
98
  }
99
99
 
100
- const CounterComponent = toNative(CounterComponentComponent)
100
+ const CounterComponent = toNative(CounterComponentComponent)
101
101
  export default CounterComponent
@@ -59,5 +59,5 @@ class ColVisModalComponent extends TsxComponent<ColVisModalArgs> implements ColV
59
59
  }
60
60
  }
61
61
 
62
- const ColVisModal = toNative(ColVisModalComponent)
62
+ const ColVisModal = toNative(ColVisModalComponent)
63
63
  export default ColVisModal
@@ -168,5 +168,5 @@ class ColFilterModalComponent extends TsxComponent<ColFilterModalArgs> implement
168
168
  }
169
169
  }
170
170
 
171
- const ColFilterModal = toNative(ColFilterModalComponent)
171
+ const ColFilterModal = toNative(ColFilterModalComponent)
172
172
  export default ColFilterModal
@@ -237,5 +237,5 @@ class ImageDropdownComponent extends TsxComponent<ImageDropdownArgs> implements
237
237
  }
238
238
  }
239
239
 
240
- const ImageDropdown = toNative(ImageDropdownComponent)
240
+ const ImageDropdown = toNative(ImageDropdownComponent)
241
241
  export default ImageDropdown
@@ -289,5 +289,5 @@ class TimezonePickerComponent extends TsxComponent<TimezonePickerArgs> implement
289
289
  }
290
290
  }
291
291
 
292
- const TimezonePicker = toNative(TimezonePickerComponent)
292
+ const TimezonePicker = toNative(TimezonePickerComponent)
293
293
  export default TimezonePicker
@@ -75,5 +75,5 @@ class DropdownButtonElementComponent extends TsxComponent<DropdownButtonElementA
75
75
  }
76
76
  }
77
77
 
78
- const DropdownButtonElement = toNative(DropdownButtonElementComponent)
78
+ const DropdownButtonElement = toNative(DropdownButtonElementComponent)
79
79
  export default DropdownButtonElement
@@ -13,5 +13,5 @@ class DropdownButtonHeadingComponent extends TsxComponent<DropdownButtonHeadingA
13
13
  }
14
14
  }
15
15
 
16
- const DropdownButtonHeading = toNative(DropdownButtonHeadingComponent)
16
+ const DropdownButtonHeading = toNative(DropdownButtonHeadingComponent)
17
17
  export default DropdownButtonHeading
@@ -92,5 +92,5 @@ class DropdownButtonItemComponent extends TsxComponent<DropdownButtonItemArgs> i
92
92
  }
93
93
  }
94
94
 
95
- const DropdownButtonItem = toNative(DropdownButtonItemComponent)
95
+ const DropdownButtonItem = toNative(DropdownButtonItemComponent)
96
96
  export default DropdownButtonItem
@@ -9,5 +9,5 @@ class DropdownButtonSeparatorComponent extends TsxComponent<DropdownButtonItemAr
9
9
  }
10
10
  }
11
11
 
12
- const DropdownButtonSeparator = toNative(DropdownButtonSeparatorComponent)
12
+ const DropdownButtonSeparator = toNative(DropdownButtonSeparatorComponent)
13
13
  export default DropdownButtonSeparator
@@ -50,5 +50,5 @@ class LanguageDropdownButtonComponent extends TsxComponent<LanguageDropdownButto
50
50
  }
51
51
  }
52
52
 
53
- const LanguageDropdownButton = toNative(LanguageDropdownButtonComponent)
53
+ const LanguageDropdownButton = toNative(LanguageDropdownButtonComponent)
54
54
  export default LanguageDropdownButton
@@ -262,5 +262,5 @@ class FileDownloadDialogComponent extends TsxComponent<FileDownloadDialogBinding
262
262
  }
263
263
  }
264
264
 
265
- const FileDownloadDialog = toNative(FileDownloadDialogComponent)
265
+ const FileDownloadDialog = toNative(FileDownloadDialogComponent)
266
266
  export default FileDownloadDialog
@@ -13,5 +13,5 @@ class FooterButtonsComponent extends TsxComponent<FooterButtonsArgs> implements
13
13
  }
14
14
  }
15
15
 
16
- const FooterButtons = toNative(FooterButtonsComponent)
16
+ const FooterButtons = toNative(FooterButtonsComponent)
17
17
  export default FooterButtons
@@ -9,5 +9,5 @@ class FormComponent extends TsxComponent<FormArgs> implements FormArgs {
9
9
  }
10
10
  }
11
11
 
12
- const Form = toNative(FormComponent)
12
+ const Form = toNative(FormComponent)
13
13
  export default Form
@@ -15,5 +15,5 @@ class SeparatorComponent extends TsxComponent<SeparatorArgs> implements Separato
15
15
  }
16
16
  }
17
17
 
18
- const Separator = toNative(SeparatorComponent)
18
+ const Separator = toNative(SeparatorComponent)
19
19
  export default Separator
@@ -32,5 +32,5 @@ class ValidationResultDisplayerComponent extends TsxComponent<ValidationResultDi
32
32
  }
33
33
  }
34
34
 
35
- const ValidationResultDisplayer = toNative(ValidationResultDisplayerComponent)
35
+ const ValidationResultDisplayer = toNative(ValidationResultDisplayerComponent)
36
36
  export default ValidationResultDisplayer
@@ -82,5 +82,5 @@ class FullCalendarDraggableEventComponent extends TsxComponent<FullCalendarDragg
82
82
  }
83
83
  }
84
84
 
85
- const FullCalendarDraggableEvent = toNative(FullCalendarDraggableEventComponent)
85
+ const FullCalendarDraggableEvent = toNative(FullCalendarDraggableEventComponent)
86
86
  export default FullCalendarDraggableEvent
@@ -496,5 +496,5 @@ class TimegridCalendarComponent extends TsxComponent<TimegridCalendarArgs> imple
496
496
  }
497
497
  }
498
498
 
499
- const TimegridCalendar = toNative(TimegridCalendarComponent)
499
+ const TimegridCalendar = toNative(TimegridCalendarComponent)
500
500
  export default TimegridCalendar
@@ -153,5 +153,5 @@ class GoogleMapComponent extends TsxComponent<GoogleMapArgs> implements GoogleMa
153
153
  }
154
154
  }
155
155
 
156
- const GoogleMap = toNative(GoogleMapComponent)
156
+ const GoogleMap = toNative(GoogleMapComponent)
157
157
  export default GoogleMap
@@ -59,5 +59,5 @@ class HighlightJsComponent extends TsxComponent<HighlightJsArgs> implements High
59
59
  }
60
60
  }
61
61
 
62
- const HighlightJs = toNative(HighlightJsComponent)
62
+ const HighlightJs = toNative(HighlightJsComponent)
63
63
  export default HighlightJs
@@ -45,5 +45,5 @@ class HomeComponentComponent extends Vue {
45
45
  }
46
46
  }
47
47
 
48
- const HomeComponent = toNative(HomeComponentComponent)
48
+ const HomeComponent = toNative(HomeComponentComponent)
49
49
  export default HomeComponent
@@ -37,5 +37,5 @@ class HtmlLiteralComponent extends TsxComponent<HtmlLiteralArgs> implements Html
37
37
  }
38
38
  }
39
39
 
40
- const HtmlLiteral = toNative(HtmlLiteralComponent)
40
+ const HtmlLiteral = toNative(HtmlLiteralComponent)
41
41
  export default HtmlLiteral
@@ -308,5 +308,5 @@ class ImageCropModalComponent extends TsxComponent<ImageCropModalBindingArgs> im
308
308
  }
309
309
  }
310
310
 
311
- const ImageCropModal = toNative(ImageCropModalComponent)
311
+ const ImageCropModal = toNative(ImageCropModalComponent)
312
312
  export default ImageCropModal
@@ -175,5 +175,5 @@ class UploadImageAndCropButtonComponent extends TsxComponent<UploadImageAndCropB
175
175
  }
176
176
  }
177
177
 
178
- const UploadImageAndCropButton = toNative(UploadImageAndCropButtonComponent)
178
+ const UploadImageAndCropButton = toNative(UploadImageAndCropButtonComponent)
179
179
  export default UploadImageAndCropButton
@@ -62,5 +62,5 @@ class CheckBoxWithoutLabelComponent extends TsxComponent<CheckBoxArgs> implement
62
62
  }
63
63
  }
64
64
 
65
- const CheckBoxWithoutLabel = toNative(CheckBoxWithoutLabelComponent)
65
+ const CheckBoxWithoutLabel = toNative(CheckBoxWithoutLabelComponent)
66
66
  export default CheckBoxWithoutLabel
@@ -53,5 +53,5 @@ class GeoJsonEditorComponent extends TsxComponent<GeoJsonEditorArgs> implements
53
53
  }
54
54
  }
55
55
 
56
- const GeoJsonEditor = toNative(GeoJsonEditorComponent)
56
+ const GeoJsonEditor = toNative(GeoJsonEditorComponent)
57
57
  export default GeoJsonEditor
@@ -1,5 +1,5 @@
1
1
  import { Prop, toNative } from "vue-facing-decorator";
2
- import LocalizedText from "../../common/localized-text";
2
+ import { ILocalizedText } from "../../common/localized-text";
3
3
  import TsxComponent, { Component } from "../../app/vuetsx";
4
4
  import { Language } from "../../common/enums/language";
5
5
  import { isNullOrEmpty } from "../../common/utils/is-null-or-empty";
@@ -12,13 +12,13 @@ import { ValidationState } from "../../common/static-wrappers/interfaces/validat
12
12
  interface LocalizedInfoInputArgs {
13
13
  label: string;
14
14
  wrap?: boolean;
15
- value: LocalizedText;
15
+ value: ILocalizedText;
16
16
  placeholder?: string;
17
17
  subtitle?: string;
18
18
  hint?: string;
19
19
  displayType?: "input" | "textarea";
20
20
  validationState?: ValidationState;
21
- changed: (e: LocalizedText) => void;
21
+ changed: (e: ILocalizedText) => void;
22
22
  mandatory?: boolean;
23
23
  }
24
24
 
@@ -26,19 +26,19 @@ interface LocalizedInfoInputArgs {
26
26
  class LocalizedInfoInputComponent extends TsxComponent<LocalizedInfoInputArgs> implements LocalizedInfoInputArgs {
27
27
  @Prop() label: string;
28
28
  @Prop() wrap?: boolean;
29
- @Prop() value: LocalizedText;
29
+ @Prop() value: ILocalizedText;
30
30
  @Prop() placeholder!: string;
31
31
  @Prop() subtitle!: string;
32
32
  @Prop() hint!: string;
33
33
  @Prop() displayType: "input" | "textarea";
34
- @Prop() changed: (e: LocalizedText) => void;
34
+ @Prop() changed: (e: ILocalizedText) => void;
35
35
  @Prop() mandatory?: boolean;
36
36
 
37
37
  getValueForTmrLanguage(lang: Language): string {
38
38
  return this.value[lang];
39
39
  }
40
40
 
41
- getValue(value: LocalizedText): LocalizedText {
41
+ getValue(value: ILocalizedText): ILocalizedText {
42
42
  if (value == null) {
43
43
  return {
44
44
  cs: null,
@@ -62,13 +62,13 @@ class LocalizedInfoInputComponent extends TsxComponent<LocalizedInfoInputArgs> i
62
62
  };
63
63
  }
64
64
 
65
- valueChanged(e: LocalizedText): void {
65
+ valueChanged(e: ILocalizedText): void {
66
66
  if (e == null) {
67
67
  this.changed(null);
68
68
  return;
69
69
  }
70
70
 
71
- let retObj: LocalizedText = {} as any;
71
+ let retObj: ILocalizedText = {} as any;
72
72
  const addLocalizedValue = (lang: Language, value: string): void => {
73
73
  if (!isNullOrEmpty(value)) {
74
74
  retObj[lang] = value;
@@ -9,17 +9,17 @@ import { ButtonLayout } from "../button/button-layout";
9
9
  import { DropdownButtonItemArgs } from "../dropdown-button/dropdown-button-item";
10
10
  import { PortalUtils } from "../../common/utils/utils";
11
11
  import { LanguageUtils } from "../../common/utils/language-utils";
12
- import LocalizedStringHelper from "../../common/utils/localized-string";
13
12
  import { Language } from "../../common/enums/language";
14
13
  import { isNullOrEmpty } from "../../common/utils/is-null-or-empty";
15
14
  import globalIcon from './img/global.png';
16
15
  import PowerduckState from "../../app/powerduck-state";
17
- import LocalizedText from "../../common/localized-text";
16
+ import { ILocalizedText } from "../../common/localized-text";
18
17
  import "./css/localized-string-input.css";
18
+ import LocalizedValueHelper from "../../common/localized-value-helper";
19
19
 
20
20
  interface LocalizedStringInputArgs extends FormItemWrapperArgs {
21
- value: LocalizedText;
22
- changed: (e: LocalizedText) => void;
21
+ value: ILocalizedText;
22
+ changed: (e: ILocalizedText) => void;
23
23
  supportedLanguages?: Language[];
24
24
  placeholder?: string;
25
25
  }
@@ -29,8 +29,8 @@ class LocalizedStringInputComponent extends TsxComponent<LocalizedStringInputArg
29
29
  @Prop() label!: string;
30
30
  @Prop() labelButtons!: DropdownButtonItemArgs[];
31
31
  @Prop() subtitle!: string;
32
- @Prop() value!: LocalizedText;
33
- @Prop() changed: (e: LocalizedText) => void;
32
+ @Prop() value!: ILocalizedText;
33
+ @Prop() changed: (e: ILocalizedText) => void;
34
34
  @Prop() supportedLanguages?: Language[];
35
35
  @Prop() marginType?: MarginType;
36
36
  @Prop() maxWidth?: number;
@@ -45,11 +45,11 @@ class LocalizedStringInputComponent extends TsxComponent<LocalizedStringInputArg
45
45
  @Prop() prependIcon: string;
46
46
  @Prop() appendClicked: () => void;
47
47
  @Prop() prependClicked: () => void;
48
- currentValue: LocalizedText = null;
48
+ currentValue: ILocalizedText = null;
49
49
  modalWillShow: boolean = false;
50
50
  uuid: string = "lsw-" + PortalUtils.randomString(10);
51
51
 
52
- raiseChangeEvent(newValue: LocalizedText): void {
52
+ raiseChangeEvent(newValue: ILocalizedText): void {
53
53
  this.populateValidationDeclaration();
54
54
 
55
55
  if (this.changed != null) {
@@ -60,10 +60,10 @@ class LocalizedStringInputComponent extends TsxComponent<LocalizedStringInputArg
60
60
  isAllSame(): boolean {
61
61
  if (this.value != null) {
62
62
  let langList = LanguageUtils.getLanguageList();
63
- let skValue = LocalizedStringHelper.getValue(this.value, Language.sk);
63
+ let skValue = LocalizedValueHelper.getValue(this.value, Language.sk);
64
64
 
65
65
  for (let i = 0, len = langList.length; i < len; i++) {
66
- if (LocalizedStringHelper.getValue(this.value, langList[i].id) != skValue) {
66
+ if (LocalizedValueHelper.getValue(this.value, langList[i].id) != skValue) {
67
67
  return false;
68
68
  }
69
69
  }
@@ -73,7 +73,7 @@ class LocalizedStringInputComponent extends TsxComponent<LocalizedStringInputArg
73
73
  }
74
74
 
75
75
  hasSomeValue(): boolean {
76
- return !isNullOrEmpty(LocalizedStringHelper.getValue(this.value, Language.sk));
76
+ return !isNullOrEmpty(LocalizedValueHelper.getValue(this.value, Language.sk));
77
77
  }
78
78
 
79
79
  getModalContext(): JQuery {
@@ -117,7 +117,7 @@ class LocalizedStringInputComponent extends TsxComponent<LocalizedStringInputArg
117
117
 
118
118
  if (currentVal == null || currentVal.length == 0) {
119
119
  var language: Language = $this.attr("data-inv-lang") as any;
120
- var lsValue = LocalizedStringHelper.getValue(value, language) || "";
120
+ var lsValue = LocalizedValueHelper.getValue(value, language) || "";
121
121
  $this.attr("placeholder", lsValue);
122
122
  }
123
123
  });
@@ -175,7 +175,7 @@ class LocalizedStringInputComponent extends TsxComponent<LocalizedStringInputArg
175
175
  return (
176
176
  <div class={PowerduckState.getFormControlCssClass() + " localized-input"} onClick={(e) => this.showInputModal()}>
177
177
  <img src={globalIcon} />
178
- &nbsp;{LocalizedStringHelper.getValue(this.value, Language.sk)}
178
+ &nbsp;{LocalizedValueHelper.getValue(this.value, Language.sk)}
179
179
  </div>
180
180
  );
181
181
  }
@@ -190,7 +190,7 @@ class LocalizedStringInputComponent extends TsxComponent<LocalizedStringInputArg
190
190
 
191
191
  let langValue = this.value[lang.id];
192
192
  let hasValue = !isNullOrEmpty(langValue);
193
- langValue = hasValue ? langValue : LocalizedStringHelper.getValue(this.value, lang.id);
193
+ langValue = hasValue ? langValue : LocalizedValueHelper.getValue(this.value, lang.id);
194
194
 
195
195
  return (
196
196
  <div class={"localized-input-item" + (hasValue ? "" : " lii-auto")}>
@@ -216,7 +216,7 @@ class LocalizedStringInputComponent extends TsxComponent<LocalizedStringInputArg
216
216
 
217
217
  let langValue = this.currentValue[lang.id];
218
218
  let hasValue = !isNullOrEmpty(langValue);
219
- langValue = hasValue ? langValue : LocalizedStringHelper.getValue(this.currentValue, lang.id);
219
+ langValue = hasValue ? langValue : LocalizedValueHelper.getValue(this.currentValue, lang.id);
220
220
 
221
221
  return (
222
222
  <div class="row align-items-end lsi-form-group">
@@ -8,11 +8,11 @@ import TextArea from "./textarea";
8
8
  import { LanguageUtils } from "../../common/utils/language-utils";
9
9
  import { Language } from "../../common/enums/language";
10
10
  import PowerduckState from "../../app/powerduck-state";
11
- import LocalizedText from "../../common/localized-text";
11
+ import {ILocalizedText} from "../../common/localized-text";
12
12
 
13
13
  interface LocalizedStringInputArgs extends FormItemWrapperArgs {
14
- value: LocalizedText;
15
- changed: (e: LocalizedText) => void;
14
+ value: ILocalizedText;
15
+ changed: (e: ILocalizedText) => void;
16
16
  supportedLanguages?: Language[];
17
17
  placeholder?: string;
18
18
  }
@@ -22,8 +22,8 @@ class LocalizedStringTextareaComponent extends TsxComponent<LocalizedStringInput
22
22
  @Prop() label!: string;
23
23
  @Prop() labelButtons!: DropdownButtonItemArgs[];
24
24
  @Prop() subtitle!: string;
25
- @Prop() value!: LocalizedText;
26
- @Prop() changed: (e: LocalizedText) => void;
25
+ @Prop() value!: ILocalizedText;
26
+ @Prop() changed: (e: ILocalizedText) => void;
27
27
  @Prop() supportedLanguages?: Language[];
28
28
  @Prop() marginType?: MarginType;
29
29
  @Prop() maxWidth?: number;
@@ -37,9 +37,9 @@ class LocalizedStringTextareaComponent extends TsxComponent<LocalizedStringInput
37
37
  @Prop() prependIcon: string;
38
38
  @Prop() appendClicked: () => void;
39
39
  @Prop() prependClicked: () => void;
40
- currentValue: LocalizedText = null;
40
+ currentValue: ILocalizedText = null;
41
41
 
42
- raiseChangeEvent (newValue: LocalizedText): void {
42
+ raiseChangeEvent (newValue: ILocalizedText): void {
43
43
  this.populateValidationDeclaration();
44
44
 
45
45
  if (this.changed != null) {
@@ -52,12 +52,12 @@ class LocalizedStringTextareaComponent extends TsxComponent<LocalizedStringInput
52
52
  }
53
53
 
54
54
  changeValue(lang: Language, newValue: string): void {
55
- let value = this.value || ({} as LocalizedText);
55
+ let value = this.value || ({} as ILocalizedText);
56
56
  value[lang] = newValue;
57
57
  this.raiseChangeEvent(value);
58
58
  }
59
59
 
60
- getActualValue (lang: Language, value: LocalizedText): string {
60
+ getActualValue (lang: Language, value: ILocalizedText): string {
61
61
  if (value == null) {
62
62
  return null;
63
63
  }
@@ -5,14 +5,14 @@ import Tabs, { TabsRenderMode } from "../tabs/tabs";
5
5
  import { TabPage } from "../tabs/tab-page";
6
6
  import { DropdownButtonItemArgs } from "../dropdown-button/dropdown-button-item";
7
7
  import WysiwigEditor from "./wysiwig";
8
- import LocalizedText from "../../common/localized-text";
8
+ import {ILocalizedText} from "../../common/localized-text";
9
9
  import { LanguageUtils } from "../../common/utils/language-utils";
10
10
  import { Language } from "../../common/enums/language";
11
11
  import PowerduckState from "../../app/powerduck-state";
12
12
 
13
13
  interface LocalizedStringInputArgs extends FormItemWrapperArgs {
14
- value: LocalizedText;
15
- changed: (e: LocalizedText) => void;
14
+ value: ILocalizedText;
15
+ changed: (e: ILocalizedText) => void;
16
16
  supportedLanguages?: Language[];
17
17
  placeholder?: string;
18
18
  resizable?: boolean
@@ -23,8 +23,8 @@ class LocalizedStringWysiwigComponent extends TsxComponent<LocalizedStringInputA
23
23
  @Prop() label!: string;
24
24
  @Prop() labelButtons!: DropdownButtonItemArgs[];
25
25
  @Prop() subtitle!: string;
26
- @Prop() value!: LocalizedText;
27
- @Prop() changed: (e: LocalizedText) => void;
26
+ @Prop() value!: ILocalizedText;
27
+ @Prop() changed: (e: ILocalizedText) => void;
28
28
  @Prop() supportedLanguages?: Language[];
29
29
  @Prop() marginType?: MarginType;
30
30
  @Prop() maxWidth?: number;
@@ -38,9 +38,9 @@ class LocalizedStringWysiwigComponent extends TsxComponent<LocalizedStringInputA
38
38
  @Prop() prependIcon: string;
39
39
  @Prop() appendClicked: () => void;
40
40
  @Prop() prependClicked: () => void;
41
- currentValue: LocalizedText = null;
41
+ currentValue: ILocalizedText = null;
42
42
 
43
- raiseChangeEvent(newValue: LocalizedText): void {
43
+ raiseChangeEvent(newValue: ILocalizedText): void {
44
44
  this.populateValidationDeclaration();
45
45
 
46
46
  if (this.changed != null) {
@@ -53,12 +53,12 @@ class LocalizedStringWysiwigComponent extends TsxComponent<LocalizedStringInputA
53
53
  }
54
54
 
55
55
  changeValue(lang: Language, newValue: string): void {
56
- let value = this.value || ({} as LocalizedText);
56
+ let value = this.value || ({} as ILocalizedText);
57
57
  value[lang] = newValue;
58
58
  this.raiseChangeEvent(value);
59
59
  }
60
60
 
61
- getActualValue(lang: Language, value: LocalizedText): string {
61
+ getActualValue(lang: Language, value: ILocalizedText): string {
62
62
  if (value == null) {
63
63
  return null;
64
64
  }
@@ -13,16 +13,16 @@ import FlexFormItem from "../form/form-item-flex";
13
13
  import { FileManagerDialog, FileManagerModalFileType } from "../modal/ts/file-manager-dialog";
14
14
  import { PortalUtils } from "../../common/utils/utils";
15
15
  import { LanguageUtils } from "../../common/utils/language-utils";
16
- import LocalizedStringHelper from "../../common/utils/localized-string";
17
16
  import { Language } from "../../common/enums/language";
18
17
  import { isNullOrEmpty } from "../../common/utils/is-null-or-empty";
19
18
  import globalIcon from './img/global.png';
20
19
  import PowerduckState from "../../app/powerduck-state";
21
- import LocalizedText from "../../common/localized-text";
20
+ import {ILocalizedText} from "../../common/localized-text";
21
+ import LocalizedValueHelper from "../../common/localized-value-helper";
22
22
 
23
23
  interface LocalizedUrlInputArgs extends FormItemWrapperArgs {
24
- value: LocalizedText;
25
- changed: (e: LocalizedText) => void;
24
+ value: ILocalizedText;
25
+ changed: (e: ILocalizedText) => void;
26
26
  supportedLanguages?: Language[];
27
27
  placeholder?: string;
28
28
  }
@@ -32,8 +32,8 @@ class LocalizedUrlInputComponent extends TsxComponent<LocalizedUrlInputArgs> imp
32
32
  @Prop() label!: string;
33
33
  @Prop() labelButtons!: DropdownButtonItemArgs[];
34
34
  @Prop() subtitle!: string;
35
- @Prop() value!: LocalizedText;
36
- @Prop() changed: (e: LocalizedText) => void;
35
+ @Prop() value!: ILocalizedText;
36
+ @Prop() changed: (e: ILocalizedText) => void;
37
37
  @Prop() supportedLanguages?: Language[];
38
38
  @Prop() marginType?: MarginType;
39
39
  @Prop() maxWidth?: number;
@@ -47,12 +47,12 @@ class LocalizedUrlInputComponent extends TsxComponent<LocalizedUrlInputArgs> imp
47
47
  @Prop() prependIcon: string;
48
48
  @Prop() appendClicked: () => void;
49
49
  @Prop() prependClicked: () => void;
50
- currentValue: LocalizedText = null;
50
+ currentValue: ILocalizedText = null;
51
51
  modalWillShow: boolean = false;
52
52
  isModal: boolean = false;
53
53
  uuid: string = "lsw-" + PortalUtils.randomString(10);
54
54
 
55
- raiseChangeEvent (newValue: LocalizedText): void {
55
+ raiseChangeEvent (newValue: ILocalizedText): void {
56
56
  this.populateValidationDeclaration();
57
57
 
58
58
  if (this.changed != null) {
@@ -63,10 +63,10 @@ class LocalizedUrlInputComponent extends TsxComponent<LocalizedUrlInputArgs> imp
63
63
  isAllSame(): boolean {
64
64
  if (this.value != null) {
65
65
  let langList = LanguageUtils.getLanguageList();
66
- let skValue = LocalizedStringHelper.getValue(this.value, Language.sk);
66
+ let skValue = LocalizedValueHelper.getValue(this.value, Language.sk);
67
67
 
68
68
  for (let i = 0, len = langList.length; i < len; i++) {
69
- if (LocalizedStringHelper.getValue(this.value, langList[i].id) != skValue) {
69
+ if (LocalizedValueHelper.getValue(this.value, langList[i].id) != skValue) {
70
70
  return false;
71
71
  }
72
72
  }
@@ -76,7 +76,7 @@ class LocalizedUrlInputComponent extends TsxComponent<LocalizedUrlInputArgs> imp
76
76
  }
77
77
 
78
78
  hasSomeValue(): boolean {
79
- return !isNullOrEmpty(LocalizedStringHelper.getValue(this.value, Language.sk));
79
+ return !isNullOrEmpty(LocalizedValueHelper.getValue(this.value, Language.sk));
80
80
  }
81
81
 
82
82
  getModalContext(): JQuery {
@@ -133,7 +133,7 @@ class LocalizedUrlInputComponent extends TsxComponent<LocalizedUrlInputArgs> imp
133
133
 
134
134
  if (currentVal == null || currentVal.length == 0) {
135
135
  var language: Language = $this.attr("data-inv-lang") as any;
136
- var lsValue = LocalizedStringHelper.getValue(value, language) || "";
136
+ var lsValue = LocalizedValueHelper.getValue(value, language) || "";
137
137
  $this.attr("placeholder", lsValue);
138
138
  }
139
139
  });
@@ -207,7 +207,7 @@ class LocalizedUrlInputComponent extends TsxComponent<LocalizedUrlInputArgs> imp
207
207
  }
208
208
 
209
209
  renderInputGlobalValue(h) {
210
- let langValue = LocalizedStringHelper.getValue(this.value, Language.sk);
210
+ let langValue = LocalizedValueHelper.getValue(this.value, Language.sk);
211
211
  return (
212
212
  <FlexContainer cssClass={"mb-1"} fullWidthOnMobile={false}>
213
213
  <FlexFormItem flexFill={true}>
@@ -255,7 +255,7 @@ class LocalizedUrlInputComponent extends TsxComponent<LocalizedUrlInputArgs> imp
255
255
 
256
256
  let langValue = this.value[lang.id];
257
257
  let hasValue = !isNullOrEmpty(langValue);
258
- langValue = hasValue ? langValue : LocalizedStringHelper.getValue(this.value, lang.id);
258
+ langValue = hasValue ? langValue : LocalizedValueHelper.getValue(this.value, lang.id);
259
259
 
260
260
  return (
261
261
  <div class={"localized-input-item" + (hasValue ? "" : " lii-auto")}>
@@ -281,7 +281,7 @@ class LocalizedUrlInputComponent extends TsxComponent<LocalizedUrlInputArgs> imp
281
281
 
282
282
  let langValue = this.currentValue[lang.id];
283
283
  let hasValue = !isNullOrEmpty(langValue);
284
- langValue = hasValue ? langValue : LocalizedStringHelper.getValue(this.currentValue, lang.id);
284
+ langValue = hasValue ? langValue : LocalizedValueHelper.getValue(this.currentValue, lang.id);
285
285
 
286
286
  return (
287
287
  <FlexContainer cssClass={"mb-1"} fullWidthOnMobile={false}>
@@ -36,5 +36,5 @@ class LoadingIndicatorComponent extends TsxComponent<LoadingIndicatorArgs> imple
36
36
  }
37
37
  }
38
38
 
39
- const LoadingIndicator = toNative(LoadingIndicatorComponent)
39
+ const LoadingIndicator = toNative(LoadingIndicatorComponent)
40
40
  export default LoadingIndicator
@@ -25,5 +25,5 @@ class ModalAnimationErrorComponent extends TsxComponent<ModalAnimationErrorArgs>
25
25
  }
26
26
  }
27
27
 
28
- const ModalAnimationError = toNative(ModalAnimationErrorComponent)
28
+ const ModalAnimationError = toNative(ModalAnimationErrorComponent)
29
29
  export default ModalAnimationError
@@ -27,5 +27,5 @@ class ModalAnimationSuccessComponent extends TsxComponent<ModalAnimationSuccessA
27
27
  }
28
28
  }
29
29
 
30
- const ModalAnimationSuccess = toNative(ModalAnimationSuccessComponent)
30
+ const ModalAnimationSuccess = toNative(ModalAnimationSuccessComponent)
31
31
  export default ModalAnimationSuccess
@@ -22,5 +22,5 @@ class ModalIconQuestionComponent extends TsxComponent<ModalIconQuestionArgs> imp
22
22
  }
23
23
  }
24
24
 
25
- const ModalIconQuestion = toNative(ModalIconQuestionComponent)
25
+ const ModalIconQuestion = toNative(ModalIconQuestionComponent)
26
26
  export default ModalIconQuestion
@@ -22,5 +22,5 @@ class ModalIconWarningComponent extends TsxComponent<ModalIconWarningArgs> imple
22
22
  }
23
23
  }
24
24
 
25
- const ModalIconWarning = toNative(ModalIconWarningComponent)
25
+ const ModalIconWarning = toNative(ModalIconWarningComponent)
26
26
  export default ModalIconWarning
@@ -13,5 +13,5 @@ class ModalBodyComponent extends TsxComponent<ModalBodyArgs> implements ModalBod
13
13
  }
14
14
  }
15
15
 
16
- const ModalBody = toNative(ModalBodyComponent)
16
+ const ModalBody = toNative(ModalBodyComponent)
17
17
  export default ModalBody
@@ -9,5 +9,5 @@ class ModalFooterComponent extends TsxComponent<ModalFooterArgs> implements Moda
9
9
  }
10
10
  }
11
11
 
12
- const ModalFooter = toNative(ModalFooterComponent)
12
+ const ModalFooter = toNative(ModalFooterComponent)
13
13
  export default ModalFooter
@@ -61,5 +61,5 @@ class ModalSectionWrapperComponent extends TsxComponent<ModalSectionWrapperArgs>
61
61
  }
62
62
  }
63
63
 
64
- const ModalSectionWrapper = toNative(ModalSectionWrapperComponent)
64
+ const ModalSectionWrapper = toNative(ModalSectionWrapperComponent)
65
65
  export default ModalSectionWrapper
@@ -15,5 +15,5 @@ class ModalSubtitleComponent extends TsxComponent<TabPageArgs> implements TabPag
15
15
  }
16
16
  }
17
17
 
18
- const ModalSubtitle = toNative(ModalSubtitleComponent)
18
+ const ModalSubtitle = toNative(ModalSubtitleComponent)
19
19
  export default ModalSubtitle
@@ -121,5 +121,5 @@ class ProgressBarComponent extends TsxComponent<ProgressBarArgs> implements Prog
121
121
  }
122
122
  }
123
123
 
124
- const ProgressBar = toNative(ProgressBarComponent)
124
+ const ProgressBar = toNative(ProgressBarComponent)
125
125
  export default ProgressBar
@@ -28,5 +28,5 @@ class RatingDisplayerComponent extends TsxComponent<RatingDisplayerArgs> impleme
28
28
  }
29
29
  }
30
30
 
31
- const RatingDisplayer = toNative(RatingDisplayerComponent)
31
+ const RatingDisplayer = toNative(RatingDisplayerComponent)
32
32
  export default RatingDisplayer
@@ -80,5 +80,5 @@ class RatingPickerComponent extends TsxComponent<RatingPickerArgs> implements Ra
80
80
  }
81
81
  }
82
82
 
83
- const RatingPicker = toNative(RatingPickerComponent)
83
+ const RatingPicker = toNative(RatingPickerComponent)
84
84
  export default RatingPicker
@@ -265,5 +265,5 @@ class ShareModalComponent extends TsxComponent<ShareComponentBindingArgs> implem
265
265
  }
266
266
  }
267
267
 
268
- const ShareModal = toNative(ShareModalComponent)
268
+ const ShareModal = toNative(ShareModalComponent)
269
269
  export default ShareModal
@@ -237,5 +237,5 @@ class ShareComponentComponent extends TsxComponent<ShareComponentArgs> implement
237
237
  }
238
238
  }
239
239
 
240
- const ShareComponent = toNative(ShareComponentComponent)
240
+ const ShareComponent = toNative(ShareComponentComponent)
241
241
  export default ShareComponent
@@ -59,5 +59,5 @@ class SortableContainerComponent extends TsxComponent<SortableContainerArgs> imp
59
59
  }
60
60
  }
61
61
 
62
- const SortableContainer = toNative(SortableContainerComponent)
62
+ const SortableContainer = toNative(SortableContainerComponent)
63
63
  export default SortableContainer
@@ -15,5 +15,5 @@ class SortableItemComponent extends TsxComponent<SortableItemArgs> implements So
15
15
  }
16
16
  }
17
17
 
18
- const SortableItem = toNative(SortableItemComponent)
18
+ const SortableItem = toNative(SortableItemComponent)
19
19
  export default SortableItem
@@ -132,5 +132,5 @@ class SpreadsheetComponent extends TsxComponent<SpreadsheetArgs> implements Spre
132
132
  }
133
133
  }
134
134
 
135
- const Spreadsheet = toNative(SpreadsheetComponent)
135
+ const Spreadsheet = toNative(SpreadsheetComponent)
136
136
  export default Spreadsheet
@@ -15,5 +15,5 @@ class SummaryStatsComponent extends TsxComponent<SummaryStatsArgs> implements Su
15
15
  }
16
16
  }
17
17
 
18
- const SummaryStats = toNative(SummaryStatsComponent)
18
+ const SummaryStats = toNative(SummaryStatsComponent)
19
19
  export default SummaryStats
@@ -86,5 +86,5 @@ class SwiperGalleryComponent extends TsxComponent<SwiperGalleryArgs> implements
86
86
  }
87
87
  }
88
88
 
89
- const SwiperGallery = toNative(SwiperGalleryComponent)
89
+ const SwiperGallery = toNative(SwiperGalleryComponent)
90
90
  export default SwiperGallery
@@ -9,5 +9,5 @@ class SwiperSlideComponent extends TsxComponent<SwiperSlideArgs> implements Swip
9
9
  }
10
10
  }
11
11
 
12
- const SwiperSlide = toNative(SwiperSlideComponent)
12
+ const SwiperSlide = toNative(SwiperSlideComponent)
13
13
  export default SwiperSlide
@@ -131,5 +131,5 @@ class SwiperComponent extends TsxComponent<SwiperArgs> implements SwiperArgs {
131
131
  }
132
132
  }
133
133
 
134
- const Swiper = toNative(SwiperComponent)
134
+ const Swiper = toNative(SwiperComponent)
135
135
  export default Swiper
@@ -23,5 +23,5 @@ class TableWrapperComponent extends TsxComponent<TableWrapperArgs> implements Ta
23
23
  }
24
24
  }
25
25
 
26
- const TableWrapper = toNative(TableWrapperComponent)
26
+ const TableWrapper = toNative(TableWrapperComponent)
27
27
  export default TableWrapper
@@ -77,5 +77,5 @@ class TileboxComponent extends TsxComponent<TileboxArgs> implements TileboxArgs
77
77
  }
78
78
  }
79
79
 
80
- const Tilebox = toNative(TileboxComponent)
80
+ const Tilebox = toNative(TileboxComponent)
81
81
  export default Tilebox
@@ -96,5 +96,5 @@ class TooltipContainerComponent extends TsxComponent<TooltipContainerArgs> imple
96
96
  }
97
97
  }
98
98
 
99
- const TooltipContainer = toNative(TooltipContainerComponent)
99
+ const TooltipContainer = toNative(TooltipContainerComponent)
100
100
  export default TooltipContainer
@@ -14,5 +14,5 @@ class TransitionHolderComponent extends TsxComponent<TransitionArgs> implements
14
14
  }
15
15
  }
16
16
 
17
- const TransitionHolder = toNative(TransitionHolderComponent)
17
+ const TransitionHolder = toNative(TransitionHolderComponent)
18
18
  export default TransitionHolder
@@ -9,5 +9,5 @@ class WizardSubtitleComponent extends TsxComponent<WizardSubtitleArgs> implement
9
9
  }
10
10
  }
11
11
 
12
- const WizardSubtitle = toNative(WizardSubtitleComponent)
12
+ const WizardSubtitle = toNative(WizardSubtitleComponent)
13
13
  export default WizardSubtitle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inviton-powerduck",
3
- "version": "0.0.85",
3
+ "version": "0.0.87",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": " vite build && vue-tsc --declaration --emitDeclarationOnly",
@@ -1,83 +0,0 @@
1
- import { Language } from "../enums/language";
2
- import LocalizedText from "../localized-text";
3
- import { isNullOrEmpty } from "./is-null-or-empty";
4
- import { LanguageUtils } from "./language-utils";
5
-
6
- export interface ILocalizedString {
7
- Slovak: string;
8
- English: string;
9
- Czech: string;
10
- German: string;
11
- Latvian: string;
12
- Polish: string;
13
- Italian: string;
14
- Hungarian: string;
15
- }
16
-
17
- function getValueForPair(localizedString: any, langCode: string, lang: Language): string {
18
- return localizedString[langCode] || localizedString[lang];
19
- }
20
-
21
- export default class LocalizedStringHelper {
22
- static getValue(value: ILocalizedString | LocalizedText, lang: Language | string) {
23
- if (value == null) {
24
- return null;
25
- }
26
-
27
- if (lang == Language.sk) {
28
- const skVal = getValueForPair(value, 'sk', Language.sk);
29
- if (!isNullOrEmpty(skVal)) {
30
- return skVal;
31
- }
32
-
33
- const csVal = getValueForPair(value, 'cs', Language.cs);
34
- if (!isNullOrEmpty(csVal)) {
35
- return csVal;
36
- }
37
- } else if (lang == Language.cs) {
38
- const csVal = getValueForPair(value, 'cs', Language.cs);
39
- if (!isNullOrEmpty(csVal)) {
40
- return csVal;
41
- }
42
-
43
- const skVal = getValueForPair(value, 'sk', Language.sk);
44
- if (!isNullOrEmpty(skVal)) {
45
- return skVal;
46
- }
47
- } else if (lang == Language.de) {
48
- const val = getValueForPair(value, 'de', Language.de);
49
- if (!isNullOrEmpty(val)) {
50
- return val;
51
- }
52
- } else if (lang == Language.pl) {
53
- const val = getValueForPair(value, 'pl', Language.pl);
54
- if (!isNullOrEmpty(val)) {
55
- return val;
56
- }
57
- } else if (lang == Language.it) {
58
- const val = getValueForPair(value, 'it', Language.it);
59
- if (!isNullOrEmpty(val)) {
60
- return val;
61
- }
62
- } else if (lang == Language.hu) {
63
- const val = getValueForPair(value, 'hu', Language.hu);
64
- if (!isNullOrEmpty(val)) {
65
- return val;
66
- }
67
- }
68
-
69
- const lastTry = getValueForPair(value, 'sk', Language.sk);
70
- if (!isNullOrEmpty(lastTry)) {
71
- return lastTry;
72
- }
73
-
74
- for (const propName in value) {
75
- const text = (value as any)[propName];
76
- if (text != null && text.toString().length > 0) {
77
- return text;
78
- }
79
- }
80
-
81
- return null;
82
- }
83
- }
@@ -1,36 +0,0 @@
1
- import LocalizedText from './../localized-text';
2
- import { Language } from './../enums/language';
3
-
4
- export default class LocalizedTextUtil {
5
- static getLocalizedTextValue(value: LocalizedText, langKey: string | Language): string {
6
- if (value == null) {
7
- return null as any;
8
- }
9
-
10
- let retVal = (value as any)[langKey];
11
- if (retVal == null) {
12
- if (langKey == "sk") {
13
- retVal = value.cs;
14
- } else if (langKey == "cs") {
15
- retVal = value.sk;
16
- } else {
17
- retVal = value.en;
18
- }
19
- }
20
-
21
- if (retVal == null) {
22
- if (value.sk != null) {
23
- return value.sk;
24
- }
25
-
26
- for (const propName in value) {
27
- const text = (value as any)[propName];
28
- if (text != null && text.toString().length > 0) {
29
- return text;
30
- }
31
- }
32
- }
33
-
34
- return retVal || value.sk;
35
- }
36
- }