Skip to content

Commit

Permalink
Merge branch 'main' into HCC-929-removed-metadata-from-3-ds-bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Riddhiagrawal001 authored Dec 6, 2023
2 parents 85dcc3d + f7e0f08 commit 367a6c3
Show file tree
Hide file tree
Showing 35 changed files with 336 additions and 191 deletions.
37 changes: 32 additions & 5 deletions .githooks/commit-msg
Original file line number Diff line number Diff line change
@@ -1,20 +1,47 @@
#!/bin/sh

echo "~~~~**** Commit hook started ****~~~~"
echo "*****~~~~~ Commit hook initiated ~~~~~~*****"

commit_msg_file=$1
commit_msg=$(cat "$commit_msg_file")


# For formatting your code
npx prettier --write .
echo
echo "*****~~~~~ Formatting - Check for unformatted files ~~~~~~*****"

# Check for unformatted JavaScript, TypeScript, and JSON files using Prettier
unformatted_js_files=$(git ls-files | grep '\.js\|\.jsx\|\.ts\|\.tsx\|\.json' | xargs npx prettier --list-different)

# If there are unformatted JavaScript, TypeScript, or JSON files, print an error message and exit with a non-zero status code
if [ -n "$unformatted_js_files" ]; then
echo "Error: Unformatted JavaScript, YML or JSON files found. Please run 'npx prettier --write .' for formatting whole repository or 'npx prettier --write' on the following files:"
echo "$unformatted_js_files"
exit 1
fi

# Check for unformatted ReScript files
npm run re:format

echo
echo "*****~~~~~ All files are formatted. ~~~~~~*****"
echo

# JS Code Check
echo "*****~~~~~ Checking ReScript Code ~~~~~~*****"
if (! npm run re:build)
then
echo "*****~~~~~ ReScript Code Compilation Failed! ~~~~~*****"
exit 1
fi

echo
echo "*****~~~~~ Commit message validation! ~~~~~*****"
echo
# Define your commit message convention (e.g., starts with "feat:", "fix:", etc.)
commit_regex="^(Merge branch|(feat|fix|chore|refactor|docs|test|style|enhancement):).+"


if git log -1 --show-signature &> /dev/null; then
if git log --show-signature -n 1 | grep -q 'gpg:'; then
if ! echo "$commit_msg" | grep -Ei "$commit_regex" ; then
echo "Aborting commit. Your commit message does not follow the conventional format."
echo "The commit message should begin with one of the following keywords followed by a colon: 'feat', 'fix', 'chore', 'refactor', 'docs', 'test' or 'style'. For example, it should be formatted like this: 'feat: <subject> - <description>'"
Expand All @@ -28,5 +55,5 @@ else
fi

# If the commit message matches the convention, the script exits successfully.
echo "~~~~**** Commit hook completed ****~~~~"
echo "*****~~~~~ Commit hook completed ~~~~~~*****"
exit 0
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ env-config.js
yarn.lock
#package-lock.json
user_data.sh
*.pem
.bsb.lock
*.pem
16 changes: 11 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,24 @@ All notable changes to this project will be documented in this file. See [conven

- - -

## 1.0.4 (2023-12-04)
## 1.1.0 (2023-12-05)

### Features

- Business profile UI changes ([#51](https://github.com/juspay/hyperswitch-control-center/pull/51)) ([`7d2a443`](https://github.com/juspay/hyperswitch-control-center/commit/7d2a4430980539977a8e8ddfd9d959547549258a))

### Bug Fixes

- Dead code removal ([#52](https://github.com/juspay/hyperswitch-control-center/pull/52)) ([`eebee65`](https://github.com/juspay/hyperswitch-control-center/commit/eebee659a8326aa32ebcbe2d06c21e8487bea377))
- Remove CHANGELOG.md ([#53](https://github.com/juspay/hyperswitch-control-center/pull/53)) ([`6978bf6`](https://github.com/juspay/hyperswitch-control-center/commit/6978bf6814fb856c67a0fe409638982239c1af80))
- Warning icon added ([#59](https://github.com/juspay/hyperswitch-control-center/pull/59)) ([`4fbaee4`](https://github.com/juspay/hyperswitch-control-center/commit/4fbaee4bf0b1b65b08513bd9208e49f154911ae0))
- Optional test live mode removal & typo fix ([#63](https://github.com/juspay/hyperswitch-control-center/pull/63)) ([`9466057`](https://github.com/juspay/hyperswitch-control-center/commit/94660575566729f1b6a8013e9d09e1a4bc8cff20))

### Miscellaneous Tasks

- Remove dead code ([#50](https://github.com/juspay/hyperswitch-control-center/pull/50)) ([`0133ff1`](https://github.com/juspay/hyperswitch-control-center/commit/0133ff13a7e915c4c796bd98fbaf92400690531a))
- Signed commit added. ([#62](https://github.com/juspay/hyperswitch-control-center/pull/62)) ([`4f69afe`](https://github.com/juspay/hyperswitch-control-center/commit/4f69afe1946bd431fb6e8a31ee621358ff28ad12))
- Cleanup Configs ([#48](https://github.com/juspay/hyperswitch-control-center/pull/48)) ([`5bfae97`](https://github.com/juspay/hyperswitch-control-center/commit/5bfae972ac4cd2f367d26317c203b2c9d425535d))
- Dead code removal ([#55](https://github.com/juspay/hyperswitch-control-center/pull/55)) ([`b220415`](https://github.com/juspay/hyperswitch-control-center/commit/b220415bc390a5129e82e1b59dc6115a35cb6f84))

**Full Changelog:** [`v1.0.3...v1.0.4`](https://github.com/juspay/hyperswitch-control-center/compare/v1.0.3...v1.0.4)
**Full Changelog:** [`v1.0.5...v1.1.0`](https://github.com/juspay/hyperswitch-control-center/compare/v1.0.5...v1.1.0)

- - -

Expand Down
6 changes: 3 additions & 3 deletions src/components/DynamicTable.res
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ let make = (
~mandatoryRemoteKeys=[],
~isSearchKeyArray=false,
~forcePreventConcatData=false,
~collapseTabelRow=false,
~collapseTableRow=false,
~showRefreshFilter=true,
~showRemoteOptions=false,
~filterButtonStyle="",
Expand Down Expand Up @@ -548,7 +548,7 @@ let make = (
?bottomActions
?defaultSort
tableLocalFilter
collapseTabelRow
collapseTableRow
getRowDetails
?onMouseEnter
?onMouseLeave
Expand Down Expand Up @@ -590,7 +590,7 @@ let make = (
?renderCard
?defaultSort
tableLocalFilter
collapseTabelRow
collapseTableRow
?frozenUpto
?heightHeadingClass
getRowDetails
Expand Down
2 changes: 1 addition & 1 deletion src/components/DynamicTable.resi
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ let make: (
~mandatoryRemoteKeys: array<string>=?,
~isSearchKeyArray: bool=?,
~forcePreventConcatData: bool=?,
~collapseTabelRow: bool=?,
~collapseTableRow: bool=?,
~showRefreshFilter: bool=?,
~showRemoteOptions: bool=?,
~filterButtonStyle: string=?,
Expand Down
4 changes: 2 additions & 2 deletions src/components/LoadedTable.res
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ let make = (
~tableheadingClass="",
~tableBorderClass="",
~tableDataBorderClass="",
~collapseTabelRow=false,
~collapseTableRow=false,
~getRowDetails=?,
~onMouseEnter=?,
~onMouseLeave=?,
Expand Down Expand Up @@ -798,7 +798,7 @@ let make = (
tableBorderClass
tableDataBorderClass
enableEqualWidthCol
collapseTabelRow
collapseTableRow
?getRowDetails
?onExpandClickData
actualData
Expand Down
2 changes: 1 addition & 1 deletion src/components/LoadedTable.resi
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ let make: (
~tableheadingClass: string=?,
~tableBorderClass: string=?,
~tableDataBorderClass: string=?,
~collapseTabelRow: bool=?,
~collapseTableRow: bool=?,
~getRowDetails: Js.Nullable.t<'t> => React.element=?,
~onMouseEnter: 't => unit=?,
~onMouseLeave: 't => unit=?,
Expand Down
4 changes: 2 additions & 2 deletions src/components/LoadedTableWithCustomColumns.res
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ let make = (
~tableheadingClass="",
~tableBorderClass="",
~tableDataBorderClass="",
~collapseTabelRow=false,
~collapseTableRow=false,
~getRowDetails=_ => React.null,
~onMouseEnter=?,
~onMouseLeave=?,
Expand Down Expand Up @@ -132,7 +132,7 @@ let make = (
?renderCard
?defaultSort
tableLocalFilter
collapseTabelRow
collapseTableRow
?frozenUpto
?heightHeadingClass
getRowDetails
Expand Down
16 changes: 8 additions & 8 deletions src/components/ReactWindowTable.res
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module NewCell = {
~removeVerticalLines,
~highlightEnabledFieldsArray,
~tableDataBorderClass="",
~collapseTabelRow=false,
~collapseTableRow=false,
~expandedRow: _ => React.element,
~onMouseEnter,
~onMouseLeave,
Expand Down Expand Up @@ -171,9 +171,9 @@ module NewCell = {
className={`${cellWidth} ${overflowStyle} h-auto align-top ${borderClass} ${highlightCell
? "hover:font-bold"
: ""} ${tableDataBorderClass}
${collapseTabelRow ? cursorI : ""}`}
${collapseTableRow ? cursorI : ""}`}
onClick={_ => {
if collapseTabelRow && cellIndex == 0 {
if collapseTableRow && cellIndex == 0 {
handleExpand(rowIndex, true)
if !isCurrentRowExpanded {
setExpandedIndexArr(prev => {
Expand All @@ -187,7 +187,7 @@ module NewCell = {
}
}}>
<div className={`${cellWidth} h-full box-border pl-4 ${paddingClass}`}>
{if collapseTabelRow {
{if collapseTableRow {
<div className="flex flex-row gap-4 items-center">
{if cellIndex === 0 {
<Icon name={isCurrentRowExpanded ? "caret-down" : "caret-right"} size=14 />
Expand Down Expand Up @@ -228,7 +228,7 @@ module ReactWindowTableComponent = {
~tableheadingClass="",
~tableBorderClass="",
~tableDataBorderClass="",
~collapseTabelRow=false,
~collapseTableRow=false,
~getRowDetails=?,
~getIndex=?,
~rowItemHeight=100,
Expand Down Expand Up @@ -480,7 +480,7 @@ module ReactWindowTableComponent = {
removeVerticalLines
highlightEnabledFieldsArray
tableDataBorderClass
collapseTabelRow
collapseTableRow
expandedRow={_ => getRowDetails(rowIndex)}
onMouseEnter
onMouseLeave
Expand Down Expand Up @@ -654,7 +654,7 @@ let make = (
~tableheadingClass="",
~tableBorderClass="",
~tableDataBorderClass="",
~collapseTabelRow=false,
~collapseTableRow=false,
~getRowDetails=?,
~getIndex=?,
~rowItemHeight=100,
Expand Down Expand Up @@ -1156,7 +1156,7 @@ let make = (
tableheadingClass
tableBorderClass
tableDataBorderClass
collapseTabelRow
collapseTableRow
?getRowDetails
?getIndex
rowItemHeight
Expand Down
12 changes: 6 additions & 6 deletions src/components/Table.res
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module TableRow = {
~evenVertivalLines,
~highlightEnabledFieldsArray,
~tableDataBorderClass="",
~collapseTabelRow=false,
~collapseTableRow=false,
~expandedRow: _ => React.element,
~onMouseEnter,
~onMouseLeave,
Expand Down Expand Up @@ -178,7 +178,7 @@ module TableRow = {
} else {
`${borderTop} border-r ${borderColor}`
}
let cursorI = cellIndex == 0 && collapseTabelRow ? "cursor-pointer" : ""
let cursorI = cellIndex == 0 && collapseTableRow ? "cursor-pointer" : ""
let isLast = cellIndex === colsLen - 1
let lastColProp =
isLast && fixLastCol ? "border-l h-full !py-0 flex flex-col justify-center" : ""
Expand All @@ -203,13 +203,13 @@ module TableRow = {
className={`${tableRowBorderClass} ${customColorCell}`}
style={ReactDOMStyle.make(~width=fixedWidthClass, ())}
onClick={_ => {
if collapseTabelRow && cellIndex == 0 {
if collapseTableRow && cellIndex == 0 {
setIsCurrentRowExpanded(prev => !prev)
setExpandedData(_ => expandedRow())
}
}}>
<div className=tableRowPaddingClass>
{if collapseTabelRow {
{if collapseTableRow {
<div className="flex flex-row gap-4 items-center">
{if cellIndex === 0 {
<Icon name={isCurrentRowExpanded ? "caret-down" : "caret-right"} size=14 />
Expand Down Expand Up @@ -622,7 +622,7 @@ let make = (
~tableheadingClass="",
~tableBorderClass="",
~tableDataBorderClass="",
~collapseTabelRow=false,
~collapseTableRow=false,
~getRowDetails=?,
~actualData=?,
~onExpandClickData as _=?,
Expand Down Expand Up @@ -725,7 +725,7 @@ let make = (
evenVertivalLines
highlightEnabledFieldsArray
tableDataBorderClass
collapseTabelRow
collapseTableRow
expandedRow={_ => getRowDetails(offset + rowIndex)}
onMouseEnter
onMouseLeave
Expand Down
4 changes: 2 additions & 2 deletions src/components/Table.resi
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ module TableRow: {
~evenVertivalLines: bool,
~highlightEnabledFieldsArray: Js.Array2.t<int>,
~tableDataBorderClass: string=?,
~collapseTabelRow: bool=?,
~collapseTableRow: bool=?,
~expandedRow: unit => React.element,
~onMouseEnter: option<int => unit>,
~onMouseLeave: option<int => unit>,
Expand Down Expand Up @@ -263,7 +263,7 @@ let make: (
~tableheadingClass: string=?,
~tableBorderClass: string=?,
~tableDataBorderClass: string=?,
~collapseTabelRow: bool=?,
~collapseTableRow: bool=?,
~getRowDetails: Js.Nullable.t<'b> => React.element=?,
~actualData: Js.Array2.t<Js.Nullable.t<'b>>=?,
~onExpandClickData: 'onExpandClickData=?,
Expand Down
4 changes: 2 additions & 2 deletions src/entryPoints/hyperswitch/FeatureFlagUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type featureFlag = {
quickStart: bool,
openSDK: bool,
switchMerchant: bool,
testLiveMode: option<bool>,
testLiveMode: bool,
auditTrail: bool,
systemMetrics: bool,
sampleData: bool,
Expand Down Expand Up @@ -34,7 +34,7 @@ let featureFlagType = (featureFlags: Js.Json.t) => {
quickStart: dict->getBool("quick_start", false),
openSDK: dict->getBool("open_sdk", false),
switchMerchant: dict->getBool("switch_merchant", false),
testLiveMode: dict->getOptionBool("test_live_mode"),
testLiveMode: dict->getBool("test_live_mode", false),
auditTrail: dict->getBool("audit_trail", false),
systemMetrics: dict->getBool("system_metrics", false),
sampleData: dict->getBool("sample_data", false),
Expand Down
Loading

0 comments on commit 367a6c3

Please sign in to comment.