@pushwoosh/smart-components-kit 1.0.90 → 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 (58) hide show
  1. package/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.d.ts +1 -2
  2. package/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.js +103 -88
  3. package/CampaignsConfigurationDrawer/components/Card/Card.d.ts +1 -2
  4. package/CampaignsConfigurationDrawer/components/Card/Card.js +19 -13
  5. package/DocsButton/DocsButton.d.ts +1 -2
  6. package/DocsButton/DocsButton.js +21 -18
  7. package/DynamicContentPicker/DynamicContentPicker.js +76 -63
  8. package/DynamicContentPicker/Line.js +24 -22
  9. package/DynamicContentPickerForm/DynamicContentCustomPickerForm.js +18 -17
  10. package/DynamicContentPickerForm/DynamicContentEventPickerForm.js +60 -57
  11. package/DynamicContentPickerForm/DynamicContentTagPickerForm.js +60 -57
  12. package/DynamicContentPickerForm/SimpleDynamicContentPickerFormSmart.js +72 -63
  13. package/DynamicContentPickerForm/VariedDynamicContentPickerFormSmart.js +86 -74
  14. package/EmailTemplatePreview/EmailTemplatePreview.js +8 -6
  15. package/ExportCSV/ExportCsvBanner/ExportCsvBanner.d.ts +1 -2
  16. package/ExportCSV/ExportCsvBanner/ExportCsvBanner.js +54 -49
  17. package/ExportCSV/useExportService/useExportService.js +1 -0
  18. package/LanguagesSelector/LanguagesModal.js +38 -24
  19. package/LanguagesSelector/LanguagesSelectForm.js +73 -62
  20. package/LanguagesSelector/LanguagesSelectFormLoader.js +8 -7
  21. package/LanguagesSelector/LanguagesSelector.js +92 -78
  22. package/MediaStore/CreateVariantDrawer.js +134 -85
  23. package/MediaStore/MediaStore.js +137 -112
  24. package/ModalCloningJourney/ModalCloningJourney.d.ts +1 -2
  25. package/ModalCloningJourney/ModalCloningJourney.js +113 -91
  26. package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.d.ts +1 -2
  27. package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.js +98 -78
  28. package/OpenActions/components/OpenActionsSummaryByPreset.d.ts +1 -2
  29. package/OpenActions/components/OpenActionsSummaryByPreset.js +2 -2
  30. package/PlatformsConfigurationDrawer/PlatformsConfigurationDrawer.js +21 -17
  31. package/PlatformsConfigurationDrawer/components/DesktopPage/DesktopPage.js +112 -75
  32. package/PlatformsConfigurationDrawer/components/MainPage/MainPage.js +155 -101
  33. package/PlatformsConfigurationDrawer/components/MobilePage/MobilePage.js +138 -91
  34. package/ResendModal/ResendModal.d.ts +1 -2
  35. package/ResendModal/ResendModal.js +92 -72
  36. package/RichMessageEditorSmart/NewDynamicContentForm.js +16 -12
  37. package/RichMessageEditorSmart/RichMessageEditorSmart.js +4 -4
  38. package/SystemParcel/SystemParcel.d.ts +3 -3
  39. package/SystemParcel/SystemParcel.js +3 -2
  40. package/Table/components/DataTable/DataTable.js +80 -61
  41. package/Table/components/DataTableGetContext/DataTableGetContext.d.ts +1 -2
  42. package/Table/components/DataTableGetContext/DataTableGetContext.js +5 -2
  43. package/Table/components/DataTableList/DataTableList.d.ts +1 -2
  44. package/Table/components/DataTableList/DataTableList.js +86 -68
  45. package/Table/components/DataTablePagination/DataTablePagination.js +6 -4
  46. package/Table/components/DataTableSearchInput/DataTableSearchInput.js +3 -2
  47. package/Table/components/DataTableSortableCell/DataTableSortableCell.js +6 -4
  48. package/Table/components/Loading/Loading.d.ts +1 -2
  49. package/Table/components/Loading/Loading.js +16 -14
  50. package/Table/components/TablePagination/TablePagination.js +31 -25
  51. package/_devel/index.js +36 -24
  52. package/_devel/lib/dynamic-content-picker.d.ts +1 -2
  53. package/_devel/lib/dynamic-content-picker.js +16 -10
  54. package/_devel/lib/index.d.ts +2 -2
  55. package/_devel/lib/index.js +38 -19
  56. package/_devel/test-place.d.ts +1 -2
  57. package/_devel/test-place.js +4 -2
  58. package/package.json +2 -2
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
1
  import { type CampaignsConfigurationDrawerProps } from './types';
3
- export declare function CampaignsConfigurationDrawer(props: CampaignsConfigurationDrawerProps): React.JSX.Element;
2
+ export declare function CampaignsConfigurationDrawer(props: CampaignsConfigurationDrawerProps): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Drawer, DrawerBody, DrawerHeader } from '@pushwoosh/dumb-components';
3
3
  import { Columns, Horizontal, Vertical } from '@pushwoosh/kit-helpers';
4
4
  import { CloseIcon, EmailIcon, MobileIcon, PushIcon, SmsIcon, WhatsappIcon } from '@pushwoosh/kit-icons';
@@ -15,93 +15,108 @@ export function CampaignsConfigurationDrawer(props) {
15
15
  onClose
16
16
  } = props;
17
17
  const lang = useLang();
18
- return React.createElement(Drawer, {
18
+ return _jsxs(Drawer, {
19
19
  size: "medium",
20
20
  isOpen: isOpen,
21
- onClose: onClose
22
- }, React.createElement(DrawerHeader, null, React.createElement(Horizontal, {
23
- "$justifyContent": "space-between",
24
- "$alignItems": "center",
25
- "$margin": "0 0 4px"
26
- }, React.createElement(H1, null, lang({
27
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.HEADING'
28
- })), React.createElement(CloseButtonWrap, {
29
- onClick: onClose
30
- }, React.createElement(CloseIcon, {
31
- size: "medium"
32
- })))), React.createElement(DrawerBody, null, React.createElement(Vertical, {
33
- "$gap": "32px"
34
- }, React.createElement(Horizontal, {
35
- "$gap": "6px"
36
- }, React.createElement(Card, {
37
- title: lang({
38
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_PUSH.TITLE'
39
- }),
40
- description: lang({
41
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_PUSH.DESC'
42
- }),
43
- icon: PushIcon,
44
- href: `/applications/${applicationCode}/one-time-messages/send?type=push&segment=${segmentCode}`
45
- }), React.createElement(Card, {
46
- title: lang({
47
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_EMAIL.TITLE'
48
- }),
49
- description: lang({
50
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_EMAIL.DESC'
51
- }),
52
- icon: EmailIcon,
53
- href: `/applications/${applicationCode}/one-time-messages/send?type=email&segment=${segmentCode}`
54
- })), React.createElement(Vertical, {
55
- "$gap": "8px"
56
- }, React.createElement(H3, null, lang({
57
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.ADVANCED_HEADING'
58
- })), React.createElement(Columns, {
59
- "$sizes": "1fr 1fr",
60
- "$gap": "6px"
61
- }, React.createElement(Card, {
62
- title: lang({
63
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.PUSH.TITLE'
64
- }),
65
- description: lang({
66
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.PUSH.DESC'
67
- }),
68
- icon: PushIcon,
69
- href: `/journeys/${applicationCode}/create?channel=push&segment=${segmentCode}&segment_title=${segmentTitle}`
70
- }), React.createElement(Card, {
71
- title: lang({
72
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.EMAIL.TITLE'
73
- }),
74
- description: lang({
75
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.EMAIL.DESC'
76
- }),
77
- icon: EmailIcon,
78
- href: `/journeys/${applicationCode}/create?channel=email&segment=${segmentCode}&segment_title=${segmentTitle}`
79
- }), React.createElement(Card, {
80
- title: lang({
81
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.INAPP.TITLE'
82
- }),
83
- description: lang({
84
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.INAPP.DESC'
85
- }),
86
- icon: MobileIcon,
87
- href: `/journeys/${applicationCode}/create?channel=inapp&segment=${segmentCode}&segment_title=${segmentTitle}`
88
- }), React.createElement(Card, {
89
- title: lang({
90
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.SMS.TITLE'
91
- }),
92
- description: lang({
93
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.SMS.DESC'
94
- }),
95
- icon: SmsIcon,
96
- href: `/journeys/${applicationCode}/create?channel=sms&segment=${segmentCode}&segment_title=${segmentTitle}`
97
- }), React.createElement(Card, {
98
- title: lang({
99
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.WHATSAPP.TITLE'
100
- }),
101
- description: lang({
102
- message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.WHATSAPP.DESC'
103
- }),
104
- icon: WhatsappIcon,
105
- href: `/journeys/${applicationCode}/create?channel=whatsapp&segment=${segmentCode}&segment_title=${segmentTitle}`
106
- }))))));
21
+ onClose: onClose,
22
+ children: [_jsx(DrawerHeader, {
23
+ children: _jsxs(Horizontal, {
24
+ "$justifyContent": "space-between",
25
+ "$alignItems": "center",
26
+ "$margin": "0 0 4px",
27
+ children: [_jsx(H1, {
28
+ children: lang({
29
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.HEADING'
30
+ })
31
+ }), _jsx(CloseButtonWrap, {
32
+ onClick: onClose,
33
+ children: _jsx(CloseIcon, {
34
+ size: "medium"
35
+ })
36
+ })]
37
+ })
38
+ }), _jsx(DrawerBody, {
39
+ children: _jsxs(Vertical, {
40
+ "$gap": "32px",
41
+ children: [_jsxs(Horizontal, {
42
+ "$gap": "6px",
43
+ children: [_jsx(Card, {
44
+ title: lang({
45
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_PUSH.TITLE'
46
+ }),
47
+ description: lang({
48
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_PUSH.DESC'
49
+ }),
50
+ icon: PushIcon,
51
+ href: `/applications/${applicationCode}/one-time-messages/send?type=push&segment=${segmentCode}`
52
+ }), _jsx(Card, {
53
+ title: lang({
54
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_EMAIL.TITLE'
55
+ }),
56
+ description: lang({
57
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_EMAIL.DESC'
58
+ }),
59
+ icon: EmailIcon,
60
+ href: `/applications/${applicationCode}/one-time-messages/send?type=email&segment=${segmentCode}`
61
+ })]
62
+ }), _jsxs(Vertical, {
63
+ "$gap": "8px",
64
+ children: [_jsx(H3, {
65
+ children: lang({
66
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.ADVANCED_HEADING'
67
+ })
68
+ }), _jsxs(Columns, {
69
+ "$sizes": "1fr 1fr",
70
+ "$gap": "6px",
71
+ children: [_jsx(Card, {
72
+ title: lang({
73
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.PUSH.TITLE'
74
+ }),
75
+ description: lang({
76
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.PUSH.DESC'
77
+ }),
78
+ icon: PushIcon,
79
+ href: `/journeys/${applicationCode}/create?channel=push&segment=${segmentCode}&segment_title=${segmentTitle}`
80
+ }), _jsx(Card, {
81
+ title: lang({
82
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.EMAIL.TITLE'
83
+ }),
84
+ description: lang({
85
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.EMAIL.DESC'
86
+ }),
87
+ icon: EmailIcon,
88
+ href: `/journeys/${applicationCode}/create?channel=email&segment=${segmentCode}&segment_title=${segmentTitle}`
89
+ }), _jsx(Card, {
90
+ title: lang({
91
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.INAPP.TITLE'
92
+ }),
93
+ description: lang({
94
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.INAPP.DESC'
95
+ }),
96
+ icon: MobileIcon,
97
+ href: `/journeys/${applicationCode}/create?channel=inapp&segment=${segmentCode}&segment_title=${segmentTitle}`
98
+ }), _jsx(Card, {
99
+ title: lang({
100
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.SMS.TITLE'
101
+ }),
102
+ description: lang({
103
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.SMS.DESC'
104
+ }),
105
+ icon: SmsIcon,
106
+ href: `/journeys/${applicationCode}/create?channel=sms&segment=${segmentCode}&segment_title=${segmentTitle}`
107
+ }), _jsx(Card, {
108
+ title: lang({
109
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.WHATSAPP.TITLE'
110
+ }),
111
+ description: lang({
112
+ message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.WHATSAPP.DESC'
113
+ }),
114
+ icon: WhatsappIcon,
115
+ href: `/journeys/${applicationCode}/create?channel=whatsapp&segment=${segmentCode}&segment_title=${segmentTitle}`
116
+ })]
117
+ })]
118
+ })]
119
+ })
120
+ })]
121
+ });
107
122
  }
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
1
  import { type CardProps } from './types';
3
- export declare function Card(props: CardProps): React.JSX.Element;
2
+ export declare function Card(props: CardProps): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Color } from '@pushwoosh/kit-constants';
3
3
  import { Text } from '@pushwoosh/kit-typography';
4
4
  import { Container, IconWrap, Title } from './styled';
@@ -9,16 +9,22 @@ export function Card(props) {
9
9
  icon: Icon,
10
10
  href
11
11
  } = props;
12
- return React.createElement(Container, {
13
- href: href
14
- }, React.createElement(IconWrap, null, React.createElement(Icon, {
15
- color: Color.PRIMARY,
16
- size: "medium",
17
- view: "lined",
18
- type: "mobile",
19
- direction: "right"
20
- })), React.createElement(Title, null, title), React.createElement(Text, {
21
- "$variant": "footnote",
22
- "$color": Color.LOCKED
23
- }, description));
12
+ return _jsxs(Container, {
13
+ href: href,
14
+ children: [_jsx(IconWrap, {
15
+ children: _jsx(Icon, {
16
+ color: Color.PRIMARY,
17
+ size: "medium",
18
+ view: "lined",
19
+ type: "mobile",
20
+ direction: "right"
21
+ })
22
+ }), _jsx(Title, {
23
+ children: title
24
+ }), _jsx(Text, {
25
+ "$variant": "footnote",
26
+ "$color": Color.LOCKED,
27
+ children: description
28
+ })]
29
+ });
24
30
  }
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
1
  import type { DocsButtonProps } from './types';
3
- export declare function DocsButton(props: DocsButtonProps): React.JSX.Element | null;
2
+ export declare function DocsButton(props: DocsButtonProps): import("react").JSX.Element | null;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, DrawerDocs, useDocs } from '@pushwoosh/dumb-components';
3
3
  import { DocsIcon } from '@pushwoosh/kit-icons';
4
4
  import { useDocsButtonUrl } from './hooks';
@@ -29,21 +29,24 @@ export function DocsButton(props) {
29
29
  }
30
30
  openDocsDrawer();
31
31
  };
32
- return React.createElement(React.Fragment, null, React.createElement(Button, {
33
- "aria-label": lang({
34
- message: 'SMART.DOCS_BUTTON.ARIA_LABEL'
35
- }),
36
- color: color,
37
- view: view,
38
- size: size,
39
- icon: React.createElement(DocsIcon, {
40
- size: "medium",
41
- view: "lined"
42
- }),
43
- onClick: handleClick
44
- }, children), !openInNewWindow && React.createElement(DrawerDocs, {
45
- url: url,
46
- isOpen: docsOpen,
47
- onClose: closeDocsDrawer
48
- }));
32
+ return _jsxs(_Fragment, {
33
+ children: [_jsx(Button, {
34
+ "aria-label": lang({
35
+ message: 'SMART.DOCS_BUTTON.ARIA_LABEL'
36
+ }),
37
+ color: color,
38
+ view: view,
39
+ size: size,
40
+ icon: _jsx(DocsIcon, {
41
+ size: "medium",
42
+ view: "lined"
43
+ }),
44
+ onClick: handleClick,
45
+ children: children
46
+ }), !openInNewWindow && _jsx(DrawerDocs, {
47
+ url: url,
48
+ isOpen: docsOpen,
49
+ onClose: closeDocsDrawer
50
+ })]
51
+ });
49
52
  }
@@ -1,5 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
2
  import { arrow, autoPlacement, offset, useFloating } from '@floating-ui/react-dom';
2
- import React, { useEffect, useMemo, useReducer, useRef, useState } from 'react';
3
+ import { useEffect, useMemo, useReducer, useRef, useState } from 'react';
3
4
  import { Color } from '@pushwoosh/kit-constants';
4
5
  import { elementAddListener, Horizontal, usePersistentFunction } from '@pushwoosh/kit-helpers';
5
6
  import { WarningRoundIcon } from '@pushwoosh/kit-icons';
@@ -79,66 +80,78 @@ export const DynamicContentPicker = ({
79
80
  }
80
81
  });
81
82
  }, [clickAwayHandler, activeVar, refs.reference, refs.floating]);
82
- return React.createElement(React.Fragment, null, React.createElement(FieldPlace, {
83
- ref: refs.setReference
84
- }, React.createElement(Horizontal, {
85
- "$padding": "8px 16px",
86
- "$justifyContent": "space-between"
87
- }, React.createElement(Horizontal, {
88
- "$alignItems": "center",
89
- "$gap": 8
90
- }, icon && icon, React.createElement(Text, {
91
- "$variant": "h4"
92
- }, title)), error && React.createElement(Horizontal, {
93
- "$alignItems": "center",
94
- "$gap": 8
95
- }, React.createElement(WarningRoundIcon, {
96
- size: "small",
97
- view: "lined",
98
- color: Color.WARNING
99
- }), React.createElement(Text, {
100
- "$variant": "footnote",
101
- "$color": Color.WARNING
102
- }, error)), !error && hintText && React.createElement(Text, {
103
- "$variant": "footnote",
104
- "$color": Color.LOCKED
105
- }, hintText)), React.createElement(Horizontal, {
106
- "$padding": "12px 16px"
107
- }, React.createElement(TextPlace, null, parsedLines.map((line, index) => React.createElement(Line, {
108
- key: index /* eslint-disable-line react/no-array-index-key */,
109
- activeVar: activeVar,
110
- line: line,
111
- state: state,
112
- onClickVar: setActiveVar
113
- }))))), !!activeVar && React.createElement("div", {
114
- ref: refs.setFloating,
115
- style: floatingStyles
116
- }, renderDynamicContent ? renderDynamicContent({
117
- activeVar,
118
- onChange: newDC => dispatch({
119
- type: 'set',
120
- key: activeVar,
121
- value: newDC
122
- }),
123
- onClose,
124
- update
125
- }) : React.createElement(VariedDynamicContentPickerFormSmart, {
126
- key: activeVar,
127
- applicationCode: applicationCode,
128
- initialDc: state[activeVar],
129
- onChange: newDc => dispatch({
130
- type: 'set',
131
- key: activeVar,
132
- value: newDc
133
- }),
134
- onClose: () => setActiveVar(undefined),
135
- update: update
136
- }), React.createElement(Arrow, {
137
- "$direction": placementToDirection(placement),
138
- ref: arrowRef,
139
- style: {
140
- left: (_middlewareData$arrow = middlewareData.arrow) === null || _middlewareData$arrow === void 0 ? void 0 : _middlewareData$arrow.x,
141
- top: (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y
142
- }
143
- }, React.createElement(ArrowIcon, null))));
83
+ return _jsxs(_Fragment, {
84
+ children: [_jsxs(FieldPlace, {
85
+ ref: refs.setReference,
86
+ children: [_jsxs(Horizontal, {
87
+ "$padding": "8px 16px",
88
+ "$justifyContent": "space-between",
89
+ children: [_jsxs(Horizontal, {
90
+ "$alignItems": "center",
91
+ "$gap": 8,
92
+ children: [icon && icon, _jsx(Text, {
93
+ "$variant": "h4",
94
+ children: title
95
+ })]
96
+ }), error && _jsxs(Horizontal, {
97
+ "$alignItems": "center",
98
+ "$gap": 8,
99
+ children: [_jsx(WarningRoundIcon, {
100
+ size: "small",
101
+ view: "lined",
102
+ color: Color.WARNING
103
+ }), _jsx(Text, {
104
+ "$variant": "footnote",
105
+ "$color": Color.WARNING,
106
+ children: error
107
+ })]
108
+ }), !error && hintText && _jsx(Text, {
109
+ "$variant": "footnote",
110
+ "$color": Color.LOCKED,
111
+ children: hintText
112
+ })]
113
+ }), _jsx(Horizontal, {
114
+ "$padding": "12px 16px",
115
+ children: _jsx(TextPlace, {
116
+ children: parsedLines.map((line, index) => _jsx(Line, {
117
+ activeVar: activeVar,
118
+ line: line,
119
+ state: state,
120
+ onClickVar: setActiveVar
121
+ }, index /* eslint-disable-line react/no-array-index-key */))
122
+ })
123
+ })]
124
+ }), !!activeVar && _jsxs("div", {
125
+ ref: refs.setFloating,
126
+ style: floatingStyles,
127
+ children: [renderDynamicContent ? renderDynamicContent({
128
+ activeVar,
129
+ onChange: newDC => dispatch({
130
+ type: 'set',
131
+ key: activeVar,
132
+ value: newDC
133
+ }),
134
+ onClose,
135
+ update
136
+ }) : _jsx(VariedDynamicContentPickerFormSmart, {
137
+ applicationCode: applicationCode,
138
+ initialDc: state[activeVar],
139
+ onChange: newDc => dispatch({
140
+ type: 'set',
141
+ key: activeVar,
142
+ value: newDc
143
+ }),
144
+ onClose: () => setActiveVar(undefined),
145
+ update: update
146
+ }, activeVar), _jsx(Arrow, {
147
+ "$direction": placementToDirection(placement),
148
+ ref: arrowRef,
149
+ style: {
150
+ left: (_middlewareData$arrow = middlewareData.arrow) === null || _middlewareData$arrow === void 0 ? void 0 : _middlewareData$arrow.x,
151
+ top: (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y
152
+ },
153
+ children: _jsx(ArrowIcon, {})
154
+ })]
155
+ })]
156
+ });
144
157
  };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Chip } from '@pushwoosh/dumb-components';
3
3
  import { WarningRoundIcon } from '@pushwoosh/kit-icons';
4
4
  import { dc2text } from './helpers';
@@ -8,26 +8,28 @@ export const Line = ({
8
8
  state,
9
9
  onClickVar
10
10
  }) => {
11
- return React.createElement("p", null, line.map((item, index) => {
12
- if (typeof item === 'string') {
13
- // eslint-disable-next-line react/no-array-index-key
14
- return React.createElement("span", {
15
- key: index
16
- }, item);
17
- }
18
- return React.createElement(Chip, {
19
- key: index /* eslint-disable-line react/no-array-index-key */,
20
- as: "span",
21
- "$variant": state[item.varname] ? 'primary' : 'warning',
22
- "$selected": activeVar === item.varname,
23
- onClick: () => {
24
- onClickVar(item.varname);
11
+ return _jsx("p", {
12
+ children: line.map((item, index) => {
13
+ if (typeof item === 'string') {
14
+ // eslint-disable-next-line react/no-array-index-key
15
+ return _jsx("span", {
16
+ children: item
17
+ }, index);
25
18
  }
26
- }, state[item.varname] ? dc2text(state[item.varname]) : React.createElement(WarningRoundIcon, {
27
- size: "small",
28
- view: "lined",
29
- as: "span",
30
- onClick: () => onClickVar(item.varname)
31
- }));
32
- }));
19
+ return _jsx(Chip, {
20
+ as: "span",
21
+ "$variant": state[item.varname] ? 'primary' : 'warning',
22
+ "$selected": activeVar === item.varname,
23
+ onClick: () => {
24
+ onClickVar(item.varname);
25
+ },
26
+ children: state[item.varname] ? dc2text(state[item.varname]) : _jsx(WarningRoundIcon, {
27
+ size: "small",
28
+ view: "lined",
29
+ as: "span",
30
+ onClick: () => onClickVar(item.varname)
31
+ })
32
+ }, index /* eslint-disable-line react/no-array-index-key */);
33
+ })
34
+ });
33
35
  };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { NativeTextarea } from '@pushwoosh/dumb-components';
3
3
  import { Vertical } from '@pushwoosh/kit-helpers';
4
4
  import { useLang } from './polyglot';
@@ -7,20 +7,21 @@ export const DynamicContentCustomPickerForm = ({
7
7
  onChange
8
8
  }) => {
9
9
  const lang = useLang();
10
- return React.createElement(Vertical, {
11
- "$gap": 16
12
- }, React.createElement(NativeTextarea, {
13
- value: dc.text,
14
- onChange: e => {
15
- onChange({
16
- text: e.target.value
17
- });
18
- },
19
- placeholder: lang({
20
- message: 'SMART.DYNAMIC_CONTENT_PICKER_FORM.CUSTOM.PLACEHOLDER'
21
- }),
22
- style: {
23
- minHeight: 200
24
- }
25
- }));
10
+ return _jsx(Vertical, {
11
+ "$gap": 16,
12
+ children: _jsx(NativeTextarea, {
13
+ value: dc.text,
14
+ onChange: e => {
15
+ onChange({
16
+ text: e.target.value
17
+ });
18
+ },
19
+ placeholder: lang({
20
+ message: 'SMART.DYNAMIC_CONTENT_PICKER_FORM.CUSTOM.PLACEHOLDER'
21
+ }),
22
+ style: {
23
+ minHeight: 200
24
+ }
25
+ })
26
+ });
26
27
  };