@pushwoosh/dumb-components 1.1.134 → 1.1.136
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/AccessForbidden/AccessForbidden.js +19 -5
- package/AccessForbidden/polyglot/index.d.ts +2 -0
- package/AccessForbidden/polyglot/index.js +10 -0
- package/AccessForbidden/polyglot/messages_en.d.ts +3 -0
- package/AccessForbidden/polyglot/messages_en.js +4 -0
- package/AccessForbidden/polyglot/messages_ru.d.ts +3 -0
- package/AccessForbidden/polyglot/messages_ru.js +4 -0
- package/AccessForbidden/polyglot/types.d.ts +5 -0
- package/AccessForbidden/polyglot/types.js +1 -0
- package/Alert/Alert.d.ts +1 -2
- package/Alert/Alert.js +31 -25
- package/ApplicationPreloader/ApplicationPreloader.d.ts +1 -2
- package/ApplicationPreloader/ApplicationPreloader.js +5 -4
- package/Badge/Badge.js +2 -2
- package/Banner/Banner.js +40 -24
- package/Button/Button.js +20 -9
- package/Button/RemoveButton.js +7 -6
- package/Calendar/CalendarDropdown/CalendarDropdown.js +121 -108
- package/Calendar/CalendarMonth/CalendarMonth.js +68 -66
- package/Calendar/CalendarMonthSlider/CalendarMonthSlider.d.ts +2 -2
- package/Calendar/CalendarMonthSlider/CalendarMonthSlider.js +68 -55
- package/Calendar/CalendarSuperForm/CalendarSuperForm.js +75 -70
- package/Calendar/CalendarSuperForm/components/CalendarRangePicker/CalendarRangePicker.d.ts +2 -2
- package/Calendar/CalendarSuperForm/components/CalendarRangePicker/CalendarRangePicker.js +3 -2
- package/Calendar/CalendarSuperForm/components/CalendarTimeAndTimezoneSection/CalendarTimeAndTimezoneSection.js +106 -88
- package/Calendar/CalendarSuperForm/components/CalendarTimeInput.d.ts +1 -2
- package/Calendar/CalendarSuperForm/components/CalendarTimeInput.js +2 -2
- package/Calendar/CalendarSuperForm/components/CalendarTimezoneSelect.js +3 -2
- package/CardMetric/CardChildren.js +9 -6
- package/CardMetric/CardCollapse.js +8 -6
- package/CardMetric/CardMetric.js +52 -33
- package/Checkbox/Checkbox.js +30 -24
- package/Chip/Chip.d.ts +6 -7
- package/Chip/Chip.js +22 -15
- package/CodeEditor/CodeEditor.d.ts +1 -2
- package/CodeEditor/CodeEditor.js +2 -2
- package/CrashScreen/CrashScreen.js +19 -6
- package/CrashScreen/polyglot/index.d.ts +2 -0
- package/CrashScreen/polyglot/index.js +10 -0
- package/CrashScreen/polyglot/messages_en.d.ts +3 -0
- package/CrashScreen/polyglot/messages_en.js +4 -0
- package/CrashScreen/polyglot/messages_ru.d.ts +3 -0
- package/CrashScreen/polyglot/messages_ru.js +4 -0
- package/CrashScreen/polyglot/types.d.ts +5 -0
- package/CrashScreen/polyglot/types.js +1 -0
- package/DateTimePicker/components/AutosizeInput/AutosizeInput.js +17 -13
- package/DateTimePicker/components/DatePicker/DatePicker.js +35 -32
- package/DateTimePicker/components/DatePickerField/DatePickerField.js +32 -22
- package/DateTimePicker/components/DateTimePicker/DateTimePicker.js +22 -20
- package/DateTimePicker/components/DateTimePickerField/DateTimePickerField.js +30 -22
- package/DateTimePicker/components/DecadeView/DecadeView.js +19 -17
- package/DateTimePicker/components/Input/Input.js +2 -2
- package/DateTimePicker/components/Month/Month.js +52 -21
- package/DateTimePicker/components/MonthView/MonthView.js +21 -17
- package/DateTimePicker/components/NumberPicker/NumberPicker.js +49 -40
- package/DateTimePicker/components/PickerPlate/PickerPlate.js +17 -14
- package/DateTimePicker/components/YearView/YearView.js +22 -18
- package/DateTimePicker/polyglot/index.d.ts +2 -0
- package/DateTimePicker/polyglot/index.js +9 -0
- package/DateTimePicker/polyglot/messages_en.d.ts +3 -0
- package/DateTimePicker/polyglot/messages_en.js +11 -0
- package/DateTimePicker/polyglot/messages_ru.d.ts +3 -0
- package/DateTimePicker/polyglot/messages_ru.js +11 -0
- package/DateTimePicker/polyglot/types.d.ts +12 -0
- package/DateTimePicker/polyglot/types.js +1 -0
- package/Drawer/components/Drawer/Drawer.js +18 -13
- package/Drawer/components/Drawer/styles.d.ts +2 -2
- package/Drawer/components/Drawer/styles.js +5 -4
- package/Drawer/components/DrawerDocs/DrawerDocs.js +28 -17
- package/Drawer/polyglot/index.d.ts +2 -0
- package/Drawer/polyglot/index.js +10 -0
- package/Drawer/polyglot/messages_en.d.ts +3 -0
- package/Drawer/polyglot/messages_en.js +4 -0
- package/Drawer/polyglot/messages_ru.d.ts +3 -0
- package/Drawer/polyglot/messages_ru.js +4 -0
- package/Drawer/polyglot/types.d.ts +5 -0
- package/Drawer/polyglot/types.js +1 -0
- package/DropdownMenu/components/DropdownMenu/DropdownMenu.js +28 -24
- package/DropdownMenu/components/DropdownMenuButton/DropdownMenuButton.js +8 -6
- package/DropdownMenu/components/DropdownMenuItem/DropdownMenuItem.js +6 -4
- package/DropdownMenu/components/DropdownMenuSection/DropdownMenuSection.js +13 -10
- package/DropdownMenu/components/DropdownMenuSubmenu/DropdownMenuSubmenu.js +40 -31
- package/EditableField/EditableField.js +56 -39
- package/EditableField/polyglot/index.d.ts +2 -0
- package/EditableField/polyglot/index.js +9 -0
- package/EditableField/polyglot/messages_en.d.ts +3 -0
- package/EditableField/polyglot/messages_en.js +4 -0
- package/EditableField/polyglot/messages_ru.d.ts +3 -0
- package/EditableField/polyglot/messages_ru.js +4 -0
- package/EditableField/polyglot/types.d.ts +5 -0
- package/EditableField/polyglot/types.js +1 -0
- package/EmailTemplatePreview/EmailTemplatePreview.js +10 -8
- package/EmailTemplatePreview/components/NoEmailTemplatePreview/NoEmailTemplatePreview.js +30 -16
- package/EmailTemplatePreview/polyglot/index.d.ts +2 -0
- package/EmailTemplatePreview/polyglot/index.js +10 -0
- package/EmailTemplatePreview/polyglot/messages_en.d.ts +3 -0
- package/EmailTemplatePreview/polyglot/messages_en.js +5 -0
- package/EmailTemplatePreview/polyglot/messages_ru.d.ts +3 -0
- package/EmailTemplatePreview/polyglot/messages_ru.js +5 -0
- package/EmailTemplatePreview/polyglot/types.d.ts +6 -0
- package/EmailTemplatePreview/polyglot/types.js +1 -0
- package/EnhancedInput/EnhancedInput.d.ts +3 -4
- package/EnhancedInput/EnhancedInput.js +14 -10
- package/EnhancedInput/SearchInput.js +3 -3
- package/ExportResult/ExportResult.js +33 -23
- package/ExternalImagePreview/ExternalImagePreview.js +24 -20
- package/FieldBox/FieldBox.js +50 -37
- package/FrequencyCapping/FrequencyCappingEdit.js +41 -33
- package/FrequencyCapping/FrequencyCappingInApps.js +41 -33
- package/FrequencyCapping/FrequencyCappingReadonly.d.ts +1 -2
- package/FrequencyCapping/FrequencyCappingReadonly.js +24 -20
- package/FrequencyCapping/components/Condition/index.d.ts +1 -2
- package/FrequencyCapping/components/Condition/index.js +24 -20
- package/FrequencyCapping/components/Description/index.d.ts +2 -2
- package/FrequencyCapping/components/Description/index.js +7 -5
- package/FrequencyCapping/components/Settings/EditCappingSettings.js +28 -20
- package/FrequencyCapping/components/Settings/EditInAppCappingSettings.js +86 -71
- package/FrequencyCapping/helpers/getReadonlyCappingHelpers.d.ts +1 -2
- package/FrequencyCapping/helpers/getReadonlyCappingHelpers.js +41 -32
- package/GetStartedPage/GetStartedPage.js +44 -25
- package/InputFile/InputFile.js +44 -35
- package/Link/Link.js +2 -2
- package/Modal/components/Modal/Modal.js +17 -12
- package/Modal/components/Modal/styles.js +5 -4
- package/Modal/components/ModalConfirm/ModalConfirm.js +51 -24
- package/Modal/components/ModalConfirm/ModalConfirmProvider.d.ts +2 -2
- package/Modal/components/ModalConfirm/ModalConfirmProvider.js +8 -6
- package/Modal/components/ModalConfirm/types.d.ts +1 -1
- package/Modal/components/ModalTitle/ModalTitle.js +10 -8
- package/Modal/polyglot/index.d.ts +2 -0
- package/Modal/polyglot/index.js +9 -0
- package/Modal/polyglot/messages_en.d.ts +3 -0
- package/Modal/polyglot/messages_en.js +6 -0
- package/Modal/polyglot/messages_ru.d.ts +3 -0
- package/Modal/polyglot/messages_ru.js +6 -0
- package/Modal/polyglot/types.d.ts +7 -0
- package/Modal/polyglot/types.js +1 -0
- package/NotificationInbox/NotificationBar.js +19 -11
- package/NotificationInbox/NotificationBell.js +21 -12
- package/NotificationInbox/NotificationInbox.js +160 -105
- package/NotificationInbox/polyglot/index.d.ts +2 -0
- package/NotificationInbox/polyglot/index.js +10 -0
- package/NotificationInbox/polyglot/messages_en.d.ts +3 -0
- package/NotificationInbox/polyglot/messages_en.js +8 -0
- package/NotificationInbox/polyglot/messages_ru.d.ts +3 -0
- package/NotificationInbox/polyglot/messages_ru.js +8 -0
- package/NotificationInbox/polyglot/types.d.ts +11 -0
- package/NotificationInbox/polyglot/types.js +1 -0
- package/NumberPicker/NumberPicker.js +53 -44
- package/NumberPicker/components/AutosizeInput/AutosizeInput.js +19 -15
- package/PageHeader/components/AutosizeInput/AutosizeInput.js +30 -22
- package/PageHeader/components/PageHeader/PageHeader.js +44 -27
- package/PageHeader/components/PageHeaderEditable/PageHeaderEditable.js +51 -34
- package/PageHeader/components/PageHeaderError/PageHeaderError.js +17 -10
- package/PageHeader/components/PageHeaderSkeleton/PageHeaderSkeleton.js +20 -16
- package/Pagination/Pagination.js +60 -49
- package/Popover/Popover.js +6 -5
- package/ProgressBar/ProgressBar.js +25 -10
- package/PushPreview/PushPreview.js +30 -22
- package/PushPreview/components/MissedContentPreview/MissedContentPreview.js +23 -11
- package/PushPreview/components/SilentPushPreview/SilentPushPreview.js +20 -13
- package/PushPreview/polyglot/index.d.ts +2 -0
- package/PushPreview/polyglot/index.js +9 -0
- package/PushPreview/polyglot/messages_en.d.ts +3 -0
- package/PushPreview/polyglot/messages_en.js +4 -0
- package/PushPreview/polyglot/messages_ru.d.ts +3 -0
- package/PushPreview/polyglot/messages_ru.js +4 -0
- package/PushPreview/polyglot/types.d.ts +5 -0
- package/PushPreview/polyglot/types.js +1 -0
- package/Radio/Radio.js +32 -26
- package/RadioCard/RadioCard.js +17 -9
- package/ReCaptcha/ReCaptcha.js +2 -2
- package/RichMessageEditor/EditorEmojiPicker.js +9 -7
- package/RichMessageEditor/RichMessageEditor.js +77 -67
- package/RichMessageEditor/RichMessageViewer.js +19 -13
- package/RichMessageEditor/slate/DynamicContentElement.d.ts +1 -2
- package/RichMessageEditor/slate/DynamicContentElement.js +13 -9
- package/RichMessageEditor/slate/SlateEditor.js +9 -7
- package/RichmediaPreview/RichmediaPreview.js +13 -11
- package/Select/Select.js +10 -8
- package/SendRate/SendRateEdit.d.ts +1 -2
- package/SendRate/SendRateEdit.js +42 -34
- package/SendRate/SendRateReadonly.d.ts +1 -2
- package/SendRate/SendRateReadonly.js +24 -20
- package/SendRate/components/Condition/index.d.ts +1 -2
- package/SendRate/components/Condition/index.js +15 -13
- package/SendRate/components/Description/index.d.ts +2 -2
- package/SendRate/components/Description/index.js +30 -22
- package/SendRate/components/Settings/index.d.ts +1 -2
- package/SendRate/components/Settings/index.js +20 -14
- package/SendRate/helpers/getReadonlySendRateHelpers.d.ts +1 -2
- package/SendRate/helpers/getReadonlySendRateHelpers.js +39 -30
- package/Skeleton/TextSkeleton.js +5 -4
- package/SortButton/SortButton.js +11 -7
- package/Spinner/Spinner.js +7 -4
- package/StatisticCard/StatisticCard.js +44 -29
- package/Switch/Switch.js +16 -13
- package/Tabs/components/Tab/Tab.d.ts +3 -4
- package/Tabs/components/Tab/Tab.js +6 -4
- package/Tabs/components/TabBar/TabBar.d.ts +3 -4
- package/Tabs/components/TabBar/TabBar.js +12 -4
- package/Tabs/components/TabBarScrollableFrame/TabBarScrollableFrame.d.ts +1 -2
- package/Tabs/components/TabBarScrollableFrame/TabBarScrollableFrame.js +27 -21
- package/Tabs/components/TabBase/TabBase.d.ts +3 -4
- package/Tabs/components/TabBase/TabBase.js +11 -6
- package/Tabs/components/TabPanel/TabPanel.js +4 -2
- package/Tabs/components/Tabs/Tabs.js +8 -4
- package/Toast/Toast.js +31 -18
- package/Toast/ToastProvider.d.ts +2 -3
- package/Toast/ToastProvider.js +10 -8
- package/Tooltip/Tooltip.js +2 -2
- package/Tooltip/TooltipTrigger.js +13 -11
- package/package.json +2 -2
- package/polyglot/__tests__/render.test.js +46 -16
- package/polyglot/liquid/render.d.ts +2 -2
- package/polyglot/liquid/render.js +7 -6
- package/polyglot/react.js +7 -5
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from 'react';
|
|
2
3
|
import { Color } from '@pushwoosh/kit-constants';
|
|
3
4
|
import { Vertical } from '@pushwoosh/kit-helpers';
|
|
4
5
|
import { DropdownIcon, EditIcon } from '@pushwoosh/kit-icons';
|
|
5
6
|
import { Button } from '../Button';
|
|
6
7
|
import { useOnClickOutside } from '../hooks';
|
|
7
8
|
import { Popover, PopoverContainer } from '../Popover';
|
|
9
|
+
import { Lang } from './polyglot';
|
|
8
10
|
import { FieldBox, TitleBox, ButtonsGroup } from './styles';
|
|
9
11
|
export function EditableField({
|
|
10
12
|
value,
|
|
@@ -22,42 +24,57 @@ export function EditableField({
|
|
|
22
24
|
const rootRef = useRef(null);
|
|
23
25
|
const buttonRef = useRef(null);
|
|
24
26
|
useOnClickOutside(rootRef, onCancel);
|
|
25
|
-
return
|
|
26
|
-
ref: rootRef
|
|
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
|
-
|
|
27
|
+
return _jsxs(PopoverContainer, {
|
|
28
|
+
ref: rootRef,
|
|
29
|
+
children: [_jsxs(FieldBox, {
|
|
30
|
+
open: open,
|
|
31
|
+
onClick: onToggleOpen,
|
|
32
|
+
ref: buttonRef,
|
|
33
|
+
children: [_jsx("span", {
|
|
34
|
+
children: value
|
|
35
|
+
}), open ? _jsx(DropdownIcon, {
|
|
36
|
+
direction: "up",
|
|
37
|
+
size: "small",
|
|
38
|
+
color: Color.CLEAR
|
|
39
|
+
}) : _jsx(EditIcon, {
|
|
40
|
+
view: "lined",
|
|
41
|
+
size: "small"
|
|
42
|
+
})]
|
|
43
|
+
}), _jsx(Popover, {
|
|
44
|
+
open: open,
|
|
45
|
+
position: position,
|
|
46
|
+
anchorEl: buttonRef,
|
|
47
|
+
windowWidth: width,
|
|
48
|
+
internalWindowRef: rootRef,
|
|
49
|
+
loading: loading,
|
|
50
|
+
zIndex: zIndex,
|
|
51
|
+
children: _jsxs(Vertical, {
|
|
52
|
+
"$padding": 16,
|
|
53
|
+
children: [title && _jsx(TitleBox, {
|
|
54
|
+
children: title
|
|
55
|
+
}), children, _jsxs(ButtonsGroup, {
|
|
56
|
+
"$isLoading": loading,
|
|
57
|
+
children: [_jsx(Button, {
|
|
58
|
+
view: "shape",
|
|
59
|
+
color: "primary",
|
|
60
|
+
size: "compact",
|
|
61
|
+
isLoading: loading,
|
|
62
|
+
onClick: onSubmit,
|
|
63
|
+
children: _jsx(Lang, {
|
|
64
|
+
message: "DUMB.EDITABLE_FIELD.SUBMIT"
|
|
65
|
+
})
|
|
66
|
+
}), _jsx(Button, {
|
|
67
|
+
view: "shape",
|
|
68
|
+
color: "secondary",
|
|
69
|
+
size: "compact",
|
|
70
|
+
isDisabled: loading,
|
|
71
|
+
onClick: onCancel,
|
|
72
|
+
children: _jsx(Lang, {
|
|
73
|
+
message: "DUMB.EDITABLE_FIELD.CANCEL"
|
|
74
|
+
})
|
|
75
|
+
})]
|
|
76
|
+
})]
|
|
77
|
+
})
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
63
80
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { Liquid } from 'liquidjs';
|
|
2
|
-
import
|
|
3
|
+
import { useMemo, useState } from 'react';
|
|
3
4
|
import { replaceLocalization, replacePlaceholders } from './helpers';
|
|
4
5
|
import { IframeStyled } from './styles';
|
|
5
6
|
const createLiquidInstance = () => {
|
|
@@ -37,13 +38,14 @@ export function EmailTemplatePreview(props) {
|
|
|
37
38
|
return `<body style="font-size: 24px; color: darkred">${e.message}</body>`;
|
|
38
39
|
}
|
|
39
40
|
}, [template, localization, values, liquidInstance]);
|
|
40
|
-
return
|
|
41
|
+
return _jsx(IframeStyled, {
|
|
41
42
|
"$scale": scale,
|
|
42
43
|
"$width": width,
|
|
43
|
-
"$height": height
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
"$height": height,
|
|
45
|
+
children: _jsx("iframe", {
|
|
46
|
+
srcDoc: src,
|
|
47
|
+
sandbox: "allow-same-origin",
|
|
48
|
+
title: "preview"
|
|
49
|
+
})
|
|
50
|
+
});
|
|
49
51
|
}
|
|
@@ -1,24 +1,38 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Color } from '@pushwoosh/kit-constants';
|
|
3
3
|
import { Vertical } from '@pushwoosh/kit-helpers';
|
|
4
4
|
import { Text } from '@pushwoosh/kit-typography';
|
|
5
5
|
import Email from './assets/email.svg?url';
|
|
6
6
|
import { Container, PreviewMock } from './styles';
|
|
7
|
+
import { Lang, useLang } from '../../polyglot';
|
|
7
8
|
export function NoEmailTemplatePreview() {
|
|
8
|
-
|
|
9
|
+
const lang = useLang();
|
|
10
|
+
return _jsxs(Container, {
|
|
9
11
|
"$padding": "12px 12px 24px",
|
|
10
|
-
"$gap": 12
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
"$gap": 12,
|
|
13
|
+
children: [_jsx(PreviewMock, {
|
|
14
|
+
"$alignItems": "center",
|
|
15
|
+
"$justifyContent": "center",
|
|
16
|
+
children: _jsx("img", {
|
|
17
|
+
src: Email,
|
|
18
|
+
alt: lang({
|
|
19
|
+
message: 'DUMB.EMAIL_TEMPLATE_PREVIEW.ALT'
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
}), _jsxs(Vertical, {
|
|
23
|
+
children: [_jsx(Text, {
|
|
24
|
+
"$variant": "footnote",
|
|
25
|
+
"$color": Color.LOCKED,
|
|
26
|
+
children: _jsx(Lang, {
|
|
27
|
+
message: "DUMB.EMAIL_TEMPLATE_PREVIEW.CONTENT_MISSED"
|
|
28
|
+
})
|
|
29
|
+
}), _jsx(Text, {
|
|
30
|
+
"$variant": "footnote",
|
|
31
|
+
"$color": Color.LOCKED,
|
|
32
|
+
children: _jsx(Lang, {
|
|
33
|
+
message: "DUMB.EMAIL_TEMPLATE_PREVIEW.HINT"
|
|
34
|
+
})
|
|
35
|
+
})]
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
24
38
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
$icon?: React.ReactNode;
|
|
1
|
+
export declare const EnhancedInput: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & import("../native/Input").NativeInputProps & {
|
|
2
|
+
$icon?: import("react").ReactNode;
|
|
4
3
|
$onClear?: () => void;
|
|
5
4
|
hint?: string;
|
|
6
|
-
} &
|
|
5
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import { CloseIcon } from '@pushwoosh/kit-icons';
|
|
3
4
|
import { Wrapper, RightSlot } from './styles';
|
|
4
5
|
import { NativeInput } from '../native';
|
|
@@ -8,16 +9,19 @@ export const EnhancedInput = forwardRef(({
|
|
|
8
9
|
hint,
|
|
9
10
|
...props
|
|
10
11
|
}, ref) => {
|
|
11
|
-
return
|
|
12
|
+
return _jsxs(Wrapper, {
|
|
12
13
|
"$hasIcon": !!$icon,
|
|
13
14
|
"$hasClear": !!$onClear,
|
|
14
15
|
"$hasError": !!props.$isErrored,
|
|
15
|
-
"$hasHint": !!hint
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
"$hasHint": !!hint,
|
|
17
|
+
children: [$icon, _jsx(NativeInput, {
|
|
18
|
+
...props,
|
|
19
|
+
ref: ref
|
|
20
|
+
}), hint && _jsx(RightSlot, {
|
|
21
|
+
children: hint
|
|
22
|
+
}), $onClear && _jsx(CloseIcon, {
|
|
23
|
+
size: "small",
|
|
24
|
+
onClick: $onClear
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
23
27
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { SearchIcon } from '@pushwoosh/kit-icons';
|
|
3
3
|
import { EnhancedInput } from './EnhancedInput';
|
|
4
4
|
export const SearchInput = props => {
|
|
5
|
-
return
|
|
5
|
+
return _jsx(EnhancedInput, {
|
|
6
6
|
...props,
|
|
7
|
-
"$icon":
|
|
7
|
+
"$icon": _jsx(SearchIcon, {
|
|
8
8
|
size: "medium",
|
|
9
9
|
view: "lined"
|
|
10
10
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Horizontal } from '@pushwoosh/kit-helpers';
|
|
3
3
|
import { CloseIcon, CsvIcon } from '@pushwoosh/kit-icons';
|
|
4
4
|
import { Button } from '../Button';
|
|
@@ -12,28 +12,38 @@ export function ExportResult(props) {
|
|
|
12
12
|
rightSlot,
|
|
13
13
|
handleClose
|
|
14
14
|
} = props;
|
|
15
|
-
return
|
|
15
|
+
return _jsxs(Horizontal, {
|
|
16
16
|
"$justifyContent": "space-between",
|
|
17
17
|
"$alignItems": "center",
|
|
18
|
-
"$gap": 12
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
18
|
+
"$gap": 12,
|
|
19
|
+
children: [_jsxs(Horizontal, {
|
|
20
|
+
"$gap": 12,
|
|
21
|
+
children: [_jsx(LeftSlot, {
|
|
22
|
+
"$type": type,
|
|
23
|
+
"$alignItems": "center",
|
|
24
|
+
"$padding": 4,
|
|
25
|
+
children: leftSlotIcon || _jsx(CsvIcon, {
|
|
26
|
+
size: "medium",
|
|
27
|
+
view: "filled"
|
|
28
|
+
})
|
|
29
|
+
}), _jsxs(MainInfoContainer, {
|
|
30
|
+
children: [_jsx(Title, {
|
|
31
|
+
children: title
|
|
32
|
+
}), _jsx(Subtitle, {
|
|
33
|
+
children: subtitle
|
|
34
|
+
})]
|
|
35
|
+
})]
|
|
36
|
+
}), _jsxs(RightSlotContainer, {
|
|
37
|
+
"$alignItems": "center",
|
|
38
|
+
"$gap": 8,
|
|
39
|
+
children: [rightSlot, _jsx(Button, {
|
|
40
|
+
color: "secondary",
|
|
41
|
+
onClick: handleClose,
|
|
42
|
+
size: "compact",
|
|
43
|
+
icon: _jsx(CloseIcon, {
|
|
44
|
+
size: "small"
|
|
45
|
+
})
|
|
46
|
+
})]
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
39
49
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
2
3
|
import { Color } from '@pushwoosh/kit-constants';
|
|
3
4
|
import { Spinner } from '../Spinner';
|
|
4
5
|
import { RootBox, ImgPreview, PlaceholderWrapper } from './styles';
|
|
@@ -26,25 +27,28 @@ export function ExternalImagePreview(props) {
|
|
|
26
27
|
onError(error);
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
|
-
return
|
|
30
|
-
width: width,
|
|
31
|
-
height: height
|
|
32
|
-
}, (!src || isError) && React.createElement(PlaceholderWrapper, {
|
|
33
|
-
width: width,
|
|
34
|
-
height: height
|
|
35
|
-
}, placeholder), isLoading && React.createElement(PlaceholderWrapper, {
|
|
36
|
-
width: width,
|
|
37
|
-
height: height
|
|
38
|
-
}, React.createElement(Spinner, {
|
|
39
|
-
size: "small",
|
|
40
|
-
color: Color.CLEAR
|
|
41
|
-
})), React.createElement(ImgPreview, {
|
|
30
|
+
return _jsxs(RootBox, {
|
|
42
31
|
width: width,
|
|
43
32
|
height: height,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
33
|
+
children: [(!src || isError) && _jsx(PlaceholderWrapper, {
|
|
34
|
+
width: width,
|
|
35
|
+
height: height,
|
|
36
|
+
children: placeholder
|
|
37
|
+
}), isLoading && _jsx(PlaceholderWrapper, {
|
|
38
|
+
width: width,
|
|
39
|
+
height: height,
|
|
40
|
+
children: _jsx(Spinner, {
|
|
41
|
+
size: "small",
|
|
42
|
+
color: Color.CLEAR
|
|
43
|
+
})
|
|
44
|
+
}), _jsx(ImgPreview, {
|
|
45
|
+
width: width,
|
|
46
|
+
height: height,
|
|
47
|
+
isHide: !src || isLoading || isError,
|
|
48
|
+
alt: alt,
|
|
49
|
+
src: src,
|
|
50
|
+
onError: handleOnError,
|
|
51
|
+
onLoad: () => setIsLoading(false)
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
50
54
|
}
|
package/FieldBox/FieldBox.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Color, Tag } from '@pushwoosh/kit-constants';
|
|
3
3
|
import { Horizontal, Vertical } from '@pushwoosh/kit-helpers';
|
|
4
4
|
import { OpenIcon, InfoRoundIcon } from '@pushwoosh/kit-icons';
|
|
@@ -18,41 +18,54 @@ export function FieldBox(props) {
|
|
|
18
18
|
actionsRef,
|
|
19
19
|
children
|
|
20
20
|
} = props;
|
|
21
|
-
return
|
|
21
|
+
return _jsxs(Vertical, {
|
|
22
22
|
ref: boxRef,
|
|
23
|
-
"$gap": 4
|
|
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
|
-
|
|
23
|
+
"$gap": 4,
|
|
24
|
+
children: [title && _jsxs(Horizontal, {
|
|
25
|
+
"$alignItems": "center",
|
|
26
|
+
"$justifyContent": "space-between",
|
|
27
|
+
children: [_jsxs(TitleBox, {
|
|
28
|
+
children: [_jsx(Text, {
|
|
29
|
+
"$variant": "h5",
|
|
30
|
+
children: title
|
|
31
|
+
}), isOptional && _jsx(Text, {
|
|
32
|
+
"$color": Color.LOCKED,
|
|
33
|
+
"$variant": "footnote",
|
|
34
|
+
children: "(optional)"
|
|
35
|
+
}), tooltip && _jsx(Tooltip, {
|
|
36
|
+
content: tooltip,
|
|
37
|
+
position: "right-middle",
|
|
38
|
+
children: _jsx("div", {
|
|
39
|
+
children: _jsx(InfoRoundIcon, {
|
|
40
|
+
color: Color.LOCKED,
|
|
41
|
+
size: "small",
|
|
42
|
+
view: "lined"
|
|
43
|
+
})
|
|
44
|
+
})
|
|
45
|
+
}), link && _jsx(Link, {
|
|
46
|
+
as: Tag.A,
|
|
47
|
+
href: link,
|
|
48
|
+
target: "_blank",
|
|
49
|
+
rel: "noopener noreferrer",
|
|
50
|
+
children: _jsx(OpenIcon, {
|
|
51
|
+
size: "small",
|
|
52
|
+
view: "lined"
|
|
53
|
+
})
|
|
54
|
+
})]
|
|
55
|
+
}), actions && _jsx(Horizontal, {
|
|
56
|
+
ref: actionsRef,
|
|
57
|
+
"$alignItems": "center",
|
|
58
|
+
"$gap": 4,
|
|
59
|
+
children: actions
|
|
60
|
+
})]
|
|
61
|
+
}), children, description && !error && _jsx(Text, {
|
|
62
|
+
"$variant": "footnote",
|
|
63
|
+
"$color": Color.LOCKED,
|
|
64
|
+
children: description
|
|
65
|
+
}), error && _jsx(Text, {
|
|
66
|
+
"$variant": "footnote",
|
|
67
|
+
"$color": Color.DANGER,
|
|
68
|
+
children: error
|
|
69
|
+
})]
|
|
70
|
+
});
|
|
58
71
|
}
|