kupos-ui-components-lib 10.0.10 → 10.1.0

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,4 +1,5 @@
1
1
  import React from "react";
2
+ import commonService from "../utils/CommonService";
2
3
  const StageTooltip = ({ children, stageData, direction = 1, terminals, serviceItem, metaData, colors, position = "right", }) => {
3
4
  // ✅ moved inside
4
5
  const hideBoardingTime = (serviceItemApiType) => {
@@ -27,13 +28,13 @@ const StageTooltip = ({ children, stageData, direction = 1, terminals, serviceIt
27
28
  const sortedStages = hideTime
28
29
  ? [...formattedStages].sort()
29
30
  : [...formattedStages].sort(compareTimings);
30
- return (React.createElement("div", { className: "flex flex-col space-y-3 text-justify gap-[4px]" }, sortedStages.map((item, key) => (React.createElement("div", { key: key, className: "font-normal" }, hideTime
31
+ return (React.createElement("div", { className: "flex flex-col space-y-3 text-justify gap-[4px]" }, sortedStages.map((item, key) => (React.createElement("div", { key: key, className: "font-normal" }, commonService.capitalize(hideTime
31
32
  ? item === null || item === void 0 ? void 0 : item.split("|")[0]
32
33
  : item
33
34
  .replace(/false/g, "")
34
35
  .replace("true", "")
35
36
  .replace("|", " |")
36
- .replace("||", " |"))))));
37
+ .replace("||", " |")))))));
37
38
  }
38
39
  return null;
39
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "10.0.10",
3
+ "version": "10.1.0",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import commonService from "../utils/CommonService";
2
3
 
3
4
  const StageTooltip = ({
4
5
  children,
@@ -53,13 +54,15 @@ const StageTooltip = ({
53
54
  <div className="flex flex-col space-y-3 text-justify gap-[4px]">
54
55
  {sortedStages.map((item, key) => (
55
56
  <div key={key} className="font-normal">
56
- {hideTime
57
- ? item?.split("|")[0]
58
- : item
59
- .replace(/false/g, "")
60
- .replace("true", "")
61
- .replace("|", " |")
62
- .replace("||", " |")}
57
+ {commonService.capitalize(
58
+ hideTime
59
+ ? item?.split("|")[0]
60
+ : item
61
+ .replace(/false/g, "")
62
+ .replace("true", "")
63
+ .replace("|", " |")
64
+ .replace("||", " |"),
65
+ )}
63
66
  </div>
64
67
  ))}
65
68
  </div>