@pushwoosh/dumb-components 1.1.202 → 1.1.204

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
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useCallback } from 'react';
2
+ import { useCallback, useId } from 'react';
3
3
  import { Horizontal, Vertical } from '@pushwoosh/kit-helpers';
4
4
  import { Combobox } from '../../../Combobox';
5
5
  import { FieldBox } from '../../../FieldBox';
@@ -15,6 +15,7 @@ export function CountingMode(props) {
15
15
  onTimezoneChange
16
16
  } = props;
17
17
  const lang = useLang();
18
+ const radioGroupName = useId();
18
19
  const onModeChange = useCallback(value => {
19
20
  onCountingModeChange(value);
20
21
  }, [onCountingModeChange]);
@@ -33,7 +34,7 @@ export function CountingMode(props) {
33
34
  "$alignItems": "center",
34
35
  "$justifyContent": "start",
35
36
  children: [_jsx(Radio, {
36
- name: "cappingCountingMode",
37
+ name: radioGroupName,
37
38
  value: CappingCountingMode.ROLLING,
38
39
  isChecked: countingMode !== CappingCountingMode.CALENDAR_DAY,
39
40
  label: _jsx(Lang, {
@@ -44,7 +45,7 @@ export function CountingMode(props) {
44
45
  }),
45
46
  onChange: onModeChange
46
47
  }), _jsx(Radio, {
47
- name: "cappingCountingMode",
48
+ name: radioGroupName,
48
49
  value: CappingCountingMode.CALENDAR_DAY,
49
50
  isChecked: countingMode === CappingCountingMode.CALENDAR_DAY,
50
51
  label: _jsx(Lang, {
@@ -5,7 +5,7 @@ import { getCappingChipText } from './getCappingChipText';
5
5
  import { Tooltip } from '../../Tooltip';
6
6
  import { ChipFrequencyCapping } from '../components/Condition';
7
7
  import { IconWrapper } from '../styles';
8
- import { CappingTypes } from '../types';
8
+ import { CappingCountingMode, CappingTypes } from '../types';
9
9
  export function getReadonlyCappingLabel(cappingOption, isGlobalCappingDisabled, capping, globalCapping, isInJourney, lang) {
10
10
  const tooltip = getReadonlyTooltip(cappingOption, isInJourney, lang);
11
11
  if (cappingOption === CappingTypes.CUSTOM) {
@@ -15,6 +15,13 @@ export function getReadonlyCappingLabel(cappingOption, isGlobalCappingDisabled,
15
15
  }), _jsx(ChipFrequencyCapping, {
16
16
  text: getCappingChipText(lang, capping.messages, capping.days),
17
17
  tooltip: tooltip
18
+ }), capping.countingMode === CappingCountingMode.CALENDAR_DAY && _jsx(ChipFrequencyCapping, {
19
+ text: `${lang({
20
+ message: 'DUMB.FREQUENCY_CAPPING.COUNTING_MODE.CALENDAR_DAY'
21
+ })} · ${capping.timezone || 'UTC'}`,
22
+ tooltip: lang({
23
+ message: 'DUMB.FREQUENCY_CAPPING.COUNTING_MODE.CALENDAR_DAY_TOOLTIP'
24
+ })
18
25
  })]
19
26
  });
20
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.202",
3
+ "version": "1.1.204",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",