@pushwoosh/smart-components-kit 1.0.89 → 1.1.0

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 (114) hide show
  1. package/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.d.ts +1 -2
  2. package/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.js +105 -56
  3. package/CampaignsConfigurationDrawer/components/Card/Card.d.ts +1 -2
  4. package/CampaignsConfigurationDrawer/components/Card/Card.js +19 -13
  5. package/CampaignsConfigurationDrawer/polyglot/index.d.ts +2 -0
  6. package/CampaignsConfigurationDrawer/polyglot/index.js +10 -0
  7. package/CampaignsConfigurationDrawer/polyglot/messages_en.d.ts +3 -0
  8. package/CampaignsConfigurationDrawer/polyglot/messages_en.js +18 -0
  9. package/CampaignsConfigurationDrawer/polyglot/messages_ru.d.ts +3 -0
  10. package/CampaignsConfigurationDrawer/polyglot/messages_ru.js +18 -0
  11. package/CampaignsConfigurationDrawer/polyglot/types.d.ts +19 -0
  12. package/CampaignsConfigurationDrawer/polyglot/types.js +1 -0
  13. package/DocsButton/DocsButton.d.ts +1 -2
  14. package/DocsButton/DocsButton.js +21 -18
  15. package/DynamicContentPicker/DynamicContentPicker.js +76 -63
  16. package/DynamicContentPicker/Line.js +24 -22
  17. package/DynamicContentPickerForm/DynamicContentCustomPickerForm.js +20 -15
  18. package/DynamicContentPickerForm/DynamicContentEventPickerForm.js +62 -51
  19. package/DynamicContentPickerForm/DynamicContentTagPickerForm.js +62 -51
  20. package/DynamicContentPickerForm/SimpleDynamicContentPickerFormSmart.js +74 -59
  21. package/DynamicContentPickerForm/VariedDynamicContentPickerFormSmart.js +104 -78
  22. package/DynamicContentPickerForm/polyglot/index.d.ts +2 -0
  23. package/DynamicContentPickerForm/polyglot/index.js +10 -0
  24. package/DynamicContentPickerForm/polyglot/messages_en.d.ts +3 -0
  25. package/DynamicContentPickerForm/polyglot/messages_en.js +16 -0
  26. package/DynamicContentPickerForm/polyglot/messages_ru.d.ts +3 -0
  27. package/DynamicContentPickerForm/polyglot/messages_ru.js +16 -0
  28. package/DynamicContentPickerForm/polyglot/types.d.ts +17 -0
  29. package/DynamicContentPickerForm/polyglot/types.js +1 -0
  30. package/EmailTemplatePreview/EmailTemplatePreview.js +10 -4
  31. package/EmailTemplatePreview/polyglot/index.d.ts +5 -0
  32. package/EmailTemplatePreview/polyglot/index.js +10 -0
  33. package/EmailTemplatePreview/polyglot/messages_en.d.ts +3 -0
  34. package/EmailTemplatePreview/polyglot/messages_en.js +3 -0
  35. package/EmailTemplatePreview/polyglot/messages_ru.d.ts +3 -0
  36. package/EmailTemplatePreview/polyglot/messages_ru.js +3 -0
  37. package/EmailTemplatePreview/polyglot/types.d.ts +4 -0
  38. package/EmailTemplatePreview/polyglot/types.js +1 -0
  39. package/ExportCSV/ExportCsvBanner/ExportCsvBanner.d.ts +1 -2
  40. package/ExportCSV/ExportCsvBanner/ExportCsvBanner.js +63 -42
  41. package/ExportCSV/polyglot/index.d.ts +2 -0
  42. package/ExportCSV/polyglot/index.js +10 -0
  43. package/ExportCSV/polyglot/messages_en.d.ts +3 -0
  44. package/ExportCSV/polyglot/messages_en.js +9 -0
  45. package/ExportCSV/polyglot/messages_ru.d.ts +3 -0
  46. package/ExportCSV/polyglot/messages_ru.js +9 -0
  47. package/ExportCSV/polyglot/types.d.ts +10 -0
  48. package/ExportCSV/polyglot/types.js +1 -0
  49. package/ExportCSV/useExportService/useExportService.js +1 -0
  50. package/LanguagesSelector/LanguagesModal.js +38 -24
  51. package/LanguagesSelector/LanguagesSelectForm.js +73 -62
  52. package/LanguagesSelector/LanguagesSelectFormLoader.js +8 -7
  53. package/LanguagesSelector/LanguagesSelector.js +92 -78
  54. package/MediaStore/CreateVariantDrawer.js +134 -85
  55. package/MediaStore/MediaStore.js +137 -112
  56. package/ModalCloningJourney/ModalCloningJourney.d.ts +1 -2
  57. package/ModalCloningJourney/ModalCloningJourney.js +113 -91
  58. package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.d.ts +1 -2
  59. package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.js +101 -37
  60. package/OpenActions/components/OpenActionsSummaryByPreset.d.ts +1 -2
  61. package/OpenActions/components/OpenActionsSummaryByPreset.js +2 -2
  62. package/OpenActions/polyglot/index.d.ts +2 -0
  63. package/OpenActions/polyglot/index.js +10 -0
  64. package/OpenActions/polyglot/messages_en.d.ts +3 -0
  65. package/OpenActions/polyglot/messages_en.js +14 -0
  66. package/OpenActions/polyglot/messages_ru.d.ts +3 -0
  67. package/OpenActions/polyglot/messages_ru.js +14 -0
  68. package/OpenActions/polyglot/types.d.ts +18 -0
  69. package/OpenActions/polyglot/types.js +1 -0
  70. package/PlatformsConfigurationDrawer/PlatformsConfigurationDrawer.js +21 -17
  71. package/PlatformsConfigurationDrawer/components/DesktopPage/DesktopPage.js +114 -57
  72. package/PlatformsConfigurationDrawer/components/MainPage/MainPage.js +157 -75
  73. package/PlatformsConfigurationDrawer/components/MobilePage/MobilePage.js +140 -69
  74. package/PlatformsConfigurationDrawer/polyglot/index.d.ts +2 -0
  75. package/PlatformsConfigurationDrawer/polyglot/index.js +10 -0
  76. package/PlatformsConfigurationDrawer/polyglot/messages_en.d.ts +3 -0
  77. package/PlatformsConfigurationDrawer/polyglot/messages_en.js +24 -0
  78. package/PlatformsConfigurationDrawer/polyglot/messages_ru.d.ts +3 -0
  79. package/PlatformsConfigurationDrawer/polyglot/messages_ru.js +24 -0
  80. package/PlatformsConfigurationDrawer/polyglot/types.d.ts +25 -0
  81. package/PlatformsConfigurationDrawer/polyglot/types.js +1 -0
  82. package/ResendModal/ResendModal.d.ts +1 -2
  83. package/ResendModal/ResendModal.js +95 -59
  84. package/ResendModal/polyglot/index.d.ts +2 -0
  85. package/ResendModal/polyglot/index.js +10 -0
  86. package/ResendModal/polyglot/messages_en.d.ts +3 -0
  87. package/ResendModal/polyglot/messages_en.js +9 -0
  88. package/ResendModal/polyglot/messages_ru.d.ts +3 -0
  89. package/ResendModal/polyglot/messages_ru.js +9 -0
  90. package/ResendModal/polyglot/types.d.ts +10 -0
  91. package/ResendModal/polyglot/types.js +1 -0
  92. package/RichMessageEditorSmart/NewDynamicContentForm.js +16 -12
  93. package/RichMessageEditorSmart/RichMessageEditorSmart.js +4 -4
  94. package/SystemParcel/SystemParcel.d.ts +3 -3
  95. package/SystemParcel/SystemParcel.js +3 -2
  96. package/Table/components/DataTable/DataTable.js +80 -61
  97. package/Table/components/DataTableGetContext/DataTableGetContext.d.ts +1 -2
  98. package/Table/components/DataTableGetContext/DataTableGetContext.js +5 -2
  99. package/Table/components/DataTableList/DataTableList.d.ts +1 -2
  100. package/Table/components/DataTableList/DataTableList.js +86 -68
  101. package/Table/components/DataTablePagination/DataTablePagination.js +6 -4
  102. package/Table/components/DataTableSearchInput/DataTableSearchInput.js +3 -2
  103. package/Table/components/DataTableSortableCell/DataTableSortableCell.js +6 -4
  104. package/Table/components/Loading/Loading.d.ts +1 -2
  105. package/Table/components/Loading/Loading.js +16 -14
  106. package/Table/components/TablePagination/TablePagination.js +31 -25
  107. package/_devel/index.js +36 -24
  108. package/_devel/lib/dynamic-content-picker.d.ts +1 -2
  109. package/_devel/lib/dynamic-content-picker.js +16 -10
  110. package/_devel/lib/index.d.ts +2 -2
  111. package/_devel/lib/index.js +38 -19
  112. package/_devel/test-place.d.ts +1 -2
  113. package/_devel/test-place.js +4 -2
  114. package/package.json +2 -2
@@ -1,4 +1,5 @@
1
- import React, { useMemo, useState } from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo, useState } from 'react';
2
3
  import { Button, Modal, DropdownMenu, DropdownMenuItem, DropdownMenuSection } from '@pushwoosh/dumb-components';
3
4
  import { Horizontal } from '@pushwoosh/kit-helpers';
4
5
  import { ArrowIcon, ChevronIcon, LanguageIcon, PlusIcon } from '@pushwoosh/kit-icons';
@@ -23,84 +24,97 @@ export const LanguagesSelector = ({
23
24
  }));
24
25
  return ['default', ...sorted];
25
26
  }, [getLangName, languages]);
26
- return React.createElement(Horizontal, {
27
- "$gap": 8
28
- }, React.createElement(DropdownMenu, {
29
- isScrollable: true,
30
- renderHandler: handlerProps => React.createElement(Button, {
31
- style: {
32
- minWidth: 200
33
- },
34
- color: "secondary",
35
- icon: React.createElement(LanguageIcon, {
36
- size: "medium",
37
- view: "lined"
27
+ return _jsxs(Horizontal, {
28
+ "$gap": 8,
29
+ children: [_jsx(DropdownMenu, {
30
+ isScrollable: true,
31
+ renderHandler: handlerProps => _jsx(Button, {
32
+ style: {
33
+ minWidth: 200
34
+ },
35
+ color: "secondary",
36
+ icon: _jsx(LanguageIcon, {
37
+ size: "medium",
38
+ view: "lined"
39
+ }),
40
+ rightIcon: _jsx(ChevronIcon, {
41
+ size: "medium",
42
+ direction: "down"
43
+ }),
44
+ onClick: handlerProps.onClick,
45
+ boxRef: handlerProps.ref,
46
+ isOpen: handlerProps.isOpen,
47
+ isDisabled: isDisabled,
48
+ children: getLangName(value)
38
49
  }),
39
- rightIcon: React.createElement(ChevronIcon, {
40
- size: "medium",
41
- direction: "down"
50
+ children: () => _jsxs(_Fragment, {
51
+ children: [_jsx(DropdownMenuSection, {
52
+ children: _jsx(DropdownMenuItem, {
53
+ onClick: () => setShowLanguagesModal(true),
54
+ children: lang({
55
+ message: 'SMART.LANGUAGES_SELECTOR.CHOOSE_LANGUAGES'
56
+ })
57
+ })
58
+ }), _jsx(DropdownMenuSection, {
59
+ children: sortedLanguages.map(code => _jsx(DropdownMenuItem, {
60
+ isActive: code === value,
61
+ onClick: () => onChange(code),
62
+ children: getLangName(code)
63
+ }, code))
64
+ })]
65
+ })
66
+ }), sortedLanguages.length > 1 && _jsxs(ButtonGroup, {
67
+ children: [_jsx(Button, {
68
+ color: "secondary",
69
+ isDisabled: isDisabled,
70
+ icon: _jsx(ArrowIcon, {
71
+ size: "medium",
72
+ direction: "left"
73
+ }),
74
+ onClick: () => {
75
+ const index = sortedLanguages.indexOf(value);
76
+ if (index > 0) {
77
+ onChange(sortedLanguages[index - 1]);
78
+ } else {
79
+ onChange(sortedLanguages[sortedLanguages.length - 1]);
80
+ }
81
+ }
82
+ }), _jsx(Button, {
83
+ color: "secondary",
84
+ isDisabled: isDisabled,
85
+ icon: _jsx(ArrowIcon, {
86
+ size: "medium",
87
+ direction: "right"
88
+ }),
89
+ onClick: () => {
90
+ const index = sortedLanguages.indexOf(value);
91
+ if (index < sortedLanguages.length - 1) {
92
+ onChange(sortedLanguages[index + 1]);
93
+ } else {
94
+ onChange(sortedLanguages[0]);
95
+ }
96
+ }
97
+ })]
98
+ }), sortedLanguages.length <= 1 && _jsx(Button, {
99
+ color: "secondary",
100
+ icon: _jsx(PlusIcon, {
101
+ size: "medium"
42
102
  }),
43
- onClick: handlerProps.onClick,
44
- boxRef: handlerProps.ref,
45
- isOpen: handlerProps.isOpen,
46
- isDisabled: isDisabled
47
- }, getLangName(value))
48
- }, () => React.createElement(React.Fragment, null, React.createElement(DropdownMenuSection, null, React.createElement(DropdownMenuItem, {
49
- onClick: () => setShowLanguagesModal(true)
50
- }, lang({
51
- message: 'SMART.LANGUAGES_SELECTOR.CHOOSE_LANGUAGES'
52
- }))), React.createElement(DropdownMenuSection, null, sortedLanguages.map(code => React.createElement(DropdownMenuItem, {
53
- key: code,
54
- isActive: code === value,
55
- onClick: () => onChange(code)
56
- }, getLangName(code)))))), sortedLanguages.length > 1 && React.createElement(ButtonGroup, null, React.createElement(Button, {
57
- color: "secondary",
58
- isDisabled: isDisabled,
59
- icon: React.createElement(ArrowIcon, {
60
- size: "medium",
61
- direction: "left"
62
- }),
63
- onClick: () => {
64
- const index = sortedLanguages.indexOf(value);
65
- if (index > 0) {
66
- onChange(sortedLanguages[index - 1]);
67
- } else {
68
- onChange(sortedLanguages[sortedLanguages.length - 1]);
69
- }
70
- }
71
- }), React.createElement(Button, {
72
- color: "secondary",
73
- isDisabled: isDisabled,
74
- icon: React.createElement(ArrowIcon, {
103
+ onClick: () => setShowLanguagesModal(true)
104
+ }), _jsx(Modal, {
75
105
  size: "medium",
76
- direction: "right"
77
- }),
78
- onClick: () => {
79
- const index = sortedLanguages.indexOf(value);
80
- if (index < sortedLanguages.length - 1) {
81
- onChange(sortedLanguages[index + 1]);
82
- } else {
83
- onChange(sortedLanguages[0]);
84
- }
85
- }
86
- })), sortedLanguages.length <= 1 && React.createElement(Button, {
87
- color: "secondary",
88
- icon: React.createElement(PlusIcon, {
89
- size: "medium"
90
- }),
91
- onClick: () => setShowLanguagesModal(true)
92
- }), React.createElement(Modal, {
93
- size: "medium",
94
- isOpen: showLanguagesModal
95
- }, React.createElement(LanguagesModal, {
96
- applicationCode: applicationCode,
97
- initialLanguages: languages,
98
- onSubmit: langs => {
99
- onChangeLanguages(langs);
100
- setShowLanguagesModal(false);
101
- },
102
- onClose: () => {
103
- setShowLanguagesModal(false);
104
- }
105
- })));
106
+ isOpen: showLanguagesModal,
107
+ children: _jsx(LanguagesModal, {
108
+ applicationCode: applicationCode,
109
+ initialLanguages: languages,
110
+ onSubmit: langs => {
111
+ onChangeLanguages(langs);
112
+ setShowLanguagesModal(false);
113
+ },
114
+ onClose: () => {
115
+ setShowLanguagesModal(false);
116
+ }
117
+ })
118
+ })]
119
+ });
106
120
  };
@@ -1,4 +1,5 @@
1
- import React, { useEffect, useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
2
3
  import { Button, Drawer, DrawerBody, DrawerHeader, DrawerTitle, NativeInput, useToast } from '@pushwoosh/dumb-components';
3
4
  import { Columns, Vertical } from '@pushwoosh/kit-helpers';
4
5
  import { CloseIcon } from '@pushwoosh/kit-icons';
@@ -127,90 +128,138 @@ export const CreateVariantDrawer = ({
127
128
  setIsCreating(false);
128
129
  }
129
130
  };
130
- return React.createElement(Drawer, {
131
+ return _jsxs(Drawer, {
131
132
  size: "medium",
132
133
  isOpen: isOpen,
133
- onClose: onClose
134
- }, React.createElement(DrawerHeader, null, React.createElement(DrawerTitle, null, React.createElement("span", null, lang({
135
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.TITLE'
136
- })), React.createElement(Button, {
137
- view: "ghost",
138
- color: "secondary",
139
- size: "compact",
140
- icon: React.createElement(CloseIcon, {
141
- size: "small"
142
- }),
143
- "aria-label": lang({
144
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.CLOSE'
145
- }),
146
- onClick: onClose
147
- }))), React.createElement(DrawerBody, null, original && React.createElement(Vertical, {
148
- "$gap": 20
149
- }, React.createElement("div", null, React.createElement(FieldLabel, null, lang({
150
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.RATIO_LABEL'
151
- })), React.createElement(Chips, null, RATIOS.map(item => React.createElement(Chip, {
152
- key: item.value,
153
- type: "button",
154
- "$active": item.value === ratio,
155
- onClick: () => setRatio(item.value)
156
- }, item.label)))), React.createElement("div", null, React.createElement(FieldLabel, null, lang({
157
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.SIZE_LABEL'
158
- })), React.createElement(Columns, {
159
- "$sizes": "auto 1fr",
160
- "$gap": 8,
161
- "$alignItems": "center"
162
- }, React.createElement(Segment, null, React.createElement(SegmentItem, {
163
- type: "button",
164
- "$active": dimension === 'width',
165
- onClick: () => setDimension('width')
166
- }, lang({
167
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.WIDTH'
168
- })), React.createElement(SegmentItem, {
169
- type: "button",
170
- "$active": dimension === 'height',
171
- onClick: () => setDimension('height')
172
- }, lang({
173
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.HEIGHT'
174
- }))), React.createElement(NativeInput, {
175
- type: "number",
176
- min: 1,
177
- value: size,
178
- "$isErrored": !isSizeValid,
179
- onChange: event => setSize(event.target.value)
180
- }))), React.createElement(Vertical, {
181
- "$gap": 6
182
- }, React.createElement(PreviewStage, null, React.createElement(PreviewFrame, {
183
- "$ratio": selectedRatio.ar
184
- }, React.createElement(PreviewImage, {
185
- src: original.url,
186
- alt: original.filename
187
- }))), isSizeValid && React.createElement(Text, null, selectedRatio.label, ' · ', outputWidth, ' × ', outputHeight)), isJpeg && React.createElement("div", null, React.createElement(FieldLabel, null, lang({
188
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.QUALITY_LABEL'
189
- })), React.createElement(NativeInput, {
190
- type: "number",
191
- min: 1,
192
- max: 100,
193
- value: quality,
194
- "$isErrored": !isQualityValid,
195
- onChange: event => setQuality(event.target.value)
196
- })), ratioExists && React.createElement(Text, null, lang({
197
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.RATIO_EXISTS'
198
- })), React.createElement(Button, {
199
- color: "primary",
200
- size: "field",
201
- isDisabled: !isSizeValid || !isQualityValid || ratioExists,
202
- isLoading: isCreating,
203
- onClick: () => void handleCreate()
204
- }, lang({
205
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.CREATE_BUTTON'
206
- })), React.createElement("div", null, React.createElement(FieldLabel, null, lang({
207
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.EXISTING_LABEL'
208
- })), existingVariants.length === 0 ? React.createElement(Text, null, lang({
209
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.NO_VARIANTS'
210
- })) : React.createElement(VariantStrip, null, existingVariants.map(variant => React.createElement(VariantThumb, {
211
- key: variant.uuid
212
- }, React.createElement(TileImage, {
213
- src: getThumbUrl(variant),
214
- alt: variant.filename
215
- }), React.createElement(VariantThumbCaption, null, getRatioLabel(variant) || variant.filename))))))));
134
+ onClose: onClose,
135
+ children: [_jsx(DrawerHeader, {
136
+ children: _jsxs(DrawerTitle, {
137
+ children: [_jsx("span", {
138
+ children: lang({
139
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.TITLE'
140
+ })
141
+ }), _jsx(Button, {
142
+ view: "ghost",
143
+ color: "secondary",
144
+ size: "compact",
145
+ icon: _jsx(CloseIcon, {
146
+ size: "small"
147
+ }),
148
+ "aria-label": lang({
149
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.CLOSE'
150
+ }),
151
+ onClick: onClose
152
+ })]
153
+ })
154
+ }), _jsx(DrawerBody, {
155
+ children: original && _jsxs(Vertical, {
156
+ "$gap": 20,
157
+ children: [_jsxs("div", {
158
+ children: [_jsx(FieldLabel, {
159
+ children: lang({
160
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.RATIO_LABEL'
161
+ })
162
+ }), _jsx(Chips, {
163
+ children: RATIOS.map(item => _jsx(Chip, {
164
+ type: "button",
165
+ "$active": item.value === ratio,
166
+ onClick: () => setRatio(item.value),
167
+ children: item.label
168
+ }, item.value))
169
+ })]
170
+ }), _jsxs("div", {
171
+ children: [_jsx(FieldLabel, {
172
+ children: lang({
173
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.SIZE_LABEL'
174
+ })
175
+ }), _jsxs(Columns, {
176
+ "$sizes": "auto 1fr",
177
+ "$gap": 8,
178
+ "$alignItems": "center",
179
+ children: [_jsxs(Segment, {
180
+ children: [_jsx(SegmentItem, {
181
+ type: "button",
182
+ "$active": dimension === 'width',
183
+ onClick: () => setDimension('width'),
184
+ children: lang({
185
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.WIDTH'
186
+ })
187
+ }), _jsx(SegmentItem, {
188
+ type: "button",
189
+ "$active": dimension === 'height',
190
+ onClick: () => setDimension('height'),
191
+ children: lang({
192
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.HEIGHT'
193
+ })
194
+ })]
195
+ }), _jsx(NativeInput, {
196
+ type: "number",
197
+ min: 1,
198
+ value: size,
199
+ "$isErrored": !isSizeValid,
200
+ onChange: event => setSize(event.target.value)
201
+ })]
202
+ })]
203
+ }), _jsxs(Vertical, {
204
+ "$gap": 6,
205
+ children: [_jsx(PreviewStage, {
206
+ children: _jsx(PreviewFrame, {
207
+ "$ratio": selectedRatio.ar,
208
+ children: _jsx(PreviewImage, {
209
+ src: original.url,
210
+ alt: original.filename
211
+ })
212
+ })
213
+ }), isSizeValid && _jsxs(Text, {
214
+ children: [selectedRatio.label, ' · ', outputWidth, ' × ', outputHeight]
215
+ })]
216
+ }), isJpeg && _jsxs("div", {
217
+ children: [_jsx(FieldLabel, {
218
+ children: lang({
219
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.QUALITY_LABEL'
220
+ })
221
+ }), _jsx(NativeInput, {
222
+ type: "number",
223
+ min: 1,
224
+ max: 100,
225
+ value: quality,
226
+ "$isErrored": !isQualityValid,
227
+ onChange: event => setQuality(event.target.value)
228
+ })]
229
+ }), ratioExists && _jsx(Text, {
230
+ children: lang({
231
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.RATIO_EXISTS'
232
+ })
233
+ }), _jsx(Button, {
234
+ color: "primary",
235
+ size: "field",
236
+ isDisabled: !isSizeValid || !isQualityValid || ratioExists,
237
+ isLoading: isCreating,
238
+ onClick: () => void handleCreate(),
239
+ children: lang({
240
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.CREATE_BUTTON'
241
+ })
242
+ }), _jsxs("div", {
243
+ children: [_jsx(FieldLabel, {
244
+ children: lang({
245
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.EXISTING_LABEL'
246
+ })
247
+ }), existingVariants.length === 0 ? _jsx(Text, {
248
+ children: lang({
249
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.NO_VARIANTS'
250
+ })
251
+ }) : _jsx(VariantStrip, {
252
+ children: existingVariants.map(variant => _jsxs(VariantThumb, {
253
+ children: [_jsx(TileImage, {
254
+ src: getThumbUrl(variant),
255
+ alt: variant.filename
256
+ }), _jsx(VariantThumbCaption, {
257
+ children: getRatioLabel(variant) || variant.filename
258
+ })]
259
+ }, variant.uuid))
260
+ })]
261
+ })]
262
+ })
263
+ })]
264
+ });
216
265
  };