@pushwoosh/dumb-components 1.1.178 → 1.1.180

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.
@@ -1,5 +1,5 @@
1
1
  export type { NativeRichMediaConfig, NativeRichMediaDisplayType, NativeRichMediaText, NativeRichMediaBorder, NativeRichMediaCover, NativeRichMediaAction, NativeRichMediaButton, NativeRichMediaReward, NativeRichMediaModalBlock, NativeRichMediaSheetBlock, NativeRichMediaCarouselBlock, NativeRichMediaStoriesBlock, NativeRichMediaBannerBlock, NativeRichMediaFullscreenBlock, NativeRichMediaVideoBlock, NativeRichMediaPipBlock, NativeRichMediaScratchcardBlock, NativeRichMediaSpinwheelBlock, NativeRichMediaPreviewProps, NativeRichMediaLocalization, } from './types';
2
- export { NATIVE_RICH_MEDIA_DISPLAY_TYPES } from './types';
2
+ export { NATIVE_RICH_MEDIA_DISPLAY_TYPES, EDITABLE_NATIVE_RICH_MEDIA_DISPLAY_TYPES } from './types';
3
3
  export { parseNativeRichMediaConfig } from './parseNativeRichMediaConfig';
4
4
  export { parseLocalizationParams } from './parseLocalizationParams';
5
5
  export { NativeRichMediaPreview } from './NativeRichMediaPreview';
@@ -1,4 +1,4 @@
1
- export { NATIVE_RICH_MEDIA_DISPLAY_TYPES } from './types';
1
+ export { NATIVE_RICH_MEDIA_DISPLAY_TYPES, EDITABLE_NATIVE_RICH_MEDIA_DISPLAY_TYPES } from './types';
2
2
  export { parseNativeRichMediaConfig } from './parseNativeRichMediaConfig';
3
3
  export { parseLocalizationParams } from './parseLocalizationParams';
4
4
  export { NativeRichMediaPreview } from './NativeRichMediaPreview';
@@ -283,6 +283,12 @@ export type NativeRichMediaConfig = {
283
283
  export type NativeRichMediaDisplayType = NativeRichMediaConfig['displayType'];
284
284
  /** All supported {@link NativeRichMediaDisplayType} values. */
285
285
  export declare const NATIVE_RICH_MEDIA_DISPLAY_TYPES: NativeRichMediaDisplayType[];
286
+ /**
287
+ * The subset of {@link NATIVE_RICH_MEDIA_DISPLAY_TYPES} the native rich media
288
+ * editor can author. The preview renders every display type, but only these
289
+ * three have an editing UI, so pickers must offer this list and not the full one.
290
+ */
291
+ export declare const EDITABLE_NATIVE_RICH_MEDIA_DISPLAY_TYPES: NativeRichMediaDisplayType[];
286
292
  /**
287
293
  * Per-language text for `{{key|type|default}}` placeholders in the config:
288
294
  * `{ [language]: { [key]: text } }`, plus a `default` bucket used as the
@@ -1,2 +1,8 @@
1
1
  /** All supported {@link NativeRichMediaDisplayType} values. */
2
- export const NATIVE_RICH_MEDIA_DISPLAY_TYPES = ['modal', 'sheet', 'carousel', 'stories', 'banner', 'fullscreen', 'video', 'pip', 'scratchcard', 'spinwheel'];
2
+ export const NATIVE_RICH_MEDIA_DISPLAY_TYPES = ['modal', 'sheet', 'carousel', 'stories', 'banner', 'fullscreen', 'video', 'pip', 'scratchcard', 'spinwheel'];
3
+ /**
4
+ * The subset of {@link NATIVE_RICH_MEDIA_DISPLAY_TYPES} the native rich media
5
+ * editor can author. The preview renders every display type, but only these
6
+ * three have an editing UI, so pickers must offer this list and not the full one.
7
+ */
8
+ export const EDITABLE_NATIVE_RICH_MEDIA_DISPLAY_TYPES = ['modal', 'stories', 'fullscreen'];
@@ -1,6 +1,6 @@
1
1
  import { type ReactElement } from 'react';
2
2
  import type { GroupBase } from 'react-select';
3
- import type { SelectProps, SelectAsyncProps, SelectCreatableProps } from './types';
3
+ import type { SelectProps, SelectAsyncProps } from './types';
4
4
  /**
5
5
  * Styled `react-select` dropdown (single or multi via `isMulti`).
6
6
  *
@@ -20,11 +20,3 @@ export declare function Select<Option, IsMulti extends boolean = false, Group ex
20
20
  * <SelectAsync loadOptions={fetchOptions} defaultOptions />
21
21
  */
22
22
  export declare function SelectAsync<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: SelectAsyncProps<Option, IsMulti, Group>): ReactElement;
23
- /**
24
- * Styled `react-select` dropdown that lets the user create new options by typing.
25
- *
26
- * @deprecated Use the free-text {@link Combobox} instead.
27
- * @example
28
- * <CreatableSelect options={options} onCreateOption={addOption} />
29
- */
30
- export declare function CreatableSelect<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: SelectCreatableProps<Option, IsMulti, Group>): ReactElement;
package/Select/Select.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { CloseIcon } from '@pushwoosh/kit-icons';
3
3
  import { CLASS_NAME_PREFIX } from './constants';
4
- import { SelectStyled, SelectAsyncStyled, SelectCreatableStyled, ClearIndicatorBox } from './styles';
4
+ import { SelectStyled, SelectAsyncStyled, ClearIndicatorBox } from './styles';
5
5
  const componentsProps = {
6
6
  ClearIndicator: ({
7
7
  clearValue
@@ -54,24 +54,4 @@ export function SelectAsync(props) {
54
54
  components: componentsProps,
55
55
  ...customProps
56
56
  });
57
- }
58
- /**
59
- * Styled `react-select` dropdown that lets the user create new options by typing.
60
- *
61
- * @deprecated Use the free-text {@link Combobox} instead.
62
- * @example
63
- * <CreatableSelect options={options} onCreateOption={addOption} />
64
- */
65
- export function CreatableSelect(props) {
66
- const {
67
- classNamePrefix = CLASS_NAME_PREFIX
68
- } = props;
69
- const customProps = {
70
- ...props,
71
- classNamePrefix
72
- };
73
- return _jsx(SelectCreatableStyled, {
74
- components: componentsProps,
75
- ...customProps
76
- });
77
57
  }
package/Select/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { components as SelectComponents } from 'react-select';
2
2
  export type { SingleValue, MultiValue } from 'react-select';
3
3
  export { CLASS_NAME_PREFIX } from './constants';
4
- export { Select, SelectAsync, CreatableSelect } from './Select';
4
+ export { Select, SelectAsync } from './Select';
5
5
  export type { SelectBase, SelectOption, MultiSelectOptions } from './types';
package/Select/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export { components as SelectComponents } from 'react-select';
2
2
  export { CLASS_NAME_PREFIX } from './constants';
3
- export { Select, SelectAsync, CreatableSelect } from './Select';
3
+ export { Select, SelectAsync } from './Select';
@@ -1,7 +1,5 @@
1
1
  import ReactSelect from 'react-select';
2
2
  import ReactSelectAsync from 'react-select/async';
3
- import ReactSelectCreatable from 'react-select/creatable';
4
3
  export declare const SelectStyled: typeof ReactSelect;
5
4
  export declare const SelectAsyncStyled: typeof ReactSelectAsync;
6
- export declare const SelectCreatableStyled: typeof ReactSelectCreatable;
7
5
  export declare const ClearIndicatorBox: import("styled-components").StyledComponent<"div", any, {}, never>;
package/Select/styles.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import ReactSelect from 'react-select';
2
2
  import ReactSelectAsync from 'react-select/async';
3
- import ReactSelectCreatable from 'react-select/creatable';
4
3
  import styled, { css } from 'styled-components';
5
4
  import { Color, FontSize, LineHeight, UnitSize } from '@pushwoosh/kit-constants';
6
5
  import { CLASS_NAME_PREFIX } from './constants';
@@ -25,11 +24,7 @@ export const SelectAsyncStyled = styled(ReactSelectAsync).withConfig({
25
24
  displayName: "SelectAsyncStyled",
26
25
  componentId: "sc-c2oq4h-1"
27
26
  })(["", ";"], selectStyles);
28
- export const SelectCreatableStyled = styled(ReactSelectCreatable).withConfig({
29
- displayName: "SelectCreatableStyled",
30
- componentId: "sc-c2oq4h-2"
31
- })(["", ";"], selectStyles);
32
27
  export const ClearIndicatorBox = styled.div.withConfig({
33
28
  displayName: "ClearIndicatorBox",
34
- componentId: "sc-c2oq4h-3"
29
+ componentId: "sc-c2oq4h-2"
35
30
  })(["color:", ";transition:transform 0.3s ease,color 0.3s ease;&:hover{color:", ";transform:scale(1.2);}"], Color.PHANTOM, Color.MAIN);
package/Select/types.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import type { Props, GroupBase, MultiValue } from 'react-select';
2
2
  import type { AsyncProps } from 'react-select/async';
3
- import type { CreatableProps } from 'react-select/creatable';
4
3
  /** A single `{ label, value }` option for the `react-select`-based selects. */
5
4
  export type SelectOption = {
6
5
  /** Text shown in the control and dropdown. */
@@ -27,8 +26,3 @@ export type SelectProps<Option, IsMulti extends boolean = false, Group extends G
27
26
  * @deprecated Use {@link Combobox} with `loadItems` instead.
28
27
  */
29
28
  export type SelectAsyncProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = SelectProps<Option, IsMulti, Group> & AsyncProps<Option, IsMulti, Group> & SelectBase;
30
- /**
31
- * Props of {@link CreatableSelect} — {@link SelectProps} plus `react-select/creatable` props.
32
- * @deprecated Use the free-text {@link Combobox} instead.
33
- */
34
- export type SelectCreatableProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = SelectProps<Option, IsMulti, Group> & CreatableProps<Option, IsMulti, Group> & SelectBase;
package/index.d.ts CHANGED
@@ -21,7 +21,7 @@ export { RadioCard } from './RadioCard';
21
21
  export { ReCaptcha, useRecaptcha, asyncScriptLoad } from './ReCaptcha';
22
22
  export { Spinner } from './Spinner';
23
23
  export { SortButton, type SortButtonParams } from './SortButton';
24
- export { Select, SelectAsync, CreatableSelect, SelectComponents, CLASS_NAME_PREFIX, type SelectBase, type SelectOption, type MultiSelectOptions, type SingleValue, type MultiValue, } from './Select';
24
+ export { Select, SelectAsync, SelectComponents, CLASS_NAME_PREFIX, type SelectBase, type SelectOption, type MultiSelectOptions, type SingleValue, type MultiValue, } from './Select';
25
25
  export { Combobox, type ComboboxProps, type ComboboxChangeSource, type ComboboxChangeMeta, type FreeComboboxProps, type SelectComboboxProps, } from './Combobox';
26
26
  export { ComboboxMulti, type ComboboxMultiProps } from './ComboboxMulti';
27
27
  export { Switch } from './Switch';
@@ -44,7 +44,7 @@ export { EnhancedInput, SearchInput } from './EnhancedInput';
44
44
  export { Chip, type ChipProps, type ChipVariant } from './Chip';
45
45
  export { RichmediaPreview, useRichmediaHtml } from './RichmediaPreview';
46
46
  export { SandboxedHtmlFrame, type SandboxedHtmlFrameProps, type IsolatedSandboxedHtmlFrameProps, type InspectableSandboxedHtmlFrameProps, } from './SandboxedHtmlFrame';
47
- export { NativeRichMediaPreview, parseNativeRichMediaConfig, parseLocalizationParams, NATIVE_RICH_MEDIA_DISPLAY_TYPES } from './NativeRichMediaPreview';
47
+ export { NativeRichMediaPreview, parseNativeRichMediaConfig, parseLocalizationParams, NATIVE_RICH_MEDIA_DISPLAY_TYPES, EDITABLE_NATIVE_RICH_MEDIA_DISPLAY_TYPES, } from './NativeRichMediaPreview';
48
48
  export type { NativeRichMediaConfig, NativeRichMediaDisplayType, NativeRichMediaText, NativeRichMediaBorder, NativeRichMediaCover, NativeRichMediaAction, NativeRichMediaButton, NativeRichMediaReward, NativeRichMediaModalBlock, NativeRichMediaSheetBlock, NativeRichMediaCarouselBlock, NativeRichMediaStoriesBlock, NativeRichMediaBannerBlock, NativeRichMediaFullscreenBlock, NativeRichMediaVideoBlock, NativeRichMediaPipBlock, NativeRichMediaScratchcardBlock, NativeRichMediaSpinwheelBlock, NativeRichMediaPreviewProps, NativeRichMediaLocalization, } from './NativeRichMediaPreview';
49
49
  export { RichMessageEditor, RichMessageViewer, type DynamicContent, } from './RichMessageEditor';
50
50
  export { FrequencyCappingEdit, FrequencyCappingReadonly, FrequencyCappingInApps, type LocalCapping, type CappingInAppBase, } from './FrequencyCapping';
package/index.js CHANGED
@@ -21,7 +21,7 @@ export { RadioCard } from './RadioCard';
21
21
  export { ReCaptcha, useRecaptcha, asyncScriptLoad } from './ReCaptcha';
22
22
  export { Spinner } from './Spinner';
23
23
  export { SortButton } from './SortButton';
24
- export { Select, SelectAsync, CreatableSelect, SelectComponents, CLASS_NAME_PREFIX } from './Select';
24
+ export { Select, SelectAsync, SelectComponents, CLASS_NAME_PREFIX } from './Select';
25
25
  export { Combobox } from './Combobox';
26
26
  export { ComboboxMulti } from './ComboboxMulti';
27
27
  export { Switch } from './Switch';
@@ -44,7 +44,7 @@ export { EnhancedInput, SearchInput } from './EnhancedInput';
44
44
  export { Chip } from './Chip';
45
45
  export { RichmediaPreview, useRichmediaHtml } from './RichmediaPreview';
46
46
  export { SandboxedHtmlFrame } from './SandboxedHtmlFrame';
47
- export { NativeRichMediaPreview, parseNativeRichMediaConfig, parseLocalizationParams, NATIVE_RICH_MEDIA_DISPLAY_TYPES } from './NativeRichMediaPreview';
47
+ export { NativeRichMediaPreview, parseNativeRichMediaConfig, parseLocalizationParams, NATIVE_RICH_MEDIA_DISPLAY_TYPES, EDITABLE_NATIVE_RICH_MEDIA_DISPLAY_TYPES } from './NativeRichMediaPreview';
48
48
  export { RichMessageEditor, RichMessageViewer } from './RichMessageEditor';
49
49
  export { FrequencyCappingEdit, FrequencyCappingReadonly, FrequencyCappingInApps } from './FrequencyCapping';
50
50
  export { SendRateEdit, SendRateReadonly } from './SendRate';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.178",
3
+ "version": "1.1.180",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",