Skip to content

Commit

Permalink
chore: merged latest main
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarnaikjuspay committed Dec 20, 2023
2 parents 02a6964 + 758f80d commit c9b047d
Show file tree
Hide file tree
Showing 29 changed files with 412 additions and 411 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [conven

- - -

## 1.12.0 (2023-12-19)

### Features

- Group-drop-down-component-changes ([#97](https://github.com/juspay/hyperswitch-control-center/pull/97)) ([`adcd89e`](https://github.com/juspay/hyperswitch-control-center/commit/adcd89e58542a7b0e0a7941e8dd4bb8abbd620eb))
- Add scrollbar and white space scrollable ([#111](https://github.com/juspay/hyperswitch-control-center/pull/111)) ([`a3bb4fe`](https://github.com/juspay/hyperswitch-control-center/commit/a3bb4feedb12fc6d3dcbc2cf845e90bb26fef7dd))
- Added path and api method in audit logs ([#112](https://github.com/juspay/hyperswitch-control-center/pull/112)) ([`1005cc7`](https://github.com/juspay/hyperswitch-control-center/commit/1005cc7099bf4ed6d6fdadd9f843c1937b733fe2))

### Bug Fixes

- Oss build url change ([#87](https://github.com/juspay/hyperswitch-control-center/pull/87)) ([`82f5272`](https://github.com/juspay/hyperswitch-control-center/commit/82f5272aff3453afbbc5fcf7b0e3aee4eed32cb2))

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

- - -


## 1.11.0 (2023-12-18)

### Features
Expand Down
5 changes: 2 additions & 3 deletions public/hyperswitch/wasm/euclid.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@ export function getRequestPayload(input: any, response: any): any;
*/
export function getResponsePayload(input: any): any;
/**
* @param {string} key
* @returns {any}
*/
export function getDescriptionCategory(key: string): any;
export function getDescriptionCategory(): any;
/**
*
* Function exposed as `wasm` function in js `parse`. Allowing use to extend the functionality and
Expand Down Expand Up @@ -138,7 +137,7 @@ export interface InitOutput {
readonly getPayoutConnectorConfig: (a: number, b: number, c: number) => void;
readonly getRequestPayload: (a: number, b: number, c: number) => void;
readonly getResponsePayload: (a: number, b: number) => void;
readonly getDescriptionCategory: (a: number, b: number, c: number) => void;
readonly getDescriptionCategory: (a: number) => void;
readonly parse: (a: number, b: number, c: number) => void;
readonly parseToString: (a: number, b: number, c: number) => void;
readonly __wbindgen_export_0: (a: number, b: number) => number;
Expand Down
7 changes: 2 additions & 5 deletions public/hyperswitch/wasm/euclid.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,15 +580,12 @@ export function getResponsePayload(input) {
}

/**
* @param {string} key
* @returns {any}
*/
export function getDescriptionCategory(key) {
export function getDescriptionCategory() {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len0 = WASM_VECTOR_LEN;
wasm.getDescriptionCategory(retptr, ptr0, len0);
wasm.getDescriptionCategory(retptr);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
Expand Down
Binary file modified public/hyperswitch/wasm/euclid_bg.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion public/hyperswitch/wasm/euclid_bg.wasm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function getConnectorConfig(a: number, b: number, c: number): void;
export function getPayoutConnectorConfig(a: number, b: number, c: number): void;
export function getRequestPayload(a: number, b: number, c: number): void;
export function getResponsePayload(a: number, b: number): void;
export function getDescriptionCategory(a: number, b: number, c: number): void;
export function getDescriptionCategory(a: number): void;
export function parse(a: number, b: number, c: number): void;
export function parseToString(a: number, b: number, c: number): void;
export function __wbindgen_export_0(a: number, b: number): number;
Expand Down
2 changes: 1 addition & 1 deletion public/hyperswitch/wasm/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "euclid_wasm_vas",
"name": "euclid_wasm",
"description": "WASM bindings for Euclid DSL",
"version": "0.1.0",
"files": [
Expand Down
34 changes: 14 additions & 20 deletions src/components/HSwitchFeedBackModal.res
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,38 @@ let make = (
~modalType: HSwitchFeedBackModalUtils.modalType=FeedBackModal,
) => {
open HSwitchFeedBackModalUtils
open APIUtils
let hyperswitchMixPanel = HSMixPanel.useSendEvent()
let url = RescriptReactRouter.useUrl()
let fetchApi = APIUtils.useUpdateMethod()
let showToast = ToastState.useShowToast()
let updateDetails = useUpdateMethod()

let onSubmit = (values, _) => {
let body = values->HSwitchUtils.getBodyForFeedBack(~modalType, ())

let onSubmit = async (values, _) => {
let mixPanelAction = switch modalType {
| FeedBackModal => "givefeedback"
| RequestConnectorModal => "request_connector"
}

["global", url.path->LogicUtils.getListHead]->Js.Array2.forEach(ele =>
hyperswitchMixPanel(~pageName=ele, ~contextName=feedbackVia, ~actionName=mixPanelAction, ())
)

open Promise

fetchApi(
APIUtils.getURL(~entityName=FEEDBACK, ~methodType=Post, ()),
body->Js.Json.object_,
Fetch.Post,
)
->thenResolve(_ => {
try {
let url = getURL(~entityName=USERS, ~userType=#USER_DATA, ~methodType=Post, ())
let body =
[
("Feedback", values->HSwitchUtils.getBodyForFeedBack(~modalType, ())->Js.Json.object_),
]->LogicUtils.getJsonFromArrayOfJson
let _res = await updateDetails(url, body, Post)
let successMessage = switch modalType {
| FeedBackModal => "Thanks for feedback"
| RequestConnectorModal => "Request submitted succesfully"
}
showToast(~toastType=ToastSuccess, ~message=successMessage, ~autoClose=false, ())
})
->catch(_ => {
resolve()
})
->ignore

} catch {
| _ => ()
}
setShowModal(_ => false)
Js.Nullable.null->resolve
Js.Nullable.null
}

let showLabel = switch modalType {
Expand Down
2 changes: 0 additions & 2 deletions src/entryPoints/hyperswitch/FeatureFlagUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ type featureFlag = {
mixPanel: bool,
verifyConnector: bool,
forgetPassword: bool,
ossBuild: bool,
}

let featureFlagType = (featureFlags: Js.Json.t) => {
Expand Down Expand Up @@ -48,7 +47,6 @@ let featureFlagType = (featureFlags: Js.Json.t) => {
mixPanel: dict->getBool("mixpanel", false),
verifyConnector: dict->getBool("verify_connector", false),
forgetPassword: dict->getBool("forgot_password", false),
ossBuild: dict->getBool("oss_build", false),
}
typedFeatureFlag
}
Loading

0 comments on commit c9b047d

Please sign in to comment.