string_of_int} attributes=[("data-table-location", location)]>
React.array}
- Belt.Int.toString)]>
+ Int.toString)]>
{getRowDetails(rowIndex)} |
diff --git a/src/components/CustomCharts/FunnelChart.res b/src/components/CustomCharts/FunnelChart.res
index 5f75d27aa..2aea59dd8 100644
--- a/src/components/CustomCharts/FunnelChart.res
+++ b/src/components/CustomCharts/FunnelChart.res
@@ -15,18 +15,16 @@ let make = (
let funnelData = data->Array.get(0)->Option.getOr(Js.Json.null)->LogicUtils.getDictFromJsonObject
let (hoverIndex, setHoverIndex) = React.useState(_ => -1.)
let (selectedMetric, setSelectedMetric) = React.useState(_ => Volume)
- let length = metrics->Array.length->Belt.Float.fromInt
+ let length = metrics->Array.length->Float.fromInt
let widths = metrics->Array.mapWithIndex((metric, i) => {
let previousMetric = metrics->Array.get(i - 1)
let previousMetric = switch previousMetric {
| Some(prevMetric) => prevMetric.metric_name_db
| None => ""
}
- let currentVol = funnelData->LogicUtils.getInt(metric.metric_name_db, 0)->Belt.Float.fromInt
+ let currentVol = funnelData->LogicUtils.getInt(metric.metric_name_db, 0)->Float.fromInt
let previousVol =
- funnelData
- ->LogicUtils.getInt(previousMetric, currentVol->Belt.Float.toInt)
- ->Belt.Float.fromInt
+ funnelData->LogicUtils.getInt(previousMetric, currentVol->Float.toInt)->Float.fromInt
Js.Math.log10(currentVol *. 100. /. previousVol) /. 2.0
})
@@ -75,31 +73,31 @@ let make = (
{metrics
->Array.mapWithIndex((_metric, i) => {
- let i = i->Belt.Float.fromInt
+ let i = i->Float.fromInt
let opacity = (i +. 1.) /. length
let borderTop = `${(size *. 14.)
- ->Belt.Float.toString}rem solid rgb(0,109,249,${opacity->Belt.Float.toString})`
+ ->Float.toString}rem solid rgb(0,109,249,${opacity->Float.toString})`
- let currentWidthRatio = switch widths->Array.get(i->Belt.Float.toInt) {
+ let currentWidthRatio = switch widths->Array.get(i->Float.toInt) {
| Some(width) => width
| None => size *. 70.
}
- let nextWidthRatio = switch widths->Array.get(i->Belt.Float.toInt + 1) {
+ let nextWidthRatio = switch widths->Array.get(i->Float.toInt + 1) {
| Some(width) => width
- | None => widths->Array.get(i->Belt.Float.toInt)->Option.getOr(size *. 70.)
+ | None => widths->Array.get(i->Float.toInt)->Option.getOr(size *. 70.)
}
fixedWidth := currentWidthRatio *. fixedWidth.contents
let borderXFloat = (1. -. nextWidthRatio) *. fixedWidth.contents /. 2.
- let borderX = `${borderXFloat->Belt.Float.toString}rem solid transparent`
+ let borderX = `${borderXFloat->Float.toString}rem solid transparent`
- let width = `${fixedWidth.contents->Belt.Float.toString}rem`
+ let width = `${fixedWidth.contents->Float.toString}rem`
- let marginBottom = `${(size *. 1.4)->Belt.Float.toString}rem`
+ let marginBottom = `${(size *. 1.4)->Float.toString}rem`
let funnelElement =
Belt.Float.toString}funnelStage`}
+ key={`${i->Float.toString}funnelStage`}
className="flex hover:cursor-pointer transition ease-in-out hover:scale-110 duration-300"
style={ReactDOMStyle.make(
~borderTop,
@@ -122,9 +120,9 @@ let make = (
open LogicUtils
metrics
->Array.mapWithIndex((metric, i) => {
- let marginBottom = `${(size *. 1.4)->Belt.Float.toString}rem`
- let paddingTop = `${(size *. 4.2)->Belt.Float.toString}rem`
- let metricVal = funnelData->getInt(metric.metric_name_db, 0)->Belt.Float.fromInt
+ let marginBottom = `${(size *. 1.4)->Float.toString}rem`
+ let paddingTop = `${(size *. 4.2)->Float.toString}rem`
+ let metricVal = funnelData->getInt(metric.metric_name_db, 0)->Float.fromInt
let prevMetricVolume = switch prevMetricVol.contents {
| Some(vol) => vol
| None => metricVal
@@ -136,7 +134,7 @@ let make = (
}
Belt.Int.toString}funnelStageVol`}
+ key={`${i->Int.toString}funnelStageVol`}
className={`flex flex-row gap-4 h-full items-center w-max`}
style={ReactDOMStyle.make(~marginBottom, ~paddingTop, ())}>
{metrics
->Array.mapWithIndex((metric, i) => {
- let marginBottom = `${(size *. 2.1)->Belt.Float.toString}rem`
- let paddingTop = `${(size *. 3.4 *. 1.4)->Belt.Float.toString}rem`
+ let marginBottom = `${(size *. 2.1)->Float.toString}rem`
+ let paddingTop = `${(size *. 3.4 *. 1.4)->Float.toString}rem`
Belt.Int.toString}funnelStageDesc`}
+ key={`${i->Int.toString}funnelStageDesc`}
className={`flex flex-row gap-4 h-full items-center w-max items-start`}
style={ReactDOMStyle.make(~marginBottom, ~paddingTop, ())}>
Belt.Float.fromInt
+ i->Float.fromInt
? "text-blue-900 scale-110"
: "text-jp-gray-800 dark:text-dark_theme"}`}>
{metric.metric_label->React.string}
diff --git a/src/components/CustomCharts/HighchartHorizontalBarChart.res b/src/components/CustomCharts/HighchartHorizontalBarChart.res
index 35e488105..c21506dbb 100644
--- a/src/components/CustomCharts/HighchartHorizontalBarChart.res
+++ b/src/components/CustomCharts/HighchartHorizontalBarChart.res
@@ -52,7 +52,7 @@ let xLabelFormatter: Js_OO.Callback.arity1 string> = {
| None => 0
}
` ${value} ` ++
- (y->Belt.Float.fromInt *. 100. /. seriesSum->Belt.Float.fromInt)
+ (y->Float.fromInt *. 100. /. seriesSum->Float.fromInt)
->Js.Float.toFixedWithPrecision(~digits=2) ++ `% `
}
}
@@ -78,11 +78,11 @@ let make = (
let barOption: Js.Json.t = React.useMemo2(() => {
let colors = {
- let length = barChartData->Array.length->Belt.Int.toFloat
+ let length = barChartData->Array.length->Int.toFloat
barChartData->Array.mapWithIndex((_data, i) => {
- let i = i->Belt.Int.toFloat
+ let i = i->Int.toFloat
let opacity = (length -. i +. 1.) /. (length +. 1.)
- `rgb(0,109,249,${opacity->Belt.Float.toString})`
+ `rgb(0,109,249,${opacity->Float.toString})`
})
}
let defaultOptions: HighchartsHorizontalBarChart.options = {
diff --git a/src/components/CustomCharts/HighchartPieChart.res b/src/components/CustomCharts/HighchartPieChart.res
index 1759f49dc..ce214cd5b 100644
--- a/src/components/CustomCharts/HighchartPieChart.res
+++ b/src/components/CustomCharts/HighchartPieChart.res
@@ -47,11 +47,11 @@ let make = (
let barOption: Js.Json.t = React.useMemo2(() => {
let colors = {
- let length = pieSeriesData->Array.length->Belt.Int.toFloat
+ let length = pieSeriesData->Array.length->Int.toFloat
pieSeriesData->Array.mapWithIndex((_data, i) => {
- let i = i->Belt.Int.toFloat
+ let i = i->Int.toFloat
let opacity = (length -. i +. 1.) /. (length +. 1.)
- `rgb(0,109,249,${opacity->Belt.Float.toString})`
+ `rgb(0,109,249,${opacity->Float.toString})`
})
}
let defaultOptions: HighchartsPieChart.options = {
diff --git a/src/components/CustomCharts/HighchartTimeSeriesChart.res b/src/components/CustomCharts/HighchartTimeSeriesChart.res
index 554e72b99..3693fc372 100644
--- a/src/components/CustomCharts/HighchartTimeSeriesChart.res
+++ b/src/components/CustomCharts/HighchartTimeSeriesChart.res
@@ -123,7 +123,7 @@ module LineChart1D = {
->Js.Date.fromFloat
->DateTimeUtils.toUtc
->Js.Date.getHours
- ->Belt.Float.toString}:00`
+ ->Float.toString}:00`
->String.sliceToEnd(~start=-5)
->Js.Json.string
} else if "run_month" === groupKey {
@@ -131,11 +131,11 @@ module LineChart1D = {
->Js.Date.fromFloat
->DateTimeUtils.toUtc
->Js.Date.getDate
- ->Belt.Float.toString
+ ->Float.toString
->Js.Json.string
} else if "run_week" === groupKey {
switch DateTimeUtils.daysArr[
- xAxis->Js.Date.fromFloat->DateTimeUtils.toUtc->Js.Date.getDay->Belt.Float.toInt
+ xAxis->Js.Date.fromFloat->DateTimeUtils.toUtc->Js.Date.getDay->Float.toInt
] {
| Some(ele) => DateTimeUtils.dayMapper(ele)
| None => ""
@@ -622,7 +622,7 @@ module LineChart1D = {
let positions = NumericUtils.pretty([lower_bound, upper_bound], 5)
let positionArr =
- Belt.Array.concat(positions, [threshold])->Js.Array2.sortInPlaceWith(
+ Array.concat(positions, [threshold])->Js.Array2.sortInPlaceWith(
numericArraySortComperator,
)
positionArr
@@ -801,7 +801,7 @@ module LegendItem = {
module RenderMultiDimensionalChart = {
type config = {
- chartDictData: Dict.t>,
+ chartDictData: Dict.t>,
class: string,
selectedMetrics: LineChartUtils.metricsConfig,
groupBy: string,
@@ -853,7 +853,7 @@ module RenderMultiDimensionalChart = {
let (key, value) = item
Belt.Int.toString}
+ key={index->Int.toString}
class=config.class
rawChartData=value
commonColorsArr={LineChartUtils.removeDuplicates(chartNames)}
diff --git a/src/components/CustomCharts/LineChartUtils.res b/src/components/CustomCharts/LineChartUtils.res
index f76e33e51..5ca3e5e67 100644
--- a/src/components/CustomCharts/LineChartUtils.res
+++ b/src/components/CustomCharts/LineChartUtils.res
@@ -112,8 +112,8 @@ let reduceOpacity = str => {
switch match {
| Some(val) => {
let opacity = val->Array.get(1)->Option.flatMap(a => a)->Option.getOr("0")
- let newOpacity = opacity->Belt.Float.fromString->Option.getOr(0.0) /. 10.0
- str->String.replace(opacity, newOpacity->Belt.Float.toString)
+ let newOpacity = opacity->Float.fromString->Option.getOr(0.0) /. 10.0
+ str->String.replace(opacity, newOpacity->Float.toString)
}
| None => "0"
}
@@ -190,7 +190,7 @@ let legendTypeBasedOnMetric = (metric_type: dropDownMetricType) => {
}
let appendToDictValue = (dict, key, value) => {
let updatedValue = switch dict->Dict.get(key) {
- | Some(val) => Belt.Array.concat(val, [value])
+ | Some(val) => Array.concat(val, [value])
| None => [value]
}
dict->Dict.set(key, updatedValue)
@@ -297,7 +297,7 @@ let timeSeriesDataMaker = (
(xAxisDataPoint->DateTimeUtils.parseAsFloat, yAxisDataPoint, secondryAxisPoint),
)
groupedByTime->addToDictValueFloat(
- xAxisDataPoint->DateTimeUtils.parseAsFloat->Belt.Float.toString,
+ xAxisDataPoint->DateTimeUtils.parseAsFloat->Float.toString,
yAxisDataPoint,
)
}
@@ -318,7 +318,7 @@ let timeSeriesDataMaker = (
->Array.map(item => {
let (key, value, secondryMetrix) = item
let trafficValue =
- value *. 100. /. groupedByTime->Dict.get(key->Belt.Float.toString)->Option.getOr(1.)
+ value *. 100. /. groupedByTime->Dict.get(key->Float.toString)->Option.getOr(1.)
(key, trafficValue, secondryMetrix)
})
->Js.Array2.sortInPlaceWith(chartDataSortBasedOnTime)
@@ -414,7 +414,7 @@ let getLegendDataForCurrentMetrix = (
let value: legendTableData = {
groupByName: key,
overall,
- average: overall /. arrLen->Belt.Int.toFloat,
+ average: overall /. arrLen->Int.toFloat,
current: currentVal,
}
value
@@ -447,7 +447,7 @@ let getLegendDataForCurrentMetrix = (
Js.Math.max_float(totalOverall, 1.))
->Js.Float.toFixedWithPrecision(~digits=2)
->removeTrailingZero
- ->Belt.Float.fromString
+ ->Float.fromString
->Option.getOr(0.)
} else {
currentOverall->Dict.get(metricsName)->Option.getOr(0.)
@@ -461,7 +461,7 @@ let getLegendDataForCurrentMetrix = (
let value: legendTableData = {
groupByName: metricsName,
overall,
- average: overall /. arrLen->Belt.Int.toFloat,
+ average: overall /. arrLen->Int.toFloat,
current: currentVal,
}
value
@@ -531,9 +531,7 @@ let legendClickItem = (s: Highcharts.legendItem, e, setState) => {
if x === legendItemAsBool(s) {
setState(prev => {
let value =
- prev->Array.includes(x)
- ? prev->Array.filter(item => item !== x)
- : Belt.Array.concat(prev, [x])
+ prev->Array.includes(x) ? prev->Array.filter(item => item !== x) : Array.concat(prev, [x])
if value->Array.length === 0 {
Array.forEach(
@@ -752,7 +750,7 @@ let getGranularityNewStr = (~startTime, ~endTime) => {
unit
}
} else {
- `${val->Belt.Int.toString} ${unit}`
+ `${val->Int.toString} ${unit}`
}
})
}
diff --git a/src/components/CustomExpandableTable.res b/src/components/CustomExpandableTable.res
index 7708bb563..f6bd7a593 100644
--- a/src/components/CustomExpandableTable.res
+++ b/src/components/CustomExpandableTable.res
@@ -40,7 +40,7 @@ let make = (
let rowInfo: array> = {
let a = rows->Array.mapWithIndex((data, i) => {
if showSerial {
- data->Array.unshift(Text((i + 1)->Belt.Int.toString))->ignore
+ data->Array.unshift(Text((i + 1)->Int.toString))->ignore
}
data
})
@@ -57,7 +57,7 @@ let make = (
switch setFilterObj {
| Some(fn) =>
fn((prevFilterObj: option>) => {
- prevFilterObj->Belt.Option.map(prevObj => {
+ prevFilterObj->Option.map(prevObj => {
prevObj->Array.map(
obj => {
if obj.key === string_of_int(i) {
diff --git a/src/components/CustomizeTableColumns.res b/src/components/CustomizeTableColumns.res
index 0292caebe..761f9ea5d 100644
--- a/src/components/CustomizeTableColumns.res
+++ b/src/components/CustomizeTableColumns.res
@@ -18,7 +18,7 @@ let make = (
heading
->Array.mapWithIndex((item, index) => (
getHeading(item).title,
- index->Belt.Int.toFloat->Js.Json.number,
+ index->Int.toFloat->Js.Json.number,
))
->Dict.fromArray
diff --git a/src/components/DateRangePicker.res b/src/components/DateRangePicker.res
index e60941f0e..612a97110 100644
--- a/src/components/DateRangePicker.res
+++ b/src/components/DateRangePicker.res
@@ -231,7 +231,7 @@ module Base = {
switch dateRangeLimit {
| Some(maxLen) => {
let diff = getStartEndDiff(localStartDate, localEndDate)
- if diff > (maxLen->Belt.Int.toFloat *. 24. *. 60. *. 60. -. 1.) *. 1000. {
+ if diff > (maxLen->Int.toFloat *. 24. *. 60. *. 60. -. 1.) *. 1000. {
setShowMsg(_ => true)
resetStartEndInput()
}
@@ -385,9 +385,9 @@ module Base = {
}
let onDateClick = str => {
- let data = switch Belt.Array.getBy(clickedDates, x => x == str) {
+ let data = switch Array.find(clickedDates, x => x == str) {
| Some(_d) => Belt.Array.keep(clickedDates, x => x != str)
- | None => Belt.Array.concat(clickedDates, [str])
+ | None => Array.concat(clickedDates, [str])
}
let dat = data->Array.map(x => x)
setClickedDates(_ => dat)
@@ -663,8 +663,7 @@ module Base = {
switch dateRangeLimit {
| Some(limit) =>
predefinedDays->Array.filter(item => {
- getDiffForPredefined(item) <=
- (limit->Belt.Float.fromInt *. 24. *. 60. *. 60. -. 1.) *. 1000.
+ getDiffForPredefined(item) <= (limit->Float.fromInt *. 24. *. 60. *. 60. -. 1.) *. 1000.
})
| None => predefinedDays
}
@@ -788,7 +787,7 @@ module Base = {
} else if showMsg {
let msg = `Date Range should not exceed ${dateRangeLimit
->Option.getOr(0)
- ->Belt.Int.toString} days`
+ ->Int.toString} days`
{React.string(msg)}
diff --git a/src/components/DynamicSingleStat.res b/src/components/DynamicSingleStat.res
index e7686e14f..d726b99a9 100644
--- a/src/components/DynamicSingleStat.res
+++ b/src/components/DynamicSingleStat.res
@@ -323,9 +323,7 @@ let make = (
switch totalVolumeKeyVal {
| Some(data) => {
let (_key, value) = data
- setTotalVolume(
- _ => value->Js.Json.decodeNumber->Option.getOr(0.)->Belt.Float.toInt,
- )
+ setTotalVolume(_ => value->Js.Json.decodeNumber->Option.getOr(0.)->Float.toInt)
}
| None => ()
diff --git a/src/components/DynamicTable.res b/src/components/DynamicTable.res
index ac9a4458a..9f414ae47 100644
--- a/src/components/DynamicTable.res
+++ b/src/components/DynamicTable.res
@@ -207,7 +207,7 @@ let make = (
let defaultFilterOffset =
defaultFilters->LogicUtils.getDictFromJsonObject->LogicUtils.getInt("offset", 0)
let dictValue = if val === "offset" {
- defaultFilterOffset->Belt.Int.toString
+ defaultFilterOffset->Int.toString
} else {
let x =
filtersFromUrl
diff --git a/src/components/DynamicTableUtils.res b/src/components/DynamicTableUtils.res
index f7b58882e..65452ecfa 100644
--- a/src/components/DynamicTableUtils.res
+++ b/src/components/DynamicTableUtils.res
@@ -147,13 +147,13 @@ let convertStrCellToFloat = (dataType: Table.cellType, str: string) => {
switch dataType {
| DropDown | LabelType | TextType => str->Js.Json.string
| MoneyType | NumericType | ProgressType =>
- str->Belt.Float.fromString->Option.getOr(0.)->Js.Json.number
+ str->Float.fromString->Option.getOr(0.)->Js.Json.number
}
}
let convertFloatCellToStr = (dataType: Table.cellType, num: float) => {
switch dataType {
- | DropDown | LabelType | TextType => num->Belt.Float.toString->Js.Json.string
+ | DropDown | LabelType | TextType => num->Float.toString->Js.Json.string
| MoneyType | NumericType | ProgressType => num->Js.Json.number
}
}
diff --git a/src/components/DynamicTabs.res b/src/components/DynamicTabs.res
index d55a9726b..61ec267b8 100644
--- a/src/components/DynamicTabs.res
+++ b/src/components/DynamicTabs.res
@@ -211,7 +211,7 @@ module IndicationArrow = {
}
let getBoundingRectInfo = (ref: React.ref>, getter) => {
- ref.current->Js.Nullable.toOption->Belt.Option.map(getBoundingClientRect)->Option.mapOr(0, getter)
+ ref.current->Js.Nullable.toOption->Option.map(getBoundingClientRect)->Option.mapOr(0, getter)
}
@react.component
@@ -272,7 +272,7 @@ let make = (
->Array.filter(item => !(defautTabValues->Array.includes(item)))
let tabsFromPreference =
- Belt.Array.concat(defautTabValues, tabsFromPreference)->Array.map(item =>
+ Array.concat(defautTabValues, tabsFromPreference)->Array.map(item =>
item->String.split(",")
)
@@ -609,7 +609,7 @@ let make = (
Belt.Int.toString} segments`}
+ modalHeadingDescription={`You can choose upto maximum of ${maxSelection->Int.toString} segments`}
?headerTextClass
showModal
setShowModal
diff --git a/src/components/HSwitchSingleStatWidget.res b/src/components/HSwitchSingleStatWidget.res
index 78c280bae..af3307342 100644
--- a/src/components/HSwitchSingleStatWidget.res
+++ b/src/components/HSwitchSingleStatWidget.res
@@ -67,7 +67,7 @@ let make = (
} else if statType === "LatencyMs" {
latencyShortNum(~labelValue=value, ~includeMilliseconds=true, ())
} else {
- value->Belt.Float.toString
+ value->Float.toString
}
}
diff --git a/src/components/HandlingEvents.res b/src/components/HandlingEvents.res
index 91e26f97c..19de49a1d 100644
--- a/src/components/HandlingEvents.res
+++ b/src/components/HandlingEvents.res
@@ -9,7 +9,7 @@ let getEventDict = (ev: Dom.event) => {
try {
objData.data
->Js.Json.decodeString
- ->Belt.Option.map(Js.Json.parseExn)
+ ->Option.map(Js.Json.parseExn)
->Option.flatMap(parsedMsg => {
parsedMsg->Js.Json.decodeObject
})
diff --git a/src/components/InfraCalendar.res b/src/components/InfraCalendar.res
index 498fb2486..b0f8ba698 100644
--- a/src/components/InfraCalendar.res
+++ b/src/components/InfraCalendar.res
@@ -143,8 +143,8 @@ module TableRow = {
startDate,
endDate,
obj,
- Belt.Float.toString(month +. 1.0),
- Belt.Float.toString(year),
+ Float.toString(month +. 1.0),
+ Float.toString(year),
)
}
@@ -192,7 +192,7 @@ let make = (
let _ = highLightList
let months = [Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]
let heading = ["S", "M", "T", "W", "T", "F", "S"]
- let getMonthInFloat = mon => Array.indexOf(months, mon)->Belt.Float.fromInt
+ let getMonthInFloat = mon => Array.indexOf(months, mon)->Float.fromInt
let getMonthInStr = mon => {
switch mon {
| Jan => "January, "
@@ -211,7 +211,7 @@ let make = (
}
// get first day
let firstDay = Js.Date.getDay(
- Js.Date.makeWithYM(~year=Belt.Int.toFloat(year), ~month=getMonthInFloat(month), ()),
+ Js.Date.makeWithYM(~year=Int.toFloat(year), ~month=getMonthInFloat(month), ()),
)
// get Days in month
let daysInMonth = switch month {
@@ -234,15 +234,15 @@ let make = (
let rowMapper = (row, indexRow) => {
Array.mapWithIndex(row, (_item, index) => {
- let subFactor = Belt.Float.toInt(firstDay)
- if indexRow == 0 && index < Belt.Float.toInt(firstDay) {
+ let subFactor = Float.toInt(firstDay)
+ if indexRow == 0 && index < Float.toInt(firstDay) {
""
} else if indexRow == 0 {
- Belt.Int.toString(indexRow + (index + 1) - subFactor)
+ Int.toString(indexRow + (index + 1) - subFactor)
} else if indexRow * 7 + (index + 1) - subFactor > daysInMonth {
""
} else {
- Belt.Int.toString(indexRow * 7 + (index + 1) - subFactor)
+ Int.toString(indexRow * 7 + (index + 1) - subFactor)
}
})
}
@@ -252,7 +252,7 @@ let make = (
{showTitle
?
{React.string(month->getMonthInStr)}
- {React.string(year->Belt.Int.toString)}
+ {React.string(year->Int.toString)}
: React.null}
@@ -281,7 +281,7 @@ let make = (
?cellHighlighter
?cellRenderer
month={getMonthInFloat(month)}
- year={Belt.Int.toFloat(year)}
+ year={Int.toFloat(year)}
startDate
endDate
disablePastDates
diff --git a/src/components/InfraCalendarList.res b/src/components/InfraCalendarList.res
index e8cbdca83..15b976619 100644
--- a/src/components/InfraCalendarList.res
+++ b/src/components/InfraCalendarList.res
@@ -4,7 +4,7 @@ external ffInputToSelectInput: ReactFinalForm.fieldRenderPropsInput => ReactFina
let startYear = ref(2016)
let years = []
-while Js.Date.make()->Js.Date.getFullYear->Belt.Float.toInt >= startYear.contents {
+while Js.Date.make()->Js.Date.getFullYear->Float.toInt >= startYear.contents {
years->Array.push(startYear.contents)->ignore
startYear := startYear.contents + 1
}
@@ -43,7 +43,7 @@ let getMonthInStr = (mon: InfraCalendar.month) => {
}
let getMonthFromFloat = value => {
- let valueInt = value->Belt.Float.toInt
+ let valueInt = value->Float.toInt
months[valueInt]->Option.getOr(Jan)
}
module YearItem = {
@@ -51,7 +51,7 @@ module YearItem = {
@react.component
let make = (~tempYear, ~year, ~handleChangeMonthBy, ~setCurrDate, ~tempMonth) => {
- let isSelected = year->Belt.Int.toFloat === tempYear
+ let isSelected = year->Int.toFloat === tempYear
let yearRef = React.useRef(Js.Nullable.null)
React.useEffect1(() => {
@@ -65,20 +65,20 @@ module YearItem = {
}, [isSelected])
Belt.Float.toInt
+ className={`p-2 ${year === tempYear->Float.toInt
? "bg-blue-950 text-white"
: "dark:hover:bg-jp-gray-900 hover:bg-jp-gray-100"} cursor-pointer bg-opacity-100`}
- value={year->Belt.Int.toString}
+ value={year->Int.toString}
ref={yearRef->ReactDOM.Ref.domRef}
onClick={e => {
let tar: float = ReactEvent.Mouse.currentTarget(e)["value"]
- let yearDiff = (tar -. tempYear)->Belt.Float.toInt
+ let yearDiff = (tar -. tempYear)->Float.toInt
if yearDiff !== 0 {
handleChangeMonthBy(yearDiff * 12)
setCurrDate(_ => Js.Date.makeWithYM(~year=tar, ~month=tempMonth, ()))
}
}}>
- {year->Belt.Int.toString->React.string}
+ {year->Int.toString->React.string}
}
}
@@ -95,7 +95,7 @@ module MonthItem = {
~setCurrDate,
~mon: InfraCalendar.month,
) => {
- let isSelected = index->Belt.Int.toFloat === tempMonth
+ let isSelected = index->Int.toFloat === tempMonth
let monthRef = React.useRef(Js.Nullable.null)
React.useEffect1(() => {
@@ -109,17 +109,17 @@ module MonthItem = {
}, [isSelected])
Belt.Int.toString}
+ value={index->Int.toString}
onClick={e => {
let tar: float = ReactEvent.Mouse.currentTarget(e)["value"]
- let monthDiff = (tar -. tempMonth)->Belt.Float.toInt
+ let monthDiff = (tar -. tempMonth)->Float.toInt
if monthDiff !== 0 {
handleChangeMonthBy(monthDiff)
setCurrDate(_ => Js.Date.makeWithYM(~year=tempYear, ~month=tar, ()))
}
}}
ref={monthRef->ReactDOM.Ref.domRef}
- className={`p-2 px-4 ${index === tempMonth->Belt.Float.toInt
+ className={`p-2 px-4 ${index === tempMonth->Float.toInt
? "bg-blue-950 text-white"
: "dark:hover:bg-jp-gray-900 hover:bg-jp-gray-100"} cursor-pointer`}>
{mon->getMonthInStr->String.replaceRegExp(%re("/,/g"), "")->React.string}
@@ -150,7 +150,7 @@ let make = (
let currDateTemp = Js.Date.fromFloat(Js.Date.valueOf(currDateIm))
let tempDate = Js.Date.setMonth(
currDateTemp,
- Belt.Int.toFloat(Belt.Float.toInt(Js.Date.getMonth(currDateTemp))),
+ Int.toFloat(Float.toInt(Js.Date.getMonth(currDateTemp))),
)
let tempMonth = Js.Date.getMonth(Js.Date.fromFloat(tempDate))
let tempYear = Js.Date.getFullYear(Js.Date.fromFloat(tempDate))
@@ -162,7 +162,7 @@ let make = (
{months
->Array.mapWithIndex((mon, i) =>
Belt.Int.toString}
+ key={i->Int.toString}
index=i
tempMonth
tempYear
@@ -177,12 +177,7 @@ let make = (
{years
->Array.mapWithIndex((year, i) =>
Belt.Int.toString}
- tempMonth
- tempYear
- handleChangeMonthBy
- year
- setCurrDate
+ key={i->Int.toString} tempMonth tempYear handleChangeMonthBy year setCurrDate
/>
)
->React.array}
@@ -190,7 +185,7 @@ let make = (
: false)
setOffset(_ => pageDetail.offset)
None
- }, [url.path->Belt.List.toArray->Array.joinWith("/")])
+ }, [url.path->List.toArray->Array.joinWith("/")])
React.useEffect1(_ => {
if pageDetail.offset !== offset && !firstRender {
@@ -499,7 +499,7 @@ let make = (
Some(
showSerialNumber && tableLocalFilter
? Array.concat(
- [Table.Range("s_no", 0., actualData->Array.length->Belt.Int.toFloat)],
+ [Table.Range("s_no", 0., actualData->Array.length->Int.toFloat)],
columnFilterRow,
)
: columnFilterRow,
@@ -569,7 +569,7 @@ let make = (
})
let startPoint = sNoArr->Array.get(0)->Option.getOr(1.->Js.Json.number)
let endPoint = sNoArr->Array.get(1)->Option.getOr(1.->Js.Json.number)
- let jsonIndex = (index + 1)->Belt.Int.toFloat->Js.Json.number
+ let jsonIndex = (index + 1)->Int.toFloat->Js.Json.number
sNoArr->Array.length > 0
? {
startPoint <= jsonIndex && endPoint >= jsonIndex ? visibleCell : []
@@ -595,9 +595,9 @@ let make = (
actualRows
->Array.unshift(
Numeric(
- (1 + index)->Belt.Int.toFloat,
+ (1 + index)->Int.toFloat,
(val: float) => {
- val->Belt.Float.toString
+ val->Float.toString
},
),
)
diff --git a/src/components/LocalFilters.res b/src/components/LocalFilters.res
index dd93b9580..4190c5e86 100644
--- a/src/components/LocalFilters.res
+++ b/src/components/LocalFilters.res
@@ -183,7 +183,7 @@ let make = (
let finalFieldList = selectedFiltersList->Array.filter(val => {
val.inputNames
->Array.get(0)
- ->Belt.Option.map(name => !{toBeRemoved->Array.includes(name)})
+ ->Option.map(name => !{toBeRemoved->Array.includes(name)})
->Option.getOr(false)
})
let filtersAfterRemoving =
diff --git a/src/components/MultiLineTextInput.res b/src/components/MultiLineTextInput.res
index c03b0644e..26f8bdbcc 100644
--- a/src/components/MultiLineTextInput.res
+++ b/src/components/MultiLineTextInput.res
@@ -40,7 +40,7 @@ let make = (
let className = `rounded-md border border-jp-gray-lightmode_steelgray border-opacity-75 font-semibold pl-4 pt-3 pb-3 text-jp-gray-900 text-opacity-75 placeholder-jp-gray-900 placeholder-opacity-25 hover:bg-jp-gray-lightmode_steelgray hover:bg-opacity-20 hover:border-jp-gray-900 hover:border-opacity-20 focus:text-opacity-100 focus:outline-none focus:border-blue-800 focus:border-opacity-100 dark:text-jp-gray-text_darktheme dark:text-opacity-75 dark:border-jp-gray-960 dark:hover:border-jp-gray-960 dark:hover:bg-jp-gray-970 dark:bg-jp-gray-darkgray_background dark:placeholder-jp-gray-text_darktheme dark:placeholder-opacity-25 dark:focus:text-opacity-100 dark:focus:border-blue-800 ${cursorClass} ${customClass}`
let value = switch input.value->Js.Json.classify {
| JSONString(str) => str
- | JSONNumber(num) => num->Belt.Float.toString
+ | JSONNumber(num) => num->Float.toString
| _ => ""
}
diff --git a/src/components/MultipleFileUpload.res b/src/components/MultipleFileUpload.res
index a7b14e97d..34ce971ef 100644
--- a/src/components/MultipleFileUpload.res
+++ b/src/components/MultipleFileUpload.res
@@ -136,7 +136,7 @@ let make = (
if size > sizeLimit {
showToast(
~message=`File size too large, upload below ${(sizeLimit / 1000)
- ->Belt.Int.toString}kb`,
+ ->Int.toString}kb`,
~toastType=ToastError,
(),
)
@@ -171,7 +171,7 @@ let make = (
toast("Invalid file", ToastError)
}
}
- arr->Belt.Array.set(0, arr[0]->Option.getOr(0) + 1)->ignore
+ arr->Array.set(0, arr[0]->Option.getOr(0) + 1)->ignore
}
| None => ()
}
@@ -249,8 +249,7 @@ let make = (
{fileNames
->Array.mapWithIndex((fileName, indx) => {
- Belt.Int.toString} className="flex items-center border p-2 gap-4 rounded-lg">
+ Int.toString} className="flex items-center border p-2 gap-4 rounded-lg">
Js.Date.toString
->DayJs.getDayJsForString
).format(. "YYYY-MM-DD")
@@ -267,8 +267,8 @@ module TableRow = {
startDate,
endDate,
obj,
- Belt.Float.toString(month +. 1.0),
- Belt.Float.toString(year),
+ Float.toString(month +. 1.0),
+ Float.toString(year),
)
}
@@ -277,8 +277,8 @@ module TableRow = {
startDate,
endDate,
obj,
- Belt.Float.toString(month +. 1.0),
- Belt.Float.toString(year),
+ Float.toString(month +. 1.0),
+ Float.toString(year),
)
}
let handleHover = () => {
@@ -301,7 +301,7 @@ module TableRow = {
}
Belt.Int.toString}X${cellIndex->Belt.Int.toString}`}
+ key={`${windowIndex->Int.toString}X${cellIndex->Int.toString}`}
className={`${classN} ${highlightBgClass} text-sm font-normal`}
onClick
onMouseOver={_ => handleHover()}
@@ -375,10 +375,10 @@ let make = (
let heading = ["Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat"]
let isMobileView = MatchMedia.useMobileChecker()
- let getMonthInFloat = mon => Array.indexOf(months, mon)->Belt.Float.fromInt
+ let getMonthInFloat = mon => Array.indexOf(months, mon)->Float.fromInt
let totalMonths = disablePastDates
? 1
- : (year - 1970) * 12 + getMonthInFloat(month)->Belt.Float.toInt + 1
+ : (year - 1970) * 12 + getMonthInFloat(month)->Float.toInt + 1
let futureMonths = isFutureDate && !disableFutureDates ? 120 : 0
let (lastStartDate, setLastStartDate) = React.useState(_ => "")
@@ -408,15 +408,15 @@ let make = (
})
React.useEffect2(() => {
- let currentMonth = getMonthInFloat(month)->Belt.Float.toInt + 1
+ let currentMonth = getMonthInFloat(month)->Float.toInt + 1
if startDate != lastStartDate {
let startYear = startDate != "" ? (startDate->DayJs.getDayJsForString).format(. "YYYY") : ""
let startMonth =
(startDate != "" ? (startDate->DayJs.getDayJsForString).format(. "MM") : "")
- ->Belt.Int.fromString
+ ->Int.fromString
->Option.getOr(currentMonth)
- let startYearDiff = year - startYear->Belt.Int.fromString->Option.getOr(2022)
+ let startYearDiff = year - startYear->Int.fromString->Option.getOr(2022)
let startIndex = 12 * startYearDiff + (currentMonth - startMonth)
@@ -428,9 +428,9 @@ let make = (
let endYear = endDate != "" ? (endDate->DayJs.getDayJsForString).format(. "YYYY") : ""
let endMonth =
(endDate != "" ? (endDate->DayJs.getDayJsForString).format(. "MM") : "")
- ->Belt.Int.fromString
+ ->Int.fromString
->Option.getOr(currentMonth)
- let endYearDiff = year - endYear->Belt.Int.fromString->Option.getOr(2022)
+ let endYearDiff = year - endYear->Int.fromString->Option.getOr(2022)
let endIndex = 12 * endYearDiff + (currentMonth - endMonth)
@@ -449,7 +449,7 @@ let make = (
// get first day
let firstDay = Js.Date.getDay(
- Js.Date.makeWithYM(~year=Belt.Int.toFloat(newYear), ~month=getMonthInFloat(updatedMonth), ()),
+ Js.Date.makeWithYM(~year=Int.toFloat(newYear), ~month=getMonthInFloat(updatedMonth), ()),
)
// get Days in month
@@ -472,15 +472,15 @@ let make = (
let rowMapper = (row, indexRow) => {
Array.mapWithIndex(row, (_item, index) => {
- let subFactor = Belt.Float.toInt(firstDay)
- if indexRow == 0 && index < Belt.Float.toInt(firstDay) {
+ let subFactor = Float.toInt(firstDay)
+ if indexRow == 0 && index < Float.toInt(firstDay) {
""
} else if indexRow == 0 {
- Belt.Int.toString(indexRow + (index + 1) - subFactor)
+ Int.toString(indexRow + (index + 1) - subFactor)
} else if indexRow * 7 + (index + 1) - subFactor > daysInMonth {
""
} else {
- Belt.Int.toString(indexRow * 7 + (index + 1) - subFactor)
+ Int.toString(indexRow * 7 + (index + 1) - subFactor)
}
})
}
@@ -488,14 +488,14 @@ let make = (
LogicUtils.getJsonObjectFromDict("style")->Identity.jsonToReactDOMStyle}>
- {React.string(`${updatedMonth->getMonthInStr} ${newYear->Belt.Int.toString}`)}
+ {React.string(`${updatedMonth->getMonthInStr} ${newYear->Int.toString}`)}
{rowInfo
->Array.mapWithIndex((item, rowIndex) => {
Belt.Int.toString}
+ key={rowIndex->Int.toString}
item
rowIndex
onDateClick
@@ -504,7 +504,7 @@ let make = (
?cellHighlighter
?cellRenderer
month={getMonthInFloat(updatedMonth)}
- year={Belt.Int.toFloat(newYear)}
+ year={Int.toFloat(newYear)}
startDate
endDate
disablePastDates
diff --git a/src/components/NewCalendarList.res b/src/components/NewCalendarList.res
index e5da0343b..0bff7e519 100644
--- a/src/components/NewCalendarList.res
+++ b/src/components/NewCalendarList.res
@@ -35,13 +35,13 @@ let make = (
let (isDateClicked, setIsDateClicked) = React.useState(_ => false)
let startYear = switch year {
- | Some(y) => Belt.Int.toFloat(y)
+ | Some(y) => Int.toFloat(y)
| None => Js.Date.getFullYear(Js.Date.make())
}
React.useEffect2(() => {
let fromDateJs = fromDate->DayJs.getDayJsForString
let toDateJs = toDate->DayJs.getDayJsForString
- let permittedMaxYears = startYear->Belt.Float.toInt + 10
+ let permittedMaxYears = startYear->Float.toInt + 10
let updatedFromDate =
fromDate != "" &&
fromDate->String.length >= 5 &&
@@ -119,17 +119,17 @@ let make = (
let _ = onDateClick
// check whether month and date has value
let getMonthFromFloat = value => {
- let valueInt = value->Belt.Float.toInt
+ let valueInt = value->Float.toInt
months->Array.get(valueInt)->Option.getOr(Jan)
}
let getMonthInFloat = mon => {
- Array.indexOf(months, mon)->Belt.Float.fromInt
+ Array.indexOf(months, mon)->Float.fromInt
}
let startMonth = switch month {
- | Some(m) => Belt.Int.toFloat(Belt.Float.toInt(getMonthInFloat(m)))
+ | Some(m) => Int.toFloat(Float.toInt(getMonthInFloat(m)))
| None => {
- let tMonth = Belt.Int.toFloat(Belt.Float.toInt(Js.Date.getMonth(Js.Date.make())))
+ let tMonth = Int.toFloat(Float.toInt(Js.Date.getMonth(Js.Date.make())))
disableFutureDates && count > 1 ? tMonth -. 1.0 : tMonth
}
}
@@ -146,7 +146,7 @@ let make = (
let currDateTemp = Js.Date.fromFloat(Js.Date.valueOf(currDateIm))
let tempDate = Js.Date.setMonth(
currDateTemp,
- Belt.Int.toFloat(Belt.Float.toInt(Js.Date.getMonth(currDateTemp)) + i),
+ Int.toFloat(Float.toInt(Js.Date.getMonth(currDateTemp)) + i),
)
let tempMonth = if disableFutureDates {
(Js.Date.fromFloat(tempDate)->DayJs.getDayJsForJsDate).toString(.)
@@ -205,7 +205,7 @@ let make = (
{
let pageNumbers = []
- let total = Js.Math.ceil(Belt.Int.toFloat(totalResults) /. Belt.Int.toFloat(resultsPerPage))
+ let total = Js.Math.ceil(Int.toFloat(totalResults) /. Int.toFloat(resultsPerPage))
for x in 1 to total {
Array.push(pageNumbers, x)->ignore
diff --git a/src/components/OrderUtils.res b/src/components/OrderUtils.res
index 094079a17..381ddca87 100644
--- a/src/components/OrderUtils.res
+++ b/src/components/OrderUtils.res
@@ -146,7 +146,7 @@ module Details = {
{detailsFields
->Array.mapWithIndex((colType, i) => {
if !(excludeColKeys->Array.includes(colType)) {
-
+
"1-10")
- let total = Js.Math.ceil(Belt.Int.toFloat(totalResults) /. Belt.Int.toFloat(resultsPerPage))
+ let total = Js.Math.ceil(Int.toFloat(totalResults) /. Int.toFloat(resultsPerPage))
for x in 1 to total {
Array.push(pageNumbers, x)->ignore
@@ -31,16 +31,14 @@ let make = (~resultsPerPage, ~totalResults, ~currentPage, ~paginate, ~btnCount=4
let ranges = []
rangeNum->Array.forEach(ele => {
- ranges->Array.push((ele - 9)->Belt.Int.toString ++ "-" ++ ele->Belt.Int.toString)->ignore
+ ranges->Array.push((ele - 9)->Int.toString ++ "-" ++ ele->Int.toString)->ignore
})
let lastNum = rangeNum->Array.get(Array.length(rangeNum) - 1)->Option.getOr(0)
if totalResults > lastNum {
let start = lastNum + (totalResults - lastNum)
start === totalResults
- ? ranges->Array.push(start->Belt.Int.toString)->ignore
- : ranges
- ->Array.push(start->Belt.Int.toString ++ "-" ++ totalResults->Belt.Int.toString)
- ->ignore
+ ? ranges->Array.push(start->Int.toString)->ignore
+ : ranges->Array.push(start->Int.toString ++ "-" ++ totalResults->Int.toString)->ignore
}
let startIndex = Js.Math.max_int(1, currentPage - pageToLeft)
@@ -102,7 +100,7 @@ let make = (~resultsPerPage, ~totalResults, ~currentPage, ~paginate, ~btnCount=4
let dropDownOptions = ranges->Array.mapWithIndex((item, idx): SelectBox.dropdownOption => {
{
label: item,
- value: (idx + 1)->Belt.Int.toString,
+ value: (idx + 1)->Int.toString,
}
})
diff --git a/src/components/Paginator.res b/src/components/Paginator.res
index 19538e834..6b10000f0 100644
--- a/src/components/Paginator.res
+++ b/src/components/Paginator.res
@@ -40,7 +40,7 @@ let make = (
let selectInputOption = {
[5, 10, 15, 25, 50, 100]
->Array.filter(val => val <= totalResults)
- ->Array.map(Belt.Int.toString)
+ ->Array.map(Int.toString)
->SelectBox.makeOptions
}
let selectInput: ReactFinalForm.fieldRenderPropsInput = {
@@ -48,15 +48,15 @@ let make = (
onBlur: _ev => (),
onChange: ev => {
setResultsPerPage(_ => {
- ev->Identity.formReactEventToString->Belt.Int.fromString->Option.getOr(15)
+ ev->Identity.formReactEventToString->Int.fromString->Option.getOr(15)
})
},
onFocus: _ev => (),
- value: resultsPerPage->Belt.Int.toString->Js.Json.string,
+ value: resultsPerPage->Int.toString->Js.Json.string,
checked: true,
}
let paginate = React.useCallback5(pageNumber => {
- let total = Js.Math.ceil(Belt.Int.toFloat(totalResults) /. Belt.Int.toFloat(resultsPerPage))
+ let total = Js.Math.ceil(Int.toFloat(totalResults) /. Int.toFloat(resultsPerPage))
// for handling page count
let defaultPageNumber = Js.Math.min_int(total, pageNumber)
let page = defaultPageNumber
diff --git a/src/components/RangeSlider.res b/src/components/RangeSlider.res
index 2b24fc6b9..1e656089d 100644
--- a/src/components/RangeSlider.res
+++ b/src/components/RangeSlider.res
@@ -99,8 +99,8 @@ let make = (
className={`absolute bg-transparent pointer-events-none appearance-none slider hover:sliderFocus active:sliderFocus outline-none`}
type_="range"
value=minsliderVal
- min={min->Belt.Float.toString}
- max={max->Belt.Float.toString}
+ min={min->Float.toString}
+ max={max->Float.toString}
onBlur={minSlide.onBlur}
onChange={ev => {
minSlide.onChange(ev)
@@ -118,8 +118,8 @@ let make = (
className={`absolute bg-transparent pointer-events-none appearance-none slider hover:sliderFocus active:sliderFocus outline-none`}
type_="range"
value=maxsliderVal
- min={min->Belt.Float.toString}
- max={max->Belt.Float.toString}
+ min={min->Float.toString}
+ max={max->Float.toString}
onBlur={maxSlide.onBlur}
onChange={ev => {
maxSlide.onChange(ev)
@@ -138,9 +138,9 @@ let make = (
Belt.Float.toString}
- min={min->Belt.Float.toString}
- max={max->Belt.Float.toString}
+ value={minSlideVal->Float.toString}
+ min={min->Float.toString}
+ max={max->Float.toString}
onBlur={ev => {
let minVal = minSlideVal
let maxSliderValue = maxSlide.value->Js.Json.decodeNumber->Option.getOr(0.)
@@ -176,9 +176,9 @@ let make = (
Belt.Float.toString}
- min={min->Belt.Float.toString}
- max={max->Belt.Float.toString}
+ value={maxSlideVal->Float.toString}
+ min={min->Float.toString}
+ max={max->Float.toString}
onBlur={ev => {
let maxVal = maxSlideVal
let minSliderValue = minSlide.value->Js.Json.decodeNumber->Option.getOr(0.)
diff --git a/src/components/RatingOptions.res b/src/components/RatingOptions.res
index 6c77923c9..da6eb1951 100644
--- a/src/components/RatingOptions.res
+++ b/src/components/RatingOptions.res
@@ -14,7 +14,7 @@ let make = (~icons, ~size) => {
->Array.mapWithIndex((icon, index) => {
let iconRating = index + 1
Dict.get(key) {
- | Some(arr) => Dict.set(dictArrObj, key, Belt.Array.concat(arr, [value]))
+ | Some(arr) => Dict.set(dictArrObj, key, Array.concat(arr, [value]))
| None => Dict.set(dictArrObj, key, [value])
}
},
@@ -863,7 +863,7 @@ let make = (
Some(
showSerialNumber && tableLocalFilter
? Array.concat(
- [Table.Range("s_no", 0., actualData->Array.length->Belt.Int.toFloat)],
+ [Table.Range("s_no", 0., actualData->Array.length->Int.toFloat)],
columnFilterRow,
)
: columnFilterRow,
@@ -937,7 +937,7 @@ let make = (
})
let startPoint = sNoArr->Array.get(0)->Option.getOr(1.->Js.Json.number)
let endPoint = sNoArr->Array.get(1)->Option.getOr(1.->Js.Json.number)
- let jsonIndex = (index + 1)->Belt.Int.toFloat->Js.Json.number
+ let jsonIndex = (index + 1)->Int.toFloat->Js.Json.number
sNoArr->Array.length > 0
? {
startPoint <= jsonIndex && endPoint >= jsonIndex ? visibleCell : []
@@ -971,9 +971,9 @@ let make = (
actualRows
->Array.unshift(
Numeric(
- (1 + index)->Belt.Int.toFloat,
+ (1 + index)->Int.toFloat,
(val: float) => {
- val->Belt.Float.toString
+ val->Float.toString
},
),
)
diff --git a/src/components/RemoteFilter.res b/src/components/RemoteFilter.res
index 8168fc130..4b90d4a92 100644
--- a/src/components/RemoteFilter.res
+++ b/src/components/RemoteFilter.res
@@ -177,7 +177,7 @@ module ClearFilters = {
})
->Array.length > 0
}, (formState.initialValues, defaultFilterKeys))
- let text = isCountRequired ? `Clear ${count->Belt.Int.toString} Filters` : "Clear Filters"
+ let text = isCountRequired ? `Clear ${count->Int.toString} Filters` : "Clear Filters"
}
diff --git a/src/components/TableUtils.res b/src/components/TableUtils.res
index c26e8ee39..3db994cd8 100644
--- a/src/components/TableUtils.res
+++ b/src/components/TableUtils.res
@@ -196,8 +196,8 @@ module ProgressCell = {
- {React.string(Belt.Int.toString(progressPercentage) ++ "%")}
+ style={ReactDOM.Style.make(~width=`${Int.toString(progressPercentage)}%`, ())}>
+ {React.string(Int.toString(progressPercentage) ++ "%")}
}
@@ -389,8 +389,8 @@ module Numeric = {
{React.string(num->mapper)}
} else {
- Belt.Float.toString)]>
- {React.string(num->Belt.Float.toString)}
+ Float.toString)]>
+ {React.string(num->Float.toString)}
}
}
@@ -775,11 +775,11 @@ let getTableCellValue = cell => {
| Text(x) => x
| Date(x) => x
| DateWithoutTime(x) => x
- | Currency(val, _) => val->Belt.Float.toString
+ | Currency(val, _) => val->Float.toString
| Link(str) => str
| CustomCell(_, value) => value
| EllipsisText(x, _) => x
- | DeltaPercentage(x, _) | Numeric(x, _) => x->Belt.Float.toString
+ | DeltaPercentage(x, _) | Numeric(x, _) => x->Float.toString
| ColoredText(x) => x.title
| _ => ""
}
diff --git a/src/components/Tabs.res b/src/components/Tabs.res
index 30717e671..60a8822df 100644
--- a/src/components/Tabs.res
+++ b/src/components/Tabs.res
@@ -127,7 +127,7 @@ module IndicationArrow = {
}
let getBoundingRectInfo = (ref: React.ref>, getter) => {
- ref.current->Js.Nullable.toOption->Belt.Option.map(getBoundingClientRect)->Option.mapOr(0, getter)
+ ref.current->Js.Nullable.toOption->Option.map(getBoundingClientRect)->Option.mapOr(0, getter)
}
@react.component
diff --git a/src/components/TabularInput.res b/src/components/TabularInput.res
index 1e6f700f3..c0db28b6e 100644
--- a/src/components/TabularInput.res
+++ b/src/components/TabularInput.res
@@ -13,7 +13,7 @@ module TableCell = {
@react.component
let make = (~onClick, ~elemIndex, ~isLast, ~fields, ~onChange, ~keyValue) => {
{fields
->Array.mapWithIndex((itm, i) => {
@@ -28,7 +28,7 @@ module TableCell = {
value: (keyValue[elemIndex]->Option.getOr([]))[i]->Option.getOr("")->Js.Json.string,
checked: true,
}
-
+
})
->React.array}
diff --git a/src/components/TimeInput.res b/src/components/TimeInput.res
index 4ed9c3f85..2770fb5da 100644
--- a/src/components/TimeInput.res
+++ b/src/components/TimeInput.res
@@ -1,5 +1,5 @@
let padNum = num => {
- let str = num->Belt.Int.toString
+ let str = num->Int.toString
if str->String.length === 1 {
`0${str}`
} else {
@@ -11,15 +11,13 @@ module OptionVals = {
let make = (~upto=60, ~value, ~onChange, ~isDisabled) => {
let cursorClass = isDisabled ? "cursor-not-allowed" : ""
@@ -41,17 +39,16 @@ let make = (
| Some(str) => str
| None => ""
}
- open Belt.Option
let arr = value->String.split(":")
- let hourVal = arr->Array.get(0)->flatMap(Belt.Int.fromString)->getWithDefault(0)
- let minuteVal = arr->Array.get(1)->flatMap(Belt.Int.fromString)->getWithDefault(0)
- let secondsVal = arr->Array.get(2)->flatMap(Belt.Int.fromString)->getWithDefault(0)
+ let hourVal = arr->Array.get(0)->Option.flatMap(Belt.Int.fromString)->Option.getOr(0)
+ let minuteVal = arr->Array.get(1)->Option.flatMap(Belt.Int.fromString)->Option.getOr(0)
+ let secondsVal = arr->Array.get(2)->Option.flatMap(Belt.Int.fromString)->Option.getOr(0)
let changeVal = React.useCallback4((index, ev: ReactEvent.Form.t) => {
- let newVal = {ev->ReactEvent.Form.target}["value"]->Belt.Int.fromString->getWithDefault(0)
+ let newVal = {ev->ReactEvent.Form.target}["value"]->Int.fromString->Option.getOr(0)
let arr = [hourVal, minuteVal, secondsVal]
- Belt.Array.set(arr, index, newVal)->ignore
+ arr[index] = newVal
arr->Array.map(padNum)->Array.joinWith(":")->Identity.anyTypeToReactEvent->input.onChange
}, (hourVal, minuteVal, secondsVal, input.onChange))
diff --git a/src/components/custom-icons/Loadericon.res b/src/components/custom-icons/Loadericon.res
index 19c07a11e..b4b506c99 100644
--- a/src/components/custom-icons/Loadericon.res
+++ b/src/components/custom-icons/Loadericon.res
@@ -12,8 +12,8 @@ let make = (~iconColor=?, ~size=16) => {
}
| | | |