@burdenoff/microfe-kadaikodi 2026.719.4 → 2026.723.1
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.
- package/dist/kadaikodi/components/InvestmentMarketplaceGate.d.ts +13 -0
- package/dist/kadaikodi/components/InvestmentMarketplaceGate.d.ts.map +1 -0
- package/dist/kadaikodi/components/InvestmentMarketplaceGate.js +23 -0
- package/dist/kadaikodi/components/InvestmentMarketplaceGate.js.map +1 -0
- package/dist/kadaikodi/components/index.d.ts +1 -0
- package/dist/kadaikodi/components/index.d.ts.map +1 -1
- package/dist/kadaikodi/constants/featureFlags.d.ts +23 -0
- package/dist/kadaikodi/constants/featureFlags.d.ts.map +1 -0
- package/dist/kadaikodi/constants/featureFlags.js +6 -0
- package/dist/kadaikodi/constants/featureFlags.js.map +1 -0
- package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.d.ts.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js +135 -126
- package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.d.ts.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +171 -166
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.d.ts.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +220 -217
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
/** Fail-closed read of the investment-marketplace flag (default-deny). */
|
|
4
|
+
export declare function useInvestmentMarketplaceEnabled(): boolean;
|
|
5
|
+
interface InvestmentMarketplaceComingSoonProps {
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Shorter copy for tight spaces (inline panels / modals). */
|
|
8
|
+
compact?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** Calm, expected "not yet open" notice — replaces the raw backend error. */
|
|
11
|
+
export declare const InvestmentMarketplaceComingSoon: FC<InvestmentMarketplaceComingSoonProps>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=InvestmentMarketplaceGate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvestmentMarketplaceGate.d.ts","sourceRoot":"","sources":["../../../src/kadaikodi/components/InvestmentMarketplaceGate.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,0EAA0E;AAC1E,wBAAgB,+BAA+B,IAAI,OAAO,CAEzD;AAED,UAAU,oCAAoC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,6EAA6E;AAC7E,eAAO,MAAM,+BAA+B,EAAE,EAAE,CAAC,oCAAoC,CAoBpF,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { KADAIKODI_INVESTMENT_MARKETPLACE_FLAG as t } from "../constants/featureFlags.js";
|
|
3
|
+
import { Lock as n } from "lucide-react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { useFeatureFlag as a } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
6
|
+
//#region src/kadaikodi/components/InvestmentMarketplaceGate.tsx
|
|
7
|
+
function o() {
|
|
8
|
+
return a(t, !1);
|
|
9
|
+
}
|
|
10
|
+
var s = ({ className: t, compact: a = !1 }) => /* @__PURE__ */ i("div", {
|
|
11
|
+
className: e("flex items-start gap-2.5 rounded-lg border border-border-subtle bg-bg-sunken/50 p-3 text-sm text-text-secondary", t),
|
|
12
|
+
children: [/* @__PURE__ */ r(n, { className: "h-4 w-4 shrink-0 translate-y-0.5" }), /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("p", {
|
|
13
|
+
className: "font-medium text-text-primary",
|
|
14
|
+
children: "Investing is coming soon"
|
|
15
|
+
}), /* @__PURE__ */ r("p", {
|
|
16
|
+
className: "mt-0.5 text-xs text-text-secondary",
|
|
17
|
+
children: a ? "This workspace hasn't opened investing yet." : "The investment marketplace isn't open in this workspace yet. Existing holdings and browsing stay available — we'll let you know the moment new investing opens."
|
|
18
|
+
})] })]
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { s as InvestmentMarketplaceComingSoon, o as useInvestmentMarketplaceEnabled };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=InvestmentMarketplaceGate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvestmentMarketplaceGate.js","names":[],"sources":["../../../src/kadaikodi/components/InvestmentMarketplaceGate.tsx"],"sourcesContent":["/**\n * Investment Marketplace Gate\n * @module kadaikodi/components\n *\n * The `kadaikodi.investment-marketplace` platform flag is fail-closed on the\n * backend pending SEBI/securities counsel sign-off (see\n * `kadaikodi-specs/business/contracts/12-investment-ai-terms/OPEN_QUESTIONS_AND_RISKS.md`,\n * row INV-1). `kadaikodiInvest` / `kadaikodiCreateInvestmentOpportunity` are\n * hard-blocked server-side, so there is no security exposure if the frontend\n * shows the control — but without a matching client-side gate, a user who\n * clicks \"Invest\" hits a raw `FEATURE_DISABLED` GraphQL error instead of a\n * clean, expected state.\n *\n * `useInvestmentMarketplaceEnabled` mirrors the backend's fail-closed default\n * (`defaultValue={false}`): an unseeded flag row or a flag-fetch error hides\n * the investing UI rather than exposing a control the backend will reject.\n */\n\nimport type { FC } from 'react';\nimport { Lock } from 'lucide-react';\nimport { useFeatureFlag } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { KADAIKODI_INVESTMENT_MARKETPLACE_FLAG } from '../constants/featureFlags';\nimport { cn } from '../utils/cn';\n\n/** Fail-closed read of the investment-marketplace flag (default-deny). */\nexport function useInvestmentMarketplaceEnabled(): boolean {\n return useFeatureFlag(KADAIKODI_INVESTMENT_MARKETPLACE_FLAG, false);\n}\n\ninterface InvestmentMarketplaceComingSoonProps {\n className?: string;\n /** Shorter copy for tight spaces (inline panels / modals). */\n compact?: boolean;\n}\n\n/** Calm, expected \"not yet open\" notice — replaces the raw backend error. */\nexport const InvestmentMarketplaceComingSoon: FC<InvestmentMarketplaceComingSoonProps> = ({\n className,\n compact = false,\n}) => (\n <div\n className={cn(\n 'flex items-start gap-2.5 rounded-lg border border-border-subtle bg-bg-sunken/50 p-3 text-sm text-text-secondary',\n className\n )}\n >\n <Lock className=\"h-4 w-4 shrink-0 translate-y-0.5\" />\n <div>\n <p className=\"font-medium text-text-primary\">Investing is coming soon</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">\n {compact\n ? \"This workspace hasn't opened investing yet.\"\n : \"The investment marketplace isn't open in this workspace yet. Existing holdings and browsing stay available — we'll let you know the moment new investing opens.\"}\n </p>\n </div>\n </div>\n);\n"],"mappings":";;;;;;AAyBA,SAAgB,IAA2C;AACzD,QAAO,EAAe,GAAuC,GAAM;;AAUrE,IAAa,KAA6E,EACxF,cACA,aAAU,SAEV,kBAAC,OAAD;CACE,WAAW,EACT,mHACA,EACD;WAJH,CAME,kBAAC,GAAD,EAAM,WAAU,oCAAqC,CAAA,EACrD,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;EAAG,WAAU;YAAgC;EAA4B,CAAA,EACzE,kBAAC,KAAD;EAAG,WAAU;YACV,IACG,gDACA;EACF,CAAA,CACA,EAAA,CAAA,CACF"}
|
|
@@ -10,4 +10,5 @@ export { InvestmentCard } from './InvestmentCard';
|
|
|
10
10
|
export { StatusBadge } from './StatusBadge';
|
|
11
11
|
export { RatingDisplay } from './RatingDisplay';
|
|
12
12
|
export { EmptyState } from './EmptyState';
|
|
13
|
+
export { InvestmentMarketplaceComingSoon, useInvestmentMarketplaceEnabled, } from './InvestmentMarketplaceGate';
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/kadaikodi/components/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/kadaikodi/components/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature flag keys
|
|
3
|
+
* @module kadaikodi/constants
|
|
4
|
+
*
|
|
5
|
+
* Keys MUST match the backend's platform feature-flag keys exactly
|
|
6
|
+
* (wspace-kadaikodi-svc `src/lib/featureFlags.ts`) — the flag is resolved by
|
|
7
|
+
* key string, not by any shared type.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Investment-marketplace gate. Fail-closed on the backend: an unseeded flag
|
|
11
|
+
* row, an explicit `false`, or a flag-service error all resolve to disabled
|
|
12
|
+
* (`requireInvestmentMarketplaceEnabled` in wspace-kadaikodi-svc). This is a
|
|
13
|
+
* live regulatory exposure — see
|
|
14
|
+
* `kadaikodi-specs/business/contracts/12-investment-ai-terms/OPEN_QUESTIONS_AND_RISKS.md`,
|
|
15
|
+
* row INV-1 — not a normal feature rollout.
|
|
16
|
+
*
|
|
17
|
+
* The frontend mirrors that fail-closed posture: every read of this flag
|
|
18
|
+
* MUST pass `defaultValue={false}` (or `useFeatureFlag(flag, false)`) so an
|
|
19
|
+
* unseeded/unreachable flag hides the investing UI instead of exposing a
|
|
20
|
+
* control the backend will reject with `FEATURE_DISABLED`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const KADAIKODI_INVESTMENT_MARKETPLACE_FLAG = "kadaikodi.investment-marketplace";
|
|
23
|
+
//# sourceMappingURL=featureFlags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"featureFlags.d.ts","sourceRoot":"","sources":["../../../src/kadaikodi/constants/featureFlags.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qCAAqC,qCAAqC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"featureFlags.js","names":[],"sources":["../../../src/kadaikodi/constants/featureFlags.ts"],"sourcesContent":["/**\n * Feature flag keys\n * @module kadaikodi/constants\n *\n * Keys MUST match the backend's platform feature-flag keys exactly\n * (wspace-kadaikodi-svc `src/lib/featureFlags.ts`) — the flag is resolved by\n * key string, not by any shared type.\n */\n\n/**\n * Investment-marketplace gate. Fail-closed on the backend: an unseeded flag\n * row, an explicit `false`, or a flag-service error all resolve to disabled\n * (`requireInvestmentMarketplaceEnabled` in wspace-kadaikodi-svc). This is a\n * live regulatory exposure — see\n * `kadaikodi-specs/business/contracts/12-investment-ai-terms/OPEN_QUESTIONS_AND_RISKS.md`,\n * row INV-1 — not a normal feature rollout.\n *\n * The frontend mirrors that fail-closed posture: every read of this flag\n * MUST pass `defaultValue={false}` (or `useFeatureFlag(flag, false)`) so an\n * unseeded/unreachable flag hides the investing UI instead of exposing a\n * control the backend will reject with `FEATURE_DISABLED`.\n */\nexport const KADAIKODI_INVESTMENT_MARKETPLACE_FLAG = 'kadaikodi.investment-marketplace';\n"],"mappings":";AAsBA,IAAa,IAAwC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvestmentListingPage.d.ts","sourceRoot":"","sources":["../../../../src/kadaikodi/pages/cart-owner/InvestmentListingPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InvestmentListingPage.d.ts","sourceRoot":"","sources":["../../../../src/kadaikodi/pages/cart-owner/InvestmentListingPage.tsx"],"names":[],"mappings":"AAmBA,wBAAgB,qBAAqB,gCA4VpC"}
|
|
@@ -5,17 +5,18 @@ import { useCreateInvestmentOpportunity as r, useProviders as i } from "../../ho
|
|
|
5
5
|
import { formatCurrency as a } from "../../utils/formatters.js";
|
|
6
6
|
import { ProgressRing as o } from "../../components/viz/ProgressRing.js";
|
|
7
7
|
import "../../components/viz/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { useInvestmentMarketplaceEnabled as s } from "../../components/InvestmentMarketplaceGate.js";
|
|
9
|
+
import { useMemo as c, useState as l } from "react";
|
|
10
|
+
import { CalendarClock as u, CheckCircle2 as d, IndianRupee as f, TrendingUp as p } from "lucide-react";
|
|
11
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
11
12
|
//#region src/kadaikodi/pages/cart-owner/InvestmentListingPage.tsx
|
|
12
|
-
var
|
|
13
|
+
var g = [
|
|
13
14
|
"LOW",
|
|
14
15
|
"MEDIUM",
|
|
15
16
|
"HIGH"
|
|
16
17
|
];
|
|
17
|
-
function
|
|
18
|
-
let { navigateTo:
|
|
18
|
+
function _() {
|
|
19
|
+
let { navigateTo: _, currentUser: v } = e(), { data: y = [], isLoading: b } = i(), x = c(() => y.find((e) => e.ownerId === v?.id) ?? y[0], [y, v?.id]), S = r(), C = s(), [w, T] = l({
|
|
19
20
|
title: "",
|
|
20
21
|
description: "",
|
|
21
22
|
targetAmount: "",
|
|
@@ -23,177 +24,177 @@ function g() {
|
|
|
23
24
|
expectedReturnsPct: "",
|
|
24
25
|
lockInMonths: "",
|
|
25
26
|
riskLevel: "MEDIUM"
|
|
26
|
-
}), [
|
|
27
|
+
}), [E, D] = l(""), [O, k] = l(null), A = (e, t) => T((n) => ({
|
|
27
28
|
...n,
|
|
28
29
|
[e]: t
|
|
29
|
-
})),
|
|
30
|
-
return
|
|
30
|
+
})), j = "w-full rounded-lg border border-border-subtle bg-bg-canvas px-3 py-2 text-sm text-text-primary outline-none focus:border-border-strong";
|
|
31
|
+
return b ? /* @__PURE__ */ m(t, {
|
|
31
32
|
title: "List for Investment",
|
|
32
33
|
description: "Raise growth capital from the marketplace",
|
|
33
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ h("div", {
|
|
34
35
|
className: "animate-pulse space-y-4",
|
|
35
36
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ m("div", { className: "h-10 rounded-lg bg-bg-sunken" }),
|
|
38
|
+
/* @__PURE__ */ m("div", { className: "h-10 rounded-lg bg-bg-sunken" }),
|
|
39
|
+
/* @__PURE__ */ m("div", { className: "h-10 rounded-lg bg-bg-sunken" })
|
|
39
40
|
]
|
|
40
41
|
})
|
|
41
|
-
}) :
|
|
42
|
+
}) : x ? C ? /* @__PURE__ */ m(t, {
|
|
42
43
|
title: "List for Investment",
|
|
43
|
-
description: `Raise growth capital for ${
|
|
44
|
-
children: /* @__PURE__ */
|
|
44
|
+
description: `Raise growth capital for ${x.name}`,
|
|
45
|
+
children: /* @__PURE__ */ h("div", {
|
|
45
46
|
className: "mx-auto max-w-5xl space-y-6",
|
|
46
|
-
children: [
|
|
47
|
+
children: [O && /* @__PURE__ */ h("div", {
|
|
47
48
|
className: "flex items-center gap-2 rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-4",
|
|
48
49
|
children: [
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ m(d, { className: "h-5 w-5 text-status-success-text" }),
|
|
51
|
+
/* @__PURE__ */ h("div", {
|
|
51
52
|
className: "flex-1",
|
|
52
|
-
children: [/* @__PURE__ */
|
|
53
|
+
children: [/* @__PURE__ */ m("p", {
|
|
53
54
|
className: "text-sm font-medium text-text-primary",
|
|
54
55
|
children: "Opportunity published"
|
|
55
|
-
}), /* @__PURE__ */
|
|
56
|
+
}), /* @__PURE__ */ h("p", {
|
|
56
57
|
className: "text-xs text-text-secondary",
|
|
57
58
|
children: [
|
|
58
59
|
"“",
|
|
59
|
-
|
|
60
|
+
O.title,
|
|
60
61
|
"” is now live in the Investor section for backers to fund."
|
|
61
62
|
]
|
|
62
63
|
})]
|
|
63
64
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ m("button", {
|
|
65
66
|
type: "button",
|
|
66
|
-
onClick: () =>
|
|
67
|
+
onClick: () => _("/investor/opportunities"),
|
|
67
68
|
className: "rounded-lg border border-border-default bg-bg-surface px-3 py-1.5 text-xs font-medium text-text-secondary hover:bg-bg-sunken",
|
|
68
69
|
children: "View in Investor"
|
|
69
70
|
})
|
|
70
71
|
]
|
|
71
|
-
}), /* @__PURE__ */
|
|
72
|
+
}), /* @__PURE__ */ h("div", {
|
|
72
73
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-[1fr_20rem]",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ h("div", {
|
|
74
75
|
className: "rounded-2xl border border-border-subtle bg-bg-surface p-6",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ h("div", {
|
|
76
77
|
className: "mb-4 flex items-center gap-2",
|
|
77
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ m(f, { className: "h-5 w-5 text-accent-primary" }), /* @__PURE__ */ m("h3", {
|
|
78
79
|
className: "text-base font-semibold text-text-primary",
|
|
79
80
|
children: "Opportunity details"
|
|
80
81
|
})]
|
|
81
|
-
}), /* @__PURE__ */
|
|
82
|
+
}), /* @__PURE__ */ h("div", {
|
|
82
83
|
className: "space-y-4",
|
|
83
84
|
children: [
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
85
86
|
className: "mb-1 block text-sm font-medium text-text-secondary",
|
|
86
87
|
children: "Title"
|
|
87
|
-
}), /* @__PURE__ */
|
|
88
|
-
className:
|
|
89
|
-
value:
|
|
90
|
-
onChange: (e) =>
|
|
88
|
+
}), /* @__PURE__ */ m("input", {
|
|
89
|
+
className: j,
|
|
90
|
+
value: w.title,
|
|
91
|
+
onChange: (e) => A("title", e.target.value),
|
|
91
92
|
placeholder: "Expand to 3 locations"
|
|
92
93
|
})] }),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
94
95
|
className: "mb-1 block text-sm font-medium text-text-secondary",
|
|
95
96
|
children: "Description"
|
|
96
|
-
}), /* @__PURE__ */
|
|
97
|
-
className:
|
|
97
|
+
}), /* @__PURE__ */ m("textarea", {
|
|
98
|
+
className: j,
|
|
98
99
|
rows: 3,
|
|
99
|
-
value:
|
|
100
|
-
onChange: (e) =>
|
|
100
|
+
value: w.description,
|
|
101
|
+
onChange: (e) => A("description", e.target.value),
|
|
101
102
|
placeholder: "How the capital will be used and why backers should fund it."
|
|
102
103
|
})] }),
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ h("div", {
|
|
104
105
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
105
106
|
children: [
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
107
108
|
className: "mb-1 block text-sm font-medium text-text-secondary",
|
|
108
109
|
children: "Target amount (₹)"
|
|
109
|
-
}), /* @__PURE__ */
|
|
110
|
+
}), /* @__PURE__ */ m("input", {
|
|
110
111
|
type: "number",
|
|
111
112
|
min: "0",
|
|
112
|
-
className:
|
|
113
|
-
value:
|
|
114
|
-
onChange: (e) =>
|
|
113
|
+
className: j,
|
|
114
|
+
value: w.targetAmount,
|
|
115
|
+
onChange: (e) => A("targetAmount", e.target.value),
|
|
115
116
|
placeholder: "500000"
|
|
116
117
|
})] }),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
118
119
|
className: "mb-1 block text-sm font-medium text-text-secondary",
|
|
119
120
|
children: "Minimum investment (₹)"
|
|
120
|
-
}), /* @__PURE__ */
|
|
121
|
+
}), /* @__PURE__ */ m("input", {
|
|
121
122
|
type: "number",
|
|
122
123
|
min: "0",
|
|
123
|
-
className:
|
|
124
|
-
value:
|
|
125
|
-
onChange: (e) =>
|
|
124
|
+
className: j,
|
|
125
|
+
value: w.minimumInvestment,
|
|
126
|
+
onChange: (e) => A("minimumInvestment", e.target.value),
|
|
126
127
|
placeholder: "5000"
|
|
127
128
|
})] }),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
129
130
|
className: "mb-1 block text-sm font-medium text-text-secondary",
|
|
130
131
|
children: "Expected returns (% p.a.)"
|
|
131
|
-
}), /* @__PURE__ */
|
|
132
|
+
}), /* @__PURE__ */ m("input", {
|
|
132
133
|
type: "number",
|
|
133
134
|
min: "0",
|
|
134
|
-
className:
|
|
135
|
-
value:
|
|
136
|
-
onChange: (e) =>
|
|
135
|
+
className: j,
|
|
136
|
+
value: w.expectedReturnsPct,
|
|
137
|
+
onChange: (e) => A("expectedReturnsPct", e.target.value),
|
|
137
138
|
placeholder: "18"
|
|
138
139
|
})] }),
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
140
141
|
className: "mb-1 block text-sm font-medium text-text-secondary",
|
|
141
142
|
children: "Lock-in (months)"
|
|
142
|
-
}), /* @__PURE__ */
|
|
143
|
+
}), /* @__PURE__ */ m("input", {
|
|
143
144
|
type: "number",
|
|
144
145
|
min: "0",
|
|
145
|
-
className:
|
|
146
|
-
value:
|
|
147
|
-
onChange: (e) =>
|
|
146
|
+
className: j,
|
|
147
|
+
value: w.lockInMonths,
|
|
148
|
+
onChange: (e) => A("lockInMonths", e.target.value),
|
|
148
149
|
placeholder: "12"
|
|
149
150
|
})] })
|
|
150
151
|
]
|
|
151
152
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
153
154
|
className: "mb-1 block text-sm font-medium text-text-secondary",
|
|
154
155
|
children: "Risk level"
|
|
155
|
-
}), /* @__PURE__ */
|
|
156
|
+
}), /* @__PURE__ */ m("div", {
|
|
156
157
|
className: "flex gap-2",
|
|
157
|
-
children:
|
|
158
|
+
children: g.map((e) => /* @__PURE__ */ m("button", {
|
|
158
159
|
type: "button",
|
|
159
|
-
onClick: () =>
|
|
160
|
-
className: "rounded-lg border px-4 py-2 text-sm font-medium transition " + (
|
|
160
|
+
onClick: () => A("riskLevel", e),
|
|
161
|
+
className: "rounded-lg border px-4 py-2 text-sm font-medium transition " + (w.riskLevel === e ? "border-accent-primary bg-accent-primary/10 text-accent-primary" : "border-border-subtle bg-bg-canvas text-text-secondary hover:bg-bg-sunken"),
|
|
161
162
|
children: e.charAt(0) + e.slice(1).toLowerCase()
|
|
162
163
|
}, e))
|
|
163
164
|
})] }),
|
|
164
|
-
|
|
165
|
+
E && /* @__PURE__ */ m("p", {
|
|
165
166
|
className: "text-sm text-status-error-text",
|
|
166
|
-
children:
|
|
167
|
+
children: E
|
|
167
168
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ h("div", {
|
|
169
170
|
className: "flex items-center justify-end gap-3 pt-2",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ m("button", {
|
|
171
172
|
type: "button",
|
|
172
|
-
onClick: () =>
|
|
173
|
+
onClick: () => _("/cart-owner/dashboard"),
|
|
173
174
|
className: "rounded-lg border border-border-default bg-bg-surface px-5 py-2.5 text-sm font-medium text-text-secondary hover:bg-bg-sunken",
|
|
174
175
|
children: "Cancel"
|
|
175
|
-
}), /* @__PURE__ */
|
|
176
|
+
}), /* @__PURE__ */ h("button", {
|
|
176
177
|
type: "button",
|
|
177
178
|
onClick: () => {
|
|
178
|
-
if (
|
|
179
|
-
let e = Number(
|
|
180
|
-
if (!
|
|
181
|
-
if (!(e > 0)) return
|
|
182
|
-
if (!(t > 0) || t > e) return
|
|
183
|
-
if (!(n >= 0)) return
|
|
184
|
-
if (!(r > 0)) return
|
|
185
|
-
|
|
186
|
-
providerId:
|
|
187
|
-
title:
|
|
188
|
-
description:
|
|
179
|
+
if (D(""), !x) return;
|
|
180
|
+
let e = Number(w.targetAmount), t = Number(w.minimumInvestment), n = Number(w.expectedReturnsPct), r = Number(w.lockInMonths);
|
|
181
|
+
if (!w.title.trim()) return D("Give your opportunity a title.");
|
|
182
|
+
if (!(e > 0)) return D("Enter a valid target amount.");
|
|
183
|
+
if (!(t > 0) || t > e) return D("Minimum investment must be positive and ≤ target.");
|
|
184
|
+
if (!(n >= 0)) return D("Enter a valid expected return %.");
|
|
185
|
+
if (!(r > 0)) return D("Enter a lock-in period in months.");
|
|
186
|
+
S.mutate({
|
|
187
|
+
providerId: x.id,
|
|
188
|
+
title: w.title.trim(),
|
|
189
|
+
description: w.description.trim() || void 0,
|
|
189
190
|
targetAmount: e,
|
|
190
191
|
minimumInvestment: t,
|
|
191
192
|
expectedReturnsPct: n,
|
|
192
193
|
lockInMonths: r,
|
|
193
|
-
riskLevel:
|
|
194
|
+
riskLevel: w.riskLevel
|
|
194
195
|
}, {
|
|
195
196
|
onSuccess: (e) => {
|
|
196
|
-
|
|
197
|
+
k({ title: e.title }), T((e) => ({
|
|
197
198
|
...e,
|
|
198
199
|
title: "",
|
|
199
200
|
description: "",
|
|
@@ -203,123 +204,131 @@ function g() {
|
|
|
203
204
|
lockInMonths: ""
|
|
204
205
|
}));
|
|
205
206
|
},
|
|
206
|
-
onError: (e) =>
|
|
207
|
+
onError: (e) => D(e instanceof Error ? e.message : "Could not publish the opportunity.")
|
|
207
208
|
});
|
|
208
209
|
},
|
|
209
|
-
disabled:
|
|
210
|
+
disabled: S.isPending,
|
|
210
211
|
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-5 py-2.5 text-sm font-semibold text-action-primary-text transition hover:bg-action-primary-bg-hover disabled:opacity-60",
|
|
211
|
-
children: [/* @__PURE__ */ p
|
|
212
|
+
children: [/* @__PURE__ */ m(p, { className: "h-4 w-4" }), S.isPending ? "Publishing…" : "Publish opportunity"]
|
|
212
213
|
})]
|
|
213
214
|
})
|
|
214
215
|
]
|
|
215
216
|
})]
|
|
216
|
-
}), /* @__PURE__ */
|
|
217
|
+
}), /* @__PURE__ */ h("aside", {
|
|
217
218
|
className: "h-fit rounded-2xl border border-border-subtle bg-bg-surface p-6 lg:sticky lg:top-6",
|
|
218
219
|
children: [
|
|
219
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ m("h3", {
|
|
220
221
|
className: "text-sm font-semibold text-text-primary",
|
|
221
|
-
children:
|
|
222
|
+
children: w.title.trim() || "Your opportunity"
|
|
222
223
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ m("p", {
|
|
224
225
|
className: "mt-1 line-clamp-2 text-xs text-text-secondary",
|
|
225
|
-
children:
|
|
226
|
+
children: w.description.trim() || `Raise growth capital for ${x.name}.`
|
|
226
227
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ h("div", {
|
|
228
229
|
className: "mt-5 flex flex-col items-center",
|
|
229
|
-
children: [/* @__PURE__ */
|
|
230
|
+
children: [/* @__PURE__ */ m(o, {
|
|
230
231
|
value: 0,
|
|
231
|
-
max: Math.max(Number(
|
|
232
|
+
max: Math.max(Number(w.targetAmount) || 0, 1),
|
|
232
233
|
label: "0%",
|
|
233
234
|
caption: "funded",
|
|
234
235
|
size: 120
|
|
235
|
-
}), /* @__PURE__ */
|
|
236
|
+
}), /* @__PURE__ */ h("p", {
|
|
236
237
|
className: "mt-3 text-center text-sm text-text-secondary",
|
|
237
238
|
children: [
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ m("span", {
|
|
239
240
|
className: "font-semibold text-text-primary",
|
|
240
241
|
children: "₹0"
|
|
241
242
|
}),
|
|
242
243
|
" of",
|
|
243
244
|
" ",
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ m("span", {
|
|
245
246
|
className: "font-semibold text-text-primary",
|
|
246
|
-
children: Number(
|
|
247
|
+
children: Number(w.targetAmount) > 0 ? a(Number(w.targetAmount), { minimumFractionDigits: 0 }) : "—"
|
|
247
248
|
}),
|
|
248
249
|
" ",
|
|
249
250
|
"raised"
|
|
250
251
|
]
|
|
251
252
|
})]
|
|
252
253
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ h("div", {
|
|
254
255
|
className: "mt-5 grid grid-cols-2 gap-3",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ h("div", {
|
|
256
257
|
className: "rounded-lg border border-border-subtle bg-bg-canvas p-3",
|
|
257
258
|
children: [
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ h("div", {
|
|
259
260
|
className: "flex items-center gap-1.5 text-xs text-text-secondary",
|
|
260
|
-
children: [/* @__PURE__ */ p
|
|
261
|
+
children: [/* @__PURE__ */ m(p, { className: "h-3.5 w-3.5" }), "Returns"]
|
|
261
262
|
}),
|
|
262
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ m("p", {
|
|
263
264
|
className: "mt-1 text-lg font-semibold text-text-primary",
|
|
264
|
-
children:
|
|
265
|
+
children: w.expectedReturnsPct ? `${Number(w.expectedReturnsPct)}%` : "—"
|
|
265
266
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ m("p", {
|
|
267
268
|
className: "text-[11px] text-text-muted",
|
|
268
269
|
children: "expected p.a."
|
|
269
270
|
})
|
|
270
271
|
]
|
|
271
|
-
}), /* @__PURE__ */
|
|
272
|
+
}), /* @__PURE__ */ h("div", {
|
|
272
273
|
className: "rounded-lg border border-border-subtle bg-bg-canvas p-3",
|
|
273
274
|
children: [
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ h("div", {
|
|
275
276
|
className: "flex items-center gap-1.5 text-xs text-text-secondary",
|
|
276
|
-
children: [/* @__PURE__ */
|
|
277
|
+
children: [/* @__PURE__ */ m(u, { className: "h-3.5 w-3.5" }), "Lock-in"]
|
|
277
278
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ m("p", {
|
|
279
280
|
className: "mt-1 text-lg font-semibold text-text-primary",
|
|
280
|
-
children:
|
|
281
|
+
children: w.lockInMonths ? Number(w.lockInMonths) : "—"
|
|
281
282
|
}),
|
|
282
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ m("p", {
|
|
283
284
|
className: "text-[11px] text-text-muted",
|
|
284
285
|
children: "months"
|
|
285
286
|
})
|
|
286
287
|
]
|
|
287
288
|
})]
|
|
288
289
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ h("div", {
|
|
290
291
|
className: "mt-3 flex items-center justify-between rounded-lg border border-border-subtle bg-bg-canvas p-3",
|
|
291
|
-
children: [/* @__PURE__ */
|
|
292
|
+
children: [/* @__PURE__ */ m("span", {
|
|
292
293
|
className: "text-xs text-text-secondary",
|
|
293
294
|
children: "Min. investment"
|
|
294
|
-
}), /* @__PURE__ */
|
|
295
|
+
}), /* @__PURE__ */ m("span", {
|
|
295
296
|
className: "text-sm font-semibold text-text-primary",
|
|
296
|
-
children: Number(
|
|
297
|
+
children: Number(w.minimumInvestment) > 0 ? a(Number(w.minimumInvestment), { minimumFractionDigits: 0 }) : "—"
|
|
297
298
|
})]
|
|
298
299
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ h("div", {
|
|
300
301
|
className: "mt-3 flex items-center justify-between rounded-lg border border-border-subtle bg-bg-canvas p-3",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ m("span", {
|
|
302
303
|
className: "text-xs text-text-secondary",
|
|
303
304
|
children: "Risk level"
|
|
304
|
-
}), /* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ m("span", {
|
|
305
306
|
className: "text-sm font-semibold text-text-primary",
|
|
306
|
-
children:
|
|
307
|
+
children: w.riskLevel.charAt(0) + w.riskLevel.slice(1).toLowerCase()
|
|
307
308
|
})]
|
|
308
309
|
})
|
|
309
310
|
]
|
|
310
311
|
})]
|
|
311
312
|
})]
|
|
312
313
|
})
|
|
313
|
-
}) : /* @__PURE__ */
|
|
314
|
+
}) : /* @__PURE__ */ m(t, {
|
|
315
|
+
title: "List for Investment",
|
|
316
|
+
description: "Raise growth capital from the marketplace",
|
|
317
|
+
children: /* @__PURE__ */ m(n, {
|
|
318
|
+
icon: /* @__PURE__ */ m(p, { className: "h-8 w-8" }),
|
|
319
|
+
title: "Investment marketplace coming soon",
|
|
320
|
+
description: "We're finishing the regulatory groundwork for the investment marketplace. You'll be able to list your cart for funding as soon as it opens in this workspace."
|
|
321
|
+
})
|
|
322
|
+
}) : /* @__PURE__ */ m(t, {
|
|
314
323
|
title: "List for Investment",
|
|
315
324
|
description: "Raise growth capital from the marketplace",
|
|
316
|
-
children: /* @__PURE__ */
|
|
317
|
-
icon: /* @__PURE__ */ p
|
|
325
|
+
children: /* @__PURE__ */ m(n, {
|
|
326
|
+
icon: /* @__PURE__ */ m(p, { className: "h-8 w-8" }),
|
|
318
327
|
title: "Set up your cart first",
|
|
319
328
|
description: "Create and configure your service provider before listing it for investment.",
|
|
320
|
-
action: /* @__PURE__ */
|
|
329
|
+
action: /* @__PURE__ */ m("button", {
|
|
321
330
|
type: "button",
|
|
322
|
-
onClick: () =>
|
|
331
|
+
onClick: () => _("/cart-owner/dashboard"),
|
|
323
332
|
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-5 py-2.5 text-sm font-semibold text-action-primary-text hover:bg-action-primary-bg-hover",
|
|
324
333
|
children: "Go to Dashboard"
|
|
325
334
|
})
|
|
@@ -327,6 +336,6 @@ function g() {
|
|
|
327
336
|
});
|
|
328
337
|
}
|
|
329
338
|
//#endregion
|
|
330
|
-
export {
|
|
339
|
+
export { _ as InvestmentListingPage };
|
|
331
340
|
|
|
332
341
|
//# sourceMappingURL=InvestmentListingPage.js.map
|