=> unit,
- ~value as values: Js.Json.t,
+ ~value as values: JSON.t,
~onBlur=?,
~showClearAll=true,
~isHorizontal=false,
@@ -465,7 +465,7 @@ module BaseSelect = {
}
let saneValue = React.useMemo1(() =>
- switch values->Js.Json.decodeArray {
+ switch values->JSON.Decode.array {
| Some(jsonArr) => jsonArr->LogicUtils.getStrArrayFromJsonArray
| _ => []
}
@@ -912,7 +912,7 @@ module BaseSelectButton = {
~optionSize: CheckBoxIcon.size=Small,
~isSelectedStateMinus=false,
~onSelect: string => unit,
- ~value: Js.Json.t,
+ ~value: JSON.t,
~deselectDisable=false,
~onBlur=?,
~setShowDropDown=?,
@@ -932,7 +932,7 @@ module BaseSelectButton = {
let searchRef = React.useRef(Js.Nullable.null)
let onItemClick = (itemData, _ev) => {
if !disableSelect {
- let isSelected = value->Js.Json.decodeString->Option.mapOr(false, str => itemData === str)
+ let isSelected = value->JSON.Decode.string->Option.mapOr(false, str => itemData === str)
if isSelected && !deselectDisable {
onSelect("")
@@ -1004,7 +1004,7 @@ module BaseSelectButton = {
{options
->Array.mapWithIndex((option, i) => {
- let isSelected = switch value->Js.Json.decodeString {
+ let isSelected = switch value->JSON.Decode.string {
| Some(str) => option.value === str
| None => false
}
@@ -1067,7 +1067,7 @@ module BaseSelectButton = {
module RenderListItemInBaseRadio = {
@react.component
let make = (
- ~newOptions: Js.Array2.t,
+ ~newOptions: array,
~value,
~descriptionOnHover,
~isDropDown,
@@ -1089,7 +1089,7 @@ module RenderListItemInBaseRadio = {
) => {
newOptions
->Array.mapWithIndex((option, i) => {
- let isSelected = switch value->Js.Json.decodeString {
+ let isSelected = switch value->JSON.Decode.string {
| Some(str) => option.value === str
| None => false
}
@@ -1188,7 +1188,7 @@ module BaseRadio = {
~optionSize: CheckBoxIcon.size=Small,
~isSelectedStateMinus=false,
~onSelect: string => unit,
- ~value: Js.Json.t,
+ ~value: JSON.t,
~deselectDisable=false,
~onBlur=?,
~fill="#0EB025",
@@ -1242,7 +1242,7 @@ module BaseRadio = {
)
let onItemClick = (itemData, isDisabled, _ev) => {
if !isDisabled {
- let isSelected = value->Js.Json.decodeString->Option.mapOr(false, str => itemData === str)
+ let isSelected = value->JSON.Decode.string->Option.mapOr(false, str => itemData === str)
if isSelected && !deselectDisable {
setSelectedString(_ => "")
@@ -1586,7 +1586,7 @@ module BaseDropdown = {
| None => ""
}
newInputSelect.onChange(
- switch newInputSelect.value->Js.Json.decodeArray {
+ switch newInputSelect.value->JSON.Decode.array {
| Some(jsonArr) =>
jsonArr->LogicUtils.getStrArrayFromJsonArray->Array.filter(str => str !== actualValue)
| _ => []
@@ -1599,7 +1599,7 @@ module BaseDropdown = {
let (dropDowntext, leftIcon: Button.iconType, iconStroke) = allowMultiSelect
? (buttonText, defaultLeftIcon, "")
- : switch newInputRadio.value->Js.Json.decodeString {
+ : switch newInputRadio.value->JSON.Decode.string {
| Some(str) =>
switch transformedOptions->Array.find(x => x.value === str) {
| Some(x) => (x.label, x.icon, x.iconStroke)
@@ -1657,9 +1657,9 @@ module BaseDropdown = {
let allSellectedOptions = React.useMemo2(() => {
newInputSelect.value
- ->Js.Json.decodeArray
+ ->JSON.Decode.array
->Option.getOr([])
- ->Belt.Array.keepMap(Js.Json.decodeString)
+ ->Belt.Array.keepMap(JSON.Decode.string)
->Belt.Array.keepMap(str => {
transformedOptions->Array.find(x => x.value == str)->Option.map(x => x.label)
})
@@ -1671,7 +1671,7 @@ module BaseDropdown = {
let title = showAllSelectedOptions ? allSellectedOptions : buttonText
let badgeForSelect = React.useMemo1((): Button.badge => {
- let count = newInputSelect.value->Js.Json.decodeArray->Option.getOr([])->Array.length
+ let count = newInputSelect.value->JSON.Decode.array->Option.getOr([])->Array.length
let condition = count > 1
{
@@ -1855,7 +1855,7 @@ module BaseDropdown = {
if (
showToolTip &&
- newInputSelect.value !== ""->Js.Json.string &&
+ newInputSelect.value !== ""->JSON.Encode.string &&
!showDropDown &&
showNameAsToolTip
) {
@@ -1916,7 +1916,7 @@ module BaseDropdown = {
}}
{if allowMultiSelect && !hideMultiSelectButtons && showSelectionAsChips {
- switch newInputSelect.value->Js.Json.decodeArray {
+ switch newInputSelect.value->JSON.Decode.array {
| Some(jsonArr) =>
jsonArr
->LogicUtils.getStrArrayFromJsonArray
@@ -1972,7 +1972,7 @@ module InfraSelectBox = {
let newInputSelect = input->ffInputToSelectInput
let values = newInputSelect.value
let saneValue = React.useMemo1(() =>
- switch values->Js.Json.decodeArray {
+ switch values->JSON.Decode.array {
| Some(jsonArr) => jsonArr->LogicUtils.getStrArrayFromJsonArray
| _ => []
}
diff --git a/src/components/SelectBox.resi b/src/components/SelectBox.resi
index 69661c26e..9edd1526e 100644
--- a/src/components/SelectBox.resi
+++ b/src/components/SelectBox.resi
@@ -84,7 +84,7 @@ module BaseSelect: {
~optionSize: CheckBoxIcon.size=?,
~isSelectedStateMinus: bool=?,
~onSelect: array => unit,
- ~value: Js.Json.t,
+ ~value: JSON.t,
~onBlur: ReactEvent.Focus.t => unit=?,
~showClearAll: bool=?,
~isHorizontal: bool=?,
@@ -140,7 +140,7 @@ module BaseSelectButton: {
~optionSize: CheckBoxIcon.size=?,
~isSelectedStateMinus: bool=?,
~onSelect: string => unit,
- ~value: Js.Json.t,
+ ~value: JSON.t,
~deselectDisable: bool=?,
~onBlur: ReactEvent.Focus.t => unit=?,
~setShowDropDown: ('a => bool) => unit=?,
@@ -157,8 +157,8 @@ module BaseSelectButton: {
module RenderListItemInBaseRadio: {
@react.component
let make: (
- ~newOptions: Js.Array2.t,
- ~value: Js.Json.t,
+ ~newOptions: array,
+ ~value: JSON.t,
~descriptionOnHover: bool,
~isDropDown: bool,
~textIconPresent: bool,
@@ -181,7 +181,7 @@ module RenderListItemInBaseRadio: {
let getHashMappedOptionValues: array => RescriptCore.Dict.t<
array,
>
-let getSortedKeys: RescriptCore.Dict.t<'a> => Js.Array2.t
+let getSortedKeys: RescriptCore.Dict.t<'a> => array
module BaseRadio: {
@react.component
let make: (
@@ -192,7 +192,7 @@ module BaseRadio: {
~optionSize: CheckBoxIcon.size=?,
~isSelectedStateMinus: bool=?,
~onSelect: string => unit,
- ~value: Js.Json.t,
+ ~value: JSON.t,
~deselectDisable: bool=?,
~onBlur: ReactEvent.Focus.t => unit=?,
~fill: string=?,
diff --git a/src/components/SelectModal.res b/src/components/SelectModal.res
index 297a329da..883f8bce8 100644
--- a/src/components/SelectModal.res
+++ b/src/components/SelectModal.res
@@ -40,7 +40,7 @@ let make = (
let disableSelectBtn = React.useMemo2(
() =>
- (initialValues->Js.Array.toString === values->Js.Array.toString && !enableSelect) ||
+ (initialValues->Array.toString === values->Array.toString && !enableSelect) ||
values->Array.length === 0,
(values, initialValues),
)
@@ -66,7 +66,7 @@ let make = (
maxLengthArray(target, setValues)
},
onFocus: _ev => (),
- value: values->Js.Json.stringArray,
+ value: values->LogicUtils.getJsonFromArrayOfString,
checked: false,
}
@@ -95,7 +95,7 @@ let make = (
isDropDown=false
options
onSelect={arr => maxLengthArray(arr, setValues)}
- value={values->Js.Json.stringArray}
+ value={values->LogicUtils.getJsonFromArrayOfString}
showSelectAll={showSelectAll}
showSerialNumber
maxHeight="max-h-full"
diff --git a/src/components/ShowDetails.res b/src/components/ShowDetails.res
index b8079eed2..b6efb64aa 100644
--- a/src/components/ShowDetails.res
+++ b/src/components/ShowDetails.res
@@ -1,5 +1,5 @@
open LogicUtils
-type loadDataType = Loading | Loaded(Dict.t, Dict.t) | LoadError(string)
+type loadDataType = Loading | Loaded(Dict.t, Dict.t) | LoadError(string)
type errorType = {
error: bool,
@@ -10,7 +10,7 @@ type errorType = {
module EntityData = {
@react.component
let make = (
- ~dictData: Dict.t,
+ ~dictData: Dict.t,
~syncData=Dict.make(),
~detailsKeyList,
~entity: EntityType.entityType<'colType, 't>,
diff --git a/src/components/SingleStats/SingleStatEntity.res b/src/components/SingleStats/SingleStatEntity.res
index e6e213124..8cc729d89 100644
--- a/src/components/SingleStats/SingleStatEntity.res
+++ b/src/components/SingleStats/SingleStatEntity.res
@@ -3,7 +3,7 @@ open AnalyticsTypesUtils
type filterConfig = {
source: string, // source can be BATCH, KVLOGS basically which DB to fetch
modeValue: string, // modeValue can be ORDERS, TXN so here is the mode is orders we see data aggregated by the order_id and if mode is txn the data is aggregated by txn id simmilarly more mode can be added
- filterValues?: Js.Json.t, // which all filters will be applicable for the single stats (those keys i.e merchant_id, payment_gateway etc.)
+ filterValues?: JSON.t, // which all filters will be applicable for the single stats (those keys i.e merchant_id, payment_gateway etc.)
startTime: string, // start time from when data will fetch (later can be moved to the parent level)
endTime: string, // end time till when data should be fetched (later can be moved to the parent level)
customFilterValue: string, // custome filter key is the key by which stores the value of the applied customfilter in the url
@@ -14,7 +14,7 @@ type dataFetcherObj<'a> = {
metrics: 'a, // metrics are the stats i.e total volume, success rate etc.
bodyMaker: (string, filterConfig) => string, // to make the single stat body
timeSeriedBodyMaker: (string, filterConfig) => string, // to make the single stat timeseries body
- transaformer: (string, Js.Json.t) => Dict.t, // just in case if we are getting data from multiple places and we wanted to change the key or something so that we can identify it differently
+ transaformer: (string, JSON.t) => Dict.t, // just in case if we are getting data from multiple places and we wanted to change the key or something so that we can identify it differently
url: string, // url from where data need to be fetched
domain: string,
timeColumn: string,
@@ -40,9 +40,9 @@ type singleStatEntity<'a> = {
getStatDetails: (
'a,
'a => string,
- dataState,
- dataState,
- dataState,
+ dataState,
+ dataState,
+ dataState,
) => singleStatDataWidgetData,
- jsonTransformer?: (string, array) => array,
+ jsonTransformer?: (string, array) => array,
}
diff --git a/src/components/SketchPicker.res b/src/components/SketchPicker.res
index 5d39bbb73..5d46dad47 100644
--- a/src/components/SketchPicker.res
+++ b/src/components/SketchPicker.res
@@ -1,3 +1,2 @@
@module("react-color") @react.component
-external make: (~color: string, ~onChangeComplete: Js.Json.t => unit) => React.element =
- "SketchPicker"
+external make: (~color: string, ~onChangeComplete: JSON.t => unit) => React.element = "SketchPicker"
diff --git a/src/components/Table.res b/src/components/Table.res
index 3fb5d01a1..28edcfd03 100644
--- a/src/components/Table.res
+++ b/src/components/Table.res
@@ -466,7 +466,7 @@ module TableHeadingCell = {
onBlur: _ev => (),
onChange: ev => handleUpdateFilterObj(ev, i),
onFocus: _ev => (),
- value: selected->Array.map(Js.Json.string)->Js.Json.array,
+ value: selected->Array.map(JSON.Encode.string)->JSON.Encode.array,
checked: true,
}
let icon = switch filterIcon {
@@ -663,7 +663,7 @@ let make = (
) => {
let isMobileView = MatchMedia.useMobileChecker()
let rowInfo: array> = rows
- let actualData: option>> = actualData
+ let actualData: option>> = actualData
let numberOfCols = heading->Array.length
open Webapi
let totalTableWidth =
diff --git a/src/components/Table.resi b/src/components/Table.resi
index ce1b7faa0..61cee6f0a 100644
--- a/src/components/Table.resi
+++ b/src/components/Table.resi
@@ -22,7 +22,7 @@ type filterDataType = TableUtils.filterDataType =
| Float(float, float)
| String
| DateTime
-external jsonToStr: Js.Json.t => string = "%identity"
+external jsonToStr: JSON.t => string = "%identity"
type textAlign = TableUtils.textAlign = Left | Right
type fontBold = bool
type labelMargin = string
@@ -38,7 +38,7 @@ let getSortOrderString: sortOrder => string
type label = TableUtils.label = {title: string, color: labelColor, showIcon?: bool}
type currency = string
type filterRow = TableUtils.filterRow =
- | DropDownFilter(string, array)
+ | DropDownFilter(string, array)
| TextFilter(string)
| Range(string, float, float)
type cell = TableUtils.cell =
@@ -141,7 +141,7 @@ module TableRow: {
~removeVerticalLines: bool,
~removeHorizontalLines: bool,
~evenVertivalLines: bool,
- ~highlightEnabledFieldsArray: Js.Array2.t,
+ ~highlightEnabledFieldsArray: array,
~tableDataBorderClass: string=?,
~collapseTableRow: bool=?,
~expandedRow: unit => React.element,
@@ -189,7 +189,7 @@ module TableHeadingCell: {
~setSortedObj: option<('b => option) => unit>,
~filterObj: option>,
~fixedWidthClass: string,
- ~setFilterObj: option<(array => Js.Array2.t) => unit>,
+ ~setFilterObj: option<(array => array) => unit>,
~headingCenter: bool,
~filterIcon: React.element=?,
~filterDropdownClass: string=?,
@@ -210,7 +210,7 @@ module TableHeadingCell: {
module TableHeadingRow: {
@react.component
let make: (
- ~headingArray: Js.Array2.t,
+ ~headingArray: array,
~isHighchartLegend: bool,
~frozenUpto: int,
~heightHeadingClass: string,
@@ -219,7 +219,7 @@ module TableHeadingRow: {
~setSortedObj: option<('a => option) => unit>,
~filterObj: option>,
~fixedWidthClass: string,
- ~setFilterObj: option<(array => Js.Array2.t) => unit>,
+ ~setFilterObj: option<(array => array) => unit>,
~headingCenter: bool,
~filterIcon: React.element=?,
~filterDropdownClass: string=?,
@@ -232,7 +232,7 @@ module TableHeadingRow: {
~fixLastCol: bool=?,
~headerCustomBgColor: string=?,
~filterDropdownMaxHeight: string=?,
- ~columnFilterRow: option>,
+ ~columnFilterRow: option>,
~customizeColumnNewTheme: TableUtils.customiseColumnConfig=?,
~tableHeadingTextClass: string=?,
) => React.element
@@ -240,7 +240,7 @@ module TableHeadingRow: {
@react.component
let make: (
~title: string=?,
- ~heading: Js.Array2.t=?,
+ ~heading: array=?,
~rows: array>,
~offset: int=?,
~onRowClick: int => unit=?,
@@ -253,15 +253,15 @@ let make: (
~showScrollBar: bool=?,
~setSortedObj: ('a => option) => unit=?,
~sortedObj: TableUtils.sortedObject=?,
- ~setFilterObj: (array => Js.Array2.t) => unit=?,
+ ~setFilterObj: (array => array) => unit=?,
~filterObj: array=?,
- ~columnFilterRow: Js.Array2.t=?,
+ ~columnFilterRow: array=?,
~tableheadingClass: string=?,
~tableBorderClass: string=?,
~tableDataBorderClass: string=?,
~collapseTableRow: bool=?,
~getRowDetails: Js.Nullable.t<'b> => React.element=?,
- ~actualData: Js.Array2.t>=?,
+ ~actualData: array>=?,
~onExpandClickData: 'onExpandClickData=?,
~onMouseEnter: int => unit=?,
~onMouseLeave: int => unit=?,
diff --git a/src/components/TableLocalFilters.res b/src/components/TableLocalFilters.res
index a2d20a083..47219675c 100644
--- a/src/components/TableLocalFilters.res
+++ b/src/components/TableLocalFilters.res
@@ -1,4 +1,4 @@
-external formEventToJsonArr: ReactEvent.Form.t => array = "%identity"
+external formEventToJsonArr: ReactEvent.Form.t => array = "%identity"
module RangeSliderLocalFilter = {
@react.component
@@ -85,7 +85,7 @@ module RangeSliderLocalFilter = {
module FilterDropDown = {
@react.component
- let make = (~val, ~arr: array=[]) => {
+ let make = (~val, ~arr: array=[]) => {
let (lclFiltrState, setLclFltrState) = React.useContext(DatatableContext.datatableContext)
let filterIconName = "bars-filter"
let strokeColor = ""
@@ -103,13 +103,13 @@ module FilterDropDown = {
onBlur: _ev => (),
onChange: ev => setLclFltrState(val, ev->formEventToJsonArr),
onFocus: _ev => (),
- value: selectedValue->Js.Json.array,
+ value: selectedValue->JSON.Encode.array,
checked: true,
}
let (buttonText, icon) = switch selectedValue->Array.length > 0 {
| true => (
- selectedValue->Js.Json.array->Js.Json.stringify,
+ selectedValue->JSON.Encode.array->JSON.stringify,
Button.CustomIcon(
e->ReactEvent.Mouse.stopPropagation}>
Option.getOr([])->Array.get(0)->Option.getOr(""->Js.Json.string)
+ Dict.get(lclFiltrState, val)
+ ->Option.getOr([])
+ ->Array.get(0)
+ ->Option.getOr(""->JSON.Encode.string)
let localInput = React.useMemo1((): ReactFinalForm.fieldRenderPropsInput => {
{
name: "--",
@@ -192,7 +195,7 @@ module TextFilterCell = {
}
let value = value->String.replace("", "")
- setLclFltrState(val, [value->Js.Json.string])
+ setLclFltrState(val, [value->JSON.Encode.string])
},
onFocus: _ev => (),
value: selectedValue,
@@ -200,13 +203,13 @@ module TextFilterCell = {
}
}, [selectedValue])
let rightIcon =
- selectedValue === ""->Js.Json.string
+ selectedValue === ""->JSON.Encode.string
?
: setLclFltrState(val, [""->Js.Json.string])}>
+ onClick={_ => setLclFltrState(val, [""->JSON.Encode.string])}>
@@ -230,7 +233,10 @@ module RangeFilterCell = {
let minVal = Js.Math.floor_float(minVal)
let maxVal = Js.Math.ceil_float(maxVal)
let selectedValueStr =
- Dict.get(lclFiltrState, val)->Option.getOr([minVal->Js.Json.number, maxVal->Js.Json.number])
+ Dict.get(lclFiltrState, val)->Option.getOr([
+ minVal->JSON.Encode.float,
+ maxVal->JSON.Encode.float,
+ ])
let minSlide = React.useMemo1((): ReactFinalForm.fieldRenderPropsInput => {
{
@@ -239,15 +245,15 @@ module RangeFilterCell = {
onChange: ev => {
let value = {ev->ReactEvent.Form.target}["value"]
- let leftVal = value->Js.Float.fromString->Js.Json.number
- let rightvalue = selectedValueStr[1]->Option.getOr(Js.Json.null)
+ let leftVal = value->Js.Float.fromString->JSON.Encode.float
+ let rightvalue = selectedValueStr[1]->Option.getOr(JSON.Encode.null)
switch selectedValueStr[1] {
| Some(ele) => setLclFltrState(val, [leftVal > rightvalue ? rightvalue : leftVal, ele])
| None => ()
}
},
onFocus: _ev => (),
- value: selectedValueStr[0]->Option.getOr(Js.Json.number(0.0)),
+ value: selectedValueStr[0]->Option.getOr(JSON.Encode.float(0.0)),
checked: false,
}
}, [selectedValueStr])
@@ -259,14 +265,14 @@ module RangeFilterCell = {
onChange: ev => {
let value = {ev->ReactEvent.Form.target}["value"]
- let rightvalue = value->Js.Float.fromString->Js.Json.number
+ let rightvalue = value->Js.Float.fromString->JSON.Encode.float
switch selectedValueStr[0] {
| Some(ele) => setLclFltrState(val, [ele, ele > rightvalue ? ele : rightvalue])
| None => ()
}
},
onFocus: _ev => (),
- value: selectedValueStr[1]->Option.getOr(Js.Json.number(0.0)),
+ value: selectedValueStr[1]->Option.getOr(JSON.Encode.float(0.0)),
checked: false,
}
}, [selectedValueStr])
diff --git a/src/components/TableUtils.res b/src/components/TableUtils.res
index 3db994cd8..fbfaa34fb 100644
--- a/src/components/TableUtils.res
+++ b/src/components/TableUtils.res
@@ -65,7 +65,7 @@ type customiseColumnConfig = {
type selectAllSubmitActions = {
btnText: string,
showMultiSelectCheckBox: bool,
- onClick: Js.Array2.t => unit,
+ onClick: array => unit,
disableParam: disableField,
}
@@ -74,7 +74,7 @@ type hideItem = {
value: string,
}
-external jsonToStr: Js.Json.t => string = "%identity"
+external jsonToStr: JSON.t => string = "%identity"
type textAlign = Left | Right
@@ -109,7 +109,7 @@ type label = {
type currency = string
type filterRow =
- | DropDownFilter(string, array)
+ | DropDownFilter(string, array)
| TextFilter(string)
| Range(string, float, float)
@@ -834,7 +834,7 @@ module HeaderActions = {
onBlur: _ev => (),
onChange,
onFocus: _ev => (),
- value: order->getSortOrderToString->Js.Json.string,
+ value: order->getSortOrderToString->JSON.Encode.string,
checked: true,
}
let customButton = switch filterRow {
diff --git a/src/components/TableUtils.resi b/src/components/TableUtils.resi
index 4a2e77ec4..12549a7a2 100644
--- a/src/components/TableUtils.resi
+++ b/src/components/TableUtils.resi
@@ -22,11 +22,11 @@ type disableField = {key: string, values: array}
type selectAllSubmitActions = {
btnText: string,
showMultiSelectCheckBox: bool,
- onClick: Js.Array2.t => unit,
+ onClick: array => unit,
disableParam: disableField,
}
type hideItem = {key: string, value: string}
-external jsonToStr: Js.Json.t => string = "%identity"
+external jsonToStr: JSON.t => string = "%identity"
type textAlign = Left | Right
type fontBold = bool
type labelMargin = string
@@ -38,7 +38,7 @@ let getSortOrderString: sortOrder => string
type label = {title: string, color: labelColor, showIcon?: bool}
type currency = string
type filterRow =
- | DropDownFilter(string, array)
+ | DropDownFilter(string, array)
| TextFilter(string)
| Range(string, float, float)
type cell =
diff --git a/src/components/TabularInput.res b/src/components/TabularInput.res
index c0db28b6e..06a79914e 100644
--- a/src/components/TabularInput.res
+++ b/src/components/TabularInput.res
@@ -25,7 +25,7 @@ module TableCell = {
onChange(elemIndex, i, event["value"])
},
onFocus: _ev => (),
- value: (keyValue[elemIndex]->Option.getOr([]))[i]->Option.getOr("")->Js.Json.string,
+ value: (keyValue[elemIndex]->Option.getOr([]))[i]->Option.getOr("")->JSON.Encode.string,
checked: true,
}
@@ -83,10 +83,10 @@ module TableStructure = {
let make = (~input: ReactFinalForm.fieldRenderPropsInput, ~headings, ~fields) => {
let tableInput = input->ffInputToTableInput
let currentValue = React.useMemo1(() => {
- switch tableInput.value->Js.Json.decodeArray {
+ switch tableInput.value->JSON.Decode.array {
| Some(str) =>
str->Array.map(item => {
- switch item->Js.Json.decodeArray {
+ switch item->JSON.Decode.array {
| Some(a) =>
a->Array.map(
itm => {
diff --git a/src/components/TimeInput.res b/src/components/TimeInput.res
index 2770fb5da..dca60a0a1 100644
--- a/src/components/TimeInput.res
+++ b/src/components/TimeInput.res
@@ -35,7 +35,7 @@ let make = (
) => {
let _ = position
let _ = icon
- let value = switch input.value->Js.Json.decodeString {
+ let value = switch input.value->JSON.Decode.string {
| Some(str) => str
| None => ""
}
diff --git a/src/components/custom-icons/LottieFiles.res b/src/components/custom-icons/LottieFiles.res
index 81fe06ab2..3b9ef7fcd 100644
--- a/src/components/custom-icons/LottieFiles.res
+++ b/src/components/custom-icons/LottieFiles.res
@@ -1,5 +1,5 @@
open Promise
-type lottieFileJson = Loading(Js.Promise.t) | Loaded(Js.Json.t)
+type lottieFileJson = Loading(Js.Promise.t) | Loaded(JSON.t)
let selectedTick = "selectedTick.json"
let deselectTick = "deselectTick.json"
@@ -11,7 +11,7 @@ let exitSearchCross = "exitCross.json"
let lottieDict: Dict.t = Dict.make()
let useLottieJson = lottieFileName => {
- let (lottieJson, setlottieJson) = React.useState(_ => Js.Json.null)
+ let (lottieJson, setlottieJson) = React.useState(_ => JSON.Encode.null)
let fetchApi = AuthHooks.useApiFetcher()
let uriPrefix = LogicUtils.useUrlPrefix()
let showToast = ToastState.useShowToast()
@@ -35,7 +35,7 @@ let useLottieJson = lottieFileName => {
})
->catch(_err => {
showToast(~message="Error!", ~toastType=ToastError, ())
- Js.Json.null->resolve
+ JSON.Encode.null->resolve
})
lottieDict->Dict.set(lottieFileName, Loading(fetchLottie))
diff --git a/src/components/custom-icons/LottieIcons.res b/src/components/custom-icons/LottieIcons.res
index 143285c6b..a94f27ca7 100644
--- a/src/components/custom-icons/LottieIcons.res
+++ b/src/components/custom-icons/LottieIcons.res
@@ -13,7 +13,7 @@ let useLottieIcon = (isSelected, selectedLottieJson, deselectLottieJson) => {
let newVal = isSelected ? selectedLottieJson : deselectLottieJson
setDefaultState(_ => newVal)
- } else if selectedLottieJson != Js.Json.null && deselectLottieJson != Js.Json.null {
+ } else if selectedLottieJson != JSON.Encode.null && deselectLottieJson != JSON.Encode.null {
setDefaultState(_ => isSelected ? deselectLottieJson : selectedLottieJson)
hasRendered.current = true
}
diff --git a/src/components/form/BoolInput.res b/src/components/form/BoolInput.res
index 8ada7a9aa..a6717a688 100644
--- a/src/components/form/BoolInput.res
+++ b/src/components/form/BoolInput.res
@@ -115,11 +115,11 @@ let make = (
~addAttributeId="",
) => {
let boolInput = baseInput->ffInputToBoolInput
- let boolValue: Js.Json.t = boolInput.value
+ let boolValue: JSON.t = boolInput.value
- let isSelected = switch boolValue->Js.Json.classify {
- | JSONTrue => true
- | JSONString(str) => str === "true"
+ let isSelected = switch boolValue->JSON.Classify.classify {
+ | Bool(_) => true
+ | String(str) => str === "true"
| _ => false
}
let setIsSelected = boolInput.onChange
diff --git a/src/components/form/FormRenderer.res b/src/components/form/FormRenderer.res
index b7e1fb3d2..11cb0cf5f 100644
--- a/src/components/form/FormRenderer.res
+++ b/src/components/form/FormRenderer.res
@@ -2,13 +2,13 @@ open InputFields
type inputFieldType = {
name: string,
placeholder: string,
- format: option<(. ~value: Js.Json.t, ~name: string) => Js.Json.t>,
- parse: option<(. ~value: Js.Json.t, ~name: string) => Js.Json.t>,
+ format: option<(. ~value: JSON.t, ~name: string) => JSON.t>,
+ parse: option<(. ~value: JSON.t, ~name: string) => JSON.t>,
disabled: bool,
isRequired: bool,
@as("type") type_: string,
customInput: customInputFn,
- validate: option<(option, Js.Json.t) => Js.Promise.t>>,
+ validate: option<(option, JSON.t) => Js.Promise.t>>,
}
type fieldInfoType = {
label: string,
@@ -36,7 +36,7 @@ let makeInputFieldInfo = (
~parse=?,
~type_="text",
~isRequired=false,
- ~validate: option<(option, Js.Json.t) => Js.Promise.t>>=?,
+ ~validate: option<(option, JSON.t) => Js.Promise.t>>=?,
(),
) => {
let label = label->Option.getOr(name)
@@ -140,7 +140,7 @@ let makeFieldInfo = (
~type_="text",
~isRequired=false,
~fieldPortalKey: option=?,
- ~validate: option<(option, Js.Json.t) => Js.Promise.t>>=?,
+ ~validate: option<(option, JSON.t) => Js.Promise.t>>=?,
(),
) => {
let label = label->Option.getOr(name)
@@ -521,9 +521,9 @@ module FormError = {
let subscriptionJson = {
let subscriptionDict = Dict.make()
- Dict.set(subscriptionDict, "submitErrors", Js.Json.boolean(true))
+ Dict.set(subscriptionDict, "submitErrors", JSON.Encode.bool(true))
- Js.Json.object_(subscriptionDict)
+ JSON.Encode.object(subscriptionDict)
}
React.useEffect0(() => {
@@ -537,7 +537,7 @@ module FormError = {
})
switch submitErrors {
| Some(errorsJson) =>
- switch errorsJson->Js.Json.decodeObject {
+ switch errorsJson->JSON.Decode.object {
| Some(dict) =>
let errStr = switch Dict.get(dict, "FORM_ERROR") {
| Some(err) => LogicUtils.getStringFromJson(err, "")
@@ -594,11 +594,11 @@ module SubmitButton = {
"submitErrors",
"submitting",
]->Array.forEach(item => {
- Dict.set(dict, item, Js.Json.boolean(true))
+ Dict.set(dict, item, JSON.Encode.bool(true))
})
let formState: ReactFinalForm.formState = ReactFinalForm.useFormState(
- dict->Js.Json.object_->Js.Nullable.return,
+ dict->JSON.Encode.object->Js.Nullable.return,
)
let {hasValidationErrors, hasSubmitErrors, submitting, dirtySinceLastSubmit, errors} = formState
@@ -797,7 +797,7 @@ let make = (
~onSubmit: (
ReactFinalForm.formValues,
ReactFinalForm.formApi,
- ) => Promise.t>,
+ ) => Promise.t>,
~fieldsWrapperClass="",
~fieldWrapperClass="",
~formClass="",
diff --git a/src/components/form/FormValuesSpy.res b/src/components/form/FormValuesSpy.res
index 85de63832..b99a1b994 100644
--- a/src/components/form/FormValuesSpy.res
+++ b/src/components/form/FormValuesSpy.res
@@ -3,7 +3,7 @@ module JsonBox = {
let make = (~json) => {
- {json->Js.Json.stringifyWithSpace(2)->React.string}
+ {json->JSON.stringifyWithIndent(2)->React.string}
}
}
diff --git a/src/components/form/MultipleTextInput.res b/src/components/form/MultipleTextInput.res
index b961f396b..4338dd532 100644
--- a/src/components/form/MultipleTextInput.res
+++ b/src/components/form/MultipleTextInput.res
@@ -42,7 +42,7 @@ let make = (
) => {
let showPopUp = PopUpState.useShowPopUp()
let currentTags = React.useMemo1(() => {
- input.value->Js.Json.decodeArray->Option.getOr([])->Belt.Array.keepMap(Js.Json.decodeString)
+ input.value->JSON.Decode.array->Option.getOr([])->Belt.Array.keepMap(JSON.Decode.string)
}, [input.value])
let setTags = tags => {
@@ -128,7 +128,7 @@ let make = (
setText(_ => val)
},
onFocus: _ev => (),
- value: Js.Json.string(text),
+ value: JSON.Encode.string(text),
checked: false,
}
}
diff --git a/src/components/form/NumericTextInput.res b/src/components/form/NumericTextInput.res
index 818190ab8..5c8f20955 100644
--- a/src/components/form/NumericTextInput.res
+++ b/src/components/form/NumericTextInput.res
@@ -1,4 +1,4 @@
-let getFloat = strJson => strJson->Js.Json.decodeString->Option.flatMap(Float.fromString)
+let getFloat = strJson => strJson->JSON.Decode.string->Option.flatMap(Float.fromString)
@react.component
let make = (
@@ -53,7 +53,7 @@ let make = (
onChange: ev => {
let value = ReactEvent.Form.target(ev)["value"]
- let strValue = value->Js.Json.decodeString->Option.getOr("")
+ let strValue = value->JSON.Decode.string->Option.getOr("")
let cleanedValue = switch strValue->Js.String2.match_(%re("/[\d\.]/g")) {
| Some(strArr) =>
@@ -81,13 +81,13 @@ let make = (
}
let finalVal = precisionCheckedVal !== "" ? precisionCheckedVal : cleanedValue
- setLocalStrValue(_ => finalVal->Js.Json.string)
+ setLocalStrValue(_ => finalVal->JSON.Encode.string)
- switch finalVal->Js.Json.string->getFloat {
+ switch finalVal->JSON.Encode.string->getFloat {
| Some(num) => input.onChange(num->Identity.anyTypeToReactEvent)
| None =>
if value === "" {
- input.onChange(Js.Json.null->Identity.anyTypeToReactEvent)
+ input.onChange(JSON.Encode.null->Identity.anyTypeToReactEvent)
}
}
},
@@ -98,10 +98,10 @@ let make = (
setLocalStrValue(prevLocalStr => {
let numericPrevLocalValue =
prevLocalStr
- ->Js.Json.decodeString
+ ->JSON.Decode.string
->Option.flatMap(Float.fromString)
- ->Option.map(Js.Json.number)
- ->Option.getOr(Js.Json.null)
+ ->Option.map(JSON.Encode.float)
+ ->Option.getOr(JSON.Encode.null)
if input.value === numericPrevLocalValue {
prevLocalStr
} else {
diff --git a/src/components/form/TextInput.res b/src/components/form/TextInput.res
index 9ce7b40c9..21c4f4028 100644
--- a/src/components/form/TextInput.res
+++ b/src/components/form/TextInput.res
@@ -83,7 +83,7 @@ let make = (
}, (inputRef.current, input.name))
React.useEffect1(() => {
- let val = input.value->Js.Json.decodeString->Option.getOr("")
+ let val = input.value->JSON.Decode.string->Option.getOr("")
if val->String.includes("") {
showPopUp({
@@ -169,9 +169,9 @@ let make = (
focus:border-opacity-100 ${hoverCss} ${roundingClass} ${cursorClass} ${dashboardClass} ${inputStyle} ${borderClass} ${customStyle} ${placeholderClass} ${isDisabled
? onDisabledStyle
: onActiveStyle}`
- let value = switch input.value->Js.Json.classify {
- | JSONString(str) => str
- | JSONNumber(num) => num->Float.toString
+ let value = switch input.value->JSON.Classify.classify {
+ | String(str) => str
+ | Number(num) => num->Float.toString
| _ => ""
}
diff --git a/src/components/form/YesNoRadioInput.res b/src/components/form/YesNoRadioInput.res
index e4d1175c0..4f8c32d70 100644
--- a/src/components/form/YesNoRadioInput.res
+++ b/src/components/form/YesNoRadioInput.res
@@ -7,7 +7,7 @@ let make = (~input: ReactFinalForm.fieldRenderPropsInput) => {
label="Yes"
value="yes"
type_="radio"
- checked={input.value == "yes"->Js.Json.string}
+ checked={input.value == "yes"->JSON.Encode.string}
onChange=input.onChange
/>
@@ -18,7 +18,7 @@ let make = (~input: ReactFinalForm.fieldRenderPropsInput) => {
label="No"
value="no"
type_="radio"
- checked={input.value == "no"->Js.Json.string}
+ checked={input.value == "no"->JSON.Encode.string}
onChange=input.onChange
/>
diff --git a/src/components/priority-logics/AddPLGateway.res b/src/components/priority-logics/AddPLGateway.res
index 296eef585..f56b8d114 100644
--- a/src/components/priority-logics/AddPLGateway.res
+++ b/src/components/priority-logics/AddPLGateway.res
@@ -58,11 +58,11 @@ let make = (
let selectedOptions =
gateWaysInput.value
- ->Js.Json.decodeArray
+ ->JSON.Decode.array
->Option.getOr([])
->Belt.Array.keepMap(item =>
item
- ->Js.Json.decodeObject
+ ->JSON.Decode.object
->Option.flatMap(dict => {
let connectorDict = dict->LogicUtils.getDictfromDict("connector")
let obj: gateway = {
@@ -105,8 +105,10 @@ let make = (
},
onFocus: _ev => (),
value: selectedOptions
- ->Array.map(selectedOption => selectedOption.connector.merchant_connector_id->Js.Json.string)
- ->Js.Json.array,
+ ->Array.map(selectedOption =>
+ selectedOption.connector.merchant_connector_id->JSON.Encode.string
+ )
+ ->JSON.Encode.array,
checked: true,
}
diff --git a/src/context/ChartContext.res b/src/context/ChartContext.res
index 41dcd53ea..1c988133c 100644
--- a/src/context/ChartContext.res
+++ b/src/context/ChartContext.res
@@ -3,10 +3,10 @@ open Promise
open LogicUtils
type chartComponent = {
- topChartData: option>,
- bottomChartData: option>,
- topChartLegendData: option>,
- bottomChartLegendData: option>,
+ topChartData: option>,
+ bottomChartData: option>,
+ topChartLegendData: option>,
+ bottomChartLegendData: option>,
setTopChartVisible: (bool => bool) => unit,
setBottomChartVisible: (bool => bool) => unit,
setGranularity: (option => option) => unit,
@@ -139,10 +139,10 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF
->Belt.Array.keepMap(entry => {
let (key, value) = entry
if allFilterKeys->Array.includes(key) {
- switch value->Js.Json.classify {
- | JSONString(str) => `${key}=${str}`->Some
- | JSONNumber(num) => `${key}=${num->String.make}`->Some
- | JSONArray(arr) => `${key}=[${arr->String.make}]`->Some
+ switch value->JSON.Classify.classify {
+ | String(str) => `${key}=${str}`->Some
+ | Number(num) => `${key}=${num->String.make}`->Some
+ | Array(arr) => `${key}=[${arr->String.make}]`->Some
| _ => None
}
} else {
@@ -191,7 +191,7 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF
chartEntity.allFilterDimension->Array.includes(key) ? Some((key, value)) : None
})
->Dict.fromArray
- ->Js.Json.object_
+ ->JSON.Encode.object
->Some
(startTimeFromUrl, endTimeFromUrl, filterValueFromUrl)
}, [topFiltersToSearchParam])
@@ -305,8 +305,8 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF
setTopChartData(_ => Loading)
let cardinality = cardinalityMapperToNumber(Some(cardinalityFromUrl))
let timeObj = Dict.fromArray([
- ("start", startTimeFromUrl->Js.Json.string),
- ("end", endTimeFromUrl->Js.Json.string),
+ ("start", startTimeFromUrl->JSON.Encode.string),
+ ("end", endTimeFromUrl->JSON.Encode.string),
])
let (metric, secondaryMetrics) = switch value.metrics->Array.get(0) {
| Some(metrics) => (metrics.metric_name_db, metrics.secondryMetrics)
@@ -338,7 +338,7 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF
~timeCol,
~domain=value.domain->Option.getOr(""),
(),
- )->Js.Json.stringify,
+ )->JSON.stringify,
~authToken=parentToken,
~headers=[("QueryType", "Chart Time Series")]->Dict.fromArray,
(),
@@ -358,15 +358,15 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF
},
)
->Dict.fromArray
- ->Js.Json.object_
+ ->JSON.Encode.object
},
)
- resolve(jsonTransFormer(metric, jsonObj)->Js.Json.array)
+ resolve(jsonTransFormer(metric, jsonObj)->JSON.Encode.array)
},
)
->catch(
_err => {
- resolve(Js.Json.null)
+ resolve(JSON.Encode.null)
},
)
})
@@ -378,7 +378,7 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF
dataMerge(
~dataArr=metricsArr->Array.map(item => item->getArrayFromJson([])),
~dictKey=Array.concat(activeTab->Option.getOr([]), ["time"]),
- )->Js.Json.array,
+ )->JSON.Encode.array,
),
),
)
@@ -398,14 +398,14 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF
~sortingParams?,
~domain=value.domain->Option.getOr(""),
(),
- )->Js.Json.stringify,
+ )->JSON.stringify,
~authToken=parentToken,
~headers=[("QueryType", "Chart Legend")]->Dict.fromArray,
(),
)
->addLogsAroundFetch(~logTitle=`Chart legend Data`)
->then(text => {
- let jsonObj = convertNewLineSaperatedDataToArrayOfJson(text)->Js.Json.array
+ let jsonObj = convertNewLineSaperatedDataToArrayOfJson(text)->JSON.Encode.array
resolve(setTopChartDataLegendData(_ => Loaded(jsonObj)))
})
->catch(_err => {
@@ -436,8 +436,8 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF
let cardinality = cardinalityMapperToNumber(Some(cardinalityFromUrl))
let timeObj = Dict.fromArray([
- ("start", startTimeFromUrl->Js.Json.string),
- ("end", endTimeFromUrl->Js.Json.string),
+ ("start", startTimeFromUrl->JSON.Encode.string),
+ ("end", endTimeFromUrl->JSON.Encode.string),
])
let (metric, secondaryMetrics) = switch value.metrics->Array.get(0) {
| Some(metrics) => (metrics.metric_name_db, metrics.secondryMetrics)
@@ -467,7 +467,7 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF
~timeCol=value.timeCol,
~domain=value.domain->Option.getOr(""),
(),
- )->Js.Json.stringify,
+ )->JSON.stringify,
~authToken=parentToken,
~headers=[("QueryType", "Chart Time Series")]->Dict.fromArray,
(),
@@ -487,15 +487,15 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF
},
)
->Dict.fromArray
- ->Js.Json.object_
+ ->JSON.Encode.object
},
)
- resolve(jsonTransFormer(metric, jsonObj)->Js.Json.array)
+ resolve(jsonTransFormer(metric, jsonObj)->JSON.Encode.array)
},
)
->catch(
_err => {
- resolve(Js.Json.null)
+ resolve(JSON.Encode.null)
},
)
})
@@ -505,7 +505,7 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF
dataMerge(
~dataArr=metricsArr->Array.map(item => item->getArrayFromJson([])),
~dictKey=Array.concat(activeTab->Option.getOr([]), ["time"]),
- )->Js.Json.array
+ )->JSON.Encode.array
resolve(setBottomChartData(_ => Loaded(data)))
})
@@ -524,14 +524,14 @@ let make = (~children, ~chartEntity: DynamicChart.entity, ~chartId="", ~defaultF
~sortingParams?,
~domain=value.domain->Option.getOr(""),
(),
- )->Js.Json.stringify,
+ )->JSON.stringify,
~authToken=parentToken,
~headers=[("QueryType", "Chart Legend")]->Dict.fromArray,
(),
)
->addLogsAroundFetch(~logTitle=`Chart legend Data`)
->then(text => {
- let jsonObj = convertNewLineSaperatedDataToArrayOfJson(text)->Js.Json.array
+ let jsonObj = convertNewLineSaperatedDataToArrayOfJson(text)->JSON.Encode.array
resolve(setBottomChartDataLegendData(_ => Loaded(jsonObj)))
})
->catch(_err => {
@@ -644,10 +644,10 @@ module SDKAnalyticsChartContext = {
->Belt.Array.keepMap(entry => {
let (key, value) = entry
if allFilterKeys->Array.includes(key) {
- switch value->Js.Json.classify {
- | JSONString(str) => `${key}=${str}`->Some
- | JSONNumber(num) => `${key}=${num->String.make}`->Some
- | JSONArray(arr) => `${key}=[${arr->String.make}]`->Some
+ switch value->JSON.Classify.classify {
+ | String(str) => `${key}=${str}`->Some
+ | Number(num) => `${key}=${num->String.make}`->Some
+ | Array(arr) => `${key}=[${arr->String.make}]`->Some
| _ => None
}
} else {
@@ -696,7 +696,7 @@ module SDKAnalyticsChartContext = {
chartEntity.allFilterDimension->Array.includes(key) ? Some((key, value)) : None
})
->Dict.fromArray
- ->Js.Json.object_
+ ->JSON.Encode.object
->Some
(startTimeFromUrl, endTimeFromUrl, filterValueFromUrl)
}, [topFiltersToSearchParam])
@@ -791,8 +791,8 @@ module SDKAnalyticsChartContext = {
switch differentTimeValues->Array.get(0) {
| Some(timeObjOrig) => {
let timeObj = Dict.fromArray([
- ("start", timeObjOrig.fromTime->Js.Json.string),
- ("end", timeObjOrig.toTime->Js.Json.string),
+ ("start", timeObjOrig.fromTime->JSON.Encode.string),
+ ("end", timeObjOrig.toTime->JSON.Encode.string),
])
fetchApi(
@@ -808,7 +808,7 @@ module SDKAnalyticsChartContext = {
~timeCol,
~domain=value.domain->Option.getOr(""),
(),
- )->Js.Json.stringify,
+ )->JSON.stringify,
~authToken=parentToken,
~headers=[("QueryType", "Chart Time Series")]->Dict.fromArray,
(),
@@ -824,7 +824,7 @@ module SDKAnalyticsChartContext = {
dictOrigItem => {
let (key, value) = dictOrigItem
segmentValue->Option.getOr([])->Array.includes(key)
- ? Some(value->Js.Json.decodeString->Option.getOr(""))
+ ? Some(value->JSON.Decode.string->Option.getOr(""))
: None
},
)
@@ -849,7 +849,7 @@ module SDKAnalyticsChartContext = {
~jsonFormattedFilter=item->filterMapper,
~domain=value.domain->Option.getOr(""),
(),
- )->Js.Json.stringify,
+ )->JSON.stringify,
~authToken=parentToken,
~headers=[("QueryType", "Chart Time Series")]->Dict.fromArray,
(),
@@ -872,7 +872,7 @@ module SDKAnalyticsChartContext = {
origDictArrItem => {
let (key, value) = origDictArrItem
segmentValue->Option.getOr([])->Array.includes(key)
- ? Some(value->Js.Json.decodeString->Option.getOr(""))
+ ? Some(value->JSON.Decode.string->Option.getOr(""))
: None
},
)
@@ -890,15 +890,15 @@ module SDKAnalyticsChartContext = {
},
)
->Dict.fromArray
- ->Js.Json.object_,
+ ->JSON.Encode.object,
)
: None
},
),
- )->Js.Json.array,
+ )->JSON.Encode.array,
)),
)
- ->catch(_err => resolve((item, "", []->Js.Json.array)))
+ ->catch(_err => resolve((item, "", []->JSON.Encode.array)))
},
)
->Promise.all
@@ -962,8 +962,8 @@ module SDKAnalyticsChartContext = {
// differentTimeValues
// ->Array.map(timeObjOrig => {
// let timeObj = Dict.fromArray([
- // ("start", timeObjOrig.fromTime->Js.Json.string),
- // ("end", timeObjOrig.toTime->Js.Json.string),
+ // ("start", timeObjOrig.fromTime->JSON.Encode.string),
+ // ("end", timeObjOrig.toTime->JSON.Encode.string),
// ])
// selectedTrends->Array.map(
// item => {
@@ -980,7 +980,7 @@ module SDKAnalyticsChartContext = {
// ~jsonFormattedFilter=item->filterMapper,
// ~domain=value.domain->Option.getOr(""),
// (),
- // )->Js.Json.stringify,
+ // )->JSON.stringify,
// ~authToken=parentToken,
// ~headers=[("QueryType", "Chart Time Series")]->Dict.fromArray,
// (),
@@ -991,10 +991,10 @@ module SDKAnalyticsChartContext = {
// resolve((
// item,
// `${timeObjOrig.fromTime} to ${timeObjOrig.toTime}`,
- // convertNewLineSaperatedDataToArrayOfJson(text)->Js.Json.array,
+ // convertNewLineSaperatedDataToArrayOfJson(text)->JSON.Encode.array,
// )),
// )
- // ->catch(_err => resolve((item, "", []->Js.Json.array)))
+ // ->catch(_err => resolve((item, "", []->JSON.Encode.array)))
// },
// )
// })
diff --git a/src/context/DatatableContext.res b/src/context/DatatableContext.res
index d89a7b45c..2b4e785de 100644
--- a/src/context/DatatableContext.res
+++ b/src/context/DatatableContext.res
@@ -1,5 +1,5 @@
-let defaultValue: Dict.t> = Dict.make()
-let setDefaultValue: (Js.Dict.key, array) => unit = (_string, _arr) => ()
+let defaultValue: Dict.t> = Dict.make()
+let setDefaultValue: (Js.Dict.key, array) => unit = (_string, _arr) => ()
let datatableContext = React.createContext((defaultValue, setDefaultValue))
diff --git a/src/context/FilterContext.res b/src/context/FilterContext.res
index 03c1d5646..26bc38dad 100644
--- a/src/context/FilterContext.res
+++ b/src/context/FilterContext.res
@@ -11,7 +11,7 @@ type filterUpdater = {
filterValue: Dict.t,
updateExistingKeys: Dict.t => unit,
removeKeys: array => unit,
- filterValueJson: Dict.t,
+ filterValueJson: Dict.t,
reset: unit => unit,
}
diff --git a/src/context/SingleStatContext.res b/src/context/SingleStatContext.res
index d8e5c8c85..fc80e9e7f 100644
--- a/src/context/SingleStatContext.res
+++ b/src/context/SingleStatContext.res
@@ -6,9 +6,9 @@ open LogicUtils
open AnalyticsNewUtils
type singleStatComponent = {
- singleStatData: option>>,
- singleStatTimeSeries: option>>,
- singleStatDelta: option>>,
+ singleStatData: option>>,
+ singleStatTimeSeries: option>>,
+ singleStatDelta: option>>,
singleStatLoader: Dict.t,
singleStatIsVisible: (bool => bool) => unit,
}
@@ -86,10 +86,10 @@ let make = (
->Belt.Array.keepMap(entry => {
let (key, value) = entry
if allFilterKeys->Array.includes(key) {
- switch value->Js.Json.classify {
- | JSONString(str) => `${key}=${str}`->Some
- | JSONNumber(num) => `${key}=${num->String.make}`->Some
- | JSONArray(arr) => `${key}=[${arr->String.make}]`->Some
+ switch value->JSON.Classify.classify {
+ | String(str) => `${key}=${str}`->Some
+ | Number(num) => `${key}=${num->String.make}`->Some
+ | Array(arr) => `${key}=[${arr->String.make}]`->Some
| _ => None
}
} else {
@@ -113,7 +113,7 @@ let make = (
filterKeys->Array.includes(key) ? Some((key, value)) : None
})
->Dict.fromArray
- ->Js.Json.object_
+ ->JSON.Encode.object
->Some
}, [topFiltersToSearchParam])
@@ -231,12 +231,12 @@ let make = (
},
)
let timeObj = Dict.fromArray([
- ("start", filterConfigCurrent.startTime->Js.Json.string),
- ("end", filterConfigCurrent.endTime->Js.Json.string),
+ ("start", filterConfigCurrent.startTime->JSON.Encode.string),
+ ("end", filterConfigCurrent.endTime->JSON.Encode.string),
])
let historicTimeObj = Dict.fromArray([
- ("start", filterConfigHistoric.startTime->Js.Json.string),
- ("end", filterConfigHistoric.endTime->Js.Json.string),
+ ("start", filterConfigHistoric.startTime->JSON.Encode.string),
+ ("end", filterConfigHistoric.endTime->JSON.Encode.string),
])
let granularityConfig = switch filterConfigCurrent {
@@ -255,7 +255,7 @@ let make = (
~customFilterValue=filterConfigHistoric.customFilterValue,
~domain=urlConfig.domain,
(),
- )->Js.Json.stringify,
+ )->JSON.stringify,
~authToken=parentToken,
~headers=[("QueryType", "SingleStatHistoric")]->Dict.fromArray,
(),
@@ -274,12 +274,12 @@ let make = (
Dict.set(
prevDict,
updatedMetrics,
- Loaded(jsonObj->Array.get(0)->Option.getOr(Js.Json.object_(Dict.make()))),
+ Loaded(jsonObj->Array.get(0)->Option.getOr(JSON.Encode.object(Dict.make()))),
)
prevDict
},
)
- Loaded(Js.Json.object_(Dict.make()))
+ Loaded(JSON.Encode.object(Dict.make()))
})
},
)
@@ -307,7 +307,7 @@ let make = (
~customFilterValue=filterConfigCurrent.customFilterValue,
~domain=urlConfig.domain,
(),
- )->Js.Json.stringify,
+ )->JSON.stringify,
~authToken=parentToken,
~headers=[("QueryType", "SingleStat")]->Dict.fromArray,
(),
@@ -323,13 +323,13 @@ let make = (
Dict.set(
prevDict,
updatedMetrics,
- Loaded(jsonObj->Array.get(0)->Option.getOr(Js.Json.object_(Dict.make()))),
+ Loaded(jsonObj->Array.get(0)->Option.getOr(JSON.Encode.object(Dict.make()))),
)
prevDict
},
)
- resolve(Loaded(Js.Json.object_(Dict.make())))
+ resolve(Loaded(JSON.Encode.object(Dict.make())))
},
)
->catch(
@@ -358,7 +358,7 @@ let make = (
~domain=urlConfig.domain,
~timeCol=urlConfig.timeColumn,
(),
- )->Js.Json.stringify,
+ )->JSON.stringify,
~authToken=parentToken,
~headers=[("QueryType", "SingleStat Time Series")]->Dict.fromArray,
(),
@@ -380,18 +380,18 @@ let make = (
},
)
->Dict.fromArray
- ->Js.Json.object_
+ ->JSON.Encode.object
},
)
let jsonObj = jsonTransFormer(updatedMetrics, jsonObj)
setSingleStatTimeSeries(
prev => {
let prevDict = prev->copyOfDict
- Dict.set(prevDict, updatedMetrics, Loaded(jsonObj->Js.Json.array))
+ Dict.set(prevDict, updatedMetrics, Loaded(jsonObj->JSON.Encode.array))
prevDict
},
)
- resolve(Loaded(Js.Json.object_(Dict.make())))
+ resolve(Loaded(JSON.Encode.object(Dict.make())))
},
)
->catch(
diff --git a/src/context/ThemeUtils.res b/src/context/ThemeUtils.res
index dfbc83468..81683fef9 100644
--- a/src/context/ThemeUtils.res
+++ b/src/context/ThemeUtils.res
@@ -4,7 +4,7 @@ let useThemeFromEvent = () => {
React.useEffect0(() => {
let setEventThemeVal = (eventName, dict) => {
if eventName === "AuthenticationDetails" {
- let payloadDict = dict->Dict.get("payload")->Option.flatMap(Js.Json.decodeObject)
+ let payloadDict = dict->Dict.get("payload")->Option.flatMap(JSON.Decode.object)
let theme =
payloadDict->Option.mapOr("", finalDict => LogicUtils.getString(finalDict, "theme", ""))
setEventTheme(_ => Some(theme))
@@ -20,7 +20,7 @@ let useThemeFromEvent = () => {
let optionalDict = HandlingEvents.getEventDict(ev)
switch optionalDict {
| Some(dict) => {
- let optionalEventName = dict->Dict.get("eventType")->Option.flatMap(Js.Json.decodeString)
+ let optionalEventName = dict->Dict.get("eventType")->Option.flatMap(JSON.Decode.string)
switch optionalEventName {
| Some(eventName) => setEventThemeVal(eventName, dict)
| None => Js.log2("Event Data is not found", dict)
diff --git a/src/context/TokenContextProvider.res b/src/context/TokenContextProvider.res
index e6781f29d..89ee7a850 100644
--- a/src/context/TokenContextProvider.res
+++ b/src/context/TokenContextProvider.res
@@ -1,11 +1,11 @@
let defaultTokenSetter = (_: option => option) => ()
-let defaultDictSetter = (_: Dict.t => Dict.t) => ()
+let defaultDictSetter = (_: Dict.t => Dict.t) => ()
type tokenContextObjectType = {
token: option,
setToken: (option => option) => unit,
- tokenDetailsDict: Dict.t,
- setTokenDetailsDict: (Dict.t => Dict.t) => unit,
+ tokenDetailsDict: Dict.t,
+ setTokenDetailsDict: (Dict.t => Dict.t) => unit,
parentAuthInfo: option,
}
@@ -14,7 +14,7 @@ let defaultTokenObj = {
setToken: defaultTokenSetter,
tokenDetailsDict: Dict.make(),
setTokenDetailsDict: defaultDictSetter,
- parentAuthInfo: HyperSwitchAuthTypes.getAuthInfo(Js.Json.object_(Dict.make()), ""),
+ parentAuthInfo: HyperSwitchAuthTypes.getAuthInfo(JSON.Encode.object(Dict.make()), ""),
}
let tokenContext = React.createContext(defaultTokenObj)
diff --git a/src/context/UserPrefContext.res b/src/context/UserPrefContext.res
index 9156ad9d2..f03528fe9 100644
--- a/src/context/UserPrefContext.res
+++ b/src/context/UserPrefContext.res
@@ -1,7 +1,7 @@
// will be used in future
// docfor the user preference https://docs.google.com/document/d/1BM_UgHLuN0U-cXfRYqN6wWSq-5KUiqojinCfBrUEiVo/edit
open UserPrefUtils
-external userPrefToJson: userPref => Js.Json.t = "%identity"
+external userPrefToJson: userPref => JSON.t = "%identity"
external dictUserPrefToStr: Dict.t => string = "%identity"
let userPrefSetter: (Dict.t => Dict.t) => unit = _ => ()
let defaultUserPref: Dict.t = Dict.make()
@@ -11,8 +11,8 @@ type filter = {
setUserPref: (Dict.t => Dict.t) => unit,
lastVisitedTab: string,
getSearchParamByLink: string => string,
- addConfig: (string, Js.Json.t) => unit,
- getConfig: string => option,
+ addConfig: (string, JSON.t) => unit,
+ getConfig: string => option,
}
let userPrefObj: filter = {
@@ -176,8 +176,8 @@ let make = (~children) => {
(key, value->userPrefToJson)
})
->Dict.fromArray
- ->Js.Json.object_
- ->Js.Json.stringify
+ ->JSON.Encode.object
+ ->JSON.stringify
let value = React.useMemo4(() => {
let currentConfig = userPref->Dict.get(username)->Option.getOr({})
diff --git a/src/entities/EntityType.res b/src/entities/EntityType.res
index 1a2471741..bd47150c8 100644
--- a/src/entities/EntityType.res
+++ b/src/entities/EntityType.res
@@ -1,12 +1,12 @@
type initialFilters<'t> = {
field: FormRenderer.fieldInfoType,
- localFilter: option<(Js.Array.t>, Js.Json.t) => Js.Array.t>>,
+ localFilter: option<(array>, JSON.t) => array>>,
}
type optionType<'t> = {
urlKey: string,
field: FormRenderer.fieldInfoType,
- parser: Js.Json.t => Js.Json.t,
- localFilter: option<(Js.Array.t>, Js.Json.t) => Js.Array.t>>,
+ parser: JSON.t => JSON.t,
+ localFilter: option<(array>, JSON.t) => array>>,
}
let getDefaultEntityOptionType = (): optionType<'t> => {
urlKey: "",
@@ -19,23 +19,23 @@ type summary = {totalCount: int, count: int}
type entityType<'colType, 't> = {
uri: string,
- getObjects: Js.Json.t => array<'t>,
+ getObjects: JSON.t => array<'t>,
defaultColumns: array<'colType>,
allColumns: option>,
getHeading: 'colType => Table.header,
getCell: ('t, 'colType) => Table.cell,
dataKey: string,
summaryKey: string,
- getSummary: Js.Json.t => summary,
+ getSummary: JSON.t => summary,
getShowLink: option<'t => string>,
- defaultFilters: Js.Json.t,
+ defaultFilters: JSON.t,
headers: Dict.t,
initialFilters: array>,
options: array>,
getDetailsUri: string => string,
- getNewUrl: Js.Json.t => string,
+ getNewUrl: JSON.t => string,
getSyncUrl: string => option,
- detailsPageLayout: (Js.Json.t, string) => React.element,
+ detailsPageLayout: (JSON.t, string) => React.element,
searchFields: array,
searchUrl: string,
searchKeyList: array,
@@ -43,20 +43,20 @@ type entityType<'colType, 't> = {
requiredSearchFieldsList: array,
detailsKey: string,
popupFilterFields: array>,
- dateRangeFilterDict: Dict.t,
+ dateRangeFilterDict: Dict.t,
searchValueDict: option>,
- filterCheck: ('t, Js.Array2.t) => bool,
- filterForRow: (option>>, int) => TableUtils.filterObject,
+ filterCheck: ('t, array) => bool,
+ filterForRow: (option>>, int) => TableUtils.filterObject,
}
let emptyObj = {
let dict = Dict.make()
- Dict.set(dict, "offset", Js.Json.number(0.0))
- Js.Json.object_(dict)
+ Dict.set(dict, "offset", JSON.Encode.float(0.0))
+ JSON.Encode.object(dict)
}
let defaultGetSummary = (json, totalCountKey) => {
- switch json->Js.Json.decodeObject {
+ switch json->JSON.Decode.object {
| Some(dict) => {
let summary = {
totalCount: LogicUtils.getInt(dict, totalCountKey, 0),
diff --git a/src/entities/analytics/AnalyticsUtils.res b/src/entities/analytics/AnalyticsUtils.res
index e7bb4c437..b8494e879 100644
--- a/src/entities/analytics/AnalyticsUtils.res
+++ b/src/entities/analytics/AnalyticsUtils.res
@@ -35,9 +35,9 @@ type filterBodyEntity = {
type filterEntity<'t> = {
uri: string,
moduleName: string,
- initialFixedFilters: Js.Json.t => array>,
- initialFilters: Js.Json.t => array>,
- filterDropDownOptions: Js.Json.t => array>,
+ initialFixedFilters: JSON.t => array>,
+ initialFilters: JSON.t => array>,
+ filterDropDownOptions: JSON.t => array>,
filterKeys: array,
timeKeys: timeKeys,
defaultFilterKeys: array,
@@ -49,8 +49,8 @@ type filterEntity<'t> = {
type filterEntityNew<'t> = {
uri: string,
moduleName: string,
- initialFixedFilters: Js.Json.t => array>,
- initialFilters: (Js.Json.t, string => unit) => array>,
+ initialFixedFilters: JSON.t => array>,
+ initialFilters: (JSON.t, string => unit) => array>,
filterKeys: array,
timeKeys: timeKeys,
defaultFilterKeys: array,
@@ -79,11 +79,11 @@ type downloadDataEntity = {
type tableApiBodyEntity = {
startTimeFromUrl: string,
endTimeFromUrl: string,
- filterValueFromUrl?: Js.Json.t,
+ filterValueFromUrl?: JSON.t,
currenltySelectedTab?: array,
deltaMetrics: array,
isIndustry: bool,
- distributionArray?: array,
+ distributionArray?: array,
deltaPrefixArr: array,
tableMetrics: array,
mode?: string,
@@ -94,14 +94,14 @@ type tableApiBodyEntity = {
}
type newApiBodyEntity = {
- timeObj: Dict.t,
+ timeObj: Dict.t,
metric?: string,
- groupBy?: Js.Array2.t,
+ groupBy?: array,
granularityConfig?: (int, string),
cardinality?: float,
- filterValueFromUrl?: Js.Json.t,
+ filterValueFromUrl?: JSON.t,
customFilterValue?: string,
- jsonFormattedFilter?: Js.Json.t,
+ jsonFormattedFilter?: JSON.t,
cardinalitySortDims?: string,
domain: string,
}
@@ -110,7 +110,7 @@ type analyticsTableEntity<'colType, 't> = {
metrics: array,
deltaMetrics: array,
headerMetrics: array,
- distributionArray: option>,
+ distributionArray: option>,
tableEntity: EntityType.entityType<'colType, 't>,
deltaPrefixArr: array,
isIndustry: bool,
@@ -122,7 +122,7 @@ type analyticsTableEntity<'colType, 't> = {
'colType,
) => Table.header,
>,
- tableGlobalFilter: option<(array>, Js.Json.t) => array>>,
+ tableGlobalFilter: option<(array>, JSON.t) => array>>,
moduleName: string,
defaultSortCol: string,
filterKeys: array,
@@ -137,8 +137,8 @@ type analyticsTableEntity<'colType, 't> = {
tableBodyEntity?: tableApiBodyEntity => string,
sampleApiBody?: tableApiBodyEntity => string,
customFilterKey?: string,
- newTableBodyMaker?: newApiBodyEntity => Js.Json.t,
- jsonTransformer?: (string, array, array) => array,
+ newTableBodyMaker?: newApiBodyEntity => JSON.t,
+ jsonTransformer?: (string, array, array) => array,
}
type statSentiment = Positive | Negative | Neutral
@@ -152,7 +152,7 @@ let getDateCreatedObject = () => {
Dict.set(
filterCreatedDict,
endTimeFilterKey,
- Js.Json.string(currentTimestamp->TimeZoneHook.formattedISOString(dateFormat)),
+ JSON.Encode.string(currentTimestamp->TimeZoneHook.formattedISOString(dateFormat)),
)
let prevTime = {
@@ -161,7 +161,7 @@ let getDateCreatedObject = () => {
}
let defaultStartTime = {
- Js.Json.string(
+ JSON.Encode.string(
prevTime
->Js.Date.fromFloat
->Js.Date.toISOString
@@ -169,7 +169,7 @@ let getDateCreatedObject = () => {
)
}
Dict.set(filterCreatedDict, startTimeFilterKey, defaultStartTime)
- Dict.set(filterCreatedDict, "opt", Js.Json.string("today"))
+ Dict.set(filterCreatedDict, "opt", JSON.Encode.string("today"))
filterCreatedDict
}
@@ -178,11 +178,11 @@ open LogicUtils
let getFilterRequestBody = (
~granularity: option=None,
~groupByNames: option>=None,
- ~filter: option=None,
+ ~filter: option=None,
~metrics: option>=None,
~delta: bool=true,
~prefix: option=None,
- ~distributionValues: option=None,
+ ~distributionValues: option=None,
~startDateTime,
~endDateTime,
~cardinality: option=None,
@@ -191,13 +191,13 @@ let getFilterRequestBody = (
~source: string="BATCH",
(),
) => {
- let body: Dict.t = Dict.make()
+ let body: Dict.t = Dict.make()
let timeRange = Dict.make()
let timeSeries = Dict.make()
- Dict.set(timeRange, "startTime", startDateTime->Js.Json.string)
- Dict.set(timeRange, "endTime", endDateTime->Js.Json.string)
- Dict.set(body, "timeRange", timeRange->Js.Json.object_)
+ Dict.set(timeRange, "startTime", startDateTime->JSON.Encode.string)
+ Dict.set(timeRange, "endTime", endDateTime->JSON.Encode.string)
+ Dict.set(body, "timeRange", timeRange->JSON.Encode.object)
switch groupByNames {
| Some(groupByNames) =>
@@ -207,8 +207,8 @@ let getFilterRequestBody = (
"groupByNames",
groupByNames
->ArrayUtils.getUniqueStrArray
- ->Belt.Array.keepMap(item => Some(item->Js.Json.string))
- ->Js.Json.array,
+ ->Belt.Array.keepMap(item => Some(item->JSON.Encode.string))
+ ->JSON.Encode.array,
)
}
| None => ()
@@ -231,32 +231,32 @@ let getFilterRequestBody = (
}
if customFilter != "" {
- Dict.set(body, "customFilter", customFilter->Js.Json.string)
+ Dict.set(body, "customFilter", customFilter->JSON.Encode.string)
}
switch granularity {
| Some(granularity) => {
- Dict.set(timeSeries, "granularity", granularity->Js.Json.string)
- Dict.set(body, "timeSeries", timeSeries->Js.Json.object_)
+ Dict.set(timeSeries, "granularity", granularity->JSON.Encode.string)
+ Dict.set(body, "timeSeries", timeSeries->JSON.Encode.object)
}
| None => ()
}
switch cardinality {
- | Some(cardinality) => Dict.set(body, "cardinality", cardinality->Js.Json.string)
+ | Some(cardinality) => Dict.set(body, "cardinality", cardinality->JSON.Encode.string)
| None => ()
}
switch mode {
- | Some(mode) => Dict.set(body, "mode", mode->Js.Json.string)
+ | Some(mode) => Dict.set(body, "mode", mode->JSON.Encode.string)
| None => ()
}
switch prefix {
- | Some(prefix) => Dict.set(body, "prefix", prefix->Js.Json.string)
+ | Some(prefix) => Dict.set(body, "prefix", prefix->JSON.Encode.string)
| None => ()
}
- Dict.set(body, "source", source->Js.Json.string)
+ Dict.set(body, "source", source->JSON.Encode.string)
switch metrics {
| Some(metrics) =>
@@ -266,14 +266,14 @@ let getFilterRequestBody = (
"metrics",
metrics
->ArrayUtils.getUniqueStrArray
- ->Belt.Array.keepMap(item => Some(item->Js.Json.string))
- ->Js.Json.array,
+ ->Belt.Array.keepMap(item => Some(item->JSON.Encode.string))
+ ->JSON.Encode.array,
)
}
| None => ()
}
if delta {
- Dict.set(body, "delta", true->Js.Json.boolean)
+ Dict.set(body, "delta", true->JSON.Encode.bool)
}
body
@@ -391,39 +391,39 @@ let generatePayload = (
~groupByNames,
~prefix,
~source,
- ~filters: option,
+ ~filters: option,
~customFilter,
) => {
let timeArr = Dict.fromArray([
- ("startTime", startTime->Js.Json.string),
- ("endTime", endTime->Js.Json.string),
+ ("startTime", startTime->JSON.Encode.string),
+ ("endTime", endTime->JSON.Encode.string),
])
let newDict = switch groupByNames {
| Some(groupByNames) =>
Dict.fromArray([
- ("timeRange", timeArr->Js.Json.object_),
- ("metrics", metrics->Js.Json.stringArray),
- ("groupByNames", groupByNames->Js.Json.stringArray),
- ("prefix", prefix->Js.Json.string),
- ("source", source->Js.Json.string),
- ("delta", delta->Js.Json.boolean),
+ ("timeRange", timeArr->JSON.Encode.object),
+ ("metrics", metrics->LogicUtils.getJsonFromArrayOfString),
+ ("groupByNames", groupByNames->LogicUtils.getJsonFromArrayOfString),
+ ("prefix", prefix->JSON.Encode.string),
+ ("source", source->JSON.Encode.string),
+ ("delta", delta->JSON.Encode.bool),
])
| None =>
Dict.fromArray([
- ("timeRange", timeArr->Js.Json.object_),
- ("metrics", metrics->Js.Json.stringArray),
- ("prefix", prefix->Js.Json.string),
- ("source", source->Js.Json.string),
- ("delta", delta->Js.Json.boolean),
+ ("timeRange", timeArr->JSON.Encode.object),
+ ("metrics", metrics->LogicUtils.getJsonFromArrayOfString),
+ ("prefix", prefix->JSON.Encode.string),
+ ("source", source->JSON.Encode.string),
+ ("delta", delta->JSON.Encode.bool),
])
}
switch mode {
- | Some(mode) => Dict.set(newDict, "mode", mode->Js.Json.string)
+ | Some(mode) => Dict.set(newDict, "mode", mode->JSON.Encode.string)
| None => ()
}
if customFilter != "" {
- Dict.set(newDict, "customFilter", customFilter->Js.Json.string)
+ Dict.set(newDict, "customFilter", customFilter->JSON.Encode.string)
}
switch filters {
| Some(filters) =>
@@ -442,7 +442,7 @@ let generatedeltaTablePayload = (
~source,
~mode: option,
~deltaPrefixArr,
- ~filters: option,
+ ~filters: option,
~showDeltaMetrics=false,
~customFilter,
) => {
@@ -466,10 +466,10 @@ let generatedeltaTablePayload = (
let generateTablePayload = (
~startTimeFromUrl: string,
~endTimeFromUrl: string,
- ~filterValueFromUrl: option,
+ ~filterValueFromUrl: option,
~currenltySelectedTab: option>,
~tableMetrics: array,
- ~distributionArray: option>,
+ ~distributionArray: option>,
~deltaMetrics: array,
~deltaPrefixArr: array