@widergy/mobile-ui 1.32.12 → 1.32.14

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.32.14](https://github.com/widergy/mobile-ui/compare/v1.32.13...v1.32.14) (2025-01-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * [EVE-4365] status message header ([#400](https://github.com/widergy/mobile-ui/issues/400)) ([dee9119](https://github.com/widergy/mobile-ui/commit/dee9119464bf4583eee62bafdc3dd8e42581d369))
7
+
8
+ ## [1.32.13](https://github.com/widergy/mobile-ui/compare/v1.32.12...v1.32.13) (2024-12-20)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * [DS-368] implement argos events ([#399](https://github.com/widergy/mobile-ui/issues/399)) ([eda2408](https://github.com/widergy/mobile-ui/commit/eda2408afe760aafcfc3f2f8718a3929302ab92e))
14
+
1
15
  ## [1.32.12](https://github.com/widergy/mobile-ui/compare/v1.32.11...v1.32.12) (2024-12-11)
2
16
 
3
17
 
@@ -2,14 +2,13 @@ import React, { PureComponent, createRef } from 'react';
2
2
  import { View } from 'react-native';
3
3
  import { bool, elementType, func, number, shape, string } from 'prop-types';
4
4
 
5
+ import { COMPONENT_KEYS } from '../UTBaseInputField/constants';
6
+ import { formatErrorToValidation } from '../UTValidation/utils';
7
+ import { TITLE_VARIANTS } from '../../constants/inputs';
5
8
  import UTBaseInputField from '../UTBaseInputField';
6
9
  import UTFieldLabel from '../UTFieldLabel';
7
10
  import UTLabel from '../UTLabel';
8
- import UTValidation from '../UTValidation';
9
- import { formatErrorToValidation } from '../UTValidation/utils';
10
- import { TITLE_VARIANTS } from '../../constants/inputs';
11
- import { COMPONENT_KEYS } from '../UTBaseInputField/constants';
12
- import { validationDataProptypes } from '../UTValidation/constants';
11
+ import UTValidation, { validationDataProptypes } from '../UTValidation';
13
12
 
14
13
  import { AREA_CODES } from './constants';
15
14
  import styles from './styles';
@@ -7,15 +7,15 @@ The purpose of this component, as its name indicates, is to communicate a messag
7
7
  | Name | Type | Default | Description |
8
8
  | --------------------- | --------- | ------- | -------------------------------------------------------------------------------------------------------- |
9
9
  | children | element | | The content to be rendered inside the component. |
10
- | style | object | | Custom styles for styling the component. |
10
+ | style | object | | Custom styles for styling the component. |
11
11
  | colorTheme | string | default | Defines the color theme for the component. |
12
12
  | description | string | | Description text providing additional context or information. |
13
13
  | descriptionProps | object | | Props to be applied to the description UTLabel. |
14
14
  | helpText | string | | Help text displayed to guide the user. |
15
15
  | helpTextProps | object | | Props to be applied to the help text UTLabel. |
16
16
  | icon | string | | Icon to be displayed in the header. |
17
- | iconProps | object | | Props to be applied to the UTIcon |
18
- | image | string | | URL of an image to be displayed in the header, replacing the icon. |
17
+ | iconProps | object | | Props to be applied to the UTIcon |
18
+ | HeaderComponent | element | | Component to be displayed in the header, replacing the icon. |
19
19
  | loading | bool | false | Indicates whether the component is in a loading state. Replaces the header. |
20
20
  | primaryAction | func | | Callback function for the primary action. |
21
21
  | primaryActionProps | object | | Props to be applied to the primary action UTButton. |
@@ -7,7 +7,6 @@ import UTButton from '../UTButton';
7
7
  import UTIcon from '../UTIcon';
8
8
  import UTLabel from '../UTLabel';
9
9
  import UTLoading from '../UTLoading';
10
- import UTImage from '../UTImage';
11
10
  import { withTheme } from '../../theming';
12
11
 
13
12
  import { ICON_COLOR_THEMES, COLOR_THEMES } from './constants';
@@ -18,11 +17,11 @@ const UTStatusMessage = ({
18
17
  colorTheme = COLOR_THEMES.DEFAULT,
19
18
  description,
20
19
  descriptionProps,
20
+ HeaderComponent,
21
21
  helpText,
22
22
  helpTextProps,
23
23
  icon = 'IconInfoCircle',
24
24
  iconProps = {},
25
- image,
26
25
  loading,
27
26
  primaryAction,
28
27
  primaryActionProps,
@@ -52,8 +51,8 @@ const UTStatusMessage = ({
52
51
  style={[ownStyles.banner(theme, colorTheme, showBanner), style.banner]}
53
52
  useAngle
54
53
  >
55
- {image ? (
56
- <UTImage source={image} style={{ ...style.image }} />
54
+ {HeaderComponent ? (
55
+ <HeaderComponent />
57
56
  ) : (
58
57
  <IconContainer
59
58
  angle={45}
@@ -111,11 +110,11 @@ UTStatusMessage.propTypes = {
111
110
  colorTheme: string,
112
111
  description: string,
113
112
  descriptionProps: object,
113
+ HeaderComponent: element,
114
114
  helpText: string,
115
115
  helpTextProps: object,
116
116
  icon: string,
117
117
  iconProps: object,
118
- image: string,
119
118
  loading: bool,
120
119
  primaryAction: func,
121
120
  primaryActionProps: object,
@@ -121,6 +121,10 @@ export const singleInhouseEvent = sendInhouseAnalytics => eventData => {
121
121
  sendInhouseAnalytics(null, eventData);
122
122
  };
123
123
 
124
+ export const singleArgosEvent = sendArgosAnalytics => eventData => {
125
+ sendArgosAnalytics(eventData);
126
+ };
127
+
124
128
  export const singleEventMultitracking = (trackers, eventDefinitions) => (name, eventData) => {
125
129
  const mergedData = merge(eventDefinitions[name] || {}, eventData || {});
126
130
  const { sharedProps, ...trackerProps } = mergedData;
@@ -154,11 +158,12 @@ export default {
154
158
  mixpanelUserReset,
155
159
  multiTracking,
156
160
  setUserTracking,
161
+ singleArgosEvent,
157
162
  singleEventMultitracking,
158
163
  singleFirebaseEvent,
159
164
  singleInhouseEvent,
160
165
  singleMixpanelEvent,
166
+ tracker,
161
167
  trackEvent,
162
- trackScreen,
163
- tracker
168
+ trackScreen
164
169
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@widergy/mobile-ui",
3
3
  "description": "Widergy Mobile Components",
4
4
  "author": "widergy",
5
- "version": "1.32.12",
5
+ "version": "1.32.14",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [