@pushwoosh/smart-components-kit 1.0.77 → 1.0.88

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 (55) hide show
  1. package/DocsButton/DocsButton.js +5 -1
  2. package/DocsButton/polyglot/index.d.ts +5 -0
  3. package/DocsButton/polyglot/index.js +10 -0
  4. package/DocsButton/polyglot/messages_en.d.ts +3 -0
  5. package/DocsButton/polyglot/messages_en.js +3 -0
  6. package/DocsButton/polyglot/messages_ru.d.ts +3 -0
  7. package/DocsButton/polyglot/messages_ru.js +3 -0
  8. package/DocsButton/polyglot/types.d.ts +4 -0
  9. package/DocsButton/polyglot/types.js +1 -0
  10. package/DynamicContentPicker/styled.d.ts +16 -104
  11. package/DynamicContentPickerForm/styled.d.ts +18 -106
  12. package/LanguagesSelector/LanguagesModal.js +11 -3
  13. package/LanguagesSelector/LanguagesSelectForm.js +34 -16
  14. package/LanguagesSelector/LanguagesSelector.js +10 -6
  15. package/LanguagesSelector/polyglot/index.d.ts +2 -0
  16. package/LanguagesSelector/polyglot/index.js +10 -0
  17. package/LanguagesSelector/polyglot/messages_en.d.ts +3 -0
  18. package/LanguagesSelector/polyglot/messages_en.js +13 -0
  19. package/LanguagesSelector/polyglot/messages_ru.d.ts +3 -0
  20. package/LanguagesSelector/polyglot/messages_ru.js +13 -0
  21. package/LanguagesSelector/polyglot/types.d.ts +17 -0
  22. package/LanguagesSelector/polyglot/types.js +1 -0
  23. package/LanguagesSelector/styled.d.ts +8 -52
  24. package/ModalCloningJourney/ModalCloningJourney.js +67 -22
  25. package/ModalCloningJourney/polyglot/index.d.ts +2 -0
  26. package/ModalCloningJourney/polyglot/index.js +10 -0
  27. package/ModalCloningJourney/polyglot/messages_en.d.ts +3 -0
  28. package/ModalCloningJourney/polyglot/messages_en.js +22 -0
  29. package/ModalCloningJourney/polyglot/messages_ru.d.ts +3 -0
  30. package/ModalCloningJourney/polyglot/messages_ru.js +22 -0
  31. package/ModalCloningJourney/polyglot/types.d.ts +25 -0
  32. package/ModalCloningJourney/polyglot/types.js +1 -0
  33. package/OpenActions/components/OpenActionsSummary/styles.d.ts +8 -52
  34. package/RichMessageEditorSmart/NewDynamicContentForm.js +5 -1
  35. package/RichMessageEditorSmart/polyglot/index.d.ts +5 -0
  36. package/RichMessageEditorSmart/polyglot/index.js +10 -0
  37. package/RichMessageEditorSmart/polyglot/messages_en.d.ts +3 -0
  38. package/RichMessageEditorSmart/polyglot/messages_en.js +3 -0
  39. package/RichMessageEditorSmart/polyglot/messages_ru.d.ts +3 -0
  40. package/RichMessageEditorSmart/polyglot/messages_ru.js +3 -0
  41. package/RichMessageEditorSmart/polyglot/types.d.ts +4 -0
  42. package/RichMessageEditorSmart/polyglot/types.js +1 -0
  43. package/Table/components/DataTable/DataTable.js +27 -8
  44. package/Table/components/DataTableList/DataTableList.js +29 -9
  45. package/Table/components/TablePagination/TablePagination.js +5 -1
  46. package/Table/polyglot/index.d.ts +2 -0
  47. package/Table/polyglot/index.js +10 -0
  48. package/Table/polyglot/messages_en.d.ts +3 -0
  49. package/Table/polyglot/messages_en.js +18 -0
  50. package/Table/polyglot/messages_ru.d.ts +3 -0
  51. package/Table/polyglot/messages_ru.js +18 -0
  52. package/Table/polyglot/types.d.ts +21 -0
  53. package/Table/polyglot/types.js +1 -0
  54. package/Table/styles.d.ts +34 -210
  55. package/package.json +3 -2
@@ -1,56 +1,12 @@
1
- export declare const ButtonGroup: import("styled-components").StyledComponent<"div", any, {
2
- $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
3
- $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
4
- $bgColor?: string | undefined;
5
- $border?: string | ({
6
- top?: string | undefined;
7
- right?: string | undefined;
8
- bottom?: string | undefined;
9
- left?: string | undefined;
10
- } | {
11
- horizontal: string;
12
- top?: string | undefined;
13
- bottom?: string | undefined;
14
- } | {
15
- vertical: string;
16
- right?: string | undefined;
17
- left?: string | undefined;
18
- }) | undefined;
19
- $borderRadius?: (string | number) | undefined;
20
- $boxShadow?: string | undefined;
21
- $gap?: (string | number) | undefined;
1
+ export declare const ButtonGroup: import("styled-components").StyledComponent<"div", any, import("@pushwoosh/kit-helpers/styled-helpers").CommonBoxProps & {
2
+ $alignContent?: import("@pushwoosh/kit-helpers/styled-helpers").AlignContentValue | undefined;
3
+ $alignItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
4
+ $gap?: import("@pushwoosh/kit-helpers/styled-helpers").StrNum | undefined;
5
+ $justifyContent?: import("@pushwoosh/kit-helpers/styled-helpers").JustifyContentValue | undefined;
6
+ } & {
22
7
  $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
23
- $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
24
- $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
25
- $margin?: (string | number) | ({
26
- top?: (string | number) | undefined;
27
- right?: (string | number) | undefined;
28
- bottom?: (string | number) | undefined;
29
- left?: (string | number) | undefined;
30
- } | {
31
- horizontal: string | number;
32
- top?: (string | number) | undefined;
33
- bottom?: (string | number) | undefined;
34
- } | {
35
- vertical: string | number;
36
- right?: (string | number) | undefined;
37
- left?: (string | number) | undefined;
38
- }) | undefined;
39
- $padding?: (string | number) | ({
40
- top?: (string | number) | undefined;
41
- right?: (string | number) | undefined;
42
- bottom?: (string | number) | undefined;
43
- left?: (string | number) | undefined;
44
- } | {
45
- horizontal: string | number;
46
- top?: (string | number) | undefined;
47
- bottom?: (string | number) | undefined;
48
- } | {
49
- vertical: string | number;
50
- right?: (string | number) | undefined;
51
- left?: (string | number) | undefined;
52
- }) | undefined;
53
- $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
8
+ $justifyItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
9
+ $placeItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
54
10
  } & {
55
11
  $gridAutoFlow: string;
56
12
  }, "$gridAutoFlow">;
@@ -5,6 +5,7 @@ import { FieldBox, Modal, ModalBody, ModalHeader, ModalFooter, NativeInput, Sele
5
5
  import { Horizontal, trackEvent, useAsync, Vertical } from '@pushwoosh/kit-helpers';
6
6
  import { H3, Paragraph } from '@pushwoosh/kit-typography';
7
7
  import { useSPAContext } from '@pushwoosh/spa-context';
8
+ import { useLang } from './polyglot';
8
9
  export function ModalCloningJourney({
9
10
  journeyId,
10
11
  journeyTitle,
@@ -13,6 +14,7 @@ export function ModalCloningJourney({
13
14
  isOpen
14
15
  }) {
15
16
  var _applicationsOptions$, _errors$title, _errors$destination, _errors$todo;
17
+ const lang = useLang();
16
18
  const params = useParams();
17
19
  const {
18
20
  applicationCode
@@ -62,10 +64,14 @@ export function ModalCloningJourney({
62
64
  }
63
65
  }, [applications]);
64
66
  const contentOptions = [{
65
- label: 'Keep messages content',
67
+ label: lang({
68
+ message: 'SMART.MODAL_CLONING_JOURNEY.CONTENT_OPTION.KEEP'
69
+ }),
66
70
  value: 'keep'
67
71
  }, {
68
- label: 'Clear messages content',
72
+ label: lang({
73
+ message: 'SMART.MODAL_CLONING_JOURNEY.CONTENT_OPTION.CLEAR'
74
+ }),
69
75
  value: 'clear'
70
76
  }];
71
77
  const {
@@ -80,7 +86,10 @@ export function ModalCloningJourney({
80
86
  reset
81
87
  } = useForm({
82
88
  defaultValues: {
83
- title: `${journeyTitle} (copy)`,
89
+ title: lang({
90
+ message: 'SMART.MODAL_CLONING_JOURNEY.TITLE_COPY',
91
+ title: journeyTitle
92
+ }),
84
93
  destination: applicationsOptions.length > 0 ? [(_applicationsOptions$ = applicationsOptions.find(({
85
94
  value
86
95
  }) => value === applicationCode)) === null || _applicationsOptions$ === void 0 ? void 0 : _applicationsOptions$.value].filter(Boolean) : [],
@@ -91,24 +100,31 @@ export function ModalCloningJourney({
91
100
  useEffect(() => {
92
101
  var _applicationsOptions$2;
93
102
  reset({
94
- title: `${journeyTitle} (copy)`,
103
+ title: lang({
104
+ message: 'SMART.MODAL_CLONING_JOURNEY.TITLE_COPY',
105
+ title: journeyTitle
106
+ }),
95
107
  destination: applicationsOptions.length > 0 ? [(_applicationsOptions$2 = applicationsOptions.find(({
96
108
  value
97
109
  }) => value === applicationCode)) === null || _applicationsOptions$2 === void 0 ? void 0 : _applicationsOptions$2.value].filter(Boolean) : [],
98
110
  todo: 'keep'
99
111
  });
100
- }, [journeyTitle, applicationsOptions, applicationCode, reset]);
112
+ }, [journeyTitle, applicationsOptions, applicationCode, reset, lang]);
101
113
  const onFormSubmit = handleSubmit(async data => {
102
114
  let hasError = false;
103
115
  if (!data.title) {
104
116
  setError('title', {
105
- message: 'Name is required'
117
+ message: lang({
118
+ message: 'SMART.MODAL_CLONING_JOURNEY.ERROR.NAME_REQUIRED'
119
+ })
106
120
  });
107
121
  hasError = true;
108
122
  }
109
123
  if (data.destination.length === 0) {
110
124
  setError('destination', {
111
- message: 'Project is required'
125
+ message: lang({
126
+ message: 'SMART.MODAL_CLONING_JOURNEY.ERROR.PROJECT_REQUIRED'
127
+ })
112
128
  });
113
129
  hasError = true;
114
130
  }
@@ -141,7 +157,9 @@ export function ModalCloningJourney({
141
157
  const handleDestinationChange = newValue => {
142
158
  if (newValue.length > 5) {
143
159
  setError('destination', {
144
- message: 'Maximum 5 projects'
160
+ message: lang({
161
+ message: 'SMART.MODAL_CLONING_JOURNEY.ERROR.MAX_PROJECTS'
162
+ })
145
163
  });
146
164
  } else {
147
165
  setValue('destination', newValue.map(item => item.value));
@@ -153,22 +171,37 @@ export function ModalCloningJourney({
153
171
  const isCloningToAnotherProject = applicationsOptions.length > 0 && (values.destination.length === 1 && values.destination[0] !== applicationCode || values.destination.length > 1);
154
172
  const howItWorks = () => {
155
173
  if (isCloningToAnotherProject) {
156
- return values.todo === 'keep' ? 'How it works: Each project will get its own copy of presets. Editing presets applies changes across all campaigns in one project.' : 'How it works: Message content will be cleared in cloned campaigns. You need to select existing presets or create new content for your messages.';
157
- } else {
158
- return values.todo === 'keep' ? 'Message content will be copied to the cloned campaign. Editing presets applies changes across all campaigns in one project.' : 'Message content will be cleared in cloned campaign. You need to select an existing preset or create new content for your messages.';
174
+ return values.todo === 'keep' ? lang({
175
+ message: 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.CROSS_KEEP'
176
+ }) : lang({
177
+ message: 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.CROSS_CLEAR'
178
+ });
159
179
  }
180
+ return values.todo === 'keep' ? lang({
181
+ message: 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.SAME_KEEP'
182
+ }) : lang({
183
+ message: 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.SAME_CLEAR'
184
+ });
160
185
  };
161
186
  return React.createElement(Modal, {
162
187
  size: "medium",
163
188
  isOpen: isOpen
164
- }, React.createElement(ModalHeader, null, React.createElement(H3, null, "Clone campaign")), React.createElement(ModalBody, null, React.createElement(Vertical, {
189
+ }, React.createElement(ModalHeader, null, React.createElement(H3, null, lang({
190
+ message: 'SMART.MODAL_CLONING_JOURNEY.HEADING'
191
+ }))), React.createElement(ModalBody, null, React.createElement(Vertical, {
165
192
  "$gap": 24
166
- }, React.createElement(Paragraph, null, "The campaign structure, settings, selected events, segments, and content will be copied. You can duplicate it within the current project or clone it to other projects."), React.createElement(FieldBox, {
193
+ }, React.createElement(Paragraph, null, lang({
194
+ message: 'SMART.MODAL_CLONING_JOURNEY.DESCRIPTION'
195
+ })), React.createElement(FieldBox, {
167
196
  error: (_errors$title = errors.title) === null || _errors$title === void 0 ? void 0 : _errors$title.message,
168
- title: "Campaign name"
197
+ title: lang({
198
+ message: 'SMART.MODAL_CLONING_JOURNEY.FIELD.CAMPAIGN_NAME'
199
+ })
169
200
  }, React.createElement(NativeInput, {
170
201
  disabled: isCloning,
171
- placeholder: "ex. Onboarding",
202
+ placeholder: lang({
203
+ message: 'SMART.MODAL_CLONING_JOURNEY.PLACEHOLDER.CAMPAIGN_NAME'
204
+ }),
172
205
  name: "title",
173
206
  value: values.title,
174
207
  onChange: e => {
@@ -178,9 +211,13 @@ export function ModalCloningJourney({
178
211
  }
179
212
  }
180
213
  })), React.createElement(FieldBox, {
181
- title: "Destination projects",
214
+ title: lang({
215
+ message: 'SMART.MODAL_CLONING_JOURNEY.FIELD.DESTINATION'
216
+ }),
182
217
  error: (_errors$destination = errors.destination) === null || _errors$destination === void 0 ? void 0 : _errors$destination.message,
183
- description: "Maximum 5 projects"
218
+ description: lang({
219
+ message: 'SMART.MODAL_CLONING_JOURNEY.FIELD.DESTINATION_HINT'
220
+ })
184
221
  }, React.createElement(Select, {
185
222
  isDisabled: isCloning || applications.loading,
186
223
  isLoading: applications.loading,
@@ -198,7 +235,9 @@ export function ModalCloningJourney({
198
235
  onChange: handleDestinationChange,
199
236
  value: values.destination ? applicationsOptions.filter(app => values.destination.includes(app.value)) : []
200
237
  })), React.createElement(FieldBox, {
201
- title: "What to do with the content in this campaign?",
238
+ title: lang({
239
+ message: 'SMART.MODAL_CLONING_JOURNEY.FIELD.CONTENT'
240
+ }),
202
241
  error: (_errors$todo = errors.todo) === null || _errors$todo === void 0 ? void 0 : _errors$todo.message
203
242
  }, React.createElement(Select, {
204
243
  isDisabled: isCloning,
@@ -215,10 +254,12 @@ export function ModalCloningJourney({
215
254
  }
216
255
  }), React.createElement(Vertical, {
217
256
  "$gap": 24
218
- }, React.createElement(Paragraph, null, "How it works:", ' ', howItWorks()), isCloningToAnotherProject && values.todo === 'keep' && React.createElement(Banner, {
257
+ }, React.createElement(Paragraph, null, howItWorks()), isCloningToAnotherProject && values.todo === 'keep' && React.createElement(Banner, {
219
258
  view: "ghost",
220
259
  type: "warning",
221
- title: "Preset changes don\u2019t sync across projects"
260
+ title: lang({
261
+ message: 'SMART.MODAL_CLONING_JOURNEY.BANNER.PRESET_SYNC'
262
+ })
222
263
  }))))), React.createElement(ModalFooter, null, React.createElement(Horizontal, {
223
264
  "$justifyContent": "end",
224
265
  "$gap": 8
@@ -226,9 +267,13 @@ export function ModalCloningJourney({
226
267
  color: "secondary",
227
268
  onClick: onCancel,
228
269
  isDisabled: isCloning
229
- }, "Cancel"), React.createElement(Button, {
270
+ }, lang({
271
+ message: 'SMART.MODAL_CLONING_JOURNEY.BUTTON.CANCEL'
272
+ })), React.createElement(Button, {
230
273
  color: "primary",
231
274
  onClick: onFormSubmit,
232
275
  isLoading: isCloning
233
- }, "Clone"))));
276
+ }, lang({
277
+ message: 'SMART.MODAL_CLONING_JOURNEY.BUTTON.CLONE'
278
+ })))));
234
279
  }
@@ -0,0 +1,2 @@
1
+ import { type ModalCloningJourneyMessages } from './types';
2
+ export declare const Lang: import("react").FC<import("@pushwoosh/dumb-components/polyglot").LangProps<ModalCloningJourneyMessages>>, useLang: () => (props: import("@pushwoosh/dumb-components/polyglot").LangProps<ModalCloningJourneyMessages>) => string;
@@ -0,0 +1,10 @@
1
+ import { createLang } from '@pushwoosh/dumb-components/polyglot';
2
+ import { messages as en } from './messages_en';
3
+ import { messages as ru } from './messages_ru';
4
+ export const {
5
+ Lang,
6
+ useLang
7
+ } = createLang({
8
+ en,
9
+ ru
10
+ });
@@ -0,0 +1,3 @@
1
+ import type { LangMessages } from '@pushwoosh/dumb-components/polyglot';
2
+ import { type ModalCloningJourneyMessages } from './types';
3
+ export declare const messages: LangMessages<ModalCloningJourneyMessages>;
@@ -0,0 +1,22 @@
1
+ export const messages = {
2
+ 'SMART.MODAL_CLONING_JOURNEY.HEADING': 'Clone campaign',
3
+ 'SMART.MODAL_CLONING_JOURNEY.DESCRIPTION': 'The campaign structure, settings, selected events, segments, and content will be copied. You can duplicate it within the current project or clone it to other projects.',
4
+ 'SMART.MODAL_CLONING_JOURNEY.TITLE_COPY': '{{title}} (copy)',
5
+ 'SMART.MODAL_CLONING_JOURNEY.CONTENT_OPTION.KEEP': 'Keep messages content',
6
+ 'SMART.MODAL_CLONING_JOURNEY.CONTENT_OPTION.CLEAR': 'Clear messages content',
7
+ 'SMART.MODAL_CLONING_JOURNEY.FIELD.CAMPAIGN_NAME': 'Campaign name',
8
+ 'SMART.MODAL_CLONING_JOURNEY.PLACEHOLDER.CAMPAIGN_NAME': 'ex. Onboarding',
9
+ 'SMART.MODAL_CLONING_JOURNEY.FIELD.DESTINATION': 'Destination projects',
10
+ 'SMART.MODAL_CLONING_JOURNEY.FIELD.DESTINATION_HINT': 'Maximum 5 projects',
11
+ 'SMART.MODAL_CLONING_JOURNEY.FIELD.CONTENT': 'What to do with the content in this campaign?',
12
+ 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.CROSS_KEEP': 'How it works: Each project will get its own copy of presets. Editing presets applies changes across all campaigns in one project.',
13
+ 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.CROSS_CLEAR': 'How it works: Message content will be cleared in cloned campaigns. You need to select existing presets or create new content for your messages.',
14
+ 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.SAME_KEEP': 'How it works: Message content will be copied to the cloned campaign. Editing presets applies changes across all campaigns in one project.',
15
+ 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.SAME_CLEAR': 'How it works: Message content will be cleared in cloned campaign. You need to select an existing preset or create new content for your messages.',
16
+ 'SMART.MODAL_CLONING_JOURNEY.BANNER.PRESET_SYNC': 'Preset changes don’t sync across projects',
17
+ 'SMART.MODAL_CLONING_JOURNEY.ERROR.NAME_REQUIRED': 'Name is required',
18
+ 'SMART.MODAL_CLONING_JOURNEY.ERROR.PROJECT_REQUIRED': 'Project is required',
19
+ 'SMART.MODAL_CLONING_JOURNEY.ERROR.MAX_PROJECTS': 'Maximum 5 projects',
20
+ 'SMART.MODAL_CLONING_JOURNEY.BUTTON.CANCEL': 'Cancel',
21
+ 'SMART.MODAL_CLONING_JOURNEY.BUTTON.CLONE': 'Clone'
22
+ };
@@ -0,0 +1,3 @@
1
+ import type { LangMessages } from '@pushwoosh/dumb-components/polyglot';
2
+ import { type ModalCloningJourneyMessages } from './types';
3
+ export declare const messages: LangMessages<ModalCloningJourneyMessages>;
@@ -0,0 +1,22 @@
1
+ export const messages = {
2
+ 'SMART.MODAL_CLONING_JOURNEY.HEADING': 'Клонировать кампанию',
3
+ 'SMART.MODAL_CLONING_JOURNEY.DESCRIPTION': 'Структура кампании, настройки, выбранные события, сегменты и контент будут скопированы. Вы можете дублировать её в текущем проекте или клонировать в другие проекты.',
4
+ 'SMART.MODAL_CLONING_JOURNEY.TITLE_COPY': '{{title}} (копия)',
5
+ 'SMART.MODAL_CLONING_JOURNEY.CONTENT_OPTION.KEEP': 'Сохранить контент сообщений',
6
+ 'SMART.MODAL_CLONING_JOURNEY.CONTENT_OPTION.CLEAR': 'Очистить контент сообщений',
7
+ 'SMART.MODAL_CLONING_JOURNEY.FIELD.CAMPAIGN_NAME': 'Название кампании',
8
+ 'SMART.MODAL_CLONING_JOURNEY.PLACEHOLDER.CAMPAIGN_NAME': 'напр. Onboarding',
9
+ 'SMART.MODAL_CLONING_JOURNEY.FIELD.DESTINATION': 'Проекты назначения',
10
+ 'SMART.MODAL_CLONING_JOURNEY.FIELD.DESTINATION_HINT': 'Максимум 5 проектов',
11
+ 'SMART.MODAL_CLONING_JOURNEY.FIELD.CONTENT': 'Что сделать с контентом в этой кампании?',
12
+ 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.CROSS_KEEP': 'Как это работает: Каждый проект получит свою копию пресетов. Редактирование пресетов применяет изменения ко всем кампаниям в одном проекте.',
13
+ 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.CROSS_CLEAR': 'Как это работает: Контент сообщений будет очищен в клонированных кампаниях. Вам нужно выбрать существующие пресеты или создать новый контент для ваших сообщений.',
14
+ 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.SAME_KEEP': 'Как это работает: Контент сообщений будет скопирован в клонированную кампанию. Редактирование пресетов применяет изменения ко всем кампаниям в одном проекте.',
15
+ 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.SAME_CLEAR': 'Как это работает: Контент сообщений будет очищен в клонированной кампании. Вам нужно выбрать существующий пресет или создать новый контент для ваших сообщений.',
16
+ 'SMART.MODAL_CLONING_JOURNEY.BANNER.PRESET_SYNC': 'Изменения пресетов не синхронизируются между проектами',
17
+ 'SMART.MODAL_CLONING_JOURNEY.ERROR.NAME_REQUIRED': 'Укажите название',
18
+ 'SMART.MODAL_CLONING_JOURNEY.ERROR.PROJECT_REQUIRED': 'Выберите проект',
19
+ 'SMART.MODAL_CLONING_JOURNEY.ERROR.MAX_PROJECTS': 'Максимум 5 проектов',
20
+ 'SMART.MODAL_CLONING_JOURNEY.BUTTON.CANCEL': 'Отмена',
21
+ 'SMART.MODAL_CLONING_JOURNEY.BUTTON.CLONE': 'Клонировать'
22
+ };
@@ -0,0 +1,25 @@
1
+ import type { NoParams } from '@pushwoosh/dumb-components/polyglot';
2
+ export type ModalCloningJourneyMessages = {
3
+ 'SMART.MODAL_CLONING_JOURNEY.HEADING': NoParams;
4
+ 'SMART.MODAL_CLONING_JOURNEY.DESCRIPTION': NoParams;
5
+ 'SMART.MODAL_CLONING_JOURNEY.TITLE_COPY': {
6
+ title: string;
7
+ };
8
+ 'SMART.MODAL_CLONING_JOURNEY.CONTENT_OPTION.KEEP': NoParams;
9
+ 'SMART.MODAL_CLONING_JOURNEY.CONTENT_OPTION.CLEAR': NoParams;
10
+ 'SMART.MODAL_CLONING_JOURNEY.FIELD.CAMPAIGN_NAME': NoParams;
11
+ 'SMART.MODAL_CLONING_JOURNEY.PLACEHOLDER.CAMPAIGN_NAME': NoParams;
12
+ 'SMART.MODAL_CLONING_JOURNEY.FIELD.DESTINATION': NoParams;
13
+ 'SMART.MODAL_CLONING_JOURNEY.FIELD.DESTINATION_HINT': NoParams;
14
+ 'SMART.MODAL_CLONING_JOURNEY.FIELD.CONTENT': NoParams;
15
+ 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.CROSS_KEEP': NoParams;
16
+ 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.CROSS_CLEAR': NoParams;
17
+ 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.SAME_KEEP': NoParams;
18
+ 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.SAME_CLEAR': NoParams;
19
+ 'SMART.MODAL_CLONING_JOURNEY.BANNER.PRESET_SYNC': NoParams;
20
+ 'SMART.MODAL_CLONING_JOURNEY.ERROR.NAME_REQUIRED': NoParams;
21
+ 'SMART.MODAL_CLONING_JOURNEY.ERROR.PROJECT_REQUIRED': NoParams;
22
+ 'SMART.MODAL_CLONING_JOURNEY.ERROR.MAX_PROJECTS': NoParams;
23
+ 'SMART.MODAL_CLONING_JOURNEY.BUTTON.CANCEL': NoParams;
24
+ 'SMART.MODAL_CLONING_JOURNEY.BUTTON.CLONE': NoParams;
25
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,57 +1,13 @@
1
1
  export declare const LinkRow: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const ClickActionSection: import("styled-components").StyledComponent<"div", any, {
3
- $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
4
- $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
5
- $bgColor?: string | undefined;
6
- $border?: string | ({
7
- top?: string | undefined;
8
- right?: string | undefined;
9
- bottom?: string | undefined;
10
- left?: string | undefined;
11
- } | {
12
- horizontal: string;
13
- top?: string | undefined;
14
- bottom?: string | undefined;
15
- } | {
16
- vertical: string;
17
- right?: string | undefined;
18
- left?: string | undefined;
19
- }) | undefined;
20
- $borderRadius?: (string | number) | undefined;
21
- $boxShadow?: string | undefined;
22
- $gap?: (string | number) | undefined;
2
+ export declare const ClickActionSection: import("styled-components").StyledComponent<"div", any, import("@pushwoosh/kit-helpers/styled-helpers").CommonBoxProps & {
3
+ $alignContent?: import("@pushwoosh/kit-helpers/styled-helpers").AlignContentValue | undefined;
4
+ $alignItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
5
+ $gap?: import("@pushwoosh/kit-helpers/styled-helpers").StrNum | undefined;
6
+ $justifyContent?: import("@pushwoosh/kit-helpers/styled-helpers").JustifyContentValue | undefined;
7
+ } & {
23
8
  $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
24
- $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
25
- $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
26
- $margin?: (string | number) | ({
27
- top?: (string | number) | undefined;
28
- right?: (string | number) | undefined;
29
- bottom?: (string | number) | undefined;
30
- left?: (string | number) | undefined;
31
- } | {
32
- horizontal: string | number;
33
- top?: (string | number) | undefined;
34
- bottom?: (string | number) | undefined;
35
- } | {
36
- vertical: string | number;
37
- right?: (string | number) | undefined;
38
- left?: (string | number) | undefined;
39
- }) | undefined;
40
- $padding?: (string | number) | ({
41
- top?: (string | number) | undefined;
42
- right?: (string | number) | undefined;
43
- bottom?: (string | number) | undefined;
44
- left?: (string | number) | undefined;
45
- } | {
46
- horizontal: string | number;
47
- top?: (string | number) | undefined;
48
- bottom?: (string | number) | undefined;
49
- } | {
50
- vertical: string | number;
51
- right?: (string | number) | undefined;
52
- left?: (string | number) | undefined;
53
- }) | undefined;
54
- $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
9
+ $justifyItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
10
+ $placeItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
55
11
  } & {
56
12
  $gridAutoFlow: string;
57
13
  }, "$gridAutoFlow">;
@@ -2,11 +2,13 @@ import React, { useState } from 'react';
2
2
  import { Button } from '@pushwoosh/dumb-components';
3
3
  import { Horizontal } from '@pushwoosh/kit-helpers';
4
4
  import { SimpleDynamicContentPickerFormSmart } from '../DynamicContentPickerForm';
5
+ import { useLang } from './polyglot';
5
6
  export const NewDynamicContentForm = ({
6
7
  update,
7
8
  onSubmit
8
9
  }) => {
9
10
  const [dc, setDc] = useState();
11
+ const lang = useLang();
10
12
  return React.createElement(SimpleDynamicContentPickerFormSmart, {
11
13
  dc: dc,
12
14
  onChange: setDc,
@@ -17,5 +19,7 @@ export const NewDynamicContentForm = ({
17
19
  color: "secondary",
18
20
  onClick: () => onSubmit(dc),
19
21
  isDisabled: !dc
20
- }, "Insert")));
22
+ }, lang({
23
+ message: 'SMART.RICH_MESSAGE_EDITOR.INSERT'
24
+ }))));
21
25
  };
@@ -0,0 +1,5 @@
1
+ export declare const Lang: import("react").FC<{
2
+ message: "SMART.RICH_MESSAGE_EDITOR.INSERT";
3
+ } & import("@pushwoosh/dumb-components/polyglot").NoParams>, useLang: () => (props: {
4
+ message: "SMART.RICH_MESSAGE_EDITOR.INSERT";
5
+ } & import("@pushwoosh/dumb-components/polyglot").NoParams) => string;
@@ -0,0 +1,10 @@
1
+ import { createLang } from '@pushwoosh/dumb-components/polyglot';
2
+ import { messages as en } from './messages_en';
3
+ import { messages as ru } from './messages_ru';
4
+ export const {
5
+ Lang,
6
+ useLang
7
+ } = createLang({
8
+ en,
9
+ ru
10
+ });
@@ -0,0 +1,3 @@
1
+ import type { LangMessages } from '@pushwoosh/dumb-components/polyglot';
2
+ import { type RichMessageEditorMessages } from './types';
3
+ export declare const messages: LangMessages<RichMessageEditorMessages>;
@@ -0,0 +1,3 @@
1
+ export const messages = {
2
+ 'SMART.RICH_MESSAGE_EDITOR.INSERT': 'Insert'
3
+ };
@@ -0,0 +1,3 @@
1
+ import type { LangMessages } from '@pushwoosh/dumb-components/polyglot';
2
+ import { type RichMessageEditorMessages } from './types';
3
+ export declare const messages: LangMessages<RichMessageEditorMessages>;
@@ -0,0 +1,3 @@
1
+ export const messages = {
2
+ 'SMART.RICH_MESSAGE_EDITOR.INSERT': 'Вставить'
3
+ };
@@ -0,0 +1,4 @@
1
+ import type { NoParams } from '@pushwoosh/dumb-components/polyglot';
2
+ export type RichMessageEditorMessages = {
3
+ 'SMART.RICH_MESSAGE_EDITOR.INSERT': NoParams;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -5,11 +5,12 @@ import { Horizontal } from '@pushwoosh/kit-helpers';
5
5
  import { WarningRoundIcon } from '@pushwoosh/kit-icons';
6
6
  import { Text } from '@pushwoosh/kit-typography';
7
7
  import { DataTableContext } from '../../context';
8
+ import { useLang } from '../../polyglot';
8
9
  import { LockedText, Table } from '../../styles';
9
10
  import { DataTableList } from '../DataTableList';
10
11
  import { DataTablePagination } from '../DataTablePagination';
11
12
  export function DataTable(props) {
12
- var _data$value, _data$value2, _data$value3, _data$value4, _data$value5, _data$value6;
13
+ var _data$value, _data$value2, _data$value3, _data$value4, _data$value5;
13
14
  const {
14
15
  columns,
15
16
  width,
@@ -24,6 +25,7 @@ export function DataTable(props) {
24
25
  hidePagination,
25
26
  hidePageSizeSelector
26
27
  } = props;
28
+ const lang = useLang();
27
29
  const {
28
30
  data,
29
31
  params
@@ -58,7 +60,9 @@ export function DataTable(props) {
58
60
  }, React.createElement(Spinner, {
59
61
  size: "medium",
60
62
  color: Color.LOCKED
61
- }), React.createElement(LockedText, null, "Loading...")), !data.loading && data.error && React.createElement(Horizontal, {
63
+ }), React.createElement(LockedText, null, lang({
64
+ message: 'SMART.TABLE.LOADING'
65
+ }))), !data.loading && data.error && React.createElement(Horizontal, {
62
66
  "$alignItems": "center",
63
67
  "$gap": 4
64
68
  }, React.createElement(WarningRoundIcon, {
@@ -67,19 +71,34 @@ export function DataTable(props) {
67
71
  color: Color.WARNING
68
72
  }), React.createElement(Text, {
69
73
  "$color": Color.WARNING
70
- }, "Request is failed")), !data.loading && !data.error && (((_data$value2 = data.value) === null || _data$value2 === void 0 ? void 0 : _data$value2.total) ?? 0) > 0 && React.createElement(Horizontal, {
74
+ }, lang({
75
+ message: 'SMART.TABLE.REQUEST_FAILED'
76
+ }))), !data.loading && !data.error && (((_data$value2 = data.value) === null || _data$value2 === void 0 ? void 0 : _data$value2.total) ?? 0) > 0 && React.createElement(Horizontal, {
71
77
  "$placeItems": "center",
72
78
  "$gap": 4
73
- }, "Result:", React.createElement(LockedText, null, `${(_data$value3 = data.value) === null || _data$value3 === void 0 ? void 0 : _data$value3.total} item${(((_data$value4 = data.value) === null || _data$value4 === void 0 ? void 0 : _data$value4.total) ?? 0) > 1 ? 's' : ''}`)), !data.loading && !data.error && (((_data$value5 = data.value) === null || _data$value5 === void 0 ? void 0 : _data$value5.total) ?? 0) === 0 && !isFiltered && React.createElement(Horizontal, {
79
+ }, lang({
80
+ message: 'SMART.TABLE.RESULT_LABEL'
81
+ }), React.createElement(LockedText, null, lang({
82
+ message: 'SMART.TABLE.RESULT_COUNT',
83
+ total: ((_data$value3 = data.value) === null || _data$value3 === void 0 ? void 0 : _data$value3.total) ?? 0
84
+ }))), !data.loading && !data.error && (((_data$value4 = data.value) === null || _data$value4 === void 0 ? void 0 : _data$value4.total) ?? 0) === 0 && !isFiltered && React.createElement(Horizontal, {
74
85
  "$placeItems": "center"
75
- }, React.createElement(LockedText, null, "No items yet")), !data.loading && isFiltered && React.createElement(Horizontal, {
86
+ }, React.createElement(LockedText, null, lang({
87
+ message: 'SMART.TABLE.NO_ITEMS'
88
+ }))), !data.loading && isFiltered && React.createElement(Horizontal, {
76
89
  "$gap": 16
77
- }, !data.error && (((_data$value6 = data.value) === null || _data$value6 === void 0 || (_data$value6 = _data$value6.items) === null || _data$value6 === void 0 ? void 0 : _data$value6.length) ?? 0) === 0 && React.createElement(Horizontal, {
90
+ }, !data.error && (((_data$value5 = data.value) === null || _data$value5 === void 0 || (_data$value5 = _data$value5.items) === null || _data$value5 === void 0 ? void 0 : _data$value5.length) ?? 0) === 0 && React.createElement(Horizontal, {
78
91
  "$placeItems": "center",
79
92
  "$gap": 4
80
- }, "Result:", React.createElement(LockedText, null, "No match found")), React.createElement(Button, {
93
+ }, lang({
94
+ message: 'SMART.TABLE.RESULT_LABEL'
95
+ }), React.createElement(LockedText, null, lang({
96
+ message: 'SMART.TABLE.NO_MATCH'
97
+ }))), React.createElement(Button, {
81
98
  color: "primary",
82
99
  view: "ghost",
83
100
  onClick: onClearRequest ?? onClearRequestDefault
84
- }, "Clear request")))), renderAfter === null || renderAfter === void 0 ? void 0 : renderAfter(context));
101
+ }, lang({
102
+ message: 'SMART.TABLE.CLEAR_REQUEST'
103
+ }))))), renderAfter === null || renderAfter === void 0 ? void 0 : renderAfter(context));
85
104
  }