tek-wallet 0.0.720 → 0.0.722

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ interface WealthDepositProps {
7
7
  amount?: string;
8
8
  content?: (keyboardId: string) => React.ReactNode;
9
9
  footer?: (drawerRef: DrawerComponentRef | null) => React.ReactNode;
10
+ onClose?: () => void;
10
11
  }
11
12
  export default function WealthDeposit(props: WealthDepositProps): import("react/jsx-runtime").JSX.Element;
12
13
  export type { WealthDepositProps };
@@ -49,12 +49,14 @@ function WealthDeposit(props) {
49
49
  var _a, _b;
50
50
  var drawerRef = (0, react_1.useRef)(null);
51
51
  var handleOnClose = function () {
52
- var _a;
52
+ var _a, _b;
53
53
  (_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
54
+ (_b = props.onClose) === null || _b === void 0 ? void 0 : _b.call(props);
54
55
  };
55
56
  var close = function () {
56
- var _a;
57
+ var _a, _b;
57
58
  (_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
59
+ (_b = props.onClose) === null || _b === void 0 ? void 0 : _b.call(props);
58
60
  };
59
61
  var keyboardId = (0, useUniqueId_1.useUniqueId)("wealth-deposit-keyboard");
60
62
  var keyboardRef = (0, react_1.useRef)(null);
@@ -1,7 +1,13 @@
1
+ import { DrawerComponentRef } from "../../DrawerComponent";
2
+ import { WealthsUserInfoDto } from "../types";
1
3
  interface WealthWithdrawProps {
2
4
  children: React.ReactNode;
3
- onOpen?: () => void;
4
- onContinue: (amount: string) => void;
5
+ userInfo?: WealthsUserInfoDto;
6
+ setAmount?: (amount: string) => void;
7
+ amount?: string;
8
+ content?: (keyboardId: string) => React.ReactNode;
9
+ footer?: (drawerRef: DrawerComponentRef | null) => React.ReactNode;
10
+ onClose?: () => void;
5
11
  }
6
12
  export default function WealthWithdraw(props: WealthWithdrawProps): import("react/jsx-runtime").JSX.Element;
7
- export type { WealthWithdrawProps };
13
+ export {};
@@ -1,4 +1,37 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
37
  };
@@ -6,17 +39,32 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
39
  exports.default = WealthWithdraw;
7
40
  var jsx_runtime_1 = require("react/jsx-runtime");
8
41
  var react_1 = require("react");
9
- var DrawerComponent_1 = __importDefault(require("../../DrawerComponent"));
42
+ var DrawerComponent_1 = __importStar(require("../../DrawerComponent"));
10
43
  var ModalLayout_1 = __importDefault(require("../../ModalLayout"));
44
+ var deposit_1 = __importDefault(require("./deposit"));
45
+ var xhub_keyboard_1 = require("xhub-keyboard");
46
+ var PageHeader_1 = __importDefault(require("../../PageHeader"));
47
+ var useUniqueId_1 = require("../../../../hooks/useUniqueId");
11
48
  function WealthWithdraw(props) {
49
+ var _a, _b;
12
50
  var drawerRef = (0, react_1.useRef)(null);
13
51
  var handleOnClose = function () {
14
- var _a;
52
+ var _a, _b;
15
53
  (_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
54
+ (_b = props.onClose) === null || _b === void 0 ? void 0 : _b.call(props);
16
55
  };
17
56
  var close = function () {
18
- var _a;
57
+ var _a, _b;
19
58
  (_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
59
+ (_b = props.onClose) === null || _b === void 0 ? void 0 : _b.call(props);
20
60
  };
21
- return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: props.onOpen, onClose: handleOnClose, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { onClose: close, fullScreen: true, title: "Deposit" }) }));
61
+ var keyboardId = (0, useUniqueId_1.useUniqueId)("wealth-withdraw-keyboard");
62
+ var keyboardRef = (0, react_1.useRef)(null);
63
+ return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onClose: handleOnClose, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { ref: keyboardRef, id: keyboardId, value: props.amount, onChange: function (value) {
64
+ var _a;
65
+ (_a = props === null || props === void 0 ? void 0 : props.setAmount) === null || _a === void 0 ? void 0 : _a.call(props, value);
66
+ }, keyboardType: xhub_keyboard_1.KeyboardType.Double, layoutType: xhub_keyboard_1.LayoutType.Integer, viewFullHeight: true, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { onClose: close, fullScreen: true, backgroundColor: "#fff", overrideHeader: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Withdraw", overrideBack: handleOnClose, sx: {
67
+ height: "fit-content",
68
+ color: "text.tertiary",
69
+ } }), children: (0, jsx_runtime_1.jsx)(deposit_1.default, { keyboardId: keyboardId, depositContent: (_a = props.content) === null || _a === void 0 ? void 0 : _a.call(props, keyboardId), footer: (_b = props.footer) === null || _b === void 0 ? void 0 : _b.call(props, drawerRef.current) }) }) }) }));
22
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.720",
3
+ "version": "0.0.722",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",