@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.
- package/DocsButton/DocsButton.js +5 -1
- package/DocsButton/polyglot/index.d.ts +5 -0
- package/DocsButton/polyglot/index.js +10 -0
- package/DocsButton/polyglot/messages_en.d.ts +3 -0
- package/DocsButton/polyglot/messages_en.js +3 -0
- package/DocsButton/polyglot/messages_ru.d.ts +3 -0
- package/DocsButton/polyglot/messages_ru.js +3 -0
- package/DocsButton/polyglot/types.d.ts +4 -0
- package/DocsButton/polyglot/types.js +1 -0
- package/DynamicContentPicker/styled.d.ts +16 -104
- package/DynamicContentPickerForm/styled.d.ts +18 -106
- package/LanguagesSelector/LanguagesModal.js +11 -3
- package/LanguagesSelector/LanguagesSelectForm.js +34 -16
- package/LanguagesSelector/LanguagesSelector.js +10 -6
- package/LanguagesSelector/polyglot/index.d.ts +2 -0
- package/LanguagesSelector/polyglot/index.js +10 -0
- package/LanguagesSelector/polyglot/messages_en.d.ts +3 -0
- package/LanguagesSelector/polyglot/messages_en.js +13 -0
- package/LanguagesSelector/polyglot/messages_ru.d.ts +3 -0
- package/LanguagesSelector/polyglot/messages_ru.js +13 -0
- package/LanguagesSelector/polyglot/types.d.ts +17 -0
- package/LanguagesSelector/polyglot/types.js +1 -0
- package/LanguagesSelector/styled.d.ts +8 -52
- package/ModalCloningJourney/ModalCloningJourney.js +67 -22
- package/ModalCloningJourney/polyglot/index.d.ts +2 -0
- package/ModalCloningJourney/polyglot/index.js +10 -0
- package/ModalCloningJourney/polyglot/messages_en.d.ts +3 -0
- package/ModalCloningJourney/polyglot/messages_en.js +22 -0
- package/ModalCloningJourney/polyglot/messages_ru.d.ts +3 -0
- package/ModalCloningJourney/polyglot/messages_ru.js +22 -0
- package/ModalCloningJourney/polyglot/types.d.ts +25 -0
- package/ModalCloningJourney/polyglot/types.js +1 -0
- package/OpenActions/components/OpenActionsSummary/styles.d.ts +8 -52
- package/RichMessageEditorSmart/NewDynamicContentForm.js +5 -1
- package/RichMessageEditorSmart/polyglot/index.d.ts +5 -0
- package/RichMessageEditorSmart/polyglot/index.js +10 -0
- package/RichMessageEditorSmart/polyglot/messages_en.d.ts +3 -0
- package/RichMessageEditorSmart/polyglot/messages_en.js +3 -0
- package/RichMessageEditorSmart/polyglot/messages_ru.d.ts +3 -0
- package/RichMessageEditorSmart/polyglot/messages_ru.js +3 -0
- package/RichMessageEditorSmart/polyglot/types.d.ts +4 -0
- package/RichMessageEditorSmart/polyglot/types.js +1 -0
- package/Table/components/DataTable/DataTable.js +27 -8
- package/Table/components/DataTableList/DataTableList.js +29 -9
- package/Table/components/TablePagination/TablePagination.js +5 -1
- package/Table/polyglot/index.d.ts +2 -0
- package/Table/polyglot/index.js +10 -0
- package/Table/polyglot/messages_en.d.ts +3 -0
- package/Table/polyglot/messages_en.js +18 -0
- package/Table/polyglot/messages_ru.d.ts +3 -0
- package/Table/polyglot/messages_ru.js +18 -0
- package/Table/polyglot/types.d.ts +21 -0
- package/Table/polyglot/types.js +1 -0
- package/Table/styles.d.ts +34 -210
- package/package.json +3 -2
|
@@ -1,56 +1,12 @@
|
|
|
1
|
-
export declare const ButtonGroup: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
-
$alignContent?: "
|
|
3
|
-
$alignItems?: "
|
|
4
|
-
$
|
|
5
|
-
$
|
|
6
|
-
|
|
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
|
-
$
|
|
24
|
-
$
|
|
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:
|
|
67
|
+
label: lang({
|
|
68
|
+
message: 'SMART.MODAL_CLONING_JOURNEY.CONTENT_OPTION.KEEP'
|
|
69
|
+
}),
|
|
66
70
|
value: 'keep'
|
|
67
71
|
}, {
|
|
68
|
-
label:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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' ?
|
|
157
|
-
|
|
158
|
-
|
|
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,
|
|
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,
|
|
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:
|
|
197
|
+
title: lang({
|
|
198
|
+
message: 'SMART.MODAL_CLONING_JOURNEY.FIELD.CAMPAIGN_NAME'
|
|
199
|
+
})
|
|
169
200
|
}, React.createElement(NativeInput, {
|
|
170
201
|
disabled: isCloning,
|
|
171
|
-
placeholder:
|
|
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:
|
|
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:
|
|
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:
|
|
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,
|
|
257
|
+
}, React.createElement(Paragraph, null, howItWorks()), isCloningToAnotherProject && values.todo === 'keep' && React.createElement(Banner, {
|
|
219
258
|
view: "ghost",
|
|
220
259
|
type: "warning",
|
|
221
|
-
title:
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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,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,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?: "
|
|
4
|
-
$alignItems?: "
|
|
5
|
-
$
|
|
6
|
-
$
|
|
7
|
-
|
|
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
|
-
$
|
|
25
|
-
$
|
|
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
|
-
},
|
|
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 @@
|
|
|
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
|
|
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,
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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,
|
|
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$
|
|
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
|
-
},
|
|
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
|
-
},
|
|
101
|
+
}, lang({
|
|
102
|
+
message: 'SMART.TABLE.CLEAR_REQUEST'
|
|
103
|
+
}))))), renderAfter === null || renderAfter === void 0 ? void 0 : renderAfter(context));
|
|
85
104
|
}
|