@raystack/frontier 0.96.2 → 0.98.0
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/admin/dist/index.js +560 -610
- package/admin/dist/index.mjs +468 -519
- package/hooks/dist/index.d.ts +14 -0
- package/hooks/dist/index.js +36 -2
- package/hooks/dist/index.mjs +36 -3
- package/package.json +3 -3
- package/react/dist/index.d.ts +38 -2
- package/react/dist/index.js +7644 -937
- package/react/dist/index.mjs +7925 -926
package/admin/dist/index.mjs
CHANGED
|
@@ -186,7 +186,7 @@ function isZeroUUID(uuid) {
|
|
|
186
186
|
function capitalizeFirstLetter(str) {
|
|
187
187
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function convertBillingAddressToString(address) {
|
|
190
190
|
if (!address)
|
|
191
191
|
return "";
|
|
192
192
|
const { line1, line2, city, state, country, postalCode } = address;
|
|
@@ -196,8 +196,8 @@ function converBillingAddressToString(address) {
|
|
|
196
196
|
// admin/views/roles/columns.tsx
|
|
197
197
|
import { Flex } from "@raystack/apsara";
|
|
198
198
|
|
|
199
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
200
|
-
var digest = "
|
|
199
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-UIBrZHYYC4ki/sdk/admin/views/roles/roles.module.css.js
|
|
200
|
+
var digest = "5f6309220432ff61a9f197a2d87753df2ed931c4509ee2fffe112aece84340b7";
|
|
201
201
|
var css = `._tableRoot_4yb15_1 {
|
|
202
202
|
width: 100%;
|
|
203
203
|
}
|
|
@@ -282,8 +282,8 @@ import { DataTable } from "@raystack/apsara";
|
|
|
282
282
|
// admin/components/PageHeader.tsx
|
|
283
283
|
import { Flex as Flex2, Text } from "@raystack/apsara";
|
|
284
284
|
|
|
285
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
286
|
-
var digest2 = "
|
|
285
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-O6pSmPH8RpOw/sdk/admin/components/page-header.module.css.js
|
|
286
|
+
var digest2 = "e2b9d335b950f260b3882865bbaf0739632bfd15112e4b37f9efa4f75de59daf";
|
|
287
287
|
var css2 = `._breadcrumb_1kaun_1 {
|
|
288
288
|
list-style: none;
|
|
289
289
|
padding: 0;
|
|
@@ -389,8 +389,8 @@ function PageHeader({
|
|
|
389
389
|
);
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
393
|
-
var digest3 = "
|
|
392
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-7GK5T8Vg4YLk/sdk/admin/views/roles/roles.module.css.js
|
|
393
|
+
var digest3 = "b9735d1c2e38d0cecb3fa93842edd929b2746651c23b282fb2b3a58b14890a55";
|
|
394
394
|
var css3 = `._tableRoot_4yb15_1 {
|
|
395
395
|
width: 100%;
|
|
396
396
|
}
|
|
@@ -876,8 +876,8 @@ function PageTitle({ title, appName }) {
|
|
|
876
876
|
return null;
|
|
877
877
|
}
|
|
878
878
|
|
|
879
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
880
|
-
var digest4 = "
|
|
879
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-LqLcX69NwgEi/sdk/admin/views/roles/roles.module.css.js
|
|
880
|
+
var digest4 = "604893bfd1b872f67ffd61b7251391df243819696c6d39a6f3ae04e734301f04";
|
|
881
881
|
var css4 = `._tableRoot_4yb15_1 {
|
|
882
882
|
width: 100%;
|
|
883
883
|
}
|
|
@@ -1059,8 +1059,8 @@ import { useState as useState3 } from "react";
|
|
|
1059
1059
|
// admin/views/invoices/navbar.tsx
|
|
1060
1060
|
import { DataTable as DataTable3, Flex as Flex6, IconButton, Text as Text4 } from "@raystack/apsara";
|
|
1061
1061
|
|
|
1062
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1063
|
-
var digest5 = "
|
|
1062
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-uUladFxzhfu9/sdk/admin/views/invoices/invoices.module.css.js
|
|
1063
|
+
var digest5 = "57b377e0a9fc855c61d6a1f74860dc68f3f1d872ecfd20903df0d80d91093ceb";
|
|
1064
1064
|
var css5 = `._navbar_9c4wr_1 {
|
|
1065
1065
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
1066
1066
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -1178,8 +1178,8 @@ var InvoicesNavabar = ({ searchQuery }) => {
|
|
|
1178
1178
|
] });
|
|
1179
1179
|
};
|
|
1180
1180
|
|
|
1181
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1182
|
-
var digest6 = "
|
|
1181
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-oPvIcMqIMPxZ/sdk/admin/views/invoices/invoices.module.css.js
|
|
1182
|
+
var digest6 = "451f1e880052de78aea6ba89e48551f47a95bcf149d4e48e220219a20658a4b0";
|
|
1183
1183
|
var css6 = `._navbar_9c4wr_1 {
|
|
1184
1184
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
1185
1185
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -1725,8 +1725,8 @@ var getColumns3 = (onNavigateToPrices) => {
|
|
|
1725
1725
|
// admin/views/products/header.tsx
|
|
1726
1726
|
import { DataTable as DataTable5 } from "@raystack/apsara";
|
|
1727
1727
|
|
|
1728
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1729
|
-
var digest7 = "
|
|
1728
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-mpxs45bCmt9z/sdk/admin/views/products/products.module.css.js
|
|
1729
|
+
var digest7 = "4e6f8afb74093eb25b9ff4c6e4109b5c4e754e569dc03f54c2c469f74d69a0e4";
|
|
1730
1730
|
var css7 = `._tableRoot_1lzjd_1 {
|
|
1731
1731
|
width: 100%;
|
|
1732
1732
|
}
|
|
@@ -1797,8 +1797,8 @@ var ProductsHeader = ({
|
|
|
1797
1797
|
);
|
|
1798
1798
|
};
|
|
1799
1799
|
|
|
1800
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1801
|
-
var digest8 = "
|
|
1800
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-4v014onp6hBM/sdk/admin/views/products/products.module.css.js
|
|
1801
|
+
var digest8 = "e5042259836899a253bfe984110ffa4ec6c6c0f739a1817af32970269c95c890";
|
|
1802
1802
|
var css8 = `._tableRoot_1lzjd_1 {
|
|
1803
1803
|
width: 100%;
|
|
1804
1804
|
}
|
|
@@ -1850,8 +1850,8 @@ var products_module_css_default2 = { "tableRoot": "_tableRoot_1lzjd_1", "tableWr
|
|
|
1850
1850
|
// admin/views/products/details.tsx
|
|
1851
1851
|
import { Flex as Flex9, Text as Text6, Grid as Grid2, Sheet as Sheet2 } from "@raystack/apsara";
|
|
1852
1852
|
|
|
1853
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1854
|
-
var digest9 = "
|
|
1853
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-JCOSgBjAKC5X/sdk/admin/views/products/products.module.css.js
|
|
1854
|
+
var digest9 = "f166bcca686592bbc2a6864e384d2b1d8d7a8541edaba2477d270ddaa94183a7";
|
|
1855
1855
|
var css9 = `._tableRoot_1lzjd_1 {
|
|
1856
1856
|
width: 100%;
|
|
1857
1857
|
}
|
|
@@ -2201,8 +2201,8 @@ function CpuChipIcon(props) {
|
|
|
2201
2201
|
);
|
|
2202
2202
|
}
|
|
2203
2203
|
|
|
2204
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2205
|
-
var digest10 = "
|
|
2204
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-KKfIVsUYNp9C/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2205
|
+
var digest10 = "76b872c2cae4a3c4e6878b352673caaaacdcbd81beec599b6fb91439052a5018";
|
|
2206
2206
|
var css10 = `._navbar_sfza7_1 {
|
|
2207
2207
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
2208
2208
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -2420,8 +2420,8 @@ var Navbar = ({ searchQuery, onExportCsv }) => {
|
|
|
2420
2420
|
};
|
|
2421
2421
|
var navbar_default = Navbar;
|
|
2422
2422
|
|
|
2423
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2424
|
-
var digest11 = "
|
|
2423
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-B9CKarIvrRVy/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2424
|
+
var digest11 = "c0a83d5fb37b195071a7cdf7af3fa1a4929871913e99f2cb880810b833d9ccae";
|
|
2425
2425
|
var css11 = `._navbar_sfza7_1 {
|
|
2426
2426
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
2427
2427
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -2531,8 +2531,8 @@ var audit_logs_module_css_default2 = { "navbar": "_navbar_sfza7_1", "table": "_t
|
|
|
2531
2531
|
import { Badge, Flex as Flex14, Text as Text9 } from "@raystack/apsara";
|
|
2532
2532
|
import dayjs3 from "dayjs";
|
|
2533
2533
|
|
|
2534
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2535
|
-
var digest12 = "
|
|
2534
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-KTEUp6xmxSnd/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2535
|
+
var digest12 = "dabe8d23597bc55af922e5c3832ee6968baf3eb414f0b67f28fcf70677de58a7";
|
|
2536
2536
|
var css12 = `._navbar_sfza7_1 {
|
|
2537
2537
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
2538
2538
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -2797,8 +2797,8 @@ import {
|
|
|
2797
2797
|
import { Flex as Flex16, IconButton as IconButton4, SidePanel } from "@raystack/apsara";
|
|
2798
2798
|
import { List as List3 } from "@raystack/apsara";
|
|
2799
2799
|
|
|
2800
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2801
|
-
var digest13 = "
|
|
2800
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-xqf5AcETc5uP/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2801
|
+
var digest13 = "12ccff61bcb6424e7fe476ab21cc228bb6e9756a8c7ed26f30c4179c896f3f3e";
|
|
2802
2802
|
var css13 = `._navbar_sfza7_1 {
|
|
2803
2803
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
2804
2804
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -2935,8 +2935,8 @@ function MapIcon(props) {
|
|
|
2935
2935
|
// admin/views/audit-logs/sidepanel-log-dialog.tsx
|
|
2936
2936
|
import { Dialog, IconButton as IconButton3, CodeBlock } from "@raystack/apsara";
|
|
2937
2937
|
|
|
2938
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2939
|
-
var digest14 = "
|
|
2938
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-LEgWq83q1gX6/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2939
|
+
var digest14 = "87cbbbb5a5b280733a295cade696e330bc1cc4ca59ed73fb0160e3977d4dcf94";
|
|
2940
2940
|
var css14 = `._navbar_sfza7_1 {
|
|
2941
2941
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
2942
2942
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -3139,8 +3139,8 @@ function SidePanelLogDialog(props) {
|
|
|
3139
3139
|
// admin/views/audit-logs/sidepanel-list-link.tsx
|
|
3140
3140
|
import { Button, List } from "@raystack/apsara";
|
|
3141
3141
|
|
|
3142
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
3143
|
-
var digest15 = "
|
|
3142
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-WluY7XM3CHlL/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
3143
|
+
var digest15 = "4bebea589b43187994dac81bedfc90c656ae6be715f49e4975262df7c7118a2b";
|
|
3144
3144
|
var css15 = `._navbar_sfza7_1 {
|
|
3145
3145
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
3146
3146
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -3281,8 +3281,8 @@ function SidepanelListItemLink({
|
|
|
3281
3281
|
// admin/views/audit-logs/sidepanel-list-id.tsx
|
|
3282
3282
|
import { CopyButton, Flex as Flex15, List as List2, Text as Text10, Tooltip } from "@raystack/apsara";
|
|
3283
3283
|
|
|
3284
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
3285
|
-
var digest16 = "
|
|
3284
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-sIDKeJcUqN22/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
3285
|
+
var digest16 = "0a249529a08ccddb6c4cc82738911cb8bccdf94c9fa7bedcbf8bad9b47d85a39";
|
|
3286
3286
|
var css16 = `._navbar_sfza7_1 {
|
|
3287
3287
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
3288
3288
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -3848,8 +3848,8 @@ var getColumns6 = ({ onNavigateToOrg, t } = {}) => {
|
|
|
3848
3848
|
];
|
|
3849
3849
|
};
|
|
3850
3850
|
|
|
3851
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
3852
|
-
var digest17 = "
|
|
3851
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-7hMRkB9GubJG/sdk/admin/views/admins/admins.module.css.js
|
|
3852
|
+
var digest17 = "4f7c08402468fbcd2c417e43fd8a5a4b2081bda590462421a0071e0934d45a36";
|
|
3853
3853
|
var css17 = `._tableRoot_yd6a0_1 {
|
|
3854
3854
|
width: 100%;
|
|
3855
3855
|
}
|
|
@@ -4006,8 +4006,8 @@ var getColumns7 = ({ onSelectPlan } = {}) => {
|
|
|
4006
4006
|
// admin/views/plans/header.tsx
|
|
4007
4007
|
import { DataTable as DataTable11 } from "@raystack/apsara";
|
|
4008
4008
|
|
|
4009
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4010
|
-
var digest18 = "
|
|
4009
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-YrNjnPbd6pUC/sdk/admin/views/plans/plans.module.css.js
|
|
4010
|
+
var digest18 = "5c1a271b565d0ddf4a7a43449aee8648c5ad0987e4e9ac621f0318ec86f8e211";
|
|
4011
4011
|
var css18 = `._tableRoot_1d6xr_1 {
|
|
4012
4012
|
width: 100%;
|
|
4013
4013
|
}
|
|
@@ -4060,8 +4060,8 @@ var PlanHeader = ({ header }) => {
|
|
|
4060
4060
|
);
|
|
4061
4061
|
};
|
|
4062
4062
|
|
|
4063
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4064
|
-
var digest19 = "
|
|
4063
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-k5v7dG2Z0gPO/sdk/admin/views/plans/plans.module.css.js
|
|
4064
|
+
var digest19 = "44ff656502b220a78ab96b66b36568bf847cb16dd174c475f9e59b0e83ba91aa";
|
|
4065
4065
|
var css19 = `._tableRoot_1d6xr_1 {
|
|
4066
4066
|
width: 100%;
|
|
4067
4067
|
}
|
|
@@ -4215,8 +4215,8 @@ import {
|
|
|
4215
4215
|
Text as Text15
|
|
4216
4216
|
} from "@raystack/apsara";
|
|
4217
4217
|
|
|
4218
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4219
|
-
var digest20 = "
|
|
4218
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-d7SXn1VS9X7l/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
|
|
4219
|
+
var digest20 = "96711b195db6ae9d4787ba2709e9757bf642232e294b97a7cd523b5c7d388bc3";
|
|
4220
4220
|
var css20 = `._tableRoot_h8n52_1 {
|
|
4221
4221
|
width: 100%;
|
|
4222
4222
|
}
|
|
@@ -4743,8 +4743,8 @@ var getColumns8 = ({ openEditPage, deleteWebhookMutation, enableDelete }) => {
|
|
|
4743
4743
|
// admin/views/webhooks/webhooks/header.tsx
|
|
4744
4744
|
import { Button as Button3, DataTable as DataTable13 } from "@raystack/apsara";
|
|
4745
4745
|
|
|
4746
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4747
|
-
var digest21 = "
|
|
4746
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-Yyz7RnJe9gwc/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
|
|
4747
|
+
var digest21 = "5becc12b8cbe66c944d528a2080b55c4075fa554c316b84085c31641b8db75a5";
|
|
4748
4748
|
var css21 = `._tableRoot_h8n52_1 {
|
|
4749
4749
|
width: 100%;
|
|
4750
4750
|
}
|
|
@@ -4826,8 +4826,8 @@ var WebhooksHeader = ({ header = pageHeader4, onOpenCreate }) => {
|
|
|
4826
4826
|
);
|
|
4827
4827
|
};
|
|
4828
4828
|
|
|
4829
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4830
|
-
var digest22 = "
|
|
4829
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-y1dvtfNY8eJW/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
|
|
4830
|
+
var digest22 = "eed1a07460edc346b4f7fa145242e06d77b5d937e29706eadd8429b6a5685c7e";
|
|
4831
4831
|
var css22 = `._tableRoot_h8n52_1 {
|
|
4832
4832
|
width: 100%;
|
|
4833
4833
|
}
|
|
@@ -10424,8 +10424,8 @@ import { EmptyState as EmptyState9, DataTable as DataTable15, Flex as Flex30 } f
|
|
|
10424
10424
|
// admin/views/preferences/columns.tsx
|
|
10425
10425
|
import { Text as Text17 } from "@raystack/apsara";
|
|
10426
10426
|
|
|
10427
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
10428
|
-
var digest23 = "
|
|
10427
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-rqOTxLDDg6ud/sdk/admin/views/preferences/preferences.module.css.js
|
|
10428
|
+
var digest23 = "b9066eca038658f3ff73b89dc55a88f8d19b69a88f31e4b7927f3a9e9f894f93";
|
|
10429
10429
|
var css23 = `._tableRoot_j5y5o_1 {
|
|
10430
10430
|
width: 100%;
|
|
10431
10431
|
}
|
|
@@ -10507,8 +10507,8 @@ var getColumns9 = ({
|
|
|
10507
10507
|
];
|
|
10508
10508
|
};
|
|
10509
10509
|
|
|
10510
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
10511
|
-
var digest24 = "
|
|
10510
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-QtC1Q9dXWjX2/sdk/admin/views/preferences/preferences.module.css.js
|
|
10511
|
+
var digest24 = "f6593f582e49f6970cb9034871a52677f38bb9663f0dc7b65738c423a646735a";
|
|
10512
10512
|
var css24 = `._tableRoot_j5y5o_1 {
|
|
10513
10513
|
width: 100%;
|
|
10514
10514
|
}
|
|
@@ -10870,8 +10870,8 @@ import {
|
|
|
10870
10870
|
Spinner as Spinner2
|
|
10871
10871
|
} from "@raystack/apsara";
|
|
10872
10872
|
|
|
10873
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
10874
|
-
var digest25 = "
|
|
10873
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-3I62H6lSL56I/sdk/admin/views/users/list/list.module.css.js
|
|
10874
|
+
var digest25 = "de9c3f81d77e00c2cb816913a8e0c36e442d77e7bd9f1670bc4e19d45c15c1cf";
|
|
10875
10875
|
var css25 = `._navbar_1s15g_1 {
|
|
10876
10876
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
10877
10877
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -10974,8 +10974,8 @@ import {
|
|
|
10974
10974
|
import { Controller as Controller2, useForm as useForm3 } from "react-hook-form";
|
|
10975
10975
|
import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
|
|
10976
10976
|
|
|
10977
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
10978
|
-
var digest26 = "
|
|
10977
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-72kEGTm3mO0n/sdk/admin/views/users/list/invite-users.module.css.js
|
|
10978
|
+
var digest26 = "aa428ded5a001e52dafc7c9e86e885647732c5ca79951eaec1cb34d0884b56e4";
|
|
10979
10979
|
var css26 = `._invite-users-dialog-body_11ujx_1 {
|
|
10980
10980
|
display: flex;
|
|
10981
10981
|
flex-direction: column;
|
|
@@ -11018,6 +11018,37 @@ import {
|
|
|
11018
11018
|
ListRolesRequestSchema
|
|
11019
11019
|
} from "@raystack/proton/frontier";
|
|
11020
11020
|
import { create as create5 } from "@bufbuild/protobuf";
|
|
11021
|
+
|
|
11022
|
+
// utils/error.ts
|
|
11023
|
+
import { Code, ConnectError } from "@connectrpc/connect";
|
|
11024
|
+
var DEFAULT_ERROR_MESSAGE = "Something went wrong";
|
|
11025
|
+
function handleConnectError(error, handlers) {
|
|
11026
|
+
const connectError = error instanceof ConnectError ? error : new ConnectError(
|
|
11027
|
+
typeof error === "string" ? error : error instanceof Error ? error.message : DEFAULT_ERROR_MESSAGE
|
|
11028
|
+
);
|
|
11029
|
+
const defaultHandler = handlers?.Default ?? ((err) => console.error(err.message));
|
|
11030
|
+
switch (connectError.code) {
|
|
11031
|
+
case Code.AlreadyExists:
|
|
11032
|
+
handlers?.AlreadyExists ? handlers.AlreadyExists(connectError) : defaultHandler(connectError);
|
|
11033
|
+
break;
|
|
11034
|
+
case Code.InvalidArgument:
|
|
11035
|
+
handlers?.InvalidArgument ? handlers.InvalidArgument(connectError) : defaultHandler(connectError);
|
|
11036
|
+
break;
|
|
11037
|
+
case Code.PermissionDenied:
|
|
11038
|
+
handlers?.PermissionDenied ? handlers.PermissionDenied(connectError) : defaultHandler(connectError);
|
|
11039
|
+
break;
|
|
11040
|
+
case Code.NotFound:
|
|
11041
|
+
handlers?.NotFound ? handlers.NotFound(connectError) : defaultHandler(connectError);
|
|
11042
|
+
break;
|
|
11043
|
+
case Code.FailedPrecondition:
|
|
11044
|
+
handlers?.FailedPrecondition ? handlers.FailedPrecondition(connectError) : defaultHandler(connectError);
|
|
11045
|
+
break;
|
|
11046
|
+
default:
|
|
11047
|
+
defaultHandler(connectError);
|
|
11048
|
+
}
|
|
11049
|
+
}
|
|
11050
|
+
|
|
11051
|
+
// admin/views/users/list/invite-users.tsx
|
|
11021
11052
|
import { Fragment as Fragment11, jsx as jsx56, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
11022
11053
|
var inviteSchema = objectType({
|
|
11023
11054
|
role: stringType(),
|
|
@@ -11077,9 +11108,6 @@ var InviteUser = () => {
|
|
|
11077
11108
|
const { mutateAsync: inviteUser } = useMutation5(
|
|
11078
11109
|
FrontierServiceQueries6.createOrganizationInvitation,
|
|
11079
11110
|
{
|
|
11080
|
-
onError: (error) => {
|
|
11081
|
-
console.error("Failed to invite user", error);
|
|
11082
|
-
},
|
|
11083
11111
|
onSuccess: (data) => {
|
|
11084
11112
|
const invitedCount = data?.invitations?.length ?? 0;
|
|
11085
11113
|
toast.success(
|
|
@@ -11093,11 +11121,20 @@ var InviteUser = () => {
|
|
|
11093
11121
|
const onSubmit = async (data) => {
|
|
11094
11122
|
if (!data.organizationId)
|
|
11095
11123
|
return;
|
|
11096
|
-
|
|
11097
|
-
|
|
11098
|
-
|
|
11099
|
-
|
|
11100
|
-
|
|
11124
|
+
try {
|
|
11125
|
+
await inviteUser({
|
|
11126
|
+
orgId: data.organizationId,
|
|
11127
|
+
userIds: data?.emails,
|
|
11128
|
+
roleIds: data?.role ? [data?.role] : []
|
|
11129
|
+
});
|
|
11130
|
+
} catch (error) {
|
|
11131
|
+
handleConnectError(error, {
|
|
11132
|
+
AlreadyExists: () => toast.error("Invitation already exists"),
|
|
11133
|
+
InvalidArgument: (err) => toast.error("Invalid input", { description: err.message }),
|
|
11134
|
+
PermissionDenied: () => toast.error("You don't have permission to perform this action"),
|
|
11135
|
+
Default: (err) => toast.error("Something went wrong", { description: err.message })
|
|
11136
|
+
});
|
|
11137
|
+
}
|
|
11101
11138
|
};
|
|
11102
11139
|
return /* @__PURE__ */ jsxs33(Dialog3, { open, onOpenChange, children: [
|
|
11103
11140
|
/* @__PURE__ */ jsx56(Dialog3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs33(
|
|
@@ -11313,8 +11350,8 @@ var Navbar2 = ({ searchQuery, onExportUsers }) => {
|
|
|
11313
11350
|
};
|
|
11314
11351
|
var navbar_default2 = Navbar2;
|
|
11315
11352
|
|
|
11316
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11317
|
-
var digest27 = "
|
|
11353
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-orPZ637WE3ZX/sdk/admin/views/users/list/list.module.css.js
|
|
11354
|
+
var digest27 = "ce4ca01e4e9ee3c2b122f08421eaddc0d7b63087338ca0acda1d57c5ff41f805";
|
|
11318
11355
|
var css27 = `._navbar_1s15g_1 {
|
|
11319
11356
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
11320
11357
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -11384,8 +11421,8 @@ import {
|
|
|
11384
11421
|
} from "@raystack/apsara";
|
|
11385
11422
|
import dayjs7 from "dayjs";
|
|
11386
11423
|
|
|
11387
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11388
|
-
var digest28 = "
|
|
11424
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-0zw7OJUfF8RX/sdk/admin/views/users/list/list.module.css.js
|
|
11425
|
+
var digest28 = "332b8a211fc241575a142704978bf8f2e0586922b8331885a4c8702bd3bd8744";
|
|
11389
11426
|
var css28 = `._navbar_1s15g_1 {
|
|
11390
11427
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
11391
11428
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -11677,8 +11714,8 @@ import { Avatar as Avatar4, getAvatarColor as getAvatarColor3, SidePanel as Side
|
|
|
11677
11714
|
// admin/views/users/details/layout/side-panel-details.tsx
|
|
11678
11715
|
import { Flex as Flex37, List as List4, Text as Text22, CopyButton as CopyButton2, Tooltip as Tooltip2 } from "@raystack/apsara";
|
|
11679
11716
|
|
|
11680
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11681
|
-
var digest29 = "
|
|
11717
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-9NVsRb8nj50A/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
11718
|
+
var digest29 = "c7327fbcc185c208fdf2fe4cf564d0184ef05f9e6a5d92a6da88dea584178a38";
|
|
11682
11719
|
var css29 = `._side-panel_1oc3f_1 {
|
|
11683
11720
|
transform: all 0.3s ease-in-out;
|
|
11684
11721
|
padding-bottom: 80px;
|
|
@@ -11785,8 +11822,8 @@ var SidePanelDetails2 = () => {
|
|
|
11785
11822
|
import { Flex as Flex40, List as List5, Text as Text26, Avatar as Avatar3 } from "@raystack/apsara";
|
|
11786
11823
|
import dayjs8 from "dayjs";
|
|
11787
11824
|
|
|
11788
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11789
|
-
var digest30 = "
|
|
11825
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-si4T0qFIVcBg/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
11826
|
+
var digest30 = "419521585a38d65c3a508ca3c534b01286cbec8d3c101c0f2aa060df9c7a51f4";
|
|
11790
11827
|
var css30 = `._side-panel_1oc3f_1 {
|
|
11791
11828
|
transform: all 0.3s ease-in-out;
|
|
11792
11829
|
padding-bottom: 80px;
|
|
@@ -11849,8 +11886,8 @@ var side_panel_module_css_default2 = { "side-panel": "_side-panel_1oc3f_1", "sid
|
|
|
11849
11886
|
// admin/views/users/details/layout/membership-dropdown.tsx
|
|
11850
11887
|
import { Text as Text25, DropdownMenu as DropdownMenu2, Skeleton as Skeleton2 } from "@raystack/apsara";
|
|
11851
11888
|
|
|
11852
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11853
|
-
var digest31 = "
|
|
11889
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-RHPUMbkD4Cms/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
11890
|
+
var digest31 = "3ace92c03591c04240b937a1ca054a8b705372512f6c68708d56b90e80edd28c";
|
|
11854
11891
|
var css31 = `._side-panel_1oc3f_1 {
|
|
11855
11892
|
transform: all 0.3s ease-in-out;
|
|
11856
11893
|
padding-bottom: 80px;
|
|
@@ -11931,24 +11968,17 @@ import {
|
|
|
11931
11968
|
Text as Text23,
|
|
11932
11969
|
toast as toast2
|
|
11933
11970
|
} from "@raystack/apsara";
|
|
11934
|
-
import { useCallback as useCallback10 } from "react";
|
|
11935
11971
|
import {
|
|
11936
|
-
FrontierService,
|
|
11937
11972
|
FrontierServiceQueries as FrontierServiceQueries7,
|
|
11938
|
-
|
|
11939
|
-
DeletePolicyRequestSchema,
|
|
11940
|
-
CreatePolicyRequestSchema
|
|
11973
|
+
SetOrganizationMemberRoleRequestSchema
|
|
11941
11974
|
} from "@raystack/proton/frontier";
|
|
11942
11975
|
import { create as create6 } from "@bufbuild/protobuf";
|
|
11943
|
-
import { useMutation as useMutation6
|
|
11944
|
-
import { createClient } from "@connectrpc/connect";
|
|
11976
|
+
import { useMutation as useMutation6 } from "@connectrpc/connect-query";
|
|
11945
11977
|
import { useForm as useForm4 } from "react-hook-form";
|
|
11946
11978
|
import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
|
|
11947
11979
|
import { jsx as jsx61, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
11948
11980
|
var formSchema = external_exports.object({
|
|
11949
|
-
|
|
11950
|
-
message: "At least one role must be selected"
|
|
11951
|
-
})
|
|
11981
|
+
roleId: external_exports.string().min(1, "A role must be selected")
|
|
11952
11982
|
});
|
|
11953
11983
|
var AssignRole = ({
|
|
11954
11984
|
roles = [],
|
|
@@ -11957,80 +11987,38 @@ var AssignRole = ({
|
|
|
11957
11987
|
onRoleUpdate,
|
|
11958
11988
|
onClose
|
|
11959
11989
|
}) => {
|
|
11960
|
-
const
|
|
11990
|
+
const currentRoleId = user?.roleIds?.[0] || "";
|
|
11961
11991
|
const {
|
|
11962
11992
|
handleSubmit,
|
|
11963
11993
|
watch,
|
|
11964
11994
|
setValue,
|
|
11965
|
-
formState: { isSubmitting, errors }
|
|
11995
|
+
formState: { isSubmitting, errors, isDirty: isDirty2 }
|
|
11966
11996
|
} = useForm4({
|
|
11967
11997
|
defaultValues: {
|
|
11968
|
-
|
|
11998
|
+
roleId: currentRoleId
|
|
11969
11999
|
},
|
|
11970
12000
|
resolver: zodResolver4(formSchema)
|
|
11971
12001
|
});
|
|
11972
|
-
const { mutateAsync:
|
|
11973
|
-
FrontierServiceQueries7.
|
|
12002
|
+
const { mutateAsync: setMemberRole } = useMutation6(
|
|
12003
|
+
FrontierServiceQueries7.setOrganizationMemberRole
|
|
11974
12004
|
);
|
|
11975
|
-
const
|
|
11976
|
-
FrontierServiceQueries7.createPolicy
|
|
11977
|
-
);
|
|
11978
|
-
const roleIds = watch("roleIds");
|
|
12005
|
+
const selectedRoleId = watch("roleId");
|
|
11979
12006
|
function onCheckedChange(value, roleId) {
|
|
11980
12007
|
if (!roleId)
|
|
11981
12008
|
return;
|
|
11982
|
-
const currentRoles = new Set(roleIds);
|
|
11983
12009
|
if (value) {
|
|
11984
|
-
|
|
11985
|
-
} else {
|
|
11986
|
-
currentRoles.delete(roleId);
|
|
12010
|
+
setValue("roleId", roleId, { shouldDirty: true });
|
|
11987
12011
|
}
|
|
11988
|
-
setValue("roleIds", currentRoles);
|
|
11989
12012
|
}
|
|
11990
|
-
const checkRole = useCallback10(
|
|
11991
|
-
(roleId) => {
|
|
11992
|
-
if (!roleId)
|
|
11993
|
-
return false;
|
|
11994
|
-
return roleIds?.has(roleId) || false;
|
|
11995
|
-
},
|
|
11996
|
-
[roleIds]
|
|
11997
|
-
);
|
|
11998
12013
|
const onSubmit = async (data) => {
|
|
11999
12014
|
try {
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
create6(ListPoliciesRequestSchema, {
|
|
12015
|
+
await setMemberRole(
|
|
12016
|
+
create6(SetOrganizationMemberRoleRequestSchema, {
|
|
12003
12017
|
orgId: organizationId,
|
|
12004
|
-
userId: user?.id
|
|
12018
|
+
userId: user?.id,
|
|
12019
|
+
roleId: data.roleId
|
|
12005
12020
|
})
|
|
12006
12021
|
);
|
|
12007
|
-
const policies = policiesResp.policies || [];
|
|
12008
|
-
const removedRolesPolicies = policies.filter(
|
|
12009
|
-
(policy) => !(policy.roleId && data.roleIds.has(policy.roleId))
|
|
12010
|
-
);
|
|
12011
|
-
await Promise.all(
|
|
12012
|
-
removedRolesPolicies.map(
|
|
12013
|
-
(policy) => deletePolicy(
|
|
12014
|
-
create6(DeletePolicyRequestSchema, { id: policy.id || "" })
|
|
12015
|
-
)
|
|
12016
|
-
)
|
|
12017
|
-
);
|
|
12018
|
-
const resource = `${SCOPES.ORG}:${organizationId}`;
|
|
12019
|
-
const principal = `${SCOPES.USER}:${user?.id}`;
|
|
12020
|
-
const assignedRolesArr = Array.from(data.roleIds);
|
|
12021
|
-
await Promise.all(
|
|
12022
|
-
assignedRolesArr.map(
|
|
12023
|
-
(roleId) => createPolicy(
|
|
12024
|
-
create6(CreatePolicyRequestSchema, {
|
|
12025
|
-
body: {
|
|
12026
|
-
roleId,
|
|
12027
|
-
resource,
|
|
12028
|
-
principal
|
|
12029
|
-
}
|
|
12030
|
-
})
|
|
12031
|
-
)
|
|
12032
|
-
)
|
|
12033
|
-
);
|
|
12034
12022
|
if (onRoleUpdate) {
|
|
12035
12023
|
onRoleUpdate();
|
|
12036
12024
|
}
|
|
@@ -12051,7 +12039,7 @@ var AssignRole = ({
|
|
|
12051
12039
|
/* @__PURE__ */ jsx61("div", { role: "group", "aria-labelledby": "roles-group", children: /* @__PURE__ */ jsxs38(Flex38, { direction: "column", gap: 4, children: [
|
|
12052
12040
|
roles.map((role) => {
|
|
12053
12041
|
const htmlId = `role-${role.id}`;
|
|
12054
|
-
const checked =
|
|
12042
|
+
const checked = selectedRoleId === role.id;
|
|
12055
12043
|
return /* @__PURE__ */ jsxs38(Flex38, { gap: 3, children: [
|
|
12056
12044
|
/* @__PURE__ */ jsx61(
|
|
12057
12045
|
Checkbox2,
|
|
@@ -12065,7 +12053,7 @@ var AssignRole = ({
|
|
|
12065
12053
|
/* @__PURE__ */ jsx61(Label3, { htmlFor: htmlId, children: role.title })
|
|
12066
12054
|
] }, role.id);
|
|
12067
12055
|
}),
|
|
12068
|
-
errors.
|
|
12056
|
+
errors.roleId && /* @__PURE__ */ jsx61(Text23, { variant: "danger", children: errors.roleId.message })
|
|
12069
12057
|
] }) })
|
|
12070
12058
|
] }) }),
|
|
12071
12059
|
/* @__PURE__ */ jsxs38(Dialog4.Footer, { children: [
|
|
@@ -12083,6 +12071,7 @@ var AssignRole = ({
|
|
|
12083
12071
|
Button9,
|
|
12084
12072
|
{
|
|
12085
12073
|
type: "submit",
|
|
12074
|
+
disabled: !isDirty2,
|
|
12086
12075
|
"data-test-id": "assign-role-update-button",
|
|
12087
12076
|
loading: isSubmitting,
|
|
12088
12077
|
loaderText: "Updating...",
|
|
@@ -12307,8 +12296,8 @@ var SidePanelMembership = ({
|
|
|
12307
12296
|
] });
|
|
12308
12297
|
};
|
|
12309
12298
|
|
|
12310
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12311
|
-
var digest32 = "
|
|
12299
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-j2VeZxJcHzsm/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
12300
|
+
var digest32 = "9e1be78c18f7025ee58adec194f83fc7c0cecc6bebc116b271d64dcc176d7f6b";
|
|
12312
12301
|
var css32 = `._side-panel_1oc3f_1 {
|
|
12313
12302
|
transform: all 0.3s ease-in-out;
|
|
12314
12303
|
padding-bottom: 80px;
|
|
@@ -12426,8 +12415,8 @@ var UserDetailsSidePanel = () => {
|
|
|
12426
12415
|
);
|
|
12427
12416
|
};
|
|
12428
12417
|
|
|
12429
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12430
|
-
var digest33 = "
|
|
12418
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-gv1bmvahUEha/sdk/admin/views/users/details/layout/layout.module.css.js
|
|
12419
|
+
var digest33 = "118ce81ee55000a2c6e31f7dc4002b76e774b7760d51a8e0898e4e124c2908a3";
|
|
12431
12420
|
var css33 = `._page_190wz_1 {
|
|
12432
12421
|
height: 100vh;
|
|
12433
12422
|
width: 100%;
|
|
@@ -12468,8 +12457,8 @@ import {
|
|
|
12468
12457
|
} from "@raystack/apsara";
|
|
12469
12458
|
import { SidebarIcon } from "@raystack/apsara/icons";
|
|
12470
12459
|
|
|
12471
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12472
|
-
var digest34 = "
|
|
12460
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-xy05wPW4xI1c/sdk/admin/views/users/details/layout/navbar.module.css.js
|
|
12461
|
+
var digest34 = "f2fe7c02367fc76fc5091ec3304ffd7ab10571d18fb4d3600e236190b5669712";
|
|
12473
12462
|
var css34 = `._navbar_1ahsl_1 {
|
|
12474
12463
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
12475
12464
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -12595,12 +12584,12 @@ import { AdminServiceQueries as AdminServiceQueries14 } from "@raystack/proton/f
|
|
|
12595
12584
|
import { Flex as Flex47, Separator as Separator3, Text as Text31 } from "@raystack/apsara";
|
|
12596
12585
|
|
|
12597
12586
|
// admin/views/users/details/security/block-user.tsx
|
|
12598
|
-
import { useCallback as
|
|
12587
|
+
import { useCallback as useCallback10, useState as useState15 } from "react";
|
|
12599
12588
|
import { Button as Button11, Dialog as Dialog6, toast as toast4 } from "@raystack/apsara";
|
|
12600
12589
|
import {
|
|
12601
12590
|
createConnectQueryKey as createConnectQueryKey3,
|
|
12602
12591
|
useMutation as useMutation7,
|
|
12603
|
-
useTransport as
|
|
12592
|
+
useTransport as useTransport4
|
|
12604
12593
|
} from "@connectrpc/connect-query";
|
|
12605
12594
|
import {
|
|
12606
12595
|
AdminServiceQueries as AdminServiceQueries12,
|
|
@@ -12613,10 +12602,10 @@ var BlockUserDialog = () => {
|
|
|
12613
12602
|
const [isDialogOpen, setIsDialogOpen] = useState15(false);
|
|
12614
12603
|
const { user, reset } = useUser();
|
|
12615
12604
|
const queryClient = useQueryClient5();
|
|
12616
|
-
const transport =
|
|
12605
|
+
const transport = useTransport4();
|
|
12617
12606
|
const isActive = user?.state === "enabled";
|
|
12618
12607
|
const userName = getUserName(user);
|
|
12619
|
-
const optimisticUpdateState =
|
|
12608
|
+
const optimisticUpdateState = useCallback10(
|
|
12620
12609
|
(state) => {
|
|
12621
12610
|
queryClient.setQueryData(
|
|
12622
12611
|
createConnectQueryKey3({
|
|
@@ -12647,9 +12636,6 @@ var BlockUserDialog = () => {
|
|
|
12647
12636
|
optimisticUpdateState("disabled");
|
|
12648
12637
|
reset?.();
|
|
12649
12638
|
onOpenChange(false);
|
|
12650
|
-
},
|
|
12651
|
-
onError: (error) => {
|
|
12652
|
-
console.error("Failed to block user", error);
|
|
12653
12639
|
}
|
|
12654
12640
|
}
|
|
12655
12641
|
);
|
|
@@ -12661,9 +12647,6 @@ var BlockUserDialog = () => {
|
|
|
12661
12647
|
optimisticUpdateState("enabled");
|
|
12662
12648
|
reset?.();
|
|
12663
12649
|
onOpenChange(false);
|
|
12664
|
-
},
|
|
12665
|
-
onError: (error) => {
|
|
12666
|
-
console.error("Failed to block user", error);
|
|
12667
12650
|
}
|
|
12668
12651
|
}
|
|
12669
12652
|
);
|
|
@@ -12671,8 +12654,19 @@ var BlockUserDialog = () => {
|
|
|
12671
12654
|
const onOpenChange = (value) => {
|
|
12672
12655
|
setIsDialogOpen(value);
|
|
12673
12656
|
};
|
|
12657
|
+
const handleAction = async (action, errorMessage) => {
|
|
12658
|
+
try {
|
|
12659
|
+
await action({ id: user?.id || "" });
|
|
12660
|
+
} catch (error) {
|
|
12661
|
+
handleConnectError(error, {
|
|
12662
|
+
PermissionDenied: () => toast4.error("You don't have permission to perform this action"),
|
|
12663
|
+
NotFound: (err) => toast4.error("Not found", { description: err.message }),
|
|
12664
|
+
Default: (err) => toast4.error(errorMessage, { description: err.message })
|
|
12665
|
+
});
|
|
12666
|
+
}
|
|
12667
|
+
};
|
|
12674
12668
|
const config = isActive ? {
|
|
12675
|
-
onClick: blockUser,
|
|
12669
|
+
onClick: () => handleAction(blockUser, `Failed to block ${t.user({ case: "lower" })}`),
|
|
12676
12670
|
btnColor: "danger",
|
|
12677
12671
|
btnText: "Block",
|
|
12678
12672
|
dialogTitle: `Block ${t.user({ case: "lower" })}`,
|
|
@@ -12680,7 +12674,7 @@ var BlockUserDialog = () => {
|
|
|
12680
12674
|
dialogConfirmText: "Block",
|
|
12681
12675
|
dialogConfirmLoadingText: "Blocking..."
|
|
12682
12676
|
} : {
|
|
12683
|
-
onClick: unblockUser,
|
|
12677
|
+
onClick: () => handleAction(unblockUser, `Failed to unblock ${t.user({ case: "lower" })}`),
|
|
12684
12678
|
btnColor: "accent",
|
|
12685
12679
|
btnText: "Unblock",
|
|
12686
12680
|
dialogTitle: `Unblock ${t.user({ case: "lower" })}`,
|
|
@@ -12724,7 +12718,7 @@ var BlockUserDialog = () => {
|
|
|
12724
12718
|
"data-test-id": "admin-security-block-user-submit",
|
|
12725
12719
|
loading: isSubmitting,
|
|
12726
12720
|
loaderText: config.dialogConfirmLoadingText,
|
|
12727
|
-
onClick:
|
|
12721
|
+
onClick: config.onClick,
|
|
12728
12722
|
children: config.dialogConfirmText
|
|
12729
12723
|
}
|
|
12730
12724
|
)
|
|
@@ -12756,8 +12750,8 @@ import {
|
|
|
12756
12750
|
Text as Text28
|
|
12757
12751
|
} from "@raystack/apsara";
|
|
12758
12752
|
|
|
12759
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12760
|
-
var digest35 = "
|
|
12753
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-v5NphKSKwpOK/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
12754
|
+
var digest35 = "90a04bbbe689914356e5414e40c40e710894e323a65f7280420393b925aeb1d4";
|
|
12761
12755
|
var css35 = `._sessionsContainer_aq82p_1 {
|
|
12762
12756
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
12763
12757
|
border-radius: var(--rs-radius-2);
|
|
@@ -12878,8 +12872,8 @@ var RevokeSessionFinalConfirm = ({
|
|
|
12878
12872
|
) });
|
|
12879
12873
|
};
|
|
12880
12874
|
|
|
12881
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12882
|
-
var digest36 = "
|
|
12875
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-fQCn20Ti4ENK/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
12876
|
+
var digest36 = "29a8587a31d8a570c2463c3bedda48b07f0059709867a968270c2ad76eea024d";
|
|
12883
12877
|
var css36 = `._sessionsContainer_aq82p_1 {
|
|
12884
12878
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
12885
12879
|
border-radius: var(--rs-radius-2);
|
|
@@ -13023,8 +13017,8 @@ var RevokeSessionConfirm = ({ isOpen, onOpenChange, sessionInfo, onRevokeConfirm
|
|
|
13023
13017
|
// admin/views/users/details/security/sessions/session-skeleton.tsx
|
|
13024
13018
|
import { Flex as Flex45, Skeleton as Skeleton3 } from "@raystack/apsara";
|
|
13025
13019
|
|
|
13026
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13027
|
-
var digest37 = "
|
|
13020
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-OOu1Fgafr8VC/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
13021
|
+
var digest37 = "0a8eaf5c3908112ecc0197f56d7496c39dec85bc66d80512ae84c860a757c3fe";
|
|
13028
13022
|
var css37 = `._sessionsContainer_aq82p_1 {
|
|
13029
13023
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
13030
13024
|
border-radius: var(--rs-radius-2);
|
|
@@ -13099,14 +13093,14 @@ var SessionSkeleton = ({ count: count2 = 3 }) => {
|
|
|
13099
13093
|
};
|
|
13100
13094
|
|
|
13101
13095
|
// admin/views/users/details/security/sessions/index.tsx
|
|
13102
|
-
import { useQuery as useQuery10, useMutation as useMutation8, createConnectQueryKey as createConnectQueryKey4, useTransport as
|
|
13096
|
+
import { useQuery as useQuery10, useMutation as useMutation8, createConnectQueryKey as createConnectQueryKey4, useTransport as useTransport5 } from "@connectrpc/connect-query";
|
|
13103
13097
|
import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
|
|
13104
13098
|
import { AdminServiceQueries as AdminServiceQueries13 } from "@raystack/proton/frontier";
|
|
13105
13099
|
import dayjs9 from "dayjs";
|
|
13106
13100
|
import relativeTime from "dayjs/plugin/relativeTime";
|
|
13107
13101
|
|
|
13108
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13109
|
-
var digest38 = "
|
|
13102
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-VSEiB1n27o5o/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
13103
|
+
var digest38 = "2f0be65d79f5169042cc4a605259b902ee4b9ddf71d7e091dfea19a9bb471a2b";
|
|
13110
13104
|
var css38 = `._sessionsContainer_aq82p_1 {
|
|
13111
13105
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
13112
13106
|
border-radius: var(--rs-radius-2);
|
|
@@ -13201,7 +13195,7 @@ var formatDeviceDisplay = (browser, operatingSystem) => {
|
|
|
13201
13195
|
var UserSessions = () => {
|
|
13202
13196
|
const { user } = useUser();
|
|
13203
13197
|
const queryClient = useQueryClient6();
|
|
13204
|
-
const transport =
|
|
13198
|
+
const transport = useTransport5();
|
|
13205
13199
|
const [isRevokeDialogOpen, setIsRevokeDialogOpen] = useState17(false);
|
|
13206
13200
|
const [selectedSession, setSelectedSession] = useState17(null);
|
|
13207
13201
|
const {
|
|
@@ -13315,8 +13309,8 @@ var UserSessions = () => {
|
|
|
13315
13309
|
] });
|
|
13316
13310
|
};
|
|
13317
13311
|
|
|
13318
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13319
|
-
var digest39 = "
|
|
13312
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-KQqMPG2ddTMr/sdk/admin/views/users/details/security/security.module.css.js
|
|
13313
|
+
var digest39 = "004a97606db9123d0d044e13092b650b99bbdf2f78c8a6e9a89aee526dc9a3bb";
|
|
13320
13314
|
var css39 = `._container_4259p_1 {
|
|
13321
13315
|
width: 100%;
|
|
13322
13316
|
}
|
|
@@ -13450,8 +13444,8 @@ import {
|
|
|
13450
13444
|
} from "@raystack/apsara";
|
|
13451
13445
|
import { OrganizationIcon } from "@raystack/apsara/icons";
|
|
13452
13446
|
|
|
13453
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13454
|
-
var digest40 = "
|
|
13447
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-0feDZ8vf214L/sdk/admin/views/organizations/list/list.module.css.js
|
|
13448
|
+
var digest40 = "07adeec1b49bc98cc70359a828dbe602a2f187a735dbe31d6ecf6d29f62a8d10";
|
|
13455
13449
|
var css40 = `._navbar_1py96_1 {
|
|
13456
13450
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
13457
13451
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -13640,8 +13634,8 @@ var OrganizationsNavabar = ({
|
|
|
13640
13634
|
] });
|
|
13641
13635
|
};
|
|
13642
13636
|
|
|
13643
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13644
|
-
var digest41 = "
|
|
13637
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-650ZjiA4i2X2/sdk/admin/views/organizations/list/list.module.css.js
|
|
13638
|
+
var digest41 = "fc934c256f84a0b9e0127881fd54a6827d96aa0b4c39e922b78bc85533d6cdb5";
|
|
13645
13639
|
var css41 = `._navbar_1py96_1 {
|
|
13646
13640
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
13647
13641
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -13755,8 +13749,8 @@ import {
|
|
|
13755
13749
|
} from "@raystack/apsara";
|
|
13756
13750
|
import dayjs10 from "dayjs";
|
|
13757
13751
|
|
|
13758
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13759
|
-
var digest42 = "
|
|
13752
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-aSdxhFYe44r3/sdk/admin/views/organizations/list/list.module.css.js
|
|
13753
|
+
var digest42 = "5cc89e7e80dcdfd96cd2912055f96da1514dd87ae9366f3fe86036294461979a";
|
|
13760
13754
|
var css42 = `._navbar_1py96_1 {
|
|
13761
13755
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
13762
13756
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -14026,8 +14020,8 @@ import { create as create8 } from "@bufbuild/protobuf";
|
|
|
14026
14020
|
// admin/views/organizations/list/create.tsx
|
|
14027
14021
|
import { useEffect as useEffect6, useState as useState20 } from "react";
|
|
14028
14022
|
|
|
14029
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14030
|
-
var digest43 = "
|
|
14023
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-lH8UBdXR325r/sdk/admin/views/organizations/list/list.module.css.js
|
|
14024
|
+
var digest43 = "755ca8f13beecd9ed6dc33f5aef3ce4f2ec055d2e3b4a5de627ceb52dcf21998";
|
|
14031
14025
|
var css43 = `._navbar_1py96_1 {
|
|
14032
14026
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
14033
14027
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -14158,8 +14152,8 @@ var cross_default = 'data:image/svg+xml,<svg width="20" height="20" viewBox="0 0
|
|
|
14158
14152
|
// react/components/avatar-upload/index.tsx
|
|
14159
14153
|
import "react-image-crop/dist/ReactCrop.css";
|
|
14160
14154
|
|
|
14161
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14162
|
-
var digest44 = "
|
|
14155
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-n9232uFGzoIy/sdk/react/components/avatar-upload/avatar-upload.module.css.js
|
|
14156
|
+
var digest44 = "9a420d71507114b43909ccb22069ed16694e6472668b894432d1fb877ed47698";
|
|
14163
14157
|
var css44 = `._container_1k4dc_1 {
|
|
14164
14158
|
display: flex;
|
|
14165
14159
|
flex-direction: column;
|
|
@@ -14893,7 +14887,7 @@ import { useEffect as useEffect12, useMemo as useMemo9, useState as useState25 }
|
|
|
14893
14887
|
import {
|
|
14894
14888
|
useQuery as useQuery16,
|
|
14895
14889
|
createConnectQueryKey as createConnectQueryKey9,
|
|
14896
|
-
useTransport as
|
|
14890
|
+
useTransport as useTransport10
|
|
14897
14891
|
} from "@connectrpc/connect-query";
|
|
14898
14892
|
import { useQueryClient as useQueryClient11 } from "@tanstack/react-query";
|
|
14899
14893
|
import { create as create18 } from "@bufbuild/protobuf";
|
|
@@ -14914,8 +14908,8 @@ import {
|
|
|
14914
14908
|
Search
|
|
14915
14909
|
} from "@raystack/apsara";
|
|
14916
14910
|
|
|
14917
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14918
|
-
var digest45 = "
|
|
14911
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-7dDoRrK1hvFB/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
14912
|
+
var digest45 = "d0e09710d55535beafb15998dbb1149aac3baf7e04478c5799b8c5fb2298650b";
|
|
14919
14913
|
var css45 = `._page_1jsqa_1 {
|
|
14920
14914
|
width: 100%;
|
|
14921
14915
|
height: 100vh;
|
|
@@ -15021,8 +15015,8 @@ import {
|
|
|
15021
15015
|
} from "@raystack/apsara";
|
|
15022
15016
|
import { useContext as useContext5, useMemo as useMemo7 } from "react";
|
|
15023
15017
|
|
|
15024
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15025
|
-
var digest46 = "
|
|
15018
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-6h1kCxbMOZTB/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
15019
|
+
var digest46 = "80efcc44e28cfd9aca42c62ea7304ef7553e076620a3d3ff2f15c2dfd22c1689";
|
|
15026
15020
|
var css46 = `._page_1jsqa_1 {
|
|
15027
15021
|
width: 100%;
|
|
15028
15022
|
height: 100vh;
|
|
@@ -15168,9 +15162,16 @@ var PROJECT_NAMESPACE = "app/project";
|
|
|
15168
15162
|
var DEFAULT_INVITE_ROLE = "app_organization_viewer";
|
|
15169
15163
|
|
|
15170
15164
|
// admin/views/organizations/details/layout/invite-users-dialog.tsx
|
|
15171
|
-
import {
|
|
15165
|
+
import {
|
|
15166
|
+
useMutation as useMutation10,
|
|
15167
|
+
createConnectQueryKey as createConnectQueryKey5,
|
|
15168
|
+
useTransport as useTransport6
|
|
15169
|
+
} from "@connectrpc/connect-query";
|
|
15172
15170
|
import { useQueryClient as useQueryClient7 } from "@tanstack/react-query";
|
|
15173
|
-
import {
|
|
15171
|
+
import {
|
|
15172
|
+
FrontierServiceQueries as FrontierServiceQueries11,
|
|
15173
|
+
CreateOrganizationInvitationRequestSchema
|
|
15174
|
+
} from "@raystack/proton/frontier";
|
|
15174
15175
|
import { create as create10 } from "@bufbuild/protobuf";
|
|
15175
15176
|
import { jsx as jsx81, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
15176
15177
|
var inviteSchema2 = objectType({
|
|
@@ -15181,7 +15182,7 @@ var InviteUsersDialog = ({ onOpenChange }) => {
|
|
|
15181
15182
|
const t = useTerminology();
|
|
15182
15183
|
const { roles = [], organization } = useContext5(OrganizationContext);
|
|
15183
15184
|
const queryClient = useQueryClient7();
|
|
15184
|
-
const transport =
|
|
15185
|
+
const transport = useTransport6();
|
|
15185
15186
|
const organizationId = organization?.id || "";
|
|
15186
15187
|
const defaultRoleId = useMemo7(
|
|
15187
15188
|
() => roles?.find((role) => role.name === DEFAULT_INVITE_ROLE)?.id,
|
|
@@ -15210,25 +15211,28 @@ var InviteUsersDialog = ({ onOpenChange }) => {
|
|
|
15210
15211
|
`${t.user({ case: "capital", plural: inviteCount > 1 })} invited`
|
|
15211
15212
|
);
|
|
15212
15213
|
onOpenChange(false);
|
|
15213
|
-
},
|
|
15214
|
-
onError: (error) => {
|
|
15215
|
-
toast7.error("Something went wrong", {
|
|
15216
|
-
description: error.message
|
|
15217
|
-
});
|
|
15218
|
-
console.error("Unable to invite user:", error);
|
|
15219
15214
|
}
|
|
15220
15215
|
}
|
|
15221
15216
|
);
|
|
15222
15217
|
const onSubmit = async (data) => {
|
|
15223
15218
|
if (!organizationId)
|
|
15224
15219
|
return;
|
|
15225
|
-
|
|
15226
|
-
|
|
15227
|
-
|
|
15228
|
-
|
|
15229
|
-
|
|
15230
|
-
|
|
15231
|
-
|
|
15220
|
+
try {
|
|
15221
|
+
await createInvitation(
|
|
15222
|
+
create10(CreateOrganizationInvitationRequestSchema, {
|
|
15223
|
+
orgId: organizationId,
|
|
15224
|
+
userIds: data.emails,
|
|
15225
|
+
roleIds: data.role ? [data.role] : []
|
|
15226
|
+
})
|
|
15227
|
+
);
|
|
15228
|
+
} catch (error) {
|
|
15229
|
+
handleConnectError(error, {
|
|
15230
|
+
AlreadyExists: () => toast7.error("Invitation already exists"),
|
|
15231
|
+
InvalidArgument: (err) => toast7.error("Invalid input", { description: err.message }),
|
|
15232
|
+
PermissionDenied: () => toast7.error("You don't have permission to perform this action"),
|
|
15233
|
+
Default: (err) => toast7.error("Something went wrong", { description: err.message })
|
|
15234
|
+
});
|
|
15235
|
+
}
|
|
15232
15236
|
};
|
|
15233
15237
|
const isSubmitting = methods?.formState?.isSubmitting;
|
|
15234
15238
|
const errors = methods?.formState?.errors;
|
|
@@ -15318,8 +15322,8 @@ import {
|
|
|
15318
15322
|
import { useContext as useContext6 } from "react";
|
|
15319
15323
|
import { Controller as Controller5, FormProvider as FormProvider4, useForm as useForm7 } from "react-hook-form";
|
|
15320
15324
|
|
|
15321
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15322
|
-
var digest47 = "
|
|
15325
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-aGdamGJpaBGS/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
15326
|
+
var digest47 = "ea3d1f7905d6f1830516acf24e3c2c41c69170f56d4f64836f4711885ee5b9b5";
|
|
15323
15327
|
var css47 = `._page_1jsqa_1 {
|
|
15324
15328
|
width: 100%;
|
|
15325
15329
|
height: 100vh;
|
|
@@ -15414,7 +15418,7 @@ var layout_module_css_default4 = { "page": "_page_1jsqa_1", "main_content": "_ma
|
|
|
15414
15418
|
|
|
15415
15419
|
// admin/views/organizations/details/layout/add-tokens-dialog.tsx
|
|
15416
15420
|
import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
|
|
15417
|
-
import { useMutation as useMutation11, createConnectQueryKey as createConnectQueryKey6, useTransport as
|
|
15421
|
+
import { useMutation as useMutation11, createConnectQueryKey as createConnectQueryKey6, useTransport as useTransport7 } from "@connectrpc/connect-query";
|
|
15418
15422
|
import { useQueryClient as useQueryClient8 } from "@tanstack/react-query";
|
|
15419
15423
|
import { AdminServiceQueries as AdminServiceQueries17, CheckoutProductBodySchema, DelegatedCheckoutRequestSchema } from "@raystack/proton/frontier";
|
|
15420
15424
|
import { create as create11 } from "@bufbuild/protobuf";
|
|
@@ -15429,7 +15433,7 @@ var addTokensSchema = objectType({
|
|
|
15429
15433
|
var AddTokensDialog = ({ onOpenChange }) => {
|
|
15430
15434
|
const { organization, billingAccount, fetchTokenBalance, tokenProductId } = useContext6(OrganizationContext);
|
|
15431
15435
|
const queryClient = useQueryClient8();
|
|
15432
|
-
const transport =
|
|
15436
|
+
const transport = useTransport7();
|
|
15433
15437
|
const organisationId = organization?.id || "";
|
|
15434
15438
|
const billingAccountId = billingAccount?.id || "";
|
|
15435
15439
|
const methods = useForm7({
|
|
@@ -15814,8 +15818,8 @@ var OrganizationsDetailsNavabar = ({
|
|
|
15814
15818
|
] });
|
|
15815
15819
|
};
|
|
15816
15820
|
|
|
15817
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15818
|
-
var digest48 = "
|
|
15821
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-17emZx80R3ZK/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
15822
|
+
var digest48 = "ca4e2b9caec3b9addcaa6966276b83cdbbf9ae5fb9c9f20be68626d591dee526";
|
|
15819
15823
|
var css48 = `._page_1jsqa_1 {
|
|
15820
15824
|
width: 100%;
|
|
15821
15825
|
height: 100vh;
|
|
@@ -15917,8 +15921,8 @@ import { Avatar as Avatar9, getAvatarColor as getAvatarColor7, SidePanel as Side
|
|
|
15917
15921
|
// admin/views/organizations/details/side-panel/org-details-section.tsx
|
|
15918
15922
|
import { Flex as Flex57, List as List7, Text as Text39, CopyButton as CopyButton3, Tooltip as Tooltip3 } from "@raystack/apsara";
|
|
15919
15923
|
|
|
15920
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15921
|
-
var digest49 = "
|
|
15924
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-jjh48GwxEued/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
15925
|
+
var digest49 = "44875699894b51c338e3ec48cd79a49a22c4c6148a2ac6c0c25cb08430f9b72c";
|
|
15922
15926
|
var css49 = `._side-panel-section-item-label_yeg6h_1 {
|
|
15923
15927
|
width: 120px;
|
|
15924
15928
|
}
|
|
@@ -16008,8 +16012,8 @@ var OrganizationDetailsSection = ({
|
|
|
16008
16012
|
import { Flex as Flex58, List as List8, Text as Text40, Link as Link2, Tooltip as Tooltip4 } from "@raystack/apsara";
|
|
16009
16013
|
import { useContext as useContext9 } from "react";
|
|
16010
16014
|
|
|
16011
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16012
|
-
var digest50 = "
|
|
16015
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-0ZuUVewbNWUJ/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
16016
|
+
var digest50 = "2f4d7ae8f650779cd3594ebe2b8618196cac127d82fa120e933a3a6b62d2adf6";
|
|
16013
16017
|
var css50 = `._side-panel-section-item-label_yeg6h_1 {
|
|
16014
16018
|
width: 120px;
|
|
16015
16019
|
}
|
|
@@ -16095,8 +16099,8 @@ var KYCDetailsSection = () => {
|
|
|
16095
16099
|
import { useContext as useContext10 } from "react";
|
|
16096
16100
|
import { List as List9, Text as Text41, Flex as Flex59 } from "@raystack/apsara";
|
|
16097
16101
|
|
|
16098
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16099
|
-
var digest51 = "
|
|
16102
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-6ljm5diks637/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
16103
|
+
var digest51 = "d177d4f38c5d4eb57a10e53280e46ba1b61594918e4ed9c733c55797bc9a8464";
|
|
16100
16104
|
var css51 = `._side-panel-section-item-label_yeg6h_1 {
|
|
16101
16105
|
width: 120px;
|
|
16102
16106
|
}
|
|
@@ -16197,8 +16201,8 @@ var PlanDetailsSection = () => {
|
|
|
16197
16201
|
// admin/views/organizations/details/side-panel/tokens-details-section.tsx
|
|
16198
16202
|
import { List as List10, Text as Text42, Flex as Flex60 } from "@raystack/apsara";
|
|
16199
16203
|
|
|
16200
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16201
|
-
var digest52 = "
|
|
16204
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-WeSLjcG01xfE/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
16205
|
+
var digest52 = "7c0e7613f813946aa84935244d84d4ac5a112d2b810cf940c85705a3aad23bbc";
|
|
16202
16206
|
var css52 = `._side-panel-section-item-label_yeg6h_1 {
|
|
16203
16207
|
width: 120px;
|
|
16204
16208
|
}
|
|
@@ -16299,8 +16303,8 @@ var TokensDetailsSection = () => {
|
|
|
16299
16303
|
// admin/views/organizations/details/side-panel/billing-details-section.tsx
|
|
16300
16304
|
import { CopyButton as CopyButton4, Flex as Flex61, Link as Link3, List as List11, Text as Text43 } from "@raystack/apsara";
|
|
16301
16305
|
|
|
16302
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16303
|
-
var digest53 = "
|
|
16306
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-QEA3wXlBZm7s/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
16307
|
+
var digest53 = "44225e10b1c1f173f17beaf3118e374407cd0a38be65959fe8e5c14c559c90ce";
|
|
16304
16308
|
var css53 = `._side-panel-section-item-label_yeg6h_1 {
|
|
16305
16309
|
width: 120px;
|
|
16306
16310
|
}
|
|
@@ -16385,7 +16389,7 @@ var BillingDetailsSection = () => {
|
|
|
16385
16389
|
] }),
|
|
16386
16390
|
/* @__PURE__ */ jsxs64(List11.Item, { children: [
|
|
16387
16391
|
/* @__PURE__ */ jsx88(List11.Label, { className: side_panel_module_css_default9["side-panel-section-item-label"], children: "Address" }),
|
|
16388
|
-
/* @__PURE__ */ jsx88(List11.Value, { className: side_panel_module_css_default9["side-panel-section-item-value"], children: isLoading ? /* @__PURE__ */ jsx88(Skeleton, {}) : /* @__PURE__ */ jsx88(Text43, { children: billingAccount?.address ?
|
|
16392
|
+
/* @__PURE__ */ jsx88(List11.Value, { className: side_panel_module_css_default9["side-panel-section-item-value"], children: isLoading ? /* @__PURE__ */ jsx88(Skeleton, {}) : /* @__PURE__ */ jsx88(Text43, { children: billingAccount?.address ? convertBillingAddressToString(billingAccount.address) : "N/A" }) })
|
|
16389
16393
|
] }),
|
|
16390
16394
|
/* @__PURE__ */ jsxs64(List11.Item, { children: [
|
|
16391
16395
|
/* @__PURE__ */ jsx88(List11.Label, { className: side_panel_module_css_default9["side-panel-section-item-label"], children: "Next billing date" }),
|
|
@@ -16458,8 +16462,8 @@ import {
|
|
|
16458
16462
|
toast as toast10
|
|
16459
16463
|
} from "@raystack/apsara";
|
|
16460
16464
|
|
|
16461
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16462
|
-
var digest54 = "
|
|
16465
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-G2e2I5eInYkX/sdk/admin/views/organizations/details/edit/edit.module.css.js
|
|
16466
|
+
var digest54 = "6c535fc293d71d13aeac0702953ae3d07f24aa12408e64f11804109fc2bcb62f";
|
|
16463
16467
|
var css54 = `._drawer-content_1o0os_1 {
|
|
16464
16468
|
min-width: 500px;
|
|
16465
16469
|
padding: 0;
|
|
@@ -16515,7 +16519,7 @@ var edit_module_css_default = { "drawer-content": "_drawer-content_1o0os_1", "dr
|
|
|
16515
16519
|
import { useContext as useContext13 } from "react";
|
|
16516
16520
|
import { Controller as Controller6, useForm as useForm8 } from "react-hook-form";
|
|
16517
16521
|
import { zodResolver as zodResolver8 } from "@hookform/resolvers/zod";
|
|
16518
|
-
import { useMutation as useMutation12, createConnectQueryKey as createConnectQueryKey7, useTransport as
|
|
16522
|
+
import { useMutation as useMutation12, createConnectQueryKey as createConnectQueryKey7, useTransport as useTransport8 } from "@connectrpc/connect-query";
|
|
16519
16523
|
import { useQueryClient as useQueryClient9 } from "@tanstack/react-query";
|
|
16520
16524
|
import { AdminServiceQueries as AdminServiceQueries18, FrontierServiceQueries as FrontierServiceQueries15, SetOrganizationKycRequestSchema } from "@raystack/proton/frontier";
|
|
16521
16525
|
import { create as create15 } from "@bufbuild/protobuf";
|
|
@@ -16535,7 +16539,7 @@ var kycUpdateSchema = external_exports.object({
|
|
|
16535
16539
|
function EditKYCPanel({ onClose }) {
|
|
16536
16540
|
const { organization, kycDetails, updateKYCDetails } = useContext13(OrganizationContext);
|
|
16537
16541
|
const queryClient = useQueryClient9();
|
|
16538
|
-
const transport =
|
|
16542
|
+
const transport = useTransport8();
|
|
16539
16543
|
const orgId = organization?.id || "";
|
|
16540
16544
|
const {
|
|
16541
16545
|
handleSubmit,
|
|
@@ -16696,8 +16700,8 @@ function EditKYCPanel({ onClose }) {
|
|
|
16696
16700
|
// admin/views/organizations/details/edit/organization.tsx
|
|
16697
16701
|
import { useContext as useContext14, useEffect as useEffect10, useState as useState23 } from "react";
|
|
16698
16702
|
|
|
16699
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16700
|
-
var digest55 = "
|
|
16703
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-toHkJtTMM1oY/sdk/admin/views/organizations/details/edit/edit.module.css.js
|
|
16704
|
+
var digest55 = "427eb194c9ee89018e3f9a8543e62857db9123c042a0ff8bd26a2b457436164b";
|
|
16701
16705
|
var css55 = `._drawer-content_1o0os_1 {
|
|
16702
16706
|
min-width: 500px;
|
|
16703
16707
|
padding: 0;
|
|
@@ -16763,7 +16767,7 @@ import {
|
|
|
16763
16767
|
} from "@raystack/apsara";
|
|
16764
16768
|
import { Controller as Controller7, useForm as useForm9 } from "react-hook-form";
|
|
16765
16769
|
import { zodResolver as zodResolver9 } from "@hookform/resolvers/zod";
|
|
16766
|
-
import { useMutation as useMutation13, createConnectQueryKey as createConnectQueryKey8, useTransport as
|
|
16770
|
+
import { useMutation as useMutation13, createConnectQueryKey as createConnectQueryKey8, useTransport as useTransport9 } from "@connectrpc/connect-query";
|
|
16767
16771
|
import { useQueryClient as useQueryClient10 } from "@tanstack/react-query";
|
|
16768
16772
|
import { FrontierServiceQueries as FrontierServiceQueries16, UpdateOrganizationRequestSchema } from "@raystack/proton/frontier";
|
|
16769
16773
|
import { create as create16 } from "@bufbuild/protobuf";
|
|
@@ -16808,7 +16812,7 @@ function EditOrganizationPanel({ onClose }) {
|
|
|
16808
16812
|
const { organization, appUrl, countries: countriesFromContext = [], organizationTypes: industries = [] } = useContext14(OrganizationContext);
|
|
16809
16813
|
const [countries, setCountries] = useState23(countriesFromContext);
|
|
16810
16814
|
const queryClient = useQueryClient10();
|
|
16811
|
-
const transport =
|
|
16815
|
+
const transport = useTransport9();
|
|
16812
16816
|
const orgId = organization?.id || "";
|
|
16813
16817
|
useEffect10(() => {
|
|
16814
16818
|
if (countriesFromContext.length > 0)
|
|
@@ -17079,8 +17083,8 @@ import {
|
|
|
17079
17083
|
toast as toast11
|
|
17080
17084
|
} from "@raystack/apsara";
|
|
17081
17085
|
|
|
17082
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17083
|
-
var digest56 = "
|
|
17086
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-S7Juxh5ugv4v/sdk/admin/views/organizations/details/edit/edit.module.css.js
|
|
17087
|
+
var digest56 = "c5c208e22d9b588f1bed8c5c183f334159545a67b1facd6941e063395e5a9d1b";
|
|
17084
17088
|
var css56 = `._drawer-content_1o0os_1 {
|
|
17085
17089
|
min-width: 500px;
|
|
17086
17090
|
padding: 0;
|
|
@@ -17133,7 +17137,7 @@ var css56 = `._drawer-content_1o0os_1 {
|
|
|
17133
17137
|
var edit_module_css_default3 = { "drawer-content": "_drawer-content_1o0os_1", "drawerContent": "_drawer-content_1o0os_1", "side-panel": "_side-panel_1o0os_7", "sidePanel": "_side-panel_1o0os_7", "side-panel-form": "_side-panel-form_1o0os_15", "sidePanelForm": "_side-panel-form_1o0os_15", "side-panel-content": "_side-panel-content_1o0os_22", "sidePanelContent": "_side-panel-content_1o0os_22", "side-panel-footer": "_side-panel-footer_1o0os_26", "sidePanelFooter": "_side-panel-footer_1o0os_26", "select-value": "_select-value_1o0os_31", "selectValue": "_select-value_1o0os_31", "select-content": "_select-content_1o0os_35", "selectContent": "_select-content_1o0os_35" };
|
|
17134
17138
|
|
|
17135
17139
|
// admin/views/organizations/details/edit/billing.tsx
|
|
17136
|
-
import { useCallback as
|
|
17140
|
+
import { useCallback as useCallback11, useContext as useContext15, useEffect as useEffect11, useMemo as useMemo8 } from "react";
|
|
17137
17141
|
import { useForm as useForm10 } from "react-hook-form";
|
|
17138
17142
|
import { zodResolver as zodResolver10 } from "@hookform/resolvers/zod";
|
|
17139
17143
|
import { useMutation as useMutation14 } from "@connectrpc/connect-query";
|
|
@@ -17246,7 +17250,7 @@ function EditBillingPanel({ onClose }) {
|
|
|
17246
17250
|
console.error("Failed to update billing details:", error);
|
|
17247
17251
|
}
|
|
17248
17252
|
};
|
|
17249
|
-
const onValueChange =
|
|
17253
|
+
const onValueChange = useCallback11((value) => {
|
|
17250
17254
|
const paymentType = value;
|
|
17251
17255
|
setValue("tokenPaymentType", paymentType);
|
|
17252
17256
|
if (paymentType === "prepaid") {
|
|
@@ -17481,7 +17485,7 @@ var OrganizationDetailsView = ({
|
|
|
17481
17485
|
const [isSearchVisible, setIsSearchVisible] = useState25(false);
|
|
17482
17486
|
const [searchQuery, setSearchQuery] = useState25("");
|
|
17483
17487
|
const queryClient = useQueryClient11();
|
|
17484
|
-
const transport =
|
|
17488
|
+
const transport = useTransport10();
|
|
17485
17489
|
const {
|
|
17486
17490
|
data: organization,
|
|
17487
17491
|
isLoading: isOrganizationLoading,
|
|
@@ -17713,8 +17717,8 @@ import {
|
|
|
17713
17717
|
toast as toast14
|
|
17714
17718
|
} from "@raystack/apsara";
|
|
17715
17719
|
|
|
17716
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17717
|
-
var digest57 = "
|
|
17720
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-EfHLCou5BXnM/sdk/admin/views/organizations/details/security/security.module.css.js
|
|
17721
|
+
var digest57 = "31aec4e32aa8e09d45dcdab0cc0208839a5dda3bf2d7b67fc3d5bc5fd1b7a65f";
|
|
17718
17722
|
var css57 = `._container_1wkae_1 {
|
|
17719
17723
|
width: 100%;
|
|
17720
17724
|
}
|
|
@@ -17760,7 +17764,7 @@ import { useContext as useContext18 } from "react";
|
|
|
17760
17764
|
// admin/views/organizations/details/security/block-organization.tsx
|
|
17761
17765
|
import { Button as Button23, Dialog as Dialog12, Flex as Flex66, Text as Text47, toast as toast12 } from "@raystack/apsara";
|
|
17762
17766
|
import { useContext as useContext16, useState as useState26 } from "react";
|
|
17763
|
-
import { createConnectQueryKey as createConnectQueryKey10, useMutation as useMutation15, useTransport as
|
|
17767
|
+
import { createConnectQueryKey as createConnectQueryKey10, useMutation as useMutation15, useTransport as useTransport11 } from "@connectrpc/connect-query";
|
|
17764
17768
|
import { FrontierServiceQueries as FrontierServiceQueries18, DisableOrganizationRequestSchema, EnableOrganizationRequestSchema } from "@raystack/proton/frontier";
|
|
17765
17769
|
import { create as create19 } from "@bufbuild/protobuf";
|
|
17766
17770
|
import { useQueryClient as useQueryClient12 } from "@tanstack/react-query";
|
|
@@ -17769,7 +17773,7 @@ var BlockOrganizationDialog = () => {
|
|
|
17769
17773
|
const t = useTerminology();
|
|
17770
17774
|
const { organization } = useContext16(OrganizationContext);
|
|
17771
17775
|
const queryClient = useQueryClient12();
|
|
17772
|
-
const transport =
|
|
17776
|
+
const transport = useTransport11();
|
|
17773
17777
|
const [isDialogOpen, setIsDialogOpen] = useState26(false);
|
|
17774
17778
|
const { mutateAsync: disableOrganization, isPending: isDisabling } = useMutation15(
|
|
17775
17779
|
FrontierServiceQueries18.disableOrganization,
|
|
@@ -17914,8 +17918,8 @@ import {
|
|
|
17914
17918
|
toast as toast13
|
|
17915
17919
|
} from "@raystack/apsara";
|
|
17916
17920
|
|
|
17917
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17918
|
-
var digest58 = "
|
|
17921
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-BlrPoOS1ykFe/sdk/admin/views/organizations/details/security/security.module.css.js
|
|
17922
|
+
var digest58 = "b10af5b6d2a7281863f8fc33039758046d7e6002f8aa9da4fc699224270e6f1a";
|
|
17919
17923
|
var css58 = `._container_1wkae_1 {
|
|
17920
17924
|
width: 100%;
|
|
17921
17925
|
}
|
|
@@ -17957,7 +17961,7 @@ var security_module_css_default3 = { "container": "_container_1wkae_1", "content
|
|
|
17957
17961
|
|
|
17958
17962
|
// admin/views/organizations/details/security/domains-list.tsx
|
|
17959
17963
|
import { useContext as useContext17, useState as useState27 } from "react";
|
|
17960
|
-
import { useMutation as useMutation16, createConnectQueryKey as createConnectQueryKey11, useTransport as
|
|
17964
|
+
import { useMutation as useMutation16, createConnectQueryKey as createConnectQueryKey11, useTransport as useTransport12 } from "@connectrpc/connect-query";
|
|
17961
17965
|
import { useQueryClient as useQueryClient13 } from "@tanstack/react-query";
|
|
17962
17966
|
import { FrontierServiceQueries as FrontierServiceQueries19, DeleteOrganizationDomainRequestSchema } from "@raystack/proton/frontier";
|
|
17963
17967
|
import { create as create20 } from "@bufbuild/protobuf";
|
|
@@ -17968,7 +17972,7 @@ var DeleteDomainDialog = ({
|
|
|
17968
17972
|
const { organization } = useContext17(OrganizationContext);
|
|
17969
17973
|
const [isDialogOpen, setIsDialogOpen] = useState27(false);
|
|
17970
17974
|
const queryClient = useQueryClient13();
|
|
17971
|
-
const transport =
|
|
17975
|
+
const transport = useTransport12();
|
|
17972
17976
|
const { mutateAsync: deleteDomain, isPending } = useMutation16(
|
|
17973
17977
|
FrontierServiceQueries19.deleteOrganizationDomain,
|
|
17974
17978
|
{
|
|
@@ -18139,8 +18143,8 @@ var OrganizationSecurity = () => {
|
|
|
18139
18143
|
// admin/views/organizations/details/members/index.tsx
|
|
18140
18144
|
import { DataTable as DataTable20, EmptyState as EmptyState15, Flex as Flex71 } from "@raystack/apsara";
|
|
18141
18145
|
|
|
18142
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18143
|
-
var digest59 = "
|
|
18146
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-s2aPN2e5sn5a/sdk/admin/views/organizations/details/members/members.module.css.js
|
|
18147
|
+
var digest59 = "5400efe9a957e0cfcd55ba0a0745a6e59c05b219cde22bcefb45b5f7b34d4e93";
|
|
18144
18148
|
var css59 = `._container_6bi1j_1 {
|
|
18145
18149
|
width: 100%;
|
|
18146
18150
|
}
|
|
@@ -18203,8 +18207,8 @@ import {
|
|
|
18203
18207
|
DropdownMenu as DropdownMenu4
|
|
18204
18208
|
} from "@raystack/apsara";
|
|
18205
18209
|
|
|
18206
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18207
|
-
var digest60 = "
|
|
18210
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-Fi6SJwCQLhkH/sdk/admin/views/organizations/details/members/members.module.css.js
|
|
18211
|
+
var digest60 = "18b93a3fc40cea6a6d50f333b2c0938c638e5cbe12151c171a4c3b9896a31e9f";
|
|
18208
18212
|
var css60 = `._container_6bi1j_1 {
|
|
18209
18213
|
width: 100%;
|
|
18210
18214
|
}
|
|
@@ -18389,19 +18393,19 @@ import { AdminServiceQueries as AdminServiceQueries20 } from "@raystack/proton/f
|
|
|
18389
18393
|
import {
|
|
18390
18394
|
useInfiniteQuery as useInfiniteQuery5,
|
|
18391
18395
|
createConnectQueryKey as createConnectQueryKey12,
|
|
18392
|
-
useTransport as
|
|
18396
|
+
useTransport as useTransport13
|
|
18393
18397
|
} from "@connectrpc/connect-query";
|
|
18394
18398
|
import { useQueryClient as useQueryClient14 } from "@tanstack/react-query";
|
|
18395
18399
|
|
|
18396
18400
|
// admin/views/organizations/details/members/remove-member.tsx
|
|
18397
18401
|
import {
|
|
18398
18402
|
FrontierServiceQueries as FrontierServiceQueries21,
|
|
18399
|
-
|
|
18403
|
+
RemoveOrganizationMemberRequestSchema
|
|
18400
18404
|
} from "@raystack/proton/frontier";
|
|
18401
18405
|
import { create as create22 } from "@bufbuild/protobuf";
|
|
18402
18406
|
import { useMutation as useMutation17 } from "@connectrpc/connect-query";
|
|
18403
18407
|
import { Button as Button26, Dialog as Dialog14, Flex as Flex70, Text as Text51, toast as toast15 } from "@raystack/apsara";
|
|
18404
|
-
import { ConnectError } from "@connectrpc/connect";
|
|
18408
|
+
import { ConnectError as ConnectError2 } from "@connectrpc/connect";
|
|
18405
18409
|
import { jsx as jsx99, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
18406
18410
|
var RemoveMember = ({
|
|
18407
18411
|
organizationId,
|
|
@@ -18410,17 +18414,18 @@ var RemoveMember = ({
|
|
|
18410
18414
|
onClose
|
|
18411
18415
|
}) => {
|
|
18412
18416
|
const t = useTerminology();
|
|
18413
|
-
const { mutateAsync:
|
|
18414
|
-
FrontierServiceQueries21.
|
|
18417
|
+
const { mutateAsync: removeOrganizationMember, isPending } = useMutation17(
|
|
18418
|
+
FrontierServiceQueries21.removeOrganizationMember
|
|
18415
18419
|
);
|
|
18416
18420
|
async function onSubmit() {
|
|
18417
18421
|
try {
|
|
18418
18422
|
if (!user)
|
|
18419
18423
|
return;
|
|
18420
|
-
await
|
|
18421
|
-
create22(
|
|
18422
|
-
|
|
18423
|
-
|
|
18424
|
+
await removeOrganizationMember(
|
|
18425
|
+
create22(RemoveOrganizationMemberRequestSchema, {
|
|
18426
|
+
orgId: organizationId,
|
|
18427
|
+
principalId: user?.id || "",
|
|
18428
|
+
principalType: "app/user"
|
|
18424
18429
|
})
|
|
18425
18430
|
);
|
|
18426
18431
|
if (onRemove) {
|
|
@@ -18428,7 +18433,7 @@ var RemoveMember = ({
|
|
|
18428
18433
|
}
|
|
18429
18434
|
toast15.success(`${t.member({ case: "capital" })} removed successfully`);
|
|
18430
18435
|
} catch (error) {
|
|
18431
|
-
const message = error instanceof
|
|
18436
|
+
const message = error instanceof ConnectError2 ? error.message : "Unknown error";
|
|
18432
18437
|
toast15.error(`Failed to remove ${t.member({ case: "lower" })}: ${message}`);
|
|
18433
18438
|
console.error(error);
|
|
18434
18439
|
}
|
|
@@ -18487,7 +18492,7 @@ var RemoveMember = ({
|
|
|
18487
18492
|
|
|
18488
18493
|
// ../node_modules/.pnpm/usehooks-ts@3.1.1_react@19.2.4/node_modules/usehooks-ts/dist/index.js
|
|
18489
18494
|
var import_lodash2 = __toESM(require_lodash(), 1);
|
|
18490
|
-
import { useState as useState28, useCallback as
|
|
18495
|
+
import { useState as useState28, useCallback as useCallback12, useLayoutEffect as useLayoutEffect3, useEffect as useEffect14, useRef as useRef3, useMemo as useMemo10 } from "react";
|
|
18491
18496
|
function useUnmount(func) {
|
|
18492
18497
|
const funcRef = useRef3(func);
|
|
18493
18498
|
funcRef.current = func;
|
|
@@ -18594,7 +18599,7 @@ function OrganizationMembersView() {
|
|
|
18594
18599
|
query: searchQuery
|
|
18595
18600
|
} = search;
|
|
18596
18601
|
const queryClient = useQueryClient14();
|
|
18597
|
-
const transport =
|
|
18602
|
+
const transport = useTransport13();
|
|
18598
18603
|
const organizationId = organization?.id || "";
|
|
18599
18604
|
const [assignRoleConfig, setAssignRoleConfig] = useState29({ isOpen: false, user: null });
|
|
18600
18605
|
const [removeMemberConfig, setRemoveMemberConfig] = useState29({ isOpen: false, user: null });
|
|
@@ -18740,8 +18745,8 @@ import {
|
|
|
18740
18745
|
Flex as Flex79
|
|
18741
18746
|
} from "@raystack/apsara";
|
|
18742
18747
|
|
|
18743
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18744
|
-
var digest61 = "
|
|
18748
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-WGJ6o1xU1W28/sdk/admin/views/organizations/details/projects/projects.module.css.js
|
|
18749
|
+
var digest61 = "04908132111ad74dc77465b9d87eab65c8e4e0d1d1be4e80f9d301e4126c7d3f";
|
|
18745
18750
|
var css61 = `._container_1rf4u_1 {
|
|
18746
18751
|
width: 100%;
|
|
18747
18752
|
}
|
|
@@ -18810,8 +18815,8 @@ import {
|
|
|
18810
18815
|
DropdownMenu as DropdownMenu5
|
|
18811
18816
|
} from "@raystack/apsara";
|
|
18812
18817
|
|
|
18813
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18814
|
-
var digest62 = "
|
|
18818
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-K9ILLINuAUO1/sdk/admin/views/organizations/details/projects/projects.module.css.js
|
|
18819
|
+
var digest62 = "d239beae58cf1409f781ddb5dafca669db05d3169669a7fb7fa2a80befd53667";
|
|
18815
18820
|
var css62 = `._container_1rf4u_1 {
|
|
18816
18821
|
width: 100%;
|
|
18817
18822
|
}
|
|
@@ -18993,10 +18998,10 @@ function RenameProjectDialog({
|
|
|
18993
18998
|
import { useState as useState31 } from "react";
|
|
18994
18999
|
|
|
18995
19000
|
// admin/views/organizations/details/projects/use-add-project-members.tsx
|
|
18996
|
-
import { useCallback as
|
|
19001
|
+
import { useCallback as useCallback13, useContext as useContext20, useMemo as useMemo12, useState as useState30 } from "react";
|
|
18997
19002
|
import { toast as toast17 } from "@raystack/apsara";
|
|
18998
19003
|
import { useQuery as useQuery18, useMutation as useMutation19 } from "@connectrpc/connect-query";
|
|
18999
|
-
import { FrontierServiceQueries as FrontierServiceQueries23, ListProjectUsersRequestSchema,
|
|
19004
|
+
import { FrontierServiceQueries as FrontierServiceQueries23, ListProjectUsersRequestSchema, ListRolesRequestSchema as ListRolesRequestSchema3, SetProjectMemberRoleRequestSchema } from "@raystack/proton/frontier";
|
|
19000
19005
|
import { create as create24 } from "@bufbuild/protobuf";
|
|
19001
19006
|
function useAddProjectMembers({ projectId }) {
|
|
19002
19007
|
const t = useTerminology();
|
|
@@ -19027,34 +19032,47 @@ function useAddProjectMembers({ projectId }) {
|
|
|
19027
19032
|
return name.toLowerCase().includes(searchQuery.toLowerCase());
|
|
19028
19033
|
}) : nonMembers;
|
|
19029
19034
|
}, [nonMembers, searchQuery]);
|
|
19030
|
-
const {
|
|
19031
|
-
FrontierServiceQueries23.
|
|
19035
|
+
const { data: rolesData } = useQuery18(
|
|
19036
|
+
FrontierServiceQueries23.listRoles,
|
|
19037
|
+
create24(ListRolesRequestSchema3, {
|
|
19038
|
+
state: "enabled",
|
|
19039
|
+
scopes: [SCOPES.PROJECT]
|
|
19040
|
+
}),
|
|
19041
|
+
{ enabled: !!projectId }
|
|
19042
|
+
);
|
|
19043
|
+
const viewerRoleId = useMemo12(
|
|
19044
|
+
() => rolesData?.roles?.find((r) => r.name === DEFAULT_ROLES.PROJECT_VIEWER)?.id ?? "",
|
|
19045
|
+
[rolesData]
|
|
19032
19046
|
);
|
|
19033
|
-
const
|
|
19047
|
+
const { mutateAsync: setProjectMemberRole } = useMutation19(
|
|
19048
|
+
FrontierServiceQueries23.setProjectMemberRole
|
|
19049
|
+
);
|
|
19050
|
+
const addMember = useCallback13(
|
|
19034
19051
|
async (userId) => {
|
|
19035
|
-
if (!userId || !projectId)
|
|
19052
|
+
if (!userId || !projectId || !viewerRoleId)
|
|
19036
19053
|
return;
|
|
19037
19054
|
try {
|
|
19038
|
-
|
|
19039
|
-
|
|
19040
|
-
|
|
19041
|
-
|
|
19042
|
-
|
|
19043
|
-
|
|
19044
|
-
principal,
|
|
19045
|
-
resource
|
|
19046
|
-
}
|
|
19055
|
+
await setProjectMemberRole(
|
|
19056
|
+
create24(SetProjectMemberRoleRequestSchema, {
|
|
19057
|
+
projectId,
|
|
19058
|
+
principalId: userId,
|
|
19059
|
+
principalType: SCOPES.USER,
|
|
19060
|
+
roleId: viewerRoleId
|
|
19047
19061
|
})
|
|
19048
19062
|
);
|
|
19049
19063
|
toast17.success(`${memberLabel} added`);
|
|
19050
19064
|
await refetch();
|
|
19051
19065
|
return projectMembers;
|
|
19052
19066
|
} catch (error) {
|
|
19053
|
-
|
|
19054
|
-
|
|
19067
|
+
handleConnectError(error, {
|
|
19068
|
+
AlreadyExists: () => toast17.error(`${memberLabel} already exists in this project`),
|
|
19069
|
+
PermissionDenied: () => toast17.error("You don't have permission to perform this action"),
|
|
19070
|
+
InvalidArgument: (err) => toast17.error("Invalid input", { description: err.message }),
|
|
19071
|
+
Default: (err) => toast17.error("Something went wrong", { description: err.message })
|
|
19072
|
+
});
|
|
19055
19073
|
}
|
|
19056
19074
|
},
|
|
19057
|
-
[projectId,
|
|
19075
|
+
[projectId, setProjectMemberRole, refetch, projectMembers, memberLabel, viewerRoleId]
|
|
19058
19076
|
);
|
|
19059
19077
|
return {
|
|
19060
19078
|
isLoading,
|
|
@@ -19302,98 +19320,97 @@ import { useInfiniteQuery as useInfiniteQuery7 } from "@connectrpc/connect-query
|
|
|
19302
19320
|
|
|
19303
19321
|
// admin/views/organizations/details/projects/members/index.tsx
|
|
19304
19322
|
import { DataTable as DataTable21, Dialog as Dialog18, EmptyState as EmptyState16, Flex as Flex78 } from "@raystack/apsara";
|
|
19305
|
-
import { useCallback as
|
|
19323
|
+
import { useCallback as useCallback14, useMemo as useMemo13, useState as useState33 } from "react";
|
|
19306
19324
|
import {
|
|
19307
19325
|
AdminServiceQueries as AdminServiceQueries21,
|
|
19308
19326
|
FrontierServiceQueries as FrontierServiceQueries26,
|
|
19309
19327
|
GetProjectRequestSchema,
|
|
19310
|
-
ListRolesRequestSchema as
|
|
19328
|
+
ListRolesRequestSchema as ListRolesRequestSchema4
|
|
19311
19329
|
} from "@raystack/proton/frontier";
|
|
19312
19330
|
import { create as create27 } from "@bufbuild/protobuf";
|
|
19313
19331
|
import { useQuery as useQuery19, useInfiniteQuery as useInfiniteQuery6 } from "@connectrpc/connect-query";
|
|
19314
19332
|
import { useDebouncedState as useDebouncedState4 } from "@raystack/apsara/hooks";
|
|
19315
19333
|
|
|
19316
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19317
|
-
var digest63 = "
|
|
19318
|
-
var css63 = `.
|
|
19334
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-0RcuH6UpYjFu/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
19335
|
+
var digest63 = "5fc2501b7251406fcf5bbfe031a8f68c588008db3cb7c29f7aca5e7608adc931";
|
|
19336
|
+
var css63 = `._flex1_1k2kc_1 {
|
|
19319
19337
|
flex: 1;
|
|
19320
19338
|
}
|
|
19321
19339
|
|
|
19322
|
-
._dialog-
|
|
19340
|
+
._dialog-content_1k2kc_5 {
|
|
19323
19341
|
height: 70vh;
|
|
19324
19342
|
width: 80vw;
|
|
19325
19343
|
}
|
|
19326
19344
|
|
|
19327
|
-
._dialog-
|
|
19345
|
+
._dialog-body_1k2kc_10 {
|
|
19328
19346
|
height: 100%;
|
|
19329
19347
|
}
|
|
19330
19348
|
|
|
19331
|
-
._empty-
|
|
19349
|
+
._empty-state_1k2kc_14 {
|
|
19332
19350
|
height: 100%;
|
|
19333
19351
|
}
|
|
19334
19352
|
|
|
19335
|
-
._empty-state-
|
|
19353
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19336
19354
|
max-width: 360px;
|
|
19337
19355
|
text-wrap: auto;
|
|
19338
19356
|
}
|
|
19339
19357
|
|
|
19340
|
-
.
|
|
19358
|
+
._table_1k2kc_23 {
|
|
19341
19359
|
width: 100%;
|
|
19342
|
-
height: 100%;
|
|
19343
19360
|
table-layout: fixed;
|
|
19344
19361
|
}
|
|
19345
19362
|
|
|
19346
|
-
._table-
|
|
19363
|
+
._table-wrapper_1k2kc_28 {
|
|
19347
19364
|
/* Toolbar height */
|
|
19348
19365
|
max-height: calc(100% - 90px);
|
|
19349
19366
|
overflow: scroll;
|
|
19350
19367
|
}
|
|
19351
19368
|
|
|
19352
|
-
._table-
|
|
19369
|
+
._table-header_1k2kc_34 {
|
|
19353
19370
|
/* position: relative; */
|
|
19354
19371
|
z-index: 2;
|
|
19355
19372
|
}
|
|
19356
19373
|
|
|
19357
|
-
._table-
|
|
19374
|
+
._table-search_1k2kc_39 {
|
|
19358
19375
|
max-width: 360px;
|
|
19359
19376
|
}
|
|
19360
19377
|
|
|
19361
|
-
._table-content-
|
|
19378
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19362
19379
|
height: 100%;
|
|
19363
19380
|
}
|
|
19364
19381
|
|
|
19365
|
-
._table-action-
|
|
19382
|
+
._table-action-column_1k2kc_47 {
|
|
19366
19383
|
width: 24px;
|
|
19367
19384
|
}
|
|
19368
19385
|
|
|
19369
|
-
._table-action-
|
|
19386
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19370
19387
|
z-index: 10000;
|
|
19371
19388
|
min-width: 150px;
|
|
19372
19389
|
}
|
|
19373
19390
|
|
|
19374
|
-
._action-dialog-
|
|
19391
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19375
19392
|
z-index: 10001;
|
|
19376
19393
|
}
|
|
19377
19394
|
|
|
19378
|
-
._action-dialog-
|
|
19395
|
+
._action-dialog-content_1k2kc_60 {
|
|
19379
19396
|
z-index: 10002;
|
|
19380
19397
|
}
|
|
19381
19398
|
|
|
19382
|
-
._add-member-
|
|
19399
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19383
19400
|
width: 240px;
|
|
19384
19401
|
/* position: relative; */
|
|
19385
19402
|
}
|
|
19386
19403
|
|
|
19387
|
-
._add-member-dropdown-
|
|
19404
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19388
19405
|
width: 100%;
|
|
19389
19406
|
}
|
|
19390
|
-
|
|
19407
|
+
|
|
19408
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19391
19409
|
max-width: 100%;
|
|
19392
19410
|
overflow: hidden;
|
|
19393
19411
|
text-overflow: ellipsis;
|
|
19394
19412
|
white-space: nowrap;
|
|
19395
|
-
}
|
|
19396
|
-
`;
|
|
19413
|
+
}`;
|
|
19397
19414
|
(function() {
|
|
19398
19415
|
if (typeof document === "undefined") {
|
|
19399
19416
|
return;
|
|
@@ -19405,89 +19422,88 @@ var css63 = `._flex1_nxqqi_1 {
|
|
|
19405
19422
|
document.head.appendChild(el);
|
|
19406
19423
|
}
|
|
19407
19424
|
})();
|
|
19408
|
-
var members_module_css_default3 = { "flex1": "
|
|
19425
|
+
var members_module_css_default3 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
|
|
19409
19426
|
|
|
19410
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19411
|
-
var digest64 = "
|
|
19412
|
-
var css64 = `.
|
|
19427
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-hcYGuCmoZ90A/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
19428
|
+
var digest64 = "ebcda439dd3089ddec45efd9fcde5b77df883a11ec187ac2a1a6ef357a052851";
|
|
19429
|
+
var css64 = `._flex1_1k2kc_1 {
|
|
19413
19430
|
flex: 1;
|
|
19414
19431
|
}
|
|
19415
19432
|
|
|
19416
|
-
._dialog-
|
|
19433
|
+
._dialog-content_1k2kc_5 {
|
|
19417
19434
|
height: 70vh;
|
|
19418
19435
|
width: 80vw;
|
|
19419
19436
|
}
|
|
19420
19437
|
|
|
19421
|
-
._dialog-
|
|
19438
|
+
._dialog-body_1k2kc_10 {
|
|
19422
19439
|
height: 100%;
|
|
19423
19440
|
}
|
|
19424
19441
|
|
|
19425
|
-
._empty-
|
|
19442
|
+
._empty-state_1k2kc_14 {
|
|
19426
19443
|
height: 100%;
|
|
19427
19444
|
}
|
|
19428
19445
|
|
|
19429
|
-
._empty-state-
|
|
19446
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19430
19447
|
max-width: 360px;
|
|
19431
19448
|
text-wrap: auto;
|
|
19432
19449
|
}
|
|
19433
19450
|
|
|
19434
|
-
.
|
|
19451
|
+
._table_1k2kc_23 {
|
|
19435
19452
|
width: 100%;
|
|
19436
|
-
height: 100%;
|
|
19437
19453
|
table-layout: fixed;
|
|
19438
19454
|
}
|
|
19439
19455
|
|
|
19440
|
-
._table-
|
|
19456
|
+
._table-wrapper_1k2kc_28 {
|
|
19441
19457
|
/* Toolbar height */
|
|
19442
19458
|
max-height: calc(100% - 90px);
|
|
19443
19459
|
overflow: scroll;
|
|
19444
19460
|
}
|
|
19445
19461
|
|
|
19446
|
-
._table-
|
|
19462
|
+
._table-header_1k2kc_34 {
|
|
19447
19463
|
/* position: relative; */
|
|
19448
19464
|
z-index: 2;
|
|
19449
19465
|
}
|
|
19450
19466
|
|
|
19451
|
-
._table-
|
|
19467
|
+
._table-search_1k2kc_39 {
|
|
19452
19468
|
max-width: 360px;
|
|
19453
19469
|
}
|
|
19454
19470
|
|
|
19455
|
-
._table-content-
|
|
19471
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19456
19472
|
height: 100%;
|
|
19457
19473
|
}
|
|
19458
19474
|
|
|
19459
|
-
._table-action-
|
|
19475
|
+
._table-action-column_1k2kc_47 {
|
|
19460
19476
|
width: 24px;
|
|
19461
19477
|
}
|
|
19462
19478
|
|
|
19463
|
-
._table-action-
|
|
19479
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19464
19480
|
z-index: 10000;
|
|
19465
19481
|
min-width: 150px;
|
|
19466
19482
|
}
|
|
19467
19483
|
|
|
19468
|
-
._action-dialog-
|
|
19484
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19469
19485
|
z-index: 10001;
|
|
19470
19486
|
}
|
|
19471
19487
|
|
|
19472
|
-
._action-dialog-
|
|
19488
|
+
._action-dialog-content_1k2kc_60 {
|
|
19473
19489
|
z-index: 10002;
|
|
19474
19490
|
}
|
|
19475
19491
|
|
|
19476
|
-
._add-member-
|
|
19492
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19477
19493
|
width: 240px;
|
|
19478
19494
|
/* position: relative; */
|
|
19479
19495
|
}
|
|
19480
19496
|
|
|
19481
|
-
._add-member-dropdown-
|
|
19497
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19482
19498
|
width: 100%;
|
|
19483
19499
|
}
|
|
19484
|
-
|
|
19500
|
+
|
|
19501
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19485
19502
|
max-width: 100%;
|
|
19486
19503
|
overflow: hidden;
|
|
19487
19504
|
text-overflow: ellipsis;
|
|
19488
19505
|
white-space: nowrap;
|
|
19489
|
-
}
|
|
19490
|
-
`;
|
|
19506
|
+
}`;
|
|
19491
19507
|
(function() {
|
|
19492
19508
|
if (typeof document === "undefined") {
|
|
19493
19509
|
return;
|
|
@@ -19499,7 +19515,7 @@ var css64 = `._flex1_nxqqi_1 {
|
|
|
19499
19515
|
document.head.appendChild(el);
|
|
19500
19516
|
}
|
|
19501
19517
|
})();
|
|
19502
|
-
var members_module_css_default4 = { "flex1": "
|
|
19518
|
+
var members_module_css_default4 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
|
|
19503
19519
|
|
|
19504
19520
|
// admin/views/organizations/details/projects/members/columns.tsx
|
|
19505
19521
|
import {
|
|
@@ -19617,87 +19633,86 @@ import {
|
|
|
19617
19633
|
toast as toast18
|
|
19618
19634
|
} from "@raystack/apsara";
|
|
19619
19635
|
|
|
19620
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19621
|
-
var digest65 = "
|
|
19622
|
-
var css65 = `.
|
|
19636
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-nEs3PEIYwLkw/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
19637
|
+
var digest65 = "1ce593688598c40174307f681a9e6b961fb5b68d59412ae462389765b5deeaa3";
|
|
19638
|
+
var css65 = `._flex1_1k2kc_1 {
|
|
19623
19639
|
flex: 1;
|
|
19624
19640
|
}
|
|
19625
19641
|
|
|
19626
|
-
._dialog-
|
|
19642
|
+
._dialog-content_1k2kc_5 {
|
|
19627
19643
|
height: 70vh;
|
|
19628
19644
|
width: 80vw;
|
|
19629
19645
|
}
|
|
19630
19646
|
|
|
19631
|
-
._dialog-
|
|
19647
|
+
._dialog-body_1k2kc_10 {
|
|
19632
19648
|
height: 100%;
|
|
19633
19649
|
}
|
|
19634
19650
|
|
|
19635
|
-
._empty-
|
|
19651
|
+
._empty-state_1k2kc_14 {
|
|
19636
19652
|
height: 100%;
|
|
19637
19653
|
}
|
|
19638
19654
|
|
|
19639
|
-
._empty-state-
|
|
19655
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19640
19656
|
max-width: 360px;
|
|
19641
19657
|
text-wrap: auto;
|
|
19642
19658
|
}
|
|
19643
19659
|
|
|
19644
|
-
.
|
|
19660
|
+
._table_1k2kc_23 {
|
|
19645
19661
|
width: 100%;
|
|
19646
|
-
height: 100%;
|
|
19647
19662
|
table-layout: fixed;
|
|
19648
19663
|
}
|
|
19649
19664
|
|
|
19650
|
-
._table-
|
|
19665
|
+
._table-wrapper_1k2kc_28 {
|
|
19651
19666
|
/* Toolbar height */
|
|
19652
19667
|
max-height: calc(100% - 90px);
|
|
19653
19668
|
overflow: scroll;
|
|
19654
19669
|
}
|
|
19655
19670
|
|
|
19656
|
-
._table-
|
|
19671
|
+
._table-header_1k2kc_34 {
|
|
19657
19672
|
/* position: relative; */
|
|
19658
19673
|
z-index: 2;
|
|
19659
19674
|
}
|
|
19660
19675
|
|
|
19661
|
-
._table-
|
|
19676
|
+
._table-search_1k2kc_39 {
|
|
19662
19677
|
max-width: 360px;
|
|
19663
19678
|
}
|
|
19664
19679
|
|
|
19665
|
-
._table-content-
|
|
19680
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19666
19681
|
height: 100%;
|
|
19667
19682
|
}
|
|
19668
19683
|
|
|
19669
|
-
._table-action-
|
|
19684
|
+
._table-action-column_1k2kc_47 {
|
|
19670
19685
|
width: 24px;
|
|
19671
19686
|
}
|
|
19672
19687
|
|
|
19673
|
-
._table-action-
|
|
19688
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19674
19689
|
z-index: 10000;
|
|
19675
19690
|
min-width: 150px;
|
|
19676
19691
|
}
|
|
19677
19692
|
|
|
19678
|
-
._action-dialog-
|
|
19693
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19679
19694
|
z-index: 10001;
|
|
19680
19695
|
}
|
|
19681
19696
|
|
|
19682
|
-
._action-dialog-
|
|
19697
|
+
._action-dialog-content_1k2kc_60 {
|
|
19683
19698
|
z-index: 10002;
|
|
19684
19699
|
}
|
|
19685
19700
|
|
|
19686
|
-
._add-member-
|
|
19701
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19687
19702
|
width: 240px;
|
|
19688
19703
|
/* position: relative; */
|
|
19689
19704
|
}
|
|
19690
19705
|
|
|
19691
|
-
._add-member-dropdown-
|
|
19706
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19692
19707
|
width: 100%;
|
|
19693
19708
|
}
|
|
19694
|
-
|
|
19709
|
+
|
|
19710
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19695
19711
|
max-width: 100%;
|
|
19696
19712
|
overflow: hidden;
|
|
19697
19713
|
text-overflow: ellipsis;
|
|
19698
19714
|
white-space: nowrap;
|
|
19699
|
-
}
|
|
19700
|
-
`;
|
|
19715
|
+
}`;
|
|
19701
19716
|
(function() {
|
|
19702
19717
|
if (typeof document === "undefined") {
|
|
19703
19718
|
return;
|
|
@@ -19709,27 +19724,20 @@ var css65 = `._flex1_nxqqi_1 {
|
|
|
19709
19724
|
document.head.appendChild(el);
|
|
19710
19725
|
}
|
|
19711
19726
|
})();
|
|
19712
|
-
var members_module_css_default5 = { "flex1": "
|
|
19727
|
+
var members_module_css_default5 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
|
|
19713
19728
|
|
|
19714
19729
|
// admin/views/organizations/details/projects/members/assign-role.tsx
|
|
19715
|
-
import { useCallback as useCallback15 } from "react";
|
|
19716
19730
|
import {
|
|
19717
19731
|
FrontierServiceQueries as FrontierServiceQueries24,
|
|
19718
|
-
|
|
19719
|
-
ListPoliciesRequestSchema as ListPoliciesRequestSchema2,
|
|
19720
|
-
DeletePolicyRequestSchema as DeletePolicyRequestSchema2,
|
|
19721
|
-
CreatePolicyRequestSchema as CreatePolicyRequestSchema3
|
|
19732
|
+
SetProjectMemberRoleRequestSchema as SetProjectMemberRoleRequestSchema2
|
|
19722
19733
|
} from "@raystack/proton/frontier";
|
|
19723
19734
|
import { create as create25 } from "@bufbuild/protobuf";
|
|
19724
|
-
import { useMutation as useMutation20
|
|
19725
|
-
import { createClient as createClient2 } from "@connectrpc/connect";
|
|
19735
|
+
import { useMutation as useMutation20 } from "@connectrpc/connect-query";
|
|
19726
19736
|
import { useForm as useForm12 } from "react-hook-form";
|
|
19727
19737
|
import { zodResolver as zodResolver12 } from "@hookform/resolvers/zod";
|
|
19728
19738
|
import { jsx as jsx104, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
19729
19739
|
var formSchema2 = external_exports.object({
|
|
19730
|
-
|
|
19731
|
-
message: "At least one role must be selected"
|
|
19732
|
-
})
|
|
19740
|
+
roleId: external_exports.string().min(1, "A role must be selected")
|
|
19733
19741
|
});
|
|
19734
19742
|
var AssignRole2 = ({
|
|
19735
19743
|
roles = [],
|
|
@@ -19738,84 +19746,36 @@ var AssignRole2 = ({
|
|
|
19738
19746
|
onRoleUpdate,
|
|
19739
19747
|
onClose
|
|
19740
19748
|
}) => {
|
|
19741
|
-
const
|
|
19749
|
+
const currentRoleId = user?.roleIds?.[0] || "";
|
|
19742
19750
|
const {
|
|
19743
19751
|
handleSubmit,
|
|
19744
19752
|
watch,
|
|
19745
19753
|
setValue,
|
|
19746
|
-
formState: { isSubmitting, errors }
|
|
19754
|
+
formState: { isSubmitting, errors, isDirty: isDirty2 }
|
|
19747
19755
|
} = useForm12({
|
|
19748
19756
|
defaultValues: {
|
|
19749
|
-
|
|
19757
|
+
roleId: currentRoleId
|
|
19750
19758
|
},
|
|
19751
19759
|
resolver: zodResolver12(formSchema2)
|
|
19752
19760
|
});
|
|
19753
|
-
const { mutateAsync:
|
|
19754
|
-
FrontierServiceQueries24.
|
|
19755
|
-
);
|
|
19756
|
-
const { mutateAsync: createPolicy } = useMutation20(
|
|
19757
|
-
FrontierServiceQueries24.createPolicy
|
|
19758
|
-
);
|
|
19759
|
-
const roleIds = watch("roleIds");
|
|
19760
|
-
function onCheckedChange(value, roleId) {
|
|
19761
|
-
if (!roleId)
|
|
19762
|
-
return;
|
|
19763
|
-
const currentRoles = new Set(roleIds);
|
|
19764
|
-
if (value) {
|
|
19765
|
-
currentRoles.add(roleId);
|
|
19766
|
-
} else {
|
|
19767
|
-
currentRoles.delete(roleId);
|
|
19768
|
-
}
|
|
19769
|
-
setValue("roleIds", currentRoles);
|
|
19770
|
-
}
|
|
19771
|
-
const checkRole = useCallback15(
|
|
19772
|
-
(roleId) => {
|
|
19773
|
-
if (!roleId)
|
|
19774
|
-
return false;
|
|
19775
|
-
return roleIds?.has(roleId) || false;
|
|
19776
|
-
},
|
|
19777
|
-
[roleIds]
|
|
19761
|
+
const { mutateAsync: setProjectMemberRole } = useMutation20(
|
|
19762
|
+
FrontierServiceQueries24.setProjectMemberRole
|
|
19778
19763
|
);
|
|
19764
|
+
const selectedRoleId = watch("roleId");
|
|
19779
19765
|
const onSubmit = async (data) => {
|
|
19780
19766
|
try {
|
|
19781
|
-
|
|
19782
|
-
|
|
19783
|
-
create25(ListPoliciesRequestSchema2, {
|
|
19767
|
+
await setProjectMemberRole(
|
|
19768
|
+
create25(SetProjectMemberRoleRequestSchema2, {
|
|
19784
19769
|
projectId,
|
|
19785
|
-
|
|
19770
|
+
principalId: user?.id || "",
|
|
19771
|
+
principalType: SCOPES.USER,
|
|
19772
|
+
roleId: data.roleId
|
|
19786
19773
|
})
|
|
19787
19774
|
);
|
|
19788
|
-
const policies = policiesResp.policies || [];
|
|
19789
|
-
const removedRolesPolicies = policies.filter(
|
|
19790
|
-
(policy) => !(policy.roleId && data.roleIds.has(policy.roleId))
|
|
19791
|
-
);
|
|
19792
|
-
await Promise.all(
|
|
19793
|
-
removedRolesPolicies.map(
|
|
19794
|
-
(policy) => deletePolicy(
|
|
19795
|
-
create25(DeletePolicyRequestSchema2, { id: policy.id || "" })
|
|
19796
|
-
)
|
|
19797
|
-
)
|
|
19798
|
-
);
|
|
19799
|
-
const resource = `app/project:${projectId}`;
|
|
19800
|
-
const principal = `app/user:${user?.id}`;
|
|
19801
|
-
const assignedRolesArr = Array.from(data.roleIds);
|
|
19802
|
-
await Promise.all(
|
|
19803
|
-
assignedRolesArr.map(
|
|
19804
|
-
(roleId) => createPolicy(
|
|
19805
|
-
create25(CreatePolicyRequestSchema3, {
|
|
19806
|
-
body: {
|
|
19807
|
-
roleId,
|
|
19808
|
-
resource,
|
|
19809
|
-
principal
|
|
19810
|
-
}
|
|
19811
|
-
})
|
|
19812
|
-
)
|
|
19813
|
-
)
|
|
19814
|
-
);
|
|
19815
19775
|
if (onRoleUpdate) {
|
|
19816
19776
|
onRoleUpdate({
|
|
19817
19777
|
...user,
|
|
19818
|
-
roleIds:
|
|
19778
|
+
roleIds: [data.roleId]
|
|
19819
19779
|
});
|
|
19820
19780
|
}
|
|
19821
19781
|
toast18.success("Role assigned successfully");
|
|
@@ -19841,7 +19801,7 @@ var AssignRole2 = ({
|
|
|
19841
19801
|
/* @__PURE__ */ jsx104("div", { role: "group", "aria-labelledby": "roles-group", children: /* @__PURE__ */ jsxs79(Flex75, { direction: "column", gap: 4, children: [
|
|
19842
19802
|
roles.map((role) => {
|
|
19843
19803
|
const htmlId = `role-${role.id}`;
|
|
19844
|
-
const checked =
|
|
19804
|
+
const checked = selectedRoleId === role.id;
|
|
19845
19805
|
return /* @__PURE__ */ jsxs79(Flex75, { gap: 3, children: [
|
|
19846
19806
|
/* @__PURE__ */ jsx104(
|
|
19847
19807
|
Checkbox3,
|
|
@@ -19849,13 +19809,15 @@ var AssignRole2 = ({
|
|
|
19849
19809
|
id: htmlId,
|
|
19850
19810
|
"data-test-id": `role-checkbox-${role.id}`,
|
|
19851
19811
|
checked,
|
|
19852
|
-
onCheckedChange: (
|
|
19812
|
+
onCheckedChange: () => setValue("roleId", role.id || "", {
|
|
19813
|
+
shouldDirty: true
|
|
19814
|
+
})
|
|
19853
19815
|
}
|
|
19854
19816
|
),
|
|
19855
19817
|
/* @__PURE__ */ jsx104(Label9, { htmlFor: htmlId, children: role.title })
|
|
19856
19818
|
] }, role.id);
|
|
19857
19819
|
}),
|
|
19858
|
-
errors.
|
|
19820
|
+
errors.roleId && /* @__PURE__ */ jsx104(Text54, { variant: "danger", children: errors.roleId.message })
|
|
19859
19821
|
] }) })
|
|
19860
19822
|
] }) }),
|
|
19861
19823
|
/* @__PURE__ */ jsxs79(Dialog16.Footer, { children: [
|
|
@@ -19873,6 +19835,7 @@ var AssignRole2 = ({
|
|
|
19873
19835
|
Button28,
|
|
19874
19836
|
{
|
|
19875
19837
|
type: "submit",
|
|
19838
|
+
disabled: !isDirty2,
|
|
19876
19839
|
"data-test-id": "assign-role-update-button",
|
|
19877
19840
|
loading: isSubmitting,
|
|
19878
19841
|
loaderText: "Updating...",
|
|
@@ -19889,96 +19852,92 @@ var AssignRole2 = ({
|
|
|
19889
19852
|
// admin/views/organizations/details/projects/members/remove-member.tsx
|
|
19890
19853
|
import { useState as useState32 } from "react";
|
|
19891
19854
|
import {
|
|
19892
|
-
FrontierService as FrontierService3,
|
|
19893
19855
|
FrontierServiceQueries as FrontierServiceQueries25,
|
|
19894
|
-
|
|
19895
|
-
DeletePolicyRequestSchema as DeletePolicyRequestSchema3
|
|
19856
|
+
RemoveProjectMemberRequestSchema
|
|
19896
19857
|
} from "@raystack/proton/frontier";
|
|
19897
19858
|
import { create as create26 } from "@bufbuild/protobuf";
|
|
19898
|
-
import { useMutation as useMutation21
|
|
19899
|
-
import { createClient as createClient3 } from "@connectrpc/connect";
|
|
19859
|
+
import { useMutation as useMutation21 } from "@connectrpc/connect-query";
|
|
19900
19860
|
|
|
19901
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19902
|
-
var digest66 = "
|
|
19903
|
-
var css66 = `.
|
|
19861
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-sQhO5Cq6Agp4/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
19862
|
+
var digest66 = "57de9ab15aa3235c9cbdc9bef9adb6f7a0bbabf232f47da4a8b675d573082759";
|
|
19863
|
+
var css66 = `._flex1_1k2kc_1 {
|
|
19904
19864
|
flex: 1;
|
|
19905
19865
|
}
|
|
19906
19866
|
|
|
19907
|
-
._dialog-
|
|
19867
|
+
._dialog-content_1k2kc_5 {
|
|
19908
19868
|
height: 70vh;
|
|
19909
19869
|
width: 80vw;
|
|
19910
19870
|
}
|
|
19911
19871
|
|
|
19912
|
-
._dialog-
|
|
19872
|
+
._dialog-body_1k2kc_10 {
|
|
19913
19873
|
height: 100%;
|
|
19914
19874
|
}
|
|
19915
19875
|
|
|
19916
|
-
._empty-
|
|
19876
|
+
._empty-state_1k2kc_14 {
|
|
19917
19877
|
height: 100%;
|
|
19918
19878
|
}
|
|
19919
19879
|
|
|
19920
|
-
._empty-state-
|
|
19880
|
+
._empty-state-subheading_1k2kc_18 {
|
|
19921
19881
|
max-width: 360px;
|
|
19922
19882
|
text-wrap: auto;
|
|
19923
19883
|
}
|
|
19924
19884
|
|
|
19925
|
-
.
|
|
19885
|
+
._table_1k2kc_23 {
|
|
19926
19886
|
width: 100%;
|
|
19927
|
-
height: 100%;
|
|
19928
19887
|
table-layout: fixed;
|
|
19929
19888
|
}
|
|
19930
19889
|
|
|
19931
|
-
._table-
|
|
19890
|
+
._table-wrapper_1k2kc_28 {
|
|
19932
19891
|
/* Toolbar height */
|
|
19933
19892
|
max-height: calc(100% - 90px);
|
|
19934
19893
|
overflow: scroll;
|
|
19935
19894
|
}
|
|
19936
19895
|
|
|
19937
|
-
._table-
|
|
19896
|
+
._table-header_1k2kc_34 {
|
|
19938
19897
|
/* position: relative; */
|
|
19939
19898
|
z-index: 2;
|
|
19940
19899
|
}
|
|
19941
19900
|
|
|
19942
|
-
._table-
|
|
19901
|
+
._table-search_1k2kc_39 {
|
|
19943
19902
|
max-width: 360px;
|
|
19944
19903
|
}
|
|
19945
19904
|
|
|
19946
|
-
._table-content-
|
|
19905
|
+
._table-content-wrapper_1k2kc_43 {
|
|
19947
19906
|
height: 100%;
|
|
19948
19907
|
}
|
|
19949
19908
|
|
|
19950
|
-
._table-action-
|
|
19909
|
+
._table-action-column_1k2kc_47 {
|
|
19951
19910
|
width: 24px;
|
|
19952
19911
|
}
|
|
19953
19912
|
|
|
19954
|
-
._table-action-
|
|
19913
|
+
._table-action-dropdown_1k2kc_51 {
|
|
19955
19914
|
z-index: 10000;
|
|
19956
19915
|
min-width: 150px;
|
|
19957
19916
|
}
|
|
19958
19917
|
|
|
19959
|
-
._action-dialog-
|
|
19918
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
19960
19919
|
z-index: 10001;
|
|
19961
19920
|
}
|
|
19962
19921
|
|
|
19963
|
-
._action-dialog-
|
|
19922
|
+
._action-dialog-content_1k2kc_60 {
|
|
19964
19923
|
z-index: 10002;
|
|
19965
19924
|
}
|
|
19966
19925
|
|
|
19967
|
-
._add-member-
|
|
19926
|
+
._add-member-dropdown_1k2kc_64 {
|
|
19968
19927
|
width: 240px;
|
|
19969
19928
|
/* position: relative; */
|
|
19970
19929
|
}
|
|
19971
19930
|
|
|
19972
|
-
._add-member-dropdown-
|
|
19931
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
19973
19932
|
width: 100%;
|
|
19974
19933
|
}
|
|
19975
|
-
|
|
19934
|
+
|
|
19935
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
19976
19936
|
max-width: 100%;
|
|
19977
19937
|
overflow: hidden;
|
|
19978
19938
|
text-overflow: ellipsis;
|
|
19979
19939
|
white-space: nowrap;
|
|
19980
|
-
}
|
|
19981
|
-
`;
|
|
19940
|
+
}`;
|
|
19982
19941
|
(function() {
|
|
19983
19942
|
if (typeof document === "undefined") {
|
|
19984
19943
|
return;
|
|
@@ -19990,7 +19949,7 @@ var css66 = `._flex1_nxqqi_1 {
|
|
|
19990
19949
|
document.head.appendChild(el);
|
|
19991
19950
|
}
|
|
19992
19951
|
})();
|
|
19993
|
-
var members_module_css_default6 = { "flex1": "
|
|
19952
|
+
var members_module_css_default6 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
|
|
19994
19953
|
|
|
19995
19954
|
// admin/views/organizations/details/projects/members/remove-member.tsx
|
|
19996
19955
|
import { Button as Button29, Dialog as Dialog17, Flex as Flex76, Text as Text55, toast as toast19 } from "@raystack/apsara";
|
|
@@ -20003,30 +19962,21 @@ var RemoveMember2 = ({
|
|
|
20003
19962
|
}) => {
|
|
20004
19963
|
const t = useTerminology();
|
|
20005
19964
|
const [isSubmitting, setIsSubmitting] = useState32(false);
|
|
20006
|
-
const
|
|
20007
|
-
|
|
20008
|
-
FrontierServiceQueries25.deletePolicy
|
|
19965
|
+
const { mutateAsync: removeProjectMember } = useMutation21(
|
|
19966
|
+
FrontierServiceQueries25.removeProjectMember
|
|
20009
19967
|
);
|
|
20010
19968
|
async function onSubmit() {
|
|
20011
19969
|
try {
|
|
20012
19970
|
if (!user)
|
|
20013
19971
|
return;
|
|
20014
19972
|
setIsSubmitting(true);
|
|
20015
|
-
|
|
20016
|
-
|
|
20017
|
-
create26(ListPoliciesRequestSchema3, {
|
|
19973
|
+
await removeProjectMember(
|
|
19974
|
+
create26(RemoveProjectMemberRequestSchema, {
|
|
20018
19975
|
projectId,
|
|
20019
|
-
|
|
19976
|
+
principalId: user.id,
|
|
19977
|
+
principalType: "app/user"
|
|
20020
19978
|
})
|
|
20021
19979
|
);
|
|
20022
|
-
const policies = policiesResp.policies || [];
|
|
20023
|
-
await Promise.all(
|
|
20024
|
-
policies.map(
|
|
20025
|
-
(policy) => deletePolicy(
|
|
20026
|
-
create26(DeletePolicyRequestSchema3, { id: policy.id || "" })
|
|
20027
|
-
)
|
|
20028
|
-
)
|
|
20029
|
-
);
|
|
20030
19980
|
if (onRemove) {
|
|
20031
19981
|
onRemove(user);
|
|
20032
19982
|
}
|
|
@@ -20106,87 +20056,86 @@ import {
|
|
|
20106
20056
|
Text as Text56
|
|
20107
20057
|
} from "@raystack/apsara";
|
|
20108
20058
|
|
|
20109
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20110
|
-
var digest67 = "
|
|
20111
|
-
var css67 = `.
|
|
20059
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-UJxANa1Z8Cfq/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
20060
|
+
var digest67 = "6e19481f68a5c40e10a9bc235d1ce2b8cd865f1df2b4a3392a736730697a6f57";
|
|
20061
|
+
var css67 = `._flex1_1k2kc_1 {
|
|
20112
20062
|
flex: 1;
|
|
20113
20063
|
}
|
|
20114
20064
|
|
|
20115
|
-
._dialog-
|
|
20065
|
+
._dialog-content_1k2kc_5 {
|
|
20116
20066
|
height: 70vh;
|
|
20117
20067
|
width: 80vw;
|
|
20118
20068
|
}
|
|
20119
20069
|
|
|
20120
|
-
._dialog-
|
|
20070
|
+
._dialog-body_1k2kc_10 {
|
|
20121
20071
|
height: 100%;
|
|
20122
20072
|
}
|
|
20123
20073
|
|
|
20124
|
-
._empty-
|
|
20074
|
+
._empty-state_1k2kc_14 {
|
|
20125
20075
|
height: 100%;
|
|
20126
20076
|
}
|
|
20127
20077
|
|
|
20128
|
-
._empty-state-
|
|
20078
|
+
._empty-state-subheading_1k2kc_18 {
|
|
20129
20079
|
max-width: 360px;
|
|
20130
20080
|
text-wrap: auto;
|
|
20131
20081
|
}
|
|
20132
20082
|
|
|
20133
|
-
.
|
|
20083
|
+
._table_1k2kc_23 {
|
|
20134
20084
|
width: 100%;
|
|
20135
|
-
height: 100%;
|
|
20136
20085
|
table-layout: fixed;
|
|
20137
20086
|
}
|
|
20138
20087
|
|
|
20139
|
-
._table-
|
|
20088
|
+
._table-wrapper_1k2kc_28 {
|
|
20140
20089
|
/* Toolbar height */
|
|
20141
20090
|
max-height: calc(100% - 90px);
|
|
20142
20091
|
overflow: scroll;
|
|
20143
20092
|
}
|
|
20144
20093
|
|
|
20145
|
-
._table-
|
|
20094
|
+
._table-header_1k2kc_34 {
|
|
20146
20095
|
/* position: relative; */
|
|
20147
20096
|
z-index: 2;
|
|
20148
20097
|
}
|
|
20149
20098
|
|
|
20150
|
-
._table-
|
|
20099
|
+
._table-search_1k2kc_39 {
|
|
20151
20100
|
max-width: 360px;
|
|
20152
20101
|
}
|
|
20153
20102
|
|
|
20154
|
-
._table-content-
|
|
20103
|
+
._table-content-wrapper_1k2kc_43 {
|
|
20155
20104
|
height: 100%;
|
|
20156
20105
|
}
|
|
20157
20106
|
|
|
20158
|
-
._table-action-
|
|
20107
|
+
._table-action-column_1k2kc_47 {
|
|
20159
20108
|
width: 24px;
|
|
20160
20109
|
}
|
|
20161
20110
|
|
|
20162
|
-
._table-action-
|
|
20111
|
+
._table-action-dropdown_1k2kc_51 {
|
|
20163
20112
|
z-index: 10000;
|
|
20164
20113
|
min-width: 150px;
|
|
20165
20114
|
}
|
|
20166
20115
|
|
|
20167
|
-
._action-dialog-
|
|
20116
|
+
._action-dialog-overlay_1k2kc_56 {
|
|
20168
20117
|
z-index: 10001;
|
|
20169
20118
|
}
|
|
20170
20119
|
|
|
20171
|
-
._action-dialog-
|
|
20120
|
+
._action-dialog-content_1k2kc_60 {
|
|
20172
20121
|
z-index: 10002;
|
|
20173
20122
|
}
|
|
20174
20123
|
|
|
20175
|
-
._add-member-
|
|
20124
|
+
._add-member-dropdown_1k2kc_64 {
|
|
20176
20125
|
width: 240px;
|
|
20177
20126
|
/* position: relative; */
|
|
20178
20127
|
}
|
|
20179
20128
|
|
|
20180
|
-
._add-member-dropdown-
|
|
20129
|
+
._add-member-dropdown-member_1k2kc_69 {
|
|
20181
20130
|
width: 100%;
|
|
20182
20131
|
}
|
|
20183
|
-
|
|
20132
|
+
|
|
20133
|
+
._add-member-dropdown-member-name_1k2kc_73 {
|
|
20184
20134
|
max-width: 100%;
|
|
20185
20135
|
overflow: hidden;
|
|
20186
20136
|
text-overflow: ellipsis;
|
|
20187
20137
|
white-space: nowrap;
|
|
20188
|
-
}
|
|
20189
|
-
`;
|
|
20138
|
+
}`;
|
|
20190
20139
|
(function() {
|
|
20191
20140
|
if (typeof document === "undefined") {
|
|
20192
20141
|
return;
|
|
@@ -20198,7 +20147,7 @@ var css67 = `._flex1_nxqqi_1 {
|
|
|
20198
20147
|
document.head.appendChild(el);
|
|
20199
20148
|
}
|
|
20200
20149
|
})();
|
|
20201
|
-
var members_module_css_default7 = { "flex1": "
|
|
20150
|
+
var members_module_css_default7 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
|
|
20202
20151
|
|
|
20203
20152
|
// admin/views/organizations/details/projects/members/add-members-dropdown.tsx
|
|
20204
20153
|
import { Fragment as Fragment25, jsx as jsx106, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
@@ -20302,7 +20251,7 @@ var ProjectMembersDialog = ({
|
|
|
20302
20251
|
);
|
|
20303
20252
|
const { data: projectRoles = [], isLoading: isProjectRolesLoading, error: rolesError } = useQuery19(
|
|
20304
20253
|
FrontierServiceQueries26.listRoles,
|
|
20305
|
-
create27(
|
|
20254
|
+
create27(ListRolesRequestSchema4, { scopes: [PROJECT_NAMESPACE] }),
|
|
20306
20255
|
{
|
|
20307
20256
|
select: (data2) => data2?.roles || []
|
|
20308
20257
|
}
|
|
@@ -20337,7 +20286,7 @@ var ProjectMembersDialog = ({
|
|
|
20337
20286
|
}
|
|
20338
20287
|
);
|
|
20339
20288
|
const data = infiniteData?.pages?.flatMap((page) => page?.projectUsers || []) || [];
|
|
20340
|
-
const onTableQueryChange =
|
|
20289
|
+
const onTableQueryChange = useCallback14((query) => {
|
|
20341
20290
|
const updatedQuery = {
|
|
20342
20291
|
...query,
|
|
20343
20292
|
offset: 0,
|
|
@@ -20354,7 +20303,7 @@ var ProjectMembersDialog = ({
|
|
|
20354
20303
|
rqlRequest: updatedRQLRequest
|
|
20355
20304
|
});
|
|
20356
20305
|
}, []);
|
|
20357
|
-
const handleLoadMore =
|
|
20306
|
+
const handleLoadMore = useCallback14(async () => {
|
|
20358
20307
|
try {
|
|
20359
20308
|
if (!hasNextPage)
|
|
20360
20309
|
return;
|
|
@@ -20366,22 +20315,22 @@ var ProjectMembersDialog = ({
|
|
|
20366
20315
|
async function refetchMembers() {
|
|
20367
20316
|
await refetch();
|
|
20368
20317
|
}
|
|
20369
|
-
const openAssignRoleDialog =
|
|
20318
|
+
const openAssignRoleDialog = useCallback14(
|
|
20370
20319
|
(user) => {
|
|
20371
20320
|
setAssignRoleConfig({ isOpen: true, user });
|
|
20372
20321
|
},
|
|
20373
20322
|
[]
|
|
20374
20323
|
);
|
|
20375
|
-
const closeAssignRoleDialog =
|
|
20324
|
+
const closeAssignRoleDialog = useCallback14(() => {
|
|
20376
20325
|
setAssignRoleConfig({ isOpen: false, user: null });
|
|
20377
20326
|
}, []);
|
|
20378
|
-
const openRemoveMemberDialog =
|
|
20327
|
+
const openRemoveMemberDialog = useCallback14(
|
|
20379
20328
|
(user) => {
|
|
20380
20329
|
setRemoveMemberConfig({ isOpen: true, user });
|
|
20381
20330
|
},
|
|
20382
20331
|
[]
|
|
20383
20332
|
);
|
|
20384
|
-
const closeRemoveMemberDialog =
|
|
20333
|
+
const closeRemoveMemberDialog = useCallback14(() => {
|
|
20385
20334
|
setRemoveMemberConfig({ isOpen: false, user: null });
|
|
20386
20335
|
}, []);
|
|
20387
20336
|
const columns = useMemo13(
|
|
@@ -20642,8 +20591,8 @@ function OrganizationProjectsView() {
|
|
|
20642
20591
|
// admin/views/organizations/details/invoices/index.tsx
|
|
20643
20592
|
import { DataTable as DataTable23, EmptyState as EmptyState18, Flex as Flex80 } from "@raystack/apsara";
|
|
20644
20593
|
|
|
20645
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20646
|
-
var digest68 = "
|
|
20594
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-NqakbjYYCA9u/sdk/admin/views/organizations/details/invoices/invoices.module.css.js
|
|
20595
|
+
var digest68 = "546ebee7fce7fe5e8697d71bdfa0255e0686cc3ebbad64555162185d842bfb3b";
|
|
20647
20596
|
var css68 = `._empty-state_ct7gw_1 {
|
|
20648
20597
|
height: 100%;
|
|
20649
20598
|
}
|
|
@@ -20689,8 +20638,8 @@ var invoices_module_css_default3 = { "empty-state": "_empty-state_ct7gw_1", "emp
|
|
|
20689
20638
|
// admin/views/organizations/details/invoices/index.tsx
|
|
20690
20639
|
import { useContext as useContext22, useEffect as useEffect17, useMemo as useMemo15, useState as useState35 } from "react";
|
|
20691
20640
|
|
|
20692
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20693
|
-
var digest69 = "
|
|
20641
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-HnzEZ8gFv8oO/sdk/admin/views/organizations/details/invoices/invoices.module.css.js
|
|
20642
|
+
var digest69 = "e2ae9fd8be0f02b968f54d1add8a3c9c7edc821223f7087719ce83e7a961302d";
|
|
20694
20643
|
var css69 = `._empty-state_ct7gw_1 {
|
|
20695
20644
|
height: 100%;
|
|
20696
20645
|
}
|
|
@@ -20805,7 +20754,7 @@ var getColumns15 = ({
|
|
|
20805
20754
|
];
|
|
20806
20755
|
|
|
20807
20756
|
// admin/views/organizations/details/invoices/index.tsx
|
|
20808
|
-
import {
|
|
20757
|
+
import { FrontierServiceQueries as FrontierServiceQueries27 } from "@raystack/proton/frontier";
|
|
20809
20758
|
import { useInfiniteQuery as useInfiniteQuery8 } from "@connectrpc/connect-query";
|
|
20810
20759
|
import { jsx as jsx110, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
20811
20760
|
var DEFAULT_SORT7 = { name: "createdAt", order: "desc" };
|
|
@@ -20881,7 +20830,7 @@ function OrganizationInvoicesView() {
|
|
|
20881
20830
|
hasNextPage,
|
|
20882
20831
|
isError
|
|
20883
20832
|
} = useInfiniteQuery8(
|
|
20884
|
-
|
|
20833
|
+
FrontierServiceQueries27.searchOrganizationInvoices,
|
|
20885
20834
|
{ id: organizationId, query },
|
|
20886
20835
|
{
|
|
20887
20836
|
enabled: !!organizationId,
|
|
@@ -20951,8 +20900,8 @@ function OrganizationInvoicesView() {
|
|
|
20951
20900
|
// admin/views/organizations/details/tokens/index.tsx
|
|
20952
20901
|
import { DataTable as DataTable24, EmptyState as EmptyState19, Flex as Flex82 } from "@raystack/apsara";
|
|
20953
20902
|
|
|
20954
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20955
|
-
var digest70 = "
|
|
20903
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-RVbQ9IZd4TIm/sdk/admin/views/organizations/details/tokens/tokens.module.css.js
|
|
20904
|
+
var digest70 = "72bdc2373788f59a13a11e8102d54175ddeca7a788a03e9bad644543cc7b6649";
|
|
20956
20905
|
var css70 = `._empty-state_1mf09_1 {
|
|
20957
20906
|
height: 100%;
|
|
20958
20907
|
}
|
|
@@ -21009,11 +20958,11 @@ var tokens_module_css_default = { "empty-state": "_empty-state_1mf09_1", "emptyS
|
|
|
21009
20958
|
// admin/views/organizations/details/tokens/index.tsx
|
|
21010
20959
|
import { CoinIcon } from "@raystack/apsara/icons";
|
|
21011
20960
|
import { useContext as useContext23, useEffect as useEffect18, useMemo as useMemo16, useState as useState36 } from "react";
|
|
21012
|
-
import { AdminServiceQueries as
|
|
20961
|
+
import { AdminServiceQueries as AdminServiceQueries23 } from "@raystack/proton/frontier";
|
|
21013
20962
|
import { useInfiniteQuery as useInfiniteQuery9 } from "@connectrpc/connect-query";
|
|
21014
20963
|
|
|
21015
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
21016
|
-
var digest71 = "
|
|
20964
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-9Lzq2AaOdgjQ/sdk/admin/views/organizations/details/tokens/tokens.module.css.js
|
|
20965
|
+
var digest71 = "46d34845fccc926f004477be73f08f5f2e7e4ba2ce7378446ce6aa4f9c965de9";
|
|
21017
20966
|
var css71 = `._empty-state_1mf09_1 {
|
|
21018
20967
|
height: 100%;
|
|
21019
20968
|
}
|
|
@@ -21219,7 +21168,7 @@ function OrganizationTokensView() {
|
|
|
21219
21168
|
hasNextPage,
|
|
21220
21169
|
isError
|
|
21221
21170
|
} = useInfiniteQuery9(
|
|
21222
|
-
|
|
21171
|
+
AdminServiceQueries23.searchOrganizationTokens,
|
|
21223
21172
|
{ id: organizationId, query },
|
|
21224
21173
|
{
|
|
21225
21174
|
enabled: !!organizationId,
|
|
@@ -21288,8 +21237,8 @@ function OrganizationTokensView() {
|
|
|
21288
21237
|
// admin/views/organizations/details/apis/index.tsx
|
|
21289
21238
|
import { DataTable as DataTable25, EmptyState as EmptyState20, Flex as Flex84 } from "@raystack/apsara";
|
|
21290
21239
|
|
|
21291
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
21292
|
-
var digest72 = "
|
|
21240
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-X0TUz7nSlF8N/sdk/admin/views/organizations/details/apis/apis.module.css.js
|
|
21241
|
+
var digest72 = "d0d0f1b953f3ac55876b3f8f42a2386bf83ebac2fc3930f46d299690a132dc34";
|
|
21293
21242
|
var css72 = `._empty-state_r9k2f_1 {
|
|
21294
21243
|
height: 100%;
|
|
21295
21244
|
}
|
|
@@ -21368,14 +21317,14 @@ var css72 = `._empty-state_r9k2f_1 {
|
|
|
21368
21317
|
var apis_module_css_default = { "empty-state": "_empty-state_r9k2f_1", "emptyState": "_empty-state_r9k2f_1", "empty-state-subheading": "_empty-state-subheading_r9k2f_5", "emptyStateSubheading": "_empty-state-subheading_r9k2f_5", "table": "_table_r9k2f_10", "table-wrapper": "_table-wrapper_r9k2f_15", "tableWrapper": "_table-wrapper_r9k2f_15", "table-header": "_table-header_r9k2f_21", "tableHeader": "_table-header_r9k2f_21", "first-column": "_first-column_r9k2f_26", "firstColumn": "_first-column_r9k2f_26", "details-dialog": "_details-dialog_r9k2f_30", "detailsDialog": "_details-dialog_r9k2f_30", "skeleton": "_skeleton_r9k2f_38", "tab-root": "_tab-root_r9k2f_42", "tabRoot": "_tab-root_r9k2f_42", "tab-content": "_tab-content_r9k2f_47", "tabContent": "_tab-content_r9k2f_47", "list-item": "_list-item_r9k2f_52", "listItem": "_list-item_r9k2f_52", "dialog-body": "_dialog-body_r9k2f_60", "dialogBody": "_dialog-body_r9k2f_60" };
|
|
21369
21318
|
|
|
21370
21319
|
// admin/views/organizations/details/apis/index.tsx
|
|
21371
|
-
import { useCallback as
|
|
21320
|
+
import { useCallback as useCallback16, useContext as useContext24, useEffect as useEffect20, useMemo as useMemo18, useState as useState37 } from "react";
|
|
21372
21321
|
|
|
21373
21322
|
// admin/views/organizations/details/apis/columns.tsx
|
|
21374
21323
|
import { Text as Text58 } from "@raystack/apsara";
|
|
21375
21324
|
import dayjs16 from "dayjs";
|
|
21376
21325
|
|
|
21377
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
21378
|
-
var digest73 = "
|
|
21326
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-zF3gSd3Qqy03/sdk/admin/views/organizations/details/apis/apis.module.css.js
|
|
21327
|
+
var digest73 = "dc48eabf0287876f28cc4a12e697b823ca19661c77309c346524a4a042c886ac";
|
|
21379
21328
|
var css73 = `._empty-state_r9k2f_1 {
|
|
21380
21329
|
height: 100%;
|
|
21381
21330
|
}
|
|
@@ -21499,8 +21448,8 @@ function getColumns17(options) {
|
|
|
21499
21448
|
// admin/views/organizations/details/apis/details-dialog.tsx
|
|
21500
21449
|
import { Dialog as Dialog19, Flex as Flex83, Skeleton as Skeleton4, Tabs, Text as Text59, toast as toast20 } from "@raystack/apsara";
|
|
21501
21450
|
|
|
21502
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
21503
|
-
var digest74 = "
|
|
21451
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2338-lR0kGJ6h3Q3B/sdk/admin/views/organizations/details/apis/apis.module.css.js
|
|
21452
|
+
var digest74 = "f3da688bdcb2ed2fea043d3061187fd95f3cbc9726b4b8b994488bb3c7bb120a";
|
|
21504
21453
|
var css74 = `._empty-state_r9k2f_1 {
|
|
21505
21454
|
height: 100%;
|
|
21506
21455
|
}
|
|
@@ -21579,10 +21528,10 @@ var css74 = `._empty-state_r9k2f_1 {
|
|
|
21579
21528
|
var apis_module_css_default3 = { "empty-state": "_empty-state_r9k2f_1", "emptyState": "_empty-state_r9k2f_1", "empty-state-subheading": "_empty-state-subheading_r9k2f_5", "emptyStateSubheading": "_empty-state-subheading_r9k2f_5", "table": "_table_r9k2f_10", "table-wrapper": "_table-wrapper_r9k2f_15", "tableWrapper": "_table-wrapper_r9k2f_15", "table-header": "_table-header_r9k2f_21", "tableHeader": "_table-header_r9k2f_21", "first-column": "_first-column_r9k2f_26", "firstColumn": "_first-column_r9k2f_26", "details-dialog": "_details-dialog_r9k2f_30", "detailsDialog": "_details-dialog_r9k2f_30", "skeleton": "_skeleton_r9k2f_38", "tab-root": "_tab-root_r9k2f_42", "tabRoot": "_tab-root_r9k2f_42", "tab-content": "_tab-content_r9k2f_47", "tabContent": "_tab-content_r9k2f_47", "list-item": "_list-item_r9k2f_52", "listItem": "_list-item_r9k2f_52", "dialog-body": "_dialog-body_r9k2f_60", "dialogBody": "_dialog-body_r9k2f_60" };
|
|
21580
21529
|
|
|
21581
21530
|
// admin/views/organizations/details/apis/details-dialog.tsx
|
|
21582
|
-
import { useCallback as
|
|
21531
|
+
import { useCallback as useCallback15, useEffect as useEffect19, useMemo as useMemo17 } from "react";
|
|
21583
21532
|
import { useQuery as useQuery20 } from "@connectrpc/connect-query";
|
|
21584
21533
|
import {
|
|
21585
|
-
FrontierServiceQueries as
|
|
21534
|
+
FrontierServiceQueries as FrontierServiceQueries28,
|
|
21586
21535
|
ListServiceUserProjectsRequestSchema,
|
|
21587
21536
|
ListServiceUserTokensRequestSchema
|
|
21588
21537
|
} from "@raystack/proton/frontier";
|
|
@@ -21612,7 +21561,7 @@ var ServiceUserDetailsDialog = ({
|
|
|
21612
21561
|
data: projects = [],
|
|
21613
21562
|
isLoading: isProjectLoading,
|
|
21614
21563
|
error: projectError
|
|
21615
|
-
} = useQuery20(
|
|
21564
|
+
} = useQuery20(FrontierServiceQueries28.listServiceUserProjects, projectsRequest, {
|
|
21616
21565
|
enabled: !!orgId && !!id,
|
|
21617
21566
|
select: (data) => data?.projects || []
|
|
21618
21567
|
});
|
|
@@ -21620,7 +21569,7 @@ var ServiceUserDetailsDialog = ({
|
|
|
21620
21569
|
data: tokens = [],
|
|
21621
21570
|
isLoading: isTokenLoading,
|
|
21622
21571
|
error: tokenError
|
|
21623
|
-
} = useQuery20(
|
|
21572
|
+
} = useQuery20(FrontierServiceQueries28.listServiceUserTokens, tokensRequest, {
|
|
21624
21573
|
enabled: !!orgId && !!id,
|
|
21625
21574
|
select: (data) => data?.tokens || []
|
|
21626
21575
|
});
|
|
@@ -21638,7 +21587,7 @@ var ServiceUserDetailsDialog = ({
|
|
|
21638
21587
|
console.error("Unable to fetch tokens:", tokenError);
|
|
21639
21588
|
}
|
|
21640
21589
|
}, [projectError, tokenError]);
|
|
21641
|
-
const onOpenChange =
|
|
21590
|
+
const onOpenChange = useCallback15(
|
|
21642
21591
|
(val) => {
|
|
21643
21592
|
if (!val) {
|
|
21644
21593
|
onClose();
|
|
@@ -21708,7 +21657,7 @@ var ServiceUserDetailsDialog = ({
|
|
|
21708
21657
|
// admin/views/organizations/details/apis/index.tsx
|
|
21709
21658
|
import { useInfiniteQuery as useInfiniteQuery10 } from "@connectrpc/connect-query";
|
|
21710
21659
|
import {
|
|
21711
|
-
AdminServiceQueries as
|
|
21660
|
+
AdminServiceQueries as AdminServiceQueries24
|
|
21712
21661
|
} from "@raystack/proton/frontier";
|
|
21713
21662
|
import { jsx as jsx115, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
21714
21663
|
var NoCredentials = () => {
|
|
@@ -21787,7 +21736,7 @@ function OrganizationApisView() {
|
|
|
21787
21736
|
isError,
|
|
21788
21737
|
hasNextPage
|
|
21789
21738
|
} = useInfiniteQuery10(
|
|
21790
|
-
|
|
21739
|
+
AdminServiceQueries24.searchOrganizationServiceUsers,
|
|
21791
21740
|
{ id: organizationId, query },
|
|
21792
21741
|
{
|
|
21793
21742
|
pageParamKey: "query",
|
|
@@ -21817,10 +21766,10 @@ function OrganizationApisView() {
|
|
|
21817
21766
|
}
|
|
21818
21767
|
};
|
|
21819
21768
|
const loading = isLoading || isFetchingNextPage;
|
|
21820
|
-
const onDialogClose =
|
|
21769
|
+
const onDialogClose = useCallback16(() => {
|
|
21821
21770
|
setSelectedServiceUser(null);
|
|
21822
21771
|
}, []);
|
|
21823
|
-
const onRowClick =
|
|
21772
|
+
const onRowClick = useCallback16(
|
|
21824
21773
|
(row) => {
|
|
21825
21774
|
setSelectedServiceUser(row);
|
|
21826
21775
|
},
|