@pushwoosh/smart-components-kit 1.0.89 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.d.ts +1 -2
  2. package/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.js +105 -56
  3. package/CampaignsConfigurationDrawer/components/Card/Card.d.ts +1 -2
  4. package/CampaignsConfigurationDrawer/components/Card/Card.js +19 -13
  5. package/CampaignsConfigurationDrawer/polyglot/index.d.ts +2 -0
  6. package/CampaignsConfigurationDrawer/polyglot/index.js +10 -0
  7. package/CampaignsConfigurationDrawer/polyglot/messages_en.d.ts +3 -0
  8. package/CampaignsConfigurationDrawer/polyglot/messages_en.js +18 -0
  9. package/CampaignsConfigurationDrawer/polyglot/messages_ru.d.ts +3 -0
  10. package/CampaignsConfigurationDrawer/polyglot/messages_ru.js +18 -0
  11. package/CampaignsConfigurationDrawer/polyglot/types.d.ts +19 -0
  12. package/CampaignsConfigurationDrawer/polyglot/types.js +1 -0
  13. package/DocsButton/DocsButton.d.ts +1 -2
  14. package/DocsButton/DocsButton.js +21 -18
  15. package/DynamicContentPicker/DynamicContentPicker.js +76 -63
  16. package/DynamicContentPicker/Line.js +24 -22
  17. package/DynamicContentPickerForm/DynamicContentCustomPickerForm.js +20 -15
  18. package/DynamicContentPickerForm/DynamicContentEventPickerForm.js +62 -51
  19. package/DynamicContentPickerForm/DynamicContentTagPickerForm.js +62 -51
  20. package/DynamicContentPickerForm/SimpleDynamicContentPickerFormSmart.js +74 -59
  21. package/DynamicContentPickerForm/VariedDynamicContentPickerFormSmart.js +104 -78
  22. package/DynamicContentPickerForm/polyglot/index.d.ts +2 -0
  23. package/DynamicContentPickerForm/polyglot/index.js +10 -0
  24. package/DynamicContentPickerForm/polyglot/messages_en.d.ts +3 -0
  25. package/DynamicContentPickerForm/polyglot/messages_en.js +16 -0
  26. package/DynamicContentPickerForm/polyglot/messages_ru.d.ts +3 -0
  27. package/DynamicContentPickerForm/polyglot/messages_ru.js +16 -0
  28. package/DynamicContentPickerForm/polyglot/types.d.ts +17 -0
  29. package/DynamicContentPickerForm/polyglot/types.js +1 -0
  30. package/EmailTemplatePreview/EmailTemplatePreview.js +10 -4
  31. package/EmailTemplatePreview/polyglot/index.d.ts +5 -0
  32. package/EmailTemplatePreview/polyglot/index.js +10 -0
  33. package/EmailTemplatePreview/polyglot/messages_en.d.ts +3 -0
  34. package/EmailTemplatePreview/polyglot/messages_en.js +3 -0
  35. package/EmailTemplatePreview/polyglot/messages_ru.d.ts +3 -0
  36. package/EmailTemplatePreview/polyglot/messages_ru.js +3 -0
  37. package/EmailTemplatePreview/polyglot/types.d.ts +4 -0
  38. package/EmailTemplatePreview/polyglot/types.js +1 -0
  39. package/ExportCSV/ExportCsvBanner/ExportCsvBanner.d.ts +1 -2
  40. package/ExportCSV/ExportCsvBanner/ExportCsvBanner.js +63 -42
  41. package/ExportCSV/polyglot/index.d.ts +2 -0
  42. package/ExportCSV/polyglot/index.js +10 -0
  43. package/ExportCSV/polyglot/messages_en.d.ts +3 -0
  44. package/ExportCSV/polyglot/messages_en.js +9 -0
  45. package/ExportCSV/polyglot/messages_ru.d.ts +3 -0
  46. package/ExportCSV/polyglot/messages_ru.js +9 -0
  47. package/ExportCSV/polyglot/types.d.ts +10 -0
  48. package/ExportCSV/polyglot/types.js +1 -0
  49. package/ExportCSV/useExportService/useExportService.js +1 -0
  50. package/LanguagesSelector/LanguagesModal.js +38 -24
  51. package/LanguagesSelector/LanguagesSelectForm.js +73 -62
  52. package/LanguagesSelector/LanguagesSelectFormLoader.js +8 -7
  53. package/LanguagesSelector/LanguagesSelector.js +92 -78
  54. package/MediaStore/CreateVariantDrawer.js +134 -85
  55. package/MediaStore/MediaStore.js +137 -112
  56. package/ModalCloningJourney/ModalCloningJourney.d.ts +1 -2
  57. package/ModalCloningJourney/ModalCloningJourney.js +113 -91
  58. package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.d.ts +1 -2
  59. package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.js +101 -37
  60. package/OpenActions/components/OpenActionsSummaryByPreset.d.ts +1 -2
  61. package/OpenActions/components/OpenActionsSummaryByPreset.js +2 -2
  62. package/OpenActions/polyglot/index.d.ts +2 -0
  63. package/OpenActions/polyglot/index.js +10 -0
  64. package/OpenActions/polyglot/messages_en.d.ts +3 -0
  65. package/OpenActions/polyglot/messages_en.js +14 -0
  66. package/OpenActions/polyglot/messages_ru.d.ts +3 -0
  67. package/OpenActions/polyglot/messages_ru.js +14 -0
  68. package/OpenActions/polyglot/types.d.ts +18 -0
  69. package/OpenActions/polyglot/types.js +1 -0
  70. package/PlatformsConfigurationDrawer/PlatformsConfigurationDrawer.js +21 -17
  71. package/PlatformsConfigurationDrawer/components/DesktopPage/DesktopPage.js +114 -57
  72. package/PlatformsConfigurationDrawer/components/MainPage/MainPage.js +157 -75
  73. package/PlatformsConfigurationDrawer/components/MobilePage/MobilePage.js +140 -69
  74. package/PlatformsConfigurationDrawer/polyglot/index.d.ts +2 -0
  75. package/PlatformsConfigurationDrawer/polyglot/index.js +10 -0
  76. package/PlatformsConfigurationDrawer/polyglot/messages_en.d.ts +3 -0
  77. package/PlatformsConfigurationDrawer/polyglot/messages_en.js +24 -0
  78. package/PlatformsConfigurationDrawer/polyglot/messages_ru.d.ts +3 -0
  79. package/PlatformsConfigurationDrawer/polyglot/messages_ru.js +24 -0
  80. package/PlatformsConfigurationDrawer/polyglot/types.d.ts +25 -0
  81. package/PlatformsConfigurationDrawer/polyglot/types.js +1 -0
  82. package/ResendModal/ResendModal.d.ts +1 -2
  83. package/ResendModal/ResendModal.js +95 -59
  84. package/ResendModal/polyglot/index.d.ts +2 -0
  85. package/ResendModal/polyglot/index.js +10 -0
  86. package/ResendModal/polyglot/messages_en.d.ts +3 -0
  87. package/ResendModal/polyglot/messages_en.js +9 -0
  88. package/ResendModal/polyglot/messages_ru.d.ts +3 -0
  89. package/ResendModal/polyglot/messages_ru.js +9 -0
  90. package/ResendModal/polyglot/types.d.ts +10 -0
  91. package/ResendModal/polyglot/types.js +1 -0
  92. package/RichMessageEditorSmart/NewDynamicContentForm.js +16 -12
  93. package/RichMessageEditorSmart/RichMessageEditorSmart.js +4 -4
  94. package/SystemParcel/SystemParcel.d.ts +3 -3
  95. package/SystemParcel/SystemParcel.js +3 -2
  96. package/Table/components/DataTable/DataTable.js +80 -61
  97. package/Table/components/DataTableGetContext/DataTableGetContext.d.ts +1 -2
  98. package/Table/components/DataTableGetContext/DataTableGetContext.js +5 -2
  99. package/Table/components/DataTableList/DataTableList.d.ts +1 -2
  100. package/Table/components/DataTableList/DataTableList.js +86 -68
  101. package/Table/components/DataTablePagination/DataTablePagination.js +6 -4
  102. package/Table/components/DataTableSearchInput/DataTableSearchInput.js +3 -2
  103. package/Table/components/DataTableSortableCell/DataTableSortableCell.js +6 -4
  104. package/Table/components/Loading/Loading.d.ts +1 -2
  105. package/Table/components/Loading/Loading.js +16 -14
  106. package/Table/components/TablePagination/TablePagination.js +31 -25
  107. package/_devel/index.js +36 -24
  108. package/_devel/lib/dynamic-content-picker.d.ts +1 -2
  109. package/_devel/lib/dynamic-content-picker.js +16 -10
  110. package/_devel/lib/index.d.ts +2 -2
  111. package/_devel/lib/index.js +38 -19
  112. package/_devel/test-place.d.ts +1 -2
  113. package/_devel/test-place.js +4 -2
  114. package/package.json +2 -2
@@ -1,4 +1,5 @@
1
- import React, { useContext } from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useContext } from 'react';
2
3
  import { FontSize, FontWeight } from '@pushwoosh/kit-constants';
3
4
  import { Horizontal, Vertical } from '@pushwoosh/kit-helpers';
4
5
  import Box from '../../assets/box.svg?url';
@@ -18,83 +19,100 @@ export function DataTableList({
18
19
  } = useContext(DataTableContext);
19
20
  const lang = useLang();
20
21
  if (data.loading) {
21
- return React.createElement(Loading, null);
22
+ return _jsx(Loading, {});
22
23
  }
23
24
  if ((_data$value = data.value) !== null && _data$value !== void 0 && (_data$value = _data$value.items) !== null && _data$value !== void 0 && _data$value.length) {
24
- return React.createElement(React.Fragment, null, data.value.items.map(renderItem));
25
+ return _jsx(_Fragment, {
26
+ children: data.value.items.map(renderItem)
27
+ });
25
28
  }
26
29
  if (!data.loading && data.error) {
27
- return React.createElement(Horizontal, {
30
+ return _jsx(Horizontal, {
28
31
  "$placeItems": "center",
29
- "$padding": 64
30
- }, React.createElement(Horizontal, {
31
- "$gap": 16
32
- }, React.createElement("img", {
33
- src: Error,
34
- alt: lang({
35
- message: 'SMART.TABLE.ERROR_IMG_ALT'
32
+ "$padding": 64,
33
+ children: _jsxs(Horizontal, {
34
+ "$gap": 16,
35
+ children: [_jsx("img", {
36
+ src: Error,
37
+ alt: lang({
38
+ message: 'SMART.TABLE.ERROR_IMG_ALT'
39
+ })
40
+ }), _jsxs(Vertical, {
41
+ "$alignContent": "center",
42
+ "$gap": 8,
43
+ children: [_jsx(LockedText, {
44
+ "$fontWeight": FontWeight.MEDIUM,
45
+ "$maxWidth": "250px",
46
+ children: lang({
47
+ message: 'SMART.TABLE.ERROR_TITLE'
48
+ })
49
+ }), _jsx(LockedText, {
50
+ "$fontSize": FontSize.SMALL,
51
+ "$maxWidth": "250px",
52
+ children: lang({
53
+ message: 'SMART.TABLE.ERROR_DESCRIPTION'
54
+ })
55
+ })]
56
+ })]
36
57
  })
37
- }), React.createElement(Vertical, {
38
- "$alignContent": "center",
39
- "$gap": 8
40
- }, React.createElement(LockedText, {
41
- "$fontWeight": FontWeight.MEDIUM,
42
- "$maxWidth": "250px"
43
- }, lang({
44
- message: 'SMART.TABLE.ERROR_TITLE'
45
- })), React.createElement(LockedText, {
46
- "$fontSize": FontSize.SMALL,
47
- "$maxWidth": "250px"
48
- }, lang({
49
- message: 'SMART.TABLE.ERROR_DESCRIPTION'
50
- })))));
58
+ });
51
59
  }
52
60
  const isFiltered = ((_data$value2 = data.value) === null || _data$value2 === void 0 ? void 0 : _data$value2.isFiltered) || params.search;
53
- return isFiltered ? React.createElement(Horizontal, {
61
+ return isFiltered ? _jsx(Horizontal, {
54
62
  "$placeItems": "center",
55
- "$padding": 64
56
- }, React.createElement(Horizontal, {
57
- "$gap": 16
58
- }, React.createElement("img", {
59
- src: NotFound,
60
- alt: lang({
61
- message: 'SMART.TABLE.NO_MATCH_IMG_ALT'
63
+ "$padding": 64,
64
+ children: _jsxs(Horizontal, {
65
+ "$gap": 16,
66
+ children: [_jsx("img", {
67
+ src: NotFound,
68
+ alt: lang({
69
+ message: 'SMART.TABLE.NO_MATCH_IMG_ALT'
70
+ })
71
+ }), _jsxs(Vertical, {
72
+ "$alignContent": "center",
73
+ "$gap": 8,
74
+ children: [_jsx(LockedText, {
75
+ "$fontWeight": FontWeight.MEDIUM,
76
+ "$maxWidth": "250px",
77
+ children: lang({
78
+ message: 'SMART.TABLE.NO_MATCH'
79
+ })
80
+ }), _jsx(LockedText, {
81
+ "$fontSize": FontSize.SMALL,
82
+ "$maxWidth": "250px",
83
+ children: lang({
84
+ message: 'SMART.TABLE.NO_MATCH_DESCRIPTION'
85
+ })
86
+ })]
87
+ })]
62
88
  })
63
- }), React.createElement(Vertical, {
64
- "$alignContent": "center",
65
- "$gap": 8
66
- }, React.createElement(LockedText, {
67
- "$fontWeight": FontWeight.MEDIUM,
68
- "$maxWidth": "250px"
69
- }, lang({
70
- message: 'SMART.TABLE.NO_MATCH'
71
- })), React.createElement(LockedText, {
72
- "$fontSize": FontSize.SMALL,
73
- "$maxWidth": "250px"
74
- }, lang({
75
- message: 'SMART.TABLE.NO_MATCH_DESCRIPTION'
76
- }))))) : React.createElement(Horizontal, {
89
+ }) : _jsx(Horizontal, {
77
90
  "$placeItems": "center",
78
- "$padding": 64
79
- }, React.createElement(Horizontal, {
80
- "$gap": 16
81
- }, React.createElement("img", {
82
- src: Box,
83
- alt: lang({
84
- message: 'SMART.TABLE.EMPTY_IMG_ALT'
91
+ "$padding": 64,
92
+ children: _jsxs(Horizontal, {
93
+ "$gap": 16,
94
+ children: [_jsx("img", {
95
+ src: Box,
96
+ alt: lang({
97
+ message: 'SMART.TABLE.EMPTY_IMG_ALT'
98
+ })
99
+ }), _jsxs(Vertical, {
100
+ "$alignContent": "center",
101
+ "$gap": 8,
102
+ children: [_jsx(LockedText, {
103
+ "$fontWeight": FontWeight.MEDIUM,
104
+ "$maxWidth": "250px",
105
+ children: lang({
106
+ message: 'SMART.TABLE.EMPTY_TITLE'
107
+ })
108
+ }), _jsx(LockedText, {
109
+ "$fontSize": FontSize.SMALL,
110
+ "$maxWidth": "250px",
111
+ children: lang({
112
+ message: 'SMART.TABLE.EMPTY_DESCRIPTION'
113
+ })
114
+ })]
115
+ })]
85
116
  })
86
- }), React.createElement(Vertical, {
87
- "$alignContent": "center",
88
- "$gap": 8
89
- }, React.createElement(LockedText, {
90
- "$fontWeight": FontWeight.MEDIUM,
91
- "$maxWidth": "250px"
92
- }, lang({
93
- message: 'SMART.TABLE.EMPTY_TITLE'
94
- })), React.createElement(LockedText, {
95
- "$fontSize": FontSize.SMALL,
96
- "$maxWidth": "250px"
97
- }, lang({
98
- message: 'SMART.TABLE.EMPTY_DESCRIPTION'
99
- })))));
117
+ });
100
118
  }
@@ -1,4 +1,5 @@
1
- import React, { useContext } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useContext } from 'react';
2
3
  import { DataTableContext } from '../../context';
3
4
  import { TablePagination } from '../TablePagination';
4
5
  export function DataTablePagination({
@@ -13,7 +14,7 @@ export function DataTablePagination({
13
14
  params,
14
15
  onChangeParams
15
16
  } = useContext(DataTableContext);
16
- return React.createElement(TablePagination, {
17
+ return _jsx(TablePagination, {
17
18
  activePage: params.page,
18
19
  totalPages: ((_data$value = data.value) === null || _data$value === void 0 ? void 0 : _data$value.totalPages) || 1,
19
20
  limit: params.perPage,
@@ -32,6 +33,7 @@ export function DataTablePagination({
32
33
  perPage
33
34
  });
34
35
  },
35
- hidePageSizeSelector: hidePageSizeSelector
36
- }, children);
36
+ hidePageSizeSelector: hidePageSizeSelector,
37
+ children: children
38
+ });
37
39
  }
@@ -1,4 +1,5 @@
1
- import React, { useRef, useState, useEffect, useContext } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useRef, useState, useEffect, useContext } from 'react';
2
3
  import { SearchInput } from '@pushwoosh/dumb-components';
3
4
  import { DataTableContext } from '../../context';
4
5
  export function DataTableSearchInput(props) {
@@ -10,7 +11,7 @@ export function DataTableSearchInput(props) {
10
11
  setInputValue(context.params.search);
11
12
  }
12
13
  }, [context.params.search]); // eslint-disable-line react-hooks/exhaustive-deps
13
- return React.createElement(SearchInput, {
14
+ return _jsx(SearchInput, {
14
15
  ...props,
15
16
  value: inputValue,
16
17
  "$onClear": () => {
@@ -1,4 +1,5 @@
1
- import React, { useContext } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useContext } from 'react';
2
3
  import { SortButton } from '@pushwoosh/dumb-components';
3
4
  import { DataTableContext } from '../../context';
4
5
  export function DataTableSortableCell(props) {
@@ -10,7 +11,7 @@ export function DataTableSortableCell(props) {
10
11
  params,
11
12
  onChangeParams
12
13
  } = useContext(DataTableContext);
13
- return React.createElement(SortButton, {
14
+ return _jsx(SortButton, {
14
15
  name: name,
15
16
  order: params.order === name ? params.direction : null,
16
17
  onClick: sortParams => {
@@ -20,6 +21,7 @@ export function DataTableSortableCell(props) {
20
21
  direction: sortParams.order || 'asc',
21
22
  page: 1
22
23
  });
23
- }
24
- }, children);
24
+ },
25
+ children: children
26
+ });
25
27
  }
@@ -1,2 +1 @@
1
- import React from 'react';
2
- export declare const Loading: () => React.JSX.Element;
1
+ export declare const Loading: () => import("react").JSX.Element;
@@ -1,20 +1,22 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { TextSkeleton } from '@pushwoosh/dumb-components';
3
3
  import { Horizontal } from '@pushwoosh/kit-helpers';
4
4
  import { Wrapper } from './styles';
5
5
  const Row = ({
6
6
  width
7
- }) => React.createElement(Horizontal, {
7
+ }) => _jsx(Horizontal, {
8
8
  "$alignItems": "center",
9
- "$padding": "0 24px"
10
- }, React.createElement(TextSkeleton, {
11
- width: width
12
- }));
13
- export const Loading = () => React.createElement(Wrapper, null, Array.from({
14
- length: 4
15
- }).map((_, index) =>
16
- // eslint-disable-next-line react/no-array-index-key
17
- React.createElement(Row, {
18
- key: index,
19
- width: `${index % 2 ? 35 : 50}%`
20
- })));
9
+ "$padding": "0 24px",
10
+ children: _jsx(TextSkeleton, {
11
+ width: width
12
+ })
13
+ });
14
+ export const Loading = () => _jsx(Wrapper, {
15
+ children: Array.from({
16
+ length: 4
17
+ }).map((_, index) =>
18
+ // eslint-disable-next-line react/no-array-index-key
19
+ _jsx(Row, {
20
+ width: `${index % 2 ? 35 : 50}%`
21
+ }, index))
22
+ });
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { NativeSelect, Pagination } from '@pushwoosh/dumb-components';
3
3
  import { Horizontal } from '@pushwoosh/kit-helpers';
4
4
  import { useLang } from '../../polyglot';
@@ -14,30 +14,36 @@ export function TablePagination({
14
14
  children
15
15
  }) {
16
16
  const lang = useLang();
17
- return React.createElement(Horizontal, {
17
+ return _jsxs(Horizontal, {
18
18
  "$alignItems": "center",
19
19
  "$justifyContent": "space-between",
20
- "$padding": padding
21
- }, React.createElement(Horizontal, {
22
- "$gap": 8,
23
- "$alignItems": "center"
24
- }, totalPages > 1 && React.createElement(Pagination, {
25
- activePage: activePage,
26
- totalPages: totalPages,
27
- onChangePage: onChangePage
28
- }), children), !hidePageSizeSelector && React.createElement(Horizontal, {
29
- "$gap": 8,
30
- "$alignItems": "center"
31
- }, React.createElement("span", null, lang({
32
- message: 'SMART.TABLE.SHOW_ON_PAGE'
33
- })), React.createElement(NativeSelect, {
34
- name: "page",
35
- value: limit,
36
- onChange: event => {
37
- onChangeLimit(Number(event.target.value));
38
- }
39
- }, allLimits.map(option => React.createElement("option", {
40
- key: option,
41
- value: option
42
- }, option)))));
20
+ "$padding": padding,
21
+ children: [_jsxs(Horizontal, {
22
+ "$gap": 8,
23
+ "$alignItems": "center",
24
+ children: [totalPages > 1 && _jsx(Pagination, {
25
+ activePage: activePage,
26
+ totalPages: totalPages,
27
+ onChangePage: onChangePage
28
+ }), children]
29
+ }), !hidePageSizeSelector && _jsxs(Horizontal, {
30
+ "$gap": 8,
31
+ "$alignItems": "center",
32
+ children: [_jsx("span", {
33
+ children: lang({
34
+ message: 'SMART.TABLE.SHOW_ON_PAGE'
35
+ })
36
+ }), _jsx(NativeSelect, {
37
+ name: "page",
38
+ value: limit,
39
+ onChange: event => {
40
+ onChangeLimit(Number(event.target.value));
41
+ },
42
+ children: allLimits.map(option => _jsx("option", {
43
+ value: option,
44
+ children: option
45
+ }, option))
46
+ })]
47
+ })]
48
+ });
43
49
  }
package/_devel/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { createRoot } from 'react-dom/client';
3
3
  import { Router, Route, Switch, Link } from 'react-router-dom';
4
4
  import { SPAContextProvider } from '@pushwoosh/spa-context';
@@ -8,29 +8,41 @@ export function parcel(container) {
8
8
  const root = createRoot(container);
9
9
  return {
10
10
  render(props) {
11
- root.render(React.createElement(Router, {
12
- history: props.spaContext.history
13
- }, React.createElement(SPAContextProvider, {
14
- value: props.spaContext
15
- }, React.createElement(Switch, null, React.createElement(Route, {
16
- path: "/:url",
17
- exact: true,
18
- render: ({
19
- match
20
- }) => {
21
- return React.createElement("ul", null, React.createElement("li", null, React.createElement(Link, {
22
- to: `${match.url}/test`
23
- }, "Test your new component")), React.createElement("li", null, React.createElement(Link, {
24
- to: `${match.url}/lib`
25
- }, "Components lib")));
26
- }
27
- }), React.createElement(Route, {
28
- path: "/:url/test",
29
- component: TestPlace
30
- }), React.createElement(Route, {
31
- path: "/:url/lib",
32
- component: Lib
33
- })))));
11
+ root.render(_jsx(Router, {
12
+ history: props.spaContext.history,
13
+ children: _jsx(SPAContextProvider, {
14
+ value: props.spaContext,
15
+ children: _jsxs(Switch, {
16
+ children: [_jsx(Route, {
17
+ path: "/:url",
18
+ exact: true,
19
+ render: ({
20
+ match
21
+ }) => {
22
+ return _jsxs("ul", {
23
+ children: [_jsx("li", {
24
+ children: _jsx(Link, {
25
+ to: `${match.url}/test`,
26
+ children: "Test your new component"
27
+ })
28
+ }), _jsx("li", {
29
+ children: _jsx(Link, {
30
+ to: `${match.url}/lib`,
31
+ children: "Components lib"
32
+ })
33
+ })]
34
+ });
35
+ }
36
+ }), _jsx(Route, {
37
+ path: "/:url/test",
38
+ component: TestPlace
39
+ }), _jsx(Route, {
40
+ path: "/:url/lib",
41
+ component: Lib
42
+ })]
43
+ })
44
+ })
45
+ }));
34
46
  },
35
47
  unmount() {
36
48
  root.unmount();
@@ -1,2 +1 @@
1
- import React from 'react';
2
- export declare function DynamicContentPickerExample(): React.JSX.Element;
1
+ export declare function DynamicContentPickerExample(): import("react").JSX.Element;
@@ -1,17 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  /* eslint-disable no-console */
2
- import React, { useState } from 'react';
3
+ import { useState } from 'react';
3
4
  import { Button } from '@pushwoosh/dumb-components';
4
5
  import { Horizontal } from '@pushwoosh/kit-helpers';
5
6
  import { SimpleDynamicContentPickerFormSmart } from '../../DynamicContentPickerForm';
6
7
  export function DynamicContentPickerExample() {
7
8
  const [dc, setDc] = useState();
8
- return React.createElement("div", null, React.createElement(SimpleDynamicContentPickerFormSmart, {
9
- dc: dc,
10
- onChange: setDc
11
- }, React.createElement(Horizontal, {
12
- "$justifyContent": "end"
13
- }, React.createElement(Button, {
14
- color: "primary",
15
- onClick: () => console.log(dc)
16
- }, "Log to console"))));
9
+ return _jsx("div", {
10
+ children: _jsx(SimpleDynamicContentPickerFormSmart, {
11
+ dc: dc,
12
+ onChange: setDc,
13
+ children: _jsx(Horizontal, {
14
+ "$justifyContent": "end",
15
+ children: _jsx(Button, {
16
+ color: "primary",
17
+ onClick: () => console.log(dc),
18
+ children: "Log to console"
19
+ })
20
+ })
21
+ })
22
+ });
17
23
  }
@@ -1,8 +1,8 @@
1
- import React from 'react';
1
+ import { type FC } from 'react';
2
2
  import { type RouteComponentProps } from 'react-router-dom';
3
3
  interface MatchParams {
4
4
  path: string;
5
5
  url: string;
6
6
  }
7
- export declare const Lib: React.FC<RouteComponentProps<MatchParams>>;
7
+ export declare const Lib: FC<RouteComponentProps<MatchParams>>;
8
8
  export {};
@@ -1,29 +1,48 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Route, Switch, Link } from 'react-router-dom';
3
3
  import { Columns } from '@pushwoosh/kit-helpers';
4
4
  import { DynamicContentPickerExample } from './dynamic-content-picker';
5
5
  function Example() {
6
- return React.createElement("div", null, React.createElement("h3", null, "component example"));
6
+ return _jsx("div", {
7
+ children: _jsx("h3", {
8
+ children: "component example"
9
+ })
10
+ });
7
11
  }
8
12
  export const Lib = ({
9
13
  match
10
14
  }) => {
11
- return React.createElement(Columns, {
15
+ return _jsxs(Columns, {
12
16
  "$gap": 12,
13
- "$sizes": "200px 780px"
14
- }, React.createElement("ul", null, React.createElement("li", null, React.createElement(Link, {
15
- to: `${match.url}/dynamic-content-picker`
16
- }, "Dynamic content picker")), React.createElement("li", null, React.createElement(Link, {
17
- to: `${match.url}/example`
18
- }, "Child 2"))), React.createElement("div", null, React.createElement(Switch, null, React.createElement(Route, {
19
- path: `${match.path}/dynamic-content-picker`,
20
- component: DynamicContentPickerExample
21
- }), React.createElement(Route, {
22
- path: `${match.path}/example`,
23
- component: Example
24
- }), React.createElement(Route, {
25
- path: match.path,
26
- exact: true,
27
- render: () => React.createElement("div", null, "Please select a child route.")
28
- }))));
17
+ "$sizes": "200px 780px",
18
+ children: [_jsxs("ul", {
19
+ children: [_jsx("li", {
20
+ children: _jsx(Link, {
21
+ to: `${match.url}/dynamic-content-picker`,
22
+ children: "Dynamic content picker"
23
+ })
24
+ }), _jsx("li", {
25
+ children: _jsx(Link, {
26
+ to: `${match.url}/example`,
27
+ children: "Child 2"
28
+ })
29
+ })]
30
+ }), _jsx("div", {
31
+ children: _jsxs(Switch, {
32
+ children: [_jsx(Route, {
33
+ path: `${match.path}/dynamic-content-picker`,
34
+ component: DynamicContentPickerExample
35
+ }), _jsx(Route, {
36
+ path: `${match.path}/example`,
37
+ component: Example
38
+ }), _jsx(Route, {
39
+ path: match.path,
40
+ exact: true,
41
+ render: () => _jsx("div", {
42
+ children: "Please select a child route."
43
+ })
44
+ })]
45
+ })
46
+ })]
47
+ });
29
48
  };
@@ -1,2 +1 @@
1
- import React from 'react';
2
- export declare function TestPlace(): React.JSX.Element;
1
+ export declare function TestPlace(): import("react").JSX.Element;
@@ -1,6 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  // PLEASE, DON'T COMMIT THIS FILE
2
3
  // I is for testing components, you can add your component here to test it
3
- import React from 'react';
4
4
  export function TestPlace() {
5
- return React.createElement("div", null, "add your component to test please, don't commit this file");
5
+ return _jsx("div", {
6
+ children: "add your component to test please, don't commit this file"
7
+ });
6
8
  }
package/package.json CHANGED
@@ -33,7 +33,7 @@
33
33
  "react-router-dom": "^5.3.4"
34
34
  },
35
35
  "devDependencies": {
36
- "@pushwoosh/frontend-builder-engine": "^1.0.21",
36
+ "@pushwoosh/frontend-builder-engine": "^2.1.0",
37
37
  "@svgr/webpack": "^8.1.0",
38
38
  "@types/react": "^18.3.5",
39
39
  "@types/react-dom": "^18.3.0",
@@ -49,5 +49,5 @@
49
49
  "react": "^16.14.0 || ^18.0.0",
50
50
  "react-dom": "^16.14.0 || ^18.0.0"
51
51
  },
52
- "version": "1.0.89"
52
+ "version": "1.1.0"
53
53
  }