@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,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { Color, ShapeRadius } from '@pushwoosh/kit-constants';
|
|
3
4
|
import { Columns, Horizontal, Vertical } from '@pushwoosh/kit-helpers';
|
|
4
5
|
import { TimeIcon } from '@pushwoosh/kit-icons';
|
|
@@ -53,93 +54,110 @@ export const CalendarTimeAndTimezoneSection = ({
|
|
|
53
54
|
backgroundColor = Color.SOFT_LIGHT;
|
|
54
55
|
borderRadius = ShapeRadius.SECTION;
|
|
55
56
|
}
|
|
56
|
-
return
|
|
57
|
+
return _jsx(Vertical, {
|
|
57
58
|
"$padding": padding,
|
|
58
59
|
"$borderRadius": borderRadius,
|
|
59
|
-
"$bgColor": backgroundColor
|
|
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
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
60
|
+
"$bgColor": backgroundColor,
|
|
61
|
+
children: showCollapsed ? _jsxs(Columns, {
|
|
62
|
+
"$sizes": "max-content 1fr max-content",
|
|
63
|
+
"$gap": 6,
|
|
64
|
+
"$alignItems": "center",
|
|
65
|
+
children: [_jsx(TimeIcon, {
|
|
66
|
+
size: "small",
|
|
67
|
+
view: "lined"
|
|
68
|
+
}), _jsxs(Text, {
|
|
69
|
+
"$variant": "footnote",
|
|
70
|
+
children: [getSelectedTimeText(), ' ', timezoneShort]
|
|
71
|
+
}), _jsx(Button, {
|
|
72
|
+
color: "secondary",
|
|
73
|
+
size: "compact",
|
|
74
|
+
view: "ghost",
|
|
75
|
+
onClick: () => setExpanded(true),
|
|
76
|
+
children: _jsx(Lang, {
|
|
77
|
+
message: "DUMB.CALENDAR.EXPAND_TIME"
|
|
78
|
+
})
|
|
79
|
+
})]
|
|
80
|
+
}) : _jsxs(_Fragment, {
|
|
81
|
+
children: [isRangePicker && _jsxs(Columns, {
|
|
82
|
+
"$sizes": "1fr max-content",
|
|
83
|
+
"$gap": 8,
|
|
84
|
+
"$alignItems": "center",
|
|
85
|
+
children: [_jsx(H5, {
|
|
86
|
+
children: _jsx(Lang, {
|
|
87
|
+
message: "DUMB.CALENDAR.TIME_RANGE"
|
|
88
|
+
})
|
|
89
|
+
}), _jsx(Button, {
|
|
90
|
+
color: "secondary",
|
|
91
|
+
size: "compact",
|
|
92
|
+
view: "ghost",
|
|
93
|
+
onClick: () => setExpanded(false),
|
|
94
|
+
children: _jsx(Lang, {
|
|
95
|
+
message: "DUMB.CALENDAR.COLLAPSE_TIME"
|
|
96
|
+
})
|
|
97
|
+
})]
|
|
98
|
+
}), !isRangePicker ? _jsxs(Horizontal, {
|
|
99
|
+
"$alignItems": "center",
|
|
100
|
+
"$gap": 8,
|
|
101
|
+
"$justifyContent": "start",
|
|
102
|
+
children: [_jsx(CalendarTimeInput, {
|
|
103
|
+
value: value,
|
|
104
|
+
onChange: time => {
|
|
105
|
+
const newStruct = extendPeriodStruct(value, time);
|
|
106
|
+
onChange(newStruct);
|
|
107
|
+
},
|
|
108
|
+
disabled: isDisabled
|
|
109
|
+
}), _jsx(CalendarTimezoneSelect, {
|
|
110
|
+
timezone: timezone,
|
|
111
|
+
onChange: onChangeTimezone,
|
|
112
|
+
isDisabled: isDisabled
|
|
113
|
+
})]
|
|
114
|
+
}) : _jsxs(Columns, {
|
|
115
|
+
"$sizes": visibleCount === 1 ? '1fr' : 'auto 1fr',
|
|
116
|
+
"$gap": 8,
|
|
117
|
+
children: [_jsxs(Horizontal, {
|
|
118
|
+
"$alignItems": "center",
|
|
119
|
+
"$gap": 8,
|
|
120
|
+
"$justifyContent": "start",
|
|
121
|
+
children: [_jsx(CalendarTimeInput, {
|
|
122
|
+
value: value[0],
|
|
123
|
+
onChange: time => {
|
|
124
|
+
const oldStruct = value[0];
|
|
125
|
+
const newStruct = extendPeriodStruct(oldStruct, time);
|
|
126
|
+
const newValue = value.length === 2 ? [newStruct, value[1]] : [newStruct];
|
|
127
|
+
onChange(newValue);
|
|
128
|
+
},
|
|
129
|
+
disabled: isDisabled
|
|
130
|
+
}), _jsx("span", {
|
|
131
|
+
children: "\u2013"
|
|
132
|
+
}), _jsx(CalendarTimeInput, {
|
|
133
|
+
value: value[1],
|
|
134
|
+
onChange: time => {
|
|
135
|
+
const oldStruct = value[1];
|
|
136
|
+
const newStruct = extendPeriodStruct(oldStruct, time);
|
|
137
|
+
const newValue = value.length === 2 ? [value[0], newStruct] : [newStruct];
|
|
138
|
+
onChange(newValue);
|
|
139
|
+
},
|
|
140
|
+
endPeriod: true,
|
|
141
|
+
disabled: isDisabled
|
|
142
|
+
})]
|
|
143
|
+
}), _jsx(CalendarTimezoneSelect, {
|
|
144
|
+
timezone: timezone,
|
|
145
|
+
onChange: onChangeTimezone,
|
|
146
|
+
isDisabled: isDisabled
|
|
147
|
+
})]
|
|
148
|
+
}), isDisabled && _jsx(Horizontal, {
|
|
149
|
+
"$margin": {
|
|
150
|
+
top: 4
|
|
151
|
+
},
|
|
152
|
+
children: _jsx(Text, {
|
|
153
|
+
"$variant": "footnote",
|
|
154
|
+
"$color": Color.LOCKED,
|
|
155
|
+
children: _jsx(Lang, {
|
|
156
|
+
message: "DUMB.CALENDAR.SELECT_FIRST_HINT",
|
|
157
|
+
isRange: Boolean(isRangePicker)
|
|
158
|
+
})
|
|
159
|
+
})
|
|
160
|
+
})]
|
|
161
|
+
})
|
|
162
|
+
});
|
|
145
163
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export type CalendarTimeInputProps<T extends {
|
|
3
2
|
hour: number;
|
|
4
3
|
minute: number;
|
|
@@ -16,4 +15,4 @@ export type CalendarTimeInputProps<T extends {
|
|
|
16
15
|
export declare const CalendarTimeInput: <T extends {
|
|
17
16
|
hour: number;
|
|
18
17
|
minute: number;
|
|
19
|
-
}>({ value, onChange, disabled, endPeriod, }: CalendarTimeInputProps<T>) =>
|
|
18
|
+
}>({ value, onChange, disabled, endPeriod, }: CalendarTimeInputProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { NativeTimeInput } from '../../../native';
|
|
3
3
|
import { formatTwoDigitNumber } from '../../helpers';
|
|
4
4
|
export const CalendarTimeInput = ({
|
|
@@ -9,7 +9,7 @@ export const CalendarTimeInput = ({
|
|
|
9
9
|
}) => {
|
|
10
10
|
const defaultHour = endPeriod ? 23 : 0;
|
|
11
11
|
const defaultMinute = endPeriod ? 59 : 0;
|
|
12
|
-
return
|
|
12
|
+
return _jsx(NativeTimeInput, {
|
|
13
13
|
value: `${formatTwoDigitNumber((value === null || value === void 0 ? void 0 : value.hour) ?? defaultHour)}:${formatTwoDigitNumber((value === null || value === void 0 ? void 0 : value.minute) ?? defaultMinute)}`,
|
|
14
14
|
onChange: e => {
|
|
15
15
|
const [hour, minute] = e.target.value.split(':').map(Number);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
2
3
|
import { Select } from '../../../Select';
|
|
3
4
|
import { getSortedTimezones } from '../../helpers-tz';
|
|
4
5
|
export const CalendarTimezoneSelect = ({
|
|
@@ -9,7 +10,7 @@ export const CalendarTimezoneSelect = ({
|
|
|
9
10
|
const timezonesOptions = useMemo(() => {
|
|
10
11
|
return getSortedTimezones();
|
|
11
12
|
}, []);
|
|
12
|
-
return
|
|
13
|
+
return _jsx(Select, {
|
|
13
14
|
value: timezonesOptions.find(op => op.value === timezone),
|
|
14
15
|
onChange: value => onChange(value.value),
|
|
15
16
|
options: timezonesOptions,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Spinner } from '../Spinner';
|
|
3
3
|
import { CardCollapse } from './CardCollapse';
|
|
4
4
|
export function CardChildren(props) {
|
|
@@ -12,14 +12,17 @@ export function CardChildren(props) {
|
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
14
|
if (loading) {
|
|
15
|
-
return
|
|
15
|
+
return _jsx(Spinner, {
|
|
16
16
|
size: "medium"
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
if (collapse !== undefined) {
|
|
20
|
-
return
|
|
21
|
-
isCollapsed: isCollapsed
|
|
22
|
-
|
|
20
|
+
return _jsx(CardCollapse, {
|
|
21
|
+
isCollapsed: isCollapsed,
|
|
22
|
+
children: children
|
|
23
|
+
});
|
|
23
24
|
}
|
|
24
|
-
return
|
|
25
|
+
return _jsx(_Fragment, {
|
|
26
|
+
children: children
|
|
27
|
+
});
|
|
25
28
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { CollapseContainer, CollapseInner } from './styles';
|
|
3
3
|
export function CardCollapse(props) {
|
|
4
4
|
const {
|
|
5
5
|
children,
|
|
6
6
|
isCollapsed
|
|
7
7
|
} = props;
|
|
8
|
-
return
|
|
9
|
-
isCollapsed: isCollapsed
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
return _jsx(CollapseContainer, {
|
|
9
|
+
isCollapsed: isCollapsed,
|
|
10
|
+
children: _jsx(CollapseInner, {
|
|
11
|
+
isCollapsed: isCollapsed,
|
|
12
|
+
children: children
|
|
13
|
+
})
|
|
14
|
+
});
|
|
13
15
|
}
|
package/CardMetric/CardMetric.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { Color } from '@pushwoosh/kit-constants';
|
|
3
4
|
import { InfoRoundIcon, ChevronIcon } from '@pushwoosh/kit-icons';
|
|
4
5
|
import { Spinner } from '../Spinner';
|
|
@@ -24,38 +25,56 @@ export function CardMetric({
|
|
|
24
25
|
const [isCollapsed, setIsCollapsed] = useState(!!(collapse !== null && collapse !== void 0 && collapse.isCollapsed));
|
|
25
26
|
const onMouseOver = () => setVisibleInfo(true);
|
|
26
27
|
const onMouseOut = () => setVisibleInfo(false);
|
|
27
|
-
return
|
|
28
|
+
return _jsxs(CardContainer, {
|
|
28
29
|
view: view,
|
|
29
30
|
focus: focus,
|
|
30
|
-
...otherProps
|
|
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
|
-
|
|
31
|
+
...otherProps,
|
|
32
|
+
children: [(!!title || !!headerExtra) && _jsxs(CardHeader, {
|
|
33
|
+
children: [_jsxs(CardHeaderLeft, {
|
|
34
|
+
children: [_jsxs(CardTitle, {
|
|
35
|
+
onClick: () => {
|
|
36
|
+
if (collapse !== undefined) {
|
|
37
|
+
setIsCollapsed(prevState => !prevState);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
collapsable: collapse !== undefined,
|
|
41
|
+
children: [title, collapse !== undefined && _jsx(ChevronIcon, {
|
|
42
|
+
direction: isCollapsed ? 'down' : 'up',
|
|
43
|
+
size: "small"
|
|
44
|
+
}), _jsx(CardInfo, {
|
|
45
|
+
hide: !tooltip,
|
|
46
|
+
onMouseOver: onMouseOver,
|
|
47
|
+
onMouseOut: onMouseOut,
|
|
48
|
+
children: _jsx(Tooltip, {
|
|
49
|
+
isVisible: visibleInfo,
|
|
50
|
+
content: tooltip,
|
|
51
|
+
children: _jsx("div", {
|
|
52
|
+
children: _jsx(InfoRoundIcon, {
|
|
53
|
+
size: "small",
|
|
54
|
+
view: "lined",
|
|
55
|
+
color: visibleInfo ? Color.PRIMARY_HOVER : Color.SOFT
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
})]
|
|
60
|
+
}), metric !== undefined && (loading ? _jsx(Spinner, {
|
|
61
|
+
size: "medium"
|
|
62
|
+
}) : _jsxs(CardMetricValue, {
|
|
63
|
+
children: [metric, _jsx(CardExtraMetric, {
|
|
64
|
+
color: extraMetricColor,
|
|
65
|
+
children: extraMetric
|
|
66
|
+
})]
|
|
67
|
+
}))]
|
|
68
|
+
}), _jsx("div", {
|
|
69
|
+
children: headerExtra
|
|
70
|
+
})]
|
|
71
|
+
}), _jsx(CardChildren, {
|
|
72
|
+
loading: loading,
|
|
73
|
+
collapse: collapse,
|
|
74
|
+
isCollapsed: isCollapsed,
|
|
75
|
+
children: children
|
|
76
|
+
}), !!description && _jsx(CardDescription, {
|
|
77
|
+
children: description
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
61
80
|
}
|
package/Checkbox/Checkbox.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useEffect, useState } from 'react';
|
|
2
3
|
import { Color } from '@pushwoosh/kit-constants';
|
|
3
4
|
import { Horizontal } from '@pushwoosh/kit-helpers';
|
|
4
5
|
import { NativeLabel, NativeCheckbox } from './styles';
|
|
@@ -31,32 +32,37 @@ export function Checkbox(props) {
|
|
|
31
32
|
checkboxRef.current.indeterminate = isIndeterminate ?? false;
|
|
32
33
|
}
|
|
33
34
|
}, [checkboxRef, isIndeterminate]);
|
|
34
|
-
const checkboxMarkup =
|
|
35
|
+
const checkboxMarkup = _jsxs(NativeLabel, {
|
|
35
36
|
htmlFor: localId,
|
|
36
|
-
"$color": isDisabled ? Color.LOCKED : Color.MAIN
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
"$color": isDisabled ? Color.LOCKED : Color.MAIN,
|
|
38
|
+
children: [_jsx(Horizontal, {
|
|
39
|
+
"$padding": 3,
|
|
40
|
+
children: _jsx(NativeCheckbox, {
|
|
41
|
+
type: "checkbox",
|
|
42
|
+
id: localId,
|
|
43
|
+
ref: checkboxRef,
|
|
44
|
+
value: value,
|
|
45
|
+
name: name,
|
|
46
|
+
"$color": activeCheckboxColor,
|
|
47
|
+
checked: isChecked,
|
|
48
|
+
disabled: isDisabled,
|
|
49
|
+
"$type": type,
|
|
50
|
+
onChange: event => onChange === null || onChange === void 0 ? void 0 : onChange(event.currentTarget.checked)
|
|
51
|
+
})
|
|
52
|
+
}), label && _jsx("span", {
|
|
53
|
+
children: label
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
51
56
|
if (tooltip) {
|
|
52
|
-
return
|
|
57
|
+
return _jsxs(Horizontal, {
|
|
53
58
|
"$gap": 4,
|
|
54
|
-
"$alignItems": "start"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
"$alignItems": "start",
|
|
60
|
+
children: [checkboxMarkup, _jsx(TooltipTrigger, {
|
|
61
|
+
content: tooltip,
|
|
62
|
+
padding: "4px 0",
|
|
63
|
+
view: "question"
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
60
66
|
}
|
|
61
67
|
return checkboxMarkup;
|
|
62
68
|
}
|
package/Chip/Chip.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Chip: React.ForwardRefExoticComponent<{
|
|
1
|
+
export declare const Chip: import("react").ForwardRefExoticComponent<{
|
|
3
2
|
$variant?: import("./Chip.types").ChipVariant;
|
|
4
3
|
$selected?: boolean;
|
|
5
|
-
$onClose?:
|
|
4
|
+
$onClose?: import("react").HTMLAttributes<HTMLDivElement>["onClick"];
|
|
6
5
|
$readOnly?: boolean;
|
|
7
6
|
$maxWidth?: string;
|
|
8
|
-
$icon?:
|
|
9
|
-
$tooltip?:
|
|
7
|
+
$icon?: import("react").ReactNode;
|
|
8
|
+
$tooltip?: import("react").ReactNode;
|
|
10
9
|
as?: string;
|
|
11
10
|
} & {
|
|
12
|
-
children?:
|
|
13
|
-
} &
|
|
11
|
+
children?: import("react").ReactNode | undefined;
|
|
12
|
+
} & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
package/Chip/Chip.js
CHANGED
|
@@ -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 { TooltipTrigger } from '../Tooltip';
|
|
3
4
|
import { ChipCloseIcon, ChipLabel, ChipSlotIcon, ChipStyled } from './styles';
|
|
4
5
|
export const Chip = forwardRef(({
|
|
@@ -18,7 +19,7 @@ export const Chip = forwardRef(({
|
|
|
18
19
|
if ($readOnly && $onClose) {
|
|
19
20
|
console.error('[Chip]: $onClose is ignored when $readOnly is true — read-only chips have no close button.');
|
|
20
21
|
}
|
|
21
|
-
return
|
|
22
|
+
return _jsxs(ChipStyled, {
|
|
22
23
|
ref: ref,
|
|
23
24
|
"$variant": $variant,
|
|
24
25
|
"$selected": $selected,
|
|
@@ -27,17 +28,23 @@ export const Chip = forwardRef(({
|
|
|
27
28
|
"$readOnly": $readOnly,
|
|
28
29
|
"$maxWidth": $maxWidth,
|
|
29
30
|
as: as,
|
|
30
|
-
...rest
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
...rest,
|
|
32
|
+
children: [$icon && _jsx(ChipSlotIcon, {
|
|
33
|
+
children: $icon
|
|
34
|
+
}), _jsx(ChipLabel, {
|
|
35
|
+
"$truncated": $maxWidth !== undefined,
|
|
36
|
+
children: children
|
|
37
|
+
}), isCloseable && _jsx(ChipCloseIcon, {
|
|
38
|
+
size: "small",
|
|
39
|
+
onClick: $onClose,
|
|
40
|
+
forwardedAs: "span"
|
|
41
|
+
}), hasTooltip && _jsx(ChipSlotIcon, {
|
|
42
|
+
children: _jsx(TooltipTrigger, {
|
|
43
|
+
view: "question",
|
|
44
|
+
size: "small",
|
|
45
|
+
position: "top-middle",
|
|
46
|
+
content: $tooltip
|
|
47
|
+
})
|
|
48
|
+
})]
|
|
49
|
+
});
|
|
43
50
|
});
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type CodeEditorProps } from './types';
|
|
3
|
-
export declare const CodeEditor: ({ value, onChange, readOnly, width, height, onBlur, extensions, themeOptions, hasError, placeholder, }: CodeEditorProps) =>
|
|
2
|
+
export declare const CodeEditor: ({ value, onChange, readOnly, width, height, onBlur, extensions, themeOptions, hasError, placeholder, }: CodeEditorProps) => import("react/jsx-runtime").JSX.Element;
|
package/CodeEditor/CodeEditor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import createTheme from '@uiw/codemirror-themes';
|
|
2
|
-
import React from 'react';
|
|
3
3
|
import { defaultTheme } from './constants';
|
|
4
4
|
import { CodeMirrorStyled } from './styles';
|
|
5
5
|
export const CodeEditor = ({
|
|
@@ -14,7 +14,7 @@ export const CodeEditor = ({
|
|
|
14
14
|
hasError,
|
|
15
15
|
placeholder
|
|
16
16
|
}) => {
|
|
17
|
-
return
|
|
17
|
+
return _jsx(CodeMirrorStyled, {
|
|
18
18
|
value: value,
|
|
19
19
|
theme: themeOptions ? createTheme(themeOptions) : defaultTheme,
|
|
20
20
|
readOnly: readOnly,
|
|
@@ -1,11 +1,24 @@
|
|
|
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 { WarningRoundIcon } from '@pushwoosh/kit-icons';
|
|
4
|
+
import { Lang } from './polyglot';
|
|
4
5
|
import { RootBox, IconBox, TitleBox, DescriptionBox } from './styles';
|
|
5
6
|
export function CrashScreen() {
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
return _jsxs(RootBox, {
|
|
8
|
+
children: [_jsx(IconBox, {
|
|
9
|
+
children: _jsx(WarningRoundIcon, {
|
|
10
|
+
size: "medium",
|
|
11
|
+
view: "filled",
|
|
12
|
+
color: Color.WARNING
|
|
13
|
+
})
|
|
14
|
+
}), _jsx(TitleBox, {
|
|
15
|
+
children: _jsx(Lang, {
|
|
16
|
+
message: "DUMB.CRASH_SCREEN.TITLE"
|
|
17
|
+
})
|
|
18
|
+
}), _jsx(DescriptionBox, {
|
|
19
|
+
children: _jsx(Lang, {
|
|
20
|
+
message: "DUMB.CRASH_SCREEN.DESCRIPTION"
|
|
21
|
+
})
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
11
24
|
}
|