@widergy/mobile-ui 1.32.6 → 1.32.8

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.8](https://github.com/widergy/mobile-ui/compare/v1.32.7...v1.32.8) (2024-12-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * [OUG-7531] changes unique id logic ([#395](https://github.com/widergy/mobile-ui/issues/395)) ([d614f6e](https://github.com/widergy/mobile-ui/commit/d614f6edff0ab1458ff5a86065b709cb4dea6dc1))
7
+
8
+ ## [1.32.7](https://github.com/widergy/mobile-ui/compare/v1.32.6...v1.32.7) (2024-12-02)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * [UGC-1012] utselect no options text ([#391](https://github.com/widergy/mobile-ui/issues/391)) ([be869ed](https://github.com/widergy/mobile-ui/commit/be869ed0f96d0866b49c0ee2f91cbdfd161702fe))
14
+
1
15
  ## [1.32.6](https://github.com/widergy/mobile-ui/compare/v1.32.5...v1.32.6) (2024-12-02)
2
16
 
3
17
 
@@ -2,23 +2,24 @@
2
2
 
3
3
  ## Description
4
4
 
5
- `UTCheckBox` is a customizable checkbox component used within the `UTCheckList` component. It supports various states such as checked, indeterminate, and disabled.
5
+ `UTCheckBox` is a flexible checkbox component that supports multiple states (checked, indeterminate, disabled).
6
6
 
7
7
  ## Props
8
8
 
9
- | Name | Type | Default | Description |
10
- | ------------- | ------ | ------- | --------------------------------------------------------------------------- |
11
- | checked | bool | false | Indicates if the checkbox is checked. |
12
- | disabled | bool | false | Disables the checkbox, making it unclickable. |
13
- | indeterminate | bool | false | Indicates if the checkbox is in an indeterminate state. |
14
- | isSimple | bool | false | **Deprecated**: Use standard checkboxes instead. |
15
- | onPress | func | | Function to call when the checkbox is pressed. |
16
- | required | bool | false | Indicates if the checkbox is required. |
17
- | reversed | bool | false | If true, reverses the order of title and checkbox. |
18
- | spacing | string | medium | If "small", reduces the column gap from 16 to 8. |
19
- | style | shape | {} | Custom styles to apply to the checkbox container. Can contain root or title |
20
- | title | string | | Title to display next to the checkbox. |
21
- | variant | string | | The variant to use for styling the checkbox. |
9
+ | Name | Type | Default | Description |
10
+ | ------------- | ------ | ------- | ------------------------------------------------------------------------------ |
11
+ | value | bool | false | Indicates whether the checkbox is selected. |
12
+ | onChange | func | | Function to call when the checkbox value changes. |
13
+ | disabled | bool | false | Disables the checkbox, making it unclickable. |
14
+ | indeterminate | bool | false | Indicates if the checkbox is in an indeterminate state. |
15
+ | isSimple | bool | false | **Deprecated**: Avoid using simple checkboxes in favor of standard checkboxes. |
16
+ | required | bool | false | Indicates if the checkbox is required. |
17
+ | reversed | bool | false | If true, reverses the order of the title and checkbox. |
18
+ | spacing | string | medium | If "small", reduces the column gap from 16 to 8. |
19
+ | style | shape | {} | Custom styles to apply to the checkbox container or title. |
20
+ | title | string | | Text displayed next to the checkbox. |
21
+ | withMarkdown | bool | false | Enables Markdown rendering for the `title`. |
22
+ | variant | string | | The variant to use for styling the checkbox. |
22
23
 
23
24
  ## Usage
24
25
 
@@ -31,7 +32,7 @@ import UTCheckBox from './UTCheckBox';
31
32
  const Example = () => {
32
33
  const [checked, setChecked] = React.useState(false);
33
34
 
34
- return <UTCheckBox checked={checked} title="Check me" onPress={() => setChecked(!checked)} />;
35
+ return <UTCheckBox value={checked} title="Check me" onChange={setChecked} />;
35
36
  };
36
37
 
37
38
  export default Example;
@@ -13,6 +13,7 @@
13
13
  | title | string | | Title for the select field. |
14
14
  | multiple | bool | false | Allows multiple selection if true. |
15
15
  | noMatchesText | string | | Text to display when no matches are found in the search. |
16
+ | noOptionsText | string | | Text to display when no options are initially available (before a search term is provided). |
16
17
  | onChange | func | | Function to call when the input field value changes. |
17
18
  | options | array | | Array of options to be displayed in the dropdown. Each option is an object with `label` and `value`. |
18
19
  | placeholder | string | | Placeholder text for the select field. |
@@ -26,6 +26,7 @@ const UTSelect = ({
26
26
  helpText,
27
27
  multiple,
28
28
  noMatchesText,
29
+ noOptionsText,
29
30
  onChange,
30
31
  options,
31
32
  placeholder,
@@ -186,7 +187,7 @@ const UTSelect = ({
186
187
  />
187
188
  {isEmpty(filteredOptions) ? (
188
189
  <UTLabel colorTheme="gray" style={styles.noMatchesText}>
189
- {noMatchesText}
190
+ {!searchTerm ? noOptionsText : noMatchesText}
190
191
  </UTLabel>
191
192
  ) : (
192
193
  <ScrollView keyboardShouldPersistTaps="handled">
@@ -25,6 +25,7 @@ export const propTypes = {
25
25
  helpText: string,
26
26
  multiple: bool,
27
27
  noMatchesText: string,
28
+ noOptionsText: string,
28
29
  onChange: func,
29
30
  options: arrayOf(
30
31
  shape({
@@ -14,7 +14,8 @@ const styles = StyleSheet.create({
14
14
  noMatchesText: {
15
15
  alignSelf: 'center',
16
16
  paddingHorizontal: 16,
17
- paddingVertical: 24
17
+ paddingVertical: 24,
18
+ textAlign: 'center'
18
19
  }
19
20
  });
20
21
 
@@ -68,11 +68,13 @@ export const multiTracking = trackerArgumentsArray =>
68
68
  );
69
69
 
70
70
  export const mixpanelUserIdentify = mixpanelInstance => (userProfileProperties, utilityId) => {
71
- const { id, externalId = '', email } = userProfileProperties;
71
+ const { id, externalId, email } = userProfileProperties;
72
+ const distinctId = `${utilityId}-${externalId ?? id}`;
73
+
72
74
  if (mixpanelInstance) {
73
- mixpanelInstance.identify(`${utilityId}${id}${externalId}`);
75
+ mixpanelInstance.identify(distinctId);
74
76
  mixpanelInstance.getPeople().set({
75
- $name: `${utilityId}${id}${externalId}`,
77
+ $name: distinctId,
76
78
  $email: email ?? null,
77
79
  ...userProfileProperties
78
80
  });
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.6",
5
+ "version": "1.32.8",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [