Skip to content

Commit

Permalink
Merge branch 'main' into 296-chore-update-to-tag-creation-to-nightly-…
Browse files Browse the repository at this point in the history
…tag-creation
  • Loading branch information
JeevaRamu0104 authored Jan 25, 2024
2 parents db92c8f + 7006d91 commit f0d9283
Show file tree
Hide file tree
Showing 28 changed files with 615 additions and 303 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@ All notable changes to this project will be documented in this file. See [conven

- - -

## 1.29.0 (2024-01-24)

### Features

- Added webhooks events ([#272](https://github.com/juspay/hyperswitch-control-center/pull/272)) ([`17efd52`](https://github.com/juspay/hyperswitch-control-center/commit/17efd52ad93f9b4350b68931d2dd43bf8dadb841))
- Syntax highlighter ([#300](https://github.com/juspay/hyperswitch-control-center/pull/300)) ([`d4b800f`](https://github.com/juspay/hyperswitch-control-center/commit/d4b800f32927a6e28a991e574cf312124add26bc))

### Bug Fixes

- Headers issue ([#295](https://github.com/juspay/hyperswitch-control-center/pull/295)) ([`91f98c4`](https://github.com/juspay/hyperswitch-control-center/commit/91f98c4aedb7b744043e63405ed9189b14103fb9))
- Quick start default selection issue ([#287](https://github.com/juspay/hyperswitch-control-center/pull/287)) ([`0ce1d05`](https://github.com/juspay/hyperswitch-control-center/commit/0ce1d055066453338b98b725fef5dcb5c8a402b6))
- Content type fix ([#302](https://github.com/juspay/hyperswitch-control-center/pull/302)) ([`ad2ffb9`](https://github.com/juspay/hyperswitch-control-center/commit/ad2ffb9df736e6617a6ebfd3fb6e7cd1803458af))

### Miscellaneous Tasks

- Utils refactor ([#282](https://github.com/juspay/hyperswitch-control-center/pull/282)) ([`40954d2`](https://github.com/juspay/hyperswitch-control-center/commit/40954d25e225520d41bd2585f2b0fbfc4d9ee965))
- Remove redundant code ([#298](https://github.com/juspay/hyperswitch-control-center/pull/298)) ([`d047ae7`](https://github.com/juspay/hyperswitch-control-center/commit/d047ae7905b3df6fc19679519ed29ad17c164e29))

**Full Changelog:** [`v1.28.1...v1.29.0`](https://github.com/juspay/hyperswitch-control-center/compare/v1.28.1...v1.29.0)

- - -


## 1.28.1 (2024-01-23)

### Bug Fixes
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"react-final-form": "^6.5.9",
"react-ga4": "^2.0.0",
"react-pdf": "^7.3.3",
"react-syntax-highlighter": "^15.5.0",
"react-virtualized-auto-sizer": "^1.0.11",
"react-window": "^1.8.8",
"recoil": "^0.1.2",
Expand Down
15 changes: 15 additions & 0 deletions public/hyperswitch/icons/solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions src/components/AuthWrapperUtils.res
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
type parent

@val external window: 'a = "window"
@val @scope("window") external parent: parent = "parent"

let getValidToken = oStr => {
if oStr !== Some("__failed") && oStr !== Some("") {
oStr
Expand Down
7 changes: 4 additions & 3 deletions src/components/DynamicTableUtils.res
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
let tableHeadingClass = "font-bold text-xl text-black text-opacity-75 dark:text-white dark:text-opacity-75"
type view = Table | Card
@val @scope(("window", "location"))
external reload: unit => unit = "reload"

let visibilityColFunc = (
~dateFormatConvertor: string => option<Js.Json.t>,
Expand Down Expand Up @@ -248,7 +246,10 @@ module TableLoadingErrorIndicator = {
{React.string("Oops, Something Went Wrong! Try again Later.")}
</div>
<Button
text="Refresh" leftIcon={FontAwesome("sync-alt")} onClick={_ => reload()} buttonType
text="Refresh"
leftIcon={FontAwesome("sync-alt")}
onClick={_ => Window.Location.reload()}
buttonType
/>
</>}
</div>
Expand Down
7 changes: 1 addition & 6 deletions src/components/RemoteFilter.res
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
let makeFieldInfo = FormRenderer.makeFieldInfo

@val @scope(("window", "location"))
external reload: unit => unit = "reload"
@val @scope(("window", "location"))
external replace: string => unit = "replace"

module ClearForm = {
@react.component
let make = () => {
Expand Down Expand Up @@ -835,7 +830,7 @@ let make = (
let urlValue = `${path}?${newQueryStr}`
setClearFilterAfterRefresh(_ => true)
setInitialValueJson(_ => Dict.make()->Js.Json.object_)
replace(urlValue)
Window.Location.replace(urlValue)
}

let refreshFilterUi = {
Expand Down
7 changes: 2 additions & 5 deletions src/components/SelectBox.res
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ external toDict: 'a => Dict.t<'t> = "%identity"
@send external getClientRects: Dom.element => Dom.domRect = "getClientRects"
@send external focus: Dom.element => unit = "focus"

@val @scope("window") external windowInnerHeight: int = "innerHeight"
@val @scope("window") external windowInnerWidth: int = "innerWidth"

external ffInputToSelectInput: ReactFinalForm.fieldRenderPropsInput => ReactFinalForm.fieldRenderPropsCustomInput<
array<string>,
> = "%identity"
Expand Down Expand Up @@ -1624,9 +1621,9 @@ module BaseDropdown = {
->Js.Nullable.toOption
->Option.flatMap(elem => elem->getClientRects->toDict->Dict.get("0"))
->Option.flatMap(firstEl => {
let bottomVacent = windowInnerHeight - firstEl["bottom"]->Belt.Float.toInt > 375
let bottomVacent = Window.innerHeight - firstEl["bottom"]->Belt.Float.toInt > 375
let topVacent = firstEl["top"]->Belt.Float.toInt > 470
let rightVacent = windowInnerWidth - firstEl["left"]->Belt.Float.toInt > 270
let rightVacent = Window.innerWidth - firstEl["left"]->Belt.Float.toInt > 270
let leftVacent = firstEl["right"]->Belt.Float.toInt > 270

if bottomVacent {
Expand Down
139 changes: 114 additions & 25 deletions src/components/SelectBox.resi
Original file line number Diff line number Diff line change
@@ -1,16 +1,54 @@
type retType = CheckBox(array<string>) | Radiobox(string)
external toDict: 'a => Dict.t<'t> = "%identity"
external toDict: 'a => RescriptCore.Dict.t<'t> = "%identity"
@send external getClientRects: Dom.element => Dom.domRect = "getClientRects"
@send external focus: Dom.element => unit = "focus"
@val @scope("window") external windowInnerHeight: int = "innerHeight"
@val @scope("window") external windowInnerWidth: int = "innerWidth"
external ffInputToSelectInput: ReactFinalForm.fieldRenderPropsInput => ReactFinalForm.fieldRenderPropsCustomInput<
array<string>,
> = "%identity"
external ffInputToRadioInput: ReactFinalForm.fieldRenderPropsInput => ReactFinalForm.fieldRenderPropsCustomInput<
string,
> = "%identity"

let regex: (string, string) => Js.Re.t
module ListItem: {
@react.component
let make: (
~isDropDown: bool,
~searchString: string,
~multiSelect: bool,
~optionSize: CheckBoxIcon.size=?,
~isSelectedStateMinus: bool=?,
~isSelected: bool,
~isPrevSelected: bool=?,
~isNextSelected: bool=?,
~onClick: JsxEvent.Mouse.t => unit,
~text: Js.String2.t,
~fill: string=?,
~labelValue: Js.String2.t=?,
~isDisabled: bool=?,
~icon: Button.iconType,
~leftVacennt: bool=?,
~showToggle: bool=?,
~customStyle: string=?,
~serialNumber: option<string>=?,
~isMobileView: bool=?,
~description: option<Js.String2.t>=?,
~customLabelStyle: option<string>=?,
~customMarginStyle: string=?,
~listFlexDirection: string=?,
~customSelectStyle: string=?,
~textOverflowClass: string=?,
~dataId: int,
~showDescriptionAsTool: bool=?,
~optionClass: string=?,
~selectClass: string=?,
~toggleProps: string=?,
~checkboxDimension: string=?,
~iconStroke: string=?,
~showToolTipOptions: bool=?,
~textEllipsisForDropDownOptions: bool=?,
~textColorClass: string=?,
) => React.element
}
type dropdownOptionWithoutOptional = {
label: string,
value: string,
Expand All @@ -31,7 +69,8 @@ type dropdownOption = {
iconStroke?: string,
textColor?: string,
}
let useTransformed: Js.Array2.t<dropdownOption> => Js.Array2.t<dropdownOptionWithoutOptional>
let makeNonOptional: dropdownOption => dropdownOptionWithoutOptional
let useTransformed: array<dropdownOption> => array<dropdownOptionWithoutOptional>
type allSelectType = Icon | Text
type opt = {name_: string}
let makeOptions: array<string> => array<dropdownOption>
Expand All @@ -56,12 +95,12 @@ module BaseSelect: {
~showSerialNumber: bool=?,
~heading: string=?,
~showSelectionAsChips: bool=?,
~maxHeight: Js.String2.t=?,
~maxHeight: string=?,
~searchable: bool=?,
~optionRigthElement: React.element=?,
~searchInputPlaceHolder: string=?,
~showSearchIcon: bool=?,
~customStyle: Js.String2.t=?,
~customStyle: string=?,
~customMargin: string=?,
~disableSelect: bool=?,
~deselectDisable: bool=?,
Expand All @@ -88,10 +127,61 @@ module BaseSelect: {
~dropdownClassName: string=?,
~onItemSelect: (JsxEvent.Mouse.t, Js_string.t) => unit=?,
~wrapBasis: string=?,
~preservedAppliedOptions: Js.Array2.t<Js_string.t>=?,
~preservedAppliedOptions: array<Js_string.t>=?,
) => React.element
}

module BaseSelectButton: {
@react.component
let make: (
~showDropDown: bool=?,
~isDropDown: bool=?,
~isHorizontal: bool=?,
~options: array<dropdownOption>,
~optionSize: CheckBoxIcon.size=?,
~isSelectedStateMinus: bool=?,
~onSelect: string => unit,
~value: Js.Json.t,
~deselectDisable: bool=?,
~onBlur: ReactEvent.Focus.t => unit=?,
~setShowDropDown: ('a => bool) => unit=?,
~onAssignClick: string => unit=?,
~customSearchStyle: string,
~disableSelect: bool=?,
~isMobileView: bool=?,
~hideAssignBtn: bool=?,
~searchInputPlaceHolder: string=?,
~showSearchIcon: bool=?,
~allowButtonTextMinWidth: bool=?,
) => React.element
}
module RenderListItemInBaseRadio: {
@react.component
let make: (
~newOptions: Js.Array2.t<dropdownOptionWithoutOptional>,
~value: Js.Json.t,
~descriptionOnHover: bool,
~isDropDown: bool,
~textIconPresent: bool,
~searchString: string,
~optionSize: CheckBoxIcon.size,
~isSelectedStateMinus: bool,
~onItemClick: (string, bool, JsxEvent.Mouse.t) => unit,
~fill: string,
~customStyle: string,
~isMobileView: bool,
~listFlexDirection: string,
~customSelectStyle: string,
~textOverflowClass: option<string>,
~showToolTipOptions: bool,
~textEllipsisForDropDownOptions: bool,
~isHorizontal: bool,
~customMarginStyleOfListItem: string=?,
) => React.element
}
let getHashMappedOptionValues: array<dropdownOptionWithoutOptional> => RescriptCore.Dict.t<
array<dropdownOptionWithoutOptional>,
>
let getSortedKeys: RescriptCore.Dict.t<'a> => Js.Array2.t<string>
module BaseRadio: {
@react.component
let make: (
Expand All @@ -106,13 +196,13 @@ module BaseRadio: {
~deselectDisable: bool=?,
~onBlur: ReactEvent.Focus.t => unit=?,
~fill: string=?,
~customStyle: Js.String2.t=?,
~customStyle: string=?,
~searchable: bool=?,
~isMobileView: bool=?,
~customSearchStyle: string=?,
~descriptionOnHover: bool=?,
~addDynamicValue: bool=?,
~dropdownCustomWidth: Js.String2.t=?,
~dropdownCustomWidth: string=?,
~dropdownRef: React.ref<Js.Nullable.t<Dom.element>>=?,
~showMatchingRecordsText: bool=?,
~fullLength: bool=?,
Expand All @@ -130,12 +220,11 @@ module BaseRadio: {
~textEllipsisForDropDownOptions: bool=?,
) => React.element
}

type direction = BottomLeft | BottomMiddle | BottomRight | TopLeft | TopMiddle | TopRight
module BaseDropdown: {
@react.component
let make: (
~buttonText: Js.String2.t,
~buttonText: string,
~buttonSize: Button.buttonSize=?,
~allowMultiSelect: bool,
~input: ReactFinalForm.fieldRenderPropsInput,
Expand All @@ -155,12 +244,12 @@ module BaseDropdown: {
~defaultLeftIcon: Button.iconType=?,
~autoApply: bool=?,
~fullLength: bool=?,
~customButtonStyle: Js.String2.t=?,
~customButtonStyle: string=?,
~onAssignClick: string => unit=?,
~fixedDropDownDirection: direction=?,
~addButton: bool=?,
~marginTop: string=?,
~customStyle: Js.String2.t=?,
~customStyle: string=?,
~customSearchStyle: string=?,
~showSelectionAsChips: bool=?,
~showToolTip: bool=?,
Expand All @@ -174,16 +263,16 @@ module BaseDropdown: {
~addDynamicValue: bool=?,
~showMatchingRecordsText: bool=?,
~hasApplyButton: bool=?,
~dropdownCustomWidth: Js.String2.t=?,
~dropdownCustomWidth: string=?,
~allowButtonTextMinWidth: bool=?,
~customMarginStyle: string=?,
~customButtonLeftIcon: Button.iconType=?,
~customTextPaddingClass: string=?,
~customButtonPaddingClass: string=?,
~customButtonIconMargin: string=?,
~textStyleClass: Js.String2.t=?,
~textStyleClass: string=?,
~buttonStyleOnDropDownOpened: string=?,
~selectedString: Js.String2.t=?,
~selectedString: string=?,
~setSelectedString: ('a => Js_string.t) => unit=?,
~setExtSearchString: ('b => string) => unit=?,
~listFlexDirection: string=?,
Expand All @@ -193,7 +282,7 @@ module BaseDropdown: {
~showAllSelectedOptions: bool=?,
~buttonClickFn: string => unit=?,
~showSelectCountButton: bool=?,
~maxHeight: Js.String2.t=?,
~maxHeight: string=?,
~customBackColor: string=?,
~showToolTipOptions: bool=?,
~textEllipsisForDropDownOptions: bool=?,
Expand Down Expand Up @@ -231,7 +320,7 @@ module ChipFilterSelectBox: {
@react.component
let make: (
~input: ReactFinalForm.fieldRenderPropsInput,
~buttonText: Js.String2.t=?,
~buttonText: string=?,
~buttonSize: Button.buttonSize=?,
~allowMultiSelect: bool=?,
~isDropDown: bool=?,
Expand All @@ -246,13 +335,13 @@ let make: (
~buttonType: Button.buttonType=?,
~disableSelect: bool=?,
~fullLength: bool=?,
~customButtonStyle: Js.String2.t=?,
~customButtonStyle: string=?,
~textStyle: string=?,
~marginTop: string=?,
~customStyle: Js.String2.t=?,
~customStyle: string=?,
~showSelectionAsChips: bool=?,
~showToggle: bool=?,
~maxHeight: Js.String2.t=?,
~maxHeight: string=?,
~searchable: bool=?,
~fill: string=?,
~optionRigthElement: React.element=?,
Expand All @@ -273,7 +362,7 @@ let make: (
~customButton: React.element=?,
~descriptionOnHover: bool=?,
~fixedDropDownDirection: direction=?,
~dropdownCustomWidth: Js.String2.t=?,
~dropdownCustomWidth: string=?,
~allowButtonTextMinWidth: bool=?,
~baseComponent: React.element=?,
~baseComponentMethod: bool => React.element=?,
Expand All @@ -283,7 +372,7 @@ let make: (
~customTextPaddingClass: string=?,
~customButtonPaddingClass: string=?,
~customButtonIconMargin: string=?,
~textStyleClass: Js.String2.t=?,
~textStyleClass: string=?,
~setExtSearchString: ('a => string) => unit=?,
~buttonStyleOnDropDownOpened: string=?,
~listFlexDirection: string=?,
Expand Down
Loading

0 comments on commit f0d9283

Please sign in to comment.