@pushwoosh/smart-components-kit 1.0.90 → 1.1.1
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/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.d.ts +1 -2
- package/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.js +103 -88
- package/CampaignsConfigurationDrawer/components/Card/Card.d.ts +1 -2
- package/CampaignsConfigurationDrawer/components/Card/Card.js +19 -13
- package/DocsButton/DocsButton.d.ts +1 -2
- package/DocsButton/DocsButton.js +21 -18
- package/DynamicContentPicker/DynamicContentPicker.js +76 -63
- package/DynamicContentPicker/Line.js +24 -22
- package/DynamicContentPickerForm/DynamicContentCustomPickerForm.js +18 -17
- package/DynamicContentPickerForm/DynamicContentEventPickerForm.js +60 -57
- package/DynamicContentPickerForm/DynamicContentTagPickerForm.js +60 -57
- package/DynamicContentPickerForm/SimpleDynamicContentPickerFormSmart.js +72 -63
- package/DynamicContentPickerForm/VariedDynamicContentPickerFormSmart.js +86 -74
- package/EmailTemplatePreview/EmailTemplatePreview.js +8 -6
- package/ExportCSV/ExportCsvBanner/ExportCsvBanner.d.ts +1 -2
- package/ExportCSV/ExportCsvBanner/ExportCsvBanner.js +54 -49
- package/ExportCSV/useExportService/useExportService.js +1 -0
- package/LanguagesSelector/LanguagesModal.js +38 -24
- package/LanguagesSelector/LanguagesSelectForm.js +73 -62
- package/LanguagesSelector/LanguagesSelectFormLoader.js +8 -7
- package/LanguagesSelector/LanguagesSelector.js +92 -78
- package/MediaStore/CreateVariantDrawer.js +134 -85
- package/MediaStore/MediaStore.d.ts +6 -10
- package/MediaStore/MediaStore.js +201 -161
- package/MediaStore/MediaStorePaginated.d.ts +8 -0
- package/MediaStore/MediaStorePaginated.js +24 -0
- package/MediaStore/index.d.ts +3 -1
- package/MediaStore/index.js +2 -1
- package/MediaStore/types.d.ts +22 -0
- package/MediaStore/types.js +1 -0
- package/ModalCloningJourney/ModalCloningJourney.d.ts +1 -2
- package/ModalCloningJourney/ModalCloningJourney.js +113 -91
- package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.d.ts +1 -2
- package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.js +98 -78
- package/OpenActions/components/OpenActionsSummaryByPreset.d.ts +1 -2
- package/OpenActions/components/OpenActionsSummaryByPreset.js +2 -2
- package/PlatformsConfigurationDrawer/PlatformsConfigurationDrawer.js +21 -17
- package/PlatformsConfigurationDrawer/components/DesktopPage/DesktopPage.js +112 -75
- package/PlatformsConfigurationDrawer/components/MainPage/MainPage.js +155 -101
- package/PlatformsConfigurationDrawer/components/MobilePage/MobilePage.js +138 -91
- package/ResendModal/ResendModal.d.ts +1 -2
- package/ResendModal/ResendModal.js +92 -72
- package/RichMessageEditorSmart/NewDynamicContentForm.js +16 -12
- package/RichMessageEditorSmart/RichMessageEditorSmart.js +4 -4
- package/SystemParcel/SystemParcel.d.ts +3 -3
- package/SystemParcel/SystemParcel.js +3 -2
- package/Table/components/DataTable/DataTable.js +80 -61
- package/Table/components/DataTableGetContext/DataTableGetContext.d.ts +1 -2
- package/Table/components/DataTableGetContext/DataTableGetContext.js +5 -2
- package/Table/components/DataTableList/DataTableList.d.ts +1 -2
- package/Table/components/DataTableList/DataTableList.js +86 -68
- package/Table/components/DataTablePagination/DataTablePagination.js +6 -4
- package/Table/components/DataTableSearchInput/DataTableSearchInput.js +3 -2
- package/Table/components/DataTableSortableCell/DataTableSortableCell.js +6 -4
- package/Table/components/Loading/Loading.d.ts +1 -2
- package/Table/components/Loading/Loading.js +16 -14
- package/Table/components/TablePagination/TablePagination.js +31 -25
- package/_devel/index.js +36 -24
- package/_devel/lib/dynamic-content-picker.d.ts +1 -2
- package/_devel/lib/dynamic-content-picker.js +16 -10
- package/_devel/lib/index.d.ts +2 -2
- package/_devel/lib/index.js +38 -19
- package/_devel/test-place.d.ts +1 -2
- package/_devel/test-place.js +4 -2
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FieldBox, NativeInput, Select } from '@pushwoosh/dumb-components';
|
|
3
3
|
import { Vertical } from '@pushwoosh/kit-helpers';
|
|
4
4
|
import { useLang } from './polyglot';
|
|
@@ -12,60 +12,63 @@ export const DynamicContentEventPickerForm = ({
|
|
|
12
12
|
name: '',
|
|
13
13
|
attributes: []
|
|
14
14
|
};
|
|
15
|
-
return
|
|
16
|
-
"$gap": 16
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
15
|
+
return _jsxs(Vertical, {
|
|
16
|
+
"$gap": 16,
|
|
17
|
+
children: [_jsx(Select, {
|
|
18
|
+
value: {
|
|
19
|
+
value: dc.eventName,
|
|
20
|
+
label: dc.eventName
|
|
21
|
+
},
|
|
22
|
+
onChange: option => {
|
|
23
|
+
onChange({
|
|
24
|
+
eventName: option.value,
|
|
25
|
+
attribute: '',
|
|
26
|
+
defaultValue: ''
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
options: events.map(event => ({
|
|
30
|
+
value: event.name,
|
|
31
|
+
label: event.name
|
|
32
|
+
})),
|
|
33
|
+
placeholder: lang({
|
|
34
|
+
message: 'SMART.DYNAMIC_CONTENT_PICKER_FORM.EVENT.PLACEHOLDER'
|
|
35
|
+
})
|
|
36
|
+
}), _jsx(FieldBox, {
|
|
37
|
+
title: lang({
|
|
38
|
+
message: 'SMART.DYNAMIC_CONTENT_PICKER_FORM.FIELD.ATTRIBUTE'
|
|
39
|
+
}),
|
|
40
|
+
children: _jsx(Select, {
|
|
41
|
+
value: {
|
|
42
|
+
value: dc.attribute,
|
|
43
|
+
label: dc.attribute
|
|
44
|
+
},
|
|
45
|
+
onChange: option => {
|
|
46
|
+
onChange({
|
|
47
|
+
...dc,
|
|
48
|
+
attribute: option.value
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
options: currentEvent.attributes.map(attr => ({
|
|
52
|
+
value: attr.name,
|
|
53
|
+
label: attr.name
|
|
54
|
+
})),
|
|
55
|
+
isDisabled: !currentEvent.name
|
|
56
|
+
})
|
|
57
|
+
}), _jsx(FieldBox, {
|
|
58
|
+
title: lang({
|
|
59
|
+
message: 'SMART.DYNAMIC_CONTENT_PICKER_FORM.FIELD.FALLBACK_TEXT'
|
|
60
|
+
}),
|
|
61
|
+
isOptional: true,
|
|
62
|
+
children: _jsx(NativeInput, {
|
|
63
|
+
value: dc.defaultValue,
|
|
64
|
+
onChange: e => {
|
|
65
|
+
onChange({
|
|
66
|
+
...dc,
|
|
67
|
+
defaultValue: e.target.value
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
disabled: !currentEvent.name
|
|
71
|
+
})
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
71
74
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FieldBox, NativeInput, Select } from '@pushwoosh/dumb-components';
|
|
3
3
|
import { Vertical } from '@pushwoosh/kit-helpers';
|
|
4
4
|
import { useLang } from './polyglot';
|
|
@@ -12,60 +12,63 @@ export const DynamicContentTagPickerForm = ({
|
|
|
12
12
|
name: '',
|
|
13
13
|
modifiers: ['regular']
|
|
14
14
|
};
|
|
15
|
-
return
|
|
16
|
-
"$gap": 16
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
15
|
+
return _jsxs(Vertical, {
|
|
16
|
+
"$gap": 16,
|
|
17
|
+
children: [_jsx(Select, {
|
|
18
|
+
value: {
|
|
19
|
+
value: dc.tagName,
|
|
20
|
+
label: dc.tagName
|
|
21
|
+
},
|
|
22
|
+
onChange: option => {
|
|
23
|
+
onChange({
|
|
24
|
+
tagName: option.value,
|
|
25
|
+
modifier: currentTag.modifiers[0],
|
|
26
|
+
defaultValue: ''
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
options: tags.map(tag => ({
|
|
30
|
+
value: tag.name,
|
|
31
|
+
label: tag.name
|
|
32
|
+
})),
|
|
33
|
+
placeholder: lang({
|
|
34
|
+
message: 'SMART.DYNAMIC_CONTENT_PICKER_FORM.TAG.PLACEHOLDER'
|
|
35
|
+
})
|
|
36
|
+
}), _jsx(FieldBox, {
|
|
37
|
+
title: lang({
|
|
38
|
+
message: 'SMART.DYNAMIC_CONTENT_PICKER_FORM.FIELD.MODIFIER'
|
|
39
|
+
}),
|
|
40
|
+
children: _jsx(Select, {
|
|
41
|
+
value: {
|
|
42
|
+
value: dc.modifier,
|
|
43
|
+
label: dc.modifier
|
|
44
|
+
},
|
|
45
|
+
onChange: option => {
|
|
46
|
+
onChange({
|
|
47
|
+
...dc,
|
|
48
|
+
modifier: option.value
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
options: currentTag.modifiers.map(modifier => ({
|
|
52
|
+
value: modifier,
|
|
53
|
+
label: modifier
|
|
54
|
+
})),
|
|
55
|
+
isDisabled: !currentTag.name
|
|
56
|
+
})
|
|
57
|
+
}), _jsx(FieldBox, {
|
|
58
|
+
title: lang({
|
|
59
|
+
message: 'SMART.DYNAMIC_CONTENT_PICKER_FORM.FIELD.FALLBACK_TEXT'
|
|
60
|
+
}),
|
|
61
|
+
isOptional: true,
|
|
62
|
+
children: _jsx(NativeInput, {
|
|
63
|
+
value: dc.defaultValue,
|
|
64
|
+
onChange: e => {
|
|
65
|
+
onChange({
|
|
66
|
+
...dc,
|
|
67
|
+
defaultValue: e.target.value
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
disabled: !currentTag.name
|
|
71
|
+
})
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
71
74
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from 'react';
|
|
2
3
|
import { FieldBox, NativeInput, Select, Spinner } from '@pushwoosh/dumb-components';
|
|
3
4
|
import { Horizontal, Vertical } from '@pushwoosh/kit-helpers';
|
|
4
5
|
import { useDynamicContentTags } from './hooks';
|
|
@@ -23,72 +24,80 @@ export const SimpleDynamicContentPickerFormSmart = ({
|
|
|
23
24
|
}
|
|
24
25
|
}, [asyncResult.loading, update]);
|
|
25
26
|
if (asyncResult.loading) {
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
return _jsx(SimpleTagPickerDiv, {
|
|
28
|
+
children: _jsx(Horizontal, {
|
|
29
|
+
"$placeItems": "center",
|
|
30
|
+
"$padding": 36,
|
|
31
|
+
children: _jsx(Spinner, {
|
|
32
|
+
size: "medium"
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
});
|
|
32
36
|
}
|
|
33
37
|
const tags = asyncResult.value || [];
|
|
34
38
|
const currentTag = tags.find(tag => tag.name === dc.tagName) || {
|
|
35
39
|
name: '',
|
|
36
40
|
modifiers: ['regular']
|
|
37
41
|
};
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
42
|
+
return _jsxs(SimpleTagPickerDiv, {
|
|
43
|
+
children: [_jsx(FieldBox, {
|
|
44
|
+
title: lang({
|
|
45
|
+
message: 'SMART.DYNAMIC_CONTENT_PICKER_FORM.FIELD.TAG'
|
|
46
|
+
}),
|
|
47
|
+
children: _jsxs(Vertical, {
|
|
48
|
+
"$gap": 8,
|
|
49
|
+
children: [_jsx(Select, {
|
|
50
|
+
width: "auto",
|
|
51
|
+
menuPlacement: "auto",
|
|
52
|
+
value: {
|
|
53
|
+
value: dc.tagName,
|
|
54
|
+
label: dc.tagName
|
|
55
|
+
},
|
|
56
|
+
onChange: option => {
|
|
57
|
+
onChange({
|
|
58
|
+
tagName: option.value,
|
|
59
|
+
modifier: currentTag.modifiers[0],
|
|
60
|
+
defaultValue: ''
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
options: tags.map(tag => ({
|
|
64
|
+
value: tag.name,
|
|
65
|
+
label: tag.name
|
|
66
|
+
}))
|
|
67
|
+
}), _jsx(Select, {
|
|
68
|
+
width: "auto",
|
|
69
|
+
menuPlacement: "auto",
|
|
70
|
+
value: {
|
|
71
|
+
value: dc.modifier,
|
|
72
|
+
label: dc.modifier
|
|
73
|
+
},
|
|
74
|
+
onChange: option => {
|
|
75
|
+
onChange({
|
|
76
|
+
...dc,
|
|
77
|
+
modifier: option.value
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
options: currentTag.modifiers.map(modifier => ({
|
|
81
|
+
value: modifier,
|
|
82
|
+
label: modifier
|
|
83
|
+
})),
|
|
84
|
+
isDisabled: !currentTag.name
|
|
85
|
+
})]
|
|
86
|
+
})
|
|
87
|
+
}), _jsx(FieldBox, {
|
|
88
|
+
title: lang({
|
|
89
|
+
message: 'SMART.DYNAMIC_CONTENT_PICKER_FORM.FIELD.DEFAULT_TAG_VALUE'
|
|
90
|
+
}),
|
|
91
|
+
children: _jsx(NativeInput, {
|
|
92
|
+
value: dc.defaultValue,
|
|
93
|
+
onChange: e => {
|
|
94
|
+
onChange({
|
|
95
|
+
...dc,
|
|
96
|
+
defaultValue: e.target.value
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
disabled: !currentTag.name
|
|
100
|
+
})
|
|
101
|
+
}), children]
|
|
102
|
+
});
|
|
94
103
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
2
3
|
import { Button, FieldBox, Select, Spinner } from '@pushwoosh/dumb-components';
|
|
3
4
|
import { Horizontal, Vertical } from '@pushwoosh/kit-helpers';
|
|
4
5
|
import { DynamicContentCustomPickerForm } from './DynamicContentCustomPickerForm';
|
|
@@ -47,79 +48,90 @@ export const VariedDynamicContentPickerFormSmart = ({
|
|
|
47
48
|
update();
|
|
48
49
|
}, [asyncResult.loading, update]);
|
|
49
50
|
if (asyncResult.loading) {
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
return _jsx(VariedTagPickerDiv, {
|
|
52
|
+
children: _jsx(Horizontal, {
|
|
53
|
+
"$placeItems": "center",
|
|
54
|
+
"$padding": 36,
|
|
55
|
+
children: _jsx(Spinner, {
|
|
56
|
+
size: "medium"
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
});
|
|
56
60
|
}
|
|
57
61
|
const isValidDc = vdc.kind === 'tag' && vdc.dc.tagName !== '' && vdc.dc.modifier !== '' || vdc.kind === 'event' && vdc.dc.eventName !== '' && vdc.dc.attribute !== '' || vdc.kind === 'customText' && vdc.dc.text !== '';
|
|
58
|
-
return
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
62
|
+
return _jsxs(VariedTagPickerDiv, {
|
|
63
|
+
children: [_jsxs(Vertical, {
|
|
64
|
+
"$gap": 8,
|
|
65
|
+
children: [_jsx(FieldBox, {
|
|
66
|
+
title: lang({
|
|
67
|
+
message: 'SMART.DYNAMIC_CONTENT_PICKER_FORM.FIELD.VARIABLE_TYPE'
|
|
68
|
+
}),
|
|
69
|
+
children: _jsx(Vertical, {
|
|
70
|
+
"$gap": 8,
|
|
71
|
+
children: _jsx(Select, {
|
|
72
|
+
width: "auto",
|
|
73
|
+
menuPlacement: "auto",
|
|
74
|
+
value: {
|
|
75
|
+
value: vdc.kind,
|
|
76
|
+
label: (_kindsOptions$find = kindsOptions.find(o => o.value === vdc.kind)) === null || _kindsOptions$find === void 0 ? void 0 : _kindsOptions$find.label
|
|
77
|
+
},
|
|
78
|
+
onChange: option => {
|
|
79
|
+
const newDc = createDefaultDynamicContent(option.value);
|
|
80
|
+
setVdc(newDc);
|
|
81
|
+
update();
|
|
82
|
+
},
|
|
83
|
+
options: kindsOptions
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
}), vdc.kind === 'tag' && _jsx(DynamicContentTagPickerForm, {
|
|
87
|
+
dc: vdc.dc,
|
|
88
|
+
tags: asyncResult.value[0],
|
|
89
|
+
onChange: newDc => {
|
|
90
|
+
setVdc({
|
|
91
|
+
...vdc,
|
|
92
|
+
dc: newDc
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}), vdc.kind === 'event' && _jsx(DynamicContentEventPickerForm, {
|
|
96
|
+
dc: vdc.dc,
|
|
97
|
+
events: asyncResult.value[1],
|
|
98
|
+
onChange: newDc => {
|
|
99
|
+
setVdc({
|
|
100
|
+
...vdc,
|
|
101
|
+
dc: newDc
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}), vdc.kind === 'customText' && _jsx(DynamicContentCustomPickerForm, {
|
|
105
|
+
dc: vdc.dc,
|
|
106
|
+
onChange: newDc => {
|
|
107
|
+
setVdc({
|
|
108
|
+
...vdc,
|
|
109
|
+
dc: newDc
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
})]
|
|
113
|
+
}), _jsxs(Horizontal, {
|
|
114
|
+
"$justifyContent": "end",
|
|
115
|
+
"$gap": 8,
|
|
116
|
+
children: [_jsx(Button, {
|
|
117
|
+
color: "secondary",
|
|
118
|
+
size: "compact",
|
|
119
|
+
onClick: onClose,
|
|
120
|
+
children: lang({
|
|
121
|
+
message: 'SMART.DYNAMIC_CONTENT_PICKER_FORM.BUTTON.CANCEL'
|
|
122
|
+
})
|
|
123
|
+
}), _jsx(Button, {
|
|
124
|
+
color: "primary",
|
|
125
|
+
size: "compact",
|
|
126
|
+
onClick: () => {
|
|
127
|
+
onChange(vdc);
|
|
128
|
+
onClose();
|
|
129
|
+
},
|
|
130
|
+
isDisabled: !isValidDc,
|
|
131
|
+
children: lang({
|
|
132
|
+
message: 'SMART.DYNAMIC_CONTENT_PICKER_FORM.BUTTON.APPLY'
|
|
133
|
+
})
|
|
134
|
+
})]
|
|
135
|
+
})]
|
|
136
|
+
});
|
|
125
137
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { EmailTemplatePreview as DumbPreview, RectangularSkeleton } from '@pushwoosh/dumb-components';
|
|
3
3
|
import { useAsync } from '@pushwoosh/kit-helpers';
|
|
4
4
|
import { useSPAContext } from '@pushwoosh/spa-context';
|
|
@@ -33,17 +33,19 @@ export const EmailTemplatePreview = ({
|
|
|
33
33
|
};
|
|
34
34
|
}, [code]);
|
|
35
35
|
if (res.loading) {
|
|
36
|
-
return
|
|
36
|
+
return _jsx(RectangularSkeleton, {
|
|
37
37
|
width: width || '100%',
|
|
38
38
|
height: height || '100%'
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
if (res.error) {
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
return _jsx("div", {
|
|
43
|
+
children: lang({
|
|
44
|
+
message: 'SMART.EMAIL_TEMPLATE_PREVIEW.NO_PREVIEW'
|
|
45
|
+
})
|
|
46
|
+
});
|
|
45
47
|
}
|
|
46
|
-
return
|
|
48
|
+
return _jsx(DumbPreview, {
|
|
47
49
|
template: res.value.template,
|
|
48
50
|
localization: res.value.localization,
|
|
49
51
|
values: res.value.values,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type TaskInfo_args, type GetLastTasksRequest, type Status } from '@pushwoosh/rpc-v2-http-api-data/pushwoosh_export_messages_v2';
|
|
3
2
|
export type ExportTask = {
|
|
4
3
|
id: number;
|
|
@@ -16,5 +15,5 @@ type ExportCsvBannerProps = {
|
|
|
16
15
|
isKeepPageOpenWarning?: boolean;
|
|
17
16
|
onClose?: () => void;
|
|
18
17
|
};
|
|
19
|
-
export declare const ExportCsvBanner: ({ exportTask, updateExportTask, showLastExportLocalStorageKey, lastTasksParams, isKeepPageOpenWarning, onClose, }: ExportCsvBannerProps) =>
|
|
18
|
+
export declare const ExportCsvBanner: ({ exportTask, updateExportTask, showLastExportLocalStorageKey, lastTasksParams, isKeepPageOpenWarning, onClose, }: ExportCsvBannerProps) => import("react").JSX.Element | null;
|
|
20
19
|
export {};
|