@tap-payments/os-micro-frontend-shared 0.1.146 → 0.1.147-test.1

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.
@@ -4,4 +4,5 @@ export declare const statusIcons: {
4
4
  closed: string;
5
5
  expired: string;
6
6
  ready: string;
7
+ registered: string;
7
8
  };
@@ -5,4 +5,5 @@ export const statusIcons = {
5
5
  closed: closedLeadStatusIcon,
6
6
  expired: expiredLeadStatusIcon,
7
7
  ready: readyLeadStatusIcon,
8
+ registered: completedLeadStatusIcon,
8
9
  };
@@ -19,13 +19,13 @@ import { TableCell } from '../../../TableCells';
19
19
  import { segmentsIcons } from './constant';
20
20
  import { ReferenceTextLabel, ReferenceTextWrapper, ReferenceSourcesContainer, StyledSourceCell, referenceSourceAnimation } from './style';
21
21
  import IconWithBadge from '../../../IconWithBadge';
22
+ import { getSegmentTooltip } from './utils';
22
23
  function SegmentsCell(_a) {
23
24
  var { isTextShown, segments } = _a, props = __rest(_a, ["isTextShown", "segments"]);
24
25
  const [isTooltipOpen, setIsTooltipOpen] = useState(false);
25
26
  const theme = useTheme();
26
27
  const ReferenceSources = useMemo(() => segments === null || segments === void 0 ? void 0 : segments.filter((segment) => !!segment.name).map((segment, index) => {
27
- const prefixKey = ['technology', 'institution'].includes(segment.type) ? 'Payment' : '';
28
- const sourceTooltip = segment.tooltip || `${prefixKey} ${startCase(segment.type)} - ${segment.name}`;
28
+ const sourceTooltip = segment.tooltip || getSegmentTooltip(segment);
29
29
  return (_jsx(Tooltip, Object.assign({ onOpen: () => {
30
30
  setIsTooltipOpen(true);
31
31
  }, onClose: () => {
@@ -0,0 +1,2 @@
1
+ import { SegmentInfo } from './type';
2
+ export declare const getSegmentTooltip: (segment: SegmentInfo) => string;
@@ -0,0 +1,14 @@
1
+ import { startCase } from 'lodash';
2
+ export const getSegmentTooltip = (segment) => {
3
+ let prefixKey = '';
4
+ switch (segment.type) {
5
+ case 'technology':
6
+ case 'institution':
7
+ prefixKey = 'Payment';
8
+ break;
9
+ case 'platform':
10
+ prefixKey = 'Platform';
11
+ break;
12
+ }
13
+ return `${prefixKey} ${startCase(segment.type)} - ${segment.name}`;
14
+ };
@@ -709,6 +709,21 @@ export declare const APP_CODES: {
709
709
  lead: {
710
710
  code: string;
711
711
  };
712
+ create: {
713
+ code: string;
714
+ };
715
+ update: {
716
+ code: string;
717
+ };
718
+ close: {
719
+ code: string;
720
+ };
721
+ convert: {
722
+ code: string;
723
+ };
724
+ connect: {
725
+ code: string;
726
+ };
712
727
  view: {
713
728
  code: string;
714
729
  };
@@ -278,6 +278,16 @@ export const APP_CODES = {
278
278
  code: 'ACCOUNT',
279
279
  }, lead: {
280
280
  code: 'LEAD',
281
+ }, create: {
282
+ code: 'CREATE',
283
+ }, update: {
284
+ code: 'UPDATE',
285
+ }, close: {
286
+ code: 'CLOSE',
287
+ }, convert: {
288
+ code: 'CONVERT',
289
+ }, connect: {
290
+ code: 'CONNECT',
281
291
  } }),
282
292
  },
283
293
  },
@@ -15,3 +15,4 @@ export declare const maskValue: (value: string) => string;
15
15
  * @returns The transformed string with proper case formatting
16
16
  */
17
17
  export declare const transformStringToProperCase: (text: string, separator?: string | RegExp, replacement?: string) => string;
18
+ export declare const capitalizeString: (text?: string) => string;
@@ -1,3 +1,4 @@
1
+ import { capitalize } from 'lodash';
1
2
  import startCase from 'lodash/startCase';
2
3
  export const removePrefixFromString = (str, prefix) => {
3
4
  if (!prefix) {
@@ -67,3 +68,6 @@ export const transformStringToProperCase = (text, separator = /_/g, replacement
67
68
  // Apply proper case formatting
68
69
  return startCase(updatedText);
69
70
  };
71
+ export const capitalizeString = (text) => {
72
+ return capitalize(text === null || text === void 0 ? void 0 : text.replace(/_/g, ' '));
73
+ };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.146",
5
- "testVersion": 0,
4
+ "version": "0.1.147-test.1",
5
+ "testVersion": 1,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -163,4 +163,4 @@
163
163
  "publishConfig": {
164
164
  "registry": "https://registry.npmjs.org/"
165
165
  }
166
- }
166
+ }